jsf.js_next_gen 4.0.4-beta.5 → 4.0.4-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs/functions/myfaces.ab.html +8 -3
- package/dist/main.js +14 -0
- package/dist/window/faces-development.js +37 -13
- package/dist/window/faces-development.js.map +1 -1
- package/dist/window/faces.js +1 -1
- package/dist/window/faces.js.map +1 -1
- package/dist/window/jsf-development.js +37 -13
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.map +1 -1
- package/package.json +1 -1
- package/remap.js +1 -0
- package/src/main/typescript/@types/definitions/index.d.ts +1 -1
- package/src/main/typescript/api/_api.ts +29 -13
- package/src/main/typescript/impl/xhrCore/ErrorData.ts +1 -1
- package/src/main/typescript/impl/xhrCore/EventData.ts +17 -8
- package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +1 -1
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +1 -1
- package/src/main/typescript/test/api/MyFacesABTest.spec.ts +117 -0
- package/src/main/typescript/test/xhrCore/EventTests.spec.ts +25 -1
- package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +1 -1
- package/target/api/_api.js +17 -3
- package/target/api/_api.js.map +1 -1
- package/target/impl/xhrCore/ErrorData.js +1 -1
- package/target/impl/xhrCore/ErrorData.js.map +1 -1
- package/target/impl/xhrCore/EventData.js +17 -7
- package/target/impl/xhrCore/EventData.js.map +1 -1
- package/target/impl/xhrCore/ResponseProcessor.js +1 -1
- package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
- package/target/impl/xhrCore/XhrRequest.js +1 -1
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
- package/target/test/api/MyFacesABTest.spec.js +117 -0
- package/target/test/api/MyFacesABTest.spec.js.map +1 -0
- package/target/test/xhrCore/EventTests.spec.js +20 -1
- package/target/test/xhrCore/EventTests.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest.spec.js +1 -1
- package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
- package/webpack.config.js +2 -2
- package/webpack.config.js.map +1 -1
- package/webpack.config.ts +2 -2
- package/faulty_response.html +0 -167
- package/pom.xml +0 -68
- package/target/classes/application.properties +0 -1
- package/target/classes/com/example/jsfs_js_ts/DecoratedFacesJS.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/DecoratingResourceHandlerWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMapFileResourceWrapper.class +0 -0
- package/target/classes/com/example/jsfs_js_ts/FacesJSMappingDecorator.class +0 -0
- package/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +0 -4
- package/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +0 -4
- package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +0 -1
- package/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +0 -1
- package/target/surefire-reports/TEST-com.example.jsfs_js_ts.JsfsJsTsApplicationTests.xml +0 -76
- package/target/surefire-reports/com.example.jsfs_js_ts.JsfsJsTsApplicationTests.txt +0 -7
- package/target/test-classes/.gz +0 -0
- package/target/test-classes/com/example/jsfs_js_ts/JsfsJsTsApplicationTests.class +0 -0
- package/target/test-classes/fileuploadtest.html +0 -24
- package/target/test-classes/jsf-development.js +0 -3559
- package/target/test-classes/jsf-development.js.br +0 -0
- package/target/test-classes/jsf-development.js.gz +0 -0
- package/target/test-classes/jsf-development.js.map +0 -1
- package/target/test-classes/jsf.js +0 -3
- package/target/test-classes/jsf.js.br +0 -0
- package/target/test-classes/jsf.js.gz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsf-development.js","mappings":";;;;;;;;;;;AAAA;;;;;;;;;;;;;;;GAeG;;;AAQH,8HAA0C;AAE1C;;GAEG;AACH,MAAM,YAAY;IACd,YAAoB,MAAW;QAAX,WAAM,GAAN,MAAM,C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typescript/AssocArray.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/Config.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/DomQuery.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/Es2019Array.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/Global.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/Lang.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/Monad.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/SourcesCollectors.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/XmlQuery.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/index_core.ts","webpack://jsf.js_next_gen/./src/main/typescript/api/_api.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/AjaxImpl.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/PushImpl.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/core/Const.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/core/ImplTypes.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/i18n/Messages.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/Assertions.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/AsyncRunnable.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/ExtDomQuery.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/FileUtils.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/HiddenInputBuilder.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/Lang.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/XhrQueueController.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/ErrorData.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/EventData.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/RequestDataResolver.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/ResonseDataResolver.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/Response.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/ResponseProcessor.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/XhrFormData.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/XhrRequest.ts","webpack://jsf.js_next_gen/./src/main/typescript/myfaces/OamSubmit.ts","webpack://jsf.js_next_gen/webpack/bootstrap","webpack://jsf.js_next_gen/webpack/runtime/global","webpack://jsf.js_next_gen/./src/main/typescript/api/jsf.ts"],"sourcesContent":["/*!\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * various helpers to deal with associative\n * arrays. If someone feels uncomfortable using\n * The config system, this is similar!\n */\nimport {IValueHolder} from \"./Monad\";\nimport {Es2019Array} from \"./Es2019Array\";\n\n/**\n * A nop as assign functionality (aka ignore assign)\n */\nclass IgnoreAssign implements IValueHolder<any> {\n constructor(private parent: any) {}\n\n set value(value: any | Array<any>) {\n }\n get value(): any | Array<any> {\n return this.parent;\n }\n};\n\n/**\n * uses the known pattern from config\n * assign(target, key1, key2, key3).value = value;\n * @param target\n * @param keys\n */\nexport function assign<T>(target: {[key: string]: any}, ...accessPath: string[]): IValueHolder<T> {\n if (accessPath.length < 1) {\n return new IgnoreAssign(target);\n }\n const lastPathItem = buildPath(target, ...accessPath);\n let assigner: IValueHolder<T> = new (class {\n set value(value: T | Array<T>) {\n lastPathItem.target[lastPathItem.key] = value;\n }\n\n get value(): T | Array<T> {\n return lastPathItem.target[lastPathItem.key];\n }\n })();\n return assigner;\n}\n\n\nexport function append<T>(target: {[key: string]: any}, ...accessPath: string[]): IValueHolder<T> {\n if (accessPath.length < 1) {\n return new IgnoreAssign(target);\n }\n const lastPathItem = buildPath(target, ...accessPath);\n let appender: IValueHolder<T> = new (class {\n set value(value: T | Array<T>) {\n if(!Array.isArray(value)) {\n value = [value];\n }\n if(!lastPathItem.target[lastPathItem.key]) {\n lastPathItem.target[lastPathItem.key] = value\n } else {\n if(!Array.isArray(lastPathItem.target[lastPathItem.key])) {\n lastPathItem.target[lastPathItem.key] = [lastPathItem.target[lastPathItem.key]];\n }\n lastPathItem.target[lastPathItem.key].push(...value);\n }\n }\n })();\n return appender;\n}\n\n/**\n * uses the known pattern from config\n * assign(target, key1, key2, key3).value = value;\n * @param target\n * @param keys\n */\nexport function assignIf<T>(condition: boolean, target: {[key: string]: any}, ...accessPath: string[]): IValueHolder<T> {\n if ((!condition) || accessPath.length < 1) {\n return new IgnoreAssign(target);\n }\n return assign(target, ...accessPath);\n}\n\n\n/**\n * uses the known pattern from config\n * assign(target, key1, key2, key3).value = value;\n * @param target\n * @param keys\n */\nexport function appendIf<T>(condition: boolean, target: {[key: string]: any}, ...accessPath: string[]): IValueHolder<T> {\n if ((!condition) || accessPath.length < 1) {\n return new IgnoreAssign(target);\n }\n return append(target, ...accessPath);\n}\n\nexport function resolve<T>(target, ...accessPath: string[]): T | null {\n let ret = null;\n accessPath = flattenAccessPath(accessPath);\n let currPtr = target;\n for(let cnt = 0; cnt < accessPath.length; cnt++) {\n let accessKeyIndex: number | string = accessPath[cnt];\n accessKeyIndex = arrayIndex(accessKeyIndex) != -1 ? arrayIndex(accessKeyIndex) : accessKeyIndex;\n currPtr = currPtr?.[accessKeyIndex];\n if('undefined' == typeof currPtr) {\n return null;\n }\n ret = currPtr;\n }\n return currPtr;\n}\n\n\nfunction keyVal(key: string): string {\n let start = key.indexOf(\"[\");\n\n if (start >= 0) {\n return key.substring(0, start);\n } else {\n return key;\n }\n}\n\nfunction arrayIndex(key: string): number {\n let start = key.indexOf(\"[\");\n let end = key.indexOf(\"]\");\n if (start >= 0 && end > 0 && start < end) {\n return parseInt(key.substring(start + 1, end));\n } else {\n return -1;\n }\n}\n\nfunction isArrayPos(currKey: string, arrPos: number): boolean {\n return currKey === \"\" && arrPos >= 0;\n}\n\nfunction isNoArray(arrPos: number): boolean {\n return arrPos == -1;\n}\n\nfunction alloc(arr: Array<any>, length: number, defaultVal = {}) {\n let toAdd = [];\n toAdd.length = length;\n toAdd[length - 1] = defaultVal;\n arr.push(...toAdd);\n}\n\n\nfunction flattenAccessPath(accessPath: string[]) {\n return new Es2019Array(...accessPath).flatMap(path => path.split(\"[\"))\n .map(path => path.indexOf(\"]\") != -1 ? \"[\" + path : path)\n .filter(path => path != \"\");\n}\n\n/**\n * builds up a path, only done if no data is present!\n * @param target\n * @param accessPath\n * @returns the last assignable entry\n */\nexport function buildPath(target, ...accessPath: string[]) {\n accessPath = flattenAccessPath(accessPath);\n //we now have a pattern of having the array accessors always in separate items\n let parentPtr = target;\n let parKeyArrPos = null;\n let currKey = null;\n let arrPos = -1;\n\n for (let cnt = 0; cnt < accessPath.length; cnt++) {\n currKey = keyVal(accessPath[cnt]);\n arrPos = arrayIndex(accessPath[cnt]);\n //it now is either key or arrPos\n if (arrPos != -1) {\n //case root(array)[5] -> root must be array and allocate 5 elements\n //case root.item[5] root.item must be array and of 5 elements\n if(!Array.isArray(parentPtr)) {\n throw Error(\"Associative array referenced as index array in path reference\");\n }\n\n //we need to look ahead for proper allocation\n //not end reached\n let nextArrPos = -1;\n if(cnt < accessPath.length - 1) {\n nextArrPos = arrayIndex(accessPath[cnt + 1])\n }\n let dataPresent = 'undefined' != typeof parentPtr?.[arrPos];\n //no data present check here is needed, because alloc only reserves if not present\n alloc(parentPtr, arrPos + 1, nextArrPos != -1 ?[]: {});\n parKeyArrPos = arrPos;\n //we now go to the reserved element\n if(cnt == accessPath.length - 1) {\n parentPtr[arrPos] = (dataPresent) ? parentPtr[arrPos] : null;\n } else {\n parentPtr = parentPtr[arrPos];\n }\n } else {\n if(Array.isArray(parentPtr)) {\n throw Error(\"Index array referenced as associative array in path reference\");\n }\n //again look ahead whether the next value is an array or assoc array\n let nextArrPos = -1;\n if(cnt < accessPath.length - 1) {\n nextArrPos = arrayIndex(accessPath[cnt + 1])\n }\n parKeyArrPos = currKey;\n let dataPresent = 'undefined' != typeof parentPtr?.[currKey];\n if(cnt == accessPath.length - 1) {\n if(!dataPresent) {\n parentPtr[currKey] = null;\n }\n } else {\n if(!dataPresent) {\n parentPtr[currKey] = nextArrPos == -1 ? {} : [];\n }\n parentPtr = parentPtr[currKey];\n }\n }\n }\n\n return {target: parentPtr, key: parKeyArrPos};\n\n}\n\nexport function deepCopy(fromAssoc: {[key: string]: any}): {[key: string]: any} {\n return JSON.parse(JSON.stringify(fromAssoc));\n}\n\n/**\n * simple left to right merge\n *\n * @param assocArrays\n */\nexport function simpleShallowMerge(...assocArrays) {\n return shallowMerge(true, false, ...assocArrays);\n}\n\nfunction _appendWithOverwrite(withAppend: boolean, target: { [p: string]: any }, key, arr, toAssign) {\n if (!withAppend) {\n target[key] = arr[key];\n } else {\n //overwrite means in this case, no double entries!\n //we do not a deep compare for now a single value compare suffices\n if ('undefined' == typeof target?.[key]) {\n target[key] = toAssign\n } else if (!Array.isArray(target[key])) {\n\n let oldVal = target[key];\n let newVals = [];\n //TODO maybe deep deep compare here, but on the other hand it is\n //shallow\n toAssign.forEach(item => {\n if (oldVal != item) {\n newVals.push(item);\n }\n });\n target[key] = new Es2019Array(...[]);\n target[key].push(oldVal);\n target[key].push(...newVals);\n } else {\n let oldVal = target[key];\n let newVals = [];\n //TODO deep compare here\n toAssign.forEach(item => {\n if (oldVal.indexOf(item) == -1) {\n newVals.push(item);\n }\n });\n\n target[key].push(...newVals);\n }\n }\n}\n\nfunction _appendWithoutOverwrite(withAppend: boolean, target: { [p: string]: any }, key, arr, toAssign) {\n if (!withAppend) {\n return;\n } else {\n //overwrite means in this case, no double entries!\n //we do not a deep compare for now a single value compare suffices\n if ('undefined' == typeof target?.[key]) {\n target[key] = toAssign\n } else if (!Array.isArray(target[key])) {\n let oldVal = target[key];\n target[key] = new Es2019Array(...[]);\n target[key].push(oldVal);\n target[key].push(...toAssign);\n } else {\n target[key].push(...toAssign);\n }\n }\n}\n\n/**\n * Shallow merge as in config, but on raw associative arrays\n *\n * @param overwrite overwrite existing keys, if they exist with their subtrees\n * @param withAppend if a key exist append the values or drop them\n * Combination overwrite withappend filters doubles out of merged arrays\n * @param assocArrays array of assoc arres reduced right to left\n */\nexport function shallowMerge(overwrite = true, withAppend = false, ...assocArrays) {\n let target: {[key: string]: any} = {};\n new Es2019Array(...assocArrays).map(arr => {\n return {arr, keys: Object.keys(arr)};\n }).forEach(({arr, keys}) => {\n keys.forEach(key => {\n let toAssign = arr[key];\n if(!Array.isArray(toAssign) && withAppend) {\n toAssign = new Es2019Array(...[toAssign]);\n }\n if(overwrite || !target?.[key]) {\n _appendWithOverwrite(withAppend, target, key, arr, toAssign);\n } else if(!overwrite && target?.[key]) {\n _appendWithoutOverwrite(withAppend, target, key, arr, toAssign);\n }\n\n\n\n })\n });\n return target;\n}\n\n//TODO test this, slightly altered from https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934\n//he overlooked some optimizations and a shortcut at typeof!\nexport function deepEqual(obj1, obj2) {\n if(obj1 == obj2) {\n return false;\n }\n if(typeof obj1 != typeof obj2) {\n return false;\n }\n if(Array.isArray(obj1) && Array.isArray(obj2)) {\n if(obj1.length != obj2.length) {\n return;\n }\n //arrays must be equal, order as well, there is no way around it\n //this is the major limitation we have\n return obj1.every((item, cnt) => deepEqual(item, obj2[cnt]));\n }\n //string number and other primitives are filtered out here\n if(\"object\" == typeof obj1 && \"object\" == typeof obj2) {\n let keys1 = Object.keys(obj1);\n let keys2 = Object.keys(obj2);\n if(keys1.length != keys2.length) {\n return false;\n }\n return keys1.every(key => keys2.indexOf(key) != -1) &&\n keys1.every(key => deepEqual(obj1[key], obj2[key]));\n }\n return false;\n //done here no match found\n}\n\n","import {Es2019Array} from \"./Es2019Array\";\nimport {IValueHolder, Optional, ValueEmbedder} from \"./Monad\";\nimport {Lang} from \"./Lang\";\nimport objAssign = Lang.objAssign;\nimport {append, appendIf, assign, assignIf, resolve, shallowMerge} from \"./AssocArray\";\n\n/**\n * specialized value embedder\n * for our Configuration\n */\nclass ConfigEntry<T> extends ValueEmbedder<T> {\n\n /*default value for absent*/\n static absent = ConfigEntry.fromNullable(null);\n\n /**\n * arrayed value positions\n */\n arrPos: number;\n\n constructor(rootElem: any, key: any, arrPos?: number) {\n super(rootElem, key);\n\n this.arrPos = arrPos ?? -1;\n }\n\n get value() {\n if (this.key == \"\" && this.arrPos >= 0) {\n return this._value[this.arrPos];\n } else if (this.key && this.arrPos >= 0) {\n return this._value[this.key][this.arrPos];\n }\n return this._value[this.key];\n }\n\n set value(val: T) {\n if (this.key == \"\" && this.arrPos >= 0) {\n this._value[this.arrPos] = val;\n return;\n } else if (this.key && this.arrPos >= 0) {\n this._value[this.key][this.arrPos] = val;\n return;\n }\n this._value[this.key] = val;\n }\n}\n\nexport const CONFIG_VALUE = \"__END_POINT__\";\nexport const CONFIG_ANY = \"__ANY_POINT__\";\nexport type ConfigDef = { [key: string]: any };\n\n/**\n * Config, basically an optional wrapper for a json structure\n * (not Side - effect free, since we can alter the internal config state\n * without generating a new config), not sure if we should make it side - effect free\n * since this would swallow a lot of performance and ram\n */\nexport class Config extends Optional<any> {\n constructor(root: any, private configDef ?: ConfigDef) {\n super(root);\n }\n\n /**\n * shallow copy getter, copies only the first level, references the deeper nodes\n * in a shared manner\n */\n get shallowCopy(): Config {\n return this.shallowCopy$();\n }\n\n protected shallowCopy$(): Config {\n let ret = new Config({});\n ret.shallowMerge(this.value);\n return ret;\n }\n\n /**\n * deep copy, copies all config nodes\n */\n get deepCopy(): Config {\n return this.deepCopy$();\n }\n\n protected deepCopy$(): Config {\n return new Config(objAssign({}, this.value));\n }\n\n /**\n * creates a config from an initial value or null\n * @param value\n */\n static fromNullable<T>(value?: T | null): Config {\n return new Config(value);\n }\n\n /**\n * simple merge for the root configs\n */\n shallowMerge(other: Config, overwrite = true, withAppend = false) {\n //shallow merge must be mutable so we have to remap\n let newThis = shallowMerge(overwrite, withAppend, this.value, other.value);\n if (Array.isArray(this._value)) {\n this._value.length = 0;\n this._value.push(...(newThis as any));\n } else {\n Object.getOwnPropertyNames(this._value).forEach(key => delete this._value[key]);\n Object.getOwnPropertyNames(newThis).forEach(key => this._value[key] = newThis[key]);\n }\n }\n\n /**\n * assigns a single value as array, or appends it\n * to an existing value mapping a single value to array\n *\n *\n * usage myConfig.append(\"foobaz\").value = \"newValue\"\n * myConfig.append(\"foobaz\").value = \"newValue2\"\n *\n * resulting in myConfig.foobaz == [\"newValue, newValue2\"]\n *\n * @param {string[]} accessPath\n */\n append(...accessPath: string[]): IValueHolder<any> {\n return append(this._value, ...accessPath);\n }\n\n /**\n * appends to an existing entry (or extends into an array and appends)\n * if the condition is met\n * @param {boolean} condition\n * @param {string[]} accessPath\n */\n appendIf(condition: boolean, ...accessPath: string[]): IValueHolder<any> {\n return appendIf(condition, this._value, ...accessPath);\n }\n\n /**\n * assigns a new value on the given access path\n * @param accessPath\n */\n assign(...accessPath): IValueHolder<any> {\n return assign(this.value, ...accessPath);\n }\n\n\n /**\n * assign a value if the condition is set to true, otherwise skip it\n *\n * @param condition the condition, the access accessPath into the config\n * @param accessPath\n */\n assignIf(condition: boolean, ...accessPath: Array<any>): IValueHolder<any> {\n return assignIf(condition, this._value, ...accessPath);\n }\n\n /**\n * get if the access path is present (get is reserved as getter with a default, on the current path)\n * TODO will be renamed to something more meaningful and deprecated, the name is ambiguous\n * @param accessPath the access path\n */\n getIf(...accessPath: Array<string>): Config {\n this.assertAccessPath(...accessPath);\n return this.getClass().fromNullable(resolve(this.value, ...accessPath));\n }\n\n\n /**\n * gets the current node and if none is present returns a config with a default value\n * @param defaultVal\n */\n get(defaultVal: any): Config {\n return this.getClass().fromNullable(super.get(defaultVal).value);\n }\n\n //empties the current config entry\n delete(key: string): Config {\n if (key in this.value) {\n delete this.value[key];\n }\n return this;\n }\n\n /**\n * converts the entire config into a json object\n */\n toJson(): any {\n return JSON.stringify(this.value);\n }\n\n\n protected getClass(): any {\n return Config;\n }\n\n private setVal(val: any) {\n this._value = val;\n }\n\n\n /**\n * asserts the access path for a semi typed access\n * @param accessPath\n * @private\n */\n private assertAccessPath(...accessPath: Array<string>) {\n accessPath = this.preprocessKeys(...accessPath);\n if (!this.configDef) {\n //untyped\n return;\n }\n\n const ERR_ACCESS_PATH = \"Access Path to config invalid\";\n let currAccessPos: any = Optional.fromNullable(Object.keys(this.configDef).map(key => {\n let ret = {};\n ret[key] = this.configDef[key];\n return ret;\n }));\n\n for (let cnt = 0; cnt < accessPath.length; cnt++) {\n let currKey = this.keyVal(accessPath[cnt]);\n let arrPos: any = this.arrayIndex(accessPath[cnt]);\n\n //key index\n if (this.isArray(arrPos)) {\n if (currKey != \"\") {\n currAccessPos = Array.isArray(currAccessPos.value) ?\n Optional.fromNullable(new Es2019Array(...currAccessPos.value)\n .find(item => {\n return !!(item?.[currKey] ?? false)\n })?.[currKey]?.[arrPos]) :\n Optional.fromNullable(currAccessPos.value?.[currKey]?.[arrPos] ?? null);\n\n } else {\n currAccessPos = (Array.isArray(currAccessPos.value)) ?\n Optional.fromNullable(currAccessPos.value?.[arrPos]) : Optional.absent;\n }\n //we noe store either the current array or the filtered look ahead to go further\n } else {\n //we now have an array and go further with a singular key\n currAccessPos = (Array.isArray(currAccessPos.value)) ? Optional.fromNullable(new Es2019Array(...currAccessPos.value)\n .find(item => {\n return !!(item?.[currKey] ?? false);\n })?.[currKey]) :\n Optional.fromNullable(currAccessPos.value?.[currKey] ?? null);\n }\n if (!currAccessPos.isPresent()) {\n throw Error(ERR_ACCESS_PATH)\n }\n if (currAccessPos.value == CONFIG_ANY) {\n return;\n }\n }\n }\n\n private isNoArray(arrPos: number) {\n return arrPos == -1;\n }\n\n private isArray(arrPos: number) {\n return !this.isNoArray(arrPos);\n }\n\n}","/*!\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http:// www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {IValueHolder, Optional, ValueEmbedder} from \"./Monad\";\nimport {XMLQuery} from \"./XmlQuery\";\n\nimport {ICollector, IStreamDataSource, ITERATION_STATUS} from \"./SourcesCollectors\";\nimport {Lang} from \"./Lang\";\nimport {_global$} from \"./Global\";\nimport {Es2019Array} from \"./Es2019Array\";\nimport trim = Lang.trim;\n\nimport isString = Lang.isString;\nimport eqi = Lang.equalsIgnoreCase;\nimport objToArray = Lang.objToArray;\nimport {append, assign, simpleShallowMerge} from \"./AssocArray\";\nimport {IDomQuery} from \"./IDomQuery\";\n\ndeclare var ownerDocument: any;\n\n/**\n * in order to poss custom parameters we need to extend the mutation observer init\n */\nexport interface WAIT_OPTS extends MutationObserverInit {\n timeout?: number;\n /**\n * interval on non legacy browsers\n */\n interval?: number;\n}\n\n\nclass NonceValueEmbedder extends ValueEmbedder<string> {\n\n constructor(private rootElems: HTMLElement[]) {\n super(rootElems?.[0], \"nonce\");\n }\n\n isAbsent(): boolean {\n const value = this.value;\n return 'undefined' == typeof value || '' == value;\n }\n\n get value(): string {\n return (this?.rootElems?.[0] as HTMLElement)?.nonce ?? (this?.rootElems?.[0] as HTMLElement)?.getAttribute(\"nonce\")\n }\n\n\n set value(newVal: string) {\n if (!this?.rootElems?.length) {\n return;\n }\n\n this.rootElems.forEach((rootElem: HTMLElement) => {\n if(\"undefined\" != typeof rootElem?.nonce) {\n rootElem.nonce = newVal\n } else {\n rootElem.setAttribute(\"nonce\", newVal);\n }\n });\n\n }\n}\n\n/**\n *\n * // - submit checkboxes and radio inputs only if checked\n if ((tagName != \"select\" && elemType != \"button\"\n && elemType != \"reset\" && elemType != \"submit\" && elemType != \"image\")\n && ((elemType != \"checkbox\" && elemType != \"radio\"\n */\n\nenum ALLOWED_SUBMITTABLE_ELEMENTS {\n SELECT = \"select\",\n BUTTON = \"button\",\n SUBMIT = \"submit\",\n RESET = \"reset\",\n IMAGE = \"image\",\n RADIO = \"radio\",\n CHECKBOX = \"checkbox\"\n\n}\n\n/**\n * helper to fix a common problem that a system has to wait, until a certain condition is reached.\n * Depending on the browser this uses either the Mutation Observer or a semi compatible interval as fallback.\n * @param root the root DomQuery element to start from\n * @param condition the condition lambda to be fulfilled\n * @param options options for the search\n */\nfunction waitUntilDom(root: DomQuery, condition: (element: DomQuery) => boolean, options: WAIT_OPTS = {\n attributes: true,\n childList: true,\n subtree: true,\n timeout: 500,\n interval: 100\n}): Promise<DomQuery> {\n return new Promise<DomQuery>((success, error) => {\n let observer: MutationObserver = null;\n const MUT_ERROR = new Error(\"Mutation observer timeout\");\n\n // we do the same but for now ignore the options on the dom query\n // we cannot use absent here, because the condition might search for an absent element\n function findElement(root: DomQuery, condition: (element: DomQuery) => boolean): DomQuery | null {\n let found = null;\n if (!!condition(root)) {\n return root;\n }\n if (options.childList) {\n found = (condition(root)) ? root : root.childNodes.filter(item => condition(item)).first().value.value;\n } else if (options.subtree) {\n found = (condition(root)) ? root : root.querySelectorAll(\" * \").filter(item => condition(item)).first().value.value;\n } else {\n found = (condition(root)) ? root : null;\n }\n return found;\n }\n\n let foundElement = root;\n if (!!(foundElement = findElement(foundElement, condition))) {\n success(new DomQuery(foundElement));\n return;\n }\n\n if ('undefined' != typeof MutationObserver) {\n const mutTimeout = setTimeout(() => {\n observer.disconnect();\n return error(MUT_ERROR);\n }, options.timeout);\n\n const callback: MutationCallback = (mutationList: MutationRecord[]) => {\n const found = new DomQuery(mutationList.map((mut) => mut.target)).filter(item => condition(item)).first();\n if (found.isPresent()) {\n clearTimeout(mutTimeout);\n observer.disconnect();\n success(new DomQuery(found || root));\n }\n }\n observer = new MutationObserver(callback);\n\n // browsers might ignore it, but we cannot break the api in the case\n // hence no timeout is passed\n let observableOpts = {...options};\n delete observableOpts.timeout;\n root.eachElem(item => {\n observer.observe(item, observableOpts)\n })\n } else { // fallback for legacy browsers without mutation observer\n\n let interval = setInterval(() => {\n let found = findElement(root, condition);\n if (!!found) {\n if (timeout) {\n clearTimeout(timeout);\n clearInterval(interval);\n interval = null;\n }\n success(new DomQuery(found || root));\n }\n }, options.interval);\n let timeout = setTimeout(() => {\n if (interval) {\n clearInterval(interval);\n error(MUT_ERROR);\n }\n }, options.timeout)\n\n }\n });\n}\n\nexport class ElementAttribute extends ValueEmbedder<string> {\n\n constructor(private element: DomQuery, private name: string, private defaultVal: string = null) {\n super(element, name);\n }\n\n get value(): string {\n let val: Element[] = this.element.get(0).orElse(...[]).values;\n if (!val.length) {\n return this.defaultVal;\n }\n return val[0].getAttribute(this.name);\n }\n\n set value(value: string) {\n let val: Element[] = this.element.get(0).orElse(...[]).values;\n for (let cnt = 0; cnt < val.length; cnt++) {\n val[cnt].setAttribute(this.name, value);\n }\n val[0].setAttribute(this.name, value);\n }\n\n protected getClass(): any {\n return ElementAttribute;\n }\n\n static fromNullable<ElementAttribute, T>(value?: any, valueKey: string = \"value\"): ElementAttribute {\n return <any>new ElementAttribute(value, valueKey);\n }\n\n}\n\nexport class Style extends ValueEmbedder<string> {\n\n constructor(private element: DomQuery, private name: string, private defaultVal: string = null) {\n super(element, name);\n }\n\n get value(): string {\n let val: Element[] = this.element.values;\n if (!val.length) {\n return this.defaultVal;\n }\n return (val[0] as HTMLElement).style[this.name];\n }\n\n set value(value: string) {\n let val: HTMLElement[] = this.element.values as HTMLElement[];\n for (let cnt = 0; cnt < val.length; cnt++) {\n val[cnt].style[this.name] = value;\n }\n }\n\n protected getClass(): any {\n return ElementAttribute;\n }\n\n static fromNullable<ElementAttribute, T>(value?: any, valueKey: string = \"value\"): ElementAttribute {\n return <any>new ElementAttribute(value, valueKey);\n }\n\n}\n\n/**\n * small helper for the specialized jsf case\n * @constructor\n */\nconst DEFAULT_WHITELIST = () => {\n return true;\n};\n\n\n\n/**\n * Monadic DomNode representation, ala jquery\n * This is a thin wrapper over querySelectorAll\n * to get slim monadic support\n * to reduce implementation code on the users side.\n * This is vital for frameworks which want to rely on\n * plain dom but still do not want to lose\n * the reduced code footprint of querying dom trees and traversing\n * by using functional patterns.\n *\n * Also, a few convenience methods are added to reduce\n * the code footprint of standard dom processing\n * operations like eval\n *\n * in most older systems\n * Note parts of this code still stem from the Dom.js I have written 10 years\n * ago, those parts look a bit ancient and will be replaced over time.\n *\n */\nexport class DomQuery implements IDomQuery, IStreamDataSource<DomQuery>, Iterable<DomQuery> {\n\n static absent = new DomQuery();\n\n /**\n * reference to the environmental global object\n */\n static global = _global$;\n\n private rootNode: Array<Element> = [];\n\n pos = -1;\n\n constructor(...rootNode: Array<Element | ShadowRoot | DomQuery | Document | Array<any> | string>) {\n\n if (Optional.fromNullable(rootNode).isAbsent() || !rootNode.length) {\n return;\n } else {\n // we need to flatten out the arrays\n\n for (let cnt = 0; cnt < rootNode.length; cnt++) {\n if (!rootNode[cnt]) {\n // we skip possible null entries which can happen in\n // certain corner conditions due to the constructor re-wrapping single elements into arrays.\n } else if (isString(rootNode[cnt])) {\n let foundElement = DomQuery.querySelectorAll(<string>rootNode[cnt]);\n if (!foundElement.isAbsent()) {\n rootNode.push(...foundElement.values)\n }\n } else if (rootNode[cnt] instanceof DomQuery) {\n this.rootNode.push(...(<any>rootNode[cnt]).values);\n } else {\n this.rootNode.push(<any>rootNode[cnt]);\n }\n }\n }\n }\n\n\n /**\n * returns the first element\n */\n get value(): Optional<Element> {\n return this.getAsElem(0);\n }\n\n get values(): Element[] {\n return this.allElems();\n }\n\n get global(): any {\n return _global$;\n }\n\n get stream(): any {\n throw Error(\"Not implemented, include Stream.ts for this to work\")\n }\n\n get lazyStream(): any {\n throw Error(\"Not implemented, include Stream.ts for this to work\")\n }\n\n /**\n * returns the id of the first element\n */\n get id(): ValueEmbedder<string> {\n return new ElementAttribute(this.get(0), \"id\");\n }\n\n /**\n * length of the entire query set\n */\n get length(): number {\n return this.rootNode.length\n }\n\n /**\n * convenience method for tagName\n */\n get tagName(): Optional<string> {\n return <Optional<string>>this.getAsElem(0).getIf(\"tagName\");\n }\n\n /**\n * convenience method for nodeName\n */\n get nodeName(): Optional<string> {\n return <Optional<string>>this.getAsElem(0).getIf(\"nodeName\");\n }\n\n isTag(tagName: string): boolean {\n return !this.isAbsent()\n && (this.nodeName.orElse(\"__none___\")\n .value.toLowerCase() == tagName.toLowerCase()\n || this.tagName.orElse(\"__none___\")\n .value.toLowerCase() == tagName.toLowerCase()\n )\n }\n\n /**\n * convenience property for type\n *\n * returns null in case of no type existing otherwise\n * the type of the first element\n */\n get type(): Optional<string> {\n return this.getAsElem(0).getIf(\"type\");\n }\n\n /**\n * convenience property for name\n *\n * returns null in case of no type existing otherwise\n * the name of the first element\n */\n get name(): ValueEmbedder<string> {\n return new ValueEmbedder(this.getAsElem(0).value, \"name\");\n }\n\n /**\n * convenience property for value\n *\n * returns null in case of no type existing otherwise\n * the value of the first element\n */\n get inputValue(): ValueEmbedder<string | boolean> {\n if (this.getAsElem(0).getIf(\"value\").isPresent()) {\n return new ValueEmbedder<string>(this.getAsElem(0).value);\n } else {\n return <any>ValueEmbedder.absent;\n }\n }\n\n get val(): string | boolean {\n return this.inputValue.value;\n }\n\n set val(value: string | boolean) {\n this.inputValue.value = value;\n }\n\n get nodeId(): string {\n return this.id.value;\n }\n\n set nodeId(value: string) {\n this.id.value = value;\n }\n\n get checked(): boolean {\n return new Es2019Array(...this.values).every(el => !!(<any>el).checked);\n }\n\n set checked(newChecked: boolean) {\n this.eachElem(el => (<any>el).checked = newChecked);\n }\n\n get elements(): DomQuery {\n // a simple querySelectorAll should suffice\n return this.querySelectorAll(\"input, checkbox, select, textarea, fieldset\");\n }\n\n get deepElements(): DomQuery {\n let elemStr = \"input, select, textarea, checkbox, fieldset\";\n return this.querySelectorAllDeep(elemStr);\n }\n\n /**\n * a deep search which treats the single isolated shadow dom areas\n * separately and runs the query on each shadow dom\n * @param queryStr\n */\n querySelectorAllDeep(queryStr: string): DomQuery {\n let found: Array<DomQuery> = [];\n let queryRes = this.querySelectorAll(queryStr);\n if (queryRes.length) {\n found.push(queryRes);\n }\n let shadowRoots = this.querySelectorAll(\"*\").shadowRoot;\n if (shadowRoots.length) {\n let shadowRes = shadowRoots.querySelectorAllDeep(queryStr);\n if (shadowRes.length) {\n found.push(shadowRes);\n }\n }\n return new DomQuery(...found);\n }\n\n\n /**\n * disabled flag\n */\n get disabled(): boolean {\n return this.attr(\"disabled\").isPresent();\n }\n\n set disabled(disabled: boolean) {\n // this.attr(\"disabled\").value = disabled + \"\";\n if (!disabled) {\n this.removeAttribute(\"disabled\");\n } else {\n this.attr(\"disabled\").value = \"disabled\";\n }\n\n }\n\n removeAttribute(name: string) {\n this.eachElem(item => item.removeAttribute(name));\n }\n\n get childNodes(): DomQuery {\n let childNodeArr: Array<Element> = [];\n this.eachElem((item: Element) => {\n childNodeArr = childNodeArr.concat(objToArray(item.childNodes));\n });\n return new DomQuery(...childNodeArr);\n }\n\n\n get asArray(): DomQuery[] {\n // filter not supported by IE11\n let items = new Es2019Array(...this.rootNode).filter(item => {\n return item != null\n }).map(item => {\n return DomQuery.byId(item)\n });\n return items as DomQuery[];\n }\n\n get offsetWidth(): number {\n return new Es2019Array(...this.rootNode)\n .filter(item => item != null)\n .map(elem => (elem as HTMLElement).offsetWidth)\n .reduce((accumulate, incoming) => accumulate + incoming, 0);\n }\n\n get offsetHeight(): number {\n return new Es2019Array(...this.rootNode)\n .filter(item => item != null)\n .map(elem => (elem as HTMLElement).offsetHeight)\n .reduce((accumulate, incoming) => accumulate + incoming, 0);\n }\n\n get offsetLeft(): number {\n return new Es2019Array(...this.rootNode)\n .filter(item => item != null)\n .map(elem => (elem as HTMLElement).offsetLeft)\n .reduce((accumulate, incoming) => accumulate + incoming, 0);\n }\n\n get offsetTop(): number {\n return new Es2019Array(this.rootNode)\n .filter(item => item != null)\n .map(elem => (elem as any).offsetTop)\n .reduce((accumulate, incoming) => accumulate + incoming, 0);\n }\n\n get asNodeArray(): Array<Element> {\n return new Es2019Array(...this.rootNode.filter(item => item != null));\n }\n\n get nonce(): ValueEmbedder<string> {\n return new NonceValueEmbedder(this.rootNode as HTMLElement[]);\n }\n\n static querySelectorAllDeep(selector: string) {\n return new DomQuery(document).querySelectorAllDeep(selector);\n }\n\n /**\n * easy query selector all producer\n *\n * @param selector the selector\n * @returns a results dom query object\n */\n static querySelectorAll(selector: string): DomQuery {\n if (selector.indexOf(\"/shadow/\") != -1) {\n return new DomQuery(document)._querySelectorAllDeep(selector);\n } else {\n return new DomQuery(document)._querySelectorAll(selector);\n }\n }\n\n /**\n * byId producer\n *\n * @param selector id\n * @param deep true if you want to go into shadow areas\n * @return a DomQuery containing the found elements\n */\n static byId(selector: string | DomQuery | Element, deep = false): DomQuery {\n if (isString(selector)) {\n return (!deep) ? new DomQuery(document).byId(<string>selector) : new DomQuery(document).byIdDeep(<string>selector);\n } else {\n return new DomQuery(<any>selector);\n }\n }\n\n /**\n * byTagName producer\n *\n * @param selector name\n * @return a DomQuery containing the found elements\n */\n static byTagName(selector: string | DomQuery | Element): DomQuery {\n if (isString(selector)) {\n return new DomQuery(document).byTagName(<string>selector);\n } else {\n return new DomQuery(<any>selector);\n }\n }\n\n static globalEval(code: string, nonce?: string): DomQuery {\n return new DomQuery(document).globalEval(code, nonce);\n }\n\n static globalEvalSticky(code: string, nonce?: string): DomQuery {\n return new DomQuery(document).globalEvalSticky(code, nonce);\n }\n\n /**\n * builds the ie nodes properly in a placeholder\n * and bypasses a non script insert bug that way\n * @param markup the markup code to be executed from\n */\n static fromMarkup(markup: string): DomQuery {\n\n // https:// developer.mozilla.org/de/docs/Web/API/DOMParser license creative commons\n const doc = document.implementation.createHTMLDocument(\"\");\n markup = trim(markup);\n let lowerMarkup = markup.toLowerCase();\n if (lowerMarkup.search(/<!doctype[^\\w\\-]+/gi) != -1 ||\n lowerMarkup.search(/<html[^\\w\\-]+/gi) != -1 ||\n lowerMarkup.search(/<head[^\\w\\-]+/gi) != -1 ||\n lowerMarkup.search(/<body[^\\w\\-]+/gi) != -1) {\n doc.documentElement.innerHTML = markup;\n return new DomQuery(doc.documentElement);\n } else {\n let startsWithTag = function (str: string, tagName: string) {\n let tag1 = [\"<\", tagName, \">\"].join(\"\");\n let tag2 = [\"<\", tagName, \" \"].join(\"\");\n return (str.indexOf(tag1) == 0) || (str.indexOf(tag2) == 0);\n };\n\n let dummyPlaceHolder = new DomQuery(document.createElement(\"div\"));\n\n // table needs special treatment due to the browsers auto creation\n if (startsWithTag(lowerMarkup, \"thead\") || startsWithTag(lowerMarkup, \"tbody\")) {\n dummyPlaceHolder.html(`<table>${markup}</table>`);\n return dummyPlaceHolder.querySelectorAll(\"table\").get(0).childNodes.detach();\n } else if (startsWithTag(lowerMarkup, \"tfoot\")) {\n dummyPlaceHolder.html(`<table><thead></thead><tbody><tbody${markup}</table>`);\n return dummyPlaceHolder.querySelectorAll(\"table\").get(2).childNodes.detach();\n } else if (startsWithTag(lowerMarkup, \"tr\")) {\n dummyPlaceHolder.html(`<table><tbody>${markup}</tbody></table>`);\n return dummyPlaceHolder.querySelectorAll(\"tbody\").get(0).childNodes.detach();\n } else if (startsWithTag(lowerMarkup, \"td\")) {\n dummyPlaceHolder.html(`<table><tbody><tr>${markup}</tr></tbody></table>`);\n return dummyPlaceHolder.querySelectorAll(\"tr\").get(0).childNodes.detach();\n }\n\n dummyPlaceHolder.html(markup);\n return dummyPlaceHolder.childNodes.detach();\n }\n\n }\n\n /**\n * returns the nth element as DomQuery\n * from the internal elements\n * note if you try to reach a non-existing element position\n * you will get back an absent entry\n *\n * @param index the nth index\n */\n get(index: number): DomQuery {\n return (index < this.rootNode.length) ? new DomQuery(this.rootNode[index]) : DomQuery.absent;\n }\n\n\n /**\n * returns the nth element as optional of an Element object\n * @param index the number from the index\n * @param defaults the default value if the index is overrun default Optional\\.absent\n */\n getAsElem(index: number, defaults: Optional<any> = Optional.absent): Optional<Element> {\n return (index < this.rootNode.length) ? Optional.fromNullable(this.rootNode[index]) : defaults;\n }\n\n /**\n * returns the files from a given element\n * @param index\n */\n filesFromElem(index: number): Array<any> {\n return (index < this.rootNode.length) ? (<any>this.rootNode[index])?.files ? (<any>this.rootNode[index]).files : [] : [];\n }\n\n /**\n * returns the value array< of all elements\n */\n allElems(): Array<Element> {\n return this.rootNode;\n }\n\n /**\n * absent no values reached?\n */\n isAbsent(): boolean {\n return this.length == 0;\n }\n\n /**\n * should make the code clearer\n * note if you pass a function\n * this refers to the active DomQuery object\n */\n isPresent(presentRunnable ?: (elem ?: DomQuery) => void): boolean {\n let absent = this.isAbsent();\n if (!absent && presentRunnable) {\n presentRunnable.call(this, this)\n }\n return !absent;\n }\n\n /**\n * should make the code clearer\n * note if you pass a function\n * this refers to the active DomQuery object\n *\n *\n * @param presentRunnable\n */\n ifPresentLazy(presentRunnable: (elem ?: DomQuery) => void = function () {\n }): DomQuery {\n this.isPresent.call(this, presentRunnable);\n return this;\n }\n\n /**\n * remove all affected nodes from this query object from the dom tree\n */\n delete() {\n this.eachElem((node: Element) => {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n });\n }\n\n querySelectorAll(selector): DomQuery {\n // We could merge both methods, but for now this is more readable\n if (selector.indexOf(\"/shadow/\") != -1) {\n return this._querySelectorAllDeep(selector);\n } else {\n return this._querySelectorAll(selector);\n }\n }\n\n closest(selector): DomQuery {\n // We could merge both methods, but for now this is more readable\n if (selector.indexOf(\"/shadow/\") != -1) {\n return this._closestDeep(selector);\n } else {\n return this._closest(selector);\n }\n }\n\n\n /**\n * core byId method\n * @param id the id to search for\n * @param includeRoot also match the root element?\n */\n byId(id: string, includeRoot?: boolean): DomQuery {\n let res: Array<DomQuery> = [];\n if (includeRoot) {\n res = res.concat(...\n new Es2019Array(...(this?.rootNode || []))\n .filter(((item) => id == item.id) as any)\n .map(item => new DomQuery(item))\n );\n }\n\n // for some strange kind of reason the # selector fails\n // on hidden elements we use the attributes match selector\n // that works\n res = res.concat(this.querySelectorAll(`[id=\"${id}\"]`));\n return new DomQuery(...res);\n }\n\n\n byIdDeep(id: string, includeRoot?: boolean): DomQuery {\n let res: Array<DomQuery> = [];\n if (includeRoot) {\n res = res.concat(\n new Es2019Array(...(this?.rootNode || []))\n .filter(item => id == item.id)\n .map(item => new DomQuery(item))\n );\n }\n\n let subItems = this.querySelectorAllDeep(`[id=\"${id}\"]`);\n if (subItems.length) {\n res.push(subItems);\n }\n\n return new DomQuery(...res);\n }\n\n /**\n * same as byId just for the tag name\n * @param tagName the tag-name to search for\n * @param includeRoot shall the root element be part of this search\n * @param deep do we also want to go into shadow dom areas\n */\n byTagName(tagName: string, includeRoot ?: boolean, deep ?: boolean): DomQuery {\n let res: Array<Element | DomQuery> = [];\n if (includeRoot) {\n res = new Es2019Array(...(this?.rootNode ?? []))\n .filter(element => element?.tagName == tagName)\n .reduce((reduction: any, item: Element) => reduction.concat([item]), res);\n }\n\n (deep) ? res.push(this.querySelectorAllDeep(tagName)) : res.push(this.querySelectorAll(tagName));\n return new DomQuery(...res);\n }\n\n /**\n * attr accessor, usage myQuery.attr(\"class\").value = \"bla\"\n * or let value myQuery.attr(\"class\").value\n * @param attr the attribute to set\n * @param defaultValue the default value in case nothing is presented (defaults to null)\n */\n attr(attr: string, defaultValue: string = null): ElementAttribute {\n return new ElementAttribute(this, attr, defaultValue);\n }\n\n style(cssProperty: string, defaultValue: string = null): Style {\n return new Style(this, cssProperty, defaultValue);\n }\n\n\n /**\n * Checks for an existing class in the class attributes\n *\n * @param clazz the class to search for\n */\n hasClass(clazz: string) {\n let hasIt = false;\n this.eachElem(node => {\n hasIt = node.classList.contains(clazz);\n if (hasIt) {\n return false;\n }\n });\n return hasIt;\n }\n\n /**\n * appends a class string if not already in the element(s)\n *\n * @param clazz the style class to append\n */\n addClass(clazz: string): DomQuery {\n this.eachElem(item => item.classList.add(clazz))\n return this;\n }\n\n /**\n * remove the style class if in the class definitions\n *\n * @param clazz\n */\n removeClass(clazz: string): DomQuery {\n this.eachElem(item => item.classList.remove(clazz));\n return this;\n }\n\n /**\n * checks whether we have a multipart element in our children\n * or are one\n */\n isMultipartCandidate(deep = false): boolean {\n const FILE_INPUT = \"input[type='file']\";\n return this.matchesSelector(FILE_INPUT) ||\n ((!deep) ? this.querySelectorAll(FILE_INPUT) :\n this.querySelectorAllDeep(FILE_INPUT)).first().isPresent();\n }\n\n /**\n * innerHtml\n * equivalent to jQueries html\n * as setter the html is set and the\n * DomQuery is given back\n * as getter the html string is returned\n *\n * @param newInnerHTML the inner html to be inserted\n */\n html(newInnerHTML?: string): DomQuery | Optional<string> {\n if (Optional.fromNullable(newInnerHTML).isAbsent()) {\n return this.isPresent() ? Optional.fromNullable(this.innerHTML) : Optional.absent;\n }\n this.innerHTML = newInnerHTML;\n\n return this;\n }\n\n /**\n * Standard dispatch event method, delegated from node\n */\n dispatchEvent(evt: Event): DomQuery {\n this.eachElem(elem => elem.dispatchEvent(evt));\n return this;\n }\n\n /**\n * abbreviation property to use innerHTML directly like on the dom tree\n * @param newInnerHTML the new inner html which should be attached to \"this\" domQuery\n */\n set innerHTML(newInnerHTML: string) {\n this.eachElem(elem => elem.innerHTML = newInnerHTML);\n }\n\n /**\n * getter abbreviation to use innerHTML directly\n */\n get innerHTML(): string {\n let retArr = [];\n this.eachElem(elem => retArr.push(elem.innerHTML));\n return retArr.join(\"\");\n }\n\n /**\n * since the dom allows both innerHTML and innerHtml we also have to implement both\n * @param newInnerHtml see above\n */\n set innerHtml(newInnerHtml: string) {\n this.innerHTML = newInnerHtml;\n }\n\n /**\n * same here, getter for allowing innerHtml directly\n */\n get innerHtml(): string {\n return this.innerHTML;\n }\n\n /**\n * filters the current dom query elements\n * upon a given selector\n *\n * @param selector\n */\n filterSelector(selector: string): DomQuery {\n let matched = [];\n\n this.eachElem(item => {\n if (this._mozMatchesSelector(item, selector)) {\n matched.push(item)\n }\n });\n return new DomQuery(...matched);\n }\n\n /**\n * checks whether any item in this domQuery level matches the selector\n * if there is one element only attached, as root the match is only\n * performed on this element.\n * @param selector\n */\n matchesSelector(selector: string): boolean {\n return this.asArray\n .some(item => this._mozMatchesSelector(item.getAsElem(0).value, selector));\n }\n\n /**\n * easy node traversal, you can pass\n * a set of node selectors which are joined as direct children\n *\n * Note!!! The root nodes are not in the getIf, those are always the child nodes\n *\n * @param nodeSelector\n */\n getIf(...nodeSelector: Array<string>): DomQuery {\n\n let selectorStage: DomQuery = this.childNodes;\n for (let cnt = 0; cnt < nodeSelector.length; cnt++) {\n selectorStage = selectorStage.filterSelector(nodeSelector[cnt]);\n if (selectorStage.isAbsent()) {\n return selectorStage;\n }\n }\n return selectorStage;\n }\n\n eachElem(func: (item: Element, cnt?: number) => any): DomQuery {\n\n for (let cnt = 0, len = this.rootNode.length; cnt < len; cnt++) {\n if (func(this.rootNode[cnt], cnt) === false) {\n break;\n }\n }\n return this;\n }\n\n firstElem(func: (item: Element, cnt?: number) => any = item => item): DomQuery {\n if (this.rootNode.length > 1) {\n func(this.rootNode[0], 0);\n }\n return this;\n }\n\n lastElem(func: (item: Element, cnt?: number) => any = item => item): DomQuery {\n if (this.rootNode.length > 1) {\n func(this.rootNode[this.rootNode.length - 1], 0);\n }\n return this;\n }\n\n each(func: (item: DomQuery, cnt?: number) => any): DomQuery {\n new Es2019Array(...this.rootNode)\n .forEach((item, cnt) => {\n // we could use a filter, but for the best performance we don´t\n if (item == null) {\n return;\n }\n return func(DomQuery.byId(item), cnt);\n });\n\n return this;\n }\n\n /**\n * replace convenience function, replaces one or more elements with\n * a set of elements passed as DomQuery\n * @param toReplace the replaced nodes as reference (original node has been replaced)\n */\n replace(toReplace: DomQuery): DomQuery {\n this.each(item => {\n let asElem = item.getAsElem(0).value;\n let parent = asElem.parentElement;\n let nextElement = asElem.nextElementSibling;\n let previousElement = asElem.previousElementSibling;\n if(nextElement != null) {\n new DomQuery(nextElement).insertBefore(toReplace);\n } else if(previousElement) {\n new DomQuery(previousElement).insertAfter(toReplace)\n } else {\n new DomQuery(parent).append(toReplace);\n }\n item.delete();\n });\n return toReplace;\n }\n\n /**\n * returns a new dom query containing only the first element max\n *\n * @param func a an optional callback function to perform an operation on the first element\n */\n first(func: (item: DomQuery, cnt?: number) => any = (item) => item): DomQuery {\n if (this.rootNode.length >= 1) {\n func(this.get(0), 0);\n return this.get(0);\n }\n return this;\n }\n\n /**\n * returns a new dom query containing only the first element max\n *\n * @param func a an optional callback function to perform an operation on the first element\n */\n last(func: (item: DomQuery, cnt?: number) => any = (item) => item): DomQuery {\n if (this.rootNode.length >= 1) {\n let lastNode = this.get(this.rootNode.length - 1);\n func(lastNode, 0);\n return lastNode;\n }\n return this;\n }\n\n /**\n * filter function which filters a subset\n *\n * @param func\n */\n filter(func: (item: DomQuery) => boolean): DomQuery {\n let reArr: Array<DomQuery> = [];\n this.each((item: DomQuery) => {\n func(item) ? reArr.push(item) : null;\n });\n return new DomQuery(...<any>reArr);\n }\n\n /**\n * global eval head appendix method\n * no other methods are supported anymore\n * @param code the code to be evaluated\n * @param nonce optional nonce key for higher security\n */\n globalEval(code: string, nonce ?: string): DomQuery {\n const head = document.getElementsByTagName(\"head\")?.[0]\n ?? document.documentElement.getElementsByTagName(\"head\")?.[0];\n const script = document.createElement(\"script\");\n if (nonce) {\n if ('undefined' != typeof script?.nonce) {\n script.nonce = nonce;\n } else {\n script.setAttribute(\"nonce\", nonce);\n }\n }\n script.type = \"text/javascript\";\n script.innerHTML = code;\n let newScriptElement = head.appendChild(script);\n head.removeChild(newScriptElement);\n return this;\n }\n\n /**\n * global eval head appendix method\n * no other methods are supported anymore\n * @param code the code to be evaluated\n * @param nonce optional nonce key for higher security\n */\n globalEvalSticky(code: string, nonce ?: string): DomQuery {\n let head = document.getElementsByTagName(\"head\")[0] || document.documentElement;\n let script = document.createElement(\"script\");\n this.applyNonce(nonce, script);\n script.type = \"text/javascript\";\n script.innerHTML = code;\n head.appendChild(script);\n return this;\n }\n\n /**\n * detaches a set of nodes from their parent elements\n * in a browser independent manner\n * @return {Array} an array of nodes with the detached dom nodes\n */\n detach(): DomQuery {\n this.eachElem((item: Element) => {\n item.parentNode.removeChild(item);\n });\n return this;\n }\n\n /**\n * appends the current set of elements\n * to the element or first element passed via elem\n * @param elem\n */\n appendTo(elem: DomQuery | string): DomQuery {\n if (Lang.isString(elem)) {\n this.appendTo(DomQuery.querySelectorAll(elem as string));\n return this;\n }\n this.eachElem((item) => {\n let value1: Element = <Element>(elem as DomQuery).getAsElem(0).orElseLazy(() => {\n return {\n appendChild: () => {\n }\n }\n }).value;\n value1.appendChild(item);\n });\n return this;\n }\n\n /**\n * loads and evaluates a script from a source uri\n *\n * @param src the source to be loaded and evaluated\n * @param delay in milliseconds execution default (0 == no delay)\n * @param nonce optional nonce value to allow increased security via nonce crypto token\n */\n loadScriptEval(src: string, delay: number = 0, nonce?: string) {\n this._loadScriptEval(false, src, delay, nonce);\n\n return this;\n }\n\n\n /**\n * loads and evaluates a script from a source uri\n *\n * @param src the source to be loaded and evaluated\n * @param delay in milliseconds execution default (0 == no delay)\n * @param nonce optional nonce parameter for increased security via nonce crypto token\n */\n loadScriptEvalSticky(src: string, delay: number = 0, nonce?: string) {\n this._loadScriptEval(true, src, delay, nonce);\n\n return this;\n }\n\n insertAfter(...toInsertParams: Array<DomQuery>): DomQuery {\n\n this.each(existingItem => {\n let existingElement = existingItem.getAsElem(0).value;\n let rootNode = existingElement.parentNode;\n for (let cnt = 0; cnt < toInsertParams.length; cnt++) {\n let nextSibling: Element = <any>existingElement.nextSibling;\n toInsertParams[cnt].eachElem(insertElem => {\n if (nextSibling) {\n rootNode.insertBefore(insertElem, nextSibling);\n existingElement = nextSibling;\n } else {\n rootNode.appendChild(insertElem);\n }\n });\n\n }\n });\n\n let res = [];\n res.push(this);\n res = res.concat(toInsertParams);\n return new DomQuery(...res);\n }\n\n insertBefore(...toInsertParams: Array<DomQuery>): DomQuery {\n this.each(existingItem => {\n let existingElement = existingItem.getAsElem(0).value;\n let rootNode = existingElement.parentNode;\n for (let cnt = 0; cnt < toInsertParams.length; cnt++) {\n toInsertParams[cnt].eachElem(insertElem => {\n rootNode.insertBefore(insertElem, existingElement);\n });\n }\n });\n let res = [];\n res.push(this);\n res = res.concat(toInsertParams);\n return new DomQuery(...res);\n }\n\n orElse(...elseValue: any): DomQuery {\n if (this.isPresent()) {\n return this;\n } else {\n return new DomQuery(...elseValue);\n }\n }\n\n orElseLazy(func: () => any): DomQuery {\n if (this.isPresent()) {\n return this;\n } else {\n return new DomQuery(func());\n }\n }\n\n /**\n * find all parents in the hierarchy for which the selector matches\n * @param selector\n */\n allParents(selector: string): DomQuery {\n let parent = this.parent();\n let ret = [];\n while(parent.isPresent()) {\n if(parent.matchesSelector(selector)) {\n ret.push(parent);\n }\n parent = parent.parent();\n }\n return new DomQuery(...ret);\n }\n\n /**\n * finds the first parent in the hierarchy for which the selector matches\n * @param selector\n */\n firstParent(selector: string): DomQuery {\n let parent = this.parent();\n while(parent.isPresent()) {\n if(parent.matchesSelector(selector)) {\n return parent;\n }\n parent = parent.parent();\n }\n return DomQuery.absent;\n }\n\n /**\n * fetches all parents as long as the filter criterium matches\n * @param selector\n */\n parentsWhileMatch(selector: string): DomQuery {\n const retArr: Array<DomQuery> = [];\n let parent = this.parent().filter(item => item.matchesSelector(selector));\n while(parent.isPresent()) {\n retArr.push(parent);\n parent = parent.parent().filter(item => item.matchesSelector(selector));\n }\n\n return new DomQuery(...retArr);\n }\n\n parent(): DomQuery {\n let ret = [];\n this.eachElem((item: Element) => {\n let parent = item.parentNode || (<any>item).host || item.shadowRoot;\n if (parent && ret.indexOf(parent) == -1) {\n ret.push(parent);\n }\n });\n\n return new DomQuery(...ret);\n }\n\n copyAttrs(sourceItem: DomQuery | XMLQuery): DomQuery {\n sourceItem.eachElem((sourceNode: Element) => {\n let attrs: Array<Attr> = objToArray(sourceNode.attributes);\n for (let item of attrs) {\n let value: string = item.value;\n let name: string = item.name;\n\n switch (name) {\n case \"id\":\n this.id.value = value;\n break;\n case \"disabled\":\n this.resolveAttributeHolder(\"disabled\").disabled = value;\n break;\n case \"checked\":\n this.resolveAttributeHolder(\"checked\").checked = value;\n break;\n case \"nonce\":\n // nonce will be handled below!\n break;\n default:\n this.attr(name).value = value;\n }\n }\n });\n\n //special nonce handling\n sourceItem.nonce.isPresent(() => {\n this.nonce.value = sourceItem.nonce.value;\n });\n\n return this;\n }\n\n /**\n * outerHTML convenience method\n * browsers only support innerHTML but\n * for instance for your jsf.js we have a full\n * replace pattern which needs outerHTML processing\n *\n * @param markup the markup which should replace the root element\n * @param runEmbeddedScripts if true the embedded scripts are executed\n * @param runEmbeddedCss if true the embedded css are executed\n * @param deep should this also work for shadow dom (run scripts etc...)\n */\n outerHTML(markup: string, runEmbeddedScripts ?: boolean, runEmbeddedCss ?: boolean, deep = false): DomQuery {\n if (this.isAbsent()) {\n return;\n }\n\n let focusElementId = document?.activeElement?.id;\n let caretPosition = (focusElementId) ? DomQuery.getCaretPosition(document.activeElement) : null;\n let nodes = DomQuery.fromMarkup(markup);\n let res = [];\n let toReplace = this.getAsElem(0).value;\n let firstInsert = nodes.get(0);\n let parentNode = toReplace.parentNode;\n let replaced = firstInsert.getAsElem(0).value;\n parentNode.replaceChild(replaced, toReplace);\n res.push(new DomQuery(replaced));\n // no replacement possible\n if (this.isAbsent()) {\n return this;\n }\n\n let insertAdditionalItems = [];\n\n if (nodes.length > 1) {\n insertAdditionalItems = insertAdditionalItems.concat(...nodes.values.slice(1));\n res.push(DomQuery.byId(replaced).insertAfter(new DomQuery(...insertAdditionalItems)));\n }\n\n if (runEmbeddedScripts) {\n this.runScripts();\n }\n if (runEmbeddedCss) {\n this.runCss();\n }\n\n let focusElement = DomQuery.byId(focusElementId);\n if (focusElementId && focusElement.isPresent() &&\n caretPosition != null && \"undefined\" != typeof caretPosition) {\n focusElement.eachElem(item => DomQuery.setCaretPosition(item, caretPosition));\n }\n\n return nodes;\n }\n\n /**\n * Run through the given nodes in the DomQuery execute the inline scripts\n * @param sticky if set to true the evaluated elements will stick to the head, default false\n * @param whitelisted: optional whitelist function which can filter out script tags which are not processed\n * defaults to the standard jsf.js exclusion (we use this code for myfaces)\n */\n runScripts(sticky = false, whitelisted: (val: string) => boolean = DEFAULT_WHITELIST): DomQuery {\n const evalCollectedScripts = (scriptsToProcess: { evalText: string, nonce: string }[]) => {\n if (scriptsToProcess.length) {\n // script source means we have to eval the existing\n // scripts before we run the 'include' command\n // this.globalEval(finalScripts.join(\"\\n\"));\n let joinedScripts = [];\n new Es2019Array(...scriptsToProcess).forEach(item => {\n if (!item.nonce) {\n joinedScripts.push(item.evalText)\n } else {\n if (joinedScripts.length) {\n this.globalEval(joinedScripts.join(\"\\n\"));\n joinedScripts.length = 0;\n }\n\n (!sticky) ?\n this.globalEval(item.evalText, item.nonce) :\n this.globalEvalSticky(item.evalText, item.nonce);\n }\n });\n if (joinedScripts.length) {\n (!sticky) ? this.globalEval(joinedScripts.join(\"\\n\")) :\n this.globalEvalSticky(joinedScripts.join(\"\\n\"));\n joinedScripts.length = 0;\n }\n\n scriptsToProcess = [];\n }\n return scriptsToProcess;\n }\n\n let finalScripts = [],\n allowedItemTypes = [\"\", \"script\", \"text/javascript\", \"text/ecmascript\", \"ecmascript\"],\n execScript = (item) => {\n let tagName = item.tagName;\n let itemType = (item?.type ?? '').toLowerCase();\n if (tagName &&\n eqi(tagName, \"script\") &&\n allowedItemTypes.indexOf(itemType) != -1) {\n let src = item.getAttribute('src');\n if ('undefined' != typeof src\n && null != src\n && src.length > 0\n ) {\n let nonce = item?.nonce ?? item.getAttribute('nonce').value;\n // we have to move this into an inner if because chrome otherwise chokes\n // due to changing the and order instead of relying on left to right\n // if jsf.js is already registered we do not replace it anymore\n if (whitelisted(src)) {\n // we run the collected scripts, before we run the 'include' command\n finalScripts = evalCollectedScripts(finalScripts);\n if (!sticky) {\n (!!nonce) ? this.loadScriptEval(src, 0, nonce) :\n // if no nonce is set we do not pass any once\n this.loadScriptEval(src, 0);\n } else {\n (!!nonce) ? this.loadScriptEvalSticky(src, 0, nonce) :\n // if no nonce is set we do not pass any once\n this.loadScriptEvalSticky(src, 0);\n }\n }\n\n } else {\n // embedded script auto eval\n // probably not needed anymore\n let evalText = trim(item.text || item.innerText || item.innerHTML);\n let go = true;\n\n while (go) {\n go = false;\n if (evalText.substring(0, 4) == \"<!--\") {\n evalText = evalText.substring(4);\n go = true;\n }\n if (evalText.substring(0, 4) == \"//<!--\") {\n evalText = evalText.substring(6);\n go = true;\n }\n if (evalText.substring(0, 11) == \"//<![CDATA[\") {\n evalText = evalText.substring(11);\n go = true;\n }\n }\n let nonce = item?.nonce ?? item.getAttribute('nonce').value ?? '';\n // we have to run the script under a global context\n // we store the script for fewer calls to eval\n finalScripts.push({\n nonce,\n evalText\n });\n }\n }\n };\n try {\n let scriptElements = new DomQuery(this.filterSelector(\"script\"), this.querySelectorAll(\"script\"));\n // script execution order by relative pos in their dom tree\n scriptElements.asArray\n .flatMap(item => [...item.values])\n .sort((node1, node2) => node2.compareDocumentPosition(node1) - 3) // preceding 2, following == 4)\n .forEach(item => execScript(item));\n\n evalCollectedScripts(finalScripts);\n } catch (e) {\n if (console && console.error) {\n // not sure if we\n // should use our standard\n // error mechanisms here\n // because in the head appendix\n // method only a console\n // error would be raised as well\n console.error(e.message || e.description);\n }\n } finally {\n // the usual ie6 fix code\n // the IE6 garbage collector is broken\n // nulling closures helps somewhat to reduce\n // mem leaks, which are impossible to avoid\n // at this browser\n execScript = null;\n }\n return this;\n }\n\n runCss(): DomQuery {\n\n const execCss = (toReplace: HTMLElement) => {\n const _toReplace = DomQuery.byId(toReplace);\n const tagName = _toReplace.tagName.orElse(\"\").value;\n let newElement = DomQuery.fromMarkup(`<${tagName.toLowerCase()} />`);\n newElement = newElement.copyAttrs(_toReplace);\n newElement.innerHTML = toReplace.innerHTML;\n // css suffices a simple replace to get it eval-ed, no need\n // for a full head replace\n _toReplace.replace(newElement);\n };\n\n const cssElems: DomQuery = new DomQuery(this.filterSelector(\"link, style\"), this.querySelectorAll(\"link, style\"));\n\n cssElems.asArray\n .flatMap(item => [...item.values])\n // sort to make sure the execution order is correct\n // this is needed because we mix 2 queries together\n // -3 is needed due to the compareDocumentPosition return value\n .sort((node1, node2) => node1.compareDocumentPosition(node2) - 3)\n .forEach(item => execCss(item as HTMLElement));\n\n return this;\n }\n\n /**\n * fires a click event on the underlying dom elements\n */\n click(): DomQuery {\n this.fireEvent(\"click\");\n return this;\n }\n\n addEventListener(type: string, listener: (evt: Event) => void, options?: boolean | EventListenerOptions): DomQuery {\n this.eachElem((node: Element) => node.addEventListener(type, listener, options));\n return this;\n }\n\n removeEventListener(type: string, listener: (evt: Event) => void, options?: boolean | EventListenerOptions): DomQuery {\n this.eachElem((node: Element) => node.removeEventListener(type, listener, options));\n return this;\n }\n\n /**\n * fires an event\n */\n fireEvent(eventName: string, options: {[key: string]: any} = {}) {\n // merge with last one having the highest priority\n\n let finalOptions: any = {\n bubbles: true, cancelable: true\n }\n finalOptions = simpleShallowMerge(finalOptions, options);\n\n this.eachElem((node: Element) => {\n let doc;\n if (node.ownerDocument) {\n doc = node.ownerDocument;\n } else if (node.nodeType == 9) {\n // the node may be the document itself, nodeType 9 = DOCUMENT_NODE\n doc = node;\n } else {\n throw new Error(\"Invalid node passed to fireEvent: \" + node.id);\n }\n\n if (node.dispatchEvent) {\n // Gecko-style approach (now the standard) takes more work\n let EventClass = Event;\n\n // Different events have different event classes.\n // If this switch statement can't map an eventName to an EventClass,\n // the event firing is going to fail.\n // extend this list on demand\n switch (eventName) {\n case \"click\": // Dispatching of 'click' appears to not work correctly in Safari. Use 'mousedown' or 'mouseup' instead.\n case \"mousedown\":\n case \"mouseup\":\n case \"mousemove\":\n EventClass = this.global().MouseEvent;\n break;\n case \"keyup\":\n case \"keydown\":\n case \"keypress\":\n EventClass = this.global().KeyboardEvent;\n break;\n case \"focus\":\n case \"change\":\n case \"blur\":\n case \"select\":\n break;\n default:\n throw \"fireEvent: Couldn't find an event class for event '\" + eventName + \"'.\";\n }\n\n let event = new EventClass(eventName, finalOptions);\n // this is added as an extra to allow internally the detection of synthetic events\n // not used atm, but it does not hurt to have the extra info\n (event as any).synthetic = true; // allow detection of synthetic events\n // The second parameter says go ahead with the default action\n node.dispatchEvent(event);\n } else if ((<any>node).fireEvent) {\n // IE-old school style, you can drop this if you don't need to support IE8 and lower\n let event = doc.createEventObject();\n event.synthetic = true; // allow detection of synthetic events\n Object.keys(finalOptions).forEach(key => event[key] = finalOptions[key]);\n (<any>node).fireEvent(\"on\" + eventName, event);\n }\n })\n }\n\n textContent(joinString: string = \"\"): string {\n return this.asArray\n .map((value: DomQuery) => {\n let item = value.getAsElem(0).orElseLazy(() => {\n return <any>{\n textContent: \"\"\n };\n }).value;\n return (<any>item).textContent || \"\";\n })\n .reduce((text1, text2) => [text1,joinString,text2].join(\"\"), \"\");\n }\n\n innerText(joinString: string = \"\"): string {\n return this.asArray\n .map((value: DomQuery) => {\n let item = value.getAsElem(0).orElseLazy(() => {\n return <any>{\n innerText: \"\"\n };\n }).value;\n return (<any>item).innerText || \"\";\n })\n .reduce((text1, text2) => {\n return [text1, text2].join(joinString)\n }, \"\");\n }\n\n /**\n * encodes all input elements properly into respective\n * config entries, this can be used\n * for legacy systems, for newer use-cases, use the\n * HTML5 Form class which all newer browsers provide\n *\n * @param toMerge optional config which can be merged in\n * @return a copy pf\n */\n encodeFormElement(toMerge = {}): {[key: string]: any} {\n\n // browser behavior no element name no encoding (normal submit fails in that case)\n // https:// issues.apache.org/jira/browse/MYFACES-2847\n if (this.name.isAbsent()) {\n return;\n }\n\n // let´s keep it side-effects free\n let target = simpleShallowMerge(toMerge);\n\n this.each((element: DomQuery) => {\n if (element.name.isAbsent()) {// no name, no encoding\n return;\n }\n let name = element.name.value;\n let tagName = element.tagName.orElse(\"__none__\").value.toLowerCase();\n let elemType = element.type.orElse(\"__none__\").value.toLowerCase();\n\n elemType = elemType.toLowerCase();\n\n // routine for all elements\n // rules:\n // - process only input, textarea and select elements\n // - elements must have attribute \"name\"\n // - elements must not be disabled\n if (((tagName == \"input\" || tagName == \"textarea\" || tagName == \"select\") &&\n (name != null && name != \"\")) && !element.disabled) {\n\n // routine for select elements\n // rules:\n // - if select-one and value-Attribute exist => \"name=value\"\n // (also if value empty => \"name=\")\n // - if select-one and value-Attribute don't exist =>\n // \"name=DisplayValue\"\n // - if select multi and multiple selected => \"name=value1&name=value2\"\n // - if select and selectedIndex=-1 don't submit\n if (tagName == \"select\") {\n // selectedIndex must be >= 0 to be submitted\n let selectElem: HTMLSelectElement = <HTMLSelectElement>element.getAsElem(0).value;\n if (selectElem.selectedIndex >= 0) {\n let uLen = selectElem.options.length;\n for (let u = 0; u < uLen; u++) {\n // find all selected options\n // let subBuf = [];\n if (selectElem.options[u].selected) {\n let elementOption = selectElem.options[u];\n append(target, name).value = (elementOption.getAttribute(\"value\") != null) ?\n elementOption.value : elementOption.text;\n }\n }\n }\n }\n\n // routine for remaining elements\n // rules:\n // - don't submit no selects (processed above), buttons, reset buttons, submit buttons,\n // - submit checkboxes and radio inputs only if checked\n if (\n (\n tagName != ALLOWED_SUBMITTABLE_ELEMENTS.SELECT &&\n elemType != ALLOWED_SUBMITTABLE_ELEMENTS.BUTTON &&\n elemType != ALLOWED_SUBMITTABLE_ELEMENTS.RESET &&\n elemType != ALLOWED_SUBMITTABLE_ELEMENTS.SUBMIT &&\n elemType != ALLOWED_SUBMITTABLE_ELEMENTS.IMAGE\n ) && (\n (\n elemType != ALLOWED_SUBMITTABLE_ELEMENTS.CHECKBOX && elemType != ALLOWED_SUBMITTABLE_ELEMENTS.RADIO) ||\n element.checked\n )\n ) {\n let uploadedFiles = (<any>element.value)?.value?.files;\n let filesArr: any = uploadedFiles ?? [];\n if (filesArr?.length) { //files can be empty but set\n // xhr level2, single multiple must be passes as they are\n assign(target, name).value = Array.from(filesArr);\n } else {\n if(!!uploadedFiles) { //we skip empty file elements i\n return;\n }\n //checkboxes etc.. need to be appended\n append(target, name).value = element.inputValue.value;\n }\n }\n\n }\n });\n\n return target;\n }\n\n get cDATAAsString(): string {\n let TYPE_CDATA_BLOCK = 4;\n\n let res = this.asArray\n .flatMap( item => {\n return item.childNodes.asArray;\n })\n .filter(item => {\n return item?.value?.value?.nodeType == TYPE_CDATA_BLOCK;\n })\n .reduce((reduced: Array<any>, item: DomQuery) => {\n reduced.push((<any>item?.value?.value)?.data ?? \"\");\n return reduced;\n }, []);\n /*let res: any = this.lazyStream.flatMap(item => {\n return item.childNodes.stream\n }).filter(item => {\n return item?.value?.value?.nodeType == TYPE_CDATA_BLOCK;\n }).reduce((reduced: Array<any>, item: DomQuery) => {\n reduced.push((<any>item?.value?.value)?.data ?? \"\");\n return reduced;\n }, []).value;*/\n\n // response may contain several blocks\n return res.join(\"\");\n }\n\n subNodes(from: number, to?: number): DomQuery {\n if (Optional.fromNullable(to).isAbsent()) {\n to = this.length;\n }\n return new DomQuery(...this.rootNode.slice(from, Math.min(to, this.length)));\n }\n\n\n // because we can stream from an array stream directly into the dom query\n _limits = -1;\n\n limits(end: number): DomQuery {\n this._limits = end;\n return <any>this;\n }\n\n //-- internally exposed methods needed for the interconnectivity\n hasNext() {\n let isLimitsReached = this._limits != -1 && this.pos >= this._limits - 1;\n let isEndOfArray = this.pos >= this.values.length - 1;\n return !(isLimitsReached ||\n isEndOfArray);\n }\n\n next(): DomQuery {\n if (!this.hasNext()) {\n return null;\n }\n this.pos++;\n return new DomQuery(this.values[this.pos]);\n }\n\n\n lookAhead(cnt = 1): ITERATION_STATUS | DomQuery {\n if ((this.values.length - 1) < (this.pos + cnt)) {\n return ITERATION_STATUS.EO_STRM;\n }\n return new DomQuery(this.values[this.pos + cnt]);\n }\n\n\n current(): DomQuery | ITERATION_STATUS {\n if (this.pos == -1) {\n return ITERATION_STATUS.BEF_STRM;\n }\n return new DomQuery(this.values[this.pos]);\n }\n\n\n reset() {\n this.pos = -1;\n }\n\n attachShadow(params: { [key: string]: string } = {mode: \"open\"}): DomQuery {\n let shadowRoots: DomQuery[] = [];\n this.eachElem((item: Element) => {\n let shadowElement: DomQuery;\n if ((<any>item)?.attachShadow) {\n shadowElement = DomQuery.byId((<any>item).attachShadow(params));\n shadowRoots.push(shadowElement);\n } else {\n throw new Error(\"Shadow dom creation not supported by the browser, please use a shim, to gain this functionality\");\n }\n });\n return new DomQuery(...shadowRoots);\n }\n\n /**\n * helper to fix a common dom problem\n * we have to wait until a certain condition is met, in most of the cases we just want to know whether an element is present in the sub dom-tree before being able to proceed\n * @param condition\n * @param options\n */\n async waitUntilDom(condition: (element: DomQuery) => boolean, options: WAIT_OPTS = {\n attributes: true,\n childList: true,\n subtree: true,\n timeout: 500,\n interval: 100\n }): Promise<DomQuery> {\n return waitUntilDom(this, condition, options);\n }\n\n /**\n * returns the embedded shadow elements\n */\n get shadowElements(): DomQuery {\n let shadowElements = this.querySelectorAll(\"*\")\n .filter(item => item.hasShadow);\n\n\n let mapped: Array<ShadowRoot> = (shadowElements.allElems() || []).map(element => element.shadowRoot);\n return new DomQuery(...mapped);\n }\n\n get shadowRoot(): DomQuery {\n let shadowRoots = [];\n for (let cnt = 0; cnt < this.rootNode.length; cnt++) {\n if (this.rootNode[cnt].shadowRoot) {\n shadowRoots.push(this.rootNode[cnt].shadowRoot);\n }\n }\n return new DomQuery(...shadowRoots);\n }\n\n get hasShadow(): boolean {\n for (let cnt = 0; cnt < this.rootNode.length; cnt++) {\n if (this.rootNode[cnt].shadowRoot) {\n return true;\n }\n }\n return false;\n }\n\n // from\n // http:// blog.vishalon.net/index.php/javascript-getting-and-setting-caret-position-in-textarea/\n static getCaretPosition(ctrl: any) {\n let caretPos = 0;\n\n try {\n if ((<any>document)?.selection) {\n ctrl.focus();\n let selection = (<any>document).selection.createRange();\n // the selection now is start zero\n selection.moveStart('character', -ctrl.value.length);\n // the caret-position is the selection start\n caretPos = selection.text.length;\n }\n } catch (e) {\n // now this is ugly, but not supported input types throw errors for selectionStart\n // just in case someone dumps this code onto unsupported browsers\n }\n return caretPos;\n }\n\n /**\n * sets the caret position\n *\n * @param ctrl the control to set the caret position to\n * @param pos the position to set\n *\n * note if the control does not have any selectable and focusable behavior\n * calling this method does nothing (silent fail)\n *\n */\n static setCaretPosition(ctrl: any, pos: number) {\n ctrl?.focus ? ctrl?.focus() : null;\n // the selection range is our caret position\n\n ctrl?.setSelectiongRange ? ctrl?.setSelectiongRange(pos, pos) : null;\n }\n\n /**\n * Implementation of an iterator\n * to allow loops over dom query collections\n */\n [Symbol.iterator](): Iterator<DomQuery> {\n return {\n next: () => {\n let done = !this.hasNext();\n let val = this.next();\n return {\n done: done,\n value: <DomQuery>val\n }\n }\n }\n }\n\n /**\n * Concatenates the elements of two Dom Queries into a single one\n * @param toAttach the elements to attach\n * @param filterDoubles filter out possible double elements (aka same markup)\n */\n concat(toAttach: DomQuery, filterDoubles = true): DomQuery {\n let domQueries = this.asArray;\n const ret = new DomQuery(...domQueries.concat(toAttach.asArray));\n // we now filter the doubles out\n if (!filterDoubles) {\n return ret;\n }\n let idx = {}; // ie11 does not support sets, we have to fake it\n return new DomQuery(...ret.asArray.filter(node => {\n const notFound = !(idx?.[node.value.value.outerHTML as any]);\n idx[node.value.value.outerHTML as any] = true;\n return notFound;\n }));\n }\n\n append(elem: DomQuery): DomQuery {\n this.each(item => elem.appendTo(item));\n return this;\n }\n\n prependTo(elem: DomQuery): DomQuery {\n elem.eachElem(item => {\n item.prepend(...this.allElems());\n });\n return this;\n }\n\n prepend(elem: DomQuery): DomQuery {\n this.eachElem(item => {\n item.prepend(...elem.allElems());\n })\n return this;\n }\n\n /**\n * query selector all on the existing dom queryX object\n *\n * @param selector the standard selector\n * @return a DomQuery with the results\n */\n private _querySelectorAll(selector): DomQuery {\n if (!this?.rootNode?.length) {\n return this;\n }\n let nodes = [];\n for (let cnt = 0; cnt < this.rootNode.length; cnt++) {\n if (!this.rootNode[cnt]?.querySelectorAll) {\n continue;\n }\n let res = this.rootNode[cnt].querySelectorAll(selector);\n nodes = nodes.concat(...objToArray(res));\n }\n\n return new DomQuery(...nodes);\n }\n\n /*deep with a selector and a pseudo /shadow/ marker to break into the next level*/\n private _querySelectorAllDeep(selector): DomQuery {\n if (!this?.rootNode?.length) {\n return this;\n }\n\n let foundNodes: DomQuery = new DomQuery(...this.rootNode);\n let selectors = selector.split(/\\/shadow\\//);\n\n for (let cnt2 = 0; cnt2 < selectors.length; cnt2++) {\n if (selectors[cnt2] == \"\") {\n continue;\n }\n let levelSelector = selectors[cnt2];\n foundNodes = foundNodes.querySelectorAll(levelSelector);\n if (cnt2 < selectors.length - 1) {\n foundNodes = foundNodes.shadowRoot;\n }\n }\n\n return foundNodes;\n }\n\n\n /**\n * query selector all on the existing dom queryX object\n *\n * @param selector the standard selector\n * @return a DomQuery with the results\n */\n private _closest(selector): DomQuery {\n if (!this?.rootNode?.length) {\n return this;\n }\n let nodes = [];\n for (let cnt = 0; cnt < this.rootNode.length; cnt++) {\n if (!this.rootNode[cnt]?.closest) {\n continue;\n }\n let res = [this.rootNode[cnt].closest(selector)];\n nodes = nodes.concat(...res);\n }\n\n return new DomQuery(...nodes);\n }\n\n /*deep with a selector and a pseudo /shadow/ marker to break into the next level*/\n private _closestDeep(selector): DomQuery {\n if (!this?.rootNode?.length) {\n return this;\n }\n\n let foundNodes: DomQuery = new DomQuery(...this.rootNode);\n let selectors = selector.split(/\\/shadow\\//);\n\n for (let cnt2 = 0; cnt2 < selectors.length; cnt2++) {\n if (selectors[cnt2] == \"\") {\n continue;\n }\n let levelSelector = selectors[cnt2];\n foundNodes = foundNodes.closest(levelSelector);\n if (cnt2 < selectors.length - 1) {\n foundNodes = foundNodes.shadowRoot;\n }\n }\n\n return foundNodes;\n }\n\n // source: https:// developer.mozilla.org/en-US/docs/Web/API/Element/matches\n // code snippet license: https:// creativecommons.org/licenses/by-sa/2.5/\n /**\n * matches selector call in a browser independent manner\n *\n * @param toMatch\n * @param selector\n * @private\n */\n private _mozMatchesSelector(toMatch: Element, selector: string): boolean {\n let prototypeOwner: { [key: string]: Function } = (<any>toMatch);\n let matchesSelector: Function = prototypeOwner.matches ||\n prototypeOwner.matchesSelector ||\n prototypeOwner.mozMatchesSelector ||\n prototypeOwner.msMatchesSelector ||\n prototypeOwner.oMatchesSelector ||\n prototypeOwner.webkitMatchesSelector ||\n function (s: string) {\n let matches: NodeListOf<HTMLElement> = (document || ownerDocument).querySelectorAll(s),\n i = matches.length;\n while (--i >= 0 && matches.item(i) !== toMatch) {\n }\n return i > -1;\n };\n return matchesSelector.call(toMatch, selector);\n }\n\n /**\n * sticky non-sticky unified code of the load script eval\n * implementation if programmatic >script src=\"... loading\n *\n * @param sticky if set to true a head element is left in the dom tree after the script has loaded\n *\n * @param src the sec to load\n * @param delay delay the script loading x ms (default immediately === 0)\n * @param nonce optional nonce token to be passed into the script tag\n * @private\n */\n private _loadScriptEval(sticky: boolean, src: string, delay: number = 0, nonce ?: string) {\n let srcNode = this.createSourceNode(src, nonce);\n let nonceCheck = this.createSourceNode(null, nonce);\n let marker = `nonce_${Date.now()}_${Math.random()}`;\n nonceCheck.innerHTML = `document.head[\"${marker}\"] = true` // noop\n\n let head = document.head;\n // upfront nonce check, needed mostly for testing\n // but cannot hurt to block src calls which have invalid nonce on localhost\n // the reason for doing this up until now we have a similar construct automatically\n // by loading the scripts via xhr and then embedding them.\n // this is not needed anymore but the nonce is more relaxed with script src\n // we now enforce it the old way\n\n head.appendChild(nonceCheck);\n head.removeChild(nonceCheck);\n if(!head[marker]) {\n return;\n }\n try {\n if (!delay) {\n head.appendChild(srcNode);\n if(!sticky) {\n head.removeChild(srcNode);\n }\n } else {\n setTimeout(() => {\n head.appendChild(srcNode);\n if(!sticky) {\n head.removeChild(srcNode);\n }\n }, delay);\n }\n } finally {\n delete head[marker];\n }\n\n return this;\n }\n\n /**\n * resolves an attribute holder compared\n * @param attrName the attribute name\n */\n private resolveAttributeHolder(attrName: string = \"value\"): HTMLFormElement | any {\n let ret = [];\n ret[attrName] = null;\n return (attrName in this.getAsElem(0).value) ?\n this.getAsElem(0).value :\n ret;\n }\n\n private createSourceNode(src: string | null, nonce?: string) {\n let srcNode: HTMLScriptElement = document.createElement(\"script\");\n srcNode.type = \"text/javascript\";\n if (!!nonce) {\n if ('undefined' != typeof srcNode?.nonce) {\n srcNode.nonce = nonce;\n } else {\n srcNode.setAttribute(\"nonce\", nonce);\n }\n }\n if(!!src) {\n srcNode.src = src;\n }\n\n return srcNode;\n }\n\n private applyNonce(nonce: string, script: HTMLScriptElement) {\n if (nonce) {\n if ('undefined' != typeof script?.nonce) {\n script.nonce = nonce;\n } else {\n script.setAttribute(\"nonce\", nonce);\n }\n }\n }\n\n}\n\n\n/**\n * Various collectors\n * which can be used in conjunction with Streams\n */\n\n/**\n * A collector which bundles a full dom query stream into a single dom query element\n *\n * This connects basically our stream back into DomQuery\n */\nexport class DomQueryCollector implements ICollector<DomQuery, DomQuery> {\n\n data: DomQuery[] = [];\n\n collect(element: DomQuery) {\n this.data.push(element);\n }\n\n get finalValue(): DomQuery {\n return new DomQuery(...this.data);\n }\n}\n\n/**\n * abbreviation for DomQuery\n */\nexport const DQ = DomQuery;\nexport type DQ = DomQuery;\n// noinspection JSUnusedGlobalSymbols\n/**\n * replacement for the jquery $\n */\nexport const DQ$ = DomQuery.querySelectorAll;\n","/**\n * Extended array\n */\n\n/**\n * Extended array which adds various es 2019 shim functions to the normal array\n * We must remap all array producing functions in order to keep\n * the delegation active, once we are in!\n */\nclass Es2019Array_<T> extends Array<T>{\n\n _another: T[];\n\n constructor(...another: T[]) {\n super(...another);\n if((another as any)._another) {\n this._another = (another as any)._another;\n } else {\n this._another = another;\n }\n\n //for testing it definitely runs into this branch because we are on es5 level\n //if (!(<any>Array.prototype).flatMap) {\n this.flatMap = (flatMapFun) => this._flatMap(flatMapFun) as any;\n //}\n //if (!(<any>Array.prototype).flat) {\n this.flat = (flatLevel: number = 1) => this._flat(flatLevel);\n //}\n }\n\n map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[] {\n const ret = Array.prototype.map.call(this._another, callbackfn, thisArg);\n return new (_Es2019Array as any) (... ret);\n }\n\n concat(...items): T[] {\n const ret = Array.prototype.concat.call(this._another, ...items);\n return new (_Es2019Array as any)(... ret);\n }\n\n reverse(): T[] {\n const ret = Array.prototype.reverse.call(this._another);\n return new (_Es2019Array as any)(... ret);\n }\n\n slice(start?: number, end?: number): T[] {\n const ret = Array.prototype.slice.call(this._another, start, end);\n return new (_Es2019Array as any)(...ret);\n }\n\n splice(start: number, deleteCount?: number): T[] {\n const ret = Array.prototype.splice.call(this._another, start, deleteCount);\n return new (_Es2019Array as any)(...ret);\n }\n\n filter<S extends T>(predicate: (value: T, index: number, array: T[]) => any, thisArg?: any): S[] {\n const ret = Array.prototype.filter.call(this._another, predicate, thisArg);\n return new (_Es2019Array as any)(...ret);\n }\n\n\n reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T {\n const ret = Array.prototype.reduce.call(this._another, callbackfn, initialValue);\n return ret;\n }\n\n /*reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T {\n const ret = Array.prototype.reduceRight.call(callbackfn, initialValue);\n return ret;\n }*/\n\n private _flat(flatDepth = 1) {\n return this._flatResolve(this._another, flatDepth);\n }\n\n private _flatResolve(arr, flatDepth = 1) {\n //recursion break\n if (flatDepth == 0) {\n return arr;\n }\n let res = [];\n\n let reFlat = item => {\n item = Array.isArray(item) ? item : [item];\n let mapped = this._flatResolve(item, flatDepth - 1);\n res = res.concat(mapped);\n };\n arr.forEach(reFlat)\n\n return new Es2019Array(...res);\n }\n\n private _flatMap(mapperFunction: Function): any {\n let res = this.map(item => mapperFunction(item));\n return this._flatResolve(res);\n }\n}\n\n//let _Es2019Array = function<T>(...data: T[]) {};\n\n//let oldProto = Es2019Array.prototype;\n\nexport function _Es2019Array<T>(...data: T[]): Es2019Array_<T> {\n let ret = new Es2019Array_<T>(...data);\n let proxied = new Proxy<Es2019Array_<T>>(ret, {\n get(target: Es2019Array_<unknown>, p: string | symbol, receiver: any): any {\n if(\"symbol\" == typeof p) {\n\n return target._another[p];\n }\n if(!isNaN(parseInt(p as string))) {\n return target._another[p];\n } else {\n return target[p];\n }\n },\n\n set(target, property, value): boolean {\n target[property] = value;\n target._another[property] = value;\n return true;\n }\n\n });\n return proxied;\n};\n\n/**\n * this is the switch between normal array and our shim\n * the shim is only provided in case the native browser\n * does not yet have flatMap support on arrays\n */\nexport var Es2019Array: any = (Array.prototype.flatMap) ? function<T>(...data: T[]): T[] {\n // sometimes the typescript compiler produces\n // an array without flatmap between boundaries (the result produces True for Array.isArray\n // but has no flatMap function, could be a node issue also or Typescript!\n // we remap that (could be related to: https://github.com/microsoft/TypeScript/issues/31033\n // the check and remap fixes the issue which should not exist in the first place\n return data?.flatMap ? data : _Es2019Array(...data);\n} : _Es2019Array;","/*!\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n/**\n * various environments handle the global variable different\n * we have to deal with this.\n */\nexport function _global$(): any | null {\n let _global$: any = ('undefined' != typeof globalThis && globalThis.window) ? globalThis.window:\n ('undefined' != typeof window) ? window :\n ('undefined' != typeof globalThis) ? globalThis :\n ('undefined' != typeof global && global?.window) ? global.window :\n ('undefined' != typeof global) ? global : null;\n //under test systems we often have a lazy init of the window object under global.window, but we\n //want the window object\n return _global$?.window ?? _global$;\n}\n\n","/*!\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Optional} from \"./Monad\";\nimport {Es2019Array} from \"./Es2019Array\";\n\n/**\n * Lang helpers crossported from the apache myfaces project\n */\nexport module Lang {\n \n\n //should be in lang, but for now here to avoid recursive imports, not sure if typescript still has a problem with those\n /**\n * helper function to safely resolve anything\n * this is not an elvis operator, it resolves\n * a value without exception in a tree and if\n * it is not resolvable then an optional of\n * a default value is restored or Optional.empty\n * if none is given\n *\n * usage\n * <code>\n * let var: Optiona<string> = saveResolve(() => a.b.c.d.e, \"foobaz\")\n * </code>\n *\n * @param resolverProducer a lambda which can produce the value\n * @param defaultValue an optional default value if the producer failes to produce anything\n * @returns an Optional of the produced value\n */\n export function saveResolve<T>(resolverProducer: () => T, defaultValue: T = null): Optional<T> {\n try {\n let result = resolverProducer();\n return Optional.fromNullable(result ?? defaultValue);\n } catch (e) {\n return Optional.absent;\n }\n }\n\n /**\n * lazy resolve... aka the function is called on resolve and a default value also\n * is a producing function (called only if the original producer does not produce any result)\n * @param resolverProducer the producer for the resolve\n * @param defaultValue the default value producer function\n */\n export function saveResolveLazy<T>(resolverProducer: () => T, defaultValue: () => T = null): Optional<T> {\n try {\n let result = resolverProducer();\n return Optional.fromNullable(result ?? defaultValue());\n } catch (e) {\n return Optional.absent;\n }\n }\n\n /**\n * String to array function performs a string to array transformation\n * @param {String} it the string which has to be changed into an array\n * @param {RegExp} splitter our splitter reglar expression\n * @return a trimmed array of the splitted string\n */\n export function strToArray(it: string, splitter: string | RegExp = /\\./gi): Array<string> {\n\n let ret = [];\n it.split(splitter).forEach((element => {\n ret.push(trim(element));\n }));\n return ret;\n }\n\n /**\n * hyperfast trim\n * http://blog.stevenlevithan.com/archives/faster-trim-javascript\n * crossported from dojo\n */\n export function trim(str: string): string {\n str = str.replace(/^\\s\\s*/, '');\n let ws = /\\s/, i = str.length;\n\n while (ws.test(str.charAt(--i))) {\n //do nothing\n }\n return str.slice(0, i + 1);\n }\n\n /**\n * generic object arrays like dom definitions to array conversion method which\n * transforms any object to something array like\n * @param obj\n * @param offset\n * @param pack\n * @returns an array converted from the object\n */\n export function objToArray<T>(obj: any, offset: number = 0, pack: Array<T> = []): Array<T> {\n if ((obj ?? \"__undefined__\") == \"__undefined__\") {\n return pack ?? null;\n }\n //since offset is numeric we cannot use the shortcut due to 0 being false\n //special condition array delivered no offset no pack\n if ((<any>obj) instanceof Array && !offset && !pack) return obj;\n\n return new Es2019Array(...pack.concat(Array.prototype.slice.call(obj, offset)));\n }\n\n /**\n * equalsIgnoreCase, case-insensitive comparison of two strings\n *\n * @param source\n * @param destination\n */\n export function equalsIgnoreCase(source?: string, destination?: string): boolean {\n let finalSource = source ?? \"___no_value__\";\n let finalDest = destination ?? \"___no_value__\";\n\n //in any other case we do a strong string comparison\n return finalSource.toLowerCase() === finalDest.toLowerCase();\n }\n\n\n /**\n * runtime type assertion\n *\n * @param probe the probe to be tested for a type\n * @param theType the type to be tested for\n */\n export function assertType(probe: any, theType: any): boolean {\n return isString(theType) ? typeof probe == theType : probe instanceof theType;\n }\n\n /**\n * Back ported from Dojo\n * a failsafe string determination method\n * (since in javascript String != \"\" typeof alone fails!)\n * @param it {|Object|} the object to be checked for being a string\n * @return true in case of being a string false otherwise\n */\n export function isString(it?: any): boolean {\n //\tsummary:\n //\t\tReturn true if it is a String\n return !!arguments.length && it != null && (typeof it == \"string\" || it instanceof String); // Boolean\n }\n\n /**\n * Back-ported, a failsafe determination code for checking whether an object is a function\n * @param it the object to check for being a function\n */\n export function isFunc(it: any): boolean {\n return it instanceof Function || typeof it === \"function\";\n }\n\n // code from https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n // license https://creativecommons.org/licenses/by-sa/2.5/\n export function objAssign(target: any, ...theArgs: any) { // .length of function is 2\n if (target == null) { // TypeError if undefined or null\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n let to = Object(target);\n if((<any>Object).assign) {\n theArgs.forEach(item => (<any>Object).assign(to, item));\n return to;\n }\n\n theArgs.filter(item => item != null).forEach(item => {\n let nextSource = item;\n Object.keys(nextSource)\n .filter(nextKey => Object.prototype.hasOwnProperty.call(nextSource, nextKey))\n .forEach(nextKey => to[nextKey] = nextSource[nextKey]);\n });\n return to;\n }\n\n\n}\n\n","/*!\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * A module which keeps basic monad like definitions in place\n * Useful if you need the functions in another library to keep its dependencies down\n */\n\n/*IMonad definitions*/\n\nimport {Lang} from \"./Lang\";\nimport {Es2019Array} from \"./Es2019Array\";\n\n\n/**\n * IFunctor interface,\n * defines an interface which allows to map a functor\n * via a first order function to another functor\n */\nexport interface IFunctor<T> {\n map<R>(fn: (data: T) => R): IFunctor<R>;\n}\n\n/**\n * IMonad definition, basically a functor with a flatMap implementation, flatMap reduces all nested monads after a\n * function call f into a monad with the nesting level of 1\n *\n * flatmap flats nested Monads into a IMonad of the deepest nested implementation\n */\nexport interface IMonad<T, M extends IMonad<any, any>> extends IFunctor<T> {\n flatMap<T, M>(f: (T) => M): IMonad<any, any>;\n}\n\n/**\n * a stateful functor which holds a value upn which a\n * function can be applied\n *\n * as value holder of type T\n */\nexport interface IIdentity<T> extends IFunctor<T> {\n readonly value: T;\n}\n\n\n/**\n * custom value holder definition, since we are not pure functional\n * but iterative we have structures which allow the assignment of a value\n * also not all structures are side - effect free\n */\nexport interface IValueHolder<T> {\n value: T | Array<T>;\n}\n\n/**\n * Implementation of a monad\n * (Side - effect free), no write allowed directly on the monads\n * value state\n */\nexport class Monad<T> implements IMonad<T, Monad<any>>, IValueHolder<T> {\n constructor(value: T) {\n this._value = value;\n }\n\n protected _value: T;\n\n get value(): T {\n return this._value;\n }\n\n map<R>(fn?: (data: T) => R): Monad<R> {\n if (!fn) {\n fn = (inVal: any) => <R>inVal;\n }\n let result: R = fn(this.value);\n return new Monad(result);\n }\n\n flatMap<R>(fn?: (data: T) => R): Monad<any> {\n let mapped: Monad<any> = this.map(fn);\n while (mapped?.value instanceof Monad) {\n mapped = mapped.value\n }\n return mapped;\n }\n\n}\n\n/**\n * optional implementation, an optional is basically an implementation of a Monad with additional syntactic\n * sugar on top\n * (Side - effect free, since value assignment is not allowed)\n * */\nexport class Optional<T> extends Monad<T> {\n\n /*default value for absent*/\n static absent = Optional.fromNullable(null);\n\n constructor(value: T) {\n super(value);\n }\n\n get value(): T {\n if (this._value instanceof Monad) {\n return this._value.flatMap().value\n }\n return this._value;\n }\n\n static fromNullable<V extends Optional<T>, T>(value?: T): Optional<T> {\n return <V> new Optional(value);\n }\n\n /*syntactic sugar for absent and present checks*/\n isAbsent(): boolean {\n return \"undefined\" == typeof this.value || null == this.value;\n }\n\n /**\n * any value present\n */\n isPresent(presentRunnable ?: (val ?: Monad<T>) => void): boolean {\n let absent = this.isAbsent();\n if (!absent && presentRunnable) {\n presentRunnable.call(this, this)\n }\n return !absent;\n }\n\n ifPresentLazy(presentRunnable: (val ?: Monad<T>) => void = () => {\n }): Monad<T> {\n this.isPresent.call(this, presentRunnable);\n return this;\n }\n\n orElse(elseValue: any): Optional<any> {\n if (this.isPresent()) {\n return this;\n } else {\n //shortcut\n if (elseValue == null) {\n return Optional.absent;\n }\n return this.flatMap(() => elseValue);\n }\n }\n\n /**\n * lazy, passes a function which then is lazily evaluated\n * instead of a direct value\n * @param func\n */\n orElseLazy(func: () => any): Optional<any> {\n if (this.isPresent()) {\n return this;\n } else {\n return this.flatMap(func);\n }\n }\n\n /*\n * we need to implement it to fulfill the contract, although it is used only internally\n * all values are flattened when accessed anyway, so there is no need to call this method\n */\n flatMap<R>(fn?: (data: T) => R): Optional<any> {\n let val = super.flatMap(fn);\n if (!(val instanceof Optional)) {\n return Optional.fromNullable(val.value);\n }\n\n return <Optional<any>>val.flatMap();\n }\n\n /*\n * elvis operation, take care, if you use this you lose typesafety and refactoring\n * capabilities, unfortunately typescript does not allow to have its own elvis operator\n * this is some syntactic sugar however which is quite useful*/\n getIf<R>(...key: string[]): Optional<R> {\n\n key = this.preprocessKeys(...key);\n\n let currentPos: Optional<any> = this;\n for (let cnt = 0; cnt < key.length; cnt++) {\n let currKey = this.keyVal(key[cnt]);\n let arrPos = this.arrayIndex(key[cnt]);\n\n if (currKey === \"\" && arrPos >= 0) {\n currentPos = this.getClass().fromNullable(!(currentPos.value instanceof Array) ? null : (currentPos.value.length < arrPos ? null : currentPos.value[arrPos]));\n if (currentPos.isAbsent()) {\n return currentPos;\n }\n continue;\n } else if (currKey && arrPos >= 0) {\n if (currentPos.getIfPresent(currKey).isAbsent()) {\n return currentPos;\n }\n currentPos = (currentPos.getIfPresent(currKey).value instanceof Array) ? this.getClass().fromNullable(currentPos.getIfPresent(currKey).value[arrPos]) : this.getClass().absent;\n if (currentPos.isAbsent()) {\n return currentPos;\n }\n continue;\n\n } else {\n currentPos = currentPos.getIfPresent(currKey);\n }\n if (currentPos.isAbsent()) {\n return currentPos;\n } else if (arrPos > -1) {\n currentPos = this.getClass().fromNullable(currentPos.value[arrPos]);\n }\n }\n return currentPos;\n }\n\n /**\n * simple match, if the first order function call returns\n * true then there is a match, if the value is not present\n * it never matches\n *\n * @param fn the first order function performing the match\n */\n match(fn: (item: T) => boolean): boolean {\n if (this.isAbsent()) {\n return false\n }\n return fn(this.value);\n }\n\n /**\n * convenience function to flatmap the internal value\n * and replace it with a default in case of being absent\n *\n * @param defaultVal\n * @returns {Optional<any>}\n */\n get<R>(defaultVal: any = Optional.absent): Optional<R> {\n if (this.isAbsent()) {\n return this.getClass().fromNullable(defaultVal).flatMap();\n }\n\n return this.getClass().fromNullable(this.value).flatMap();\n }\n\n toJson(): string {\n return JSON.stringify(this.value);\n }\n\n /**\n * helper to override several implementations in a more fluent way\n * by having a getClass operation we can avoid direct calls into the constructor or\n * static methods and do not have to implement several methods which rely on the type\n * of \"this\"\n * @returns the type of Optional\n */\n protected getClass(): any {\n return Optional;\n }\n\n /*helper method for getIf with array access aka <name>[<indexPos>]*/\n protected arrayIndex(key: string): number {\n let start = key.indexOf(\"[\");\n let end = key.indexOf(\"]\");\n if (start >= 0 && end > 0 && start < end) {\n return parseInt(key.substring(start + 1, end));\n } else {\n return -1;\n }\n }\n\n /*helper method for getIf with array access aka <name>[<indexPos>]*/\n protected keyVal(key: string): string {\n let start = key.indexOf(\"[\");\n\n if (start >= 0) {\n return key.substring(0, start);\n } else {\n return key;\n }\n }\n\n /**\n * additional syntactic sugar which is not part of the usual optional implementation\n * but makes life easier, if you want to sacrifice typesafety and refactoring\n * capabilities in typescript\n */\n getIfPresent<R>(key: string): Optional<R> {\n if (this.isAbsent()) {\n return this.getClass().absent;\n }\n return this.getClass().fromNullable(this.value[key]).flatMap();\n }\n\n /**\n * elvis like typesafe functional save resolver\n * a typesafe option for getIfPresent\n *\n * usage myOptional.resolve(value => value.subAttr.subAttr2).orElseLazy(....)\n * if this is resolvable without any errors an Optional with the value is returned\n * if not, then an Optional absent is returned, also if you return Optional absent\n * it is flatmapped into absent\n *\n * @param resolver the resolver function, can throw any arbitrary errors, int the error case\n * the resolution goes towards absent\n */\n resolve<V>(resolver: (item: T) => V): Optional<V> {\n if (this.isAbsent()) {\n return Optional.absent;\n }\n try {\n return Optional.fromNullable(resolver(this.value))\n } catch (e) {\n return Optional.absent;\n }\n }\n\n\n protected preprocessKeys(...keys): string[] {\n return new Es2019Array(...keys)\n .flatMap(item => {\n return new Es2019Array(...item.split(/]\\s*\\[/gi))\n .map(item => {\n item = item.replace(/^\\s+|\\s+$/g, \"\");\n if(item.indexOf(\"[\") == -1 && item.indexOf(\"]\") != -1) {\n item = \"[\" + item;\n }\n if(item.indexOf(\"]\") == -1 && item.indexOf(\"[\") != -1) {\n item = item + \"]\";\n }\n return item;\n })\n });\n }\n}\n\n\n// --------------------- From here onwards we break out the side effect free limits ------------\n\n/**\n * ValueEmbedder is the writeable version\n * of optional, it basically is a wrapper\n * around a construct which has a state\n * and can be written to.\n *\n * For the readonly version see Optional\n */\nexport class ValueEmbedder<T> extends Optional<T> implements IValueHolder<T> {\n\n /*default value for absent*/\n static absent = ValueEmbedder.fromNullable(null);\n\n protected key: string;\n\n constructor(rootElem: any, valueKey: string = \"value\") {\n super(rootElem);\n\n this.key = valueKey;\n }\n\n get value(): T {\n return this._value ? <T>this._value[this.key] : null;\n }\n\n set value(newVal: T) {\n if (!this._value) {\n return;\n }\n this._value[this.key] = newVal\n }\n\n orElse(elseValue: any): Optional<any> {\n let alternative = {};\n alternative[this.key] = elseValue;\n return this.isPresent() ? this : new ValueEmbedder(alternative, this.key);\n }\n\n orElseLazy(func: () => any): Optional<any> {\n if (this.isPresent()) {\n return this;\n } else {\n let alternative = {};\n alternative[this.key] = func();\n return new ValueEmbedder(alternative, this.key);\n }\n }\n\n /**\n * helper to override several implementations in a more fluent way\n * by having a getClass operation we can avoid direct calls into the constructor or\n * static methods and do not have to implement several methods which rely on the type\n * of \"this\"\n * @returns ValueEmbedder\n */\n protected getClass(): any {\n return ValueEmbedder;\n }\n\n static fromNullable<V extends Optional<T>,T>(value?: any, valueKey: string = \"value\"): V {\n return <any> new ValueEmbedder<T>(value, valueKey);\n }\n\n}\n\n\n\n","/*!\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {DomQuery} from \"./DomQuery\";\nimport {Es2019Array} from \"./Es2019Array\";\nimport {Config} from \"./Config\";\n\n/**\n * special status of the datasource location pointer\n * if an access, outside - of the possible data boundaries is happening\n * (example for instance current without a first next call, or next\n * which goes over the last possible dataset), an iteration status return\n * value is returned marking this boundary instead of a classical element\n *\n * Note this is only internally used but must be implemented to fulfill\n * internal contracts, the end user will never see those values if he uses\n * streams!\n */\nexport enum ITERATION_STATUS {\n EO_STRM = '__EO_STRM__',\n BEF_STRM = '___BEF_STRM__',\n}\n\nexport function calculateSkips(next_strm: IStreamDataSource<any>) {\n let pos = 1;\n while (next_strm.lookAhead(pos) != ITERATION_STATUS.EO_STRM) {\n pos++;\n }\n return --pos;\n}\n\n/**\n * Every data source wich feeds data into the lazy stream\n * or stream generally must implement this interface\n *\n * It is basically an iteratable to the core\n */\nexport interface IStreamDataSource<T> {\n\n /**\n * @returns true if additional data is present false if not\n */\n hasNext(): boolean;\n\n /**\n * returns the next element in the stream\n */\n next(): T | ITERATION_STATUS;\n\n /**\n * looks ahead cnt without changing the internal data \"pointers\" of the data source\n * (this is mostly needed by possibly infinite constructs like lazy streams,\n * because they do not know by definition their\n * boundaries)\n *\n * @param cnt the elements to look ahead\n * @return either the element or ITERATION_STATUS.EO_STRM if we hit the end of the stream before\n * finding the \"cnt\" element\n */\n lookAhead(cnt ?: number): T | ITERATION_STATUS;\n\n /**\n * returns the current element, returns the same element as the previous next call\n * if there is no next before current called then we will call next as initial element\n */\n current(): T | ITERATION_STATUS;\n\n /**\n * resets the position to the beginning\n */\n reset(): void;\n}\n\n/**\n * A collector, needs to be implemented\n */\nexport interface ICollector<T, S> {\n /**\n * this method basically takes a single stream element\n * and does something with it (collecting it one way or the other\n * in most cases)\n *\n * @param element\n */\n collect(element: T);\n\n /**\n * the final result after all the collecting is done\n */\n finalValue: S;\n}\n\n\n/**\n * A data source which combines multiple streams sequentially into one\n * (this is used internally by flatmap, but also can be used externally)\n */\nexport class MultiStreamDatasource<T> implements IStreamDataSource<T> {\n\n private activeStrm;\n private selectedPos = 0;\n private strms;\n\n constructor(private first, ...strms: Array<IStreamDataSource<T>>) {\n this.strms = [first].concat(...strms);\n this.activeStrm = this.strms[this.selectedPos];\n }\n\n current(): any {\n return this.activeStrm.current();\n }\n\n hasNext(): boolean {\n if(this.activeStrm.hasNext()) {\n return true;\n }\n if(this.selectedPos >= this.strms.length) {\n return false;\n }\n return this.findNextStrm() != -1;\n }\n\n private findNextStrm(): number {\n let hasNext = false;\n let cnt = this.selectedPos;\n while(!hasNext && cnt < this.strms.length) {\n hasNext = this.strms[cnt].hasNext();\n if(!hasNext) {\n cnt++;\n }\n }\n return hasNext ? cnt : -1;\n }\n\n lookAhead(cnt: number = 1): T | ITERATION_STATUS {\n //lets clone\n const strms = this.strms.slice(this.selectedPos);\n\n if(!strms.length) {\n return ITERATION_STATUS.EO_STRM;\n }\n\n const all_strms = [...strms];\n while(all_strms.length) {\n let next_strm = all_strms.shift();\n let lookAhead = next_strm.lookAhead(cnt);\n\n if (lookAhead != ITERATION_STATUS.EO_STRM) {\n return lookAhead;\n }\n cnt = cnt - calculateSkips(next_strm);\n }\n return ITERATION_STATUS.EO_STRM;\n }\n\n\n next(): any {\n if(this.activeStrm.hasNext()) {\n return this.activeStrm.next();\n }\n this.selectedPos = this.findNextStrm();\n if(this.selectedPos == -1) {\n return ITERATION_STATUS.EO_STRM;\n }\n this.activeStrm = this.strms[this.selectedPos];\n return this.activeStrm.next();\n }\n\n reset(): void {\n this.activeStrm = this.strms[0];\n this.selectedPos = 0;\n for(let cnt = 0; cnt < this.strms.length; cnt++) {\n this.strms[cnt].reset();\n }\n }\n\n}\n\n/**\n * defines a sequence of numbers for our stream input\n */\nexport class SequenceDataSource implements IStreamDataSource<number> {\n\n start: number;\n total: number;\n value: number;\n\n constructor(start: number, total: number) {\n this.total = total;\n this.start = start;\n this.value = start - 1;\n }\n\n\n hasNext(): boolean {\n return this.value < (this.total - 1);\n }\n\n next(): number | ITERATION_STATUS {\n this.value++;\n return this.value <= (this.total - 1) ? this.value : ITERATION_STATUS.EO_STRM;\n }\n\n lookAhead(cnt = 1): number | ITERATION_STATUS {\n if ((this.value + cnt) > this.total - 1) {\n return ITERATION_STATUS.EO_STRM;\n } else {\n return this.value + cnt;\n }\n }\n\n reset(): void {\n this.value = this.start - 1;\n }\n\n current(): number | ITERATION_STATUS {\n //first condition current without initial call for next\n return (this.start - 1) ? ITERATION_STATUS.BEF_STRM : this.value;\n }\n}\n\n\n/**\n * implementation of a datasource on top of a standard array\n */\nexport class ArrayStreamDataSource<T> implements IStreamDataSource<T> {\n value: Array<T>;\n dataPos = -1;\n\n constructor(...value: Array<T>) {\n this.value = value;\n }\n\n lookAhead(cnt = 1): T | ITERATION_STATUS {\n if ((this.dataPos + cnt) > this.value.length - 1) {\n return ITERATION_STATUS.EO_STRM;\n }\n return this.value[this.dataPos + cnt];\n }\n\n hasNext(): boolean {\n return this.value.length - 1 > this.dataPos;\n }\n\n next(): T | ITERATION_STATUS {\n this.dataPos++;\n return this?.value[this.dataPos] ?? ITERATION_STATUS.EO_STRM;\n }\n\n reset() {\n this.dataPos = -1;\n }\n\n current(): T {\n return this.value[Math.max(0, this.dataPos)];\n }\n}\n\n/**\n * an intermediate data source which prefilters\n * incoming stream data\n * and lets only the data out which\n * passes the filter function check\n */\nexport class FilteredStreamDatasource<T> implements IStreamDataSource<T> {\n\n filterFunc: (T) => boolean;\n inputDataSource: IStreamDataSource<T>;\n\n _current: T | ITERATION_STATUS = ITERATION_STATUS.BEF_STRM;\n // we have to add a filter idx because the external filter values might change over time, so\n // we cannot reset the state properly unless we do it from a snapshot\n _filterIdx = {};\n _unfilteredPos = 0;\n\n constructor(filterFunc: (T) => boolean, parent: IStreamDataSource<T>) {\n this.filterFunc = filterFunc;\n this.inputDataSource = parent;\n }\n\n /**\n * in order to filter we have to make a look ahead until the\n * first next allowed element\n * hence we prefetch the element and then\n * serve it via next\n */\n hasNext(): boolean {\n let steps = 1;\n let found = false;\n let next;\n\n while (!found && (next = this.inputDataSource.lookAhead(steps)) != ITERATION_STATUS.EO_STRM) {\n if (this.filterFunc(next)) {\n this._filterIdx[this._unfilteredPos + steps] = true;\n found = true;\n } else {\n steps++;\n }\n }\n return found;\n }\n\n /**\n * serve the next element\n */\n next(): T | ITERATION_STATUS {\n let found: T | ITERATION_STATUS = ITERATION_STATUS.EO_STRM;\n while (this.inputDataSource.hasNext()) {\n this._unfilteredPos++;\n let next: T = <T>this.inputDataSource.next();\n //again here we cannot call the filter function twice, because its state might change, so if indexed, we have a decent snapshot, either has next or next can trigger\n //the snapshot\n if (next != ITERATION_STATUS.EO_STRM &&\n ((this._filterIdx?.[this._unfilteredPos] ?? false) || this.filterFunc(next))) {\n this._filterIdx[this._unfilteredPos] = true;\n found = next;\n break;\n }\n }\n this._current = found as T;\n return found;\n }\n\n /**\n * looks ahead cnt without changing the internal data \"pointers\" of the data source\n * (this is mostly needed by LazyStreams, because they do not know by definition their\n * boundaries)\n *\n * @param cnt the elements to look ahead\n * @return either the element or ITERATION_STATUS.EO_STRM if we hit the end of the stream before\n * finding the \"cnt\" element\n */\n lookAhead(cnt = 1): ITERATION_STATUS | T {\n let lookupVal: T | ITERATION_STATUS;\n\n for (let loop = 1; cnt > 0 && (lookupVal = this.inputDataSource.lookAhead(loop)) != ITERATION_STATUS.EO_STRM; loop++) {\n let inCache = this._filterIdx?.[this._unfilteredPos + loop];\n if (inCache || this.filterFunc(lookupVal)) {\n cnt--;\n this._filterIdx[this._unfilteredPos + loop] = true;\n }\n }\n return lookupVal;\n }\n\n current(): T | ITERATION_STATUS {\n return this._current;\n }\n\n reset(): void {\n this._current = ITERATION_STATUS.BEF_STRM;\n this._filterIdx = {};\n this._unfilteredPos = 0;\n this.inputDataSource.reset();\n }\n}\n\n/**\n * an intermediate datasource which maps the items from\n * one into another\n */\nexport class MappedStreamDataSource<T, S> implements IStreamDataSource<S> {\n\n mapFunc: (T) => S;\n inputDataSource: IStreamDataSource<T>;\n\n constructor(mapFunc: (T) => S, parent: IStreamDataSource<T>) {\n this.mapFunc = mapFunc;\n this.inputDataSource = parent;\n }\n\n hasNext(): boolean {\n return this.inputDataSource.hasNext();\n }\n\n next(): S {\n return this.mapFunc(this.inputDataSource.next());\n }\n\n reset(): void {\n this.inputDataSource.reset();\n }\n\n current(): S {\n return this.mapFunc(this.inputDataSource.current());\n }\n\n lookAhead(cnt = 1): ITERATION_STATUS | S {\n const lookAheadVal = this.inputDataSource.lookAhead(cnt);\n return (lookAheadVal == ITERATION_STATUS.EO_STRM) ? lookAheadVal as ITERATION_STATUS : this.mapFunc(lookAheadVal) as S;\n }\n}\n\n\n/**\n * For the time being we only need one collector\n * a collector which collects a stream back into arrays\n */\nexport class ShimArrayCollector<S> implements ICollector<S, Array<S>> {\n private data: Array<S> = new Es2019Array(...[]);\n\n collect(element: S) {\n this.data.push(element);\n }\n\n get finalValue(): Array<S> {\n return this.data;\n }\n}\n\n/**\n * collects the values as inverse array\n */\nexport class InverseArrayCollector<S> implements ICollector<S, Array<S>> {\n private data: Array<S> = [];\n\n collect(element: S) {\n this.data.unshift(element);\n }\n\n get finalValue(): Array<S> {\n return this.data;\n }\n}\n\n\n/**\n * collects an tuple array stream into an assoc array with elements being collected into arrays\n *\n */\nexport class ArrayAssocArrayCollector<S> implements ICollector<[string, S] | string, { [key: string]: S }> {\n finalValue: { [key: string]: any } = {};\n\n collect(element: [string, S] | string) {\n let key = element?.[0] ?? <string>element;\n this.finalValue[key] = this.finalValue?.[key] ?? [];\n this.finalValue[key].push(element?.[1] ?? true);\n }\n}\n\n/**\n * dummy collector which just triggers a run\n * on lazy streams without collecting anything\n */\nexport class Run<S> implements ICollector<S, any> {\n collect(element: S) {\n\n }\n\n get finalValue(): any {\n return null;\n }\n}\n\n/**\n * collects an assoc stream back to an assoc array\n */\nexport class AssocArrayCollector<S> implements ICollector<[string, S] | string, { [key: string]: S }> {\n\n finalValue: { [key: string]: any } = {};\n\n collect(element: [string, S] | string) {\n this.finalValue[element[0] ?? <string>element] = element[1] ?? true;\n }\n}\n\n\n/**\n * A Config collector similar to the FormDFata Collector\n */\nexport class ConfigCollector implements ICollector<{ key: string, value: any }, Config> {\n finalValue: Config = new Config({});\n\n collect(element: { key: string; value: any }) {\n this.finalValue.append(element.key).value = element.value;\n }\n}\n\n\n/**\n * Form data collector for key value pair streams\n */\nexport class FormDataCollector implements ICollector<{ key: string, value: any }, FormData> {\n finalValue: FormData = new FormData();\n\n collect(element: { key: string; value: any }) {\n this.finalValue.append(element.key, element.value);\n }\n}\n\n/**\n * Form data collector for DomQuery streams\n */\nexport class QueryFormDataCollector implements ICollector<DomQuery, FormData> {\n finalValue: FormData = new FormData();\n\n collect(element: DomQuery) {\n let toMerge = element.encodeFormElement();\n if (toMerge.isPresent()) {\n this.finalValue.append(element.name.value, toMerge.get(element.name).value);\n }\n }\n}\n\n/**\n * Encoded String collector from dom query streams\n */\nexport class QueryFormStringCollector implements ICollector<DomQuery, string> {\n\n formData: [[string, string]] = <any>[];\n\n collect(element: DomQuery) {\n let toMerge = element.encodeFormElement();\n if (toMerge.isPresent()) {\n this.formData.push([element.name.value, toMerge.get(element.name).value]);\n }\n }\n\n get finalValue(): string {\n return new Es2019Array(...this.formData)\n .map(keyVal => keyVal.join(\"=\"))\n .reduce((item1, item2) => [item1, item2].join(\"&\"));\n }\n}\n\n/**\n * For the time being we only need one collector\n * a collector which collects a stream back into arrays\n */\nexport class ArrayCollector<S> implements ICollector<S, Array<S>> {\n private data: Array<S> = [];\n\n collect(element: S) {\n this.data.push(element);\n }\n\n get finalValue(): Array<S> {\n return this.data;\n }\n}\n","/*!\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Lang} from \"./Lang\";\nimport {DomQuery} from \"./DomQuery\";\nimport isString = Lang.isString;\nimport {_global$} from \"./Global\";\n\ndeclare let ActiveXObject: any;\n\n/**\n * xml query as specialized case for DomQuery\n */\nexport class XMLQuery extends DomQuery {\n\n constructor(rootNode: Document | string | DomQuery, docType: string = \"text/xml\") {\n\n let createIe11DomQueryShim = (): DOMParser => {\n //at the time if wroting ie11 is the only relevant browser\n //left withut any DomQuery support\n let parser = new ActiveXObject(\"Microsoft.XMLDOM\");\n parser.async = false;\n //we shim th dom parser from ie in\n return <any>{\n parseFromString: (text: string, contentType: string): Document => {\n return parser.loadXML(text);\n }\n }\n };\n\n let parseXML = (xml: string): Document => {\n if (xml == null) {\n return null;\n }\n let domParser: DOMParser = Lang.saveResolveLazy<DOMParser>(\n () => new (_global$()).DOMParser(),\n (): DOMParser => createIe11DomQueryShim()\n ).value;\n return domParser.parseFromString(xml, <any> docType);\n };\n\n if (isString(rootNode)) {\n super(parseXML(<string>rootNode))\n } else {\n super(rootNode);\n }\n }\n\n isXMLParserError(): boolean {\n return this.querySelectorAll(\"parsererror\").isPresent();\n }\n\n toString(): string {\n let ret = [];\n this.eachElem((node: any) => {\n let serialized = (_global$())?.XMLSerializer?.constructor()?.serializeToString(node) ?? node?.xml;\n if (!!serialized) {\n ret.push(serialized);\n }\n });\n return ret.join(\"\");\n }\n\n parserErrorText(joinstr: string): string {\n return this.querySelectorAll(\"parsererror\").textContent(joinstr);\n }\n\n static parseXML(txt: string): XMLQuery {\n return new XMLQuery(txt);\n }\n\n static parseHTML(txt: string): XMLQuery {\n return new XMLQuery(txt, \"text/html\");\n }\n\n static fromString(txt: string, parseType: string = \"text/xml\"): XMLQuery {\n return new XMLQuery(txt, parseType);\n }\n}\n\nexport const XQ = XMLQuery;\nexport type XQ = XMLQuery;","/*!\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nexport {DomQuery, ElementAttribute, DomQueryCollector, DQ, DQ$} from \"./DomQuery\";\nexport {IDomQuery} from \"./IDomQuery\";\nexport {Lang} from \"./Lang\";\nexport {Monad, IValueHolder, IFunctor, IMonad, IIdentity, Optional, ValueEmbedder} from \"./Monad\";\nexport {XMLQuery, XQ} from \"./XmlQuery\";\nexport {assign, assignIf, append, simpleShallowMerge, shallowMerge} from \"./AssocArray\"\nexport {Config} from \"./Config\";\nexport {ConfigDef} from \"./Config\";\nexport {CONFIG_ANY} from \"./Config\";\nexport {CONFIG_VALUE} from \"./Config\";\nexport * as Assoc from \"./AssocArray\";\nexport {Es2019Array, _Es2019Array} from \"./Es2019Array\";\n\n\n\n\n\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {Implementation} from \"../impl/AjaxImpl\";\nimport {PushImpl} from \"../impl/PushImpl\";\nimport {oam as _oam} from \"../myfaces/OamSubmit\";\nimport {$nsp, CTX_OPTIONS_EXECUTE, CTX_OPTIONS_PARAMS, CTX_PARAM_RENDER, P_BEHAVIOR_EVENT} from \"../impl/core/Const\";\nimport {ErrorData} from \"../impl/xhrCore/ErrorData\";\nimport {EventData} from \"../impl/xhrCore/EventData\";\n\n//we use modules to get a proper jsdoc and static/map structure in the calls\n//as per spec requirement\nexport module faces {\n\n\n /**\n * Version of the implementation for the faces.ts.\n * <p />\n * as specified within the jsf specifications faces.html:\n * <ul>\n * <li>left two digits major release number</li>\n * <li>middle two digits minor spec release number</li>\n * <li>right two digits bug release number</li>\n * </ul>\n * @constant\n */\n export var specversion = 400000;\n /**\n * Implementation version as specified within the jsf specification.\n * <p />\n * A number increased with every implementation version\n * and reset by moving to a new spec release number\n *\n * @constant\n */\n export var implversion = 0;\n\n /**\n * SeparatorChar as defined by facesContext.getNamingContainerSeparatorChar()\n */\n export var separatorchar: string = getSeparatorChar();\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Context Path as defined externalContext.requestContextPath\n */\n export var contextpath: string = '#{facesContext.externalContext.requestContextPath}';\n // we do not have a fallback here, for now\n\n /**\n * This method is responsible for the return of a given project stage as defined\n * by the jsf specification.\n * <p/>\n * Valid return values are:\n * <ul>\n * <li>"Production"</li>\n * <li>"Development"</li>\n * <li>"SystemTest"</li>\n * <li>"UnitTest"</li>\n * </li>\n *\n * @return {String} the current project state emitted by the server side method:\n * <i>jakarta.faces.application.Application.getProjectStage()</i>\n */\n export function getProjectStage(): string {\n return Implementation.getProjectStage();\n }\n\n /**\n * collect and encode data for a given form element (must be of type form)\n * find the jakarta.faces.ViewState element and encode its value as well!\n * return a concatenated string of the encoded values!\n *\n * @throws an exception in case of the given element not being of type form!\n * https://issues.apache.org/jira/browse/MYFACES-2110\n */\n export function getViewState(formElement: Element | string): string {\n return Implementation.getViewState(formElement);\n }\n\n /**\n * returns the window identifier for the given node / window\n * @return the window identifier or null if none is found\n * @param rootNode\n */\n export function getClientWindow(rootNode?: Element | string): string {\n return Implementation.getClientWindow(rootNode);\n }\n\n // private helper functions\n function getSeparatorChar(): string {\n const sep = '#{facesContext.namingContainerSeparatorChar}';\n //We now enable standalone mode, the separator char was not mapped we make a fallback to 2.3 behavior\n //the idea is that the separator char is provided from the underlying container, but if not then we\n //will perform a fallback (aka 2.3 has the url fallback behavior)\n return (sep.match(/\\#\\{facesContext.namingContainerSeparatorChar\\}/gi)) ? Implementation.getSeparatorChar() : sep;\n }\n\n\n\n\n export module ajax {\n \"use strict\";\n\n /**\n * this function has to send the ajax requests\n *\n * following request conditions must be met:\n * <ul>\n * <li> the request must be sent asynchronously! </li>\n * <li> the request must be a POST!!! request </li>\n * <li> the request url must be the form action attribute </li>\n * <li> all requests must be queued with a client side request queue to ensure the request ordering!</li>\n * </ul>\n *\n * @param {String|Node} element: any dom element no matter being it html or jsf, from which the event is emitted\n * @param {EVENT} event: any javascript event supported by that object\n * @param {Map} options : map of options being pushed into the ajax cycle\n */\n export function request(element: Element, event?: Event, options?: Options): void {\n Implementation.request(element, event, options)\n }\n\n /**\n * response handler\n * @param request the request object having triggered this response\n * @param context the request context\n *\n */\n export function response(request: XMLHttpRequest, context?: Context): void {\n Implementation.response(request, context);\n }\n\n /**\n * Adds an error handler to our global error queue.\n * the error handler must be of the format <i>function errorListener(<errorData>)</i>\n * with errorData being of following format:\n * <ul>\n * <li> errorData.type : "error"</li>\n * <li> errorData.status : the error status message</li>\n * <li> errorData.serverErrorName : the server error name in case of a server error</li>\n * <li> errorData.serverErrorMessage : the server error message in case of a server error</li>\n * <li> errorData.source : the issuing source element which triggered the request </li>\n * <li> eventData.responseCode: the response code (aka http request response code, 401 etc...) </li>\n * <li> eventData.responseText: the request response text </li>\n * <li> eventData.responseXML: the request response xml </li>\n * </ul>\n *\n * @param errorFunc error handler must be of the format <i>function errorListener(<errorData>)</i>\n */\n export function addOnError(errorFunc: (data: ErrorData) => void): void {\n Implementation.addOnError(<any>errorFunc);\n }\n\n /**\n * Adds a global event listener to the ajax event queue. The event listener must be a function\n * of following format: <i>function eventListener(<eventData>)</i>\n *\n * @param eventFunc event must be of the format <i>function eventListener(<eventData>)</i>\n */\n export function addOnEvent(eventFunc: (data: EventData) => void): void {\n Implementation.addOnEvent(<any>eventFunc);\n }\n }\n\n export module util {\n\n /**\n * varargs function which executes a chain of code (functions or any other code)\n *\n * if any of the code returns false, the execution\n * is terminated prematurely skipping the rest of the code!\n *\n * @param {HTMLElement | String} source, the callee object\n * @param {Event} event, the event object of the callee event triggering this function\n * @param funcs ... arbitrary array of functions or strings\n * @returns true if the chain has succeeded false otherwise\n */\n export function chain(source: HTMLElement | string, event: Event | null, ...funcs: Array<Function | string>): boolean {\n return Implementation.chain(source, event, ...(funcs as EvalFuncs));\n }\n }\n\n export module push {\n /**\n * @param socketClientId the sockets client identifier\n * @param url the uri to reach the socket\n * @param channel the channel name/id\n * @param onopen The function to be invoked when the web socket is opened.\n * @param onmessage The function to be invoked when a message is received.\n * @param onerror The function to be invoked when an error occurs.\n * @param onclose The function to be invoked when the web socket is closed.\n * @param behaviors functions which are invoked whenever a message is received\n * @param autoConnect Whether or not to automatically open the socket. Defaults to <code>false</code>.\n */\n export function init(socketClientId: string,\n url: string,\n channel: string,\n onopen: Function,\n onmessage: Function,\n onerror: Function,\n onclose: Function,\n behaviors: any,\n autoConnect: boolean): void {\n PushImpl.init(socketClientId, url, channel, onopen, onmessage, onerror, onclose, behaviors, autoConnect);\n }\n\n /**\n * Open the web socket on the given channel.\n * @param socketClientId The name of the web socket channel.\n * @throws Error is thrown, if the channel is unknown.\n */\n export function open(socketClientId: string): void {\n PushImpl.open(socketClientId);\n }\n\n /**\n * Close the web socket on the given channel.\n * @param socketClientId The id of the web socket client.\n * @throws Error is thrown, if the channel is unknown.\n */\n export function close(socketClientId: string): void {\n PushImpl.close(socketClientId);\n }\n\n }\n}\n\nexport module myfaces {\n /**\n * AB function similar to mojarra and Primefaces\n * not part of the spec but a convenience accessor method\n * Code provided by Thomas Andraschko\n *\n * @param source the event source\n * @param event the event\n * @param eventName event name for java.jakarta.faces.behavior.evemnt\n * @param execute execute list as passed down in faces.ajax.request\n * @param render the render list as string\n * @param options the options which need to be mered in\n */\n export function ab(source: Element, event: Event, eventName: string, execute: string, render: string, options: Options = {}): void {\n if (eventName) {\n options[CTX_OPTIONS_PARAMS] = options?.[CTX_OPTIONS_PARAMS] ?? {};\n options[CTX_OPTIONS_PARAMS][$nsp(P_BEHAVIOR_EVENT)] = eventName;\n }\n if (execute) {\n options[CTX_OPTIONS_EXECUTE] = execute;\n }\n if (render) {\n options[CTX_PARAM_RENDER] = render;\n }\n\n (window?.faces ?? window.jsf).ajax.request(source, event, options);\n }\n\n\n const onReadyChain: Array<() => void> = [];\n let readyStateListener = null;\n // noinspection JSUnusedGlobalSymbols\n /**\n * Helper function in the myfaces namespace to handle document ready properly for the load case\n * the ajax case, does not need proper treatment, since it is deferred anyway.\n * Used by command script as helper function!\n *\n * @param executionFunc the function to be executed upon ready\n */\n export function onDomReady(executionFunc: () => void) {\n if(document.readyState !== \"complete\") {\n onReadyChain.push(executionFunc);\n if(!readyStateListener) {\n readyStateListener = () => {\n window.removeEventListener(\"DOMContentLoaded\", readyStateListener);\n readyStateListener = null;\n try {\n onReadyChain.forEach(func => func());\n } finally {\n //done we clear now the ready chain\n onReadyChain.length = 0;\n }\n };\n window.addEventListener(\"DOMContentLoaded\", readyStateListener);\n }\n } else {\n if(readyStateListener) {\n readyStateListener();\n }\n executionFunc();\n }\n\n }\n\n /**\n * legacy oam functions\n */\n export const oam = _oam;\n}\n\n\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {IListener} from \"./util/IListener\";\nimport {Response} from \"./xhrCore/Response\";\nimport {XhrRequest} from \"./xhrCore/XhrRequest\";\nimport {Config, DQ, DQ$, Lang, Optional} from \"mona-dish\";\nimport {Assertions} from \"./util/Assertions\";\nimport {ExtConfig, ExtDomQuery} from \"./util/ExtDomQuery\";\nimport {ErrorData} from \"./xhrCore/ErrorData\";\nimport {EventData} from \"./xhrCore/EventData\";\nimport {ExtLang} from \"./util/Lang\";\n\nimport {\n CTX_OPTIONS_EXECUTE,\n CTX_PARAM_REQ_PASS_THR,\n CTX_PARAM_SRC_CTL_ID,\n CTX_PARAM_SRC_FRM_ID,\n IDENT_ALL,\n IDENT_FORM,\n IDENT_NONE,\n IDENT_THIS,\n MYFACES,\n ON_ERROR,\n ON_EVENT,\n P_AJAX,\n P_CLIENT_WINDOW,\n P_EVT,\n P_EXECUTE,\n P_AJAX_SOURCE,\n P_RENDER,\n P_RESET_VALUES,\n P_WINDOW_ID,\n CTX_PARAM_RENDER,\n SOURCE,\n HTML_TAG_FORM,\n CTX_OPTIONS_PARAMS,\n VIEW_ID,\n $faces,\n EMPTY_STR,\n NAMED_VIEWROOT,\n NAMING_CONTAINER_ID,\n CTX_PARAM_PPS,\n MYFACES_OPTION_PPS,\n $nsp,\n CTX_PARAM_UPLOAD_ON_PROGRESS,\n CTX_PARAM_UPLOAD_PREINIT,\n CTX_PARAM_UPLOAD_LOADSTART,\n CTX_PARAM_UPLOAD_LOADEND,\n CTX_PARAM_UPLOAD_LOAD, CTX_PARAM_UPLOAD_ERROR, CTX_PARAM_UPLOAD_ABORT, CTX_PARAM_UPLOAD_TIMEOUT\n} from \"./core/Const\";\nimport {\n resolveDefaults,\n resolveDelay,\n resolveForm,\n resolveTimeout, resolveViewId, resolveViewRootId, resoveNamingContainerMapper\n} from \"./xhrCore/RequestDataResolver\";\nimport {encodeFormData} from \"./util/FileUtils\";\nimport {XhrQueueController} from \"./util/XhrQueueController\";\n\n/*\n * allowed project stages\n */\nenum ProjectStages {\n Production = \"Production\",\n Development = \"Development\",\n SystemTest = \"SystemTest\",\n UnitTest = \"UnitTest\"\n}\n\n/*\n * Block-filter for the pass-through filtering; the attributes given here\n * will not be transmitted from the options into the pass-through\n */\nenum BlockFilter {\n onerror = \"onerror\",\n onevent = \"onevent\",\n render = \"render\",\n execute = \"execute\",\n myfaces = \"myfaces\",\n delay = \"delay\",\n timeout = \"timeout\",\n resetValues = \"resetValues\",\n windowId = \"windowId\",\n params = \"params\"\n}\n\n\n\n/**\n * Core Implementation\n * to distinct between api and impl\n *\n * The original idea was to make the implementation pluggable\n * but this is pointless, you always can overwrite the thin api layer\n * however a dedicated api makes sense for readability reasons\n */\nexport module Implementation {\n/*\n Small internal explanation, this code is optimized for readability\n and cuts off a ton of old legacy code.\n Aka older browsers are not supported anymore.\n We use a self written helper library to keep the number of exernal\n code dependencies down.\n The library is called mona-dish and started as a small sideproject of mine\n it provides following\n\n a) Monad like structures for querying because this keeps the code denser and adds abstractions\n that always was the strong point of jQuery, and it still is better in this regard than what ecmascript provides\n\n c) A neutral json like configuration which allows assignments of arbitrary values with reduce code which then can be\n transformed into different data representations\n\n examples:\n internalCtx.assign(MYPARAM, CTX_PARAM_SRC_FRM_ID).value = form.id.value;\n passes a value into context.MYPARAM.CTX_PARAM_SRC_FRM_ID\n\n basically an abbreviation for\n\n internalCtxt[MYPARAM] = internalCtxt?.[MYPARAM] ? internalCtxt[MYPARAM] : {};\n internalCtxt[MYPARAM][CTX_PARAM_SRC_FRM_ID] = internalCtxt?.[MYPARAM][CTX_PARAM_SRC_FRM_ID] ? internalCtxt[MYPARAM][CTX_PARAM_SRC_FRM_ID] : {};\n internalCtxt[MYPARAM][CTX_PARAM_SRC_FRM_ID] = form.id.value;\n\n\n internalCtx.assign(condition, MYPARAM, CTX_PARAM_SRC_FRM_ID).value = form.id.value;\n passes a value into context.MYPARAM.CTX_PARAM_SRC_FRM_ID if condition === true otherwise it is ignored\n\n abbreviates:\n if(condition) {\n internalCtxt[MYPARAM] = internalCtxt?.[MYPARAM] ? internalCtxt[MYPARAM] : {};\n internalCtxt[MYPARAM][CTX_PARAM_SRC_FRM_ID] = internalCtxt?.[MYPARAM][CTX_PARAM_SRC_FRM_ID] ? internalCtxt[MYPARAM][CTX_PARAM_SRC_FRM_ID] : {};\n internalCtxt[MYPARAM][CTX_PARAM_SRC_FRM_ID] = form.id.value;\n }\n\n\n d) Optional constructs, while under heavy debate we only use them lightly where the api requires it from mona-dish\n\n Note the inclusion of this library uses a reduced build which only includes the part of it, which we really use\n\n */\n\n import trim = Lang.trim;\n import getMessage = ExtLang.getMessage;\n import getGlobalConfig = ExtLang.getGlobalConfig;\n import assert = Assertions.assert;\n import ofAssoc = ExtLang.ofAssoc;\n import collectAssoc = ExtLang.collectAssoc;\n\n let projectStage: string = null;\n let separator: string = null;\n let eventQueue = [];\n let errorQueue = [];\n export let requestQueue: XhrQueueController<XhrRequest> = null;\n /*error reporting threshold*/\n let threshold = \"ERROR\";\n\n /**\n * fetches the separator char from the given script tags\n *\n * @return {string} the separator char for the given script tags\n */\n export function getSeparatorChar(): string {\n return resolveGlobalConfig()?.separator ??\n this?.separator ??\n (separator = ExtDomQuery.searchJsfJsFor(/separator=([^&;]*)/).orElse(\":\").value);\n }\n\n /**\n * this is for testing purposes only, since AjaxImpl is a module\n * we need to reset for every unit test its internal states\n */\n export function reset() {\n projectStage = null;\n separator = null;\n eventQueue = [];\n errorQueue = [];\n requestQueue = null;\n }\n\n /**\n * @return the project stage also emitted by the server:\n * it cannot be cached and must be delivered over the server\n * The value for it comes from the requestInternal parameter of the faces.js script called \"stage\".\n */\n export function getProjectStage(): string | null {\n return resolveGlobalConfig()?.projectStage ??\n this?.projectStage ??\n (projectStage = resolveProjectStateFromURL());\n }\n\n /**\n * resolves the project stage as url parameter\n * @return the project stage or null\n */\n export function resolveProjectStateFromURL(): string | null {\n\n /* run through all script tags and try to find the one that includes faces.js */\n const foundStage = ExtDomQuery.searchJsfJsFor(/stage=([^&;]*)/).value as string;\n return (foundStage in ProjectStages) ? foundStage : ProjectStages.Production; // MYFACES-4572: default is production\n }\n\n /**\n * implementation of the faces.util.chain functionality\n *\n * @param source\n * @param event\n * @param funcs\n */\n export function chain(source: any, event: Event, ...funcs: EvalFuncs): boolean {\n // we can use our lazy stream each functionality to run our chain here.\n // by passing a boolean as return value into the onElem call\n // we can stop early at the first false, just like the spec requests\n\n let ret = true;\n funcs.every(func => {\n let returnVal = resolveAndExecute(source, event, func);\n if(returnVal === false) {\n ret = false;\n }\n //we short circuit in case of false and break the every loop\n return ret;\n });\n return ret;\n\n }\n\n /**\n * this function has to send the ajax requests\n *\n * following request conditions must be met:\n * <ul>\n * <li> the request must be sent asynchronously! </li>\n * <li> the request must be a POST!!! request </li>\n * <li> the request url must be the form action attribute </li>\n * <li> all requests must be queued with a client side request queue to ensure the request ordering!</li>\n * </ul>\n *\n * @param el any dom element no matter being it html or jsf, from which the event is emitted\n * @param event any javascript event supported by that object\n * @param opts map of options being pushed into the ajax cycle\n *\n * a) transformArguments out of the function\n * b) passThrough handling with a map copy with a filter map block map\n */\n export function request(el: ElemDef, event?: Event, opts ?: Options) {\n\n const {\n options,\n elem,\n elementId,\n windowId,\n isResetValues\n } = resolveDefaults(event, opts, el);\n const requestCtx = new ExtConfig({});\n const internalCtx = new ExtConfig({});\n\n Assertions.assertRequestIntegrity(options, elem);\n\n /**\n * fetch the parent form\n *\n * note we also add an override possibility here\n * so that people can use dummy forms and work\n * with detached objects\n */\n const form: DQ = resolveForm(elem, event);\n const viewId: string = resolveViewId(form);\n const formId = form.id.value;\n const delay: number = resolveDelay(options);\n const timeout: number = resolveTimeout(options);\n\n requestCtx.assignIf(!!windowId, P_WINDOW_ID).value = windowId;\n\n // old non - spec behavior will be removed after it is clear whether the removal breaks any code\n requestCtx.assign(CTX_PARAM_REQ_PASS_THR).value = extractLegacyParams(options.value);\n\n // spec conform behavior, all passthrough params must be under \"passthrough\n const params = remapArrayToAssocArr(options.getIf(CTX_OPTIONS_PARAMS).orElse({}).value);\n //we turn off the remapping for the param merge, because we do not want to have\n //any namespacing to be remapped\n\n let ctxPassthrough = requestCtx.getIf(CTX_PARAM_REQ_PASS_THR) as ExtConfig;\n ctxPassthrough.$nspEnabled = false;\n ctxPassthrough.shallowMerge(new Config(params), true);\n //now we turn it on again\n ctxPassthrough.$nspEnabled = true;\n requestCtx.assignIf(!!event, CTX_PARAM_REQ_PASS_THR, P_EVT).value = event?.type;\n\n /**\n * ajax pass through context with the source\n * onresolved Event and onerror Event\n */\n requestCtx.assign(SOURCE).value = elementId;\n\n requestCtx.assign(VIEW_ID).value = viewId;\n\n /**\n * on resolvedEvent and onError...\n * those values will be traversed later on\n * also into the response context\n */\n requestCtx.assign(ON_EVENT).value = options.value?.onevent;\n requestCtx.assign(ON_ERROR).value = options.value?.onerror;\n\n /**\n * Fetch the myfaces config params\n */\n requestCtx.assign(MYFACES).value = options.value?.myfaces;\n\n /**\n * binding contract the jakarta.faces.source must be set\n */\n requestCtx.assign(CTX_PARAM_REQ_PASS_THR, P_AJAX_SOURCE).value = elementId;\n\n /**\n * jakarta.faces.partial.ajax must be set to true\n */\n requestCtx.assign(CTX_PARAM_REQ_PASS_THR, P_AJAX).value = true;\n\n /**\n * if resetValues is set to true\n * then we have to set jakarta.faces.resetValues as well\n * as pass through parameter\n * the value has to be explicitly true, according to\n * the specs jsdoc\n */\n requestCtx.assignIf(isResetValues, CTX_PARAM_REQ_PASS_THR, P_RESET_VALUES).value = true;\n\n // additional meta information to speed things up, note internal non jsf\n // pass through options are stored under _mfInternal in the context\n internalCtx.assign(CTX_PARAM_SRC_FRM_ID).value = formId;\n\n /**\n * special myfaces only internal parameter for onProgress until we have an official api\n * that way we can track the progress of a xhr request (useful for file uploads)\n */\n internalCtx.assign(CTX_PARAM_UPLOAD_PREINIT).value = options.value?.myfaces?.upload?.preinit;\n internalCtx.assign(CTX_PARAM_UPLOAD_LOADSTART).value = options.value?.myfaces?.upload?.loadstart;\n internalCtx.assign(CTX_PARAM_UPLOAD_ON_PROGRESS).value = options.value?.myfaces?.upload?.progress;\n internalCtx.assign(CTX_PARAM_UPLOAD_LOADEND).value = options.value?.myfaces?.upload?.loadend;\n internalCtx.assign(CTX_PARAM_UPLOAD_LOAD).value = options.value?.myfaces?.upload?.load;\n internalCtx.assign(CTX_PARAM_UPLOAD_ERROR).value = options.value?.myfaces?.upload?.error;\n internalCtx.assign(CTX_PARAM_UPLOAD_ABORT).value = options.value?.myfaces?.upload?.abort;\n internalCtx.assign(CTX_PARAM_UPLOAD_TIMEOUT).value = options.value?.myfaces?.upload?.timeout;\n\n // mojarra compatibility, mojarra is sending the form id as well\n // this is not documented behavior but can be determined by running\n // mojarra under blackbox conditions.\n // I assume it does the same as our formId_submit=1 so leaving it out\n // won't hurt but for the sake of compatibility we are going to add it\n requestCtx.assign(CTX_PARAM_REQ_PASS_THR, formId).value = formId;\n internalCtx.assign(CTX_PARAM_SRC_CTL_ID).value = elementId;\n // reintroduction of PPS as per myfaces 2.3 (myfaces.pps = true, only the executes are submitted)\n internalCtx.assign(CTX_PARAM_PPS).value = extractMyFacesParams(options.value)?.[MYFACES_OPTION_PPS] ?? false;\n\n\n assignClientWindowId(form, requestCtx);\n assignExecute(options, requestCtx, form, elementId);\n assignRender(options, requestCtx, form, elementId);\n assignNamingContainerData(internalCtx, form);\n\n //now we enqueue the request as asynchronous runnable into our request\n //queue and let the queue take over the rest\n queueHandler.addRequestToQueue(elem, form, requestCtx, internalCtx, delay, timeout);\n }\n\n /**\n * Spec. 13.3.3\n * Examining the response markup and updating the DOM tree\n * @param {XMLHttpRequest} request - the ajax request\n * @param {Object} context - the ajax context\n */\n export function response(request: XMLHttpRequest, context: Context) {\n Response.processResponse(request, context);\n }\n\n /**\n * adds an error handler to the error queue\n *\n * @param errorListener the error listener handler\n */\n export function addOnError(errorListener: IListener<ErrorData>) {\n errorQueue.push(errorListener);\n }\n\n /**\n * adds an event handler to the event queue\n *\n * @param eventListener the event listener handler\n */\n export function addOnEvent(eventListener: IListener<EventData>) {\n eventQueue.push(eventListener);\n }\n\n // noinspection JSUnusedLocalSymbols\n /**\n * sends an event to the event handlers\n *\n * @param data the event data object hosting the event data according to the spec @see EventData for what is reachable\n * @param localHandler an optional event handler, which is processed before the event handler chain\n */\n export function sendEvent(data: EventData, localHandler = function (data: EventData) {\n }) {\n /*now we serve the queue as well*/\n localHandler(data);\n eventQueue.forEach(fn => fn(data));\n }\n\n /**\n * error handler behavior called internally\n * and only into the impl it takes care of the\n * internal message transformation to a myfaces internal error\n * and then uses the standard send error mechanisms\n * also a double error logging prevention is done as well\n *\n * @param request the request currently being processed\n * @param context the context affected by this error\n * @param exception the exception being thrown\n * @param clearRequestQueue if set to true, clears the request queue of all pending requests\n */\n export function stdErrorHandler(request: XMLHttpRequest,\n context: Config,\n exception: Error,\n clearRequestQueue = false) {\n //newer browsers do not allow to hold additional values on native objects like exceptions\n //we hence capsule it into the request, which is gced automatically\n //on ie as well, since the stdErrorHandler usually is called between requests\n //this is a valid approach\n try {\n if (threshold == \"ERROR\") {\n let errorData = ErrorData.fromClient(exception);\n sendError(errorData);\n }\n } finally {\n if (clearRequestQueue) {\n requestQueue.clear();\n }\n }\n }\n\n // noinspection JSUnusedLocalSymbols\n /**\n * implementation triggering the error chain\n *\n *\n *\n * handles the errors, in case of an onError exists within the context the onError is called as local error handler\n * the registered error handlers in the queue received an error message to be dealt with\n * and if the projectStage is at development an alert box is displayed\n *\n * note: we have additional functionality here, via the global config myfaces.config.defaultErrorOutput a function can be provided\n * which changes the default output behavior from alert to something else\n *\n * @param errorData the error data to be displayed\n * @param localHandler an optional local error handler which has to be processed before the error handler queue\n */\n export function sendError(errorData: ErrorData, localHandler = function (data: ErrorData) {\n }) {\n\n localHandler(errorData);\n errorQueue.forEach((errorCallback: Function) => {\n errorCallback(errorData);\n });\n let displayError: (string) => void = getGlobalConfig(\"defaultErrorOutput\", (console ? console.error : alert));\n displayError(errorData);\n }\n\n /**\n * @node optional element or id defining a rootnode where an element with the id \"jakarta.faces.windowId\" is hosted\n * @return the client window id of the current window, if one is given if none is found, null is returned\n */\n export function getClientWindow(node ?: Element | string): string | null {\n const ALTERED = \"___mf_id_altered__\";\n const INIT = \"___init____\";\n\n /*\n * the search root for the dom element search\n */\n\n\n let searchRoot = ((node) ? DQ.byId(node): DQ$(\"form\"));\n let inputs = searchRoot\n .filterSelector(`input[name='${$nsp(P_CLIENT_WINDOW)}']`)\n .orElseLazy(() => searchRoot.querySelectorAll(`input[name='${$nsp(P_CLIENT_WINDOW)}']`))\n\n /*\n * lazy helper to fetch the window id from the included faces.js\n */\n let fetchWindowIdFromJSFJS = (): Optional<string> => ExtDomQuery.searchJsfJsFor(/jfwid=([^&;]*)/).orElse(null);\n\n /*\n * fetch window id from the url\n */\n let fetchWindowIdFromURL = function (): Optional<string> {\n const href = window.location.href, windowId = \"jfwid\";\n const regex = new RegExp(\"[\\\\?&]\" + windowId + \"=([^&#\\\\;]*)\");\n const results = regex.exec(href);\n //initial trial over the url and a regexp\n if (results != null) return Optional.fromNullable(results[1]);\n return Optional.fromNullable(null);\n };\n\n /*\n * functional double check based on stream reduction\n * the values should be identical or on INIT value which is a premise to\n * skip the first check\n *\n * @param value1\n * @param value2\n */\n let differenceCheck = (value1: string, value2: string): string => {\n if(value1 == INIT) {\n return value2;\n } else if (value1 == ALTERED || value1 != value2) {\n return ALTERED;\n }\n return value2;\n };\n\n /*\n * helper for cleaner code, maps the value from an item\n *\n * @param item\n */\n let getValue = (item: DQ): string => item.val as string;\n /*\n * fetch the window id from the forms\n * window ids must be present in all forms\n * or non-existent. If they exist all of them must be the same\n */\n\n let formWindowId: string = inputs.asArray.map(getValue).reduce(differenceCheck, INIT);\n\n\n //if the resulting window id is set on altered then we have an unresolvable problem\n assert(ALTERED != formWindowId, \"Multiple different windowIds found in document\");\n\n /*\n * return the window id or null\n */\n return formWindowId != INIT ? formWindowId : (fetchWindowIdFromURL() || fetchWindowIdFromJSFJS()).value;\n }\n\n /**\n * collect and encode data for a given form element (must be of type form)\n * find the jakarta.faces.ViewState element and encode its value as well!\n * @return a concatenated string of the encoded values!\n *\n * @throws Error in case of the given element not being of type form!\n * https://issues.apache.org/jira/browse/MYFACES-2110\n */\n export function getViewState(form: Element | string): string {\n /**\n * type-check assert!, we opt for strong typing here\n * because it makes it easier to detect bugs\n */\n\n let element: DQ = DQ.byId(form, true);\n if (!element.isTag(HTML_TAG_FORM)) {\n throw new Error(getMessage(\"ERR_VIEWSTATE\"));\n }\n\n // determine the naming container scenario\n const dummyContext = new Config({});\n assignNamingContainerData(dummyContext, DQ.byId(form))\n // fetch all non file input form elements\n let formElements = element.deepElements.encodeFormElement()\n\n // encode them! (file inputs are handled differently and are not part of the viewstate)\n return encodeFormData(new ExtConfig(formElements), resoveNamingContainerMapper(dummyContext));\n }\n\n /**\n * this at the first sight looks like a weird construct, but we need to do it this way\n * for testing, we cannot proxy addRequestToQueue from the testing frameworks directly,\n * but we need to keep it under unit tests.\n */\n export let queueHandler = {\n /**\n * public to make it accessible for tests\n *\n * adds a new request to our queue for further processing\n */\n addRequestToQueue: function (elem: DQ, form: DQ, reqCtx: ExtConfig, respPassThr: Config, delay = 0, timeout = 0) {\n requestQueue = requestQueue ?? new XhrQueueController<XhrRequest>();\n requestQueue.enqueue(new XhrRequest(reqCtx, respPassThr, timeout), delay);\n }\n };\n\n //----------------------------------------------- Methods ---------------------------------------------------------------------\n\n /**\n * the idea is to replace some placeholder parameters with their respective values\n * placeholder params like @all, @none, @form, @this need to be replaced by\n * the values defined by the specification\n *\n * This function does it for the render parameters\n *\n * @param requestOptions the source options coming in as options object from faces.ajax.request (options parameter)\n * @param targetContext the receiving target context\n * @param issuingForm the issuing form\n * @param sourceElementId the executing element triggering the faces.ajax.request (id of it)\n */\n function assignRender(requestOptions: Config, targetContext: Config, issuingForm: DQ, sourceElementId: string) {\n if (requestOptions.getIf(CTX_PARAM_RENDER).isPresent()) {\n remapDefaultConstants(targetContext.getIf(CTX_PARAM_REQ_PASS_THR).get({}), P_RENDER, <string>requestOptions.getIf(CTX_PARAM_RENDER).value, issuingForm, <any>sourceElementId, targetContext.getIf(VIEW_ID).value);\n }\n }\n\n /**\n * the idea is to replace some placeholder parameters with their respective values\n * placeholder params like @all, @none, @form, @this need to be replaced by\n * the values defined by the specification\n *\n * This function does it for the execute parameters\n *\n * @param requestOptions the source options coming in as options object from faces.ajax.request (options parameter)\n * @param targetContext the receiving target context\n * @param issuingForm the issuing form\n * @param sourceElementId the executing element triggering the faces.ajax.request (id of it)\n */\n function assignExecute(requestOptions: Config, targetContext: Config, issuingForm: DQ, sourceElementId: string) {\n\n if (requestOptions.getIf(CTX_OPTIONS_EXECUTE).isPresent()) {\n /*the options must be a blank delimited list of strings*/\n /*compliance with Mojarra which automatically adds @this to an execute\n * the spec rev 2.0a however states, if none is issued nothing at all should be sent down\n */\n requestOptions.assign(CTX_OPTIONS_EXECUTE).value = [requestOptions.getIf(CTX_OPTIONS_EXECUTE).value, IDENT_THIS].join(\" \");\n remapDefaultConstants(targetContext.getIf(CTX_PARAM_REQ_PASS_THR).get({}), P_EXECUTE, <string>requestOptions.getIf(CTX_OPTIONS_EXECUTE).value, issuingForm, <any>sourceElementId, targetContext.getIf(VIEW_ID).value);\n } else {\n targetContext.assign(CTX_PARAM_REQ_PASS_THR, P_EXECUTE).value = sourceElementId;\n }\n }\n\n /**\n * apply the browser tab where the request was originating from\n *\n * @param form the form hosting the client window id\n * @param targetContext the target context receiving the value\n */\n function assignClientWindowId(form: DQ, targetContext: Config) {\n\n let clientWindow = $faces().getClientWindow(form.getAsElem(0).value);\n if (clientWindow) {\n targetContext.assign(CTX_PARAM_REQ_PASS_THR, P_CLIENT_WINDOW).value = clientWindow;\n }\n }\n\n /**\n * determines the current naming container\n * and assigns it internally\n *\n * @param internalContext\n * @param formElement\n * @private\n */\n function assignNamingContainerData(internalContext: Config, formElement: DQ) {\n const viewRootId = resolveViewRootId(formElement);\n\n if(!!viewRootId) {\n internalContext.assign(NAMED_VIEWROOT).value = true;\n internalContext.assign(NAMING_CONTAINER_ID).value = viewRootId;\n }\n }\n\n /**\n * transforms the user values to the expected values\n * handling '@none', '@all', '@form', and '@this' appropriately.\n * (Note: Although we could employ a simple string replacement method,\n * it could result in duplicate entries under certain conditions.)\n *\n * Specific standardized constants such as\n * '@all', '@none', '@form', and '@this'\n * require special treatment.\n *\n * @param targetConfig the target configuration receiving the final values\n * @param targetKey the target key\n * @param userValues the passed user values (aka input string which needs to be transformed)\n * @param issuingForm the form where the issuing element originates\n * @param issuingElementId the issuing element\n * @param rootNamingContainerId the naming container id (\"\" default if none is given)\n */\n function remapDefaultConstants(targetConfig: Config, targetKey: string, userValues: string, issuingForm: DQ, issuingElementId: string, rootNamingContainerId: string = \"\"): Config {\n //a cleaner implementation of the transform list method\n const SEP = $faces().separatorchar;\n let iterValues: string[] = (userValues) ? trim(userValues).split(/\\s+/gi) : [];\n let ret = [];\n let processed: {[key: string]: boolean} = {};\n\n /**\n * remaps the client ids for the portlet case so that the server\n * can deal with them either prefixed ir not\n * also resolves the absolute id case (it was assumed the server does this, but\n * apparently the RI does not, so we have to follow the RI behavior here)\n * @param componentIdToTransform the componentId which needs post-processing\n */\n const remapNamingContainer = componentIdToTransform => {\n // pattern :<anything> must be prepended by viewRoot if there is one,\n // otherwise we are in a not namespaced then only the id has to match\n const rootNamingContainerPrefix = (rootNamingContainerId.length) ? rootNamingContainerId+SEP : EMPTY_STR;\n let formClientId = issuingForm.id.value;\n // nearest parent naming container relative to the form\n const nearestNamingContainer = formClientId.substring(0, formClientId.lastIndexOf(SEP));\n const nearestNamingContainerPrefix = (nearestNamingContainer.length) ? nearestNamingContainer + SEP : EMPTY_STR;\n // Absolute search expressions, always start with SEP or the name of the root naming container\n const hasLeadingSep = componentIdToTransform.indexOf(SEP) === 0;\n const isAbsolutSearchExpr = hasLeadingSep || (rootNamingContainerId.length\n && componentIdToTransform.indexOf(rootNamingContainerPrefix) == 0);\n let finalIdentifier: string;\n if (isAbsolutSearchExpr) {\n //we cut off the leading sep if there is one\n componentIdToTransform = hasLeadingSep ? componentIdToTransform.substring(1) : componentIdToTransform;\n componentIdToTransform = componentIdToTransform.indexOf(rootNamingContainerPrefix) == 0 ? componentIdToTransform.substring(rootNamingContainerPrefix.length) : componentIdToTransform;\n //now we prepend either the prefix or \"\" from the cut-off string to get the final result\n finalIdentifier = [rootNamingContainerPrefix, componentIdToTransform].join(EMPTY_STR);\n } else { //relative search according to the javadoc\n //we cut off the root naming container id from the form\n if (formClientId.indexOf(rootNamingContainerPrefix) == 0) {\n formClientId = formClientId.substring(rootNamingContainerPrefix.length);\n }\n\n //If prependId = true, the outer form id must be present in the id if same form\n let hasPrependId = componentIdToTransform.indexOf(formClientId) == 0;\n finalIdentifier = hasPrependId ?\n [rootNamingContainerPrefix, componentIdToTransform].join(EMPTY_STR) :\n [nearestNamingContainerPrefix, componentIdToTransform].join(EMPTY_STR);\n }\n // We need to double-check because we have scenarios where we have a naming container\n // and no prepend (aka tobago testcase \"must handle ':' in IDs properly\", scenario 3,\n // in this case we return the component id, and be happy\n // we can roll a dom check here\n return DQ.byId(finalIdentifier).isPresent() ? finalIdentifier : componentIdToTransform;\n };\n\n // in this case we do not use lazy stream because it won´t bring any code reduction\n // or speedup\n for (let cnt = 0; cnt < iterValues.length; cnt++) {\n //avoid doubles\n if (iterValues[cnt] in processed) {\n continue;\n }\n switch (iterValues[cnt]) {\n //@none no values should be sent\n case IDENT_NONE:\n return targetConfig.delete(targetKey);\n //@all is a pass through case according to the spec\n case IDENT_ALL:\n targetConfig.assign(targetKey).value = IDENT_ALL;\n return targetConfig;\n //@form pushes the issuing form id into our list\n case IDENT_FORM:\n ret.push(remapNamingContainer(issuingForm.id.value));\n processed[issuingForm.id.value] = true;\n break;\n //@this is replaced with the current issuing element id\n case IDENT_THIS:\n if (!(issuingElementId in processed)) {\n ret.push(remapNamingContainer(issuingElementId));\n processed[issuingElementId] = true;\n }\n break;\n default:\n ret.push(remapNamingContainer(iterValues[cnt]));\n processed[iterValues[cnt]] = true;\n }\n }\n\n targetConfig.assign(targetKey).value = ret.join(\" \");\n return targetConfig;\n }\n\n /**\n * Filters the provided options using a blacklist to ensure\n * only pass-through parameters are processed for the Ajax request.\n *\n * Note that this issue is leftover from a previous implementation.\n * The specification-conforming behavior is to use parameters for pass-through values.\n * This will be addressed soon, after confirming that removal won't break any legacy code.\n *\n * @param {Context} mappedOpts - The options to be filtered.\n */\n function extractLegacyParams(mappedOpts: Options): {[key: string]: any} {\n //we now can use the full code reduction given by our stream api\n //to filter\n return ofAssoc(mappedOpts)\n .filter((item => !(item[0] in BlockFilter)))\n .reduce(collectAssoc, {});\n }\n\n /**\n * Extracts the MyFaces configuration parameters\n * that augment JSF with additional functionality.\n *\n * @param mappedOpts\n * @private\n */\n function extractMyFacesParams(mappedOpts: Options): {[key: string]: any} {\n //we now can use the full code reduction given by our stream api\n //to filter\n return ofAssoc(mappedOpts)\n .filter((item => (item[0] == \"myfaces\")))\n .reduce(collectAssoc, {})?.[MYFACES];\n }\n\n\n function remapArrayToAssocArr(arrayedParams: [[string, any]] | {[key: string]: any}): {[key: string]: any} {\n if(Array.isArray(arrayedParams)) {\n return arrayedParams.reduce(collectAssoc, {} as any);\n }\n return arrayedParams;\n }\n\n function resolveGlobalConfig(): any {\n return window?.[MYFACES]?.config ?? {};\n }\n\n /**\n * Private helper to execute a function or code fragment\n * @param source the source of the caller passed into the function as this\n * @param event an event which needs to be passed down into the function\n * @param func either a function or code fragment\n * @return a boolean value, if the passed function returns false, then the\n * caller is basically notified that the execution can now stop (JSF requirement for chain)\n * @private\n */\n function resolveAndExecute(source: any, event: Event, func: Function | string): boolean {\n if (\"string\" != typeof func) {\n //function is passed down as chain parameter, can be executed as is\n return (<Function>func).call(source, event) !== false;\n } else {\n //either a function or a string can be passed in case of a string we have to wrap it into another function\n //it is not a plain executable code but a definition\n let sourceCode = trim(<string>func);\n if (sourceCode.indexOf(\"function \") == 0) {\n sourceCode = `return ${sourceCode} (event)`;\n }\n return new Function(\"event\", sourceCode).call(source, event) !== false;\n }\n }\n}\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Typescript port of the faces\\.push part in the myfaces implementation\n */\nimport {MAX_RECONNECT_ATTEMPTS, REASON_EXPIRED, RECONNECT_INTERVAL} from \"./core/Const\";\nimport {DQ} from \"mona-dish\";\n\n/**\n * Implementation class for the push functionality\n */\nexport module PushImpl {\n\n const URL_PROTOCOL = DQ.global().location.protocol.replace(\"http\", \"ws\") + \"//\";\n\n\n // we expose the member variables for testing purposes\n // they are not directly touched outside of tests\n\n /* socket map by token */\n export let sockets = {};\n /* component attributes by clientId */\n export let components = {};\n /* client ids by token (share websocket connection) */\n export let clientIdsByTokens = {};\n\n\n // needed for testing\n export function reset() {\n sockets = {};\n components = {}\n clientIdsByTokens = {}\n }\n\n /*\n * Api implementations, exposed functions\n */\n\n /**\n * @param socketClientId the sockets client identifier\n * @param url the uri to reach the socket\n * @param channel the channel name/id\n * @param onopen The function to be invoked when the web socket is opened.\n * @param onmessage The function to be invoked when a message is received.\n * @param onerror The function to be invoked when an error occurs.\n * @param onclose The function to be invoked when the web socket is closed.\n * @param behaviors functions which are invoked whenever a message is received\n * @param autoConnect Whether or not to automatically open the socket. Defaults to <code>false</code>.\n */\n export function init(socketClientId: string,\n url: string,\n channel: string,\n onopen: Function,\n onmessage: Function,\n onerror: Function,\n onclose: Function,\n behaviors: any,\n autoConnect: boolean) {\n onclose = resolveFunction(onclose);\n\n if (!DQ.global().WebSocket) { // IE6-9.\n onclose(-1, channel);\n return;\n }\n\n let channelToken = url.substr(url.indexOf('?') + 1);\n\n if (!components[socketClientId]) {\n components[socketClientId] = {\n 'channelToken': channelToken,\n 'onopen': resolveFunction(onopen),\n 'onmessage' : resolveFunction(onmessage),\n 'onerror' : resolveFunction(onerror),\n 'onclose': onclose,\n 'behaviors': behaviors,\n 'autoconnect': autoConnect};\n if (!clientIdsByTokens[channelToken]) {\n clientIdsByTokens[channelToken] = [];\n }\n clientIdsByTokens[channelToken].push(socketClientId);\n if (!sockets[channelToken]){\n sockets[channelToken] = new Socket(channelToken,\n getBaseURL(url), channel);\n }\n }\n\n if (autoConnect) {\n (DQ.global()?.faces ?? DQ.global()?.jsf).push.open(socketClientId);\n }\n }\n\n export function open(socketClientId: string) {\n getSocket(components[socketClientId]?.channelToken).open();\n }\n\n export function close(socketClientId: string) {\n getSocket(components[socketClientId].channelToken).close();\n }\n\n // Private helper classes\n // Private classes functions ----------------------------------------------------------------------------------\n /**\n * Creates a reconnecting web socket. When the web socket successfully connects on first attempt, then it will\n * automatically reconnect on timeout with cumulative intervals of 500ms with a maximum of 25 attempts (~3 minutes).\n * The <code>onclose</code> function will be called with the error code of the last attempt.\n * @constructor\n * @param {string} channelToken the channel token associated with this websocket connection\n * @param {string} url The URL of the web socket\n * @param {string} channel The name of the web socket channel.\n */\n\n class Socket {\n\n socket: WebSocket;\n reconnectAttempts = 0;\n\n constructor(private channelToken: string, private url: string, private channel: string) {\n }\n\n open() {\n if (this.socket && this.socket.readyState == 1) {\n return;\n }\n this.socket = new WebSocket(this.url);\n\n this.bindCallbacks();\n }\n\n // noinspection JSUnusedLocalSymbols\n onopen(event: any) {\n if (!this.reconnectAttempts) {\n let clientIds = clientIdsByTokens[this.channelToken];\n for (let i = clientIds.length - 1; i >= 0; i--) {\n let socketClientId = clientIds[i];\n components[socketClientId]?.['onopen']?.(this.channel);\n }\n }\n this.reconnectAttempts = 0;\n }\n\n onerror(event: any) {\n let message = JSON.parse(event?.data ?? null);\n //TODO replace this with a more readable Stream code\n for (let i = clientIdsByTokens[this.channelToken].length - 1; i >= 0; i--) {\n let socketClientId = clientIdsByTokens[this.channelToken][i];\n if (document.getElementById(socketClientId)) {\n try {\n components[socketClientId]?.['onerror']?.(message, this.channel, event);\n } catch (e) {\n //Ignore\n }\n } else {\n clientIdsByTokens[this.channelToken].splice(i, 1);\n }\n }\n if (clientIdsByTokens[this.channelToken].length == 0) {\n // tag disappeared\n this.close();\n }\n }\n\n onmmessage(event: any) {\n let message = JSON.parse(event.data);\n for (let i = clientIdsByTokens[this.channelToken].length - 1; i >= 0; i--) {\n let socketClientId = clientIdsByTokens[this.channelToken][i];\n if (document.getElementById(socketClientId)) {\n try {\n components[socketClientId]?.['onmessage']?.(message, this.channel, event);\n } catch (e) {\n //Ignore\n }\n let behaviors = components?.[socketClientId]?.['behaviors'];\n let functions = behaviors?.[message];\n if (functions && functions.length) {\n for (let j = 0; j < functions.length; j++) {\n try {\n functions[j](null);\n } catch (e) {\n //Ignore\n }\n }\n }\n } else {\n clientIdsByTokens[this.channelToken].splice(i, 1);\n }\n }\n if (clientIdsByTokens[this.channelToken].length == 0) {\n // tag disappeared\n this.close();\n }\n }\n\n onclose(event: any) {\n if (!this.socket\n || (event.code == 1000 && event.reason == REASON_EXPIRED)\n || (event.code == 1008)\n || (!this.reconnectAttempts)\n || (this.reconnectAttempts >= MAX_RECONNECT_ATTEMPTS)) {\n let clientIds = clientIdsByTokens[this.channelToken];\n for (let i = clientIds.length - 1; i >= 0; i--) {\n let socketClientId = clientIds[i];\n components?.[socketClientId]?.['onclose']?.(event?.code, this?.channel, event);\n }\n } else {\n setTimeout(this.open, RECONNECT_INTERVAL * this.reconnectAttempts++);\n }\n };\n\n close() {\n if (this.socket) {\n let s = this.socket;\n this.socket = null;\n s.close();\n }\n }\n\n /**\n * bind the callbacks to the socket callbacks\n */\n private bindCallbacks() {\n this.socket.onopen = (event: Event) => this.onopen(event);\n this.socket.onmessage = (event: Event) => this.onmmessage(event);\n this.socket.onclose = (event: Event) => this.onclose(event);\n this.socket.onerror = (event: Event) => this.onerror(event);\n }\n }\n\n // Private static functions ---------------------------------------------------------------------------------------\n\n function getBaseURL(url: string) {\n if (url.indexOf(\"://\") < 0) {\n let base = DQ.global().location.hostname + \":\" + DQ.global().location.port;\n return URL_PROTOCOL + base + url;\n } else {\n return url;\n }\n }\n\n /**\n * Get socket associated with given channelToken.\n * @param channelToken The name of the web socket channelToken.\n * @return Socket associated with given channelToken.\n * @throws Error, when the channelToken is unknown, you may need to initialize\n * it first via <code>init()</code> function.\n */\n function getSocket(channelToken: string): Socket {\n let socket = sockets[channelToken];\n if (socket) {\n return socket;\n } else {\n throw new Error(\"Unknown channelToken: \" + channelToken);\n }\n }\n\n function resolveFunction(fn: Function | string = () => {\n }): Function {\n return <Function>((typeof fn !== \"function\") && (fn = DQ.global()[fn]), fn);\n }\n\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * [export const] constants\n */\n\nexport const XML_ATTR_NAMED_VIEWROOT = \"namedViewRoot\";\nexport const NAMED_VIEWROOT = \"namedViewRoot\";\n\nexport const P_AJAX_SOURCE = \"jakarta.faces.source\";\nexport const NAMING_CONTAINER_ID = \"myfaces.NamingContainerId\";\n\nexport const VIEW_ID = \"myfaces.viewId\";\nexport const P_VIEWSTATE = \"jakarta.faces.ViewState\";\nexport const P_CLIENT_WINDOW = \"jakarta.faces.ClientWindow\";\nexport const P_VIEWROOT = \"jakarta.faces.ViewRoot\";\nexport const P_VIEWHEAD = \"jakarta.faces.ViewHead\";\nexport const P_VIEWBODY = \"jakarta.faces.ViewBody\";\n\nexport const P_RESOURCE = \"jakarta.faces.Resource\";\n\n/*some useful definitions*/\n\nexport const EMPTY_FUNC = Object.freeze(() => {\n});\nexport const EMPTY_STR = \"\";\nexport const EMPTY_MAP = Object.freeze({});\n\nexport const HTML_VIEWSTATE = [\"<input type='hidden'\", \"name='\", P_VIEWSTATE, \"' value='' />\"].join(EMPTY_STR);\nexport const HTML_CLIENT_WINDOW = [\"<input type='hidden'\", \"' name='\", P_CLIENT_WINDOW, \"' value='' />\"].join(EMPTY_STR);\n\n\n/*internal identifiers for options*/\nexport const IDENT_ALL = \"@all\";\nexport const IDENT_NONE = \"@none\";\nexport const IDENT_THIS = \"@this\";\nexport const IDENT_FORM = \"@form\";\n\n\nexport const P_AJAX = \"jakarta.faces.partial.ajax\";\nexport const P_EXECUTE = \"jakarta.faces.partial.execute\";\nexport const P_RENDER = \"jakarta.faces.partial.render\";\n/*render override for viewbody or viewroot, in both cases an all is performed*/\nexport const P_RENDER_OVERRIDE = \"_myfaces.rendeOverride\";\nexport const P_EVT = \"jakarta.faces.partial.event\";\n\nexport const P_RESET_VALUES = \"jakarta.faces.partial.resetValues\";\nexport const P_WINDOW_ID = \"jakarta.faces.windowId\";\n\nexport const P_BEHAVIOR_EVENT = \"jakarta.faces.behavior.event\";\n\nexport const CTX_PARAM_RENDER = \"render\";\nexport const WINDOW_ID = \"windowId\";\n\n/* message types */\nexport const ERROR = \"error\";\nexport const EVENT = \"event\";\n\nexport const ON_ERROR = \"onerror\";\nexport const ON_EVENT = \"onevent\";\n\n/* event emitting stages */\nexport const BEGIN = \"begin\";\nexport const COMPLETE = \"complete\";\nexport const SUCCESS = \"success\";\n\nexport const SOURCE = \"source\";\nexport const STATUS = \"status\";\n\n\nexport const ERROR_NAME = \"error-name\";\nexport const ERROR_MESSAGE = \"error-message\";\n\n\nexport const RESPONSE_TEXT = \"responseText\";\nexport const RESPONSE_XML = \"responseXML\";\n\n/*ajax errors spec 14.4.2*/\nexport const HTTP_ERROR = \"httpError\";\nexport const EMPTY_RESPONSE = \"emptyResponse\";\nexport const MALFORMEDXML = \"malformedXML\";\nexport const SERVER_ERROR = \"serverError\";\nexport const CLIENT_ERROR = \"clientError\";\nexport const TIMEOUT_EVENT = \"timeout\";\n\nexport const CTX_OPTIONS_PARAMS = \"params\";\nexport const CTX_OPTIONS_DELAY = \"delay\";\nexport const DELAY_NONE = 'none';\nexport const CTX_OPTIONS_TIMEOUT = \"timeout\";\nexport const CTX_OPTIONS_RESET = \"resetValues\";\nexport const CTX_OPTIONS_EXECUTE = \"execute\";\n\nexport const CTX_PARAM_MF_INTERNAL = \"myfaces.internal\";\nexport const CTX_PARAM_SRC_FRM_ID = \"myfaces.source.formId\";\nexport const CTX_PARAM_UPLOAD_ON_PROGRESS = \"myfaces.upload.progress\";\nexport const CTX_PARAM_UPLOAD_PREINIT = \"myfaces.upload.preinit\";\nexport const CTX_PARAM_UPLOAD_LOADSTART = \"myfaces.upload.loadstart\";\nexport const CTX_PARAM_UPLOAD_LOADEND = \"myfaces.upload.loadend\";\nexport const CTX_PARAM_UPLOAD_LOAD = \"myfaces.upload.load\";\nexport const CTX_PARAM_UPLOAD_ERROR = \"myfaces.upload.error\";\nexport const CTX_PARAM_UPLOAD_ABORT = \"myfaces.upload.abort\";\nexport const CTX_PARAM_UPLOAD_TIMEOUT = \"myfaces.upload.timeout\";\nexport const CTX_PARAM_SRC_CTL_ID = \"myfaces.source.controlId\";\nexport const CTX_PARAM_REQ_PASS_THR = \"myfaces.request.passThrough\";\nexport const CTX_PARAM_PPS = \"myfaces.request.pps\";\n\nexport const CONTENT_TYPE = \"Content-Type\";\nexport const HEAD_FACES_REQ = \"Faces-Request\";\nexport const REQ_ACCEPT = \"Accept\";\nexport const VAL_AJAX = \"partial/ajax\";\nexport const ENCODED_URL = \"jakarta.faces.encodedURL\";\nexport const REQ_TYPE_GET = \"GET\";\nexport const REQ_TYPE_POST = \"POST\";\nexport const STATE_EVT_BEGIN = \"begin\"; //TODO remove this\nexport const STATE_EVT_TIMEOUT = \"TIMEOUT_EVENT\";\nexport const STATE_EVT_COMPLETE = \"complete\"; //TODO remove this\nexport const URL_ENCODED = \"application/x-www-form-urlencoded\";\nexport const MULTIPART = \"multipart/form-data\";\nexport const NO_TIMEOUT = 0;\nexport const STD_ACCEPT = \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\";\n\nexport const HTML_TAG_HEAD = \"HEAD\";\nexport const HTML_TAG_FORM = \"FORM\";\nexport const HTML_TAG_BODY = \"BODY\";\nexport const HTML_TAG_LINK = \"LINK\";\nexport const HTML_TAG_SCRIPT = \"SCRIPT\";\nexport const HTML_TAG_STYLE = \"STYLE\";\n\n\nexport const SEL_VIEWSTATE_ELEM = \"[name='\" + P_VIEWSTATE + \"']\";\nexport const SEL_CLIENT_WINDOW_ELEM = \"[name='\" + P_CLIENT_WINDOW + \"']\";\nexport const SEL_RESPONSE_XML = \"responseXML\";\n\nexport const PHASE_PROCESS_RESPONSE = \"processResponse\";\n\n\nexport const ERR_NO_PARTIAL_RESPONSE = \"Partial response not set\";\n\nexport const MYFACES_OPTION_PPS = \"pps\";\n\nexport const ATTR_URL = \"url\";\nexport const ATTR_NAME = \"name\";\nexport const ATTR_VALUE = \"value\";\nexport const ATTR_ID = \"id\";\n\n/*partial response types*/\nexport const XML_TAG_PARTIAL_RESP = \"partial-response\";\n\n/*partial commands*/\nexport const XML_TAG_CHANGES = \"changes\";\nexport const XML_TAG_UPDATE = \"update\";\nexport const XML_TAG_DELETE = \"delete\";\nexport const XML_TAG_INSERT = \"insert\";\nexport const XML_TAG_EVAL = \"eval\";\nexport const XML_TAG_ERROR = \"error\";\nexport const XML_TAG_ATTRIBUTES = \"attributes\";\nexport const XML_TAG_EXTENSION = \"extension\";\nexport const XML_TAG_REDIRECT = \"redirect\";\nexport const XML_TAG_BEFORE = \"before\";\nexport const XML_TAG_AFTER = \"after\";\nexport const XML_TAG_ATTR = \"attribute\";\n\n\n/*other constants*/\n\nexport const UPDATE_FORMS = \"myfaces.updateForms\";\nexport const UPDATE_ELEMS = \"myfaces.updateElems\";\n\n//we want the head elements to be processed before we process the body\n//but after the inner html is done\nexport const DEFERRED_HEAD_INSERTS = \"myfaces.headElems\";\n\nexport const MYFACES = \"myfaces\";\n\nexport const MF_NONE = \"__mf_none__\";\n\nexport const REASON_EXPIRED = \"Expired\";\n\nexport const APPLIED_VST = \"myfaces.appliedViewState\";\nexport const APPLIED_CLIENT_WINDOW = \"myfaces.appliedClientWindow\";\n\nexport const RECONNECT_INTERVAL = 500;\nexport const MAX_RECONNECT_ATTEMPTS = 25;\n\nexport const UNKNOWN = \"UNKNOWN\";\n\n/**\n * helper to remap the namespaces variables for 2.3\n * from 2.3 to 4.0 every javax namespace has been changed\n * to faces\n * To take the compatibility layer out this method just has to be\n * changed to a simple value passthrough\n */\n\nexport function $faces(): FacesAPI {\n return (window?.faces ?? window?.jsf) as FacesAPI;\n}\n\nexport function $nsp(inputNamespace?: any): any {\n if((!inputNamespace) || !inputNamespace?.replace) {\n return inputNamespace;\n }\n return (!!window?.faces) ? inputNamespace.replace(/javax\\.faces/gi,\"jakarta.faces\"): inputNamespace.replace(/jakarta\\.faces/gi, \"javax.faces\");\n}\n\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {EMPTY_STR, P_VIEWSTATE} from \"./Const\";\n\nexport interface IdValueHolder {\n\n readonly id: string;\n readonly value: string;\n\n}\n\n/**\n * a helper class to isolate the\n * view state and client window and other\n * future states which follow a similar pattern\n */\nexport class StateHolder implements IdValueHolder {\n\n nameSpace: string;\n\n constructor(public id: string, public value: string) {\n let viewStatePos = id.indexOf(P_VIEWSTATE);\n this.nameSpace = viewStatePos > 0 ? id.substr(0, viewStatePos - 1) : EMPTY_STR;\n }\n\n get hasNameSpace(): boolean {\n return !!(this?.nameSpace ?? EMPTY_STR).length;\n }\n}\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class Messages {\n MSG_TEST = \"Testmessage\";\n\n /*Messages*/\n /** @constant */\n MSG_DEV_MODE = \"Note, this message is only sent, because project stage is development and no \" +\n \"other error listeners are registered.\";\n /** @constant */\n MSG_AFFECTED_CLASS = \"Affected Class=\";\n /** @constant */\n MSG_AFFECTED_METHOD = \"Affected Method=\";\n /** @constant */\n MSG_ERROR_NAME = \"Error Name=\";\n /** @constant */\n MSG_ERROR_MESSAGE = \"Error Message=\";\n /** @constant */\n MSG_SERVER_ERROR_NAME = \"Server Error Name=\";\n\n /** @constant */\n MSG_ERROR_DESC = \"Error Description=\";\n /** @constant */\n MSG_ERROR_NO = \"Error Number=\";\n /** @constant */\n MSG_ERROR_LINENO = \"Error Line Number=\";\n\n /*Errors and messages*/\n /** @constant */\n ERR_FORM = \"Sourceform could not be determined, either because element is not attached to a form or we have multiple forms with named elements of the same identifier or name, stopping the ajax processing\";\n /** @constant */\n ERR_VIEWSTATE = \"faces.viewState= param value not of type form!\";\n /** @constant */\n ERR_TRANSPORT = \"Transport type {0} does not exist\";\n /** @constant */\n ERR_EVT_PASS = \"an event must be passed down (either a an event object null or undefined) \";\n /** @constant */\n ERR_CONSTRUCT = \"Parts of the response couldn't be retrieved when constructing the event data= {0} \";\n /** @constant */\n ERR_MALFORMEDXML = \"The server response could not be parsed, the server has returned with a response which is not xml !\";\n /** @constant */\n ERR_SOURCE_FUNC = \"source cannot be a function (probably source and event were not defined or set to null\";\n /** @constant */\n ERR_EV_OR_UNKNOWN = \"An event object or unknown must be passed as second parameter\";\n /** @constant */\n ERR_SOURCE_NOSTR = \"source cannot be a string\";\n /** @constant */\n ERR_SOURCE_DEF_NULL = \"source must be defined or null\";\n\n //_Lang.js\n /** @constant */\n ERR_MUST_STRING = \"{0}: {1} namespace must be of type String\";\n /** @constant */\n ERR_REF_OR_ID = \"{0}: {1} a reference node or identifier must be provided\";\n /** @constant */\n ERR_PARAM_GENERIC = \"{0}: parameter {1} must be of type {2}\";\n /** @constant */\n ERR_PARAM_STR = \"{0}: {1} param must be of type string\";\n /** @constant */\n ERR_PARAM_STR_RE = \"{0}: {1} param must be of type string or a regular expression\";\n /** @constant */\n ERR_PARAM_MIXMAPS = \"{0}: both a source as well as a destination map must be provided\";\n /** @constant */\n ERR_MUST_BE_PROVIDED = \"{0}: an {1} and a {2} must be provided\";\n /** @constant */\n ERR_MUST_BE_PROVIDED1 = \"{0}: {1} must be set\";\n\n /** @constant */\n ERR_REPLACE_EL = \"replaceElements called while evalNodes is not an array\";\n\n /** @constant */\n ERR_EMPTY_RESPONSE = \"{0}: The response cannot be null or empty!\";\n /** @constant */\n ERR_ITEM_ID_NOTFOUND = \"{0}: item with identifier {1} could not be found\";\n /** @constant */\n ERR_PPR_IDREQ = \"{0}: Error in PPR Insert, id must be present\";\n /** @constant */\n ERR_PPR_INSERTBEFID = \"{0}: Error in PPR Insert, before id or after id must be present\";\n /** @constant */\n ERR_PPR_INSERTBEFID_1 = \"{0}: Error in PPR Insert, before node of id {1} does not exist in document\";\n /** @constant */\n ERR_PPR_INSERTBEFID_2 = \"{0}: Error in PPR Insert, after node of id {1} does not exist in document\";\n\n /** @constant */\n ERR_PPR_DELID = \"{0}: Error in delete, id not in xml markup\";\n /** @constant */\n ERR_PPR_UNKNOWNCID = \"{0}: Unknown Html-Component-ID= {1}\";\n\n /** @constant */\n ERR_NO_VIEWROOTATTR = \"{0}: Changing of ViewRoot attributes is not supported\";\n /** @constant */\n ERR_NO_HEADATTR = \"{0}: Changing of Head attributes is not supported\";\n /** @constant */\n ERR_RED_URL = \"{0}: Redirect without url\";\n\n /** @constant */\n ERR_REQ_FAILED_UNKNOWN = \"Request failed with unknown status\";\n\n /** @constant */\n ERR_REQU_FAILED = \"Request failed with status {0} and reason {1}\";\n\n /** @constant */\n UNKNOWN = \"UNKNOWN\";\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {Config, Lang, XMLQuery} from \"mona-dish\";\n\nimport {DQ} from \"mona-dish\";\nimport {\n ATTR_URL,\n EMPTY_RESPONSE,\n EMPTY_STR, ERR_NO_PARTIAL_RESPONSE, MALFORMEDXML,\n ON_ERROR,\n ON_EVENT,\n PHASE_PROCESS_RESPONSE,\n XML_TAG_PARTIAL_RESP\n} from \"../core/Const\";\nimport {ExtLang} from \"./Lang\";\n\n\n/**\n * a set of internal code assertions\n * which raise an error\n *\n */\nexport module Assertions {\n\n\n\n export function assertRequestIntegrity(options: Config, elem: DQ): void | never {\n /*assert if the onerror is set and once if it is set it must be of type function*/\n assertFunction(options.getIf(ON_ERROR).value);\n /*assert if the onevent is set and once if it is set it must be of type function*/\n assertFunction(options.getIf(ON_EVENT).value);\n //improve the error messages if an empty elem is passed\n //Assertions.assertElementExists(elem);\n assert(elem.isPresent(), ExtLang.getMessage(\"ERR_MUST_BE_PROVIDED1\", \"{0}: source must be provided or exist\", \"source element id\"), \"faces.ajax.request\", \"ArgNotSet\", )\n }\n\n export function assertUrlExists(node: XMLQuery): void | never {\n if (node.attr(ATTR_URL).isAbsent()) {\n throw Assertions.raiseError(new Error(), ExtLang.getMessage(\"ERR_RED_URL\", null, \"processRedirect\"), \"processRedirect\");\n }\n }\n\n /**\n * checks the xml for various issues which can occur\n * and prevent a proper processing\n */\n export function assertValidXMLResponse(responseXML: XMLQuery) : void | never {\n assert(!responseXML.isAbsent(), EMPTY_RESPONSE, PHASE_PROCESS_RESPONSE);\n assert(!responseXML.isXMLParserError(), responseXML.parserErrorText(EMPTY_STR), PHASE_PROCESS_RESPONSE);\n assert(responseXML.querySelectorAll(XML_TAG_PARTIAL_RESP).isPresent(), ERR_NO_PARTIAL_RESPONSE, PHASE_PROCESS_RESPONSE);\n }\n\n /**\n * internal helper which raises an error in the\n * format we need for further processing\n *\n * @param error\n * @param message the message\n * @param caller\n * @param title the title of the error (optional)\n * @param name the name of the error (optional)\n */\n export function raiseError(error: any, message: string, caller ?: string, title ?: string, name ?: string): Error {\n\n let finalTitle = title ?? MALFORMEDXML;\n let finalName = name ?? MALFORMEDXML;\n let finalMessage = message ?? EMPTY_STR;\n\n //TODO clean up the messy makeException, this is a perfect case for encapsulation and sane defaults\n return ExtLang.makeException(error, finalTitle, finalName, \"Response\", caller || (((<any>arguments).caller) ? (<any>arguments).caller.toString() : \"_raiseError\"), finalMessage);\n }\n\n /*\n * using the new typescript 3.7 compiler assertion functionality to improve compiler hinting\n * we are not fully there yet, but soon\n */\n\n export function assert(value: any, msg = EMPTY_STR, caller=EMPTY_STR, title=\"Assertion Error\"): asserts value {\n if(!value) {\n throw Assertions.raiseError(new Error(), msg ,caller, title);\n }\n }\n\n\n export function assertType(value: any, theType: any, msg = EMPTY_STR, caller=EMPTY_STR, title=\"Type Assertion Error\"): asserts value {\n if((!!value) && !Lang.assertType(value,theType)) {\n throw Assertions.raiseError(new Error(), msg ,caller, title);\n }\n }\n\n export function assertFunction(value: any, msg = EMPTY_STR, caller=EMPTY_STR, title=\"Assertion Error\"): asserts value is Function {\n assertType(value, \"function\", msg, caller, title);\n }\n\n export function assertDelay(value: any) {\n if(!(value >= 0)) { // >= 0 abbreviation which covers all cases of non positive values,\n // including NaN and non numeric strings, no type equality is deliberate here,\n throw new Error(\"Invalid delay value: \" + value);\n }\n }\n}\n\n\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Asynchronous queue member for our asynchronous queue\n * Ever object in the asynchronous queue needs to implement this interface\n *\n * the usage should be similar as Promise. from the outside.\n * but with a dedicated start point. The problem why we cannot use\n * promises here, is mostly related to the needed cancel functionality\n * and that the queue expects a runnable as entry.\n *\n * from the implementation side it is mostly registering callbacks\n * and calling them at the appropriate time.\n */\nexport interface IAsyncRunnable<T> {\n /**\n * starts the runnable\n */\n start();\n\n /**\n * cancel the current ongoing op if possible\n */\n cancel();\n\n /**\n * callback for then functionality\n * triggered when the async run is complete\n *\n * the async runnable must register the passed function\n * and then triggers all the registered then functions\n * when it is complete\n *\n * @param func the then functor\n */\n then(func: (data: any) => any): IAsyncRunnable<T>;\n\n /**\n * callback for catch functionality\n * triggered when the async run is complete\n *\n * the async runnable must register the passed function\n * and then triggers all the registered catch handlers\n * when an error has occurred\n *\n * @param func\n */\n catch(func: (data: any) => any): IAsyncRunnable<T>;\n\n\n /**\n * finally called when all then and catches are performed\n * same this is a register function\n * and once the finally time for the promise has\n * come the finally functions must be performed\n */\n finally(func: () => void): IAsyncRunnable<T>;\n}\n\n\n/**\n * pretty much the same as cancellable Promise, but given\n * we do not have that on browser level yet this is sort\n * of a non - intrusive Shim!\n */\nexport abstract class AsyncRunnable<T> implements IAsyncRunnable<T>{\n /**\n * helper support so that we do not have to drag in Promise shims\n */\n private catchFunctions: Array<Function> = [];\n private thenFunctions: Array<Function> = [];\n\n /**\n * cancel the run of the runnable (which then depending on the implementation\n * either triggers indirectly resolve or reject)\n */\n abstract cancel(): void;\n\n /**\n * extended functionality start to trigger the runnable\n */\n abstract start(): void;\n\n /**\n * resolve handler function which calls the then chain\n * and after that finally\n * @param data\n */\n resolve(data: any) {\n this.thenFunctions.reduce((inputVal: any, thenFunc: any) => {\n return thenFunc(inputVal);\n }, data)\n }\n\n /**\n * reject handler function which triggers the catch chain\n * @param data\n */\n reject(data: any) {\n this.catchFunctions.reduce((inputVal: any, catchFunc: any) => {\n return catchFunc(inputVal);\n }, data);\n }\n\n /**\n * register a catch functor\n * @param func the functor for the catch monad\n */\n catch(func: (data: any) => any): IAsyncRunnable<T> {\n this.catchFunctions.push(func);\n return this;\n }\n\n /**\n * registers a finally functor\n * @param func the functor for the finally handling chanin\n */\n finally(func: () => void): IAsyncRunnable<T> {\n // no ie11 support we probably are going to revert to shims for that one\n this.catchFunctions.push(func);\n this.thenFunctions.push(func);\n return this;\n }\n\n /**\n * @param func then functor similar to promise\n */\n then(func: (data: any) => any): IAsyncRunnable<T> {\n this.thenFunctions.push(func);\n return this;\n }\n}\n\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {Config, IValueHolder, Optional, DomQuery, DQ, Es2019Array, ValueEmbedder} from \"mona-dish\";\nimport {$faces, $nsp, P_WINDOW_ID} from \"../core/Const\";\n\n\n/**\n * detects whether a source is a faces.js request\n *\n * @param source the source string for the faces.js request\n * @return true if a faces.js loading pattern is detected\n * @constructor\n */\nconst IS_FACES_SOURCE = (source?: string): boolean => {\n //spec version smaller 4 we have to deal with the jsf namespace\n\n return source && !!(source?.search(/\\/jakarta\\.faces\\.resource.*\\/faces\\.js.*/) != -1 ||\n source?.search(/\\/faces-development\\.js.*/) != -1 ||\n source?.search(/\\/faces-uncompressed\\.js.*/) != -1 ||\n source?.search(/\\/faces[^.]*\\.js.*ln=jakarta.faces.*/gi) != -1 ||\n //fallback without check for jsf, that way we allow both bookmarks\n source?.search(/\\/javax\\.faces\\.resource.*\\/jsf\\.js.*/) != -1 ||\n source?.search(/\\/jsf-development\\.js.*/) != -1 ||\n source?.search(/\\/jsf-uncompressed\\.js.*/) != -1 ||\n source?.search(/\\/jsf[^.]*\\.js.*ln=javax.faces.*/gi) != -1);\n}\n\n/**\n * namespace myfaces\\.testscripts can be used as extension point for internal\n * tests, those will be handled similarly to faces.js, in regard\n * to reload blocking on ajax requests\n *\n * Note: atm not used, used to be used in the old implementation\n * but still is reserved for now\n *\n * @param source the source to check\n * @constructor\n */\nconst IS_INTERNAL_SOURCE = (source: string): boolean => {\n return source.search(/\\/faces[^.]*\\.js.*ln=myfaces.testscripts.*/gi) != -1 || source.search(/\\/jsf[^.]*\\.js.*ln=myfaces.testscripts.*/gi) != -1;\n}\n\n\nconst ATTR_SRC = 'src';\n\n/**\n * Extension which adds implementation specific\n * meta-data to our dom query\n *\n * Usage\n * el = new ExtDQ(oldReference)\n * nonce = el.nonce\n * windowId = el.getWindowId\n */\nexport class ExtDomQuery extends DQ {\n\n static get windowId(): Optional<string> {\n return new ExtDomQuery(document.body).windowId;\n }\n\n static get nonce(): Optional<string> {\n return new ExtDomQuery(document.body).nonce;\n }\n\n get windowId(): Optional<string> {\n\n const fetchWindowIdFromURL = function (): string | null {\n let href = window.location.href;\n let windowId = \"windowId\";\n let regex = new RegExp(\"[\\\\?&]\" + windowId + \"=([^&#\\\\;]*)\");\n let results = regex.exec(href);\n //initial trial over the url and a regexp\n if (results != null) return results[1];\n return null;\n };\n\n //byId ($)\n if (this.value.isPresent()) {\n let result = this.querySelectorAll(\"form input[name='\" + P_WINDOW_ID + \"']\");\n if (result.length > 1) {\n throw Error(\"Multiple different windowIds found in document\");\n }\n\n return Optional.fromNullable((result.isPresent()) ? (<HTMLInputElement>result.getAsElem(0).value).value : fetchWindowIdFromURL());\n } else {\n return Optional.fromNullable(fetchWindowIdFromURL());\n }\n }\n\n /*\n * determines the faces.js nonce and adds them to the namespace\n * this is done once and only lazily\n */\n get nonce(): ValueEmbedder<string> {\n //already processed\n let myfacesConfig = new ExtConfig(window.myfaces);\n let globalNonce: IValueHolder<string> = myfacesConfig.getIf(\"config\", \"cspMeta\", \"nonce\");\n if (!!globalNonce.value) {\n return ValueEmbedder.fromNullable(globalNonce);\n }\n\n let curScript = new DQ(document.currentScript);\n //since our baseline atm is ie11 we cannot use document.currentScript globally\n let nonce = curScript.nonce;\n if (nonce.isPresent()) {\n // fast-path for modern browsers\n return ValueEmbedder.fromNullable(nonce);\n }\n // fallback if the currentScript method fails, we just search the jsf tags for nonce, this is\n // the last possibility\n let nonceScript: Optional<DomQuery> = Optional.fromNullable(DQ\n .querySelectorAll(\"script[src], link[src]\").asArray\n .filter((item) => item.nonce.isPresent() && item.attr(ATTR_SRC) != null)\n .filter(item => IS_FACES_SOURCE(item.attr(ATTR_SRC).value))?.[0]);\n if(!nonceScript?.value) {\n return ValueEmbedder.absent as ValueEmbedder<string>;\n }\n\n return new DomQuery(nonceScript.value).nonce;\n }\n\n static searchJsfJsFor(item: RegExp): Optional<String> {\n return new ExtDomQuery(document).searchJsfJsFor(item);\n }\n\n /**\n * searches the embedded faces.js for items like separator char etc.\n * expects a match as variable under position 1 in the result match\n * @param regExp\n */\n searchJsfJsFor(regExp: RegExp): Optional<string> {\n //perfect application for lazy stream\n return Optional.fromNullable(DQ.querySelectorAll(\"script[src], link[src]\").asArray\n .filter(item => IS_FACES_SOURCE(item.attr(ATTR_SRC).value))\n .map(item => item.attr(ATTR_SRC).value.match(regExp))\n .filter(item => item != null && item.length > 1)\n .map((result: string[]) => {\n return decodeURIComponent(result[1]);\n })?.[0]);\n }\n\n globalEval(code: string, nonce ?: string): DQ {\n return new ExtDomQuery(super.globalEval(code, nonce ?? this.nonce.value));\n }\n\n // called from base class runScripts, do not delete\n // noinspection JSUnusedGlobalSymbols\n globalEvalSticky(code: string, nonce ?: string): DQ {\n return new ExtDomQuery(super.globalEvalSticky(code, nonce ?? this.nonce.value));\n }\n\n /**\n * decorated run scripts which takes our jsf extensions into consideration\n * (standard DomQuery will let you pass anything)\n * @param sticky if set to true the internally generated element for the script is left in the dom\n * @param whiteListed\n */\n runScripts(sticky = false, whiteListed?: (src: string) => boolean): DomQuery {\n const whitelistFunc = (src: string): boolean => {\n return (whiteListed?.(src) ?? true) && !IS_FACES_SOURCE(src) && !IS_INTERNAL_SOURCE(src);\n };\n return super.runScripts(sticky, whitelistFunc);\n }\n\n /**\n * adds the elements in this ExtDomQuery to the head\n *\n * @param suppressDoubleIncludes checks for existing elements in the head before running the insert\n */\n runHeadInserts(suppressDoubleIncludes = true): void {\n let head = ExtDomQuery.byId(document.head);\n //automated nonce handling\n let processedScripts = [];\n\n // the idea is only to run head inserts on resources\n // which do not exist already, that way\n // we can avoid double includes on subsequent resource\n // requests.\n function resourceIsNew(element: DomQuery) {\n if(!suppressDoubleIncludes) {\n return true;\n }\n const tagName = element.tagName.value;\n if(!tagName) {\n // text node they do not have tag names, so we can process them as they are without\n // any further ado\n return true;\n }\n let reference = element.attr(\"href\")\n .orElseLazy(() => element.attr(\"src\").value)\n .orElseLazy(() => element.attr(\"rel\").value);\n\n if (!reference.isPresent()) {\n return true;\n }\n return !head.querySelectorAll(`${tagName}[href='${reference.value}']`).length &&\n !head.querySelectorAll(`${tagName}[src='${reference.value}']`).length &&\n !head.querySelectorAll(`${tagName}[rel='${reference.value}']`).length;\n }\n\n this\n .filter(resourceIsNew)\n .each(element => {\n if(element.tagName.value != \"SCRIPT\") {\n //we need to run runScripts properly to deal with the rest\n new ExtDomQuery(...processedScripts).runScripts(true);\n processedScripts = [];\n head.append(element);\n } else {\n processedScripts.push(element);\n }\n });\n new ExtDomQuery(...processedScripts).runScripts(true);\n }\n\n\n /**\n * byId producer\n *\n * @param selector id\n * @param deep whether the search should go into embedded shadow dom elements\n * @return a DomQuery containing the found elements\n */\n static byId(selector: DomQuery | Element | string, deep = false): ExtDomQuery {\n const ret = DomQuery.byId(selector, deep);\n if($faces().getProjectStage().toLowerCase() == \"development\" &&\n window?.console && ret.isAbsent() && selector) {\n let identifier = (<DomQuery>selector)?.id?.value ?? (<Element>selector)?.id ?? selector.toString();\n console.error(\"Element \" + identifier + \"not found\");\n }\n return new ExtDomQuery(ret);\n }\n\n\n filter(func: (item: DomQuery) => boolean): ExtDomQuery {\n return new ExtDomQuery(super.filter(func));\n }\n}\n\nexport const ExtDQ = ExtDomQuery;\n\n/**\n * in order to reduce the number of interception points for the fallbacks we add\n * the namespace remapping straight to our config accessors\n */\nexport class ExtConfig extends Config {\n\n $nspEnabled = true;\n\n constructor(root: any) {\n super(root);\n }\n\n assignIf(condition: boolean, ...accessPath): IValueHolder<any> {\n const accessPathMapped = this.remap(accessPath);\n return super.assignIf(condition, ...accessPathMapped);\n }\n\n assign(...accessPath): IValueHolder<any> {\n const accessPathMapped = this.remap(accessPath);\n return super.assign(...accessPathMapped);\n }\n\n append(...accessPath): IValueHolder<any> {\n return super.append(...accessPath);\n }\n\n appendIf(condition: boolean, ...accessPath): IValueHolder<any> {\n const accessPathMapped = this.remap(accessPath);\n return super.appendIf(condition, ...accessPathMapped);\n }\n\n getIf(...accessPath): Config {\n const accessPathMapped = this.remap(accessPath);\n return super.getIf(...accessPathMapped);\n }\n\n get(defaultVal: any): Config {\n return super.get($nsp(defaultVal));\n }\n\n delete(key: string): Config {\n return super.delete($nsp(key));\n }\n\n /**\n * creates a config from an initial value or null\n * @param value\n */\n static fromNullable<T>(value?: T | null): Config {\n return new ExtConfig(value);\n }\n\n protected getClass(): any {\n return ExtConfig;\n }\n\n /**\n * shallow copy getter, copies only the first level, references the deeper nodes\n * in a shared manner\n */\n protected shallowCopy$(): Config {\n const ret = super.shallowCopy$();\n return new ExtConfig(ret);\n }\n\n /**\n * deep copy, copies all config nodes\n */\n get deepCopy(): Config {\n return new ExtConfig(super.deepCopy$());\n }\n\n /**\n * helper to remap the namespaces of an array of access paths\n * @param accessPath the access paths to be remapped\n * @private returns an array of access paths with version remapped namespaces\n */\n private remap(accessPath: string[]): string[] {\n if(!this.$nspEnabled) {\n return accessPath;\n }\n return new Es2019Array(...accessPath).map(key => $nsp(key));\n }\n}","import {Config, DomQuery, DQ, Es2019Array} from \"mona-dish\";\nimport {ExtDomQuery} from \"./ExtDomQuery\";\nimport {$faces, EMPTY_STR} from \"../core/Const\";\n\n/*\n * various routines for encoding and decoding url parameters\n * into configs and vice versa\n */\n\n\n/**\n * encodes a given form data into a url encoded string\n * @param formData the form data config object\n * @param paramsMapper the params mapper\n * @param defaultStr a default string if nothing comes out of it\n */\nexport function encodeFormData(formData: Config,\n paramsMapper = (inStr, inVal) => [inStr, inVal],\n defaultStr = EMPTY_STR): string {\n if (formData.isAbsent()) {\n return defaultStr;\n }\n const assocValues = formData.value;\n\n const expandValueArrAndRename = key => assocValues[key].map(val => paramsMapper(key, val));\n const isPropertyKey = key => assocValues.hasOwnProperty(key);\n const isNotFile = ([, value]) => !(value instanceof ExtDomQuery.global().File);\n const mapIntoUrlParam = keyVal => `${encodeURIComponent(keyVal[0])}=${encodeURIComponent(keyVal[1])}`;\n\n return new Es2019Array(...Object.keys(assocValues))\n .filter(isPropertyKey)\n .flatMap(expandValueArrAndRename)\n .filter(isNotFile)\n .map(mapIntoUrlParam)\n .join(\"&\");\n}\n\n/**\n * splits and decodes encoded values into strings containing of key=value\n * @param encoded encoded string\n */\nexport function decodeEncodedValues(encoded: string): string[][] {\n const filterBlanks = item => !!(item || '').replace(/\\s+/g, '');\n const splitKeyValuePair = _line => {\n let line = decodeURIComponent(_line);\n let index = line.indexOf(\"=\");\n if (index == -1) {\n return [line];\n }\n return [line.substring(0, index), line.substring(index + 1)];\n };\n\n let requestParamEntries = encoded.split(/&/gi);\n return requestParamEntries.filter(filterBlanks).map(splitKeyValuePair);\n}\n\n\n/**\n * gets all the input files and their corresponding file objects\n * @param dataSource\n */\nexport function resolveFiles(dataSource: DQ): [string, File][] {\n\n const expandFilesArr = ([key, files]) => {\n return [...files].map(file => [key, file]);\n }\n const remapFileInput = fileInput => {\n return [fileInput.name.value || fileInput.id.value, fileInput.filesFromElem(0)];\n }\n\n const files = dataSource\n .querySelectorAllDeep(\"input[type='file']\")\n .asArray;\n\n const ret = files\n .map(remapFileInput)\n .flatMap(expandFilesArr);\n\n return ret as any;\n}\n\n\nexport function fixEmptyParameters(keyVal: any[]): [string, any] {\n return (keyVal.length < 3 ? [keyVal?.[0] ?? [], keyVal?.[1] ?? []] : keyVal) as [string, any];\n}\n\n/**\n * returns the decoded viewState from parentItem\n * @param parentItem\n */\nfunction resolveViewState(parentItem: DomQuery): string[][] | [string, File][] {\n const viewStateStr = $faces().getViewState(parentItem.getAsElem(0).value);\n\n // we now need to decode it and then merge it into the target buf\n // which hosts already our overrides (aka do not override what is already there(\n // after that we need to deal with form elements on a separate level\n return decodeEncodedValues(viewStateStr);\n}\n\n/**\n * gets all the inputs under the form parentItem\n * as array\n * @param parentItem\n */\nexport function getFormInputsAsArr(parentItem: DomQuery): string[][] | [string, File][] {\n const standardInputs: any = resolveViewState(parentItem);\n const fileInputs = resolveFiles(parentItem);\n return standardInputs.concat(fileInputs)\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport {DomQuery, DQ, DQ$} from \"mona-dish\";\nimport {$faces, $nsp, HTML_CLIENT_WINDOW, HTML_VIEWSTATE, P_CLIENT_WINDOW, P_VIEWSTATE} from \"../core/Const\";\n\n/**\n * Builder for hidden inputs.\n * ATM only ViewState and Client window\n * are supported (per spec)\n *\n * Improves readability in the response processor!\n */\nexport class HiddenInputBuilder {\n private namingContainerId?: string;\n private parent?: DomQuery;\n private namedViewRoot: boolean = false;\n private readonly name: string;\n private readonly template: string;\n\n constructor(private selector: string) {\n const isViewState = selector.indexOf($nsp(P_VIEWSTATE)) != -1;\n this.name = isViewState ? P_VIEWSTATE : P_CLIENT_WINDOW\n this.template = isViewState ? HTML_VIEWSTATE : HTML_CLIENT_WINDOW\n }\n\n withNamingContainerId(namingContainer: string): HiddenInputBuilder {\n this.namingContainerId = namingContainer;\n return this;\n }\n\n withParent(parent: DomQuery): HiddenInputBuilder {\n this.parent = parent;\n return this;\n }\n\n withNamedViewRoot(namedViewRoot: boolean): HiddenInputBuilder {\n this.namedViewRoot = namedViewRoot;\n return this;\n }\n\n\n build(): DomQuery {\n const SEP = $faces().separatorchar;\n\n let existingStates = DQ$(`[name*='${$nsp(this.name)}']`);\n let cnt = existingStates.asArray.map(state => {\n let ident: string = state.id.orElse(\"0\").value;\n ident = ident.substring(ident.lastIndexOf(SEP)+1);\n return parseInt(ident);\n })\n .filter(item => {\n return !isNaN(item);\n })\n .reduce((item1, item2) => {\n return Math.max(item1, item2);\n }, 0); //we start with 1 (see cnt++)\n //the maximum new ident is the current max + 1\n cnt++;\n\n\n const newElement = DQ.fromMarkup($nsp(this.template));\n newElement.id.value = ((this.namingContainerId?.length) ?\n [this.namingContainerId, $nsp(this.name), cnt]:\n [$nsp(this.name), cnt]).join(SEP);\n\n //name must be prefixed with the naming container id as well according to the jsdocs\n if(this.namedViewRoot) {\n newElement.name.value = (this.namingContainerId?.length) ?\n [this.namingContainerId, $nsp(this.name)].join(SEP): $nsp(this.name);\n } else {\n newElement.name.value = $nsp(this.name);\n }\n\n\n this?.parent?.append(newElement);\n return newElement;\n }\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport {Lang as LangBase, Config, Optional, DomQuery, DQ} from \"mona-dish\";\nimport {Messages} from \"../i18n/Messages\";\nimport {EMPTY_STR, HTML_TAG_FORM} from \"../core/Const\";\nimport {getEventTarget} from \"../xhrCore/RequestDataResolver\";\nimport {Es2019Array} from \"mona-dish\";\n\n\nexport module ExtLang {\n\n let installedLocale: Messages;\n let nameSpace = \"impl/util/Lang/\";\n\n export function getLanguage(): string {\n //TODO global config override\n\n let language: string = (<any>navigator).languages?.[0] ?? navigator?.language;\n language = language.split(\"-\")[0];\n return language;\n }\n\n //should be in lang, but for now here to avoid recursive imports, not sure if typescript still has a problem with those\n /**\n * helper function to safely resolve anything\n * this is not an elvis operator, it resolves\n * a value without exception in a tree and if\n * it is not resolvable then an optional of\n * a default value is restored or Optional\\.empty\n * if none is given\n *\n * usage\n * <code>\n * let var: Optional<string> = saveResolve(() => a.b.c.d.e, \"foobaz\")\n * </code>\n *\n * @param resolverProducer a lambda which can produce the value\n * @param defaultValue an optional default value if the producer fails to produce anything\n * @returns an Optional of the produced value\n */\n export function failSaveResolve<T>(resolverProducer: () => T, defaultValue: T = null): Optional<T> {\n return LangBase.saveResolve(resolverProducer, defaultValue);\n }\n\n /**\n * under some conditions it makes sense to swallow errors and return a default value in the error case\n * classical example the optional resolution of values in a chain (thankfully now covered by Typescript itself)\n * another example which we have in our system is that some operations fail only under test due to test framework\n * limitations while they cannot fail in the real world.\n *\n * @param resolverProducer a producer function which produces a value in the non error case\n * @param defaultValue the default value in case of a fail of the function\n */\n export function failSaveExecute<T>(resolverProducer: () => any, defaultValue: T = null): void {\n LangBase.saveResolve(resolverProducer, defaultValue);\n }\n\n /**\n * returns a given localized message upon a given key\n * basic java log like templating functionality is included\n *\n * @param key the key for the message\n * @param defaultMessage optional default message if none was found\n *\n * Additionally, you can pass additional arguments, which are used\n * in the same way java log templates use the params\n *\n * @param templateParams the param list to be filled in\n */\n export function getMessage(key: string, defaultMessage?: string, ...templateParams: Array<string>): string {\n installedLocale = installedLocale ?? new Messages();\n\n let msg = installedLocale[key] ?? defaultMessage ?? key;\n templateParams.forEach((param, cnt) => {\n msg = msg.replace(new RegExp([\"\\\\{\", cnt, \"\\\\}\"].join(EMPTY_STR), \"g\"), param);\n })\n\n\n return msg;\n }\n\n /**\n * transforms a key value pair into a string\n * @param key the key\n * @param val the value\n * @param delimiter the delimiter\n */\n export function keyValToStr(key: string, val: string, delimiter: string = \"\\n\") {\n return [key, val].join(delimiter);\n }\n\n /**\n * creates an exception with additional internal parameters\n * for extra information\n *\n * @param error\n * @param title the exception title\n * @param name the exception name\n * @param callerCls the caller class\n * @param callFunc the caller function\n * @param message the message for the exception\n */\n export function makeException(error: Error, title: string, name: string, callerCls: string, callFunc: string, message: string): Error {\n\n return new Error(message + (callerCls ?? nameSpace) + callFunc ?? (EMPTY_STR + (<any>arguments).caller.toString()));\n\n }\n\n /**\n * fetches a global config entry\n * @param configName the name of the configuration entry\n * @param defaultValue\n *\n * @return either the config entry or if none is given the default value\n */\n export function getGlobalConfig(configName: string, defaultValue: any): any {\n /**\n * note we could use exists but this is a heavy operation, since the config name usually\n * given this function here is called very often\n * is a single entry without . in between we can do the lighter shortcut\n */\n return window?.myfaces?.config?.[configName] ?? defaultValue;\n }\n\n /**\n * fetches the form in a fuzzy manner depending\n * on an element or event target.\n *\n * The idea is that according to the jsf spec\n * the enclosing form of the issuing element needs to be fetched.\n *\n * This is fine, but since then html5 came into the picture with the form attribute the element\n * can be anywhere referencing its parent form.\n *\n * Also, theoretically you can have the case of an issuing element enclosing a set of forms\n * (not really often used, but theoretically it could be input button allows to embed html for instance)\n *\n * So the idea is not to limit the issuing form determination to the spec case\n * but also cover the theoretical and html5 corner case.\n *\n * @param elem\n * @param event\n */\n export function getForm(elem: Element, event ?: Event): DQ | never {\n\n let queryElem = new DQ(elem);\n let eventTarget = (event) ? new DQ(getEventTarget(event)) : DomQuery.absent;\n\n if (queryElem.isTag(HTML_TAG_FORM)) {\n return queryElem;\n }\n\n //html 5 for handling\n if (queryElem.attr(HTML_TAG_FORM).isPresent()) {\n let formId = queryElem.attr(HTML_TAG_FORM).value;\n let foundForm = DQ.byId(formId, true);\n if (foundForm.isPresent()) {\n return foundForm;\n }\n }\n\n //no direct form is found we look for parent/child relationships as fallback\n //(90% case)\n let form = queryElem.firstParent(HTML_TAG_FORM)\n .orElseLazy(() => queryElem.byTagName(HTML_TAG_FORM, true))\n .orElseLazy(() => eventTarget.firstParent(HTML_TAG_FORM))\n .orElseLazy(() => eventTarget.byTagName(HTML_TAG_FORM))\n .first();\n\n //either a form is found within parent child - nearest form (aka first)\n //or we look for a single form\n form = form.orElseLazy(() => DQ.byTagName(HTML_TAG_FORM));\n\n //the end result must be a found form otherwise - Exception\n assertOnlyOneFormExists(form);\n\n return form;\n }\n\n /**\n * gets the local or global options with local ones having higher priority\n * if no local or global one was found then the default value is given back\n *\n * @param configName the name of the configuration entry\n * @param localOptions the local options root for the configuration myfaces as default marker is added\n * implicitly\n *\n * @param defaultValue\n *\n * @return either the config entry or if none is given the default value\n */\n export function getLocalOrGlobalConfig(localOptions: Config, configName: string, defaultValue: any): any {\n return localOptions.value?.myfaces?.config?.[configName] ??\n window?.myfaces?.config?.[configName] ??\n defaultValue;\n }\n\n /**\n * expands an associative array into an array of key value tuples\n * @param value\n */\n export function ofAssoc(value: {[key: string]: any}) {\n return new Es2019Array(...Object.keys(value))\n .map(key => [key, value[key]]);\n }\n\n export function collectAssoc(target: any, item: any) {\n target[item[0]] = item[1];\n return target;\n }\n\n /**\n * The active timeout for the \"debounce\".\n * Since we only use it in the XhrController\n * we can use a local module variable here\n */\n let activeTimeouts = {};\n\n\n\n\n /**\n * a simple debounce function\n * which waits until a timeout is reached and\n * if something comes in in between debounces\n *\n * @param runnable a runnable which should go under debounce control\n * @param timeout a timeout for the debounce window\n */\n export function debounce(key, runnable, timeout) {\n function clearActiveTimeout() {\n clearTimeout(activeTimeouts[key]);\n delete activeTimeouts[key];\n }\n\n if (!!(activeTimeouts?.[key])) {\n clearActiveTimeout();\n }\n if (timeout > 0) {\n activeTimeouts[key] = setTimeout(() => {\n try {\n runnable();\n } finally {\n clearActiveTimeout();\n }\n }, timeout);\n } else {\n runnable();\n }\n }\n\n /**\n * assert that the form exists and only one form exists and throw an exception in the case it does not\n *\n * @param forms the form to check for\n */\n function assertOnlyOneFormExists(forms: DomQuery): void | never {\n if (forms.isAbsent() || forms.length > 1) {\n throw makeException(new Error(), null, null, \"Impl\", \"getForm\", getMessage(\"ERR_FORM\"));\n }\n }\n}","import {IAsyncRunnable} from \"./AsyncRunnable\";\nimport {ExtLang} from \"./Lang\";\nimport debounce = ExtLang.debounce;\n\n/**\n * A simple XHR queue controller\n * following the async op -> next pattern\n * Faces enforces for the XHR handling\n */\nexport class XhrQueueController<T extends IAsyncRunnable<any>> {\n queue = [];\n taskRunning = false;\n\n constructor() {\n }\n\n /**\n * executes or enqueues an element\n * @param runnable the runnable (request) to be enqueued\n * @param timeOut timeout if > 0 which defers the execution\n * until the debounce window for the timeout is closed.\n */\n enqueue(runnable: T, timeOut: number = 0) {\n debounce(\"xhrQueue\", () => {\n const requestHandler = this.enrichRunnable(runnable);\n if (!this.taskRunning) {\n this.signalTaskRunning();\n requestHandler.start();\n } else {\n this.queue.push(requestHandler);\n }\n }, timeOut);\n }\n\n /**\n * trigger the next element in the queue\n * to be started!\n */\n next() {\n this.updateTaskRunning();\n const next = this.queue.shift();\n next?.start();\n }\n\n /**\n * clears and resets the queue\n */\n clear() {\n this.queue.length = 0;\n this.updateTaskRunning();\n }\n\n /**\n * true if queue is empty\n */\n get isEmpty(): boolean {\n return !this.queue.length;\n }\n\n /**\n * Enriches the incoming async asyncRunnable\n * with the error and next handling\n * (aka: asyncRunnable is done -> next\n * error -> clear queue\n * @param asyncRunnable the async runnable which needs enrichment\n * @private\n */\n private enrichRunnable(asyncRunnable: T) {\n /**\n * we can use the Promise pattern asyncrunnable uses\n * to trigger queue control callbacks of next element\n * and clear the queue (theoretically this\n * would work with any promise)\n */\n return asyncRunnable\n .then(() => this.next())\n .catch(() => this.clear());\n }\n\n\n /**\n * alerts the queue that a task is running\n *\n * @private\n */\n private signalTaskRunning() {\n this.taskRunning = true;\n }\n\n /**\n * updates the task running status according to the current queue\n * @private\n */\n private updateTaskRunning() {\n this.taskRunning = !this.isEmpty;\n }\n\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n EMPTY_STR, ERROR,\n ERROR_MESSAGE,\n ERROR_NAME, HTTP_ERROR,\n RESPONSE_TEXT,\n RESPONSE_XML, SERVER_ERROR,\n SOURCE,\n STATUS,\n UNKNOWN\n} from \"../core/Const\";\nimport {Config, DQ, Optional, XMLQuery} from \"mona-dish\";\n\nimport {EventData} from \"./EventData\";\nimport {ExtLang} from \"../util/Lang\";\nimport getMessage = ExtLang.getMessage;\n\n\nexport enum ErrorType {\n SERVER_ERROR = \"serverError\",\n HTTP_ERROR = \"httpError\",\n CLIENT_ERROR = \"clientErrror\",\n TIMEOUT = \"timeout\"\n}\n\n/**\n * the spec has a problem of having the error\n * object somewhat underspecified, there is no clear\n * description of the required contents.\n * I want to streamline it with mojarra here\n * hence we are going to move\n * everything into the same attributes,\n * I will add deprecated myfaces backwards compatibility attributes as well\n */\nexport class ErrorData extends EventData implements IErrorData {\n\n type: string = \"error\";\n source: string | Element;\n\n errorName: string;\n errorMessage: string;\n\n responseText: string;\n responseXML: any;\n\n status: string;\n typeDetails: ErrorType;\n\n serverErrorName: string;\n serverErrorMessage: string;\n description: string;\n\n constructor(source: string | Element, errorName: string, errorMessage: string, responseText: string = null, responseXML: Document = null, responseCode: number = -1, statusOverride: string = null, type = ErrorType.CLIENT_ERROR) {\n super();\n\n ///MYFACES-4676 error payload expects an element if possible\n //this code remaps the string in an element and if not existing just passes as is what comes in\n this.source = DQ.byId(source).value.orElse(source).value;\n this.type = ERROR;\n this.errorName = errorName;\n\n //tck requires that the type is prefixed to the message itself (jsdoc also) in case of a server error\n this.errorMessage = errorMessage;\n this.responseCode = responseCode;\n this.responseText = responseText;\n this.responseXML = responseXML;\n\n this.status = statusOverride;\n\n this.description = `Status: ${this.status}\\nResponse Code: ${this.responseCode}\\nError Message: ${this.errorMessage}`;\n\n this.typeDetails = type;\n\n if (type == ErrorType.SERVER_ERROR) {\n this.serverErrorName = this.errorName;\n this.serverErrorMessage = this.errorMessage;\n }\n }\n\n static fromClient(e: Error): ErrorData {\n return new ErrorData((e as any)?.source ?? \"client\", e?.name ?? EMPTY_STR, e?.message ?? EMPTY_STR, e?.stack ?? EMPTY_STR);\n }\n\n static fromHttpConnection(source: any, name: string, message: string, responseText: string, responseXML: Document, responseCode: number, status: string = EMPTY_STR): ErrorData {\n return new ErrorData(source, name, message, responseText, responseXML, responseCode, status, ErrorType.HTTP_ERROR);\n }\n\n static fromGeneric(context: Config, errorCode: number, errorType: ErrorType = ErrorType.SERVER_ERROR): ErrorData {\n\n let getMsg = this.getMsg;\n\n let source = getMsg(context, SOURCE);\n let errorName = getMsg(context, ERROR_NAME);\n let errorMessage = getMsg(context, ERROR_MESSAGE);\n let status = getMsg(context, STATUS);\n let responseText = getMsg(context, RESPONSE_TEXT);\n let responseXML: Document = context.getIf(RESPONSE_XML).value;\n\n\n return new ErrorData(source, errorName, errorMessage, responseText, responseXML, errorCode, status, errorType);\n }\n\n private static getMsg(context, param) {\n return getMessage(context.getIf(param).orElse(EMPTY_STR).value);\n }\n\n static fromServerError(context: Config): ErrorData {\n return this.fromGeneric(context, -1);\n }\n\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {Config, DQ} from \"mona-dish\";\nimport {BEGIN, CTX_PARAM_REQ_PASS_THR, EVENT, P_AJAX_SOURCE, SOURCE} from \"../core/Const\";\n\nexport class EventData implements IEventData{\n type: string;\n status: string;\n source: any;\n responseCode: number;\n responseText: string;\n responseXML: Document;\n\n static createFromRequest(request: XMLHttpRequest, context: Config, /*event name*/ name: string): EventData {\n\n let eventData = new EventData();\n\n eventData.type = EVENT;\n eventData.status = name;\n\n let sourceId: string = context.getIf(SOURCE)\n .orElseLazy(() => context.getIf(P_AJAX_SOURCE).value)\n .orElseLazy(() => context.getIf(CTX_PARAM_REQ_PASS_THR, P_AJAX_SOURCE).value)\n .value;\n if (sourceId) {\n eventData.source = DQ.byId(sourceId, true).first().value.value;\n }\n\n if (name !== BEGIN) {\n eventData.responseCode = request?.status;\n eventData.responseText = request?.responseText;\n eventData.responseXML = request?.responseXML;\n }\n return eventData;\n }\n}\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Config, DomQuery, DQ} from \"mona-dish\";\nimport {\n $faces,\n $nsp,\n CTX_OPTIONS_DELAY,\n CTX_OPTIONS_TIMEOUT,\n DELAY_NONE,\n EMPTY_FUNC,\n EMPTY_STR,\n ENCODED_URL, NAMED_VIEWROOT, NAMING_CONTAINER_ID,\n P_VIEWSTATE,\n REQ_TYPE_GET,\n REQ_TYPE_POST\n} from \"../core/Const\";\nimport {XhrFormData} from \"./XhrFormData\";\nimport {ExtLang} from \"../util/Lang\";\nimport {ExtConfig, ExtDomQuery} from \"../util/ExtDomQuery\";\nimport {Assertions} from \"../util/Assertions\";\n\n\n/**\n * Resolver functions for various aspects of the request data\n *\n * stateless because it might be called from various\n * parts of the response classes\n */\n\n/**\n * resolves the event handlers lazily\n * so that if some decoration happens in between we can deal with it\n *\n * @param requestContext\n * @param responseContext\n * @param funcName\n */\nexport function resolveHandlerFunc(requestContext: Config, responseContext: Config, funcName: string) {\n responseContext = responseContext || new Config({});\n return responseContext.getIf(funcName)\n .orElseLazy(() =>requestContext.getIf(funcName).value)\n .orElse(EMPTY_FUNC).value;\n}\n\nexport function resolveTargetUrl(srcFormElement: HTMLFormElement) {\n return (typeof srcFormElement.elements[ENCODED_URL] == 'undefined') ?\n srcFormElement.action :\n srcFormElement.elements[ENCODED_URL].value;\n}\n\nexport function resolveFinalUrl(sourceForm: DomQuery, formData: XhrFormData, ajaxType = REQ_TYPE_POST) {\n let targetUrl = resolveTargetUrl(<HTMLFormElement>sourceForm.getAsElem(0).value);\n\n return targetUrl + (ajaxType == REQ_TYPE_GET ? \"?\" + formData.toString() : EMPTY_STR);\n}\n\n/**\n * form resolution the same way our old implementation did\n * it is either the id or the parent form of the element or an embedded form\n * of the element\n *\n * @param elem\n * @param event\n */\nexport function resolveForm(elem: DQ, event: Event): DQ {\n return ExtLang.getForm(elem.getAsElem(0).value, event);\n}\n\nexport function resolveViewId(form: DQ): string {\n const viewState = form.querySelectorAll(`input[type='hidden'][name*='${$nsp(P_VIEWSTATE)}']`).id.orElse(\"\").value;\n const divider = $faces().separatorchar;\n const viewId = viewState.split(divider, 2)[0];\n const viewStateViewId = viewId.indexOf($nsp(P_VIEWSTATE)) === -1 ? viewId : \"\";\n // myfaces specific, we in non portlet environments prepend the viewId\n // even without being in a naming container, the other components ignore that\n return form.id.value.indexOf(viewStateViewId) === 0 ? viewStateViewId : \"\";\n}\n\nexport function resolveViewRootId(form: DQ): string {\n const viewState = form.querySelectorAll(`input[type='hidden'][name*='${$nsp(P_VIEWSTATE)}']`).attr(\"name\").orElse(\"\").value;\n const divider = $faces().separatorchar;\n const viewId = viewState.split(divider, 2)[0];\n //different to the identifier the form id is never prepended to the viewstate\n return viewId.indexOf($nsp(P_VIEWSTATE)) === -1 ? viewId : \"\";\n}\n\n/**\n * as per jsdoc before the request it must be ensured that every post argument\n * is prefixed with the naming container id (there is an exception in mojarra with\n * the element=element param, which we have to follow here as well.\n * (inputs are prefixed by name anyway normally this only affects our standard parameters)\n * @private\n */\nexport function resoveNamingContainerMapper(internalContext: Config): (key: string, value: any) => [string, any] {\n const isNamedViewRoot = internalContext.getIf(NAMED_VIEWROOT).isPresent();\n if(!isNamedViewRoot) {\n return (key, value) => [key, value];\n }\n const partialId = internalContext.getIf(NAMING_CONTAINER_ID).value;\n const SEP = $faces().separatorchar;\n const prefix = partialId + SEP;\n return (key: string, value: any) => (key.indexOf(prefix) == 0) ? [key, value] : [prefix + key, value];\n}\n\nexport function resolveTimeout(options: Config): number {\n let getCfg = ExtLang.getLocalOrGlobalConfig;\n return options.getIf(CTX_OPTIONS_TIMEOUT).value ?? getCfg(options.value, CTX_OPTIONS_TIMEOUT, 0);\n}\n\n/**\n * resolve the delay from the options and/or the request context and or the configuration\n *\n * @param options ... the options object, in most cases it will host the delay value\n */\nexport function resolveDelay(options: Config): number {\n // null, 'none', or undefined will automatically be mapped to 0 aka no delay\n // the config delay will be dropped not needed anymore, it does not really\n // make sense anymore now that it is part of a local spec\n let ret = options.getIf(CTX_OPTIONS_DELAY).orElse(0).value;\n // if delay === none, no delay must be used, aka delay 0\n ret = (DELAY_NONE === ret) ? 0 : ret;\n // negative, or invalid values will automatically get a js exception\n Assertions.assertDelay(ret);\n return ret;\n}\n\n/**\n * resolves the window-id from various sources\n *\n * @param options\n */\nexport function resolveWindowId(options: Config): string | null {\n return options?.value?.windowId ?? ExtDomQuery.windowId.value;\n}\n\n/**\n * cross port from the dojo lib\n * browser save event resolution\n * @param evt the event object\n * (with a fallback for ie events if none is present)\n * @deprecated soon will be removed\n */\nexport function getEventTarget(evt: Event): Element {\n // ie6 and 7 fallback\n let finalEvent = evt;\n /*\n * evt source is defined in the jsf events\n * seems like some component authors use our code,\n * so we add it here see also\n * https://issues.apache.org/jira/browse/MYFACES-2458\n * not entirely a bug but makes sense to add this\n * behavior. I don´t use it that way but nevertheless it\n * does not break anything so why not\n */\n let t = finalEvent?.srcElement ?? finalEvent?.target ?? (<any>finalEvent)?.source;\n while ((t) && (t.nodeType != 1)) {\n t = t.parentNode;\n }\n return t;\n}\n\n/**\n * resolves a bunch of default values\n * which can be further processed from the given\n * call parameters of faces.ajax.request\n *\n * @param event\n * @param opts\n * @param el\n */\nexport function resolveDefaults(event: Event, opts: Options | [[string, any]] , el: Element | string = null): any {\n //deep copy the options, so that further transformations to not backfire into the callers\n const elem = DQ.byId(el || <Element>event.target, true);\n const options = new ExtConfig(opts).deepCopy as ExtConfig;\n return {\n options: options,\n elem: elem,\n elementId: elem.id.value,\n windowId: resolveWindowId(options),\n isResetValues: true === options.value?.resetValues\n };\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Config, Optional, XMLQuery} from \"mona-dish\";\n\nimport {Assertions} from \"../util/Assertions\";\nimport {DQ} from \"mona-dish\";\nimport {\n $nsp,\n CTX_PARAM_MF_INTERNAL,\n CTX_PARAM_SRC_CTL_ID,\n CTX_PARAM_SRC_FRM_ID,\n SEL_RESPONSE_XML,\n SOURCE,\n HTML_TAG_FORM,\n UPDATE_ELEMS,\n UPDATE_FORMS,\n DEFERRED_HEAD_INSERTS\n} from \"../core/Const\";\nimport {ExtConfig} from \"../util/ExtDomQuery\";\n\n/**\n * Resolver functions for various aspects of the response data\n *\n * stateless because it might be called from various\n * parts of the response classes\n */\n\n/**\n * fetches the response XML\n * as XML Query object\n *\n * @param request the request hosting the responseXML\n *\n * Throws an error in case of non-existent or wrong xml data\n *\n */\nexport function resolveResponseXML(request: Config): XMLQuery {\n let ret = new XMLQuery($nsp(request.getIf(SEL_RESPONSE_XML).value));\n Assertions.assertValidXMLResponse(ret);\n\n return ret;\n}\n\n/**\n * Splits the incoming pass-through context apart\n * in an internal and an external normalized context\n * the internal one is just for our internal processing\n *\n * @param context the root context as associative array\n */\nexport function resolveContexts(context: { [p: string]: any }): any {\n /**\n * we split the context apart into the external one and\n * some internal values\n */\n let externalContext = ExtConfig.fromNullable(context);\n let internalContext = externalContext.getIf(CTX_PARAM_MF_INTERNAL);\n if (!internalContext.isPresent()) {\n internalContext = ExtConfig.fromNullable({});\n }\n\n /**\n * prepare storage for some deferred operations\n */\n internalContext.assign(DEFERRED_HEAD_INSERTS).value = [];\n internalContext.assign(UPDATE_FORMS).value = [];\n internalContext.assign(UPDATE_ELEMS).value = [];\n return {externalContext, internalContext};\n}\n\n/**\n * fetches the source element out of our contexts\n *\n * @param context the external context which should host the source id\n * @param internalContext internal pass-through fall back\n *\n */\nexport function resolveSourceElement(context: Config, internalContext: Config): DQ {\n let elemId = resolveSourceElementId(context, internalContext);\n return DQ.byId(elemId.value, true);\n}\n\n/**\n * fetches the source form if it still exists\n * also embedded forms and parent forms are taken into consideration\n * as fallbacks\n *\n * @param internalContext\n * @param elem\n */\nexport function resolveSourceForm(internalContext: Config, elem: DQ): DQ {\n let sourceFormId = internalContext.getIf(CTX_PARAM_SRC_FRM_ID);\n let sourceForm = new DQ(sourceFormId.isPresent() ? document.forms[sourceFormId.value] : null);\n\n sourceForm = sourceForm.orElseLazy(() => elem.firstParent(HTML_TAG_FORM))\n .orElseLazy(() => elem.querySelectorAll(HTML_TAG_FORM))\n .orElseLazy(() => DQ.querySelectorAll(HTML_TAG_FORM));\n\n return sourceForm;\n}\n\nfunction resolveSourceElementId(context: Config, internalContext: Config): Optional<string> {\n //?internal context?? used to be external one\n return internalContext.getIf(CTX_PARAM_SRC_CTL_ID)\n .orElseLazy(() => context.getIf(SOURCE, \"id\").value);\n}\n\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {DQ, XMLQuery} from \"mona-dish\";\nimport {ResponseProcessor} from \"./ResponseProcessor\";\n\nimport {IResponseProcessor} from \"./IResponseProcessor\";\nimport {\n $nsp,\n XML_TAG_ATTRIBUTES,\n XML_TAG_CHANGES,\n XML_TAG_DELETE,\n XML_TAG_ERROR,\n XML_TAG_EVAL,\n XML_TAG_EXTENSION,\n XML_TAG_INSERT,\n XML_TAG_REDIRECT,\n XML_TAG_UPDATE, P_RESOURCE,\n P_VIEWBODY,\n P_VIEWHEAD,\n P_VIEWROOT,\n NAMING_CONTAINER_ID,\n XML_TAG_PARTIAL_RESP,\n RESPONSE_XML,\n XML_TAG_AFTER,\n XML_TAG_BEFORE, NAMED_VIEWROOT, XML_ATTR_NAMED_VIEWROOT, P_VIEWSTATE, $faces\n} from \"../core/Const\";\nimport {resolveContexts, resolveResponseXML} from \"./ResonseDataResolver\";\nimport {ExtConfig} from \"../util/ExtDomQuery\";\n\n\n\nexport module Response {\n\n\n /**\n * Standardized faces.ts response\n * this one is called straight from faces.ts.response\n *\n * The processing follows the spec by going for the responseXML\n * and processing its tags\n *\n * @param {XMLHttpRequest} request (xhrRequest) - xhr request object\n * @param context {Context} context (Map) - AJAX context\n *\n */\n export function processResponse(request: XMLHttpRequest, context: Context) {\n\n let req = ExtConfig.fromNullable(request);\n let {externalContext, internalContext} = resolveContexts(context);\n let responseXML: XMLQuery = resolveResponseXML(req);\n let responseProcessor = new ResponseProcessor(req, externalContext, internalContext);\n\n internalContext.assign(RESPONSE_XML).value = responseXML;\n\n // we now process the partial tags, or in none given raise an error\n responseXML.querySelectorAll(XML_TAG_PARTIAL_RESP)\n .each(item => processPartialTag(<XMLQuery>item, responseProcessor, internalContext));\n\n // We now process the viewStates, client windows and the elements to be evaluated are delayed.\n // The reason for this is that often it is better\n // to wait until the document has caught up before\n // doing any evaluations even on embedded scripts.\n // Usually this does not matter, the client window comes in almost last always anyway\n // we maybe drop this deferred assignment in the future, but myfaces did it until now.\n responseProcessor.updateNamedViewRootState();\n responseProcessor.fixViewStates();\n responseProcessor.fixClientWindow();\n responseProcessor.globalEval();\n\n responseProcessor.done();\n }\n\n /**\n * highest node partial-response from there the main operations are triggered\n */\n function processPartialTag(node: XMLQuery, responseProcessor: IResponseProcessor, internalContext) {\n\n\n /*\n https://javaee.github.io/javaserverfaces/docs/2.2/javadocs/web-partialresponse.html#ns_xsd\n The \"partial-response\" element is the root of the partial response information hierarchy,\n and contains nested elements for all possible elements that can exist in the response.\n This element must have an \"id\" attribute whose value is the return from calling getContainerClientId()\n on the UIViewRoot to which this response pertains.\n */\n // we can determine whether we are in a naming container scenario by checking whether the passed view id is present in the page\n // under or in body as identifier\n\n let partialId:string = node?.id?.value;\n internalContext.assignIf(!!partialId, NAMING_CONTAINER_ID).value = partialId; // second case mojarra\n\n // there must be at least one container viewstate element resembling the viewroot that we know\n // this is named\n responseProcessor.updateNamedViewRootState();\n\n const SEL_SUB_TAGS = [XML_TAG_ERROR, XML_TAG_REDIRECT, XML_TAG_CHANGES].join(\",\");\n\n // now we can process the main operations\n node.querySelectorAll(SEL_SUB_TAGS).each((node: XMLQuery) => {\n switch (node.tagName.value) {\n case XML_TAG_ERROR:\n responseProcessor.error(node);\n break;\n case XML_TAG_REDIRECT:\n responseProcessor.redirect(node);\n break;\n case XML_TAG_CHANGES:\n processChangesTag(node, responseProcessor);\n break;\n }\n });\n }\n\n let processInsert = function (responseProcessor: IResponseProcessor, node: XMLQuery) {\n // path1 insert after as child tags\n if(node.querySelectorAll([XML_TAG_BEFORE, XML_TAG_AFTER].join(\",\")).length) {\n responseProcessor.insertWithSubTags(node);\n } else { // insert before after with id\n responseProcessor.insert(node);\n }\n\n };\n\n /**\n * next level changes tag\n *\n * @param node\n * @param responseProcessor\n */\n function processChangesTag(node: XMLQuery, responseProcessor: IResponseProcessor): boolean {\n const ALLOWED_TAGS = [XML_TAG_UPDATE, XML_TAG_EVAL, XML_TAG_INSERT, XML_TAG_DELETE, XML_TAG_ATTRIBUTES, XML_TAG_EXTENSION].join(\", \");\n node.querySelectorAll(ALLOWED_TAGS).each(\n (node: XMLQuery) => {\n switch (node.tagName.value) {\n case XML_TAG_UPDATE:\n processUpdateTag(node, responseProcessor);\n break;\n\n case XML_TAG_EVAL:\n responseProcessor.eval(node);\n break;\n\n case XML_TAG_INSERT:\n processInsert(responseProcessor, node);\n break;\n\n case XML_TAG_DELETE:\n responseProcessor.delete(node);\n break;\n\n case XML_TAG_ATTRIBUTES:\n responseProcessor.attributes(node);\n break;\n\n case XML_TAG_EXTENSION:\n break;\n }\n }\n );\n return true;\n }\n\n /**\n * checks and stores a state update for delayed processing\n *\n * @param responseProcessor the response processor to perform the store operation\n * @param node the xml node to check for the state\n *\n * @private\n */\n function storeState(responseProcessor: IResponseProcessor, node: XMLQuery) {\n return responseProcessor.processViewState(node) || responseProcessor.processClientWindow(node);\n }\n\n /**\n * branch tag update. drill further down into the updates\n * special case viewState in that case it is a leaf\n * and the viewState must be processed\n *\n * @param node\n * @param responseProcessor\n */\n function processUpdateTag(node: XMLQuery, responseProcessor: IResponseProcessor) {\n // early state storing, if no state we perform a normal update cycle\n if (!storeState(responseProcessor, node)) {\n handleElementUpdate(node, responseProcessor);\n }\n }\n\n /**\n * element update\n *\n * @param node\n * @param responseProcessor\n */\n function handleElementUpdate(node: XMLQuery, responseProcessor: IResponseProcessor) {\n let cdataBlock = node.cDATAAsString;\n switch (node.id.value) {\n case $nsp(P_VIEWROOT) :\n responseProcessor.replaceViewRoot(DQ.fromMarkup(cdataBlock.substring(cdataBlock.indexOf(\"<html\"))));\n break;\n\n case $nsp(P_VIEWHEAD):\n responseProcessor.replaceHead(DQ.fromMarkup(cdataBlock));\n break;\n\n case $nsp(P_VIEWBODY):\n responseProcessor.replaceBody(DQ.fromMarkup(cdataBlock));\n break;\n\n case $nsp(P_RESOURCE):\n responseProcessor.addToHead(DQ.fromMarkup(cdataBlock))\n break;\n\n default:// htmlItem replacement\n responseProcessor.update(node, cdataBlock);\n break;\n }\n }\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Config, DomQuery, DQ, DQ$, Lang, XMLQuery} from \"mona-dish\";\nimport {Implementation} from \"../AjaxImpl\";\nimport {Assertions} from \"../util/Assertions\";\nimport {IResponseProcessor} from \"./IResponseProcessor\";\nimport {ErrorData} from \"./ErrorData\";\nimport {StateHolder} from \"../core/ImplTypes\";\nimport {EventData} from \"./EventData\";\n\nimport {\n $faces,\n $nsp,\n APPLIED_CLIENT_WINDOW,\n APPLIED_VST,\n ATTR_ID,\n ATTR_NAME,\n ATTR_URL,\n ATTR_VALUE,\n DEFERRED_HEAD_INSERTS,\n EMPTY_FUNC,\n EMPTY_STR,\n ERROR_MESSAGE,\n ERROR_NAME,\n HTML_TAG_BODY,\n HTML_TAG_FORM,\n HTML_TAG_HEAD,\n HTML_TAG_LINK,\n HTML_TAG_SCRIPT,\n HTML_TAG_STYLE, IDENT_ALL, IDENT_NONE, NAMED_VIEWROOT,\n ON_ERROR,\n ON_EVENT,\n P_CLIENT_WINDOW,\n P_EXECUTE,\n P_AJAX_SOURCE,\n P_RENDER,\n P_RENDER_OVERRIDE,\n P_VIEWSTATE,\n NAMING_CONTAINER_ID,\n RESPONSE_XML,\n SEL_CLIENT_WINDOW_ELEM,\n SEL_VIEWSTATE_ELEM,\n SOURCE,\n SUCCESS,\n UPDATE_ELEMS,\n UPDATE_FORMS,\n XML_TAG_AFTER,\n XML_TAG_ATTR,\n XML_TAG_BEFORE\n} from \"../core/Const\";\nimport {ExtConfig, ExtDomQuery} from \"../util/ExtDomQuery\";\nimport {HiddenInputBuilder} from \"../util/HiddenInputBuilder\";\nimport trim = Lang.trim;\nimport {ExtLang} from \"../util/Lang\";\nimport ofAssoc = ExtLang.ofAssoc;\n\n\n/**\n * Response processor\n *\n * Each XML tag is either a node or a leaf\n * or both\n *\n * the processor provides a set of operations\n * which are executed on a single leaf node per operation\n * and present the core functionality of our response\n *\n * Note the response processor is stateful hence we bundle it in a class\n * to reduce code we keep references tot contexts in place\n */\nexport class ResponseProcessor implements IResponseProcessor {\n\n constructor(private request: Config, private externalContext: Config, private internalContext: Config) {\n }\n\n /**\n * head replacement\n * @param shadowDocument incoming shadow head data (aka cdata as xml reference or dom element)\n * the data incoming must represent the html representation of the head itself one way or the other\n */\n replaceHead(shadowDocument: XMLQuery | DQ) {\n const shadowHead = shadowDocument.querySelectorAll(HTML_TAG_HEAD);\n if (!shadowHead.isPresent()) {\n return;\n }\n const head = ExtDomQuery.querySelectorAll(HTML_TAG_HEAD);\n // full replace we delete everything\n head.childNodes.delete();\n this.addToHead(shadowHead);\n //we copy the attributes as well (just in case myfaces introduces the id in head)\n head.copyAttrs(shadowHead);\n }\n\n addToHead(shadowHead: XMLQuery | DQ) {\n const mappedHeadData = new ExtDomQuery(shadowHead);\n const scriptTags = [HTML_TAG_SCRIPT];\n const nonExecutables = mappedHeadData.filter(item => scriptTags.indexOf(item.tagName.orElse(\"\").value) == -1);\n nonExecutables.runHeadInserts(true);\n\n //incoming either the outer head tag or its children\n const nodesToAdd = (shadowHead.tagName.value === \"HEAD\") ? shadowHead.childNodes : shadowHead;\n // this is stored for \"post\" processing\n // after the rest of the \"physical build up\", head before body\n const scriptElements = new DomQuery(...nodesToAdd.asArray\n .filter(item => scriptTags.indexOf(item.tagName.orElse(\"\").value) != -1));\n\n this.addToHeadDeferred(scriptElements);\n }\n\n addToHeadDeferred(newElements: XMLQuery | DQ) {\n this.internalContext.assign(DEFERRED_HEAD_INSERTS).value.push(newElements);\n }\n\n /**\n * replaces the body in the expected manner\n * which means the entire body content is refreshed\n * however also the body attributes must be transferred\n * keeping event handlers etc... in place\n *\n * @param shadowDocument .. an incoming shadow document hosting the new nodes\n */\n replaceBody(shadowDocument: XMLQuery | DQ) {\n\n const shadowBody = shadowDocument.querySelectorAll(HTML_TAG_BODY);\n if (!shadowBody.isPresent()) {\n return;\n }\n\n const shadowInnerHTML: string = <string>shadowBody.innerHTML;\n const resultingBody = <DQ>ExtDomQuery.querySelectorAll(HTML_TAG_BODY);\n const updateForms = resultingBody.querySelectorAll(HTML_TAG_FORM);\n\n // main difference, we cannot replace the body itself, but only its content\n // we need a separate step for post-processing the incoming\n // attributes, like classes, styles etc...\n (resultingBody.html(shadowInnerHTML) as DQ).copyAttrs(shadowBody);\n this.externalContext.assign($nsp(P_RENDER_OVERRIDE)).value = \"@all\";\n this.storeForPostProcessing(updateForms, resultingBody);\n }\n\n /**\n * Leaf Tag eval... process whatever is in the eval cdata block\n *\n * @param node the node to eval\n */\n eval(node: XMLQuery) {\n ExtDomQuery.globalEval(node.cDATAAsString);\n }\n\n /**\n * processes an incoming error from the response\n * which is hosted under the <error> tag\n * @param node the node hosting the error in our response xml\n * @param node the node in the xml hosting the error message\n */\n error(node: XMLQuery) {\n /**\n * <error>\n * <error-name>String</error-name>\n * <error-message><![CDATA[message]]></error-message>\n * <error>\n */\n\n const mergedErrorData = new ExtConfig({});\n mergedErrorData.assign(SOURCE).value = this.externalContext.getIf(P_AJAX_SOURCE).get(0).value;\n mergedErrorData.assign(ERROR_NAME).value = node.querySelectorAll(ERROR_NAME).textContent(EMPTY_STR);\n mergedErrorData.assign(ERROR_MESSAGE).value = node.querySelectorAll(ERROR_MESSAGE).cDATAAsString;\n\n const hasResponseXML = this.internalContext.get(RESPONSE_XML).isPresent();\n\n //we now store the response xml also in the error data for further details\n mergedErrorData.assignIf(hasResponseXML, RESPONSE_XML).value = this.internalContext.getIf(RESPONSE_XML).value.get(0).value;\n\n // error post-processing and enrichment (standard messages from keys)\n const errorData = ErrorData.fromServerError(mergedErrorData);\n\n // we now trigger an internally stored onError function which might be an attached to the context\n // either we do not have an internal on error, or an on error has been based via params from the outside.\n // In both cases they are attached to our contexts\n\n this.triggerOnError(errorData);\n Implementation.sendError(errorData);\n }\n\n /**\n * process the redirect operation\n *\n * @param node\n */\n redirect(node: XMLQuery) {\n Assertions.assertUrlExists(node);\n\n const redirectUrl = trim(node.attr(ATTR_URL).value);\n if (redirectUrl != EMPTY_STR) {\n window.location.href = redirectUrl;\n }\n }\n\n /**\n * processes the update operation and updates the node with the cdata block\n * @param node the xml response node hosting the update info\n * @param cdataBlock the cdata block with the new html code\n */\n update(node: XMLQuery, cdataBlock: string) {\n const result = ExtDomQuery.byId(node.id.value, true).outerHTML(cdataBlock, false, false);\n const sourceForm = result?.firstParent(HTML_TAG_FORM).orElseLazy(() => result.byTagName(HTML_TAG_FORM, true));\n if (sourceForm) {\n this.storeForPostProcessing(sourceForm, result);\n }\n }\n\n /**\n * Delete handler, simply deletes the node referenced by the xml data\n * @param node\n */\n delete(node: XMLQuery) {\n DQ.byId(node.id.value, true).delete();\n }\n\n /**\n * attributes leaf tag... process the attributes\n *\n * @param node\n */\n attributes(node: XMLQuery) {\n const elem = DQ.byId(node.id.value, true);\n\n node.byTagName(XML_TAG_ATTR).each((item: XMLQuery) => {\n elem.attr(item.attr(ATTR_NAME).value).value = item.attr(ATTR_VALUE).value;\n });\n }\n\n /**\n * @param shadowDocument a shadow document which is needed for further processing\n */\n replaceViewRoot(shadowDocument: XMLQuery) {\n this.replaceHead(shadowDocument);\n this.replaceBody(shadowDocument);\n }\n\n /**\n * Insert handling, either before or after\n *\n * @param node\n */\n insert(node: XMLQuery) {\n //let insertId = node.id; //not used atm\n\n const before = node.attr(XML_TAG_BEFORE);\n const after = node.attr(XML_TAG_AFTER);\n const insertNodes = DQ.fromMarkup(<any>node.cDATAAsString);\n\n if (before.isPresent()) {\n DQ.byId(before.value, true).insertBefore(insertNodes);\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n if (after.isPresent()) {\n const domQuery = DQ.byId(after.value, true);\n domQuery.insertAfter(insertNodes);\n\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n }\n\n /**\n * Handler for the case <insert << before id=\"...\n *\n * @param node the node hosting the insert data\n */\n insertWithSubTags(node: XMLQuery) {\n const before = node.querySelectorAll(XML_TAG_BEFORE);\n const after = node.querySelectorAll(XML_TAG_AFTER);\n\n before.each(item => {\n const insertId = item.attr(ATTR_ID);\n const insertNodes = DQ.fromMarkup(<any>item.cDATAAsString);\n if (insertId.isPresent()) {\n DQ.byId(insertId.value, true).insertBefore(insertNodes);\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n });\n\n after.each(item => {\n const insertId = item.attr(ATTR_ID);\n const insertNodes = DQ.fromMarkup(<any>item.cDATAAsString);\n if (insertId.isPresent()) {\n DQ.byId(insertId.value, true).insertAfter(insertNodes);\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n });\n }\n\n /**\n * Process the viewState update, update the affected\n * forms with their respective new viewState values\n *\n */\n processViewState(node: XMLQuery): boolean {\n if (ResponseProcessor.isViewStateNode(node)) {\n const state = node.cDATAAsString;\n this.internalContext.assign(APPLIED_VST, node.id.value).value = new StateHolder($nsp(node.id.value), state);\n return true;\n }\n return false;\n }\n\n processClientWindow(node: XMLQuery): boolean {\n if (ResponseProcessor.isClientWindowNode(node)) {\n const state = node.cDATAAsString;\n this.internalContext.assign(APPLIED_CLIENT_WINDOW, node.id.value).value = new StateHolder($nsp(node.id.value), state);\n return true;\n }\n }\n\n /**\n * generic global eval which runs the embedded css and scripts\n */\n globalEval() {\n // phase one, if we have head inserts, we build up those before going into the script eval phase\n let insertHeadElems = new ExtDomQuery(...this.internalContext.getIf(DEFERRED_HEAD_INSERTS).value);\n insertHeadElems.runHeadInserts(true);\n\n // phase 2 we run a script eval on all updated elements in the body\n let updateElems = new ExtDomQuery(...this.internalContext.getIf(UPDATE_ELEMS).value);\n updateElems.runCss();\n // phase 3, we do the same for the css\n updateElems.runScripts();\n }\n\n /**\n * Postprocessing view state fixing\n * this appends basically the incoming view states to the forms.\n * It is called from outside after all forms have been processed basically\n * as last lifecycle step, before going into the next request.\n */\n fixViewStates() {\n ofAssoc(this.internalContext.getIf(APPLIED_VST).orElse({}).value)\n .forEach(([, value]) => {\n const namingContainerId = this.internalContext.getIf(NAMING_CONTAINER_ID);\n const namedViewRoot = !!this.internalContext.getIf(NAMED_VIEWROOT).value\n const affectedForms = this.getContainerForms(namingContainerId)\n .filter(affectedForm => this.isInExecuteOrRender(affectedForm));\n\n this.appendViewStateToForms(affectedForms, namedViewRoot, value.value, namingContainerId.orElse(\"\").value);\n })\n }\n\n\n\n /**\n * same as with view states before applies the incoming client windows as last step after the rest of the processing\n * is done.\n */\n fixClientWindow() {\n ofAssoc(this.internalContext.getIf(APPLIED_CLIENT_WINDOW).orElse({}).value)\n .forEach(([, value]) => {\n const namingContainerId = this.internalContext.getIf(NAMING_CONTAINER_ID);\n const namedViewRoot = !!this.internalContext.getIf(NAMED_VIEWROOT).value;\n const affectedForms = this.getContainerForms(namingContainerId)\n .filter(affectedForm => this.isInExecuteOrRender(affectedForm));\n\n this.appendClientWindowToForms(affectedForms, namedViewRoot, value.value, namingContainerId.orElse(\"\").value);\n });\n }\n\n updateNamedViewRootState() {\n let partialId = this.internalContext.getIf(NAMING_CONTAINER_ID);\n let namedViewRoot = this.internalContext.getIf(NAMED_VIEWROOT);\n if(partialId.isPresent() &&\n (namedViewRoot.isAbsent() ||\n !namedViewRoot.value)) {\n const SEP = $faces().separatorchar;\n this.internalContext.assign(NAMED_VIEWROOT).value = (!!document.getElementById(partialId.value)) || DQ$(`input[name*='${$nsp(P_VIEWSTATE)}']`)\n .filter(node => node.attr(\"name\").value.indexOf(partialId.value + SEP) == 0).length > 0;\n }\n }\n\n /**\n * all processing done we can close the request and send the appropriate events\n */\n done() {\n const eventData = EventData.createFromRequest(this.request.value, this.externalContext, SUCCESS);\n\n //because some frameworks might decorate them over the context in the response\n const eventHandler = this.externalContext.getIf(ON_EVENT).orElseLazy(() => this.internalContext.getIf(ON_EVENT).value).orElse(EMPTY_FUNC).value;\n Implementation.sendEvent(eventData, eventHandler);\n }\n\n /**\n * proper viewState -> form assignment\n *\n * @param forms the forms to append the viewState to\n * @param viewState the final viewState\n * @param namingContainerId\n */\n private appendViewStateToForms(forms: DQ, namedViewRoot: boolean, viewState: string, namingContainerId = \"\") {\n this.assignState(forms, $nsp(SEL_VIEWSTATE_ELEM), namedViewRoot, viewState, namingContainerId);\n }\n\n\n /**\n * proper clientWindow -> form assignment\n *\n * @param forms the forms to append the viewState to\n * @param clientWindow the final viewState\n * @param namingContainerId\n */\n private appendClientWindowToForms(forms: DQ, namedViewRoot: boolean, clientWindow: string, namingContainerId = \"\") {\n this.assignState(forms, $nsp(SEL_CLIENT_WINDOW_ELEM), namedViewRoot, clientWindow, namingContainerId);\n }\n\n /**\n * generic append state which appends a certain state as hidden element to an existing set of forms\n *\n * @param forms the forms to append or change to\n * @param selector the selector for the state\n * @param namedViewRoot if set to true, the name is also prefixed\n * @param state the state itself which needs to be assigned\n *\n * @param namingContainerId\n * @private\n */\n private assignState(forms: DQ, selector: string, namedViewRoot: boolean, state: string, namingContainerId: string) {\n /**\n * creates the viewState or client window id element\n * @param form\n */\n const createAndAppendHiddenInput = (form: DomQuery) => {\n return new HiddenInputBuilder(selector)\n .withNamingContainerId(namingContainerId)\n .withParent(form)\n .withNamedViewRoot(namedViewRoot)\n .build();\n };\n\n forms.each(form => {\n const hiddenInput = form.querySelectorAll(selector)\n .orElseLazy(() => createAndAppendHiddenInput(form));\n hiddenInput.val = state;\n });\n }\n\n /**\n * Stores certain aspects of the dom for later post-processing\n *\n * @param updateForms the update forms which should receive standardized internal jsf data\n * @param toBeEvaluated the resulting elements which should be evaluated\n */\n private storeForPostProcessing(updateForms: DQ, toBeEvaluated: DQ) {\n this.storeForUpdate(updateForms);\n this.storeForEval(toBeEvaluated);\n }\n\n /**\n * helper to store a given form for the update post-processing (viewState)\n *\n * @param updateForms the dom query object pointing to the forms which need to be updated\n */\n private storeForUpdate(updateForms: DQ) {\n this.internalContext.assign(UPDATE_FORMS).value.push(updateForms);\n }\n\n /**\n * same for eval (js and css)\n *\n * @param toBeEvaluated\n */\n private storeForEval(toBeEvaluated: DQ) {\n this.internalContext.assign(UPDATE_ELEMS).value.push(toBeEvaluated);\n }\n\n /**\n * check whether a given XMLQuery node is an explicit viewState node\n *\n * @param node the node to check\n * @returns if it is a viewState node\n */\n private static isViewStateNode(node: XMLQuery): boolean {\n const SEP = $faces().separatorchar;\n return \"undefined\" != typeof node?.id?.value && (node?.id?.value == $nsp(P_VIEWSTATE) ||\n node?.id?.value?.indexOf([SEP, $nsp(P_VIEWSTATE)].join(EMPTY_STR)) != -1 ||\n node?.id?.value?.indexOf([$nsp(P_VIEWSTATE), SEP].join(EMPTY_STR)) != -1);\n }\n\n /**\n * incoming client window node also needs special processing\n *\n * @param node the node to check\n * @returns true of it ii\n */\n private static isClientWindowNode(node: XMLQuery): boolean {\n const SEP = $faces().separatorchar;\n return \"undefined\" != typeof node?.id?.value && (node?.id?.value == $nsp(P_CLIENT_WINDOW) ||\n node?.id?.value?.indexOf([SEP, $nsp(P_CLIENT_WINDOW)].join(EMPTY_STR)) != -1 ||\n node?.id?.value?.indexOf([$nsp(P_CLIENT_WINDOW), SEP].join(EMPTY_STR)) != -1);\n }\n\n private triggerOnError(errorData: ErrorData) {\n this.externalContext.getIf(ON_ERROR).orElseLazy(() => this.internalContext.getIf(ON_ERROR).value).orElse(EMPTY_FUNC).value(errorData);\n }\n\n /**\n * filters the forms according to being member of the \"execute\" or \"render\" cycle\n * @param affectedForm\n * @private\n */\n private isInExecuteOrRender(affectedForm) {\n const executes = this.externalContext.getIf($nsp(P_EXECUTE)).orElse(\"@none\").value.split(/\\s+/gi);\n const renders = this.externalContext.getIf(P_RENDER_OVERRIDE)\n .orElseLazy(() => this.externalContext.getIf($nsp(P_RENDER)).value)\n .orElse(IDENT_NONE).value.split(/\\s+/gi);\n const executeAndRenders = executes.concat(...renders);\n return [...executeAndRenders].filter(nameOrId => {\n if ([IDENT_ALL, IDENT_NONE].indexOf(nameOrId) != -1) {\n return true;\n }\n\n const NAME_OR_ID = this.getNameOrIdSelector(nameOrId);\n //either the form directly is in execute or render or one of its children or one of its parents\n return affectedForm.matchesSelector(NAME_OR_ID) ||\n affectedForm.querySelectorAll(NAME_OR_ID).isPresent() ||\n affectedForm.firstParent(NAME_OR_ID).isPresent();\n }).length > 0;\n }\n\n /**\n * gets all forms under a single naming container id\n * @param namingContainerId\n * @private\n */\n private getContainerForms(namingContainerId: Config) {\n if (namingContainerId.isPresent()) {\n //naming container mode, all forms under naming container id must be processed\n return DQ$(this.getNameOrIdSelector(namingContainerId.value))\n // missing condition if the naming container is not present we have to\n // use the body as fallback\n .orElseLazy(() => DQ.byTagName(HTML_TAG_BODY))\n .byTagName(HTML_TAG_FORM, true);\n } else {\n return DQ.byTagName(HTML_TAG_FORM);\n }\n }\n\n private getNameOrIdSelector(nameOrId) {\n return `[id='${nameOrId}'], [name='${nameOrId}']`;\n }\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {Config, DQ} from \"mona-dish\";\nimport {$nsp, EMPTY_STR, IDENT_NONE, P_VIEWSTATE} from \"../core/Const\";\n\nimport {\n encodeFormData,\n fixEmptyParameters, getFormInputsAsArr\n} from \"../util/FileUtils\";\nimport {ExtLang} from \"../util/Lang\";\nimport ofAssoc = ExtLang.ofAssoc;\nimport {Es2019Array} from \"mona-dish\";\n\n\ntype ParamsMapper<V, K> = (key: V, item: K) => [V, K];\nconst defaultParamsMapper: ParamsMapper<string, any> = (key, item) => [key, item];\n\n/**\n * A unified form data class\n * which builds upon our configuration.\n *\n * We cannot use standard html5 forms everywhere\n * due to api constraints on the HTML Form object in IE11\n * and due to the url encoding constraint given by the faces.js spec\n *\n *\n * internal storage format\n * every value is stored as an array\n * even scalar ones!\n */\nexport class XhrFormData extends Config {\n /**\n * Checks if the given datasource is a multipart request source\n * multipart is only needed if one of the executes is a file input\n * since file inputs are stateless, they fall out of the view state\n * and need special handling. With file submits we have to send a formData object\n * instead of an encoded string files cannot be sent that way\n */\n isMultipartRequest: boolean = false;\n\n /**\n * data collector from a given form\n *\n * @param dataSource either a form as DomQuery object or an encoded url string\n * @param paramsMapper a remapper for the params keys and values\n * @param executes the executes id list for the elements to being processed\n * @param partialIds partial ids to collect, to reduce the data sent down\n */\n constructor(private dataSource: DQ, private paramsMapper: ParamsMapper<string, any> = defaultParamsMapper, executes?: string[], private partialIds?: string[]) {\n super({});\n //encode and append the issuing item if not a partial ids array of ids is passed\n /*\n * Spec. 13.3.1\n * Collect and encode input elements.\n * Additionally the hidden element jakarta.faces.ViewState\n * Enhancement partial page submit\n */\n this.resolveRequestType(this.dataSource, executes);\n this.encodeSubmittableFields(this.dataSource, this.partialIds);\n this.applyViewState(this.dataSource);\n }\n\n /**\n * @returns a Form data representation, this is needed for file submits\n */\n toFormData(): FormData {\n /*\n * expands key: [item1, item2]\n * to: [{key: key, value: item1}, {key: key, value: item2}]\n */\n let expandValueArrays = ([key, item]) => {\n if (Array.isArray(item)) {\n return new Es2019Array(...item).map(value => {\n return {key, value}\n })\n }\n return [{key, value: item}]\n }\n\n /*\n * remaps the incoming {key, value} tuples\n * to naming container prefixed keys and values\n */\n let remapForNamingContainer = ({key, value}) => {\n key = this.remapKeyForNamingContainer(key);\n return {key, value}\n };\n\n /*\n * collects everything into a FormData object\n */\n return ofAssoc(this.value)\n .flatMap(expandValueArrays)\n .map(remapForNamingContainer)\n .reduce((formData: FormData, {key, value}: any) => {\n formData.append(key, value);\n return formData;\n }, new FormData()) as FormData;\n }\n\n /**\n * returns an encoded string representation of our xhr form data\n *\n * @param defaultStr optional default value if nothing is there to encode\n */\n toString(defaultStr = EMPTY_STR): string {\n return encodeFormData(this, this.paramsMapper, defaultStr);\n }\n\n /**\n * generic post init code, for now, this performs some post assign data post-processing\n * @param rootElement the root element which knows the request type (usually a form)\n * @param executes the executable dom nodes which need to be processed into the form data, which we can send\n * in our ajax request\n */\n private resolveRequestType(rootElement: DQ, executes?: Array<string>) {\n if (!executes || executes.indexOf(IDENT_NONE) != -1) {\n return;\n }\n this.isMultipartRequest = rootElement.isMultipartCandidate(true);\n }\n\n /**\n * special case view state handling\n *\n * @param form the form holding the view state value\n */\n private applyViewState(form: DQ) {\n if (this.getIf($nsp(P_VIEWSTATE)).isPresent()) {\n return;\n }\n let viewStateElement = form.querySelectorAllDeep(`[name*='${$nsp(P_VIEWSTATE)}'`);\n let viewState = viewStateElement.inputValue;\n this.appendIf(viewState.isPresent(), this.remapKeyForNamingContainer(viewStateElement.name.value)).value = viewState.value;\n }\n\n /**\n * determines fields to submit\n * @param {Node} parentItem - form element item is nested in\n * @param {Array} partialIds - ids fo PPS\n */\n private encodeSubmittableFields(parentItem: DQ, partialIds: string[] = []) {\n\n const mergeIntoThis = ([key, value]) => this.append(key).value = value;\n const namingContainerRemap = ([key, value]) => this.paramsMapper(key as string, value);\n\n const remappedPartialIds = partialIds.map(partialId => this.remapKeyForNamingContainer(partialId));\n const partialIdsFilter = ([key, value]) => (!remappedPartialIds.length || key.indexOf(\"@\") == 0) ? true :\n remappedPartialIds.indexOf(key) != -1;\n\n let inputs = getFormInputsAsArr(parentItem);\n inputs\n .map(fixEmptyParameters)\n .map(namingContainerRemap)\n .filter(partialIdsFilter)\n .forEach(mergeIntoThis);\n }\n\n private remapKeyForNamingContainer(key: string): string {\n return this.paramsMapper(key, \"\")[0];\n }\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {AsyncRunnable, IAsyncRunnable} from \"../util/AsyncRunnable\";\nimport {Config, DQ, XMLQuery} from \"mona-dish\";\nimport {Implementation} from \"../AjaxImpl\";\n\nimport {XhrFormData} from \"./XhrFormData\";\nimport {ErrorData} from \"./ErrorData\";\nimport {EventData} from \"./EventData\";\nimport {ExtLang} from \"../util/Lang\";\nimport {\n $faces,\n BEGIN,\n COMPLETE,\n CONTENT_TYPE,\n CTX_PARAM_MF_INTERNAL,\n CTX_PARAM_REQ_PASS_THR,\n ERROR,\n HEAD_FACES_REQ,\n MALFORMEDXML,\n NO_TIMEOUT,\n ON_ERROR,\n ON_EVENT,\n P_EXECUTE,\n REQ_ACCEPT,\n REQ_TYPE_GET,\n REQ_TYPE_POST,\n SOURCE,\n STATE_EVT_TIMEOUT,\n STD_ACCEPT,\n URL_ENCODED,\n VAL_AJAX,\n IDENT_NONE,\n CTX_PARAM_SRC_FRM_ID,\n CTX_PARAM_SRC_CTL_ID,\n CTX_PARAM_PPS,\n EMPTY_RESPONSE,\n HTTP_ERROR,\n EMPTY_STR,\n $nsp,\n P_BEHAVIOR_EVENT,\n CTX_PARAM_UPLOAD_ON_PROGRESS,\n CTX_PARAM_UPLOAD_LOAD,\n CTX_PARAM_UPLOAD_LOADSTART,\n CTX_PARAM_UPLOAD_LOADEND,\n CTX_PARAM_UPLOAD_ABORT,\n CTX_PARAM_UPLOAD_TIMEOUT,\n CTX_PARAM_UPLOAD_ERROR,\n CTX_PARAM_UPLOAD_PREINIT\n} from \"../core/Const\";\nimport {\n resolveFinalUrl,\n resolveHandlerFunc,\n resoveNamingContainerMapper\n} from \"./RequestDataResolver\";\nimport failSaveExecute = ExtLang.failSaveExecute;\nimport {ExtConfig} from \"../util/ExtDomQuery\";\n\n/**\n * Faces XHR Request Wrapper\n * as AsyncRunnable for our Asynchronous queue\n * This means from the outside the\n * xhr request is similar to a Promise in a way\n * that you can add then and catch and finally callbacks.\n *\n *\n * The idea is that we basically just enqueue\n * a single ajax request into our queue\n * and let the queue do the processing.\n *\n *\n */\n\nexport class XhrRequest extends AsyncRunnable<XMLHttpRequest> {\n\n private responseContext: Config;\n\n private stopProgress = false;\n\n\n private xhrObject = new XMLHttpRequest();\n\n static readonly TYPE_CHECKBOX = \"checkbox\";\n static readonly TYPE_RADIO = \"radio\";\n\n\n /**\n * Required Parameters\n *\n * @param requestContext the request context with all pass through values\n * @param internalContext internal context with internal info which is passed through, not used by the user\n * Optional Parameters\n * @param timeout optional xhr timeout\n * @param ajaxType optional request type, default \"POST\"\n * @param contentType optional content type, default \"application/x-www-form-urlencoded\"\n */\n constructor(\n private requestContext: ExtConfig,\n private internalContext: Config,\n private timeout = NO_TIMEOUT,\n private ajaxType = REQ_TYPE_POST,\n private contentType = URL_ENCODED\n ) {\n super();\n // we omit promises here because we have to deal with cancel functionality,\n // and promises to not provide that (yet) instead we have our async queue\n // which uses an api internally, which is very close to promises\n this.registerXhrCallbacks((data: any) => this.resolve(data), (data: any) => this.reject(data));\n }\n\n start(): IAsyncRunnable<XMLHttpRequest> {\n\n let ignoreErr = failSaveExecute;\n let xhrObject = this.xhrObject;\n let sourceForm = DQ.byId(this.internalContext.getIf(CTX_PARAM_SRC_FRM_ID).value)\n\n\n let executesArr = () => {\n return this.requestContext.getIf(CTX_PARAM_REQ_PASS_THR, P_EXECUTE).get(IDENT_NONE).value.split(/\\s+/gi);\n };\n\n try {\n // encoded we need to decode\n // We generated a base representation of the current form\n // in case someone has overloaded the viewState with additional decorators we merge\n // that in, there is no way around it, the spec allows it and getViewState\n // must be called, so whatever getViewState delivers has higher priority then\n // whatever the formData object delivers\n // the partialIdsArray arr is almost deprecated legacy code where we allowed to send a separate list of partial\n // ids for reduced load and server processing, this will be removed soon, we can handle the same via execute\n const executes = executesArr();\n const partialIdsArray = this.internalContext.getIf(CTX_PARAM_PPS).value === true ? executes : [];\n const formData: XhrFormData = new XhrFormData(\n sourceForm,\n resoveNamingContainerMapper(this.internalContext),\n executes, partialIdsArray\n );\n\n this.contentType = formData.isMultipartRequest ? \"undefined\" : this.contentType;\n\n // next step the pass through parameters are merged in for post params\n this.requestContext.$nspEnabled = false;\n const requestContext = this.requestContext;\n const requestPassThroughParams = requestContext.getIf(CTX_PARAM_REQ_PASS_THR) as ExtConfig;\n\n // we are turning off here the jsf, faces remapping because we are now dealing with\n // pass-through parameters\n requestPassThroughParams.$nspEnabled = false;\n // this is an extension where we allow pass through parameters to be sent down additionally\n // this can be used and is used in the impl to enrich the post request parameters with additional\n // information\n try {\n formData.shallowMerge(requestPassThroughParams, true, true);\n } finally {\n // unfortunately as long as we support\n // both namespaces we have to keep manual control\n // on the key renaming before doing ops like deep copy\n this.requestContext.$nspEnabled = true;\n requestPassThroughParams.$nspEnabled = true;\n }\n\n this.appendIssuingItem(formData);\n\n this.responseContext = requestPassThroughParams.deepCopy;\n\n // we have to shift the internal passthroughs around to build up our response context\n const responseContext = this.responseContext;\n\n responseContext.assign(CTX_PARAM_MF_INTERNAL).value = this.internalContext.value;\n\n // per spec the onEvent and onError handlers must be passed through to the response\n responseContext.assign(ON_EVENT).value = requestContext.getIf(ON_EVENT).value;\n responseContext.assign(ON_ERROR).value = requestContext.getIf(ON_ERROR).value;\n\n xhrObject.open(this.ajaxType, resolveFinalUrl(sourceForm, formData, this.ajaxType), true);\n\n // adding timeout\n this.timeout ? xhrObject.timeout = this.timeout : null;\n\n // a bug in the xhr stub library prevents the setRequestHeader to be properly executed on fake xhr objects\n // normal browsers should resolve this\n // tests can quietly fail on this one\n if (this.contentType != \"undefined\") {\n ignoreErr(() => xhrObject.setRequestHeader(CONTENT_TYPE, `${this.contentType}; charset=utf-8`));\n }\n\n ignoreErr(() => xhrObject.setRequestHeader(HEAD_FACES_REQ, VAL_AJAX));\n\n // probably not needed anymore, will test this\n // some webkit based mobile browsers do not follow the w3c spec of\n // setting, they accept headers automatically\n ignoreErr(() => xhrObject.setRequestHeader(REQ_ACCEPT, STD_ACCEPT));\n\n this.sendEvent(BEGIN);\n this.sendRequest(formData);\n } catch (e) {\n // this happens usually in a client side condition, hence we have to deal in with it in a client\n // side manner\n this.handleErrorAndClearQueue(e);\n throw e;\n }\n return this;\n }\n\n\n\n cancel() {\n try {\n // this causes onError to be called where the error\n // handling takes over\n this.xhrObject.abort();\n } catch (e) {\n this.handleError(e);\n }\n }\n\n\n /**\n * attaches the internal event and processing\n * callback within the promise to our xhr object\n *\n * @param resolve\n * @param reject\n */\n private registerXhrCallbacks(resolve: Consumer<any>, reject: Consumer<any>) {\n const xhrObject = this.xhrObject;\n\n xhrObject.onabort = () => {\n this.onAbort(resolve, reject);\n };\n xhrObject.ontimeout = () => {\n this.onTimeout(resolve, reject);\n };\n xhrObject.onload = () => {\n this.onResponseReceived(resolve)\n };\n xhrObject.onloadend = () => {\n this.onResponseProcessed(this.xhrObject, resolve);\n };\n\n if(xhrObject?.upload) {\n //this is an extension so that we can send the upload object of the current\n //request before any operation\n this.internalContext.getIf(CTX_PARAM_UPLOAD_PREINIT).value?.(xhrObject.upload);\n //now we hook in the upload events\n xhrObject.upload.addEventListener(\"progress\", (event: ProgressEvent) => {\n this.internalContext.getIf(CTX_PARAM_UPLOAD_ON_PROGRESS).value?.(xhrObject.upload, event);\n });\n xhrObject.upload.addEventListener(\"load\", (event: ProgressEvent) => {\n this.internalContext.getIf(CTX_PARAM_UPLOAD_LOAD).value?.(xhrObject.upload, event);\n });\n xhrObject.upload.addEventListener(\"loadstart\", (event: ProgressEvent) => {\n this.internalContext.getIf(CTX_PARAM_UPLOAD_LOADSTART).value?.(xhrObject.upload, event);\n });\n xhrObject.upload.addEventListener(\"loadend\", (event: ProgressEvent) => {\n this.internalContext.getIf(CTX_PARAM_UPLOAD_LOADEND).value?.(xhrObject.upload, event);\n });\n xhrObject.upload.addEventListener(\"abort\", (event: ProgressEvent) => {\n this.internalContext.getIf(CTX_PARAM_UPLOAD_ABORT).value?.(xhrObject.upload, event);\n });\n xhrObject.upload.addEventListener(\"timeout\", (event: ProgressEvent) => {\n this.internalContext.getIf(CTX_PARAM_UPLOAD_TIMEOUT).value?.(xhrObject.upload, event);\n });\n xhrObject.upload.addEventListener(\"error\", (event: ProgressEvent) => {\n this.internalContext.getIf(CTX_PARAM_UPLOAD_ERROR).value?.(xhrObject.upload, event);\n });\n\n }\n\n xhrObject.onerror = (errorData: any) => {\n // Safari in rare cases triggers an error when cancelling a request internally, or when\n // in this case we simply ignore the request and clear up the queue, because\n // it is not safe anymore to proceed with the current queue\n\n // This bypasses a Safari issue where it keeps requests hanging after page unload\n // and then triggers a cancel error on then instead of just stopping\n // and clearing the code\n // in a page unload case it is safe to clear the queue\n // in the exact safari case any request after this one in the queue is invalid\n // because the queue references xhr requests to a page which already is gone!\n if (this.isCancelledResponse(this.xhrObject)) {\n /*\n * this triggers the catch chain and after that finally\n */\n this.stopProgress = true;\n reject();\n return;\n }\n // error already processed somewhere else\n if (this.stopProgress) {\n return;\n }\n this.handleError(errorData);\n };\n }\n\n private isCancelledResponse(currentTarget: XMLHttpRequest): boolean {\n return currentTarget?.status === 0 && // cancelled internally by browser\n currentTarget?.readyState === 4 &&\n currentTarget?.responseText === '' &&\n currentTarget?.responseXML === null;\n }\n\n /*\n * xhr processing callbacks\n *\n * Those methods are the callbacks called by\n * the xhr object depending on its own state\n */\n /**\n * client side abort... also here for now we clean the queue\n *\n * @param resolve\n * @param reject\n * @private\n */\n private onAbort(resolve: Consumer<any>, reject: Consumer<any>) {\n // reject means clear queue, in this case we abort entirely the processing\n // does not happen yet, we have to probably rethink this strategy in the future\n // when we introduce cancel functionality\n this.handleHttpError(reject);\n }\n\n /**\n * request timeout, this must be handled like a generic server error per spec\n * unfortunately, so we have to jump to the next item (we cancelled before)\n * @param resolve\n * @param reject\n * @private\n */\n private onTimeout(resolve: Consumer<any>, reject: Consumer<any>) {\n // timeout also means we we probably should clear the queue,\n // the state is unsafe for the next requests\n this.sendEvent(STATE_EVT_TIMEOUT);\n this.handleHttpError(resolve);\n }\n\n /**\n * the response is received and normally is a normal response\n * but also can be some kind of error (http code >= 300)\n * In any case the response will be resolved either as error or response\n * and the next item in the queue will be processed\n * @param resolve\n * @private\n */\n private onResponseReceived(resolve: Consumer<any>) {\n\n this.sendEvent(COMPLETE);\n\n //request error resolution as per spec:\n if(!this.processRequestErrors(resolve)) {\n $faces().ajax.response(this.xhrObject, this.responseContext.value ?? {});\n }\n }\n\n private processRequestErrors(resolve: Consumer<any>): boolean {\n const responseXML = new XMLQuery(this.xhrObject?.responseXML);\n const responseCode = this.xhrObject?.status ?? -1;\n if(responseXML.isXMLParserError()) {\n // invalid response\n const errorName = \"Invalid Response\";\n const errorMessage = \"The response xml is invalid\";\n\n this.handleGenericResponseError(errorName, errorMessage, MALFORMEDXML, resolve);\n return true;\n } else if(responseXML.isAbsent()) {\n // empty response\n const errorName = \"Empty Response\";\n const errorMessage = \"The response has provided no data\";\n\n this.handleGenericResponseError(errorName, errorMessage, EMPTY_RESPONSE, resolve);\n return true;\n } else if (responseCode >= 300 || responseCode < 200) {\n // other server errors\n // all errors from the server are resolved without interfering in the queue\n this.handleHttpError(resolve);\n return true;\n }\n //additional errors are application errors and must be handled within the response\n return false;\n }\n private handleGenericResponseError(errorName: string, errorMessage: string, responseStatus: string, resolve: (s?: any) => void) {\n const errorData: ErrorData = new ErrorData(\n this.internalContext.getIf(CTX_PARAM_SRC_CTL_ID).value,\n errorName, errorMessage,\n this.xhrObject?.responseText ?? \"\",\n this.xhrObject?.responseXML ?? null,\n this.xhrObject.status,\n responseStatus\n );\n this.finalizeError(errorData, resolve);\n }\n\n private handleHttpError(resolveOrReject: Function, errorMessage: string = \"Generic HTTP Serror\") {\n this.stopProgress = true;\n\n const errorData = new ErrorData(\n this.internalContext.getIf(CTX_PARAM_SRC_CTL_ID).value,\n HTTP_ERROR, errorMessage,\n this.xhrObject?.responseText ?? \"\",\n this.xhrObject?.responseXML ?? null,\n this.xhrObject?.status ?? -1,\n HTTP_ERROR\n )\n this.finalizeError(errorData, resolveOrReject);\n }\n\n private finalizeError(errorData: ErrorData, resolveOrReject: Function) {\n try {\n this.handleError(errorData, true);\n } finally {\n // we issue a resolveOrReject in this case to allow the system to recover\n // reject would clean up the queue\n // resolve would trigger the next element in the queue to be processed\n resolveOrReject(errorData);\n this.stopProgress = true;\n }\n }\n\n /**\n * last minute cleanup, the request now either is fully done\n * or not by having had a cancel or error event be\n * @param data\n * @param resolve\n * @private\n */\n private onResponseProcessed(data: any, resolve: Consumer<any>) {\n // if stop progress true, the cleanup already has been performed\n if (this.stopProgress) {\n return;\n }\n /*\n * normal case, cleanup == next item if possible\n */\n resolve(data);\n }\n\n private sendRequest(formData: XhrFormData) {\n const isPost = this.ajaxType != REQ_TYPE_GET;\n if (formData.isMultipartRequest) {\n // in case of a multipart request we send in a formData object as body\n this.xhrObject.send((isPost) ? formData.toFormData() : null);\n } else {\n // in case of a normal request we send it normally\n this.xhrObject.send((isPost) ? formData.toString() : null);\n }\n }\n\n /*\n * other helpers\n */\n private sendEvent(evtType: string) {\n const eventData = EventData.createFromRequest(this.xhrObject, this.requestContext, evtType);\n try {\n // User code error, we might cover\n // this in onError, but also we cannot swallow it.\n // We need to resolve the local handlers lazily,\n // because some frameworks might decorate them over the context in the response\n let eventHandler = resolveHandlerFunc(this.requestContext, this.responseContext, ON_EVENT);\n Implementation.sendEvent(eventData, eventHandler);\n } catch (e) {\n e.source = e?.source ?? this.requestContext.getIf(SOURCE).value;\n // this is a client error, no save state anymore for queue processing!\n this.handleErrorAndClearQueue(e);\n // we forward the error upward like all client side errors\n throw e;\n }\n }\n\n private handleErrorAndClearQueue(e, responseFormatError: boolean = false) {\n this.handleError(e, responseFormatError);\n this.reject(e);\n }\n\n private handleError(exception, responseFormatError: boolean = false) {\n const errorData = (responseFormatError) ? ErrorData.fromHttpConnection(exception.source, exception.type, exception.message ?? EMPTY_STR, exception.responseText, exception.responseXML, exception.responseCode, exception.status) : ErrorData.fromClient(exception);\n const eventHandler = resolveHandlerFunc(this.requestContext, this.responseContext, ON_ERROR);\n\n Implementation.sendError(errorData, eventHandler);\n }\n\n private appendIssuingItem(formData: XhrFormData) {\n const issuingItemId = this.internalContext.getIf(CTX_PARAM_SRC_CTL_ID).value;\n\n //to avoid sideffects with buttons we only can append the issuing item if no behavior event is set\n //MYFACES-4679!\n const eventType = formData.getIf($nsp(P_BEHAVIOR_EVENT)).value?.[0] ?? null;\n const isBehaviorEvent = (!!eventType) && eventType != 'click';\n\n //not encoded\n if(issuingItemId && formData.getIf(issuingItemId).isAbsent() && !isBehaviorEvent) {\n const issuingItem = DQ.byId(issuingItemId);\n const itemValue = issuingItem.inputValue;\n const arr = new ExtConfig({});\n const type: string = issuingItem.type.orElse(\"\").value.toLowerCase();\n\n //Checkbox and radio only value pass if checked is set, otherwise they should not show\n //up at all, and if checked is set, they either can have a value or simply being boolean\n if((type == XhrRequest.TYPE_CHECKBOX || type == XhrRequest.TYPE_RADIO) && !issuingItem.checked) {\n return;\n } else if((type == XhrRequest.TYPE_CHECKBOX || type == XhrRequest.TYPE_RADIO)) {\n arr.assign(issuingItemId).value = itemValue.orElse(true).value;\n } else if (itemValue.isPresent()) {\n arr.assign(issuingItemId).value = itemValue.value;\n }\n\n formData.shallowMerge(arr, true, true);\n }\n }\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {DQ} from \"mona-dish\";\nimport {ExtLang} from \"../impl/util/Lang\";\n\n/**\n * legacy code to enable various aspects\n * of myfaces, used to be rendered inline\n * for jsf 2.0 we can externalize it into its own custom resource\n *\n * note this is a straight 1:1 port from the existing codebase\n * (not too much work has been spent here, the important thing is, that\n * the namespace and functions need to be kept intact for legacy code)\n *\n * we might move the code over in the future, but for now a straight 1:1 port suffices\n */\nexport module oam {\n import ofAssoc = ExtLang.ofAssoc;\n /**\n * sets a hidden input field\n * @param formName the formName\n * @param name the hidden field\n * @param value the value to be rendered\n */\n export const setHiddenInput = function (formName: string, name: string, value: string): void {\n DQ.byId(document.forms[formName])\n .each(form => {\n const input = form.querySelectorAll(`input[type='hidden'][name='${name}']`);\n if (input.isPresent()) {\n input.inputValue.value = value;\n } else {\n const newInput = DQ.fromMarkup(`<input type='hidden' id='${name}' name='${name}'>`);\n newInput.inputValue.value = value;\n newInput.appendTo(form);\n }\n });\n };\n\n /**\n * clears a hidden input field\n *\n * @param formName formName for the input\n * @param name the name of the input field\n */\n export const clearHiddenInput = function (formName: string, name: string): void {\n let element = document.forms?.[formName]?.elements?.[name];\n if(!element) {\n return;\n }\n DQ.byId(element).delete();\n };\n\n // noinspection JSUnusedGlobalSymbols,JSUnusedLocalSymbols\n /**\n * does special form submit remapping\n * re-maps the issuing command link into something,\n * the \"decode\" of the command link on the server can understand\n *\n * @param formName\n * @param linkId\n * @param target\n * @param params\n */\n export const submitForm = function (formName: string, linkId: string | null = null, target: string |null = null, params: AssocArr<any> | Tuples<string, any> | null = {} ): boolean {\n\n\n //handle a possible incoming null, not sure if this is used that way anywhere, but we allow it\n params = (!params) ? {} : params;\n\n let clearFn = 'clearFormHiddenParams_' + formName.replace(/-/g, '\\$:').replace(/:/g, '_');\n window?.[clearFn]?.(formName);\n\n //autoscroll code\n if (window?.myfaces?.core?.config?.autoScroll && (window as any)?.getScrolling) {\n myfaces.oam.setHiddenInput(formName, 'autoScroll', (window as any)?.getScrolling());\n }\n let paramsStream: Array<[string, any]> = Array.isArray(params) ? [...params] : ofAssoc(params);\n paramsStream.forEach(([key, data]) => myfaces.oam.setHiddenInput(formName, key, data));\n\n //we call the namespaced function, to allow decoration, via a direct call we would\n myfaces.oam.setHiddenInput(formName, `${formName}:_idcl`, linkId ?? '');\n\n\n DQ.byId(document.forms?.[formName] ?? document.getElementById(formName)).each(form => {\n const ATTR_TARGET = \"target\";\n const formElement = form.getAsElem(0).value as HTMLFormElement;\n const oldTarget = (form.getAsElem(0).value as HTMLFormElement).getAttribute(\"target\");\n\n if(target != \"null\" && target) {\n (form.getAsElem(0).value as HTMLFormElement).setAttribute(\"target\", target);\n }\n\n const result = formElement?.onsubmit?.(null);\n\n try {\n if ((!!result) || 'undefined' == typeof result) {\n formElement.submit();\n }\n } catch (e) {\n window?.console.error(e);\n } finally {\n if(oldTarget == null || oldTarget == \"null\") {\n (form.getAsElem(0).value as HTMLFormElement).removeAttribute(\"target\");\n } else {\n (form.getAsElem(0).value as HTMLFormElement).setAttribute(\"target\", oldTarget);\n }\n\n // noinspection JSUnusedLocalSymbols\n paramsStream.forEach(([key, data]) => {\n myfaces.oam.clearHiddenInput(formName, key);\n });\n myfaces.oam.clearHiddenInput(formName, `${formName}:_idcl`);\n }\n\n });\n return false;\n };\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\"use strict\";\n/**\n * jsf.js init layer which provides as per spec the proper\n * window namespace if it does not exist already\n * if this file is included then the code falls back with its namespaces\n * on jsf2.3 or earlier level, for 4.0+ please include faces.js\n */\nif(!window?.jsf) {\n const faces = require(\"./_api\").faces;\n (window as any)['jsf'] = window?.jsf ?? faces;\n window.jsf.specversion = 230000;\n delete window.jsf.contextpath;\n\n let faces4Init = faces.push.init;\n /*\n * we shim back the breaking api change from 3.0 to 4.0\n * onerror is gone\n */\n faces.push.init = (socketClientId: string,\n url: string,\n channel: string,\n onopen: Function,\n onmessage: Function,\n // no on error api change for 4.0\n //onerror: Function,\n onclose: Function,\n behaviors: any,\n autoConnect: boolean) => {\n faces4Init(socketClientId, url, channel, onopen, onmessage, null, onclose, behaviors, autoConnect);\n }\n}\nif(!window?.myfaces?.ab) {\n const myfaces = require(\"./_api\").myfaces;\n //namespace might be extended is not exclusively reserved so we merge\n (window as any)[\"myfaces\"] = window?.myfaces ?? {};\n if(!window?.myfaces?.ab) {\n const myfaces = require(\"./_api\").myfaces;\n //namespace might be extended is not exclusively reserved so we merge\n (window as any)[\"myfaces\"] = window?.myfaces ?? {};\n Object.keys(myfaces).forEach(key => window.myfaces[key] = window.myfaces?.[key] ?? myfaces[key]);\n }\n}\n\nexport var jsf = window.jsf;\nexport var myfaces = window.myfaces;"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"jsf-development.js","mappings":";;;;;;;;;;;AAAA;;;;;;;;;;;;;;;GAeG;;;AAQH,8HAA0C;AAE1C;;GAEG;AACH,MAAM,YAAY;IACd,YAAoB,MAAW;QAAX,WAAM,GAAN,MAAM,CAAK;IAAG,CAAC;IAEnC,IAAI,KAAK,CAAC,KAAuB;IACjC,CAAC;IACD,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;CACJ;AAAA,CAAC;AAEF;;;;;GAKG;AACH,SAAgB,MAAM,CAAI,MAA4B,EAAE,GAAG,UAAoB;IAC3E,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;QACvB,OAAO,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;KACnC;IACD,MAAM,YAAY,GAAG,SAAS,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC;IACtD,IAAI,QAAQ,GAAoB,IA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,CAAE,OAAO,0CAAE,EAAE,GAAE;QACrB,MAAM,OAAO,GAAG,gFAAyB,CAAC;QAC1C,qEAAqE;QACpE,MAAc,CAAC,SAAS,CAAC,GAAG,YAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,mCAAI,EAAE,CAAC;QACnD,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,eAAC,aAAM,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,kBAAM,CAAC,OAAO,0CAAG,GAAG,CAAC,mCAAI,OAAO,CAAC,GAAG,CAAC,IAAC,CAAC;KACpG;CACJ;AAEU,WAAG,GAAG,MAAM,CAAC,GAAG,CAAC;AACjB,eAAO,GAAG,MAAM,CAAC,OAAO,CAAC","sources":["webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/AssocArray.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/Config.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/DomQuery.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/Es2019Array.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/Global.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/Lang.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/Monad.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/SourcesCollectors.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/XmlQuery.ts","webpack://jsf.js_next_gen/./node_modules/mona-dish/src/main/typescript/index_core.ts","webpack://jsf.js_next_gen/./src/main/typescript/api/_api.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/AjaxImpl.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/PushImpl.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/core/Const.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/core/ImplTypes.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/i18n/Messages.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/Assertions.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/AsyncRunnable.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/ExtDomQuery.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/FileUtils.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/HiddenInputBuilder.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/Lang.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/util/XhrQueueController.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/ErrorData.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/EventData.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/RequestDataResolver.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/ResonseDataResolver.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/Response.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/ResponseProcessor.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/XhrFormData.ts","webpack://jsf.js_next_gen/./src/main/typescript/impl/xhrCore/XhrRequest.ts","webpack://jsf.js_next_gen/./src/main/typescript/myfaces/OamSubmit.ts","webpack://jsf.js_next_gen/webpack/bootstrap","webpack://jsf.js_next_gen/webpack/runtime/global","webpack://jsf.js_next_gen/./src/main/typescript/api/jsf.ts"],"sourcesContent":["/*!\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * various helpers to deal with associative\n * arrays. If someone feels uncomfortable using\n * The config system, this is similar!\n */\nimport {IValueHolder} from \"./Monad\";\nimport {Es2019Array} from \"./Es2019Array\";\n\n/**\n * A nop as assign functionality (aka ignore assign)\n */\nclass IgnoreAssign implements IValueHolder<any> {\n constructor(private parent: any) {}\n\n set value(value: any | Array<any>) {\n }\n get value(): any | Array<any> {\n return this.parent;\n }\n};\n\n/**\n * uses the known pattern from config\n * assign(target, key1, key2, key3).value = value;\n * @param target\n * @param keys\n */\nexport function assign<T>(target: {[key: string]: any}, ...accessPath: string[]): IValueHolder<T> {\n if (accessPath.length < 1) {\n return new IgnoreAssign(target);\n }\n const lastPathItem = buildPath(target, ...accessPath);\n let assigner: IValueHolder<T> = new (class {\n set value(value: T | Array<T>) {\n lastPathItem.target[lastPathItem.key] = value;\n }\n\n get value(): T | Array<T> {\n return lastPathItem.target[lastPathItem.key];\n }\n })();\n return assigner;\n}\n\n\nexport function append<T>(target: {[key: string]: any}, ...accessPath: string[]): IValueHolder<T> {\n if (accessPath.length < 1) {\n return new IgnoreAssign(target);\n }\n const lastPathItem = buildPath(target, ...accessPath);\n let appender: IValueHolder<T> = new (class {\n set value(value: T | Array<T>) {\n if(!Array.isArray(value)) {\n value = [value];\n }\n if(!lastPathItem.target[lastPathItem.key]) {\n lastPathItem.target[lastPathItem.key] = value\n } else {\n if(!Array.isArray(lastPathItem.target[lastPathItem.key])) {\n lastPathItem.target[lastPathItem.key] = [lastPathItem.target[lastPathItem.key]];\n }\n lastPathItem.target[lastPathItem.key].push(...value);\n }\n }\n })();\n return appender;\n}\n\n/**\n * uses the known pattern from config\n * assign(target, key1, key2, key3).value = value;\n * @param target\n * @param keys\n */\nexport function assignIf<T>(condition: boolean, target: {[key: string]: any}, ...accessPath: string[]): IValueHolder<T> {\n if ((!condition) || accessPath.length < 1) {\n return new IgnoreAssign(target);\n }\n return assign(target, ...accessPath);\n}\n\n\n/**\n * uses the known pattern from config\n * assign(target, key1, key2, key3).value = value;\n * @param target\n * @param keys\n */\nexport function appendIf<T>(condition: boolean, target: {[key: string]: any}, ...accessPath: string[]): IValueHolder<T> {\n if ((!condition) || accessPath.length < 1) {\n return new IgnoreAssign(target);\n }\n return append(target, ...accessPath);\n}\n\nexport function resolve<T>(target, ...accessPath: string[]): T | null {\n let ret = null;\n accessPath = flattenAccessPath(accessPath);\n let currPtr = target;\n for(let cnt = 0; cnt < accessPath.length; cnt++) {\n let accessKeyIndex: number | string = accessPath[cnt];\n accessKeyIndex = arrayIndex(accessKeyIndex) != -1 ? arrayIndex(accessKeyIndex) : accessKeyIndex;\n currPtr = currPtr?.[accessKeyIndex];\n if('undefined' == typeof currPtr) {\n return null;\n }\n ret = currPtr;\n }\n return currPtr;\n}\n\n\nfunction keyVal(key: string): string {\n let start = key.indexOf(\"[\");\n\n if (start >= 0) {\n return key.substring(0, start);\n } else {\n return key;\n }\n}\n\nfunction arrayIndex(key: string): number {\n let start = key.indexOf(\"[\");\n let end = key.indexOf(\"]\");\n if (start >= 0 && end > 0 && start < end) {\n return parseInt(key.substring(start + 1, end));\n } else {\n return -1;\n }\n}\n\nfunction isArrayPos(currKey: string, arrPos: number): boolean {\n return currKey === \"\" && arrPos >= 0;\n}\n\nfunction isNoArray(arrPos: number): boolean {\n return arrPos == -1;\n}\n\nfunction alloc(arr: Array<any>, length: number, defaultVal = {}) {\n let toAdd = [];\n toAdd.length = length;\n toAdd[length - 1] = defaultVal;\n arr.push(...toAdd);\n}\n\n\nfunction flattenAccessPath(accessPath: string[]) {\n return new Es2019Array(...accessPath).flatMap(path => path.split(\"[\"))\n .map(path => path.indexOf(\"]\") != -1 ? \"[\" + path : path)\n .filter(path => path != \"\");\n}\n\n/**\n * builds up a path, only done if no data is present!\n * @param target\n * @param accessPath\n * @returns the last assignable entry\n */\nexport function buildPath(target, ...accessPath: string[]) {\n accessPath = flattenAccessPath(accessPath);\n //we now have a pattern of having the array accessors always in separate items\n let parentPtr = target;\n let parKeyArrPos = null;\n let currKey = null;\n let arrPos = -1;\n\n for (let cnt = 0; cnt < accessPath.length; cnt++) {\n currKey = keyVal(accessPath[cnt]);\n arrPos = arrayIndex(accessPath[cnt]);\n //it now is either key or arrPos\n if (arrPos != -1) {\n //case root(array)[5] -> root must be array and allocate 5 elements\n //case root.item[5] root.item must be array and of 5 elements\n if(!Array.isArray(parentPtr)) {\n throw Error(\"Associative array referenced as index array in path reference\");\n }\n\n //we need to look ahead for proper allocation\n //not end reached\n let nextArrPos = -1;\n if(cnt < accessPath.length - 1) {\n nextArrPos = arrayIndex(accessPath[cnt + 1])\n }\n let dataPresent = 'undefined' != typeof parentPtr?.[arrPos];\n //no data present check here is needed, because alloc only reserves if not present\n alloc(parentPtr, arrPos + 1, nextArrPos != -1 ?[]: {});\n parKeyArrPos = arrPos;\n //we now go to the reserved element\n if(cnt == accessPath.length - 1) {\n parentPtr[arrPos] = (dataPresent) ? parentPtr[arrPos] : null;\n } else {\n parentPtr = parentPtr[arrPos];\n }\n } else {\n if(Array.isArray(parentPtr)) {\n throw Error(\"Index array referenced as associative array in path reference\");\n }\n //again look ahead whether the next value is an array or assoc array\n let nextArrPos = -1;\n if(cnt < accessPath.length - 1) {\n nextArrPos = arrayIndex(accessPath[cnt + 1])\n }\n parKeyArrPos = currKey;\n let dataPresent = 'undefined' != typeof parentPtr?.[currKey];\n if(cnt == accessPath.length - 1) {\n if(!dataPresent) {\n parentPtr[currKey] = null;\n }\n } else {\n if(!dataPresent) {\n parentPtr[currKey] = nextArrPos == -1 ? {} : [];\n }\n parentPtr = parentPtr[currKey];\n }\n }\n }\n\n return {target: parentPtr, key: parKeyArrPos};\n\n}\n\nexport function deepCopy(fromAssoc: {[key: string]: any}): {[key: string]: any} {\n return JSON.parse(JSON.stringify(fromAssoc));\n}\n\n/**\n * simple left to right merge\n *\n * @param assocArrays\n */\nexport function simpleShallowMerge(...assocArrays) {\n return shallowMerge(true, false, ...assocArrays);\n}\n\nfunction _appendWithOverwrite(withAppend: boolean, target: { [p: string]: any }, key, arr, toAssign) {\n if (!withAppend) {\n target[key] = arr[key];\n } else {\n //overwrite means in this case, no double entries!\n //we do not a deep compare for now a single value compare suffices\n if ('undefined' == typeof target?.[key]) {\n target[key] = toAssign\n } else if (!Array.isArray(target[key])) {\n\n let oldVal = target[key];\n let newVals = [];\n //TODO maybe deep deep compare here, but on the other hand it is\n //shallow\n toAssign.forEach(item => {\n if (oldVal != item) {\n newVals.push(item);\n }\n });\n target[key] = new Es2019Array(...[]);\n target[key].push(oldVal);\n target[key].push(...newVals);\n } else {\n let oldVal = target[key];\n let newVals = [];\n //TODO deep compare here\n toAssign.forEach(item => {\n if (oldVal.indexOf(item) == -1) {\n newVals.push(item);\n }\n });\n\n target[key].push(...newVals);\n }\n }\n}\n\nfunction _appendWithoutOverwrite(withAppend: boolean, target: { [p: string]: any }, key, arr, toAssign) {\n if (!withAppend) {\n return;\n } else {\n //overwrite means in this case, no double entries!\n //we do not a deep compare for now a single value compare suffices\n if ('undefined' == typeof target?.[key]) {\n target[key] = toAssign\n } else if (!Array.isArray(target[key])) {\n let oldVal = target[key];\n target[key] = new Es2019Array(...[]);\n target[key].push(oldVal);\n target[key].push(...toAssign);\n } else {\n target[key].push(...toAssign);\n }\n }\n}\n\n/**\n * Shallow merge as in config, but on raw associative arrays\n *\n * @param overwrite overwrite existing keys, if they exist with their subtrees\n * @param withAppend if a key exist append the values or drop them\n * Combination overwrite withappend filters doubles out of merged arrays\n * @param assocArrays array of assoc arres reduced right to left\n */\nexport function shallowMerge(overwrite = true, withAppend = false, ...assocArrays) {\n let target: {[key: string]: any} = {};\n new Es2019Array(...assocArrays).map(arr => {\n return {arr, keys: Object.keys(arr)};\n }).forEach(({arr, keys}) => {\n keys.forEach(key => {\n let toAssign = arr[key];\n if(!Array.isArray(toAssign) && withAppend) {\n toAssign = new Es2019Array(...[toAssign]);\n }\n if(overwrite || !target?.[key]) {\n _appendWithOverwrite(withAppend, target, key, arr, toAssign);\n } else if(!overwrite && target?.[key]) {\n _appendWithoutOverwrite(withAppend, target, key, arr, toAssign);\n }\n\n\n\n })\n });\n return target;\n}\n\n//TODO test this, slightly altered from https://medium.com/@pancemarko/deep-equality-in-javascript-determining-if-two-objects-are-equal-bf98cf47e934\n//he overlooked some optimizations and a shortcut at typeof!\nexport function deepEqual(obj1, obj2) {\n if(obj1 == obj2) {\n return false;\n }\n if(typeof obj1 != typeof obj2) {\n return false;\n }\n if(Array.isArray(obj1) && Array.isArray(obj2)) {\n if(obj1.length != obj2.length) {\n return;\n }\n //arrays must be equal, order as well, there is no way around it\n //this is the major limitation we have\n return obj1.every((item, cnt) => deepEqual(item, obj2[cnt]));\n }\n //string number and other primitives are filtered out here\n if(\"object\" == typeof obj1 && \"object\" == typeof obj2) {\n let keys1 = Object.keys(obj1);\n let keys2 = Object.keys(obj2);\n if(keys1.length != keys2.length) {\n return false;\n }\n return keys1.every(key => keys2.indexOf(key) != -1) &&\n keys1.every(key => deepEqual(obj1[key], obj2[key]));\n }\n return false;\n //done here no match found\n}\n\n","import {Es2019Array} from \"./Es2019Array\";\nimport {IValueHolder, Optional, ValueEmbedder} from \"./Monad\";\nimport {Lang} from \"./Lang\";\nimport objAssign = Lang.objAssign;\nimport {append, appendIf, assign, assignIf, resolve, shallowMerge} from \"./AssocArray\";\n\n/**\n * specialized value embedder\n * for our Configuration\n */\nclass ConfigEntry<T> extends ValueEmbedder<T> {\n\n /*default value for absent*/\n static absent = ConfigEntry.fromNullable(null);\n\n /**\n * arrayed value positions\n */\n arrPos: number;\n\n constructor(rootElem: any, key: any, arrPos?: number) {\n super(rootElem, key);\n\n this.arrPos = arrPos ?? -1;\n }\n\n get value() {\n if (this.key == \"\" && this.arrPos >= 0) {\n return this._value[this.arrPos];\n } else if (this.key && this.arrPos >= 0) {\n return this._value[this.key][this.arrPos];\n }\n return this._value[this.key];\n }\n\n set value(val: T) {\n if (this.key == \"\" && this.arrPos >= 0) {\n this._value[this.arrPos] = val;\n return;\n } else if (this.key && this.arrPos >= 0) {\n this._value[this.key][this.arrPos] = val;\n return;\n }\n this._value[this.key] = val;\n }\n}\n\nexport const CONFIG_VALUE = \"__END_POINT__\";\nexport const CONFIG_ANY = \"__ANY_POINT__\";\nexport type ConfigDef = { [key: string]: any };\n\n/**\n * Config, basically an optional wrapper for a json structure\n * (not Side - effect free, since we can alter the internal config state\n * without generating a new config), not sure if we should make it side - effect free\n * since this would swallow a lot of performance and ram\n */\nexport class Config extends Optional<any> {\n constructor(root: any, private configDef ?: ConfigDef) {\n super(root);\n }\n\n /**\n * shallow copy getter, copies only the first level, references the deeper nodes\n * in a shared manner\n */\n get shallowCopy(): Config {\n return this.shallowCopy$();\n }\n\n protected shallowCopy$(): Config {\n let ret = new Config({});\n ret.shallowMerge(this.value);\n return ret;\n }\n\n /**\n * deep copy, copies all config nodes\n */\n get deepCopy(): Config {\n return this.deepCopy$();\n }\n\n protected deepCopy$(): Config {\n return new Config(objAssign({}, this.value));\n }\n\n /**\n * creates a config from an initial value or null\n * @param value\n */\n static fromNullable<T>(value?: T | null): Config {\n return new Config(value);\n }\n\n /**\n * simple merge for the root configs\n */\n shallowMerge(other: Config, overwrite = true, withAppend = false) {\n //shallow merge must be mutable so we have to remap\n let newThis = shallowMerge(overwrite, withAppend, this.value, other.value);\n if (Array.isArray(this._value)) {\n this._value.length = 0;\n this._value.push(...(newThis as any));\n } else {\n Object.getOwnPropertyNames(this._value).forEach(key => delete this._value[key]);\n Object.getOwnPropertyNames(newThis).forEach(key => this._value[key] = newThis[key]);\n }\n }\n\n /**\n * assigns a single value as array, or appends it\n * to an existing value mapping a single value to array\n *\n *\n * usage myConfig.append(\"foobaz\").value = \"newValue\"\n * myConfig.append(\"foobaz\").value = \"newValue2\"\n *\n * resulting in myConfig.foobaz == [\"newValue, newValue2\"]\n *\n * @param {string[]} accessPath\n */\n append(...accessPath: string[]): IValueHolder<any> {\n return append(this._value, ...accessPath);\n }\n\n /**\n * appends to an existing entry (or extends into an array and appends)\n * if the condition is met\n * @param {boolean} condition\n * @param {string[]} accessPath\n */\n appendIf(condition: boolean, ...accessPath: string[]): IValueHolder<any> {\n return appendIf(condition, this._value, ...accessPath);\n }\n\n /**\n * assigns a new value on the given access path\n * @param accessPath\n */\n assign(...accessPath): IValueHolder<any> {\n return assign(this.value, ...accessPath);\n }\n\n\n /**\n * assign a value if the condition is set to true, otherwise skip it\n *\n * @param condition the condition, the access accessPath into the config\n * @param accessPath\n */\n assignIf(condition: boolean, ...accessPath: Array<any>): IValueHolder<any> {\n return assignIf(condition, this._value, ...accessPath);\n }\n\n /**\n * get if the access path is present (get is reserved as getter with a default, on the current path)\n * TODO will be renamed to something more meaningful and deprecated, the name is ambiguous\n * @param accessPath the access path\n */\n getIf(...accessPath: Array<string>): Config {\n this.assertAccessPath(...accessPath);\n return this.getClass().fromNullable(resolve(this.value, ...accessPath));\n }\n\n\n /**\n * gets the current node and if none is present returns a config with a default value\n * @param defaultVal\n */\n get(defaultVal: any): Config {\n return this.getClass().fromNullable(super.get(defaultVal).value);\n }\n\n //empties the current config entry\n delete(key: string): Config {\n if (key in this.value) {\n delete this.value[key];\n }\n return this;\n }\n\n /**\n * converts the entire config into a json object\n */\n toJson(): any {\n return JSON.stringify(this.value);\n }\n\n\n protected getClass(): any {\n return Config;\n }\n\n private setVal(val: any) {\n this._value = val;\n }\n\n\n /**\n * asserts the access path for a semi typed access\n * @param accessPath\n * @private\n */\n private assertAccessPath(...accessPath: Array<string>) {\n accessPath = this.preprocessKeys(...accessPath);\n if (!this.configDef) {\n //untyped\n return;\n }\n\n const ERR_ACCESS_PATH = \"Access Path to config invalid\";\n let currAccessPos: any = Optional.fromNullable(Object.keys(this.configDef).map(key => {\n let ret = {};\n ret[key] = this.configDef[key];\n return ret;\n }));\n\n for (let cnt = 0; cnt < accessPath.length; cnt++) {\n let currKey = this.keyVal(accessPath[cnt]);\n let arrPos: any = this.arrayIndex(accessPath[cnt]);\n\n //key index\n if (this.isArray(arrPos)) {\n if (currKey != \"\") {\n currAccessPos = Array.isArray(currAccessPos.value) ?\n Optional.fromNullable(new Es2019Array(...currAccessPos.value)\n .find(item => {\n return !!(item?.[currKey] ?? false)\n })?.[currKey]?.[arrPos]) :\n Optional.fromNullable(currAccessPos.value?.[currKey]?.[arrPos] ?? null);\n\n } else {\n currAccessPos = (Array.isArray(currAccessPos.value)) ?\n Optional.fromNullable(currAccessPos.value?.[arrPos]) : Optional.absent;\n }\n //we noe store either the current array or the filtered look ahead to go further\n } else {\n //we now have an array and go further with a singular key\n currAccessPos = (Array.isArray(currAccessPos.value)) ? Optional.fromNullable(new Es2019Array(...currAccessPos.value)\n .find(item => {\n return !!(item?.[currKey] ?? false);\n })?.[currKey]) :\n Optional.fromNullable(currAccessPos.value?.[currKey] ?? null);\n }\n if (!currAccessPos.isPresent()) {\n throw Error(ERR_ACCESS_PATH)\n }\n if (currAccessPos.value == CONFIG_ANY) {\n return;\n }\n }\n }\n\n private isNoArray(arrPos: number) {\n return arrPos == -1;\n }\n\n private isArray(arrPos: number) {\n return !this.isNoArray(arrPos);\n }\n\n}","/*!\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http:// www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {IValueHolder, Optional, ValueEmbedder} from \"./Monad\";\nimport {XMLQuery} from \"./XmlQuery\";\n\nimport {ICollector, IStreamDataSource, ITERATION_STATUS} from \"./SourcesCollectors\";\nimport {Lang} from \"./Lang\";\nimport {_global$} from \"./Global\";\nimport {Es2019Array} from \"./Es2019Array\";\nimport trim = Lang.trim;\n\nimport isString = Lang.isString;\nimport eqi = Lang.equalsIgnoreCase;\nimport objToArray = Lang.objToArray;\nimport {append, assign, simpleShallowMerge} from \"./AssocArray\";\nimport {IDomQuery} from \"./IDomQuery\";\n\ndeclare var ownerDocument: any;\n\n/**\n * in order to poss custom parameters we need to extend the mutation observer init\n */\nexport interface WAIT_OPTS extends MutationObserverInit {\n timeout?: number;\n /**\n * interval on non legacy browsers\n */\n interval?: number;\n}\n\n\nclass NonceValueEmbedder extends ValueEmbedder<string> {\n\n constructor(private rootElems: HTMLElement[]) {\n super(rootElems?.[0], \"nonce\");\n }\n\n isAbsent(): boolean {\n const value = this.value;\n return 'undefined' == typeof value || '' == value;\n }\n\n get value(): string {\n return (this?.rootElems?.[0] as HTMLElement)?.nonce ?? (this?.rootElems?.[0] as HTMLElement)?.getAttribute(\"nonce\")\n }\n\n\n set value(newVal: string) {\n if (!this?.rootElems?.length) {\n return;\n }\n\n this.rootElems.forEach((rootElem: HTMLElement) => {\n if(\"undefined\" != typeof rootElem?.nonce) {\n rootElem.nonce = newVal\n } else {\n rootElem.setAttribute(\"nonce\", newVal);\n }\n });\n\n }\n}\n\n/**\n *\n * // - submit checkboxes and radio inputs only if checked\n if ((tagName != \"select\" && elemType != \"button\"\n && elemType != \"reset\" && elemType != \"submit\" && elemType != \"image\")\n && ((elemType != \"checkbox\" && elemType != \"radio\"\n */\n\nenum ALLOWED_SUBMITTABLE_ELEMENTS {\n SELECT = \"select\",\n BUTTON = \"button\",\n SUBMIT = \"submit\",\n RESET = \"reset\",\n IMAGE = \"image\",\n RADIO = \"radio\",\n CHECKBOX = \"checkbox\"\n\n}\n\n/**\n * helper to fix a common problem that a system has to wait, until a certain condition is reached.\n * Depending on the browser this uses either the Mutation Observer or a semi compatible interval as fallback.\n * @param root the root DomQuery element to start from\n * @param condition the condition lambda to be fulfilled\n * @param options options for the search\n */\nfunction waitUntilDom(root: DomQuery, condition: (element: DomQuery) => boolean, options: WAIT_OPTS = {\n attributes: true,\n childList: true,\n subtree: true,\n timeout: 500,\n interval: 100\n}): Promise<DomQuery> {\n return new Promise<DomQuery>((success, error) => {\n let observer: MutationObserver = null;\n const MUT_ERROR = new Error(\"Mutation observer timeout\");\n\n // we do the same but for now ignore the options on the dom query\n // we cannot use absent here, because the condition might search for an absent element\n function findElement(root: DomQuery, condition: (element: DomQuery) => boolean): DomQuery | null {\n let found = null;\n if (!!condition(root)) {\n return root;\n }\n if (options.childList) {\n found = (condition(root)) ? root : root.childNodes.filter(item => condition(item)).first().value.value;\n } else if (options.subtree) {\n found = (condition(root)) ? root : root.querySelectorAll(\" * \").filter(item => condition(item)).first().value.value;\n } else {\n found = (condition(root)) ? root : null;\n }\n return found;\n }\n\n let foundElement = root;\n if (!!(foundElement = findElement(foundElement, condition))) {\n success(new DomQuery(foundElement));\n return;\n }\n\n if ('undefined' != typeof MutationObserver) {\n const mutTimeout = setTimeout(() => {\n observer.disconnect();\n return error(MUT_ERROR);\n }, options.timeout);\n\n const callback: MutationCallback = (mutationList: MutationRecord[]) => {\n const found = new DomQuery(mutationList.map((mut) => mut.target)).filter(item => condition(item)).first();\n if (found.isPresent()) {\n clearTimeout(mutTimeout);\n observer.disconnect();\n success(new DomQuery(found || root));\n }\n }\n observer = new MutationObserver(callback);\n\n // browsers might ignore it, but we cannot break the api in the case\n // hence no timeout is passed\n let observableOpts = {...options};\n delete observableOpts.timeout;\n root.eachElem(item => {\n observer.observe(item, observableOpts)\n })\n } else { // fallback for legacy browsers without mutation observer\n\n let interval = setInterval(() => {\n let found = findElement(root, condition);\n if (!!found) {\n if (timeout) {\n clearTimeout(timeout);\n clearInterval(interval);\n interval = null;\n }\n success(new DomQuery(found || root));\n }\n }, options.interval);\n let timeout = setTimeout(() => {\n if (interval) {\n clearInterval(interval);\n error(MUT_ERROR);\n }\n }, options.timeout)\n\n }\n });\n}\n\nexport class ElementAttribute extends ValueEmbedder<string> {\n\n constructor(private element: DomQuery, private name: string, private defaultVal: string = null) {\n super(element, name);\n }\n\n get value(): string {\n let val: Element[] = this.element.get(0).orElse(...[]).values;\n if (!val.length) {\n return this.defaultVal;\n }\n return val[0].getAttribute(this.name);\n }\n\n set value(value: string) {\n let val: Element[] = this.element.get(0).orElse(...[]).values;\n for (let cnt = 0; cnt < val.length; cnt++) {\n val[cnt].setAttribute(this.name, value);\n }\n val[0].setAttribute(this.name, value);\n }\n\n protected getClass(): any {\n return ElementAttribute;\n }\n\n static fromNullable<ElementAttribute, T>(value?: any, valueKey: string = \"value\"): ElementAttribute {\n return <any>new ElementAttribute(value, valueKey);\n }\n\n}\n\nexport class Style extends ValueEmbedder<string> {\n\n constructor(private element: DomQuery, private name: string, private defaultVal: string = null) {\n super(element, name);\n }\n\n get value(): string {\n let val: Element[] = this.element.values;\n if (!val.length) {\n return this.defaultVal;\n }\n return (val[0] as HTMLElement).style[this.name];\n }\n\n set value(value: string) {\n let val: HTMLElement[] = this.element.values as HTMLElement[];\n for (let cnt = 0; cnt < val.length; cnt++) {\n val[cnt].style[this.name] = value;\n }\n }\n\n protected getClass(): any {\n return ElementAttribute;\n }\n\n static fromNullable<ElementAttribute, T>(value?: any, valueKey: string = \"value\"): ElementAttribute {\n return <any>new ElementAttribute(value, valueKey);\n }\n\n}\n\n/**\n * small helper for the specialized jsf case\n * @constructor\n */\nconst DEFAULT_WHITELIST = () => {\n return true;\n};\n\n\n\n/**\n * Monadic DomNode representation, ala jquery\n * This is a thin wrapper over querySelectorAll\n * to get slim monadic support\n * to reduce implementation code on the users side.\n * This is vital for frameworks which want to rely on\n * plain dom but still do not want to lose\n * the reduced code footprint of querying dom trees and traversing\n * by using functional patterns.\n *\n * Also, a few convenience methods are added to reduce\n * the code footprint of standard dom processing\n * operations like eval\n *\n * in most older systems\n * Note parts of this code still stem from the Dom.js I have written 10 years\n * ago, those parts look a bit ancient and will be replaced over time.\n *\n */\nexport class DomQuery implements IDomQuery, IStreamDataSource<DomQuery>, Iterable<DomQuery> {\n\n static absent = new DomQuery();\n\n /**\n * reference to the environmental global object\n */\n static global = _global$;\n\n private rootNode: Array<Element> = [];\n\n pos = -1;\n\n constructor(...rootNode: Array<Element | ShadowRoot | DomQuery | Document | Array<any> | string>) {\n\n if (Optional.fromNullable(rootNode).isAbsent() || !rootNode.length) {\n return;\n } else {\n // we need to flatten out the arrays\n\n for (let cnt = 0; cnt < rootNode.length; cnt++) {\n if (!rootNode[cnt]) {\n // we skip possible null entries which can happen in\n // certain corner conditions due to the constructor re-wrapping single elements into arrays.\n } else if (isString(rootNode[cnt])) {\n let foundElement = DomQuery.querySelectorAll(<string>rootNode[cnt]);\n if (!foundElement.isAbsent()) {\n rootNode.push(...foundElement.values)\n }\n } else if (rootNode[cnt] instanceof DomQuery) {\n this.rootNode.push(...(<any>rootNode[cnt]).values);\n } else {\n this.rootNode.push(<any>rootNode[cnt]);\n }\n }\n }\n }\n\n\n /**\n * returns the first element\n */\n get value(): Optional<Element> {\n return this.getAsElem(0);\n }\n\n get values(): Element[] {\n return this.allElems();\n }\n\n get global(): any {\n return _global$;\n }\n\n get stream(): any {\n throw Error(\"Not implemented, include Stream.ts for this to work\")\n }\n\n get lazyStream(): any {\n throw Error(\"Not implemented, include Stream.ts for this to work\")\n }\n\n /**\n * returns the id of the first element\n */\n get id(): ValueEmbedder<string> {\n return new ElementAttribute(this.get(0), \"id\");\n }\n\n /**\n * length of the entire query set\n */\n get length(): number {\n return this.rootNode.length\n }\n\n /**\n * convenience method for tagName\n */\n get tagName(): Optional<string> {\n return <Optional<string>>this.getAsElem(0).getIf(\"tagName\");\n }\n\n /**\n * convenience method for nodeName\n */\n get nodeName(): Optional<string> {\n return <Optional<string>>this.getAsElem(0).getIf(\"nodeName\");\n }\n\n isTag(tagName: string): boolean {\n return !this.isAbsent()\n && (this.nodeName.orElse(\"__none___\")\n .value.toLowerCase() == tagName.toLowerCase()\n || this.tagName.orElse(\"__none___\")\n .value.toLowerCase() == tagName.toLowerCase()\n )\n }\n\n /**\n * convenience property for type\n *\n * returns null in case of no type existing otherwise\n * the type of the first element\n */\n get type(): Optional<string> {\n return this.getAsElem(0).getIf(\"type\");\n }\n\n /**\n * convenience property for name\n *\n * returns null in case of no type existing otherwise\n * the name of the first element\n */\n get name(): ValueEmbedder<string> {\n return new ValueEmbedder(this.getAsElem(0).value, \"name\");\n }\n\n /**\n * convenience property for value\n *\n * returns null in case of no type existing otherwise\n * the value of the first element\n */\n get inputValue(): ValueEmbedder<string | boolean> {\n if (this.getAsElem(0).getIf(\"value\").isPresent()) {\n return new ValueEmbedder<string>(this.getAsElem(0).value);\n } else {\n return <any>ValueEmbedder.absent;\n }\n }\n\n get val(): string | boolean {\n return this.inputValue.value;\n }\n\n set val(value: string | boolean) {\n this.inputValue.value = value;\n }\n\n get nodeId(): string {\n return this.id.value;\n }\n\n set nodeId(value: string) {\n this.id.value = value;\n }\n\n get checked(): boolean {\n return new Es2019Array(...this.values).every(el => !!(<any>el).checked);\n }\n\n set checked(newChecked: boolean) {\n this.eachElem(el => (<any>el).checked = newChecked);\n }\n\n get elements(): DomQuery {\n // a simple querySelectorAll should suffice\n return this.querySelectorAll(\"input, checkbox, select, textarea, fieldset\");\n }\n\n get deepElements(): DomQuery {\n let elemStr = \"input, select, textarea, checkbox, fieldset\";\n return this.querySelectorAllDeep(elemStr);\n }\n\n /**\n * a deep search which treats the single isolated shadow dom areas\n * separately and runs the query on each shadow dom\n * @param queryStr\n */\n querySelectorAllDeep(queryStr: string): DomQuery {\n let found: Array<DomQuery> = [];\n let queryRes = this.querySelectorAll(queryStr);\n if (queryRes.length) {\n found.push(queryRes);\n }\n let shadowRoots = this.querySelectorAll(\"*\").shadowRoot;\n if (shadowRoots.length) {\n let shadowRes = shadowRoots.querySelectorAllDeep(queryStr);\n if (shadowRes.length) {\n found.push(shadowRes);\n }\n }\n return new DomQuery(...found);\n }\n\n\n /**\n * disabled flag\n */\n get disabled(): boolean {\n return this.attr(\"disabled\").isPresent();\n }\n\n set disabled(disabled: boolean) {\n // this.attr(\"disabled\").value = disabled + \"\";\n if (!disabled) {\n this.removeAttribute(\"disabled\");\n } else {\n this.attr(\"disabled\").value = \"disabled\";\n }\n\n }\n\n removeAttribute(name: string) {\n this.eachElem(item => item.removeAttribute(name));\n }\n\n get childNodes(): DomQuery {\n let childNodeArr: Array<Element> = [];\n this.eachElem((item: Element) => {\n childNodeArr = childNodeArr.concat(objToArray(item.childNodes));\n });\n return new DomQuery(...childNodeArr);\n }\n\n\n get asArray(): DomQuery[] {\n // filter not supported by IE11\n let items = new Es2019Array(...this.rootNode).filter(item => {\n return item != null\n }).map(item => {\n return DomQuery.byId(item)\n });\n return items as DomQuery[];\n }\n\n get offsetWidth(): number {\n return new Es2019Array(...this.rootNode)\n .filter(item => item != null)\n .map(elem => (elem as HTMLElement).offsetWidth)\n .reduce((accumulate, incoming) => accumulate + incoming, 0);\n }\n\n get offsetHeight(): number {\n return new Es2019Array(...this.rootNode)\n .filter(item => item != null)\n .map(elem => (elem as HTMLElement).offsetHeight)\n .reduce((accumulate, incoming) => accumulate + incoming, 0);\n }\n\n get offsetLeft(): number {\n return new Es2019Array(...this.rootNode)\n .filter(item => item != null)\n .map(elem => (elem as HTMLElement).offsetLeft)\n .reduce((accumulate, incoming) => accumulate + incoming, 0);\n }\n\n get offsetTop(): number {\n return new Es2019Array(this.rootNode)\n .filter(item => item != null)\n .map(elem => (elem as any).offsetTop)\n .reduce((accumulate, incoming) => accumulate + incoming, 0);\n }\n\n get asNodeArray(): Array<Element> {\n return new Es2019Array(...this.rootNode.filter(item => item != null));\n }\n\n get nonce(): ValueEmbedder<string> {\n return new NonceValueEmbedder(this.rootNode as HTMLElement[]);\n }\n\n static querySelectorAllDeep(selector: string) {\n return new DomQuery(document).querySelectorAllDeep(selector);\n }\n\n /**\n * easy query selector all producer\n *\n * @param selector the selector\n * @returns a results dom query object\n */\n static querySelectorAll(selector: string): DomQuery {\n if (selector.indexOf(\"/shadow/\") != -1) {\n return new DomQuery(document)._querySelectorAllDeep(selector);\n } else {\n return new DomQuery(document)._querySelectorAll(selector);\n }\n }\n\n /**\n * byId producer\n *\n * @param selector id\n * @param deep true if you want to go into shadow areas\n * @return a DomQuery containing the found elements\n */\n static byId(selector: string | DomQuery | Element, deep = false): DomQuery {\n if (isString(selector)) {\n return (!deep) ? new DomQuery(document).byId(<string>selector) : new DomQuery(document).byIdDeep(<string>selector);\n } else {\n return new DomQuery(<any>selector);\n }\n }\n\n /**\n * byTagName producer\n *\n * @param selector name\n * @return a DomQuery containing the found elements\n */\n static byTagName(selector: string | DomQuery | Element): DomQuery {\n if (isString(selector)) {\n return new DomQuery(document).byTagName(<string>selector);\n } else {\n return new DomQuery(<any>selector);\n }\n }\n\n static globalEval(code: string, nonce?: string): DomQuery {\n return new DomQuery(document).globalEval(code, nonce);\n }\n\n static globalEvalSticky(code: string, nonce?: string): DomQuery {\n return new DomQuery(document).globalEvalSticky(code, nonce);\n }\n\n /**\n * builds the ie nodes properly in a placeholder\n * and bypasses a non script insert bug that way\n * @param markup the markup code to be executed from\n */\n static fromMarkup(markup: string): DomQuery {\n\n // https:// developer.mozilla.org/de/docs/Web/API/DOMParser license creative commons\n const doc = document.implementation.createHTMLDocument(\"\");\n markup = trim(markup);\n let lowerMarkup = markup.toLowerCase();\n if (lowerMarkup.search(/<!doctype[^\\w\\-]+/gi) != -1 ||\n lowerMarkup.search(/<html[^\\w\\-]+/gi) != -1 ||\n lowerMarkup.search(/<head[^\\w\\-]+/gi) != -1 ||\n lowerMarkup.search(/<body[^\\w\\-]+/gi) != -1) {\n doc.documentElement.innerHTML = markup;\n return new DomQuery(doc.documentElement);\n } else {\n let startsWithTag = function (str: string, tagName: string) {\n let tag1 = [\"<\", tagName, \">\"].join(\"\");\n let tag2 = [\"<\", tagName, \" \"].join(\"\");\n return (str.indexOf(tag1) == 0) || (str.indexOf(tag2) == 0);\n };\n\n let dummyPlaceHolder = new DomQuery(document.createElement(\"div\"));\n\n // table needs special treatment due to the browsers auto creation\n if (startsWithTag(lowerMarkup, \"thead\") || startsWithTag(lowerMarkup, \"tbody\")) {\n dummyPlaceHolder.html(`<table>${markup}</table>`);\n return dummyPlaceHolder.querySelectorAll(\"table\").get(0).childNodes.detach();\n } else if (startsWithTag(lowerMarkup, \"tfoot\")) {\n dummyPlaceHolder.html(`<table><thead></thead><tbody><tbody${markup}</table>`);\n return dummyPlaceHolder.querySelectorAll(\"table\").get(2).childNodes.detach();\n } else if (startsWithTag(lowerMarkup, \"tr\")) {\n dummyPlaceHolder.html(`<table><tbody>${markup}</tbody></table>`);\n return dummyPlaceHolder.querySelectorAll(\"tbody\").get(0).childNodes.detach();\n } else if (startsWithTag(lowerMarkup, \"td\")) {\n dummyPlaceHolder.html(`<table><tbody><tr>${markup}</tr></tbody></table>`);\n return dummyPlaceHolder.querySelectorAll(\"tr\").get(0).childNodes.detach();\n }\n\n dummyPlaceHolder.html(markup);\n return dummyPlaceHolder.childNodes.detach();\n }\n\n }\n\n /**\n * returns the nth element as DomQuery\n * from the internal elements\n * note if you try to reach a non-existing element position\n * you will get back an absent entry\n *\n * @param index the nth index\n */\n get(index: number): DomQuery {\n return (index < this.rootNode.length) ? new DomQuery(this.rootNode[index]) : DomQuery.absent;\n }\n\n\n /**\n * returns the nth element as optional of an Element object\n * @param index the number from the index\n * @param defaults the default value if the index is overrun default Optional\\.absent\n */\n getAsElem(index: number, defaults: Optional<any> = Optional.absent): Optional<Element> {\n return (index < this.rootNode.length) ? Optional.fromNullable(this.rootNode[index]) : defaults;\n }\n\n /**\n * returns the files from a given element\n * @param index\n */\n filesFromElem(index: number): Array<any> {\n return (index < this.rootNode.length) ? (<any>this.rootNode[index])?.files ? (<any>this.rootNode[index]).files : [] : [];\n }\n\n /**\n * returns the value array< of all elements\n */\n allElems(): Array<Element> {\n return this.rootNode;\n }\n\n /**\n * absent no values reached?\n */\n isAbsent(): boolean {\n return this.length == 0;\n }\n\n /**\n * should make the code clearer\n * note if you pass a function\n * this refers to the active DomQuery object\n */\n isPresent(presentRunnable ?: (elem ?: DomQuery) => void): boolean {\n let absent = this.isAbsent();\n if (!absent && presentRunnable) {\n presentRunnable.call(this, this)\n }\n return !absent;\n }\n\n /**\n * should make the code clearer\n * note if you pass a function\n * this refers to the active DomQuery object\n *\n *\n * @param presentRunnable\n */\n ifPresentLazy(presentRunnable: (elem ?: DomQuery) => void = function () {\n }): DomQuery {\n this.isPresent.call(this, presentRunnable);\n return this;\n }\n\n /**\n * remove all affected nodes from this query object from the dom tree\n */\n delete() {\n this.eachElem((node: Element) => {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n });\n }\n\n querySelectorAll(selector): DomQuery {\n // We could merge both methods, but for now this is more readable\n if (selector.indexOf(\"/shadow/\") != -1) {\n return this._querySelectorAllDeep(selector);\n } else {\n return this._querySelectorAll(selector);\n }\n }\n\n closest(selector): DomQuery {\n // We could merge both methods, but for now this is more readable\n if (selector.indexOf(\"/shadow/\") != -1) {\n return this._closestDeep(selector);\n } else {\n return this._closest(selector);\n }\n }\n\n\n /**\n * core byId method\n * @param id the id to search for\n * @param includeRoot also match the root element?\n */\n byId(id: string, includeRoot?: boolean): DomQuery {\n let res: Array<DomQuery> = [];\n if (includeRoot) {\n res = res.concat(...\n new Es2019Array(...(this?.rootNode || []))\n .filter(((item) => id == item.id) as any)\n .map(item => new DomQuery(item))\n );\n }\n\n // for some strange kind of reason the # selector fails\n // on hidden elements we use the attributes match selector\n // that works\n res = res.concat(this.querySelectorAll(`[id=\"${id}\"]`));\n return new DomQuery(...res);\n }\n\n\n byIdDeep(id: string, includeRoot?: boolean): DomQuery {\n let res: Array<DomQuery> = [];\n if (includeRoot) {\n res = res.concat(\n new Es2019Array(...(this?.rootNode || []))\n .filter(item => id == item.id)\n .map(item => new DomQuery(item))\n );\n }\n\n let subItems = this.querySelectorAllDeep(`[id=\"${id}\"]`);\n if (subItems.length) {\n res.push(subItems);\n }\n\n return new DomQuery(...res);\n }\n\n /**\n * same as byId just for the tag name\n * @param tagName the tag-name to search for\n * @param includeRoot shall the root element be part of this search\n * @param deep do we also want to go into shadow dom areas\n */\n byTagName(tagName: string, includeRoot ?: boolean, deep ?: boolean): DomQuery {\n let res: Array<Element | DomQuery> = [];\n if (includeRoot) {\n res = new Es2019Array(...(this?.rootNode ?? []))\n .filter(element => element?.tagName == tagName)\n .reduce((reduction: any, item: Element) => reduction.concat([item]), res);\n }\n\n (deep) ? res.push(this.querySelectorAllDeep(tagName)) : res.push(this.querySelectorAll(tagName));\n return new DomQuery(...res);\n }\n\n /**\n * attr accessor, usage myQuery.attr(\"class\").value = \"bla\"\n * or let value myQuery.attr(\"class\").value\n * @param attr the attribute to set\n * @param defaultValue the default value in case nothing is presented (defaults to null)\n */\n attr(attr: string, defaultValue: string = null): ElementAttribute {\n return new ElementAttribute(this, attr, defaultValue);\n }\n\n style(cssProperty: string, defaultValue: string = null): Style {\n return new Style(this, cssProperty, defaultValue);\n }\n\n\n /**\n * Checks for an existing class in the class attributes\n *\n * @param clazz the class to search for\n */\n hasClass(clazz: string) {\n let hasIt = false;\n this.eachElem(node => {\n hasIt = node.classList.contains(clazz);\n if (hasIt) {\n return false;\n }\n });\n return hasIt;\n }\n\n /**\n * appends a class string if not already in the element(s)\n *\n * @param clazz the style class to append\n */\n addClass(clazz: string): DomQuery {\n this.eachElem(item => item.classList.add(clazz))\n return this;\n }\n\n /**\n * remove the style class if in the class definitions\n *\n * @param clazz\n */\n removeClass(clazz: string): DomQuery {\n this.eachElem(item => item.classList.remove(clazz));\n return this;\n }\n\n /**\n * checks whether we have a multipart element in our children\n * or are one\n */\n isMultipartCandidate(deep = false): boolean {\n const FILE_INPUT = \"input[type='file']\";\n return this.matchesSelector(FILE_INPUT) ||\n ((!deep) ? this.querySelectorAll(FILE_INPUT) :\n this.querySelectorAllDeep(FILE_INPUT)).first().isPresent();\n }\n\n /**\n * innerHtml\n * equivalent to jQueries html\n * as setter the html is set and the\n * DomQuery is given back\n * as getter the html string is returned\n *\n * @param newInnerHTML the inner html to be inserted\n */\n html(newInnerHTML?: string): DomQuery | Optional<string> {\n if (Optional.fromNullable(newInnerHTML).isAbsent()) {\n return this.isPresent() ? Optional.fromNullable(this.innerHTML) : Optional.absent;\n }\n this.innerHTML = newInnerHTML;\n\n return this;\n }\n\n /**\n * Standard dispatch event method, delegated from node\n */\n dispatchEvent(evt: Event): DomQuery {\n this.eachElem(elem => elem.dispatchEvent(evt));\n return this;\n }\n\n /**\n * abbreviation property to use innerHTML directly like on the dom tree\n * @param newInnerHTML the new inner html which should be attached to \"this\" domQuery\n */\n set innerHTML(newInnerHTML: string) {\n this.eachElem(elem => elem.innerHTML = newInnerHTML);\n }\n\n /**\n * getter abbreviation to use innerHTML directly\n */\n get innerHTML(): string {\n let retArr = [];\n this.eachElem(elem => retArr.push(elem.innerHTML));\n return retArr.join(\"\");\n }\n\n /**\n * since the dom allows both innerHTML and innerHtml we also have to implement both\n * @param newInnerHtml see above\n */\n set innerHtml(newInnerHtml: string) {\n this.innerHTML = newInnerHtml;\n }\n\n /**\n * same here, getter for allowing innerHtml directly\n */\n get innerHtml(): string {\n return this.innerHTML;\n }\n\n /**\n * filters the current dom query elements\n * upon a given selector\n *\n * @param selector\n */\n filterSelector(selector: string): DomQuery {\n let matched = [];\n\n this.eachElem(item => {\n if (this._mozMatchesSelector(item, selector)) {\n matched.push(item)\n }\n });\n return new DomQuery(...matched);\n }\n\n /**\n * checks whether any item in this domQuery level matches the selector\n * if there is one element only attached, as root the match is only\n * performed on this element.\n * @param selector\n */\n matchesSelector(selector: string): boolean {\n return this.asArray\n .some(item => this._mozMatchesSelector(item.getAsElem(0).value, selector));\n }\n\n /**\n * easy node traversal, you can pass\n * a set of node selectors which are joined as direct children\n *\n * Note!!! The root nodes are not in the getIf, those are always the child nodes\n *\n * @param nodeSelector\n */\n getIf(...nodeSelector: Array<string>): DomQuery {\n\n let selectorStage: DomQuery = this.childNodes;\n for (let cnt = 0; cnt < nodeSelector.length; cnt++) {\n selectorStage = selectorStage.filterSelector(nodeSelector[cnt]);\n if (selectorStage.isAbsent()) {\n return selectorStage;\n }\n }\n return selectorStage;\n }\n\n eachElem(func: (item: Element, cnt?: number) => any): DomQuery {\n\n for (let cnt = 0, len = this.rootNode.length; cnt < len; cnt++) {\n if (func(this.rootNode[cnt], cnt) === false) {\n break;\n }\n }\n return this;\n }\n\n firstElem(func: (item: Element, cnt?: number) => any = item => item): DomQuery {\n if (this.rootNode.length > 1) {\n func(this.rootNode[0], 0);\n }\n return this;\n }\n\n lastElem(func: (item: Element, cnt?: number) => any = item => item): DomQuery {\n if (this.rootNode.length > 1) {\n func(this.rootNode[this.rootNode.length - 1], 0);\n }\n return this;\n }\n\n each(func: (item: DomQuery, cnt?: number) => any): DomQuery {\n new Es2019Array(...this.rootNode)\n .forEach((item, cnt) => {\n // we could use a filter, but for the best performance we don´t\n if (item == null) {\n return;\n }\n return func(DomQuery.byId(item), cnt);\n });\n\n return this;\n }\n\n /**\n * replace convenience function, replaces one or more elements with\n * a set of elements passed as DomQuery\n * @param toReplace the replaced nodes as reference (original node has been replaced)\n */\n replace(toReplace: DomQuery): DomQuery {\n this.each(item => {\n let asElem = item.getAsElem(0).value;\n let parent = asElem.parentElement;\n let nextElement = asElem.nextElementSibling;\n let previousElement = asElem.previousElementSibling;\n if(nextElement != null) {\n new DomQuery(nextElement).insertBefore(toReplace);\n } else if(previousElement) {\n new DomQuery(previousElement).insertAfter(toReplace)\n } else {\n new DomQuery(parent).append(toReplace);\n }\n item.delete();\n });\n return toReplace;\n }\n\n /**\n * returns a new dom query containing only the first element max\n *\n * @param func a an optional callback function to perform an operation on the first element\n */\n first(func: (item: DomQuery, cnt?: number) => any = (item) => item): DomQuery {\n if (this.rootNode.length >= 1) {\n func(this.get(0), 0);\n return this.get(0);\n }\n return this;\n }\n\n /**\n * returns a new dom query containing only the first element max\n *\n * @param func a an optional callback function to perform an operation on the first element\n */\n last(func: (item: DomQuery, cnt?: number) => any = (item) => item): DomQuery {\n if (this.rootNode.length >= 1) {\n let lastNode = this.get(this.rootNode.length - 1);\n func(lastNode, 0);\n return lastNode;\n }\n return this;\n }\n\n /**\n * filter function which filters a subset\n *\n * @param func\n */\n filter(func: (item: DomQuery) => boolean): DomQuery {\n let reArr: Array<DomQuery> = [];\n this.each((item: DomQuery) => {\n func(item) ? reArr.push(item) : null;\n });\n return new DomQuery(...<any>reArr);\n }\n\n /**\n * global eval head appendix method\n * no other methods are supported anymore\n * @param code the code to be evaluated\n * @param nonce optional nonce key for higher security\n */\n globalEval(code: string, nonce ?: string): DomQuery {\n const head = document.getElementsByTagName(\"head\")?.[0]\n ?? document.documentElement.getElementsByTagName(\"head\")?.[0];\n const script = document.createElement(\"script\");\n if (nonce) {\n if ('undefined' != typeof script?.nonce) {\n script.nonce = nonce;\n } else {\n script.setAttribute(\"nonce\", nonce);\n }\n }\n script.type = \"text/javascript\";\n script.innerHTML = code;\n let newScriptElement = head.appendChild(script);\n head.removeChild(newScriptElement);\n return this;\n }\n\n /**\n * global eval head appendix method\n * no other methods are supported anymore\n * @param code the code to be evaluated\n * @param nonce optional nonce key for higher security\n */\n globalEvalSticky(code: string, nonce ?: string): DomQuery {\n let head = document.getElementsByTagName(\"head\")[0] || document.documentElement;\n let script = document.createElement(\"script\");\n this.applyNonce(nonce, script);\n script.type = \"text/javascript\";\n script.innerHTML = code;\n head.appendChild(script);\n return this;\n }\n\n /**\n * detaches a set of nodes from their parent elements\n * in a browser independent manner\n * @return {Array} an array of nodes with the detached dom nodes\n */\n detach(): DomQuery {\n this.eachElem((item: Element) => {\n item.parentNode.removeChild(item);\n });\n return this;\n }\n\n /**\n * appends the current set of elements\n * to the element or first element passed via elem\n * @param elem\n */\n appendTo(elem: DomQuery | string): DomQuery {\n if (Lang.isString(elem)) {\n this.appendTo(DomQuery.querySelectorAll(elem as string));\n return this;\n }\n this.eachElem((item) => {\n let value1: Element = <Element>(elem as DomQuery).getAsElem(0).orElseLazy(() => {\n return {\n appendChild: () => {\n }\n }\n }).value;\n value1.appendChild(item);\n });\n return this;\n }\n\n /**\n * loads and evaluates a script from a source uri\n *\n * @param src the source to be loaded and evaluated\n * @param delay in milliseconds execution default (0 == no delay)\n * @param nonce optional nonce value to allow increased security via nonce crypto token\n */\n loadScriptEval(src: string, delay: number = 0, nonce?: string) {\n this._loadScriptEval(false, src, delay, nonce);\n\n return this;\n }\n\n\n /**\n * loads and evaluates a script from a source uri\n *\n * @param src the source to be loaded and evaluated\n * @param delay in milliseconds execution default (0 == no delay)\n * @param nonce optional nonce parameter for increased security via nonce crypto token\n */\n loadScriptEvalSticky(src: string, delay: number = 0, nonce?: string) {\n this._loadScriptEval(true, src, delay, nonce);\n\n return this;\n }\n\n insertAfter(...toInsertParams: Array<DomQuery>): DomQuery {\n\n this.each(existingItem => {\n let existingElement = existingItem.getAsElem(0).value;\n let rootNode = existingElement.parentNode;\n for (let cnt = 0; cnt < toInsertParams.length; cnt++) {\n let nextSibling: Element = <any>existingElement.nextSibling;\n toInsertParams[cnt].eachElem(insertElem => {\n if (nextSibling) {\n rootNode.insertBefore(insertElem, nextSibling);\n existingElement = nextSibling;\n } else {\n rootNode.appendChild(insertElem);\n }\n });\n\n }\n });\n\n let res = [];\n res.push(this);\n res = res.concat(toInsertParams);\n return new DomQuery(...res);\n }\n\n insertBefore(...toInsertParams: Array<DomQuery>): DomQuery {\n this.each(existingItem => {\n let existingElement = existingItem.getAsElem(0).value;\n let rootNode = existingElement.parentNode;\n for (let cnt = 0; cnt < toInsertParams.length; cnt++) {\n toInsertParams[cnt].eachElem(insertElem => {\n rootNode.insertBefore(insertElem, existingElement);\n });\n }\n });\n let res = [];\n res.push(this);\n res = res.concat(toInsertParams);\n return new DomQuery(...res);\n }\n\n orElse(...elseValue: any): DomQuery {\n if (this.isPresent()) {\n return this;\n } else {\n return new DomQuery(...elseValue);\n }\n }\n\n orElseLazy(func: () => any): DomQuery {\n if (this.isPresent()) {\n return this;\n } else {\n return new DomQuery(func());\n }\n }\n\n /**\n * find all parents in the hierarchy for which the selector matches\n * @param selector\n */\n allParents(selector: string): DomQuery {\n let parent = this.parent();\n let ret = [];\n while(parent.isPresent()) {\n if(parent.matchesSelector(selector)) {\n ret.push(parent);\n }\n parent = parent.parent();\n }\n return new DomQuery(...ret);\n }\n\n /**\n * finds the first parent in the hierarchy for which the selector matches\n * @param selector\n */\n firstParent(selector: string): DomQuery {\n let parent = this.parent();\n while(parent.isPresent()) {\n if(parent.matchesSelector(selector)) {\n return parent;\n }\n parent = parent.parent();\n }\n return DomQuery.absent;\n }\n\n /**\n * fetches all parents as long as the filter criterium matches\n * @param selector\n */\n parentsWhileMatch(selector: string): DomQuery {\n const retArr: Array<DomQuery> = [];\n let parent = this.parent().filter(item => item.matchesSelector(selector));\n while(parent.isPresent()) {\n retArr.push(parent);\n parent = parent.parent().filter(item => item.matchesSelector(selector));\n }\n\n return new DomQuery(...retArr);\n }\n\n parent(): DomQuery {\n let ret = [];\n this.eachElem((item: Element) => {\n let parent = item.parentNode || (<any>item).host || item.shadowRoot;\n if (parent && ret.indexOf(parent) == -1) {\n ret.push(parent);\n }\n });\n\n return new DomQuery(...ret);\n }\n\n copyAttrs(sourceItem: DomQuery | XMLQuery): DomQuery {\n sourceItem.eachElem((sourceNode: Element) => {\n let attrs: Array<Attr> = objToArray(sourceNode.attributes);\n for (let item of attrs) {\n let value: string = item.value;\n let name: string = item.name;\n\n switch (name) {\n case \"id\":\n this.id.value = value;\n break;\n case \"disabled\":\n this.resolveAttributeHolder(\"disabled\").disabled = value;\n break;\n case \"checked\":\n this.resolveAttributeHolder(\"checked\").checked = value;\n break;\n case \"nonce\":\n // nonce will be handled below!\n break;\n default:\n this.attr(name).value = value;\n }\n }\n });\n\n //special nonce handling\n sourceItem.nonce.isPresent(() => {\n this.nonce.value = sourceItem.nonce.value;\n });\n\n return this;\n }\n\n /**\n * outerHTML convenience method\n * browsers only support innerHTML but\n * for instance for your jsf.js we have a full\n * replace pattern which needs outerHTML processing\n *\n * @param markup the markup which should replace the root element\n * @param runEmbeddedScripts if true the embedded scripts are executed\n * @param runEmbeddedCss if true the embedded css are executed\n * @param deep should this also work for shadow dom (run scripts etc...)\n */\n outerHTML(markup: string, runEmbeddedScripts ?: boolean, runEmbeddedCss ?: boolean, deep = false): DomQuery {\n if (this.isAbsent()) {\n return;\n }\n\n let focusElementId = document?.activeElement?.id;\n let caretPosition = (focusElementId) ? DomQuery.getCaretPosition(document.activeElement) : null;\n let nodes = DomQuery.fromMarkup(markup);\n let res = [];\n let toReplace = this.getAsElem(0).value;\n let firstInsert = nodes.get(0);\n let parentNode = toReplace.parentNode;\n let replaced = firstInsert.getAsElem(0).value;\n parentNode.replaceChild(replaced, toReplace);\n res.push(new DomQuery(replaced));\n // no replacement possible\n if (this.isAbsent()) {\n return this;\n }\n\n let insertAdditionalItems = [];\n\n if (nodes.length > 1) {\n insertAdditionalItems = insertAdditionalItems.concat(...nodes.values.slice(1));\n res.push(DomQuery.byId(replaced).insertAfter(new DomQuery(...insertAdditionalItems)));\n }\n\n if (runEmbeddedScripts) {\n this.runScripts();\n }\n if (runEmbeddedCss) {\n this.runCss();\n }\n\n let focusElement = DomQuery.byId(focusElementId);\n if (focusElementId && focusElement.isPresent() &&\n caretPosition != null && \"undefined\" != typeof caretPosition) {\n focusElement.eachElem(item => DomQuery.setCaretPosition(item, caretPosition));\n }\n\n return nodes;\n }\n\n /**\n * Run through the given nodes in the DomQuery execute the inline scripts\n * @param sticky if set to true the evaluated elements will stick to the head, default false\n * @param whitelisted: optional whitelist function which can filter out script tags which are not processed\n * defaults to the standard jsf.js exclusion (we use this code for myfaces)\n */\n runScripts(sticky = false, whitelisted: (val: string) => boolean = DEFAULT_WHITELIST): DomQuery {\n const evalCollectedScripts = (scriptsToProcess: { evalText: string, nonce: string }[]) => {\n if (scriptsToProcess.length) {\n // script source means we have to eval the existing\n // scripts before we run the 'include' command\n // this.globalEval(finalScripts.join(\"\\n\"));\n let joinedScripts = [];\n new Es2019Array(...scriptsToProcess).forEach(item => {\n if (!item.nonce) {\n joinedScripts.push(item.evalText)\n } else {\n if (joinedScripts.length) {\n this.globalEval(joinedScripts.join(\"\\n\"));\n joinedScripts.length = 0;\n }\n\n (!sticky) ?\n this.globalEval(item.evalText, item.nonce) :\n this.globalEvalSticky(item.evalText, item.nonce);\n }\n });\n if (joinedScripts.length) {\n (!sticky) ? this.globalEval(joinedScripts.join(\"\\n\")) :\n this.globalEvalSticky(joinedScripts.join(\"\\n\"));\n joinedScripts.length = 0;\n }\n\n scriptsToProcess = [];\n }\n return scriptsToProcess;\n }\n\n let finalScripts = [],\n allowedItemTypes = [\"\", \"script\", \"text/javascript\", \"text/ecmascript\", \"ecmascript\"],\n execScript = (item) => {\n let tagName = item.tagName;\n let itemType = (item?.type ?? '').toLowerCase();\n if (tagName &&\n eqi(tagName, \"script\") &&\n allowedItemTypes.indexOf(itemType) != -1) {\n let src = item.getAttribute('src');\n if ('undefined' != typeof src\n && null != src\n && src.length > 0\n ) {\n let nonce = item?.nonce ?? item.getAttribute('nonce').value;\n // we have to move this into an inner if because chrome otherwise chokes\n // due to changing the and order instead of relying on left to right\n // if jsf.js is already registered we do not replace it anymore\n if (whitelisted(src)) {\n // we run the collected scripts, before we run the 'include' command\n finalScripts = evalCollectedScripts(finalScripts);\n if (!sticky) {\n (!!nonce) ? this.loadScriptEval(src, 0, nonce) :\n // if no nonce is set we do not pass any once\n this.loadScriptEval(src, 0);\n } else {\n (!!nonce) ? this.loadScriptEvalSticky(src, 0, nonce) :\n // if no nonce is set we do not pass any once\n this.loadScriptEvalSticky(src, 0);\n }\n }\n\n } else {\n // embedded script auto eval\n // probably not needed anymore\n let evalText = trim(item.text || item.innerText || item.innerHTML);\n let go = true;\n\n while (go) {\n go = false;\n if (evalText.substring(0, 4) == \"<!--\") {\n evalText = evalText.substring(4);\n go = true;\n }\n if (evalText.substring(0, 4) == \"//<!--\") {\n evalText = evalText.substring(6);\n go = true;\n }\n if (evalText.substring(0, 11) == \"//<![CDATA[\") {\n evalText = evalText.substring(11);\n go = true;\n }\n }\n let nonce = item?.nonce ?? item.getAttribute('nonce').value ?? '';\n // we have to run the script under a global context\n // we store the script for fewer calls to eval\n finalScripts.push({\n nonce,\n evalText\n });\n }\n }\n };\n try {\n let scriptElements = new DomQuery(this.filterSelector(\"script\"), this.querySelectorAll(\"script\"));\n // script execution order by relative pos in their dom tree\n scriptElements.asArray\n .flatMap(item => [...item.values])\n .sort((node1, node2) => node2.compareDocumentPosition(node1) - 3) // preceding 2, following == 4)\n .forEach(item => execScript(item));\n\n evalCollectedScripts(finalScripts);\n } catch (e) {\n if (console && console.error) {\n // not sure if we\n // should use our standard\n // error mechanisms here\n // because in the head appendix\n // method only a console\n // error would be raised as well\n console.error(e.message || e.description);\n }\n } finally {\n // the usual ie6 fix code\n // the IE6 garbage collector is broken\n // nulling closures helps somewhat to reduce\n // mem leaks, which are impossible to avoid\n // at this browser\n execScript = null;\n }\n return this;\n }\n\n runCss(): DomQuery {\n\n const execCss = (toReplace: HTMLElement) => {\n const _toReplace = DomQuery.byId(toReplace);\n const tagName = _toReplace.tagName.orElse(\"\").value;\n let newElement = DomQuery.fromMarkup(`<${tagName.toLowerCase()} />`);\n newElement = newElement.copyAttrs(_toReplace);\n newElement.innerHTML = toReplace.innerHTML;\n // css suffices a simple replace to get it eval-ed, no need\n // for a full head replace\n _toReplace.replace(newElement);\n };\n\n const cssElems: DomQuery = new DomQuery(this.filterSelector(\"link, style\"), this.querySelectorAll(\"link, style\"));\n\n cssElems.asArray\n .flatMap(item => [...item.values])\n // sort to make sure the execution order is correct\n // this is needed because we mix 2 queries together\n // -3 is needed due to the compareDocumentPosition return value\n .sort((node1, node2) => node1.compareDocumentPosition(node2) - 3)\n .forEach(item => execCss(item as HTMLElement));\n\n return this;\n }\n\n /**\n * fires a click event on the underlying dom elements\n */\n click(): DomQuery {\n this.fireEvent(\"click\");\n return this;\n }\n\n addEventListener(type: string, listener: (evt: Event) => void, options?: boolean | EventListenerOptions): DomQuery {\n this.eachElem((node: Element) => node.addEventListener(type, listener, options));\n return this;\n }\n\n removeEventListener(type: string, listener: (evt: Event) => void, options?: boolean | EventListenerOptions): DomQuery {\n this.eachElem((node: Element) => node.removeEventListener(type, listener, options));\n return this;\n }\n\n /**\n * fires an event\n */\n fireEvent(eventName: string, options: {[key: string]: any} = {}) {\n // merge with last one having the highest priority\n\n let finalOptions: any = {\n bubbles: true, cancelable: true\n }\n finalOptions = simpleShallowMerge(finalOptions, options);\n\n this.eachElem((node: Element) => {\n let doc;\n if (node.ownerDocument) {\n doc = node.ownerDocument;\n } else if (node.nodeType == 9) {\n // the node may be the document itself, nodeType 9 = DOCUMENT_NODE\n doc = node;\n } else {\n throw new Error(\"Invalid node passed to fireEvent: \" + node.id);\n }\n\n if (node.dispatchEvent) {\n // Gecko-style approach (now the standard) takes more work\n let EventClass = Event;\n\n // Different events have different event classes.\n // If this switch statement can't map an eventName to an EventClass,\n // the event firing is going to fail.\n // extend this list on demand\n switch (eventName) {\n case \"click\": // Dispatching of 'click' appears to not work correctly in Safari. Use 'mousedown' or 'mouseup' instead.\n case \"mousedown\":\n case \"mouseup\":\n case \"mousemove\":\n EventClass = this.global().MouseEvent;\n break;\n case \"keyup\":\n case \"keydown\":\n case \"keypress\":\n EventClass = this.global().KeyboardEvent;\n break;\n case \"focus\":\n case \"change\":\n case \"blur\":\n case \"select\":\n break;\n default:\n throw \"fireEvent: Couldn't find an event class for event '\" + eventName + \"'.\";\n }\n\n let event = new EventClass(eventName, finalOptions);\n // this is added as an extra to allow internally the detection of synthetic events\n // not used atm, but it does not hurt to have the extra info\n (event as any).synthetic = true; // allow detection of synthetic events\n // The second parameter says go ahead with the default action\n node.dispatchEvent(event);\n } else if ((<any>node).fireEvent) {\n // IE-old school style, you can drop this if you don't need to support IE8 and lower\n let event = doc.createEventObject();\n event.synthetic = true; // allow detection of synthetic events\n Object.keys(finalOptions).forEach(key => event[key] = finalOptions[key]);\n (<any>node).fireEvent(\"on\" + eventName, event);\n }\n })\n }\n\n textContent(joinString: string = \"\"): string {\n return this.asArray\n .map((value: DomQuery) => {\n let item = value.getAsElem(0).orElseLazy(() => {\n return <any>{\n textContent: \"\"\n };\n }).value;\n return (<any>item).textContent || \"\";\n })\n .reduce((text1, text2) => [text1,joinString,text2].join(\"\"), \"\");\n }\n\n innerText(joinString: string = \"\"): string {\n return this.asArray\n .map((value: DomQuery) => {\n let item = value.getAsElem(0).orElseLazy(() => {\n return <any>{\n innerText: \"\"\n };\n }).value;\n return (<any>item).innerText || \"\";\n })\n .reduce((text1, text2) => {\n return [text1, text2].join(joinString)\n }, \"\");\n }\n\n /**\n * encodes all input elements properly into respective\n * config entries, this can be used\n * for legacy systems, for newer use-cases, use the\n * HTML5 Form class which all newer browsers provide\n *\n * @param toMerge optional config which can be merged in\n * @return a copy pf\n */\n encodeFormElement(toMerge = {}): {[key: string]: any} {\n\n // browser behavior no element name no encoding (normal submit fails in that case)\n // https:// issues.apache.org/jira/browse/MYFACES-2847\n if (this.name.isAbsent()) {\n return;\n }\n\n // let´s keep it side-effects free\n let target = simpleShallowMerge(toMerge);\n\n this.each((element: DomQuery) => {\n if (element.name.isAbsent()) {// no name, no encoding\n return;\n }\n let name = element.name.value;\n let tagName = element.tagName.orElse(\"__none__\").value.toLowerCase();\n let elemType = element.type.orElse(\"__none__\").value.toLowerCase();\n\n elemType = elemType.toLowerCase();\n\n // routine for all elements\n // rules:\n // - process only input, textarea and select elements\n // - elements must have attribute \"name\"\n // - elements must not be disabled\n if (((tagName == \"input\" || tagName == \"textarea\" || tagName == \"select\") &&\n (name != null && name != \"\")) && !element.disabled) {\n\n // routine for select elements\n // rules:\n // - if select-one and value-Attribute exist => \"name=value\"\n // (also if value empty => \"name=\")\n // - if select-one and value-Attribute don't exist =>\n // \"name=DisplayValue\"\n // - if select multi and multiple selected => \"name=value1&name=value2\"\n // - if select and selectedIndex=-1 don't submit\n if (tagName == \"select\") {\n // selectedIndex must be >= 0 to be submitted\n let selectElem: HTMLSelectElement = <HTMLSelectElement>element.getAsElem(0).value;\n if (selectElem.selectedIndex >= 0) {\n let uLen = selectElem.options.length;\n for (let u = 0; u < uLen; u++) {\n // find all selected options\n // let subBuf = [];\n if (selectElem.options[u].selected) {\n let elementOption = selectElem.options[u];\n append(target, name).value = (elementOption.getAttribute(\"value\") != null) ?\n elementOption.value : elementOption.text;\n }\n }\n }\n }\n\n // routine for remaining elements\n // rules:\n // - don't submit no selects (processed above), buttons, reset buttons, submit buttons,\n // - submit checkboxes and radio inputs only if checked\n if (\n (\n tagName != ALLOWED_SUBMITTABLE_ELEMENTS.SELECT &&\n elemType != ALLOWED_SUBMITTABLE_ELEMENTS.BUTTON &&\n elemType != ALLOWED_SUBMITTABLE_ELEMENTS.RESET &&\n elemType != ALLOWED_SUBMITTABLE_ELEMENTS.SUBMIT &&\n elemType != ALLOWED_SUBMITTABLE_ELEMENTS.IMAGE\n ) && (\n (\n elemType != ALLOWED_SUBMITTABLE_ELEMENTS.CHECKBOX && elemType != ALLOWED_SUBMITTABLE_ELEMENTS.RADIO) ||\n element.checked\n )\n ) {\n let uploadedFiles = (<any>element.value)?.value?.files;\n let filesArr: any = uploadedFiles ?? [];\n if (filesArr?.length) { //files can be empty but set\n // xhr level2, single multiple must be passes as they are\n assign(target, name).value = Array.from(filesArr);\n } else {\n if(!!uploadedFiles) { //we skip empty file elements i\n return;\n }\n //checkboxes etc.. need to be appended\n append(target, name).value = element.inputValue.value;\n }\n }\n\n }\n });\n\n return target;\n }\n\n get cDATAAsString(): string {\n let TYPE_CDATA_BLOCK = 4;\n\n let res = this.asArray\n .flatMap( item => {\n return item.childNodes.asArray;\n })\n .filter(item => {\n return item?.value?.value?.nodeType == TYPE_CDATA_BLOCK;\n })\n .reduce((reduced: Array<any>, item: DomQuery) => {\n reduced.push((<any>item?.value?.value)?.data ?? \"\");\n return reduced;\n }, []);\n /*let res: any = this.lazyStream.flatMap(item => {\n return item.childNodes.stream\n }).filter(item => {\n return item?.value?.value?.nodeType == TYPE_CDATA_BLOCK;\n }).reduce((reduced: Array<any>, item: DomQuery) => {\n reduced.push((<any>item?.value?.value)?.data ?? \"\");\n return reduced;\n }, []).value;*/\n\n // response may contain several blocks\n return res.join(\"\");\n }\n\n subNodes(from: number, to?: number): DomQuery {\n if (Optional.fromNullable(to).isAbsent()) {\n to = this.length;\n }\n return new DomQuery(...this.rootNode.slice(from, Math.min(to, this.length)));\n }\n\n\n // because we can stream from an array stream directly into the dom query\n _limits = -1;\n\n limits(end: number): DomQuery {\n this._limits = end;\n return <any>this;\n }\n\n //-- internally exposed methods needed for the interconnectivity\n hasNext() {\n let isLimitsReached = this._limits != -1 && this.pos >= this._limits - 1;\n let isEndOfArray = this.pos >= this.values.length - 1;\n return !(isLimitsReached ||\n isEndOfArray);\n }\n\n next(): DomQuery {\n if (!this.hasNext()) {\n return null;\n }\n this.pos++;\n return new DomQuery(this.values[this.pos]);\n }\n\n\n lookAhead(cnt = 1): ITERATION_STATUS | DomQuery {\n if ((this.values.length - 1) < (this.pos + cnt)) {\n return ITERATION_STATUS.EO_STRM;\n }\n return new DomQuery(this.values[this.pos + cnt]);\n }\n\n\n current(): DomQuery | ITERATION_STATUS {\n if (this.pos == -1) {\n return ITERATION_STATUS.BEF_STRM;\n }\n return new DomQuery(this.values[this.pos]);\n }\n\n\n reset() {\n this.pos = -1;\n }\n\n attachShadow(params: { [key: string]: string } = {mode: \"open\"}): DomQuery {\n let shadowRoots: DomQuery[] = [];\n this.eachElem((item: Element) => {\n let shadowElement: DomQuery;\n if ((<any>item)?.attachShadow) {\n shadowElement = DomQuery.byId((<any>item).attachShadow(params));\n shadowRoots.push(shadowElement);\n } else {\n throw new Error(\"Shadow dom creation not supported by the browser, please use a shim, to gain this functionality\");\n }\n });\n return new DomQuery(...shadowRoots);\n }\n\n /**\n * helper to fix a common dom problem\n * we have to wait until a certain condition is met, in most of the cases we just want to know whether an element is present in the sub dom-tree before being able to proceed\n * @param condition\n * @param options\n */\n async waitUntilDom(condition: (element: DomQuery) => boolean, options: WAIT_OPTS = {\n attributes: true,\n childList: true,\n subtree: true,\n timeout: 500,\n interval: 100\n }): Promise<DomQuery> {\n return waitUntilDom(this, condition, options);\n }\n\n /**\n * returns the embedded shadow elements\n */\n get shadowElements(): DomQuery {\n let shadowElements = this.querySelectorAll(\"*\")\n .filter(item => item.hasShadow);\n\n\n let mapped: Array<ShadowRoot> = (shadowElements.allElems() || []).map(element => element.shadowRoot);\n return new DomQuery(...mapped);\n }\n\n get shadowRoot(): DomQuery {\n let shadowRoots = [];\n for (let cnt = 0; cnt < this.rootNode.length; cnt++) {\n if (this.rootNode[cnt].shadowRoot) {\n shadowRoots.push(this.rootNode[cnt].shadowRoot);\n }\n }\n return new DomQuery(...shadowRoots);\n }\n\n get hasShadow(): boolean {\n for (let cnt = 0; cnt < this.rootNode.length; cnt++) {\n if (this.rootNode[cnt].shadowRoot) {\n return true;\n }\n }\n return false;\n }\n\n // from\n // http:// blog.vishalon.net/index.php/javascript-getting-and-setting-caret-position-in-textarea/\n static getCaretPosition(ctrl: any) {\n let caretPos = 0;\n\n try {\n if ((<any>document)?.selection) {\n ctrl.focus();\n let selection = (<any>document).selection.createRange();\n // the selection now is start zero\n selection.moveStart('character', -ctrl.value.length);\n // the caret-position is the selection start\n caretPos = selection.text.length;\n }\n } catch (e) {\n // now this is ugly, but not supported input types throw errors for selectionStart\n // just in case someone dumps this code onto unsupported browsers\n }\n return caretPos;\n }\n\n /**\n * sets the caret position\n *\n * @param ctrl the control to set the caret position to\n * @param pos the position to set\n *\n * note if the control does not have any selectable and focusable behavior\n * calling this method does nothing (silent fail)\n *\n */\n static setCaretPosition(ctrl: any, pos: number) {\n ctrl?.focus ? ctrl?.focus() : null;\n // the selection range is our caret position\n\n ctrl?.setSelectiongRange ? ctrl?.setSelectiongRange(pos, pos) : null;\n }\n\n /**\n * Implementation of an iterator\n * to allow loops over dom query collections\n */\n [Symbol.iterator](): Iterator<DomQuery> {\n return {\n next: () => {\n let done = !this.hasNext();\n let val = this.next();\n return {\n done: done,\n value: <DomQuery>val\n }\n }\n }\n }\n\n /**\n * Concatenates the elements of two Dom Queries into a single one\n * @param toAttach the elements to attach\n * @param filterDoubles filter out possible double elements (aka same markup)\n */\n concat(toAttach: DomQuery, filterDoubles = true): DomQuery {\n let domQueries = this.asArray;\n const ret = new DomQuery(...domQueries.concat(toAttach.asArray));\n // we now filter the doubles out\n if (!filterDoubles) {\n return ret;\n }\n let idx = {}; // ie11 does not support sets, we have to fake it\n return new DomQuery(...ret.asArray.filter(node => {\n const notFound = !(idx?.[node.value.value.outerHTML as any]);\n idx[node.value.value.outerHTML as any] = true;\n return notFound;\n }));\n }\n\n append(elem: DomQuery): DomQuery {\n this.each(item => elem.appendTo(item));\n return this;\n }\n\n prependTo(elem: DomQuery): DomQuery {\n elem.eachElem(item => {\n item.prepend(...this.allElems());\n });\n return this;\n }\n\n prepend(elem: DomQuery): DomQuery {\n this.eachElem(item => {\n item.prepend(...elem.allElems());\n })\n return this;\n }\n\n /**\n * query selector all on the existing dom queryX object\n *\n * @param selector the standard selector\n * @return a DomQuery with the results\n */\n private _querySelectorAll(selector): DomQuery {\n if (!this?.rootNode?.length) {\n return this;\n }\n let nodes = [];\n for (let cnt = 0; cnt < this.rootNode.length; cnt++) {\n if (!this.rootNode[cnt]?.querySelectorAll) {\n continue;\n }\n let res = this.rootNode[cnt].querySelectorAll(selector);\n nodes = nodes.concat(...objToArray(res));\n }\n\n return new DomQuery(...nodes);\n }\n\n /*deep with a selector and a pseudo /shadow/ marker to break into the next level*/\n private _querySelectorAllDeep(selector): DomQuery {\n if (!this?.rootNode?.length) {\n return this;\n }\n\n let foundNodes: DomQuery = new DomQuery(...this.rootNode);\n let selectors = selector.split(/\\/shadow\\//);\n\n for (let cnt2 = 0; cnt2 < selectors.length; cnt2++) {\n if (selectors[cnt2] == \"\") {\n continue;\n }\n let levelSelector = selectors[cnt2];\n foundNodes = foundNodes.querySelectorAll(levelSelector);\n if (cnt2 < selectors.length - 1) {\n foundNodes = foundNodes.shadowRoot;\n }\n }\n\n return foundNodes;\n }\n\n\n /**\n * query selector all on the existing dom queryX object\n *\n * @param selector the standard selector\n * @return a DomQuery with the results\n */\n private _closest(selector): DomQuery {\n if (!this?.rootNode?.length) {\n return this;\n }\n let nodes = [];\n for (let cnt = 0; cnt < this.rootNode.length; cnt++) {\n if (!this.rootNode[cnt]?.closest) {\n continue;\n }\n let res = [this.rootNode[cnt].closest(selector)];\n nodes = nodes.concat(...res);\n }\n\n return new DomQuery(...nodes);\n }\n\n /*deep with a selector and a pseudo /shadow/ marker to break into the next level*/\n private _closestDeep(selector): DomQuery {\n if (!this?.rootNode?.length) {\n return this;\n }\n\n let foundNodes: DomQuery = new DomQuery(...this.rootNode);\n let selectors = selector.split(/\\/shadow\\//);\n\n for (let cnt2 = 0; cnt2 < selectors.length; cnt2++) {\n if (selectors[cnt2] == \"\") {\n continue;\n }\n let levelSelector = selectors[cnt2];\n foundNodes = foundNodes.closest(levelSelector);\n if (cnt2 < selectors.length - 1) {\n foundNodes = foundNodes.shadowRoot;\n }\n }\n\n return foundNodes;\n }\n\n // source: https:// developer.mozilla.org/en-US/docs/Web/API/Element/matches\n // code snippet license: https:// creativecommons.org/licenses/by-sa/2.5/\n /**\n * matches selector call in a browser independent manner\n *\n * @param toMatch\n * @param selector\n * @private\n */\n private _mozMatchesSelector(toMatch: Element, selector: string): boolean {\n let prototypeOwner: { [key: string]: Function } = (<any>toMatch);\n let matchesSelector: Function = prototypeOwner.matches ||\n prototypeOwner.matchesSelector ||\n prototypeOwner.mozMatchesSelector ||\n prototypeOwner.msMatchesSelector ||\n prototypeOwner.oMatchesSelector ||\n prototypeOwner.webkitMatchesSelector ||\n function (s: string) {\n let matches: NodeListOf<HTMLElement> = (document || ownerDocument).querySelectorAll(s),\n i = matches.length;\n while (--i >= 0 && matches.item(i) !== toMatch) {\n }\n return i > -1;\n };\n return matchesSelector.call(toMatch, selector);\n }\n\n /**\n * sticky non-sticky unified code of the load script eval\n * implementation if programmatic >script src=\"... loading\n *\n * @param sticky if set to true a head element is left in the dom tree after the script has loaded\n *\n * @param src the sec to load\n * @param delay delay the script loading x ms (default immediately === 0)\n * @param nonce optional nonce token to be passed into the script tag\n * @private\n */\n private _loadScriptEval(sticky: boolean, src: string, delay: number = 0, nonce ?: string) {\n let srcNode = this.createSourceNode(src, nonce);\n let nonceCheck = this.createSourceNode(null, nonce);\n let marker = `nonce_${Date.now()}_${Math.random()}`;\n nonceCheck.innerHTML = `document.head[\"${marker}\"] = true` // noop\n\n let head = document.head;\n // upfront nonce check, needed mostly for testing\n // but cannot hurt to block src calls which have invalid nonce on localhost\n // the reason for doing this up until now we have a similar construct automatically\n // by loading the scripts via xhr and then embedding them.\n // this is not needed anymore but the nonce is more relaxed with script src\n // we now enforce it the old way\n\n head.appendChild(nonceCheck);\n head.removeChild(nonceCheck);\n if(!head[marker]) {\n return;\n }\n try {\n if (!delay) {\n head.appendChild(srcNode);\n if(!sticky) {\n head.removeChild(srcNode);\n }\n } else {\n setTimeout(() => {\n head.appendChild(srcNode);\n if(!sticky) {\n head.removeChild(srcNode);\n }\n }, delay);\n }\n } finally {\n delete head[marker];\n }\n\n return this;\n }\n\n /**\n * resolves an attribute holder compared\n * @param attrName the attribute name\n */\n private resolveAttributeHolder(attrName: string = \"value\"): HTMLFormElement | any {\n let ret = [];\n ret[attrName] = null;\n return (attrName in this.getAsElem(0).value) ?\n this.getAsElem(0).value :\n ret;\n }\n\n private createSourceNode(src: string | null, nonce?: string) {\n let srcNode: HTMLScriptElement = document.createElement(\"script\");\n srcNode.type = \"text/javascript\";\n if (!!nonce) {\n if ('undefined' != typeof srcNode?.nonce) {\n srcNode.nonce = nonce;\n } else {\n srcNode.setAttribute(\"nonce\", nonce);\n }\n }\n if(!!src) {\n srcNode.src = src;\n }\n\n return srcNode;\n }\n\n private applyNonce(nonce: string, script: HTMLScriptElement) {\n if (nonce) {\n if ('undefined' != typeof script?.nonce) {\n script.nonce = nonce;\n } else {\n script.setAttribute(\"nonce\", nonce);\n }\n }\n }\n\n}\n\n\n/**\n * Various collectors\n * which can be used in conjunction with Streams\n */\n\n/**\n * A collector which bundles a full dom query stream into a single dom query element\n *\n * This connects basically our stream back into DomQuery\n */\nexport class DomQueryCollector implements ICollector<DomQuery, DomQuery> {\n\n data: DomQuery[] = [];\n\n collect(element: DomQuery) {\n this.data.push(element);\n }\n\n get finalValue(): DomQuery {\n return new DomQuery(...this.data);\n }\n}\n\n/**\n * abbreviation for DomQuery\n */\nexport const DQ = DomQuery;\nexport type DQ = DomQuery;\n// noinspection JSUnusedGlobalSymbols\n/**\n * replacement for the jquery $\n */\nexport const DQ$ = DomQuery.querySelectorAll;\n","/**\n * Extended array\n */\n\n/**\n * Extended array which adds various es 2019 shim functions to the normal array\n * We must remap all array producing functions in order to keep\n * the delegation active, once we are in!\n */\nclass Es2019Array_<T> extends Array<T>{\n\n _another: T[];\n\n constructor(...another: T[]) {\n super(...another);\n if((another as any)._another) {\n this._another = (another as any)._another;\n } else {\n this._another = another;\n }\n\n //for testing it definitely runs into this branch because we are on es5 level\n //if (!(<any>Array.prototype).flatMap) {\n this.flatMap = (flatMapFun) => this._flatMap(flatMapFun) as any;\n //}\n //if (!(<any>Array.prototype).flat) {\n this.flat = (flatLevel: number = 1) => this._flat(flatLevel);\n //}\n }\n\n map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[] {\n const ret = Array.prototype.map.call(this._another, callbackfn, thisArg);\n return new (_Es2019Array as any) (... ret);\n }\n\n concat(...items): T[] {\n const ret = Array.prototype.concat.call(this._another, ...items);\n return new (_Es2019Array as any)(... ret);\n }\n\n reverse(): T[] {\n const ret = Array.prototype.reverse.call(this._another);\n return new (_Es2019Array as any)(... ret);\n }\n\n slice(start?: number, end?: number): T[] {\n const ret = Array.prototype.slice.call(this._another, start, end);\n return new (_Es2019Array as any)(...ret);\n }\n\n splice(start: number, deleteCount?: number): T[] {\n const ret = Array.prototype.splice.call(this._another, start, deleteCount);\n return new (_Es2019Array as any)(...ret);\n }\n\n filter<S extends T>(predicate: (value: T, index: number, array: T[]) => any, thisArg?: any): S[] {\n const ret = Array.prototype.filter.call(this._another, predicate, thisArg);\n return new (_Es2019Array as any)(...ret);\n }\n\n\n reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T {\n const ret = Array.prototype.reduce.call(this._another, callbackfn, initialValue);\n return ret;\n }\n\n /*reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T {\n const ret = Array.prototype.reduceRight.call(callbackfn, initialValue);\n return ret;\n }*/\n\n private _flat(flatDepth = 1) {\n return this._flatResolve(this._another, flatDepth);\n }\n\n private _flatResolve(arr, flatDepth = 1) {\n //recursion break\n if (flatDepth == 0) {\n return arr;\n }\n let res = [];\n\n let reFlat = item => {\n item = Array.isArray(item) ? item : [item];\n let mapped = this._flatResolve(item, flatDepth - 1);\n res = res.concat(mapped);\n };\n arr.forEach(reFlat)\n\n return new Es2019Array(...res);\n }\n\n private _flatMap(mapperFunction: Function): any {\n let res = this.map(item => mapperFunction(item));\n return this._flatResolve(res);\n }\n}\n\n//let _Es2019Array = function<T>(...data: T[]) {};\n\n//let oldProto = Es2019Array.prototype;\n\nexport function _Es2019Array<T>(...data: T[]): Es2019Array_<T> {\n let ret = new Es2019Array_<T>(...data);\n let proxied = new Proxy<Es2019Array_<T>>(ret, {\n get(target: Es2019Array_<unknown>, p: string | symbol, receiver: any): any {\n if(\"symbol\" == typeof p) {\n\n return target._another[p];\n }\n if(!isNaN(parseInt(p as string))) {\n return target._another[p];\n } else {\n return target[p];\n }\n },\n\n set(target, property, value): boolean {\n target[property] = value;\n target._another[property] = value;\n return true;\n }\n\n });\n return proxied;\n};\n\n/**\n * this is the switch between normal array and our shim\n * the shim is only provided in case the native browser\n * does not yet have flatMap support on arrays\n */\nexport var Es2019Array: any = (Array.prototype.flatMap) ? function<T>(...data: T[]): T[] {\n // sometimes the typescript compiler produces\n // an array without flatmap between boundaries (the result produces True for Array.isArray\n // but has no flatMap function, could be a node issue also or Typescript!\n // we remap that (could be related to: https://github.com/microsoft/TypeScript/issues/31033\n // the check and remap fixes the issue which should not exist in the first place\n return data?.flatMap ? data : _Es2019Array(...data);\n} : _Es2019Array;","/*!\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n/**\n * various environments handle the global variable different\n * we have to deal with this.\n */\nexport function _global$(): any | null {\n let _global$: any = ('undefined' != typeof globalThis && globalThis.window) ? globalThis.window:\n ('undefined' != typeof window) ? window :\n ('undefined' != typeof globalThis) ? globalThis :\n ('undefined' != typeof global && global?.window) ? global.window :\n ('undefined' != typeof global) ? global : null;\n //under test systems we often have a lazy init of the window object under global.window, but we\n //want the window object\n return _global$?.window ?? _global$;\n}\n\n","/*!\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Optional} from \"./Monad\";\nimport {Es2019Array} from \"./Es2019Array\";\n\n/**\n * Lang helpers crossported from the apache myfaces project\n */\nexport module Lang {\n \n\n //should be in lang, but for now here to avoid recursive imports, not sure if typescript still has a problem with those\n /**\n * helper function to safely resolve anything\n * this is not an elvis operator, it resolves\n * a value without exception in a tree and if\n * it is not resolvable then an optional of\n * a default value is restored or Optional.empty\n * if none is given\n *\n * usage\n * <code>\n * let var: Optiona<string> = saveResolve(() => a.b.c.d.e, \"foobaz\")\n * </code>\n *\n * @param resolverProducer a lambda which can produce the value\n * @param defaultValue an optional default value if the producer failes to produce anything\n * @returns an Optional of the produced value\n */\n export function saveResolve<T>(resolverProducer: () => T, defaultValue: T = null): Optional<T> {\n try {\n let result = resolverProducer();\n return Optional.fromNullable(result ?? defaultValue);\n } catch (e) {\n return Optional.absent;\n }\n }\n\n /**\n * lazy resolve... aka the function is called on resolve and a default value also\n * is a producing function (called only if the original producer does not produce any result)\n * @param resolverProducer the producer for the resolve\n * @param defaultValue the default value producer function\n */\n export function saveResolveLazy<T>(resolverProducer: () => T, defaultValue: () => T = null): Optional<T> {\n try {\n let result = resolverProducer();\n return Optional.fromNullable(result ?? defaultValue());\n } catch (e) {\n return Optional.absent;\n }\n }\n\n /**\n * String to array function performs a string to array transformation\n * @param {String} it the string which has to be changed into an array\n * @param {RegExp} splitter our splitter reglar expression\n * @return a trimmed array of the splitted string\n */\n export function strToArray(it: string, splitter: string | RegExp = /\\./gi): Array<string> {\n\n let ret = [];\n it.split(splitter).forEach((element => {\n ret.push(trim(element));\n }));\n return ret;\n }\n\n /**\n * hyperfast trim\n * http://blog.stevenlevithan.com/archives/faster-trim-javascript\n * crossported from dojo\n */\n export function trim(str: string): string {\n str = str.replace(/^\\s\\s*/, '');\n let ws = /\\s/, i = str.length;\n\n while (ws.test(str.charAt(--i))) {\n //do nothing\n }\n return str.slice(0, i + 1);\n }\n\n /**\n * generic object arrays like dom definitions to array conversion method which\n * transforms any object to something array like\n * @param obj\n * @param offset\n * @param pack\n * @returns an array converted from the object\n */\n export function objToArray<T>(obj: any, offset: number = 0, pack: Array<T> = []): Array<T> {\n if ((obj ?? \"__undefined__\") == \"__undefined__\") {\n return pack ?? null;\n }\n //since offset is numeric we cannot use the shortcut due to 0 being false\n //special condition array delivered no offset no pack\n if ((<any>obj) instanceof Array && !offset && !pack) return obj;\n\n return new Es2019Array(...pack.concat(Array.prototype.slice.call(obj, offset)));\n }\n\n /**\n * equalsIgnoreCase, case-insensitive comparison of two strings\n *\n * @param source\n * @param destination\n */\n export function equalsIgnoreCase(source?: string, destination?: string): boolean {\n let finalSource = source ?? \"___no_value__\";\n let finalDest = destination ?? \"___no_value__\";\n\n //in any other case we do a strong string comparison\n return finalSource.toLowerCase() === finalDest.toLowerCase();\n }\n\n\n /**\n * runtime type assertion\n *\n * @param probe the probe to be tested for a type\n * @param theType the type to be tested for\n */\n export function assertType(probe: any, theType: any): boolean {\n return isString(theType) ? typeof probe == theType : probe instanceof theType;\n }\n\n /**\n * Back ported from Dojo\n * a failsafe string determination method\n * (since in javascript String != \"\" typeof alone fails!)\n * @param it {|Object|} the object to be checked for being a string\n * @return true in case of being a string false otherwise\n */\n export function isString(it?: any): boolean {\n //\tsummary:\n //\t\tReturn true if it is a String\n return !!arguments.length && it != null && (typeof it == \"string\" || it instanceof String); // Boolean\n }\n\n /**\n * Back-ported, a failsafe determination code for checking whether an object is a function\n * @param it the object to check for being a function\n */\n export function isFunc(it: any): boolean {\n return it instanceof Function || typeof it === \"function\";\n }\n\n // code from https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n // license https://creativecommons.org/licenses/by-sa/2.5/\n export function objAssign(target: any, ...theArgs: any) { // .length of function is 2\n if (target == null) { // TypeError if undefined or null\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n let to = Object(target);\n if((<any>Object).assign) {\n theArgs.forEach(item => (<any>Object).assign(to, item));\n return to;\n }\n\n theArgs.filter(item => item != null).forEach(item => {\n let nextSource = item;\n Object.keys(nextSource)\n .filter(nextKey => Object.prototype.hasOwnProperty.call(nextSource, nextKey))\n .forEach(nextKey => to[nextKey] = nextSource[nextKey]);\n });\n return to;\n }\n\n\n}\n\n","/*!\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * A module which keeps basic monad like definitions in place\n * Useful if you need the functions in another library to keep its dependencies down\n */\n\n/*IMonad definitions*/\n\nimport {Lang} from \"./Lang\";\nimport {Es2019Array} from \"./Es2019Array\";\n\n\n/**\n * IFunctor interface,\n * defines an interface which allows to map a functor\n * via a first order function to another functor\n */\nexport interface IFunctor<T> {\n map<R>(fn: (data: T) => R): IFunctor<R>;\n}\n\n/**\n * IMonad definition, basically a functor with a flatMap implementation, flatMap reduces all nested monads after a\n * function call f into a monad with the nesting level of 1\n *\n * flatmap flats nested Monads into a IMonad of the deepest nested implementation\n */\nexport interface IMonad<T, M extends IMonad<any, any>> extends IFunctor<T> {\n flatMap<T, M>(f: (T) => M): IMonad<any, any>;\n}\n\n/**\n * a stateful functor which holds a value upn which a\n * function can be applied\n *\n * as value holder of type T\n */\nexport interface IIdentity<T> extends IFunctor<T> {\n readonly value: T;\n}\n\n\n/**\n * custom value holder definition, since we are not pure functional\n * but iterative we have structures which allow the assignment of a value\n * also not all structures are side - effect free\n */\nexport interface IValueHolder<T> {\n value: T | Array<T>;\n}\n\n/**\n * Implementation of a monad\n * (Side - effect free), no write allowed directly on the monads\n * value state\n */\nexport class Monad<T> implements IMonad<T, Monad<any>>, IValueHolder<T> {\n constructor(value: T) {\n this._value = value;\n }\n\n protected _value: T;\n\n get value(): T {\n return this._value;\n }\n\n map<R>(fn?: (data: T) => R): Monad<R> {\n if (!fn) {\n fn = (inVal: any) => <R>inVal;\n }\n let result: R = fn(this.value);\n return new Monad(result);\n }\n\n flatMap<R>(fn?: (data: T) => R): Monad<any> {\n let mapped: Monad<any> = this.map(fn);\n while (mapped?.value instanceof Monad) {\n mapped = mapped.value\n }\n return mapped;\n }\n\n}\n\n/**\n * optional implementation, an optional is basically an implementation of a Monad with additional syntactic\n * sugar on top\n * (Side - effect free, since value assignment is not allowed)\n * */\nexport class Optional<T> extends Monad<T> {\n\n /*default value for absent*/\n static absent = Optional.fromNullable(null);\n\n constructor(value: T) {\n super(value);\n }\n\n get value(): T {\n if (this._value instanceof Monad) {\n return this._value.flatMap().value\n }\n return this._value;\n }\n\n static fromNullable<V extends Optional<T>, T>(value?: T): Optional<T> {\n return <V> new Optional(value);\n }\n\n /*syntactic sugar for absent and present checks*/\n isAbsent(): boolean {\n return \"undefined\" == typeof this.value || null == this.value;\n }\n\n /**\n * any value present\n */\n isPresent(presentRunnable ?: (val ?: Monad<T>) => void): boolean {\n let absent = this.isAbsent();\n if (!absent && presentRunnable) {\n presentRunnable.call(this, this)\n }\n return !absent;\n }\n\n ifPresentLazy(presentRunnable: (val ?: Monad<T>) => void = () => {\n }): Monad<T> {\n this.isPresent.call(this, presentRunnable);\n return this;\n }\n\n orElse(elseValue: any): Optional<any> {\n if (this.isPresent()) {\n return this;\n } else {\n //shortcut\n if (elseValue == null) {\n return Optional.absent;\n }\n return this.flatMap(() => elseValue);\n }\n }\n\n /**\n * lazy, passes a function which then is lazily evaluated\n * instead of a direct value\n * @param func\n */\n orElseLazy(func: () => any): Optional<any> {\n if (this.isPresent()) {\n return this;\n } else {\n return this.flatMap(func);\n }\n }\n\n /*\n * we need to implement it to fulfill the contract, although it is used only internally\n * all values are flattened when accessed anyway, so there is no need to call this method\n */\n flatMap<R>(fn?: (data: T) => R): Optional<any> {\n let val = super.flatMap(fn);\n if (!(val instanceof Optional)) {\n return Optional.fromNullable(val.value);\n }\n\n return <Optional<any>>val.flatMap();\n }\n\n /*\n * elvis operation, take care, if you use this you lose typesafety and refactoring\n * capabilities, unfortunately typescript does not allow to have its own elvis operator\n * this is some syntactic sugar however which is quite useful*/\n getIf<R>(...key: string[]): Optional<R> {\n\n key = this.preprocessKeys(...key);\n\n let currentPos: Optional<any> = this;\n for (let cnt = 0; cnt < key.length; cnt++) {\n let currKey = this.keyVal(key[cnt]);\n let arrPos = this.arrayIndex(key[cnt]);\n\n if (currKey === \"\" && arrPos >= 0) {\n currentPos = this.getClass().fromNullable(!(currentPos.value instanceof Array) ? null : (currentPos.value.length < arrPos ? null : currentPos.value[arrPos]));\n if (currentPos.isAbsent()) {\n return currentPos;\n }\n continue;\n } else if (currKey && arrPos >= 0) {\n if (currentPos.getIfPresent(currKey).isAbsent()) {\n return currentPos;\n }\n currentPos = (currentPos.getIfPresent(currKey).value instanceof Array) ? this.getClass().fromNullable(currentPos.getIfPresent(currKey).value[arrPos]) : this.getClass().absent;\n if (currentPos.isAbsent()) {\n return currentPos;\n }\n continue;\n\n } else {\n currentPos = currentPos.getIfPresent(currKey);\n }\n if (currentPos.isAbsent()) {\n return currentPos;\n } else if (arrPos > -1) {\n currentPos = this.getClass().fromNullable(currentPos.value[arrPos]);\n }\n }\n return currentPos;\n }\n\n /**\n * simple match, if the first order function call returns\n * true then there is a match, if the value is not present\n * it never matches\n *\n * @param fn the first order function performing the match\n */\n match(fn: (item: T) => boolean): boolean {\n if (this.isAbsent()) {\n return false\n }\n return fn(this.value);\n }\n\n /**\n * convenience function to flatmap the internal value\n * and replace it with a default in case of being absent\n *\n * @param defaultVal\n * @returns {Optional<any>}\n */\n get<R>(defaultVal: any = Optional.absent): Optional<R> {\n if (this.isAbsent()) {\n return this.getClass().fromNullable(defaultVal).flatMap();\n }\n\n return this.getClass().fromNullable(this.value).flatMap();\n }\n\n toJson(): string {\n return JSON.stringify(this.value);\n }\n\n /**\n * helper to override several implementations in a more fluent way\n * by having a getClass operation we can avoid direct calls into the constructor or\n * static methods and do not have to implement several methods which rely on the type\n * of \"this\"\n * @returns the type of Optional\n */\n protected getClass(): any {\n return Optional;\n }\n\n /*helper method for getIf with array access aka <name>[<indexPos>]*/\n protected arrayIndex(key: string): number {\n let start = key.indexOf(\"[\");\n let end = key.indexOf(\"]\");\n if (start >= 0 && end > 0 && start < end) {\n return parseInt(key.substring(start + 1, end));\n } else {\n return -1;\n }\n }\n\n /*helper method for getIf with array access aka <name>[<indexPos>]*/\n protected keyVal(key: string): string {\n let start = key.indexOf(\"[\");\n\n if (start >= 0) {\n return key.substring(0, start);\n } else {\n return key;\n }\n }\n\n /**\n * additional syntactic sugar which is not part of the usual optional implementation\n * but makes life easier, if you want to sacrifice typesafety and refactoring\n * capabilities in typescript\n */\n getIfPresent<R>(key: string): Optional<R> {\n if (this.isAbsent()) {\n return this.getClass().absent;\n }\n return this.getClass().fromNullable(this.value[key]).flatMap();\n }\n\n /**\n * elvis like typesafe functional save resolver\n * a typesafe option for getIfPresent\n *\n * usage myOptional.resolve(value => value.subAttr.subAttr2).orElseLazy(....)\n * if this is resolvable without any errors an Optional with the value is returned\n * if not, then an Optional absent is returned, also if you return Optional absent\n * it is flatmapped into absent\n *\n * @param resolver the resolver function, can throw any arbitrary errors, int the error case\n * the resolution goes towards absent\n */\n resolve<V>(resolver: (item: T) => V): Optional<V> {\n if (this.isAbsent()) {\n return Optional.absent;\n }\n try {\n return Optional.fromNullable(resolver(this.value))\n } catch (e) {\n return Optional.absent;\n }\n }\n\n\n protected preprocessKeys(...keys): string[] {\n return new Es2019Array(...keys)\n .flatMap(item => {\n return new Es2019Array(...item.split(/]\\s*\\[/gi))\n .map(item => {\n item = item.replace(/^\\s+|\\s+$/g, \"\");\n if(item.indexOf(\"[\") == -1 && item.indexOf(\"]\") != -1) {\n item = \"[\" + item;\n }\n if(item.indexOf(\"]\") == -1 && item.indexOf(\"[\") != -1) {\n item = item + \"]\";\n }\n return item;\n })\n });\n }\n}\n\n\n// --------------------- From here onwards we break out the side effect free limits ------------\n\n/**\n * ValueEmbedder is the writeable version\n * of optional, it basically is a wrapper\n * around a construct which has a state\n * and can be written to.\n *\n * For the readonly version see Optional\n */\nexport class ValueEmbedder<T> extends Optional<T> implements IValueHolder<T> {\n\n /*default value for absent*/\n static absent = ValueEmbedder.fromNullable(null);\n\n protected key: string;\n\n constructor(rootElem: any, valueKey: string = \"value\") {\n super(rootElem);\n\n this.key = valueKey;\n }\n\n get value(): T {\n return this._value ? <T>this._value[this.key] : null;\n }\n\n set value(newVal: T) {\n if (!this._value) {\n return;\n }\n this._value[this.key] = newVal\n }\n\n orElse(elseValue: any): Optional<any> {\n let alternative = {};\n alternative[this.key] = elseValue;\n return this.isPresent() ? this : new ValueEmbedder(alternative, this.key);\n }\n\n orElseLazy(func: () => any): Optional<any> {\n if (this.isPresent()) {\n return this;\n } else {\n let alternative = {};\n alternative[this.key] = func();\n return new ValueEmbedder(alternative, this.key);\n }\n }\n\n /**\n * helper to override several implementations in a more fluent way\n * by having a getClass operation we can avoid direct calls into the constructor or\n * static methods and do not have to implement several methods which rely on the type\n * of \"this\"\n * @returns ValueEmbedder\n */\n protected getClass(): any {\n return ValueEmbedder;\n }\n\n static fromNullable<V extends Optional<T>,T>(value?: any, valueKey: string = \"value\"): V {\n return <any> new ValueEmbedder<T>(value, valueKey);\n }\n\n}\n\n\n\n","/*!\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {DomQuery} from \"./DomQuery\";\nimport {Es2019Array} from \"./Es2019Array\";\nimport {Config} from \"./Config\";\n\n/**\n * special status of the datasource location pointer\n * if an access, outside - of the possible data boundaries is happening\n * (example for instance current without a first next call, or next\n * which goes over the last possible dataset), an iteration status return\n * value is returned marking this boundary instead of a classical element\n *\n * Note this is only internally used but must be implemented to fulfill\n * internal contracts, the end user will never see those values if he uses\n * streams!\n */\nexport enum ITERATION_STATUS {\n EO_STRM = '__EO_STRM__',\n BEF_STRM = '___BEF_STRM__',\n}\n\nexport function calculateSkips(next_strm: IStreamDataSource<any>) {\n let pos = 1;\n while (next_strm.lookAhead(pos) != ITERATION_STATUS.EO_STRM) {\n pos++;\n }\n return --pos;\n}\n\n/**\n * Every data source wich feeds data into the lazy stream\n * or stream generally must implement this interface\n *\n * It is basically an iteratable to the core\n */\nexport interface IStreamDataSource<T> {\n\n /**\n * @returns true if additional data is present false if not\n */\n hasNext(): boolean;\n\n /**\n * returns the next element in the stream\n */\n next(): T | ITERATION_STATUS;\n\n /**\n * looks ahead cnt without changing the internal data \"pointers\" of the data source\n * (this is mostly needed by possibly infinite constructs like lazy streams,\n * because they do not know by definition their\n * boundaries)\n *\n * @param cnt the elements to look ahead\n * @return either the element or ITERATION_STATUS.EO_STRM if we hit the end of the stream before\n * finding the \"cnt\" element\n */\n lookAhead(cnt ?: number): T | ITERATION_STATUS;\n\n /**\n * returns the current element, returns the same element as the previous next call\n * if there is no next before current called then we will call next as initial element\n */\n current(): T | ITERATION_STATUS;\n\n /**\n * resets the position to the beginning\n */\n reset(): void;\n}\n\n/**\n * A collector, needs to be implemented\n */\nexport interface ICollector<T, S> {\n /**\n * this method basically takes a single stream element\n * and does something with it (collecting it one way or the other\n * in most cases)\n *\n * @param element\n */\n collect(element: T);\n\n /**\n * the final result after all the collecting is done\n */\n finalValue: S;\n}\n\n\n/**\n * A data source which combines multiple streams sequentially into one\n * (this is used internally by flatmap, but also can be used externally)\n */\nexport class MultiStreamDatasource<T> implements IStreamDataSource<T> {\n\n private activeStrm;\n private selectedPos = 0;\n private strms;\n\n constructor(private first, ...strms: Array<IStreamDataSource<T>>) {\n this.strms = [first].concat(...strms);\n this.activeStrm = this.strms[this.selectedPos];\n }\n\n current(): any {\n return this.activeStrm.current();\n }\n\n hasNext(): boolean {\n if(this.activeStrm.hasNext()) {\n return true;\n }\n if(this.selectedPos >= this.strms.length) {\n return false;\n }\n return this.findNextStrm() != -1;\n }\n\n private findNextStrm(): number {\n let hasNext = false;\n let cnt = this.selectedPos;\n while(!hasNext && cnt < this.strms.length) {\n hasNext = this.strms[cnt].hasNext();\n if(!hasNext) {\n cnt++;\n }\n }\n return hasNext ? cnt : -1;\n }\n\n lookAhead(cnt: number = 1): T | ITERATION_STATUS {\n //lets clone\n const strms = this.strms.slice(this.selectedPos);\n\n if(!strms.length) {\n return ITERATION_STATUS.EO_STRM;\n }\n\n const all_strms = [...strms];\n while(all_strms.length) {\n let next_strm = all_strms.shift();\n let lookAhead = next_strm.lookAhead(cnt);\n\n if (lookAhead != ITERATION_STATUS.EO_STRM) {\n return lookAhead;\n }\n cnt = cnt - calculateSkips(next_strm);\n }\n return ITERATION_STATUS.EO_STRM;\n }\n\n\n next(): any {\n if(this.activeStrm.hasNext()) {\n return this.activeStrm.next();\n }\n this.selectedPos = this.findNextStrm();\n if(this.selectedPos == -1) {\n return ITERATION_STATUS.EO_STRM;\n }\n this.activeStrm = this.strms[this.selectedPos];\n return this.activeStrm.next();\n }\n\n reset(): void {\n this.activeStrm = this.strms[0];\n this.selectedPos = 0;\n for(let cnt = 0; cnt < this.strms.length; cnt++) {\n this.strms[cnt].reset();\n }\n }\n\n}\n\n/**\n * defines a sequence of numbers for our stream input\n */\nexport class SequenceDataSource implements IStreamDataSource<number> {\n\n start: number;\n total: number;\n value: number;\n\n constructor(start: number, total: number) {\n this.total = total;\n this.start = start;\n this.value = start - 1;\n }\n\n\n hasNext(): boolean {\n return this.value < (this.total - 1);\n }\n\n next(): number | ITERATION_STATUS {\n this.value++;\n return this.value <= (this.total - 1) ? this.value : ITERATION_STATUS.EO_STRM;\n }\n\n lookAhead(cnt = 1): number | ITERATION_STATUS {\n if ((this.value + cnt) > this.total - 1) {\n return ITERATION_STATUS.EO_STRM;\n } else {\n return this.value + cnt;\n }\n }\n\n reset(): void {\n this.value = this.start - 1;\n }\n\n current(): number | ITERATION_STATUS {\n //first condition current without initial call for next\n return (this.start - 1) ? ITERATION_STATUS.BEF_STRM : this.value;\n }\n}\n\n\n/**\n * implementation of a datasource on top of a standard array\n */\nexport class ArrayStreamDataSource<T> implements IStreamDataSource<T> {\n value: Array<T>;\n dataPos = -1;\n\n constructor(...value: Array<T>) {\n this.value = value;\n }\n\n lookAhead(cnt = 1): T | ITERATION_STATUS {\n if ((this.dataPos + cnt) > this.value.length - 1) {\n return ITERATION_STATUS.EO_STRM;\n }\n return this.value[this.dataPos + cnt];\n }\n\n hasNext(): boolean {\n return this.value.length - 1 > this.dataPos;\n }\n\n next(): T | ITERATION_STATUS {\n this.dataPos++;\n return this?.value[this.dataPos] ?? ITERATION_STATUS.EO_STRM;\n }\n\n reset() {\n this.dataPos = -1;\n }\n\n current(): T {\n return this.value[Math.max(0, this.dataPos)];\n }\n}\n\n/**\n * an intermediate data source which prefilters\n * incoming stream data\n * and lets only the data out which\n * passes the filter function check\n */\nexport class FilteredStreamDatasource<T> implements IStreamDataSource<T> {\n\n filterFunc: (T) => boolean;\n inputDataSource: IStreamDataSource<T>;\n\n _current: T | ITERATION_STATUS = ITERATION_STATUS.BEF_STRM;\n // we have to add a filter idx because the external filter values might change over time, so\n // we cannot reset the state properly unless we do it from a snapshot\n _filterIdx = {};\n _unfilteredPos = 0;\n\n constructor(filterFunc: (T) => boolean, parent: IStreamDataSource<T>) {\n this.filterFunc = filterFunc;\n this.inputDataSource = parent;\n }\n\n /**\n * in order to filter we have to make a look ahead until the\n * first next allowed element\n * hence we prefetch the element and then\n * serve it via next\n */\n hasNext(): boolean {\n let steps = 1;\n let found = false;\n let next;\n\n while (!found && (next = this.inputDataSource.lookAhead(steps)) != ITERATION_STATUS.EO_STRM) {\n if (this.filterFunc(next)) {\n this._filterIdx[this._unfilteredPos + steps] = true;\n found = true;\n } else {\n steps++;\n }\n }\n return found;\n }\n\n /**\n * serve the next element\n */\n next(): T | ITERATION_STATUS {\n let found: T | ITERATION_STATUS = ITERATION_STATUS.EO_STRM;\n while (this.inputDataSource.hasNext()) {\n this._unfilteredPos++;\n let next: T = <T>this.inputDataSource.next();\n //again here we cannot call the filter function twice, because its state might change, so if indexed, we have a decent snapshot, either has next or next can trigger\n //the snapshot\n if (next != ITERATION_STATUS.EO_STRM &&\n ((this._filterIdx?.[this._unfilteredPos] ?? false) || this.filterFunc(next))) {\n this._filterIdx[this._unfilteredPos] = true;\n found = next;\n break;\n }\n }\n this._current = found as T;\n return found;\n }\n\n /**\n * looks ahead cnt without changing the internal data \"pointers\" of the data source\n * (this is mostly needed by LazyStreams, because they do not know by definition their\n * boundaries)\n *\n * @param cnt the elements to look ahead\n * @return either the element or ITERATION_STATUS.EO_STRM if we hit the end of the stream before\n * finding the \"cnt\" element\n */\n lookAhead(cnt = 1): ITERATION_STATUS | T {\n let lookupVal: T | ITERATION_STATUS;\n\n for (let loop = 1; cnt > 0 && (lookupVal = this.inputDataSource.lookAhead(loop)) != ITERATION_STATUS.EO_STRM; loop++) {\n let inCache = this._filterIdx?.[this._unfilteredPos + loop];\n if (inCache || this.filterFunc(lookupVal)) {\n cnt--;\n this._filterIdx[this._unfilteredPos + loop] = true;\n }\n }\n return lookupVal;\n }\n\n current(): T | ITERATION_STATUS {\n return this._current;\n }\n\n reset(): void {\n this._current = ITERATION_STATUS.BEF_STRM;\n this._filterIdx = {};\n this._unfilteredPos = 0;\n this.inputDataSource.reset();\n }\n}\n\n/**\n * an intermediate datasource which maps the items from\n * one into another\n */\nexport class MappedStreamDataSource<T, S> implements IStreamDataSource<S> {\n\n mapFunc: (T) => S;\n inputDataSource: IStreamDataSource<T>;\n\n constructor(mapFunc: (T) => S, parent: IStreamDataSource<T>) {\n this.mapFunc = mapFunc;\n this.inputDataSource = parent;\n }\n\n hasNext(): boolean {\n return this.inputDataSource.hasNext();\n }\n\n next(): S {\n return this.mapFunc(this.inputDataSource.next());\n }\n\n reset(): void {\n this.inputDataSource.reset();\n }\n\n current(): S {\n return this.mapFunc(this.inputDataSource.current());\n }\n\n lookAhead(cnt = 1): ITERATION_STATUS | S {\n const lookAheadVal = this.inputDataSource.lookAhead(cnt);\n return (lookAheadVal == ITERATION_STATUS.EO_STRM) ? lookAheadVal as ITERATION_STATUS : this.mapFunc(lookAheadVal) as S;\n }\n}\n\n\n/**\n * For the time being we only need one collector\n * a collector which collects a stream back into arrays\n */\nexport class ShimArrayCollector<S> implements ICollector<S, Array<S>> {\n private data: Array<S> = new Es2019Array(...[]);\n\n collect(element: S) {\n this.data.push(element);\n }\n\n get finalValue(): Array<S> {\n return this.data;\n }\n}\n\n/**\n * collects the values as inverse array\n */\nexport class InverseArrayCollector<S> implements ICollector<S, Array<S>> {\n private data: Array<S> = [];\n\n collect(element: S) {\n this.data.unshift(element);\n }\n\n get finalValue(): Array<S> {\n return this.data;\n }\n}\n\n\n/**\n * collects an tuple array stream into an assoc array with elements being collected into arrays\n *\n */\nexport class ArrayAssocArrayCollector<S> implements ICollector<[string, S] | string, { [key: string]: S }> {\n finalValue: { [key: string]: any } = {};\n\n collect(element: [string, S] | string) {\n let key = element?.[0] ?? <string>element;\n this.finalValue[key] = this.finalValue?.[key] ?? [];\n this.finalValue[key].push(element?.[1] ?? true);\n }\n}\n\n/**\n * dummy collector which just triggers a run\n * on lazy streams without collecting anything\n */\nexport class Run<S> implements ICollector<S, any> {\n collect(element: S) {\n\n }\n\n get finalValue(): any {\n return null;\n }\n}\n\n/**\n * collects an assoc stream back to an assoc array\n */\nexport class AssocArrayCollector<S> implements ICollector<[string, S] | string, { [key: string]: S }> {\n\n finalValue: { [key: string]: any } = {};\n\n collect(element: [string, S] | string) {\n this.finalValue[element[0] ?? <string>element] = element[1] ?? true;\n }\n}\n\n\n/**\n * A Config collector similar to the FormDFata Collector\n */\nexport class ConfigCollector implements ICollector<{ key: string, value: any }, Config> {\n finalValue: Config = new Config({});\n\n collect(element: { key: string; value: any }) {\n this.finalValue.append(element.key).value = element.value;\n }\n}\n\n\n/**\n * Form data collector for key value pair streams\n */\nexport class FormDataCollector implements ICollector<{ key: string, value: any }, FormData> {\n finalValue: FormData = new FormData();\n\n collect(element: { key: string; value: any }) {\n this.finalValue.append(element.key, element.value);\n }\n}\n\n/**\n * Form data collector for DomQuery streams\n */\nexport class QueryFormDataCollector implements ICollector<DomQuery, FormData> {\n finalValue: FormData = new FormData();\n\n collect(element: DomQuery) {\n let toMerge = element.encodeFormElement();\n if (toMerge.isPresent()) {\n this.finalValue.append(element.name.value, toMerge.get(element.name).value);\n }\n }\n}\n\n/**\n * Encoded String collector from dom query streams\n */\nexport class QueryFormStringCollector implements ICollector<DomQuery, string> {\n\n formData: [[string, string]] = <any>[];\n\n collect(element: DomQuery) {\n let toMerge = element.encodeFormElement();\n if (toMerge.isPresent()) {\n this.formData.push([element.name.value, toMerge.get(element.name).value]);\n }\n }\n\n get finalValue(): string {\n return new Es2019Array(...this.formData)\n .map(keyVal => keyVal.join(\"=\"))\n .reduce((item1, item2) => [item1, item2].join(\"&\"));\n }\n}\n\n/**\n * For the time being we only need one collector\n * a collector which collects a stream back into arrays\n */\nexport class ArrayCollector<S> implements ICollector<S, Array<S>> {\n private data: Array<S> = [];\n\n collect(element: S) {\n this.data.push(element);\n }\n\n get finalValue(): Array<S> {\n return this.data;\n }\n}\n","/*!\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Lang} from \"./Lang\";\nimport {DomQuery} from \"./DomQuery\";\nimport isString = Lang.isString;\nimport {_global$} from \"./Global\";\n\ndeclare let ActiveXObject: any;\n\n/**\n * xml query as specialized case for DomQuery\n */\nexport class XMLQuery extends DomQuery {\n\n constructor(rootNode: Document | string | DomQuery, docType: string = \"text/xml\") {\n\n let createIe11DomQueryShim = (): DOMParser => {\n //at the time if wroting ie11 is the only relevant browser\n //left withut any DomQuery support\n let parser = new ActiveXObject(\"Microsoft.XMLDOM\");\n parser.async = false;\n //we shim th dom parser from ie in\n return <any>{\n parseFromString: (text: string, contentType: string): Document => {\n return parser.loadXML(text);\n }\n }\n };\n\n let parseXML = (xml: string): Document => {\n if (xml == null) {\n return null;\n }\n let domParser: DOMParser = Lang.saveResolveLazy<DOMParser>(\n () => new (_global$()).DOMParser(),\n (): DOMParser => createIe11DomQueryShim()\n ).value;\n return domParser.parseFromString(xml, <any> docType);\n };\n\n if (isString(rootNode)) {\n super(parseXML(<string>rootNode))\n } else {\n super(rootNode);\n }\n }\n\n isXMLParserError(): boolean {\n return this.querySelectorAll(\"parsererror\").isPresent();\n }\n\n toString(): string {\n let ret = [];\n this.eachElem((node: any) => {\n let serialized = (_global$())?.XMLSerializer?.constructor()?.serializeToString(node) ?? node?.xml;\n if (!!serialized) {\n ret.push(serialized);\n }\n });\n return ret.join(\"\");\n }\n\n parserErrorText(joinstr: string): string {\n return this.querySelectorAll(\"parsererror\").textContent(joinstr);\n }\n\n static parseXML(txt: string): XMLQuery {\n return new XMLQuery(txt);\n }\n\n static parseHTML(txt: string): XMLQuery {\n return new XMLQuery(txt, \"text/html\");\n }\n\n static fromString(txt: string, parseType: string = \"text/xml\"): XMLQuery {\n return new XMLQuery(txt, parseType);\n }\n}\n\nexport const XQ = XMLQuery;\nexport type XQ = XMLQuery;","/*!\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nexport {DomQuery, ElementAttribute, DomQueryCollector, DQ, DQ$} from \"./DomQuery\";\nexport {IDomQuery} from \"./IDomQuery\";\nexport {Lang} from \"./Lang\";\nexport {Monad, IValueHolder, IFunctor, IMonad, IIdentity, Optional, ValueEmbedder} from \"./Monad\";\nexport {XMLQuery, XQ} from \"./XmlQuery\";\nexport {assign, assignIf, append, simpleShallowMerge, shallowMerge} from \"./AssocArray\"\nexport {Config} from \"./Config\";\nexport {ConfigDef} from \"./Config\";\nexport {CONFIG_ANY} from \"./Config\";\nexport {CONFIG_VALUE} from \"./Config\";\nexport * as Assoc from \"./AssocArray\";\nexport {Es2019Array, _Es2019Array} from \"./Es2019Array\";\n\n\n\n\n\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {Implementation} from \"../impl/AjaxImpl\";\nimport {PushImpl} from \"../impl/PushImpl\";\nimport {oam as _oam} from \"../myfaces/OamSubmit\";\nimport {$nsp, CTX_OPTIONS_EXECUTE, CTX_OPTIONS_PARAMS, CTX_PARAM_RENDER, P_BEHAVIOR_EVENT} from \"../impl/core/Const\";\nimport {ErrorData} from \"../impl/xhrCore/ErrorData\";\nimport {EventData} from \"../impl/xhrCore/EventData\";\n\n//we use modules to get a proper jsdoc and static/map structure in the calls\n//as per spec requirement\nexport module faces {\n\n\n /**\n * Version of the implementation for the faces.ts.\n * <p />\n * as specified within the jsf specifications faces.html:\n * <ul>\n * <li>left two digits major release number</li>\n * <li>middle two digits minor spec release number</li>\n * <li>right two digits bug release number</li>\n * </ul>\n * @constant\n */\n export var specversion = 400000;\n /**\n * Implementation version as specified within the jsf specification.\n * <p />\n * A number increased with every implementation version\n * and reset by moving to a new spec release number\n *\n * @constant\n */\n export var implversion = 0;\n\n /**\n * SeparatorChar as defined by facesContext.getNamingContainerSeparatorChar()\n */\n export var separatorchar: string = getSeparatorChar();\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Context Path as defined externalContext.requestContextPath\n */\n export var contextpath: string = '#{facesContext.externalContext.requestContextPath}';\n // we do not have a fallback here, for now\n\n /**\n * This method is responsible for the return of a given project stage as defined\n * by the jsf specification.\n * <p/>\n * Valid return values are:\n * <ul>\n * <li>"Production"</li>\n * <li>"Development"</li>\n * <li>"SystemTest"</li>\n * <li>"UnitTest"</li>\n * </li>\n *\n * @return {String} the current project state emitted by the server side method:\n * <i>jakarta.faces.application.Application.getProjectStage()</i>\n */\n export function getProjectStage(): string {\n return Implementation.getProjectStage();\n }\n\n /**\n * collect and encode data for a given form element (must be of type form)\n * find the jakarta.faces.ViewState element and encode its value as well!\n * return a concatenated string of the encoded values!\n *\n * @throws an exception in case of the given element not being of type form!\n * https://issues.apache.org/jira/browse/MYFACES-2110\n */\n export function getViewState(formElement: Element | string): string {\n return Implementation.getViewState(formElement);\n }\n\n /**\n * returns the window identifier for the given node / window\n * @return the window identifier or null if none is found\n * @param rootNode\n */\n export function getClientWindow(rootNode?: Element | string): string {\n return Implementation.getClientWindow(rootNode);\n }\n\n // private helper functions\n function getSeparatorChar(): string {\n const sep = '#{facesContext.namingContainerSeparatorChar}';\n //We now enable standalone mode, the separator char was not mapped we make a fallback to 2.3 behavior\n //the idea is that the separator char is provided from the underlying container, but if not then we\n //will perform a fallback (aka 2.3 has the url fallback behavior)\n return (sep.match(/\\#\\{facesContext.namingContainerSeparatorChar\\}/gi)) ? Implementation.getSeparatorChar() : sep;\n }\n\n\n\n\n export module ajax {\n \"use strict\";\n\n /**\n * this function has to send the ajax requests\n *\n * following request conditions must be met:\n * <ul>\n * <li> the request must be sent asynchronously! </li>\n * <li> the request must be a POST!!! request </li>\n * <li> the request url must be the form action attribute </li>\n * <li> all requests must be queued with a client side request queue to ensure the request ordering!</li>\n * </ul>\n *\n * @param {String|Node} element: any dom element no matter being it html or jsf, from which the event is emitted\n * @param {EVENT} event: any javascript event supported by that object\n * @param {Map} options : map of options being pushed into the ajax cycle\n */\n export function request(element: Element, event?: Event, options?: Options): void {\n Implementation.request(element, event, options)\n }\n\n /**\n * response handler\n * @param request the request object having triggered this response\n * @param context the request context\n *\n */\n export function response(request: XMLHttpRequest, context?: Context): void {\n Implementation.response(request, context);\n }\n\n /**\n * Adds an error handler to our global error queue.\n * the error handler must be of the format <i>function errorListener(<errorData>)</i>\n * with errorData being of following format:\n * <ul>\n * <li> errorData.type : "error"</li>\n * <li> errorData.status : the error status message</li>\n * <li> errorData.serverErrorName : the server error name in case of a server error</li>\n * <li> errorData.serverErrorMessage : the server error message in case of a server error</li>\n * <li> errorData.source : the issuing source element which triggered the request </li>\n * <li> eventData.responseCode: the response code (aka http request response code, 401 etc...) </li>\n * <li> eventData.responseText: the request response text </li>\n * <li> eventData.responseXML: the request response xml </li>\n * </ul>\n *\n * @param errorFunc error handler must be of the format <i>function errorListener(<errorData>)</i>\n */\n export function addOnError(errorFunc: (data: ErrorData) => void): void {\n Implementation.addOnError(<any>errorFunc);\n }\n\n /**\n * Adds a global event listener to the ajax event queue. The event listener must be a function\n * of following format: <i>function eventListener(<eventData>)</i>\n *\n * @param eventFunc event must be of the format <i>function eventListener(<eventData>)</i>\n */\n export function addOnEvent(eventFunc: (data: EventData) => void): void {\n Implementation.addOnEvent(<any>eventFunc);\n }\n }\n\n export module util {\n\n /**\n * varargs function which executes a chain of code (functions or any other code)\n *\n * if any of the code returns false, the execution\n * is terminated prematurely skipping the rest of the code!\n *\n * @param {HTMLElement | String} source, the callee object\n * @param {Event} event, the event object of the callee event triggering this function\n * @param funcs ... arbitrary array of functions or strings\n * @returns true if the chain has succeeded false otherwise\n */\n export function chain(source: HTMLElement | string, event: Event | null, ...funcs: Array<Function | string>): boolean {\n return Implementation.chain(source, event, ...(funcs as EvalFuncs));\n }\n }\n\n export module push {\n /**\n * @param socketClientId the sockets client identifier\n * @param url the uri to reach the socket\n * @param channel the channel name/id\n * @param onopen The function to be invoked when the web socket is opened.\n * @param onmessage The function to be invoked when a message is received.\n * @param onerror The function to be invoked when an error occurs.\n * @param onclose The function to be invoked when the web socket is closed.\n * @param behaviors functions which are invoked whenever a message is received\n * @param autoConnect Whether or not to automatically open the socket. Defaults to <code>false</code>.\n */\n export function init(socketClientId: string,\n url: string,\n channel: string,\n onopen: Function,\n onmessage: Function,\n onerror: Function,\n onclose: Function,\n behaviors: any,\n autoConnect: boolean): void {\n PushImpl.init(socketClientId, url, channel, onopen, onmessage, onerror, onclose, behaviors, autoConnect);\n }\n\n /**\n * Open the web socket on the given channel.\n * @param socketClientId The name of the web socket channel.\n * @throws Error is thrown, if the channel is unknown.\n */\n export function open(socketClientId: string): void {\n PushImpl.open(socketClientId);\n }\n\n /**\n * Close the web socket on the given channel.\n * @param socketClientId The id of the web socket client.\n * @throws Error is thrown, if the channel is unknown.\n */\n export function close(socketClientId: string): void {\n PushImpl.close(socketClientId);\n }\n\n }\n}\n\nexport module myfaces {\n /**\n * AB function similar to mojarra and Primefaces\n * not part of the spec but a convenience accessor method\n * Code provided by Thomas Andraschko\n *\n * @param source the event source\n * @param event the event\n * @param eventName event name for java.jakarta.faces.behavior.event\n * @param execute execute list as passed down in faces.ajax.request\n * @param render the render list as string\n * @param options the options which need to be merged in\n * @param userParameters a set of user parameters which go into the final options under params, they can overide whatever is passed via options\n */\n export function ab(source: Element, event: Event, eventName: string, execute: string, render: string, options: Options = {}, userParameters: Options = {}): void {\n if(!options) {\n options = {};\n }\n if(!userParameters) {\n userParameters = {};\n }\n if (eventName) {\n options[CTX_OPTIONS_PARAMS] = options?.[CTX_OPTIONS_PARAMS] ?? {};\n options[CTX_OPTIONS_PARAMS][$nsp(P_BEHAVIOR_EVENT)] = eventName;\n }\n if (execute) {\n options[CTX_OPTIONS_EXECUTE] = execute;\n }\n if (render) {\n options[CTX_PARAM_RENDER] = render;\n }\n\n //we push the users parameters in\n if (!options[\"params\"]) {\n options[\"params\"] = {};\n }\n\n for (let key in userParameters) {\n options[\"params\"][key] = userParameters[key];\n }\n\n (window?.faces ?? window.jsf).ajax.request(source, event, options);\n }\n\n\n const onReadyChain: Array<() => void> = [];\n let readyStateListener = null;\n // noinspection JSUnusedGlobalSymbols\n /**\n * Helper function in the myfaces namespace to handle document ready properly for the load case\n * the ajax case, does not need proper treatment, since it is deferred anyway.\n * Used by command script as helper function!\n *\n * @param executionFunc the function to be executed upon ready\n */\n export function onDomReady(executionFunc: () => void) {\n if(document.readyState !== \"complete\") {\n onReadyChain.push(executionFunc);\n if(!readyStateListener) {\n readyStateListener = () => {\n window.removeEventListener(\"DOMContentLoaded\", readyStateListener);\n readyStateListener = null;\n try {\n onReadyChain.forEach(func => func());\n } finally {\n //done we clear now the ready chain\n onReadyChain.length = 0;\n }\n };\n window.addEventListener(\"DOMContentLoaded\", readyStateListener);\n }\n } else {\n if(readyStateListener) {\n readyStateListener();\n }\n executionFunc();\n }\n\n }\n\n /**\n * legacy oam functions\n */\n export const oam = _oam;\n}\n\n\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {IListener} from \"./util/IListener\";\nimport {Response} from \"./xhrCore/Response\";\nimport {XhrRequest} from \"./xhrCore/XhrRequest\";\nimport {Config, DQ, DQ$, Lang, Optional} from \"mona-dish\";\nimport {Assertions} from \"./util/Assertions\";\nimport {ExtConfig, ExtDomQuery} from \"./util/ExtDomQuery\";\nimport {ErrorData} from \"./xhrCore/ErrorData\";\nimport {EventData} from \"./xhrCore/EventData\";\nimport {ExtLang} from \"./util/Lang\";\n\nimport {\n CTX_OPTIONS_EXECUTE,\n CTX_PARAM_REQ_PASS_THR,\n CTX_PARAM_SRC_CTL_ID,\n CTX_PARAM_SRC_FRM_ID,\n IDENT_ALL,\n IDENT_FORM,\n IDENT_NONE,\n IDENT_THIS,\n MYFACES,\n ON_ERROR,\n ON_EVENT,\n P_AJAX,\n P_CLIENT_WINDOW,\n P_EVT,\n P_EXECUTE,\n P_AJAX_SOURCE,\n P_RENDER,\n P_RESET_VALUES,\n P_WINDOW_ID,\n CTX_PARAM_RENDER,\n SOURCE,\n HTML_TAG_FORM,\n CTX_OPTIONS_PARAMS,\n VIEW_ID,\n $faces,\n EMPTY_STR,\n NAMED_VIEWROOT,\n NAMING_CONTAINER_ID,\n CTX_PARAM_PPS,\n MYFACES_OPTION_PPS,\n $nsp,\n CTX_PARAM_UPLOAD_ON_PROGRESS,\n CTX_PARAM_UPLOAD_PREINIT,\n CTX_PARAM_UPLOAD_LOADSTART,\n CTX_PARAM_UPLOAD_LOADEND,\n CTX_PARAM_UPLOAD_LOAD, CTX_PARAM_UPLOAD_ERROR, CTX_PARAM_UPLOAD_ABORT, CTX_PARAM_UPLOAD_TIMEOUT\n} from \"./core/Const\";\nimport {\n resolveDefaults,\n resolveDelay,\n resolveForm,\n resolveTimeout, resolveViewId, resolveViewRootId, resoveNamingContainerMapper\n} from \"./xhrCore/RequestDataResolver\";\nimport {encodeFormData} from \"./util/FileUtils\";\nimport {XhrQueueController} from \"./util/XhrQueueController\";\n\n/*\n * allowed project stages\n */\nenum ProjectStages {\n Production = \"Production\",\n Development = \"Development\",\n SystemTest = \"SystemTest\",\n UnitTest = \"UnitTest\"\n}\n\n/*\n * Block-filter for the pass-through filtering; the attributes given here\n * will not be transmitted from the options into the pass-through\n */\nenum BlockFilter {\n onerror = \"onerror\",\n onevent = \"onevent\",\n render = \"render\",\n execute = \"execute\",\n myfaces = \"myfaces\",\n delay = \"delay\",\n timeout = \"timeout\",\n resetValues = \"resetValues\",\n windowId = \"windowId\",\n params = \"params\"\n}\n\n\n\n/**\n * Core Implementation\n * to distinct between api and impl\n *\n * The original idea was to make the implementation pluggable\n * but this is pointless, you always can overwrite the thin api layer\n * however a dedicated api makes sense for readability reasons\n */\nexport module Implementation {\n/*\n Small internal explanation, this code is optimized for readability\n and cuts off a ton of old legacy code.\n Aka older browsers are not supported anymore.\n We use a self written helper library to keep the number of exernal\n code dependencies down.\n The library is called mona-dish and started as a small sideproject of mine\n it provides following\n\n a) Monad like structures for querying because this keeps the code denser and adds abstractions\n that always was the strong point of jQuery, and it still is better in this regard than what ecmascript provides\n\n c) A neutral json like configuration which allows assignments of arbitrary values with reduce code which then can be\n transformed into different data representations\n\n examples:\n internalCtx.assign(MYPARAM, CTX_PARAM_SRC_FRM_ID).value = form.id.value;\n passes a value into context.MYPARAM.CTX_PARAM_SRC_FRM_ID\n\n basically an abbreviation for\n\n internalCtxt[MYPARAM] = internalCtxt?.[MYPARAM] ? internalCtxt[MYPARAM] : {};\n internalCtxt[MYPARAM][CTX_PARAM_SRC_FRM_ID] = internalCtxt?.[MYPARAM][CTX_PARAM_SRC_FRM_ID] ? internalCtxt[MYPARAM][CTX_PARAM_SRC_FRM_ID] : {};\n internalCtxt[MYPARAM][CTX_PARAM_SRC_FRM_ID] = form.id.value;\n\n\n internalCtx.assign(condition, MYPARAM, CTX_PARAM_SRC_FRM_ID).value = form.id.value;\n passes a value into context.MYPARAM.CTX_PARAM_SRC_FRM_ID if condition === true otherwise it is ignored\n\n abbreviates:\n if(condition) {\n internalCtxt[MYPARAM] = internalCtxt?.[MYPARAM] ? internalCtxt[MYPARAM] : {};\n internalCtxt[MYPARAM][CTX_PARAM_SRC_FRM_ID] = internalCtxt?.[MYPARAM][CTX_PARAM_SRC_FRM_ID] ? internalCtxt[MYPARAM][CTX_PARAM_SRC_FRM_ID] : {};\n internalCtxt[MYPARAM][CTX_PARAM_SRC_FRM_ID] = form.id.value;\n }\n\n\n d) Optional constructs, while under heavy debate we only use them lightly where the api requires it from mona-dish\n\n Note the inclusion of this library uses a reduced build which only includes the part of it, which we really use\n\n */\n\n import trim = Lang.trim;\n import getMessage = ExtLang.getMessage;\n import getGlobalConfig = ExtLang.getGlobalConfig;\n import assert = Assertions.assert;\n import ofAssoc = ExtLang.ofAssoc;\n import collectAssoc = ExtLang.collectAssoc;\n\n let projectStage: string = null;\n let separator: string = null;\n let eventQueue = [];\n let errorQueue = [];\n export let requestQueue: XhrQueueController<XhrRequest> = null;\n /*error reporting threshold*/\n let threshold = \"ERROR\";\n\n /**\n * fetches the separator char from the given script tags\n *\n * @return {string} the separator char for the given script tags\n */\n export function getSeparatorChar(): string {\n return resolveGlobalConfig()?.separator ??\n this?.separator ??\n (separator = ExtDomQuery.searchJsfJsFor(/separator=([^&;]*)/).orElse(\":\").value);\n }\n\n /**\n * this is for testing purposes only, since AjaxImpl is a module\n * we need to reset for every unit test its internal states\n */\n export function reset() {\n projectStage = null;\n separator = null;\n eventQueue = [];\n errorQueue = [];\n requestQueue = null;\n }\n\n /**\n * @return the project stage also emitted by the server:\n * it cannot be cached and must be delivered over the server\n * The value for it comes from the requestInternal parameter of the faces.js script called \"stage\".\n */\n export function getProjectStage(): string | null {\n return resolveGlobalConfig()?.projectStage ??\n this?.projectStage ??\n (projectStage = resolveProjectStateFromURL());\n }\n\n /**\n * resolves the project stage as url parameter\n * @return the project stage or null\n */\n export function resolveProjectStateFromURL(): string | null {\n\n /* run through all script tags and try to find the one that includes faces.js */\n const foundStage = ExtDomQuery.searchJsfJsFor(/stage=([^&;]*)/).value as string;\n return (foundStage in ProjectStages) ? foundStage : ProjectStages.Production; // MYFACES-4572: default is production\n }\n\n /**\n * implementation of the faces.util.chain functionality\n *\n * @param source\n * @param event\n * @param funcs\n */\n export function chain(source: any, event: Event, ...funcs: EvalFuncs): boolean {\n // we can use our lazy stream each functionality to run our chain here.\n // by passing a boolean as return value into the onElem call\n // we can stop early at the first false, just like the spec requests\n\n let ret = true;\n funcs.every(func => {\n let returnVal = resolveAndExecute(source, event, func);\n if(returnVal === false) {\n ret = false;\n }\n //we short circuit in case of false and break the every loop\n return ret;\n });\n return ret;\n\n }\n\n /**\n * this function has to send the ajax requests\n *\n * following request conditions must be met:\n * <ul>\n * <li> the request must be sent asynchronously! </li>\n * <li> the request must be a POST!!! request </li>\n * <li> the request url must be the form action attribute </li>\n * <li> all requests must be queued with a client side request queue to ensure the request ordering!</li>\n * </ul>\n *\n * @param el any dom element no matter being it html or jsf, from which the event is emitted\n * @param event any javascript event supported by that object\n * @param opts map of options being pushed into the ajax cycle\n *\n * a) transformArguments out of the function\n * b) passThrough handling with a map copy with a filter map block map\n */\n export function request(el: ElemDef, event?: Event, opts ?: Options) {\n\n const {\n options,\n elem,\n elementId,\n windowId,\n isResetValues\n } = resolveDefaults(event, opts, el);\n const requestCtx = new ExtConfig({});\n const internalCtx = new ExtConfig({});\n\n Assertions.assertRequestIntegrity(options, elem);\n\n /**\n * fetch the parent form\n *\n * note we also add an override possibility here\n * so that people can use dummy forms and work\n * with detached objects\n */\n const form: DQ = resolveForm(elem, event);\n const viewId: string = resolveViewId(form);\n const formId = form.id.value;\n const delay: number = resolveDelay(options);\n const timeout: number = resolveTimeout(options);\n\n requestCtx.assignIf(!!windowId, P_WINDOW_ID).value = windowId;\n\n // old non - spec behavior will be removed after it is clear whether the removal breaks any code\n requestCtx.assign(CTX_PARAM_REQ_PASS_THR).value = extractLegacyParams(options.value);\n\n // spec conform behavior, all passthrough params must be under \"passthrough\n const params = remapArrayToAssocArr(options.getIf(CTX_OPTIONS_PARAMS).orElse({}).value);\n //we turn off the remapping for the param merge, because we do not want to have\n //any namespacing to be remapped\n\n let ctxPassthrough = requestCtx.getIf(CTX_PARAM_REQ_PASS_THR) as ExtConfig;\n ctxPassthrough.$nspEnabled = false;\n ctxPassthrough.shallowMerge(new Config(params), true);\n //now we turn it on again\n ctxPassthrough.$nspEnabled = true;\n requestCtx.assignIf(!!event, CTX_PARAM_REQ_PASS_THR, P_EVT).value = event?.type;\n\n /**\n * ajax pass through context with the source\n * onresolved Event and onerror Event\n */\n requestCtx.assign(SOURCE).value = elementId;\n\n requestCtx.assign(VIEW_ID).value = viewId;\n\n /**\n * on resolvedEvent and onError...\n * those values will be traversed later on\n * also into the response context\n */\n requestCtx.assign(ON_EVENT).value = options.value?.onevent;\n requestCtx.assign(ON_ERROR).value = options.value?.onerror;\n\n /**\n * Fetch the myfaces config params\n */\n requestCtx.assign(MYFACES).value = options.value?.myfaces;\n\n /**\n * binding contract the jakarta.faces.source must be set\n */\n requestCtx.assign(CTX_PARAM_REQ_PASS_THR, P_AJAX_SOURCE).value = elementId;\n\n /**\n * jakarta.faces.partial.ajax must be set to true\n */\n requestCtx.assign(CTX_PARAM_REQ_PASS_THR, P_AJAX).value = true;\n\n /**\n * if resetValues is set to true\n * then we have to set jakarta.faces.resetValues as well\n * as pass through parameter\n * the value has to be explicitly true, according to\n * the specs jsdoc\n */\n requestCtx.assignIf(isResetValues, CTX_PARAM_REQ_PASS_THR, P_RESET_VALUES).value = true;\n\n // additional meta information to speed things up, note internal non jsf\n // pass through options are stored under _mfInternal in the context\n internalCtx.assign(CTX_PARAM_SRC_FRM_ID).value = formId;\n\n /**\n * special myfaces only internal parameter for onProgress until we have an official api\n * that way we can track the progress of a xhr request (useful for file uploads)\n */\n internalCtx.assign(CTX_PARAM_UPLOAD_PREINIT).value = options.value?.myfaces?.upload?.preinit;\n internalCtx.assign(CTX_PARAM_UPLOAD_LOADSTART).value = options.value?.myfaces?.upload?.loadstart;\n internalCtx.assign(CTX_PARAM_UPLOAD_ON_PROGRESS).value = options.value?.myfaces?.upload?.progress;\n internalCtx.assign(CTX_PARAM_UPLOAD_LOADEND).value = options.value?.myfaces?.upload?.loadend;\n internalCtx.assign(CTX_PARAM_UPLOAD_LOAD).value = options.value?.myfaces?.upload?.load;\n internalCtx.assign(CTX_PARAM_UPLOAD_ERROR).value = options.value?.myfaces?.upload?.error;\n internalCtx.assign(CTX_PARAM_UPLOAD_ABORT).value = options.value?.myfaces?.upload?.abort;\n internalCtx.assign(CTX_PARAM_UPLOAD_TIMEOUT).value = options.value?.myfaces?.upload?.timeout;\n\n // mojarra compatibility, mojarra is sending the form id as well\n // this is not documented behavior but can be determined by running\n // mojarra under blackbox conditions.\n // I assume it does the same as our formId_submit=1 so leaving it out\n // won't hurt but for the sake of compatibility we are going to add it\n requestCtx.assign(CTX_PARAM_REQ_PASS_THR, formId).value = formId;\n internalCtx.assign(CTX_PARAM_SRC_CTL_ID).value = elementId;\n // reintroduction of PPS as per myfaces 2.3 (myfaces.pps = true, only the executes are submitted)\n internalCtx.assign(CTX_PARAM_PPS).value = extractMyFacesParams(options.value)?.[MYFACES_OPTION_PPS] ?? false;\n\n\n assignClientWindowId(form, requestCtx);\n assignExecute(options, requestCtx, form, elementId);\n assignRender(options, requestCtx, form, elementId);\n assignNamingContainerData(internalCtx, form);\n\n //now we enqueue the request as asynchronous runnable into our request\n //queue and let the queue take over the rest\n queueHandler.addRequestToQueue(elem, form, requestCtx, internalCtx, delay, timeout);\n }\n\n /**\n * Spec. 13.3.3\n * Examining the response markup and updating the DOM tree\n * @param {XMLHttpRequest} request - the ajax request\n * @param {Object} context - the ajax context\n */\n export function response(request: XMLHttpRequest, context: Context) {\n Response.processResponse(request, context);\n }\n\n /**\n * adds an error handler to the error queue\n *\n * @param errorListener the error listener handler\n */\n export function addOnError(errorListener: IListener<ErrorData>) {\n errorQueue.push(errorListener);\n }\n\n /**\n * adds an event handler to the event queue\n *\n * @param eventListener the event listener handler\n */\n export function addOnEvent(eventListener: IListener<EventData>) {\n eventQueue.push(eventListener);\n }\n\n // noinspection JSUnusedLocalSymbols\n /**\n * sends an event to the event handlers\n *\n * @param data the event data object hosting the event data according to the spec @see EventData for what is reachable\n * @param localHandler an optional event handler, which is processed before the event handler chain\n */\n export function sendEvent(data: EventData, localHandler = function (data: EventData) {\n }) {\n /*now we serve the queue as well*/\n localHandler(data);\n eventQueue.forEach(fn => fn(data));\n }\n\n /**\n * error handler behavior called internally\n * and only into the impl it takes care of the\n * internal message transformation to a myfaces internal error\n * and then uses the standard send error mechanisms\n * also a double error logging prevention is done as well\n *\n * @param request the request currently being processed\n * @param context the context affected by this error\n * @param exception the exception being thrown\n * @param clearRequestQueue if set to true, clears the request queue of all pending requests\n */\n export function stdErrorHandler(request: XMLHttpRequest,\n context: Config,\n exception: Error,\n clearRequestQueue = false) {\n //newer browsers do not allow to hold additional values on native objects like exceptions\n //we hence capsule it into the request, which is gced automatically\n //on ie as well, since the stdErrorHandler usually is called between requests\n //this is a valid approach\n try {\n if (threshold == \"ERROR\") {\n let errorData = ErrorData.fromClient(exception);\n sendError(errorData);\n }\n } finally {\n if (clearRequestQueue) {\n requestQueue.clear();\n }\n }\n }\n\n // noinspection JSUnusedLocalSymbols\n /**\n * implementation triggering the error chain\n *\n *\n *\n * handles the errors, in case of an onError exists within the context the onError is called as local error handler\n * the registered error handlers in the queue received an error message to be dealt with\n * and if the projectStage is at development an alert box is displayed\n *\n * note: we have additional functionality here, via the global config myfaces.config.defaultErrorOutput a function can be provided\n * which changes the default output behavior from alert to something else\n *\n * @param errorData the error data to be displayed\n * @param localHandler an optional local error handler which has to be processed before the error handler queue\n */\n export function sendError(errorData: ErrorData, localHandler = function (data: ErrorData) {\n }) {\n\n localHandler(errorData);\n errorQueue.forEach((errorCallback: Function) => {\n errorCallback(errorData);\n });\n let displayError: (string) => void = getGlobalConfig(\"defaultErrorOutput\", (console ? console.error : alert));\n displayError(errorData);\n }\n\n /**\n * @node optional element or id defining a rootnode where an element with the id \"jakarta.faces.windowId\" is hosted\n * @return the client window id of the current window, if one is given if none is found, null is returned\n */\n export function getClientWindow(node ?: Element | string): string | null {\n const ALTERED = \"___mf_id_altered__\";\n const INIT = \"___init____\";\n\n /*\n * the search root for the dom element search\n */\n\n\n let searchRoot = ((node) ? DQ.byId(node): DQ$(\"form\"));\n let inputs = searchRoot\n .filterSelector(`input[name='${$nsp(P_CLIENT_WINDOW)}']`)\n .orElseLazy(() => searchRoot.querySelectorAll(`input[name='${$nsp(P_CLIENT_WINDOW)}']`))\n\n /*\n * lazy helper to fetch the window id from the included faces.js\n */\n let fetchWindowIdFromJSFJS = (): Optional<string> => ExtDomQuery.searchJsfJsFor(/jfwid=([^&;]*)/).orElse(null);\n\n /*\n * fetch window id from the url\n */\n let fetchWindowIdFromURL = function (): Optional<string> {\n const href = window.location.href, windowId = \"jfwid\";\n const regex = new RegExp(\"[\\\\?&]\" + windowId + \"=([^&#\\\\;]*)\");\n const results = regex.exec(href);\n //initial trial over the url and a regexp\n if (results != null) return Optional.fromNullable(results[1]);\n return Optional.fromNullable(null);\n };\n\n /*\n * functional double check based on stream reduction\n * the values should be identical or on INIT value which is a premise to\n * skip the first check\n *\n * @param value1\n * @param value2\n */\n let differenceCheck = (value1: string, value2: string): string => {\n if(value1 == INIT) {\n return value2;\n } else if (value1 == ALTERED || value1 != value2) {\n return ALTERED;\n }\n return value2;\n };\n\n /*\n * helper for cleaner code, maps the value from an item\n *\n * @param item\n */\n let getValue = (item: DQ): string => item.val as string;\n /*\n * fetch the window id from the forms\n * window ids must be present in all forms\n * or non-existent. If they exist all of them must be the same\n */\n\n let formWindowId: string = inputs.asArray.map(getValue).reduce(differenceCheck, INIT);\n\n\n //if the resulting window id is set on altered then we have an unresolvable problem\n assert(ALTERED != formWindowId, \"Multiple different windowIds found in document\");\n\n /*\n * return the window id or null\n */\n return formWindowId != INIT ? formWindowId : (fetchWindowIdFromURL() || fetchWindowIdFromJSFJS()).value;\n }\n\n /**\n * collect and encode data for a given form element (must be of type form)\n * find the jakarta.faces.ViewState element and encode its value as well!\n * @return a concatenated string of the encoded values!\n *\n * @throws Error in case of the given element not being of type form!\n * https://issues.apache.org/jira/browse/MYFACES-2110\n */\n export function getViewState(form: Element | string): string {\n /**\n * type-check assert!, we opt for strong typing here\n * because it makes it easier to detect bugs\n */\n\n let element: DQ = DQ.byId(form, true);\n if (!element.isTag(HTML_TAG_FORM)) {\n throw new Error(getMessage(\"ERR_VIEWSTATE\"));\n }\n\n // determine the naming container scenario\n const dummyContext = new Config({});\n assignNamingContainerData(dummyContext, DQ.byId(form))\n // fetch all non file input form elements\n let formElements = element.deepElements.encodeFormElement()\n\n // encode them! (file inputs are handled differently and are not part of the viewstate)\n return encodeFormData(new ExtConfig(formElements), resoveNamingContainerMapper(dummyContext));\n }\n\n /**\n * this at the first sight looks like a weird construct, but we need to do it this way\n * for testing, we cannot proxy addRequestToQueue from the testing frameworks directly,\n * but we need to keep it under unit tests.\n */\n export let queueHandler = {\n /**\n * public to make it accessible for tests\n *\n * adds a new request to our queue for further processing\n */\n addRequestToQueue: function (elem: DQ, form: DQ, reqCtx: ExtConfig, respPassThr: Config, delay = 0, timeout = 0) {\n requestQueue = requestQueue ?? new XhrQueueController<XhrRequest>();\n requestQueue.enqueue(new XhrRequest(reqCtx, respPassThr, timeout), delay);\n }\n };\n\n //----------------------------------------------- Methods ---------------------------------------------------------------------\n\n /**\n * the idea is to replace some placeholder parameters with their respective values\n * placeholder params like @all, @none, @form, @this need to be replaced by\n * the values defined by the specification\n *\n * This function does it for the render parameters\n *\n * @param requestOptions the source options coming in as options object from faces.ajax.request (options parameter)\n * @param targetContext the receiving target context\n * @param issuingForm the issuing form\n * @param sourceElementId the executing element triggering the faces.ajax.request (id of it)\n */\n function assignRender(requestOptions: Config, targetContext: Config, issuingForm: DQ, sourceElementId: string) {\n if (requestOptions.getIf(CTX_PARAM_RENDER).isPresent()) {\n remapDefaultConstants(targetContext.getIf(CTX_PARAM_REQ_PASS_THR).get({}), P_RENDER, <string>requestOptions.getIf(CTX_PARAM_RENDER).value, issuingForm, <any>sourceElementId, targetContext.getIf(VIEW_ID).value);\n }\n }\n\n /**\n * the idea is to replace some placeholder parameters with their respective values\n * placeholder params like @all, @none, @form, @this need to be replaced by\n * the values defined by the specification\n *\n * This function does it for the execute parameters\n *\n * @param requestOptions the source options coming in as options object from faces.ajax.request (options parameter)\n * @param targetContext the receiving target context\n * @param issuingForm the issuing form\n * @param sourceElementId the executing element triggering the faces.ajax.request (id of it)\n */\n function assignExecute(requestOptions: Config, targetContext: Config, issuingForm: DQ, sourceElementId: string) {\n\n if (requestOptions.getIf(CTX_OPTIONS_EXECUTE).isPresent()) {\n /*the options must be a blank delimited list of strings*/\n /*compliance with Mojarra which automatically adds @this to an execute\n * the spec rev 2.0a however states, if none is issued nothing at all should be sent down\n */\n requestOptions.assign(CTX_OPTIONS_EXECUTE).value = [requestOptions.getIf(CTX_OPTIONS_EXECUTE).value, IDENT_THIS].join(\" \");\n remapDefaultConstants(targetContext.getIf(CTX_PARAM_REQ_PASS_THR).get({}), P_EXECUTE, <string>requestOptions.getIf(CTX_OPTIONS_EXECUTE).value, issuingForm, <any>sourceElementId, targetContext.getIf(VIEW_ID).value);\n } else {\n targetContext.assign(CTX_PARAM_REQ_PASS_THR, P_EXECUTE).value = sourceElementId;\n }\n }\n\n /**\n * apply the browser tab where the request was originating from\n *\n * @param form the form hosting the client window id\n * @param targetContext the target context receiving the value\n */\n function assignClientWindowId(form: DQ, targetContext: Config) {\n\n let clientWindow = $faces().getClientWindow(form.getAsElem(0).value);\n if (clientWindow) {\n targetContext.assign(CTX_PARAM_REQ_PASS_THR, P_CLIENT_WINDOW).value = clientWindow;\n }\n }\n\n /**\n * determines the current naming container\n * and assigns it internally\n *\n * @param internalContext\n * @param formElement\n * @private\n */\n function assignNamingContainerData(internalContext: Config, formElement: DQ) {\n const viewRootId = resolveViewRootId(formElement);\n\n if(!!viewRootId) {\n internalContext.assign(NAMED_VIEWROOT).value = true;\n internalContext.assign(NAMING_CONTAINER_ID).value = viewRootId;\n }\n }\n\n /**\n * transforms the user values to the expected values\n * handling '@none', '@all', '@form', and '@this' appropriately.\n * (Note: Although we could employ a simple string replacement method,\n * it could result in duplicate entries under certain conditions.)\n *\n * Specific standardized constants such as\n * '@all', '@none', '@form', and '@this'\n * require special treatment.\n *\n * @param targetConfig the target configuration receiving the final values\n * @param targetKey the target key\n * @param userValues the passed user values (aka input string which needs to be transformed)\n * @param issuingForm the form where the issuing element originates\n * @param issuingElementId the issuing element\n * @param rootNamingContainerId the naming container id (\"\" default if none is given)\n */\n function remapDefaultConstants(targetConfig: Config, targetKey: string, userValues: string, issuingForm: DQ, issuingElementId: string, rootNamingContainerId: string = \"\"): Config {\n //a cleaner implementation of the transform list method\n const SEP = $faces().separatorchar;\n let iterValues: string[] = (userValues) ? trim(userValues).split(/\\s+/gi) : [];\n let ret = [];\n let processed: {[key: string]: boolean} = {};\n\n /**\n * remaps the client ids for the portlet case so that the server\n * can deal with them either prefixed ir not\n * also resolves the absolute id case (it was assumed the server does this, but\n * apparently the RI does not, so we have to follow the RI behavior here)\n * @param componentIdToTransform the componentId which needs post-processing\n */\n const remapNamingContainer = componentIdToTransform => {\n // pattern :<anything> must be prepended by viewRoot if there is one,\n // otherwise we are in a not namespaced then only the id has to match\n const rootNamingContainerPrefix = (rootNamingContainerId.length) ? rootNamingContainerId+SEP : EMPTY_STR;\n let formClientId = issuingForm.id.value;\n // nearest parent naming container relative to the form\n const nearestNamingContainer = formClientId.substring(0, formClientId.lastIndexOf(SEP));\n const nearestNamingContainerPrefix = (nearestNamingContainer.length) ? nearestNamingContainer + SEP : EMPTY_STR;\n // Absolute search expressions, always start with SEP or the name of the root naming container\n const hasLeadingSep = componentIdToTransform.indexOf(SEP) === 0;\n const isAbsolutSearchExpr = hasLeadingSep || (rootNamingContainerId.length\n && componentIdToTransform.indexOf(rootNamingContainerPrefix) == 0);\n let finalIdentifier: string;\n if (isAbsolutSearchExpr) {\n //we cut off the leading sep if there is one\n componentIdToTransform = hasLeadingSep ? componentIdToTransform.substring(1) : componentIdToTransform;\n componentIdToTransform = componentIdToTransform.indexOf(rootNamingContainerPrefix) == 0 ? componentIdToTransform.substring(rootNamingContainerPrefix.length) : componentIdToTransform;\n //now we prepend either the prefix or \"\" from the cut-off string to get the final result\n finalIdentifier = [rootNamingContainerPrefix, componentIdToTransform].join(EMPTY_STR);\n } else { //relative search according to the javadoc\n //we cut off the root naming container id from the form\n if (formClientId.indexOf(rootNamingContainerPrefix) == 0) {\n formClientId = formClientId.substring(rootNamingContainerPrefix.length);\n }\n\n //If prependId = true, the outer form id must be present in the id if same form\n let hasPrependId = componentIdToTransform.indexOf(formClientId) == 0;\n finalIdentifier = hasPrependId ?\n [rootNamingContainerPrefix, componentIdToTransform].join(EMPTY_STR) :\n [nearestNamingContainerPrefix, componentIdToTransform].join(EMPTY_STR);\n }\n // We need to double-check because we have scenarios where we have a naming container\n // and no prepend (aka tobago testcase \"must handle ':' in IDs properly\", scenario 3,\n // in this case we return the component id, and be happy\n // we can roll a dom check here\n return DQ.byId(finalIdentifier).isPresent() ? finalIdentifier : componentIdToTransform;\n };\n\n // in this case we do not use lazy stream because it won´t bring any code reduction\n // or speedup\n for (let cnt = 0; cnt < iterValues.length; cnt++) {\n //avoid doubles\n if (iterValues[cnt] in processed) {\n continue;\n }\n switch (iterValues[cnt]) {\n //@none no values should be sent\n case IDENT_NONE:\n return targetConfig.delete(targetKey);\n //@all is a pass through case according to the spec\n case IDENT_ALL:\n targetConfig.assign(targetKey).value = IDENT_ALL;\n return targetConfig;\n //@form pushes the issuing form id into our list\n case IDENT_FORM:\n ret.push(remapNamingContainer(issuingForm.id.value));\n processed[issuingForm.id.value] = true;\n break;\n //@this is replaced with the current issuing element id\n case IDENT_THIS:\n if (!(issuingElementId in processed)) {\n ret.push(remapNamingContainer(issuingElementId));\n processed[issuingElementId] = true;\n }\n break;\n default:\n ret.push(remapNamingContainer(iterValues[cnt]));\n processed[iterValues[cnt]] = true;\n }\n }\n\n targetConfig.assign(targetKey).value = ret.join(\" \");\n return targetConfig;\n }\n\n /**\n * Filters the provided options using a blacklist to ensure\n * only pass-through parameters are processed for the Ajax request.\n *\n * Note that this issue is leftover from a previous implementation.\n * The specification-conforming behavior is to use parameters for pass-through values.\n * This will be addressed soon, after confirming that removal won't break any legacy code.\n *\n * @param {Context} mappedOpts - The options to be filtered.\n */\n function extractLegacyParams(mappedOpts: Options): {[key: string]: any} {\n //we now can use the full code reduction given by our stream api\n //to filter\n return ofAssoc(mappedOpts)\n .filter((item => !(item[0] in BlockFilter)))\n .reduce(collectAssoc, {});\n }\n\n /**\n * Extracts the MyFaces configuration parameters\n * that augment JSF with additional functionality.\n *\n * @param mappedOpts\n * @private\n */\n function extractMyFacesParams(mappedOpts: Options): {[key: string]: any} {\n //we now can use the full code reduction given by our stream api\n //to filter\n return ofAssoc(mappedOpts)\n .filter((item => (item[0] == \"myfaces\")))\n .reduce(collectAssoc, {})?.[MYFACES];\n }\n\n\n function remapArrayToAssocArr(arrayedParams: [[string, any]] | {[key: string]: any}): {[key: string]: any} {\n if(Array.isArray(arrayedParams)) {\n return arrayedParams.reduce(collectAssoc, {} as any);\n }\n return arrayedParams;\n }\n\n function resolveGlobalConfig(): any {\n return window?.[MYFACES]?.config ?? {};\n }\n\n /**\n * Private helper to execute a function or code fragment\n * @param source the source of the caller passed into the function as this\n * @param event an event which needs to be passed down into the function\n * @param func either a function or code fragment\n * @return a boolean value, if the passed function returns false, then the\n * caller is basically notified that the execution can now stop (JSF requirement for chain)\n * @private\n */\n function resolveAndExecute(source: any, event: Event, func: Function | string): boolean {\n if (\"string\" != typeof func) {\n //function is passed down as chain parameter, can be executed as is\n return (<Function>func).call(source, event) !== false;\n } else {\n //either a function or a string can be passed in case of a string we have to wrap it into another function\n //it is not a plain executable code but a definition\n let sourceCode = trim(<string>func);\n if (sourceCode.indexOf(\"function \") == 0) {\n sourceCode = `return ${sourceCode} (event)`;\n }\n return new Function(\"event\", sourceCode).call(source, event) !== false;\n }\n }\n}\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Typescript port of the faces\\.push part in the myfaces implementation\n */\nimport {MAX_RECONNECT_ATTEMPTS, REASON_EXPIRED, RECONNECT_INTERVAL} from \"./core/Const\";\nimport {DQ} from \"mona-dish\";\n\n/**\n * Implementation class for the push functionality\n */\nexport module PushImpl {\n\n const URL_PROTOCOL = DQ.global().location.protocol.replace(\"http\", \"ws\") + \"//\";\n\n\n // we expose the member variables for testing purposes\n // they are not directly touched outside of tests\n\n /* socket map by token */\n export let sockets = {};\n /* component attributes by clientId */\n export let components = {};\n /* client ids by token (share websocket connection) */\n export let clientIdsByTokens = {};\n\n\n // needed for testing\n export function reset() {\n sockets = {};\n components = {}\n clientIdsByTokens = {}\n }\n\n /*\n * Api implementations, exposed functions\n */\n\n /**\n * @param socketClientId the sockets client identifier\n * @param url the uri to reach the socket\n * @param channel the channel name/id\n * @param onopen The function to be invoked when the web socket is opened.\n * @param onmessage The function to be invoked when a message is received.\n * @param onerror The function to be invoked when an error occurs.\n * @param onclose The function to be invoked when the web socket is closed.\n * @param behaviors functions which are invoked whenever a message is received\n * @param autoConnect Whether or not to automatically open the socket. Defaults to <code>false</code>.\n */\n export function init(socketClientId: string,\n url: string,\n channel: string,\n onopen: Function,\n onmessage: Function,\n onerror: Function,\n onclose: Function,\n behaviors: any,\n autoConnect: boolean) {\n onclose = resolveFunction(onclose);\n\n if (!DQ.global().WebSocket) { // IE6-9.\n onclose(-1, channel);\n return;\n }\n\n let channelToken = url.substr(url.indexOf('?') + 1);\n\n if (!components[socketClientId]) {\n components[socketClientId] = {\n 'channelToken': channelToken,\n 'onopen': resolveFunction(onopen),\n 'onmessage' : resolveFunction(onmessage),\n 'onerror' : resolveFunction(onerror),\n 'onclose': onclose,\n 'behaviors': behaviors,\n 'autoconnect': autoConnect};\n if (!clientIdsByTokens[channelToken]) {\n clientIdsByTokens[channelToken] = [];\n }\n clientIdsByTokens[channelToken].push(socketClientId);\n if (!sockets[channelToken]){\n sockets[channelToken] = new Socket(channelToken,\n getBaseURL(url), channel);\n }\n }\n\n if (autoConnect) {\n (DQ.global()?.faces ?? DQ.global()?.jsf).push.open(socketClientId);\n }\n }\n\n export function open(socketClientId: string) {\n getSocket(components[socketClientId]?.channelToken).open();\n }\n\n export function close(socketClientId: string) {\n getSocket(components[socketClientId].channelToken).close();\n }\n\n // Private helper classes\n // Private classes functions ----------------------------------------------------------------------------------\n /**\n * Creates a reconnecting web socket. When the web socket successfully connects on first attempt, then it will\n * automatically reconnect on timeout with cumulative intervals of 500ms with a maximum of 25 attempts (~3 minutes).\n * The <code>onclose</code> function will be called with the error code of the last attempt.\n * @constructor\n * @param {string} channelToken the channel token associated with this websocket connection\n * @param {string} url The URL of the web socket\n * @param {string} channel The name of the web socket channel.\n */\n\n class Socket {\n\n socket: WebSocket;\n reconnectAttempts = 0;\n\n constructor(private channelToken: string, private url: string, private channel: string) {\n }\n\n open() {\n if (this.socket && this.socket.readyState == 1) {\n return;\n }\n this.socket = new WebSocket(this.url);\n\n this.bindCallbacks();\n }\n\n // noinspection JSUnusedLocalSymbols\n onopen(event: any) {\n if (!this.reconnectAttempts) {\n let clientIds = clientIdsByTokens[this.channelToken];\n for (let i = clientIds.length - 1; i >= 0; i--) {\n let socketClientId = clientIds[i];\n components[socketClientId]?.['onopen']?.(this.channel);\n }\n }\n this.reconnectAttempts = 0;\n }\n\n onerror(event: any) {\n let message = JSON.parse(event?.data ?? null);\n //TODO replace this with a more readable Stream code\n for (let i = clientIdsByTokens[this.channelToken].length - 1; i >= 0; i--) {\n let socketClientId = clientIdsByTokens[this.channelToken][i];\n if (document.getElementById(socketClientId)) {\n try {\n components[socketClientId]?.['onerror']?.(message, this.channel, event);\n } catch (e) {\n //Ignore\n }\n } else {\n clientIdsByTokens[this.channelToken].splice(i, 1);\n }\n }\n if (clientIdsByTokens[this.channelToken].length == 0) {\n // tag disappeared\n this.close();\n }\n }\n\n onmmessage(event: any) {\n let message = JSON.parse(event.data);\n for (let i = clientIdsByTokens[this.channelToken].length - 1; i >= 0; i--) {\n let socketClientId = clientIdsByTokens[this.channelToken][i];\n if (document.getElementById(socketClientId)) {\n try {\n components[socketClientId]?.['onmessage']?.(message, this.channel, event);\n } catch (e) {\n //Ignore\n }\n let behaviors = components?.[socketClientId]?.['behaviors'];\n let functions = behaviors?.[message];\n if (functions && functions.length) {\n for (let j = 0; j < functions.length; j++) {\n try {\n functions[j](null);\n } catch (e) {\n //Ignore\n }\n }\n }\n } else {\n clientIdsByTokens[this.channelToken].splice(i, 1);\n }\n }\n if (clientIdsByTokens[this.channelToken].length == 0) {\n // tag disappeared\n this.close();\n }\n }\n\n onclose(event: any) {\n if (!this.socket\n || (event.code == 1000 && event.reason == REASON_EXPIRED)\n || (event.code == 1008)\n || (!this.reconnectAttempts)\n || (this.reconnectAttempts >= MAX_RECONNECT_ATTEMPTS)) {\n let clientIds = clientIdsByTokens[this.channelToken];\n for (let i = clientIds.length - 1; i >= 0; i--) {\n let socketClientId = clientIds[i];\n components?.[socketClientId]?.['onclose']?.(event?.code, this?.channel, event);\n }\n } else {\n setTimeout(this.open, RECONNECT_INTERVAL * this.reconnectAttempts++);\n }\n };\n\n close() {\n if (this.socket) {\n let s = this.socket;\n this.socket = null;\n s.close();\n }\n }\n\n /**\n * bind the callbacks to the socket callbacks\n */\n private bindCallbacks() {\n this.socket.onopen = (event: Event) => this.onopen(event);\n this.socket.onmessage = (event: Event) => this.onmmessage(event);\n this.socket.onclose = (event: Event) => this.onclose(event);\n this.socket.onerror = (event: Event) => this.onerror(event);\n }\n }\n\n // Private static functions ---------------------------------------------------------------------------------------\n\n function getBaseURL(url: string) {\n if (url.indexOf(\"://\") < 0) {\n let base = DQ.global().location.hostname + \":\" + DQ.global().location.port;\n return URL_PROTOCOL + base + url;\n } else {\n return url;\n }\n }\n\n /**\n * Get socket associated with given channelToken.\n * @param channelToken The name of the web socket channelToken.\n * @return Socket associated with given channelToken.\n * @throws Error, when the channelToken is unknown, you may need to initialize\n * it first via <code>init()</code> function.\n */\n function getSocket(channelToken: string): Socket {\n let socket = sockets[channelToken];\n if (socket) {\n return socket;\n } else {\n throw new Error(\"Unknown channelToken: \" + channelToken);\n }\n }\n\n function resolveFunction(fn: Function | string = () => {\n }): Function {\n return <Function>((typeof fn !== \"function\") && (fn = DQ.global()[fn]), fn);\n }\n\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * [export const] constants\n */\n\nexport const XML_ATTR_NAMED_VIEWROOT = \"namedViewRoot\";\nexport const NAMED_VIEWROOT = \"namedViewRoot\";\n\nexport const P_AJAX_SOURCE = \"jakarta.faces.source\";\nexport const NAMING_CONTAINER_ID = \"myfaces.NamingContainerId\";\n\nexport const VIEW_ID = \"myfaces.viewId\";\nexport const P_VIEWSTATE = \"jakarta.faces.ViewState\";\nexport const P_CLIENT_WINDOW = \"jakarta.faces.ClientWindow\";\nexport const P_VIEWROOT = \"jakarta.faces.ViewRoot\";\nexport const P_VIEWHEAD = \"jakarta.faces.ViewHead\";\nexport const P_VIEWBODY = \"jakarta.faces.ViewBody\";\n\nexport const P_RESOURCE = \"jakarta.faces.Resource\";\n\n/*some useful definitions*/\n\nexport const EMPTY_FUNC = Object.freeze(() => {\n});\nexport const EMPTY_STR = \"\";\nexport const EMPTY_MAP = Object.freeze({});\n\nexport const HTML_VIEWSTATE = [\"<input type='hidden'\", \"name='\", P_VIEWSTATE, \"' value='' />\"].join(EMPTY_STR);\nexport const HTML_CLIENT_WINDOW = [\"<input type='hidden'\", \"' name='\", P_CLIENT_WINDOW, \"' value='' />\"].join(EMPTY_STR);\n\n\n/*internal identifiers for options*/\nexport const IDENT_ALL = \"@all\";\nexport const IDENT_NONE = \"@none\";\nexport const IDENT_THIS = \"@this\";\nexport const IDENT_FORM = \"@form\";\n\n\nexport const P_AJAX = \"jakarta.faces.partial.ajax\";\nexport const P_EXECUTE = \"jakarta.faces.partial.execute\";\nexport const P_RENDER = \"jakarta.faces.partial.render\";\n/*render override for viewbody or viewroot, in both cases an all is performed*/\nexport const P_RENDER_OVERRIDE = \"_myfaces.rendeOverride\";\nexport const P_EVT = \"jakarta.faces.partial.event\";\n\nexport const P_RESET_VALUES = \"jakarta.faces.partial.resetValues\";\nexport const P_WINDOW_ID = \"jakarta.faces.windowId\";\n\nexport const P_BEHAVIOR_EVENT = \"jakarta.faces.behavior.event\";\n\nexport const CTX_PARAM_RENDER = \"render\";\nexport const WINDOW_ID = \"windowId\";\n\n/* message types */\nexport const ERROR = \"error\";\nexport const EVENT = \"event\";\n\nexport const ON_ERROR = \"onerror\";\nexport const ON_EVENT = \"onevent\";\n\n/* event emitting stages */\nexport const BEGIN = \"begin\";\nexport const COMPLETE = \"complete\";\nexport const SUCCESS = \"success\";\n\nexport const SOURCE = \"source\";\nexport const STATUS = \"status\";\n\n\nexport const ERROR_NAME = \"error-name\";\nexport const ERROR_MESSAGE = \"error-message\";\n\n\nexport const RESPONSE_TEXT = \"responseText\";\nexport const RESPONSE_XML = \"responseXML\";\n\n/*ajax errors spec 14.4.2*/\nexport const HTTP_ERROR = \"httpError\";\nexport const EMPTY_RESPONSE = \"emptyResponse\";\nexport const MALFORMEDXML = \"malformedXML\";\nexport const SERVER_ERROR = \"serverError\";\nexport const CLIENT_ERROR = \"clientError\";\nexport const TIMEOUT_EVENT = \"timeout\";\n\nexport const CTX_OPTIONS_PARAMS = \"params\";\nexport const CTX_OPTIONS_DELAY = \"delay\";\nexport const DELAY_NONE = 'none';\nexport const CTX_OPTIONS_TIMEOUT = \"timeout\";\nexport const CTX_OPTIONS_RESET = \"resetValues\";\nexport const CTX_OPTIONS_EXECUTE = \"execute\";\n\nexport const CTX_PARAM_MF_INTERNAL = \"myfaces.internal\";\nexport const CTX_PARAM_SRC_FRM_ID = \"myfaces.source.formId\";\nexport const CTX_PARAM_UPLOAD_ON_PROGRESS = \"myfaces.upload.progress\";\nexport const CTX_PARAM_UPLOAD_PREINIT = \"myfaces.upload.preinit\";\nexport const CTX_PARAM_UPLOAD_LOADSTART = \"myfaces.upload.loadstart\";\nexport const CTX_PARAM_UPLOAD_LOADEND = \"myfaces.upload.loadend\";\nexport const CTX_PARAM_UPLOAD_LOAD = \"myfaces.upload.load\";\nexport const CTX_PARAM_UPLOAD_ERROR = \"myfaces.upload.error\";\nexport const CTX_PARAM_UPLOAD_ABORT = \"myfaces.upload.abort\";\nexport const CTX_PARAM_UPLOAD_TIMEOUT = \"myfaces.upload.timeout\";\nexport const CTX_PARAM_SRC_CTL_ID = \"myfaces.source.controlId\";\nexport const CTX_PARAM_REQ_PASS_THR = \"myfaces.request.passThrough\";\nexport const CTX_PARAM_PPS = \"myfaces.request.pps\";\n\nexport const CONTENT_TYPE = \"Content-Type\";\nexport const HEAD_FACES_REQ = \"Faces-Request\";\nexport const REQ_ACCEPT = \"Accept\";\nexport const VAL_AJAX = \"partial/ajax\";\nexport const ENCODED_URL = \"jakarta.faces.encodedURL\";\nexport const REQ_TYPE_GET = \"GET\";\nexport const REQ_TYPE_POST = \"POST\";\nexport const STATE_EVT_BEGIN = \"begin\"; //TODO remove this\nexport const STATE_EVT_TIMEOUT = \"TIMEOUT_EVENT\";\nexport const STATE_EVT_COMPLETE = \"complete\"; //TODO remove this\nexport const URL_ENCODED = \"application/x-www-form-urlencoded\";\nexport const MULTIPART = \"multipart/form-data\";\nexport const NO_TIMEOUT = 0;\nexport const STD_ACCEPT = \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\";\n\nexport const HTML_TAG_HEAD = \"HEAD\";\nexport const HTML_TAG_FORM = \"FORM\";\nexport const HTML_TAG_BODY = \"BODY\";\nexport const HTML_TAG_LINK = \"LINK\";\nexport const HTML_TAG_SCRIPT = \"SCRIPT\";\nexport const HTML_TAG_STYLE = \"STYLE\";\n\n\nexport const SEL_VIEWSTATE_ELEM = \"[name='\" + P_VIEWSTATE + \"']\";\nexport const SEL_CLIENT_WINDOW_ELEM = \"[name='\" + P_CLIENT_WINDOW + \"']\";\nexport const SEL_RESPONSE_XML = \"responseXML\";\n\nexport const PHASE_PROCESS_RESPONSE = \"processResponse\";\n\n\nexport const ERR_NO_PARTIAL_RESPONSE = \"Partial response not set\";\n\nexport const MYFACES_OPTION_PPS = \"pps\";\n\nexport const ATTR_URL = \"url\";\nexport const ATTR_NAME = \"name\";\nexport const ATTR_VALUE = \"value\";\nexport const ATTR_ID = \"id\";\n\n/*partial response types*/\nexport const XML_TAG_PARTIAL_RESP = \"partial-response\";\n\n/*partial commands*/\nexport const XML_TAG_CHANGES = \"changes\";\nexport const XML_TAG_UPDATE = \"update\";\nexport const XML_TAG_DELETE = \"delete\";\nexport const XML_TAG_INSERT = \"insert\";\nexport const XML_TAG_EVAL = \"eval\";\nexport const XML_TAG_ERROR = \"error\";\nexport const XML_TAG_ATTRIBUTES = \"attributes\";\nexport const XML_TAG_EXTENSION = \"extension\";\nexport const XML_TAG_REDIRECT = \"redirect\";\nexport const XML_TAG_BEFORE = \"before\";\nexport const XML_TAG_AFTER = \"after\";\nexport const XML_TAG_ATTR = \"attribute\";\n\n\n/*other constants*/\n\nexport const UPDATE_FORMS = \"myfaces.updateForms\";\nexport const UPDATE_ELEMS = \"myfaces.updateElems\";\n\n//we want the head elements to be processed before we process the body\n//but after the inner html is done\nexport const DEFERRED_HEAD_INSERTS = \"myfaces.headElems\";\n\nexport const MYFACES = \"myfaces\";\n\nexport const MF_NONE = \"__mf_none__\";\n\nexport const REASON_EXPIRED = \"Expired\";\n\nexport const APPLIED_VST = \"myfaces.appliedViewState\";\nexport const APPLIED_CLIENT_WINDOW = \"myfaces.appliedClientWindow\";\n\nexport const RECONNECT_INTERVAL = 500;\nexport const MAX_RECONNECT_ATTEMPTS = 25;\n\nexport const UNKNOWN = \"UNKNOWN\";\n\n/**\n * helper to remap the namespaces variables for 2.3\n * from 2.3 to 4.0 every javax namespace has been changed\n * to faces\n * To take the compatibility layer out this method just has to be\n * changed to a simple value passthrough\n */\n\nexport function $faces(): FacesAPI {\n return (window?.faces ?? window?.jsf) as FacesAPI;\n}\n\nexport function $nsp(inputNamespace?: any): any {\n if((!inputNamespace) || !inputNamespace?.replace) {\n return inputNamespace;\n }\n return (!!window?.faces) ? inputNamespace.replace(/javax\\.faces/gi,\"jakarta.faces\"): inputNamespace.replace(/jakarta\\.faces/gi, \"javax.faces\");\n}\n\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {EMPTY_STR, P_VIEWSTATE} from \"./Const\";\n\nexport interface IdValueHolder {\n\n readonly id: string;\n readonly value: string;\n\n}\n\n/**\n * a helper class to isolate the\n * view state and client window and other\n * future states which follow a similar pattern\n */\nexport class StateHolder implements IdValueHolder {\n\n nameSpace: string;\n\n constructor(public id: string, public value: string) {\n let viewStatePos = id.indexOf(P_VIEWSTATE);\n this.nameSpace = viewStatePos > 0 ? id.substr(0, viewStatePos - 1) : EMPTY_STR;\n }\n\n get hasNameSpace(): boolean {\n return !!(this?.nameSpace ?? EMPTY_STR).length;\n }\n}\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport class Messages {\n MSG_TEST = \"Testmessage\";\n\n /*Messages*/\n /** @constant */\n MSG_DEV_MODE = \"Note, this message is only sent, because project stage is development and no \" +\n \"other error listeners are registered.\";\n /** @constant */\n MSG_AFFECTED_CLASS = \"Affected Class=\";\n /** @constant */\n MSG_AFFECTED_METHOD = \"Affected Method=\";\n /** @constant */\n MSG_ERROR_NAME = \"Error Name=\";\n /** @constant */\n MSG_ERROR_MESSAGE = \"Error Message=\";\n /** @constant */\n MSG_SERVER_ERROR_NAME = \"Server Error Name=\";\n\n /** @constant */\n MSG_ERROR_DESC = \"Error Description=\";\n /** @constant */\n MSG_ERROR_NO = \"Error Number=\";\n /** @constant */\n MSG_ERROR_LINENO = \"Error Line Number=\";\n\n /*Errors and messages*/\n /** @constant */\n ERR_FORM = \"Sourceform could not be determined, either because element is not attached to a form or we have multiple forms with named elements of the same identifier or name, stopping the ajax processing\";\n /** @constant */\n ERR_VIEWSTATE = \"faces.viewState= param value not of type form!\";\n /** @constant */\n ERR_TRANSPORT = \"Transport type {0} does not exist\";\n /** @constant */\n ERR_EVT_PASS = \"an event must be passed down (either a an event object null or undefined) \";\n /** @constant */\n ERR_CONSTRUCT = \"Parts of the response couldn't be retrieved when constructing the event data= {0} \";\n /** @constant */\n ERR_MALFORMEDXML = \"The server response could not be parsed, the server has returned with a response which is not xml !\";\n /** @constant */\n ERR_SOURCE_FUNC = \"source cannot be a function (probably source and event were not defined or set to null\";\n /** @constant */\n ERR_EV_OR_UNKNOWN = \"An event object or unknown must be passed as second parameter\";\n /** @constant */\n ERR_SOURCE_NOSTR = \"source cannot be a string\";\n /** @constant */\n ERR_SOURCE_DEF_NULL = \"source must be defined or null\";\n\n //_Lang.js\n /** @constant */\n ERR_MUST_STRING = \"{0}: {1} namespace must be of type String\";\n /** @constant */\n ERR_REF_OR_ID = \"{0}: {1} a reference node or identifier must be provided\";\n /** @constant */\n ERR_PARAM_GENERIC = \"{0}: parameter {1} must be of type {2}\";\n /** @constant */\n ERR_PARAM_STR = \"{0}: {1} param must be of type string\";\n /** @constant */\n ERR_PARAM_STR_RE = \"{0}: {1} param must be of type string or a regular expression\";\n /** @constant */\n ERR_PARAM_MIXMAPS = \"{0}: both a source as well as a destination map must be provided\";\n /** @constant */\n ERR_MUST_BE_PROVIDED = \"{0}: an {1} and a {2} must be provided\";\n /** @constant */\n ERR_MUST_BE_PROVIDED1 = \"{0}: {1} must be set\";\n\n /** @constant */\n ERR_REPLACE_EL = \"replaceElements called while evalNodes is not an array\";\n\n /** @constant */\n ERR_EMPTY_RESPONSE = \"{0}: The response cannot be null or empty!\";\n /** @constant */\n ERR_ITEM_ID_NOTFOUND = \"{0}: item with identifier {1} could not be found\";\n /** @constant */\n ERR_PPR_IDREQ = \"{0}: Error in PPR Insert, id must be present\";\n /** @constant */\n ERR_PPR_INSERTBEFID = \"{0}: Error in PPR Insert, before id or after id must be present\";\n /** @constant */\n ERR_PPR_INSERTBEFID_1 = \"{0}: Error in PPR Insert, before node of id {1} does not exist in document\";\n /** @constant */\n ERR_PPR_INSERTBEFID_2 = \"{0}: Error in PPR Insert, after node of id {1} does not exist in document\";\n\n /** @constant */\n ERR_PPR_DELID = \"{0}: Error in delete, id not in xml markup\";\n /** @constant */\n ERR_PPR_UNKNOWNCID = \"{0}: Unknown Html-Component-ID= {1}\";\n\n /** @constant */\n ERR_NO_VIEWROOTATTR = \"{0}: Changing of ViewRoot attributes is not supported\";\n /** @constant */\n ERR_NO_HEADATTR = \"{0}: Changing of Head attributes is not supported\";\n /** @constant */\n ERR_RED_URL = \"{0}: Redirect without url\";\n\n /** @constant */\n ERR_REQ_FAILED_UNKNOWN = \"Request failed with unknown status\";\n\n /** @constant */\n ERR_REQU_FAILED = \"Request failed with status {0} and reason {1}\";\n\n /** @constant */\n UNKNOWN = \"UNKNOWN\";\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {Config, Lang, XMLQuery} from \"mona-dish\";\n\nimport {DQ} from \"mona-dish\";\nimport {\n ATTR_URL,\n EMPTY_RESPONSE,\n EMPTY_STR, ERR_NO_PARTIAL_RESPONSE, MALFORMEDXML,\n ON_ERROR,\n ON_EVENT,\n PHASE_PROCESS_RESPONSE,\n XML_TAG_PARTIAL_RESP\n} from \"../core/Const\";\nimport {ExtLang} from \"./Lang\";\n\n\n/**\n * a set of internal code assertions\n * which raise an error\n *\n */\nexport module Assertions {\n\n\n\n export function assertRequestIntegrity(options: Config, elem: DQ): void | never {\n /*assert if the onerror is set and once if it is set it must be of type function*/\n assertFunction(options.getIf(ON_ERROR).value);\n /*assert if the onevent is set and once if it is set it must be of type function*/\n assertFunction(options.getIf(ON_EVENT).value);\n //improve the error messages if an empty elem is passed\n //Assertions.assertElementExists(elem);\n assert(elem.isPresent(), ExtLang.getMessage(\"ERR_MUST_BE_PROVIDED1\", \"{0}: source must be provided or exist\", \"source element id\"), \"faces.ajax.request\", \"ArgNotSet\", )\n }\n\n export function assertUrlExists(node: XMLQuery): void | never {\n if (node.attr(ATTR_URL).isAbsent()) {\n throw Assertions.raiseError(new Error(), ExtLang.getMessage(\"ERR_RED_URL\", null, \"processRedirect\"), \"processRedirect\");\n }\n }\n\n /**\n * checks the xml for various issues which can occur\n * and prevent a proper processing\n */\n export function assertValidXMLResponse(responseXML: XMLQuery) : void | never {\n assert(!responseXML.isAbsent(), EMPTY_RESPONSE, PHASE_PROCESS_RESPONSE);\n assert(!responseXML.isXMLParserError(), responseXML.parserErrorText(EMPTY_STR), PHASE_PROCESS_RESPONSE);\n assert(responseXML.querySelectorAll(XML_TAG_PARTIAL_RESP).isPresent(), ERR_NO_PARTIAL_RESPONSE, PHASE_PROCESS_RESPONSE);\n }\n\n /**\n * internal helper which raises an error in the\n * format we need for further processing\n *\n * @param error\n * @param message the message\n * @param caller\n * @param title the title of the error (optional)\n * @param name the name of the error (optional)\n */\n export function raiseError(error: any, message: string, caller ?: string, title ?: string, name ?: string): Error {\n\n let finalTitle = title ?? MALFORMEDXML;\n let finalName = name ?? MALFORMEDXML;\n let finalMessage = message ?? EMPTY_STR;\n\n //TODO clean up the messy makeException, this is a perfect case for encapsulation and sane defaults\n return ExtLang.makeException(error, finalTitle, finalName, \"Response\", caller || (((<any>arguments).caller) ? (<any>arguments).caller.toString() : \"_raiseError\"), finalMessage);\n }\n\n /*\n * using the new typescript 3.7 compiler assertion functionality to improve compiler hinting\n * we are not fully there yet, but soon\n */\n\n export function assert(value: any, msg = EMPTY_STR, caller=EMPTY_STR, title=\"Assertion Error\"): asserts value {\n if(!value) {\n throw Assertions.raiseError(new Error(), msg ,caller, title);\n }\n }\n\n\n export function assertType(value: any, theType: any, msg = EMPTY_STR, caller=EMPTY_STR, title=\"Type Assertion Error\"): asserts value {\n if((!!value) && !Lang.assertType(value,theType)) {\n throw Assertions.raiseError(new Error(), msg ,caller, title);\n }\n }\n\n export function assertFunction(value: any, msg = EMPTY_STR, caller=EMPTY_STR, title=\"Assertion Error\"): asserts value is Function {\n assertType(value, \"function\", msg, caller, title);\n }\n\n export function assertDelay(value: any) {\n if(!(value >= 0)) { // >= 0 abbreviation which covers all cases of non positive values,\n // including NaN and non numeric strings, no type equality is deliberate here,\n throw new Error(\"Invalid delay value: \" + value);\n }\n }\n}\n\n\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Asynchronous queue member for our asynchronous queue\n * Ever object in the asynchronous queue needs to implement this interface\n *\n * the usage should be similar as Promise. from the outside.\n * but with a dedicated start point. The problem why we cannot use\n * promises here, is mostly related to the needed cancel functionality\n * and that the queue expects a runnable as entry.\n *\n * from the implementation side it is mostly registering callbacks\n * and calling them at the appropriate time.\n */\nexport interface IAsyncRunnable<T> {\n /**\n * starts the runnable\n */\n start();\n\n /**\n * cancel the current ongoing op if possible\n */\n cancel();\n\n /**\n * callback for then functionality\n * triggered when the async run is complete\n *\n * the async runnable must register the passed function\n * and then triggers all the registered then functions\n * when it is complete\n *\n * @param func the then functor\n */\n then(func: (data: any) => any): IAsyncRunnable<T>;\n\n /**\n * callback for catch functionality\n * triggered when the async run is complete\n *\n * the async runnable must register the passed function\n * and then triggers all the registered catch handlers\n * when an error has occurred\n *\n * @param func\n */\n catch(func: (data: any) => any): IAsyncRunnable<T>;\n\n\n /**\n * finally called when all then and catches are performed\n * same this is a register function\n * and once the finally time for the promise has\n * come the finally functions must be performed\n */\n finally(func: () => void): IAsyncRunnable<T>;\n}\n\n\n/**\n * pretty much the same as cancellable Promise, but given\n * we do not have that on browser level yet this is sort\n * of a non - intrusive Shim!\n */\nexport abstract class AsyncRunnable<T> implements IAsyncRunnable<T>{\n /**\n * helper support so that we do not have to drag in Promise shims\n */\n private catchFunctions: Array<Function> = [];\n private thenFunctions: Array<Function> = [];\n\n /**\n * cancel the run of the runnable (which then depending on the implementation\n * either triggers indirectly resolve or reject)\n */\n abstract cancel(): void;\n\n /**\n * extended functionality start to trigger the runnable\n */\n abstract start(): void;\n\n /**\n * resolve handler function which calls the then chain\n * and after that finally\n * @param data\n */\n resolve(data: any) {\n this.thenFunctions.reduce((inputVal: any, thenFunc: any) => {\n return thenFunc(inputVal);\n }, data)\n }\n\n /**\n * reject handler function which triggers the catch chain\n * @param data\n */\n reject(data: any) {\n this.catchFunctions.reduce((inputVal: any, catchFunc: any) => {\n return catchFunc(inputVal);\n }, data);\n }\n\n /**\n * register a catch functor\n * @param func the functor for the catch monad\n */\n catch(func: (data: any) => any): IAsyncRunnable<T> {\n this.catchFunctions.push(func);\n return this;\n }\n\n /**\n * registers a finally functor\n * @param func the functor for the finally handling chanin\n */\n finally(func: () => void): IAsyncRunnable<T> {\n // no ie11 support we probably are going to revert to shims for that one\n this.catchFunctions.push(func);\n this.thenFunctions.push(func);\n return this;\n }\n\n /**\n * @param func then functor similar to promise\n */\n then(func: (data: any) => any): IAsyncRunnable<T> {\n this.thenFunctions.push(func);\n return this;\n }\n}\n\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {Config, IValueHolder, Optional, DomQuery, DQ, Es2019Array, ValueEmbedder} from \"mona-dish\";\nimport {$faces, $nsp, P_WINDOW_ID} from \"../core/Const\";\n\n\n/**\n * detects whether a source is a faces.js request\n *\n * @param source the source string for the faces.js request\n * @return true if a faces.js loading pattern is detected\n * @constructor\n */\nconst IS_FACES_SOURCE = (source?: string): boolean => {\n //spec version smaller 4 we have to deal with the jsf namespace\n\n return source && !!(source?.search(/\\/jakarta\\.faces\\.resource.*\\/faces\\.js.*/) != -1 ||\n source?.search(/\\/faces-development\\.js.*/) != -1 ||\n source?.search(/\\/faces-uncompressed\\.js.*/) != -1 ||\n source?.search(/\\/faces[^.]*\\.js.*ln=jakarta.faces.*/gi) != -1 ||\n //fallback without check for jsf, that way we allow both bookmarks\n source?.search(/\\/javax\\.faces\\.resource.*\\/jsf\\.js.*/) != -1 ||\n source?.search(/\\/jsf-development\\.js.*/) != -1 ||\n source?.search(/\\/jsf-uncompressed\\.js.*/) != -1 ||\n source?.search(/\\/jsf[^.]*\\.js.*ln=javax.faces.*/gi) != -1);\n}\n\n/**\n * namespace myfaces\\.testscripts can be used as extension point for internal\n * tests, those will be handled similarly to faces.js, in regard\n * to reload blocking on ajax requests\n *\n * Note: atm not used, used to be used in the old implementation\n * but still is reserved for now\n *\n * @param source the source to check\n * @constructor\n */\nconst IS_INTERNAL_SOURCE = (source: string): boolean => {\n return source.search(/\\/faces[^.]*\\.js.*ln=myfaces.testscripts.*/gi) != -1 || source.search(/\\/jsf[^.]*\\.js.*ln=myfaces.testscripts.*/gi) != -1;\n}\n\n\nconst ATTR_SRC = 'src';\n\n/**\n * Extension which adds implementation specific\n * meta-data to our dom query\n *\n * Usage\n * el = new ExtDQ(oldReference)\n * nonce = el.nonce\n * windowId = el.getWindowId\n */\nexport class ExtDomQuery extends DQ {\n\n static get windowId(): Optional<string> {\n return new ExtDomQuery(document.body).windowId;\n }\n\n static get nonce(): Optional<string> {\n return new ExtDomQuery(document.body).nonce;\n }\n\n get windowId(): Optional<string> {\n\n const fetchWindowIdFromURL = function (): string | null {\n let href = window.location.href;\n let windowId = \"windowId\";\n let regex = new RegExp(\"[\\\\?&]\" + windowId + \"=([^&#\\\\;]*)\");\n let results = regex.exec(href);\n //initial trial over the url and a regexp\n if (results != null) return results[1];\n return null;\n };\n\n //byId ($)\n if (this.value.isPresent()) {\n let result = this.querySelectorAll(\"form input[name='\" + P_WINDOW_ID + \"']\");\n if (result.length > 1) {\n throw Error(\"Multiple different windowIds found in document\");\n }\n\n return Optional.fromNullable((result.isPresent()) ? (<HTMLInputElement>result.getAsElem(0).value).value : fetchWindowIdFromURL());\n } else {\n return Optional.fromNullable(fetchWindowIdFromURL());\n }\n }\n\n /*\n * determines the faces.js nonce and adds them to the namespace\n * this is done once and only lazily\n */\n get nonce(): ValueEmbedder<string> {\n //already processed\n let myfacesConfig = new ExtConfig(window.myfaces);\n let globalNonce: IValueHolder<string> = myfacesConfig.getIf(\"config\", \"cspMeta\", \"nonce\");\n if (!!globalNonce.value) {\n return ValueEmbedder.fromNullable(globalNonce);\n }\n\n let curScript = new DQ(document.currentScript);\n //since our baseline atm is ie11 we cannot use document.currentScript globally\n let nonce = curScript.nonce;\n if (nonce.isPresent()) {\n // fast-path for modern browsers\n return ValueEmbedder.fromNullable(nonce);\n }\n // fallback if the currentScript method fails, we just search the jsf tags for nonce, this is\n // the last possibility\n let nonceScript: Optional<DomQuery> = Optional.fromNullable(DQ\n .querySelectorAll(\"script[src], link[src]\").asArray\n .filter((item) => item.nonce.isPresent() && item.attr(ATTR_SRC) != null)\n .filter(item => IS_FACES_SOURCE(item.attr(ATTR_SRC).value))?.[0]);\n if(!nonceScript?.value) {\n return ValueEmbedder.absent as ValueEmbedder<string>;\n }\n\n return new DomQuery(nonceScript.value).nonce;\n }\n\n static searchJsfJsFor(item: RegExp): Optional<String> {\n return new ExtDomQuery(document).searchJsfJsFor(item);\n }\n\n /**\n * searches the embedded faces.js for items like separator char etc.\n * expects a match as variable under position 1 in the result match\n * @param regExp\n */\n searchJsfJsFor(regExp: RegExp): Optional<string> {\n //perfect application for lazy stream\n return Optional.fromNullable(DQ.querySelectorAll(\"script[src], link[src]\").asArray\n .filter(item => IS_FACES_SOURCE(item.attr(ATTR_SRC).value))\n .map(item => item.attr(ATTR_SRC).value.match(regExp))\n .filter(item => item != null && item.length > 1)\n .map((result: string[]) => {\n return decodeURIComponent(result[1]);\n })?.[0]);\n }\n\n globalEval(code: string, nonce ?: string): DQ {\n return new ExtDomQuery(super.globalEval(code, nonce ?? this.nonce.value));\n }\n\n // called from base class runScripts, do not delete\n // noinspection JSUnusedGlobalSymbols\n globalEvalSticky(code: string, nonce ?: string): DQ {\n return new ExtDomQuery(super.globalEvalSticky(code, nonce ?? this.nonce.value));\n }\n\n /**\n * decorated run scripts which takes our jsf extensions into consideration\n * (standard DomQuery will let you pass anything)\n * @param sticky if set to true the internally generated element for the script is left in the dom\n * @param whiteListed\n */\n runScripts(sticky = false, whiteListed?: (src: string) => boolean): DomQuery {\n const whitelistFunc = (src: string): boolean => {\n return (whiteListed?.(src) ?? true) && !IS_FACES_SOURCE(src) && !IS_INTERNAL_SOURCE(src);\n };\n return super.runScripts(sticky, whitelistFunc);\n }\n\n /**\n * adds the elements in this ExtDomQuery to the head\n *\n * @param suppressDoubleIncludes checks for existing elements in the head before running the insert\n */\n runHeadInserts(suppressDoubleIncludes = true): void {\n let head = ExtDomQuery.byId(document.head);\n //automated nonce handling\n let processedScripts = [];\n\n // the idea is only to run head inserts on resources\n // which do not exist already, that way\n // we can avoid double includes on subsequent resource\n // requests.\n function resourceIsNew(element: DomQuery) {\n if(!suppressDoubleIncludes) {\n return true;\n }\n const tagName = element.tagName.value;\n if(!tagName) {\n // text node they do not have tag names, so we can process them as they are without\n // any further ado\n return true;\n }\n let reference = element.attr(\"href\")\n .orElseLazy(() => element.attr(\"src\").value)\n .orElseLazy(() => element.attr(\"rel\").value);\n\n if (!reference.isPresent()) {\n return true;\n }\n return !head.querySelectorAll(`${tagName}[href='${reference.value}']`).length &&\n !head.querySelectorAll(`${tagName}[src='${reference.value}']`).length &&\n !head.querySelectorAll(`${tagName}[rel='${reference.value}']`).length;\n }\n\n this\n .filter(resourceIsNew)\n .each(element => {\n if(element.tagName.value != \"SCRIPT\") {\n //we need to run runScripts properly to deal with the rest\n new ExtDomQuery(...processedScripts).runScripts(true);\n processedScripts = [];\n head.append(element);\n } else {\n processedScripts.push(element);\n }\n });\n new ExtDomQuery(...processedScripts).runScripts(true);\n }\n\n\n /**\n * byId producer\n *\n * @param selector id\n * @param deep whether the search should go into embedded shadow dom elements\n * @return a DomQuery containing the found elements\n */\n static byId(selector: DomQuery | Element | string, deep = false): ExtDomQuery {\n const ret = DomQuery.byId(selector, deep);\n if($faces().getProjectStage().toLowerCase() == \"development\" &&\n window?.console && ret.isAbsent() && selector) {\n let identifier = (<DomQuery>selector)?.id?.value ?? (<Element>selector)?.id ?? selector.toString();\n console.error(\"Element \" + identifier + \"not found\");\n }\n return new ExtDomQuery(ret);\n }\n\n\n filter(func: (item: DomQuery) => boolean): ExtDomQuery {\n return new ExtDomQuery(super.filter(func));\n }\n}\n\nexport const ExtDQ = ExtDomQuery;\n\n/**\n * in order to reduce the number of interception points for the fallbacks we add\n * the namespace remapping straight to our config accessors\n */\nexport class ExtConfig extends Config {\n\n $nspEnabled = true;\n\n constructor(root: any) {\n super(root);\n }\n\n assignIf(condition: boolean, ...accessPath): IValueHolder<any> {\n const accessPathMapped = this.remap(accessPath);\n return super.assignIf(condition, ...accessPathMapped);\n }\n\n assign(...accessPath): IValueHolder<any> {\n const accessPathMapped = this.remap(accessPath);\n return super.assign(...accessPathMapped);\n }\n\n append(...accessPath): IValueHolder<any> {\n return super.append(...accessPath);\n }\n\n appendIf(condition: boolean, ...accessPath): IValueHolder<any> {\n const accessPathMapped = this.remap(accessPath);\n return super.appendIf(condition, ...accessPathMapped);\n }\n\n getIf(...accessPath): Config {\n const accessPathMapped = this.remap(accessPath);\n return super.getIf(...accessPathMapped);\n }\n\n get(defaultVal: any): Config {\n return super.get($nsp(defaultVal));\n }\n\n delete(key: string): Config {\n return super.delete($nsp(key));\n }\n\n /**\n * creates a config from an initial value or null\n * @param value\n */\n static fromNullable<T>(value?: T | null): Config {\n return new ExtConfig(value);\n }\n\n protected getClass(): any {\n return ExtConfig;\n }\n\n /**\n * shallow copy getter, copies only the first level, references the deeper nodes\n * in a shared manner\n */\n protected shallowCopy$(): Config {\n const ret = super.shallowCopy$();\n return new ExtConfig(ret);\n }\n\n /**\n * deep copy, copies all config nodes\n */\n get deepCopy(): Config {\n return new ExtConfig(super.deepCopy$());\n }\n\n /**\n * helper to remap the namespaces of an array of access paths\n * @param accessPath the access paths to be remapped\n * @private returns an array of access paths with version remapped namespaces\n */\n private remap(accessPath: string[]): string[] {\n if(!this.$nspEnabled) {\n return accessPath;\n }\n return new Es2019Array(...accessPath).map(key => $nsp(key));\n }\n}","import {Config, DomQuery, DQ, Es2019Array} from \"mona-dish\";\nimport {ExtDomQuery} from \"./ExtDomQuery\";\nimport {$faces, EMPTY_STR} from \"../core/Const\";\n\n/*\n * various routines for encoding and decoding url parameters\n * into configs and vice versa\n */\n\n\n/**\n * encodes a given form data into a url encoded string\n * @param formData the form data config object\n * @param paramsMapper the params mapper\n * @param defaultStr a default string if nothing comes out of it\n */\nexport function encodeFormData(formData: Config,\n paramsMapper = (inStr, inVal) => [inStr, inVal],\n defaultStr = EMPTY_STR): string {\n if (formData.isAbsent()) {\n return defaultStr;\n }\n const assocValues = formData.value;\n\n const expandValueArrAndRename = key => assocValues[key].map(val => paramsMapper(key, val));\n const isPropertyKey = key => assocValues.hasOwnProperty(key);\n const isNotFile = ([, value]) => !(value instanceof ExtDomQuery.global().File);\n const mapIntoUrlParam = keyVal => `${encodeURIComponent(keyVal[0])}=${encodeURIComponent(keyVal[1])}`;\n\n return new Es2019Array(...Object.keys(assocValues))\n .filter(isPropertyKey)\n .flatMap(expandValueArrAndRename)\n .filter(isNotFile)\n .map(mapIntoUrlParam)\n .join(\"&\");\n}\n\n/**\n * splits and decodes encoded values into strings containing of key=value\n * @param encoded encoded string\n */\nexport function decodeEncodedValues(encoded: string): string[][] {\n const filterBlanks = item => !!(item || '').replace(/\\s+/g, '');\n const splitKeyValuePair = _line => {\n let line = decodeURIComponent(_line);\n let index = line.indexOf(\"=\");\n if (index == -1) {\n return [line];\n }\n return [line.substring(0, index), line.substring(index + 1)];\n };\n\n let requestParamEntries = encoded.split(/&/gi);\n return requestParamEntries.filter(filterBlanks).map(splitKeyValuePair);\n}\n\n\n/**\n * gets all the input files and their corresponding file objects\n * @param dataSource\n */\nexport function resolveFiles(dataSource: DQ): [string, File][] {\n\n const expandFilesArr = ([key, files]) => {\n return [...files].map(file => [key, file]);\n }\n const remapFileInput = fileInput => {\n return [fileInput.name.value || fileInput.id.value, fileInput.filesFromElem(0)];\n }\n\n const files = dataSource\n .querySelectorAllDeep(\"input[type='file']\")\n .asArray;\n\n const ret = files\n .map(remapFileInput)\n .flatMap(expandFilesArr);\n\n return ret as any;\n}\n\n\nexport function fixEmptyParameters(keyVal: any[]): [string, any] {\n return (keyVal.length < 3 ? [keyVal?.[0] ?? [], keyVal?.[1] ?? []] : keyVal) as [string, any];\n}\n\n/**\n * returns the decoded viewState from parentItem\n * @param parentItem\n */\nfunction resolveViewState(parentItem: DomQuery): string[][] | [string, File][] {\n const viewStateStr = $faces().getViewState(parentItem.getAsElem(0).value);\n\n // we now need to decode it and then merge it into the target buf\n // which hosts already our overrides (aka do not override what is already there(\n // after that we need to deal with form elements on a separate level\n return decodeEncodedValues(viewStateStr);\n}\n\n/**\n * gets all the inputs under the form parentItem\n * as array\n * @param parentItem\n */\nexport function getFormInputsAsArr(parentItem: DomQuery): string[][] | [string, File][] {\n const standardInputs: any = resolveViewState(parentItem);\n const fileInputs = resolveFiles(parentItem);\n return standardInputs.concat(fileInputs)\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport {DomQuery, DQ, DQ$} from \"mona-dish\";\nimport {$faces, $nsp, HTML_CLIENT_WINDOW, HTML_VIEWSTATE, P_CLIENT_WINDOW, P_VIEWSTATE} from \"../core/Const\";\n\n/**\n * Builder for hidden inputs.\n * ATM only ViewState and Client window\n * are supported (per spec)\n *\n * Improves readability in the response processor!\n */\nexport class HiddenInputBuilder {\n private namingContainerId?: string;\n private parent?: DomQuery;\n private namedViewRoot: boolean = false;\n private readonly name: string;\n private readonly template: string;\n\n constructor(private selector: string) {\n const isViewState = selector.indexOf($nsp(P_VIEWSTATE)) != -1;\n this.name = isViewState ? P_VIEWSTATE : P_CLIENT_WINDOW\n this.template = isViewState ? HTML_VIEWSTATE : HTML_CLIENT_WINDOW\n }\n\n withNamingContainerId(namingContainer: string): HiddenInputBuilder {\n this.namingContainerId = namingContainer;\n return this;\n }\n\n withParent(parent: DomQuery): HiddenInputBuilder {\n this.parent = parent;\n return this;\n }\n\n withNamedViewRoot(namedViewRoot: boolean): HiddenInputBuilder {\n this.namedViewRoot = namedViewRoot;\n return this;\n }\n\n\n build(): DomQuery {\n const SEP = $faces().separatorchar;\n\n let existingStates = DQ$(`[name*='${$nsp(this.name)}']`);\n let cnt = existingStates.asArray.map(state => {\n let ident: string = state.id.orElse(\"0\").value;\n ident = ident.substring(ident.lastIndexOf(SEP)+1);\n return parseInt(ident);\n })\n .filter(item => {\n return !isNaN(item);\n })\n .reduce((item1, item2) => {\n return Math.max(item1, item2);\n }, 0); //we start with 1 (see cnt++)\n //the maximum new ident is the current max + 1\n cnt++;\n\n\n const newElement = DQ.fromMarkup($nsp(this.template));\n newElement.id.value = ((this.namingContainerId?.length) ?\n [this.namingContainerId, $nsp(this.name), cnt]:\n [$nsp(this.name), cnt]).join(SEP);\n\n //name must be prefixed with the naming container id as well according to the jsdocs\n if(this.namedViewRoot) {\n newElement.name.value = (this.namingContainerId?.length) ?\n [this.namingContainerId, $nsp(this.name)].join(SEP): $nsp(this.name);\n } else {\n newElement.name.value = $nsp(this.name);\n }\n\n\n this?.parent?.append(newElement);\n return newElement;\n }\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n */\n\nimport {Lang as LangBase, Config, Optional, DomQuery, DQ} from \"mona-dish\";\nimport {Messages} from \"../i18n/Messages\";\nimport {EMPTY_STR, HTML_TAG_FORM} from \"../core/Const\";\nimport {getEventTarget} from \"../xhrCore/RequestDataResolver\";\nimport {Es2019Array} from \"mona-dish\";\n\n\nexport module ExtLang {\n\n let installedLocale: Messages;\n let nameSpace = \"impl/util/Lang/\";\n\n export function getLanguage(): string {\n //TODO global config override\n\n let language: string = (<any>navigator).languages?.[0] ?? navigator?.language;\n language = language.split(\"-\")[0];\n return language;\n }\n\n //should be in lang, but for now here to avoid recursive imports, not sure if typescript still has a problem with those\n /**\n * helper function to safely resolve anything\n * this is not an elvis operator, it resolves\n * a value without exception in a tree and if\n * it is not resolvable then an optional of\n * a default value is restored or Optional\\.empty\n * if none is given\n *\n * usage\n * <code>\n * let var: Optional<string> = saveResolve(() => a.b.c.d.e, \"foobaz\")\n * </code>\n *\n * @param resolverProducer a lambda which can produce the value\n * @param defaultValue an optional default value if the producer fails to produce anything\n * @returns an Optional of the produced value\n */\n export function failSaveResolve<T>(resolverProducer: () => T, defaultValue: T = null): Optional<T> {\n return LangBase.saveResolve(resolverProducer, defaultValue);\n }\n\n /**\n * under some conditions it makes sense to swallow errors and return a default value in the error case\n * classical example the optional resolution of values in a chain (thankfully now covered by Typescript itself)\n * another example which we have in our system is that some operations fail only under test due to test framework\n * limitations while they cannot fail in the real world.\n *\n * @param resolverProducer a producer function which produces a value in the non error case\n * @param defaultValue the default value in case of a fail of the function\n */\n export function failSaveExecute<T>(resolverProducer: () => any, defaultValue: T = null): void {\n LangBase.saveResolve(resolverProducer, defaultValue);\n }\n\n /**\n * returns a given localized message upon a given key\n * basic java log like templating functionality is included\n *\n * @param key the key for the message\n * @param defaultMessage optional default message if none was found\n *\n * Additionally, you can pass additional arguments, which are used\n * in the same way java log templates use the params\n *\n * @param templateParams the param list to be filled in\n */\n export function getMessage(key: string, defaultMessage?: string, ...templateParams: Array<string>): string {\n installedLocale = installedLocale ?? new Messages();\n\n let msg = installedLocale[key] ?? defaultMessage ?? key;\n templateParams.forEach((param, cnt) => {\n msg = msg.replace(new RegExp([\"\\\\{\", cnt, \"\\\\}\"].join(EMPTY_STR), \"g\"), param);\n })\n\n\n return msg;\n }\n\n /**\n * transforms a key value pair into a string\n * @param key the key\n * @param val the value\n * @param delimiter the delimiter\n */\n export function keyValToStr(key: string, val: string, delimiter: string = \"\\n\") {\n return [key, val].join(delimiter);\n }\n\n /**\n * creates an exception with additional internal parameters\n * for extra information\n *\n * @param error\n * @param title the exception title\n * @param name the exception name\n * @param callerCls the caller class\n * @param callFunc the caller function\n * @param message the message for the exception\n */\n export function makeException(error: Error, title: string, name: string, callerCls: string, callFunc: string, message: string): Error {\n\n return new Error(message + (callerCls ?? nameSpace) + callFunc ?? (EMPTY_STR + (<any>arguments).caller.toString()));\n\n }\n\n /**\n * fetches a global config entry\n * @param configName the name of the configuration entry\n * @param defaultValue\n *\n * @return either the config entry or if none is given the default value\n */\n export function getGlobalConfig(configName: string, defaultValue: any): any {\n /**\n * note we could use exists but this is a heavy operation, since the config name usually\n * given this function here is called very often\n * is a single entry without . in between we can do the lighter shortcut\n */\n return window?.myfaces?.config?.[configName] ?? defaultValue;\n }\n\n /**\n * fetches the form in a fuzzy manner depending\n * on an element or event target.\n *\n * The idea is that according to the jsf spec\n * the enclosing form of the issuing element needs to be fetched.\n *\n * This is fine, but since then html5 came into the picture with the form attribute the element\n * can be anywhere referencing its parent form.\n *\n * Also, theoretically you can have the case of an issuing element enclosing a set of forms\n * (not really often used, but theoretically it could be input button allows to embed html for instance)\n *\n * So the idea is not to limit the issuing form determination to the spec case\n * but also cover the theoretical and html5 corner case.\n *\n * @param elem\n * @param event\n */\n export function getForm(elem: Element, event ?: Event): DQ | never {\n\n let queryElem = new DQ(elem);\n let eventTarget = (event) ? new DQ(getEventTarget(event)) : DomQuery.absent;\n\n if (queryElem.isTag(HTML_TAG_FORM)) {\n return queryElem;\n }\n\n //html 5 for handling\n if (queryElem.attr(HTML_TAG_FORM).isPresent()) {\n let formId = queryElem.attr(HTML_TAG_FORM).value;\n let foundForm = DQ.byId(formId, true);\n if (foundForm.isPresent()) {\n return foundForm;\n }\n }\n\n //no direct form is found we look for parent/child relationships as fallback\n //(90% case)\n let form = queryElem.firstParent(HTML_TAG_FORM)\n .orElseLazy(() => queryElem.byTagName(HTML_TAG_FORM, true))\n .orElseLazy(() => eventTarget.firstParent(HTML_TAG_FORM))\n .orElseLazy(() => eventTarget.byTagName(HTML_TAG_FORM))\n .first();\n\n //either a form is found within parent child - nearest form (aka first)\n //or we look for a single form\n form = form.orElseLazy(() => DQ.byTagName(HTML_TAG_FORM));\n\n //the end result must be a found form otherwise - Exception\n assertOnlyOneFormExists(form);\n\n return form;\n }\n\n /**\n * gets the local or global options with local ones having higher priority\n * if no local or global one was found then the default value is given back\n *\n * @param configName the name of the configuration entry\n * @param localOptions the local options root for the configuration myfaces as default marker is added\n * implicitly\n *\n * @param defaultValue\n *\n * @return either the config entry or if none is given the default value\n */\n export function getLocalOrGlobalConfig(localOptions: Config, configName: string, defaultValue: any): any {\n return localOptions.value?.myfaces?.config?.[configName] ??\n window?.myfaces?.config?.[configName] ??\n defaultValue;\n }\n\n /**\n * expands an associative array into an array of key value tuples\n * @param value\n */\n export function ofAssoc(value: {[key: string]: any}) {\n return new Es2019Array(...Object.keys(value))\n .map(key => [key, value[key]]);\n }\n\n export function collectAssoc(target: any, item: any) {\n target[item[0]] = item[1];\n return target;\n }\n\n /**\n * The active timeout for the \"debounce\".\n * Since we only use it in the XhrController\n * we can use a local module variable here\n */\n let activeTimeouts = {};\n\n\n\n\n /**\n * a simple debounce function\n * which waits until a timeout is reached and\n * if something comes in in between debounces\n *\n * @param runnable a runnable which should go under debounce control\n * @param timeout a timeout for the debounce window\n */\n export function debounce(key, runnable, timeout) {\n function clearActiveTimeout() {\n clearTimeout(activeTimeouts[key]);\n delete activeTimeouts[key];\n }\n\n if (!!(activeTimeouts?.[key])) {\n clearActiveTimeout();\n }\n if (timeout > 0) {\n activeTimeouts[key] = setTimeout(() => {\n try {\n runnable();\n } finally {\n clearActiveTimeout();\n }\n }, timeout);\n } else {\n runnable();\n }\n }\n\n /**\n * assert that the form exists and only one form exists and throw an exception in the case it does not\n *\n * @param forms the form to check for\n */\n function assertOnlyOneFormExists(forms: DomQuery): void | never {\n if (forms.isAbsent() || forms.length > 1) {\n throw makeException(new Error(), null, null, \"Impl\", \"getForm\", getMessage(\"ERR_FORM\"));\n }\n }\n}","import {IAsyncRunnable} from \"./AsyncRunnable\";\nimport {ExtLang} from \"./Lang\";\nimport debounce = ExtLang.debounce;\n\n/**\n * A simple XHR queue controller\n * following the async op -> next pattern\n * Faces enforces for the XHR handling\n */\nexport class XhrQueueController<T extends IAsyncRunnable<any>> {\n queue = [];\n taskRunning = false;\n\n constructor() {\n }\n\n /**\n * executes or enqueues an element\n * @param runnable the runnable (request) to be enqueued\n * @param timeOut timeout if > 0 which defers the execution\n * until the debounce window for the timeout is closed.\n */\n enqueue(runnable: T, timeOut: number = 0) {\n debounce(\"xhrQueue\", () => {\n const requestHandler = this.enrichRunnable(runnable);\n if (!this.taskRunning) {\n this.signalTaskRunning();\n requestHandler.start();\n } else {\n this.queue.push(requestHandler);\n }\n }, timeOut);\n }\n\n /**\n * trigger the next element in the queue\n * to be started!\n */\n next() {\n this.updateTaskRunning();\n const next = this.queue.shift();\n next?.start();\n }\n\n /**\n * clears and resets the queue\n */\n clear() {\n this.queue.length = 0;\n this.updateTaskRunning();\n }\n\n /**\n * true if queue is empty\n */\n get isEmpty(): boolean {\n return !this.queue.length;\n }\n\n /**\n * Enriches the incoming async asyncRunnable\n * with the error and next handling\n * (aka: asyncRunnable is done -> next\n * error -> clear queue\n * @param asyncRunnable the async runnable which needs enrichment\n * @private\n */\n private enrichRunnable(asyncRunnable: T) {\n /**\n * we can use the Promise pattern asyncrunnable uses\n * to trigger queue control callbacks of next element\n * and clear the queue (theoretically this\n * would work with any promise)\n */\n return asyncRunnable\n .then(() => this.next())\n .catch(() => this.clear());\n }\n\n\n /**\n * alerts the queue that a task is running\n *\n * @private\n */\n private signalTaskRunning() {\n this.taskRunning = true;\n }\n\n /**\n * updates the task running status according to the current queue\n * @private\n */\n private updateTaskRunning() {\n this.taskRunning = !this.isEmpty;\n }\n\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {\n EMPTY_STR, ERROR,\n ERROR_MESSAGE,\n ERROR_NAME, HTTP_ERROR,\n RESPONSE_TEXT,\n RESPONSE_XML, SERVER_ERROR,\n SOURCE,\n STATUS,\n UNKNOWN\n} from \"../core/Const\";\nimport {Config, DQ, Optional, XMLQuery} from \"mona-dish\";\n\nimport {EventData} from \"./EventData\";\nimport {ExtLang} from \"../util/Lang\";\nimport getMessage = ExtLang.getMessage;\n\n\nexport enum ErrorType {\n SERVER_ERROR = \"serverError\",\n HTTP_ERROR = \"httpError\",\n CLIENT_ERROR = \"clientErrror\",\n TIMEOUT = \"timeout\"\n}\n\n/**\n * the spec has a problem of having the error\n * object somewhat underspecified, there is no clear\n * description of the required contents.\n * I want to streamline it with mojarra here\n * hence we are going to move\n * everything into the same attributes,\n * I will add deprecated myfaces backwards compatibility attributes as well\n */\nexport class ErrorData extends EventData implements IErrorData {\n\n type: string = \"error\";\n source: string | Element;\n\n errorName: string;\n errorMessage: string;\n\n responseText: string;\n responseXML: any;\n\n status: string;\n typeDetails: ErrorType;\n\n serverErrorName: string;\n serverErrorMessage: string;\n description: string;\n\n constructor(source: string | Element, errorName: string, errorMessage: string, responseText: string = null, responseXML: Document = null, responseCode: number = -1, statusOverride: string = null, type = ErrorType.CLIENT_ERROR) {\n super();\n\n ///MYFACES-4676 error payload expects an element if possible\n //this code remaps the string in an element and if not existing just passes as is what comes in\n this.source = DQ.byId(source).value.orElse(source).value;\n this.type = ERROR;\n this.errorName = errorName;\n\n //tck requires that the type is prefixed to the message itself (jsdoc also) in case of a server error\n this.errorMessage = (type == ErrorType.SERVER_ERROR) ? type + \": \" + errorMessage : errorMessage;\n this.responseCode = responseCode;\n this.responseText = responseText;\n this.responseXML = responseXML;\n\n this.status = statusOverride;\n\n this.description = `Status: ${this.status}\\nResponse Code: ${this.responseCode}\\nError Message: ${this.errorMessage}`;\n\n this.typeDetails = type;\n\n if (type == ErrorType.SERVER_ERROR) {\n this.serverErrorName = this.errorName;\n this.serverErrorMessage = this.errorMessage;\n }\n }\n\n static fromClient(e: Error): ErrorData {\n return new ErrorData((e as any)?.source ?? \"client\", e?.name ?? EMPTY_STR, e?.message ?? EMPTY_STR, e?.stack ?? EMPTY_STR);\n }\n\n static fromHttpConnection(source: any, name: string, message: string, responseText: string, responseXML: Document, responseCode: number, status: string = EMPTY_STR): ErrorData {\n return new ErrorData(source, name, message, responseText, responseXML, responseCode, status, ErrorType.HTTP_ERROR);\n }\n\n static fromGeneric(context: Config, errorCode: number, errorType: ErrorType = ErrorType.SERVER_ERROR): ErrorData {\n\n let getMsg = this.getMsg;\n\n let source = getMsg(context, SOURCE);\n let errorName = getMsg(context, ERROR_NAME);\n let errorMessage = getMsg(context, ERROR_MESSAGE);\n let status = getMsg(context, STATUS);\n let responseText = getMsg(context, RESPONSE_TEXT);\n let responseXML: Document = context.getIf(RESPONSE_XML).value;\n\n\n return new ErrorData(source, errorName, errorMessage, responseText, responseXML, errorCode, status, errorType);\n }\n\n private static getMsg(context, param) {\n return getMessage(context.getIf(param).orElse(EMPTY_STR).value);\n }\n\n static fromServerError(context: Config): ErrorData {\n return this.fromGeneric(context, -1);\n }\n\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {Config, DQ} from \"mona-dish\";\nimport {BEGIN, CTX_PARAM_REQ_PASS_THR, EVENT, P_AJAX_SOURCE, SOURCE} from \"../core/Const\";\n\nexport class EventData implements IEventData{\n type: string;\n status: string;\n source: any;\n responseCode: number;\n responseText: string;\n responseXML: Document;\n\n static createFromRequest(request: XMLHttpRequest, internalContext: Config, context: Config, /*event name*/ name: string): EventData {\n\n let eventData = new EventData();\n let internalSource = \"_internal._source\";\n eventData.type = EVENT;\n eventData.status = name;\n\n eventData.source = internalContext.getIf(\"_source\",\"_element\").value;\n // this fixes the issue that the source element is not present anymore at done\n // at page transitions\n if( !eventData.source) {\n let sourceId: string = context.getIf(SOURCE)\n .orElseLazy(() => context.getIf(P_AJAX_SOURCE).value)\n .orElseLazy(() => context.getIf(CTX_PARAM_REQ_PASS_THR, P_AJAX_SOURCE).value)\n .value;\n if (sourceId) {\n eventData.source = DQ.byId(sourceId, true).first().value.value;\n }\n if (eventData.source) {\n //we store the event source for later references\n internalContext.assign(\"_source\",\"_element\").value = eventData.source;\n }\n }\n\n if (name !== BEGIN) {\n eventData.responseCode = request?.status;\n eventData.responseText = request?.responseText;\n eventData.responseXML = request?.responseXML;\n }\n return eventData;\n }\n}\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Config, DomQuery, DQ} from \"mona-dish\";\nimport {\n $faces,\n $nsp,\n CTX_OPTIONS_DELAY,\n CTX_OPTIONS_TIMEOUT,\n DELAY_NONE,\n EMPTY_FUNC,\n EMPTY_STR,\n ENCODED_URL, NAMED_VIEWROOT, NAMING_CONTAINER_ID,\n P_VIEWSTATE,\n REQ_TYPE_GET,\n REQ_TYPE_POST\n} from \"../core/Const\";\nimport {XhrFormData} from \"./XhrFormData\";\nimport {ExtLang} from \"../util/Lang\";\nimport {ExtConfig, ExtDomQuery} from \"../util/ExtDomQuery\";\nimport {Assertions} from \"../util/Assertions\";\n\n\n/**\n * Resolver functions for various aspects of the request data\n *\n * stateless because it might be called from various\n * parts of the response classes\n */\n\n/**\n * resolves the event handlers lazily\n * so that if some decoration happens in between we can deal with it\n *\n * @param requestContext\n * @param responseContext\n * @param funcName\n */\nexport function resolveHandlerFunc(requestContext: Config, responseContext: Config, funcName: string) {\n responseContext = responseContext || new Config({});\n return responseContext.getIf(funcName)\n .orElseLazy(() =>requestContext.getIf(funcName).value)\n .orElse(EMPTY_FUNC).value;\n}\n\nexport function resolveTargetUrl(srcFormElement: HTMLFormElement) {\n return (typeof srcFormElement.elements[ENCODED_URL] == 'undefined') ?\n srcFormElement.action :\n srcFormElement.elements[ENCODED_URL].value;\n}\n\nexport function resolveFinalUrl(sourceForm: DomQuery, formData: XhrFormData, ajaxType = REQ_TYPE_POST) {\n let targetUrl = resolveTargetUrl(<HTMLFormElement>sourceForm.getAsElem(0).value);\n\n return targetUrl + (ajaxType == REQ_TYPE_GET ? \"?\" + formData.toString() : EMPTY_STR);\n}\n\n/**\n * form resolution the same way our old implementation did\n * it is either the id or the parent form of the element or an embedded form\n * of the element\n *\n * @param elem\n * @param event\n */\nexport function resolveForm(elem: DQ, event: Event): DQ {\n return ExtLang.getForm(elem.getAsElem(0).value, event);\n}\n\nexport function resolveViewId(form: DQ): string {\n const viewState = form.querySelectorAll(`input[type='hidden'][name*='${$nsp(P_VIEWSTATE)}']`).id.orElse(\"\").value;\n const divider = $faces().separatorchar;\n const viewId = viewState.split(divider, 2)[0];\n const viewStateViewId = viewId.indexOf($nsp(P_VIEWSTATE)) === -1 ? viewId : \"\";\n // myfaces specific, we in non portlet environments prepend the viewId\n // even without being in a naming container, the other components ignore that\n return form.id.value.indexOf(viewStateViewId) === 0 ? viewStateViewId : \"\";\n}\n\nexport function resolveViewRootId(form: DQ): string {\n const viewState = form.querySelectorAll(`input[type='hidden'][name*='${$nsp(P_VIEWSTATE)}']`).attr(\"name\").orElse(\"\").value;\n const divider = $faces().separatorchar;\n const viewId = viewState.split(divider, 2)[0];\n //different to the identifier the form id is never prepended to the viewstate\n return viewId.indexOf($nsp(P_VIEWSTATE)) === -1 ? viewId : \"\";\n}\n\n/**\n * as per jsdoc before the request it must be ensured that every post argument\n * is prefixed with the naming container id (there is an exception in mojarra with\n * the element=element param, which we have to follow here as well.\n * (inputs are prefixed by name anyway normally this only affects our standard parameters)\n * @private\n */\nexport function resoveNamingContainerMapper(internalContext: Config): (key: string, value: any) => [string, any] {\n const isNamedViewRoot = internalContext.getIf(NAMED_VIEWROOT).isPresent();\n if(!isNamedViewRoot) {\n return (key, value) => [key, value];\n }\n const partialId = internalContext.getIf(NAMING_CONTAINER_ID).value;\n const SEP = $faces().separatorchar;\n const prefix = partialId + SEP;\n return (key: string, value: any) => (key.indexOf(prefix) == 0) ? [key, value] : [prefix + key, value];\n}\n\nexport function resolveTimeout(options: Config): number {\n let getCfg = ExtLang.getLocalOrGlobalConfig;\n return options.getIf(CTX_OPTIONS_TIMEOUT).value ?? getCfg(options.value, CTX_OPTIONS_TIMEOUT, 0);\n}\n\n/**\n * resolve the delay from the options and/or the request context and or the configuration\n *\n * @param options ... the options object, in most cases it will host the delay value\n */\nexport function resolveDelay(options: Config): number {\n // null, 'none', or undefined will automatically be mapped to 0 aka no delay\n // the config delay will be dropped not needed anymore, it does not really\n // make sense anymore now that it is part of a local spec\n let ret = options.getIf(CTX_OPTIONS_DELAY).orElse(0).value;\n // if delay === none, no delay must be used, aka delay 0\n ret = (DELAY_NONE === ret) ? 0 : ret;\n // negative, or invalid values will automatically get a js exception\n Assertions.assertDelay(ret);\n return ret;\n}\n\n/**\n * resolves the window-id from various sources\n *\n * @param options\n */\nexport function resolveWindowId(options: Config): string | null {\n return options?.value?.windowId ?? ExtDomQuery.windowId.value;\n}\n\n/**\n * cross port from the dojo lib\n * browser save event resolution\n * @param evt the event object\n * (with a fallback for ie events if none is present)\n * @deprecated soon will be removed\n */\nexport function getEventTarget(evt: Event): Element {\n // ie6 and 7 fallback\n let finalEvent = evt;\n /*\n * evt source is defined in the jsf events\n * seems like some component authors use our code,\n * so we add it here see also\n * https://issues.apache.org/jira/browse/MYFACES-2458\n * not entirely a bug but makes sense to add this\n * behavior. I don´t use it that way but nevertheless it\n * does not break anything so why not\n */\n let t = finalEvent?.srcElement ?? finalEvent?.target ?? (<any>finalEvent)?.source;\n while ((t) && (t.nodeType != 1)) {\n t = t.parentNode;\n }\n return t;\n}\n\n/**\n * resolves a bunch of default values\n * which can be further processed from the given\n * call parameters of faces.ajax.request\n *\n * @param event\n * @param opts\n * @param el\n */\nexport function resolveDefaults(event: Event, opts: Options | [[string, any]] , el: Element | string = null): any {\n //deep copy the options, so that further transformations to not backfire into the callers\n const elem = DQ.byId(el || <Element>event.target, true);\n const options = new ExtConfig(opts).deepCopy as ExtConfig;\n return {\n options: options,\n elem: elem,\n elementId: elem.id.value,\n windowId: resolveWindowId(options),\n isResetValues: true === options.value?.resetValues\n };\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Config, Optional, XMLQuery} from \"mona-dish\";\n\nimport {Assertions} from \"../util/Assertions\";\nimport {DQ} from \"mona-dish\";\nimport {\n $nsp,\n CTX_PARAM_MF_INTERNAL,\n CTX_PARAM_SRC_CTL_ID,\n CTX_PARAM_SRC_FRM_ID,\n SEL_RESPONSE_XML,\n SOURCE,\n HTML_TAG_FORM,\n UPDATE_ELEMS,\n UPDATE_FORMS,\n DEFERRED_HEAD_INSERTS\n} from \"../core/Const\";\nimport {ExtConfig} from \"../util/ExtDomQuery\";\n\n/**\n * Resolver functions for various aspects of the response data\n *\n * stateless because it might be called from various\n * parts of the response classes\n */\n\n/**\n * fetches the response XML\n * as XML Query object\n *\n * @param request the request hosting the responseXML\n *\n * Throws an error in case of non-existent or wrong xml data\n *\n */\nexport function resolveResponseXML(request: Config): XMLQuery {\n let ret = new XMLQuery($nsp(request.getIf(SEL_RESPONSE_XML).value));\n Assertions.assertValidXMLResponse(ret);\n\n return ret;\n}\n\n/**\n * Splits the incoming pass-through context apart\n * in an internal and an external normalized context\n * the internal one is just for our internal processing\n *\n * @param context the root context as associative array\n */\nexport function resolveContexts(context: { [p: string]: any }): any {\n /**\n * we split the context apart into the external one and\n * some internal values\n */\n let externalContext = ExtConfig.fromNullable(context);\n let internalContext = externalContext.getIf(CTX_PARAM_MF_INTERNAL);\n if (!internalContext.isPresent()) {\n internalContext = ExtConfig.fromNullable({});\n }\n\n /**\n * prepare storage for some deferred operations\n */\n internalContext.assign(DEFERRED_HEAD_INSERTS).value = [];\n internalContext.assign(UPDATE_FORMS).value = [];\n internalContext.assign(UPDATE_ELEMS).value = [];\n return {externalContext, internalContext};\n}\n\n/**\n * fetches the source element out of our contexts\n *\n * @param context the external context which should host the source id\n * @param internalContext internal pass-through fall back\n *\n */\nexport function resolveSourceElement(context: Config, internalContext: Config): DQ {\n let elemId = resolveSourceElementId(context, internalContext);\n return DQ.byId(elemId.value, true);\n}\n\n/**\n * fetches the source form if it still exists\n * also embedded forms and parent forms are taken into consideration\n * as fallbacks\n *\n * @param internalContext\n * @param elem\n */\nexport function resolveSourceForm(internalContext: Config, elem: DQ): DQ {\n let sourceFormId = internalContext.getIf(CTX_PARAM_SRC_FRM_ID);\n let sourceForm = new DQ(sourceFormId.isPresent() ? document.forms[sourceFormId.value] : null);\n\n sourceForm = sourceForm.orElseLazy(() => elem.firstParent(HTML_TAG_FORM))\n .orElseLazy(() => elem.querySelectorAll(HTML_TAG_FORM))\n .orElseLazy(() => DQ.querySelectorAll(HTML_TAG_FORM));\n\n return sourceForm;\n}\n\nfunction resolveSourceElementId(context: Config, internalContext: Config): Optional<string> {\n //?internal context?? used to be external one\n return internalContext.getIf(CTX_PARAM_SRC_CTL_ID)\n .orElseLazy(() => context.getIf(SOURCE, \"id\").value);\n}\n\n","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {DQ, XMLQuery} from \"mona-dish\";\nimport {ResponseProcessor} from \"./ResponseProcessor\";\n\nimport {IResponseProcessor} from \"./IResponseProcessor\";\nimport {\n $nsp,\n XML_TAG_ATTRIBUTES,\n XML_TAG_CHANGES,\n XML_TAG_DELETE,\n XML_TAG_ERROR,\n XML_TAG_EVAL,\n XML_TAG_EXTENSION,\n XML_TAG_INSERT,\n XML_TAG_REDIRECT,\n XML_TAG_UPDATE, P_RESOURCE,\n P_VIEWBODY,\n P_VIEWHEAD,\n P_VIEWROOT,\n NAMING_CONTAINER_ID,\n XML_TAG_PARTIAL_RESP,\n RESPONSE_XML,\n XML_TAG_AFTER,\n XML_TAG_BEFORE, NAMED_VIEWROOT, XML_ATTR_NAMED_VIEWROOT, P_VIEWSTATE, $faces\n} from \"../core/Const\";\nimport {resolveContexts, resolveResponseXML} from \"./ResonseDataResolver\";\nimport {ExtConfig} from \"../util/ExtDomQuery\";\n\n\n\nexport module Response {\n\n\n /**\n * Standardized faces.ts response\n * this one is called straight from faces.ts.response\n *\n * The processing follows the spec by going for the responseXML\n * and processing its tags\n *\n * @param {XMLHttpRequest} request (xhrRequest) - xhr request object\n * @param context {Context} context (Map) - AJAX context\n *\n */\n export function processResponse(request: XMLHttpRequest, context: Context) {\n\n let req = ExtConfig.fromNullable(request);\n let {externalContext, internalContext} = resolveContexts(context);\n let responseXML: XMLQuery = resolveResponseXML(req);\n let responseProcessor = new ResponseProcessor(req, externalContext, internalContext);\n\n internalContext.assign(RESPONSE_XML).value = responseXML;\n\n // we now process the partial tags, or in none given raise an error\n responseXML.querySelectorAll(XML_TAG_PARTIAL_RESP)\n .each(item => processPartialTag(<XMLQuery>item, responseProcessor, internalContext));\n\n // We now process the viewStates, client windows and the elements to be evaluated are delayed.\n // The reason for this is that often it is better\n // to wait until the document has caught up before\n // doing any evaluations even on embedded scripts.\n // Usually this does not matter, the client window comes in almost last always anyway\n // we maybe drop this deferred assignment in the future, but myfaces did it until now.\n responseProcessor.updateNamedViewRootState();\n responseProcessor.fixViewStates();\n responseProcessor.fixClientWindow();\n responseProcessor.globalEval();\n\n responseProcessor.done();\n }\n\n /**\n * highest node partial-response from there the main operations are triggered\n */\n function processPartialTag(node: XMLQuery, responseProcessor: IResponseProcessor, internalContext) {\n\n\n /*\n https://javaee.github.io/javaserverfaces/docs/2.2/javadocs/web-partialresponse.html#ns_xsd\n The \"partial-response\" element is the root of the partial response information hierarchy,\n and contains nested elements for all possible elements that can exist in the response.\n This element must have an \"id\" attribute whose value is the return from calling getContainerClientId()\n on the UIViewRoot to which this response pertains.\n */\n // we can determine whether we are in a naming container scenario by checking whether the passed view id is present in the page\n // under or in body as identifier\n\n let partialId:string = node?.id?.value;\n internalContext.assignIf(!!partialId, NAMING_CONTAINER_ID).value = partialId; // second case mojarra\n\n // there must be at least one container viewstate element resembling the viewroot that we know\n // this is named\n responseProcessor.updateNamedViewRootState();\n\n const SEL_SUB_TAGS = [XML_TAG_ERROR, XML_TAG_REDIRECT, XML_TAG_CHANGES].join(\",\");\n\n // now we can process the main operations\n node.querySelectorAll(SEL_SUB_TAGS).each((node: XMLQuery) => {\n switch (node.tagName.value) {\n case XML_TAG_ERROR:\n responseProcessor.error(node);\n break;\n case XML_TAG_REDIRECT:\n responseProcessor.redirect(node);\n break;\n case XML_TAG_CHANGES:\n processChangesTag(node, responseProcessor);\n break;\n }\n });\n }\n\n let processInsert = function (responseProcessor: IResponseProcessor, node: XMLQuery) {\n // path1 insert after as child tags\n if(node.querySelectorAll([XML_TAG_BEFORE, XML_TAG_AFTER].join(\",\")).length) {\n responseProcessor.insertWithSubTags(node);\n } else { // insert before after with id\n responseProcessor.insert(node);\n }\n\n };\n\n /**\n * next level changes tag\n *\n * @param node\n * @param responseProcessor\n */\n function processChangesTag(node: XMLQuery, responseProcessor: IResponseProcessor): boolean {\n const ALLOWED_TAGS = [XML_TAG_UPDATE, XML_TAG_EVAL, XML_TAG_INSERT, XML_TAG_DELETE, XML_TAG_ATTRIBUTES, XML_TAG_EXTENSION].join(\", \");\n node.querySelectorAll(ALLOWED_TAGS).each(\n (node: XMLQuery) => {\n switch (node.tagName.value) {\n case XML_TAG_UPDATE:\n processUpdateTag(node, responseProcessor);\n break;\n\n case XML_TAG_EVAL:\n responseProcessor.eval(node);\n break;\n\n case XML_TAG_INSERT:\n processInsert(responseProcessor, node);\n break;\n\n case XML_TAG_DELETE:\n responseProcessor.delete(node);\n break;\n\n case XML_TAG_ATTRIBUTES:\n responseProcessor.attributes(node);\n break;\n\n case XML_TAG_EXTENSION:\n break;\n }\n }\n );\n return true;\n }\n\n /**\n * checks and stores a state update for delayed processing\n *\n * @param responseProcessor the response processor to perform the store operation\n * @param node the xml node to check for the state\n *\n * @private\n */\n function storeState(responseProcessor: IResponseProcessor, node: XMLQuery) {\n return responseProcessor.processViewState(node) || responseProcessor.processClientWindow(node);\n }\n\n /**\n * branch tag update. drill further down into the updates\n * special case viewState in that case it is a leaf\n * and the viewState must be processed\n *\n * @param node\n * @param responseProcessor\n */\n function processUpdateTag(node: XMLQuery, responseProcessor: IResponseProcessor) {\n // early state storing, if no state we perform a normal update cycle\n if (!storeState(responseProcessor, node)) {\n handleElementUpdate(node, responseProcessor);\n }\n }\n\n /**\n * element update\n *\n * @param node\n * @param responseProcessor\n */\n function handleElementUpdate(node: XMLQuery, responseProcessor: IResponseProcessor) {\n let cdataBlock = node.cDATAAsString;\n switch (node.id.value) {\n case $nsp(P_VIEWROOT) :\n responseProcessor.replaceViewRoot(DQ.fromMarkup(cdataBlock.substring(cdataBlock.indexOf(\"<html\"))));\n break;\n\n case $nsp(P_VIEWHEAD):\n responseProcessor.replaceHead(DQ.fromMarkup(cdataBlock));\n break;\n\n case $nsp(P_VIEWBODY):\n responseProcessor.replaceBody(DQ.fromMarkup(cdataBlock));\n break;\n\n case $nsp(P_RESOURCE):\n responseProcessor.addToHead(DQ.fromMarkup(cdataBlock))\n break;\n\n default:// htmlItem replacement\n responseProcessor.update(node, cdataBlock);\n break;\n }\n }\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Config, DomQuery, DQ, DQ$, Lang, XMLQuery} from \"mona-dish\";\nimport {Implementation} from \"../AjaxImpl\";\nimport {Assertions} from \"../util/Assertions\";\nimport {IResponseProcessor} from \"./IResponseProcessor\";\nimport {ErrorData} from \"./ErrorData\";\nimport {StateHolder} from \"../core/ImplTypes\";\nimport {EventData} from \"./EventData\";\n\nimport {\n $faces,\n $nsp,\n APPLIED_CLIENT_WINDOW,\n APPLIED_VST,\n ATTR_ID,\n ATTR_NAME,\n ATTR_URL,\n ATTR_VALUE,\n DEFERRED_HEAD_INSERTS,\n EMPTY_FUNC,\n EMPTY_STR,\n ERROR_MESSAGE,\n ERROR_NAME,\n HTML_TAG_BODY,\n HTML_TAG_FORM,\n HTML_TAG_HEAD,\n HTML_TAG_LINK,\n HTML_TAG_SCRIPT,\n HTML_TAG_STYLE, IDENT_ALL, IDENT_NONE, NAMED_VIEWROOT,\n ON_ERROR,\n ON_EVENT,\n P_CLIENT_WINDOW,\n P_EXECUTE,\n P_AJAX_SOURCE,\n P_RENDER,\n P_RENDER_OVERRIDE,\n P_VIEWSTATE,\n NAMING_CONTAINER_ID,\n RESPONSE_XML,\n SEL_CLIENT_WINDOW_ELEM,\n SEL_VIEWSTATE_ELEM,\n SOURCE,\n SUCCESS,\n UPDATE_ELEMS,\n UPDATE_FORMS,\n XML_TAG_AFTER,\n XML_TAG_ATTR,\n XML_TAG_BEFORE\n} from \"../core/Const\";\nimport {ExtConfig, ExtDomQuery} from \"../util/ExtDomQuery\";\nimport {HiddenInputBuilder} from \"../util/HiddenInputBuilder\";\nimport trim = Lang.trim;\nimport {ExtLang} from \"../util/Lang\";\nimport ofAssoc = ExtLang.ofAssoc;\n\n\n/**\n * Response processor\n *\n * Each XML tag is either a node or a leaf\n * or both\n *\n * the processor provides a set of operations\n * which are executed on a single leaf node per operation\n * and present the core functionality of our response\n *\n * Note the response processor is stateful hence we bundle it in a class\n * to reduce code we keep references tot contexts in place\n */\nexport class ResponseProcessor implements IResponseProcessor {\n\n constructor(private request: Config, private externalContext: Config, private internalContext: Config) {\n }\n\n /**\n * head replacement\n * @param shadowDocument incoming shadow head data (aka cdata as xml reference or dom element)\n * the data incoming must represent the html representation of the head itself one way or the other\n */\n replaceHead(shadowDocument: XMLQuery | DQ) {\n const shadowHead = shadowDocument.querySelectorAll(HTML_TAG_HEAD);\n if (!shadowHead.isPresent()) {\n return;\n }\n const head = ExtDomQuery.querySelectorAll(HTML_TAG_HEAD);\n // full replace we delete everything\n head.childNodes.delete();\n this.addToHead(shadowHead);\n //we copy the attributes as well (just in case myfaces introduces the id in head)\n head.copyAttrs(shadowHead);\n }\n\n addToHead(shadowHead: XMLQuery | DQ) {\n const mappedHeadData = new ExtDomQuery(shadowHead);\n const scriptTags = [HTML_TAG_SCRIPT];\n const nonExecutables = mappedHeadData.filter(item => scriptTags.indexOf(item.tagName.orElse(\"\").value) == -1);\n nonExecutables.runHeadInserts(true);\n\n //incoming either the outer head tag or its children\n const nodesToAdd = (shadowHead.tagName.value === \"HEAD\") ? shadowHead.childNodes : shadowHead;\n // this is stored for \"post\" processing\n // after the rest of the \"physical build up\", head before body\n const scriptElements = new DomQuery(...nodesToAdd.asArray\n .filter(item => scriptTags.indexOf(item.tagName.orElse(\"\").value) != -1));\n\n this.addToHeadDeferred(scriptElements);\n }\n\n addToHeadDeferred(newElements: XMLQuery | DQ) {\n this.internalContext.assign(DEFERRED_HEAD_INSERTS).value.push(newElements);\n }\n\n /**\n * replaces the body in the expected manner\n * which means the entire body content is refreshed\n * however also the body attributes must be transferred\n * keeping event handlers etc... in place\n *\n * @param shadowDocument .. an incoming shadow document hosting the new nodes\n */\n replaceBody(shadowDocument: XMLQuery | DQ) {\n\n const shadowBody = shadowDocument.querySelectorAll(HTML_TAG_BODY);\n if (!shadowBody.isPresent()) {\n return;\n }\n\n const shadowInnerHTML: string = <string>shadowBody.innerHTML;\n const resultingBody = <DQ>ExtDomQuery.querySelectorAll(HTML_TAG_BODY);\n const updateForms = resultingBody.querySelectorAll(HTML_TAG_FORM);\n\n // main difference, we cannot replace the body itself, but only its content\n // we need a separate step for post-processing the incoming\n // attributes, like classes, styles etc...\n (resultingBody.html(shadowInnerHTML) as DQ).copyAttrs(shadowBody);\n this.externalContext.assign($nsp(P_RENDER_OVERRIDE)).value = \"@all\";\n this.storeForPostProcessing(updateForms, resultingBody);\n }\n\n /**\n * Leaf Tag eval... process whatever is in the eval cdata block\n *\n * @param node the node to eval\n */\n eval(node: XMLQuery) {\n ExtDomQuery.globalEval(node.cDATAAsString);\n }\n\n /**\n * processes an incoming error from the response\n * which is hosted under the <error> tag\n * @param node the node hosting the error in our response xml\n * @param node the node in the xml hosting the error message\n */\n error(node: XMLQuery) {\n /**\n * <error>\n * <error-name>String</error-name>\n * <error-message><![CDATA[message]]></error-message>\n * <error>\n */\n\n const mergedErrorData = new ExtConfig({});\n mergedErrorData.assign(SOURCE).value = this.externalContext.getIf(P_AJAX_SOURCE).get(0).value;\n mergedErrorData.assign(ERROR_NAME).value = node.querySelectorAll(ERROR_NAME).textContent(EMPTY_STR);\n mergedErrorData.assign(ERROR_MESSAGE).value = node.querySelectorAll(ERROR_MESSAGE).cDATAAsString;\n\n const hasResponseXML = this.internalContext.get(RESPONSE_XML).isPresent();\n\n //we now store the response xml also in the error data for further details\n mergedErrorData.assignIf(hasResponseXML, RESPONSE_XML).value = this.internalContext.getIf(RESPONSE_XML).value.get(0).value;\n\n // error post-processing and enrichment (standard messages from keys)\n const errorData = ErrorData.fromServerError(mergedErrorData);\n\n // we now trigger an internally stored onError function which might be an attached to the context\n // either we do not have an internal on error, or an on error has been based via params from the outside.\n // In both cases they are attached to our contexts\n\n this.triggerOnError(errorData);\n Implementation.sendError(errorData);\n }\n\n /**\n * process the redirect operation\n *\n * @param node\n */\n redirect(node: XMLQuery) {\n Assertions.assertUrlExists(node);\n\n const redirectUrl = trim(node.attr(ATTR_URL).value);\n if (redirectUrl != EMPTY_STR) {\n window.location.href = redirectUrl;\n }\n }\n\n /**\n * processes the update operation and updates the node with the cdata block\n * @param node the xml response node hosting the update info\n * @param cdataBlock the cdata block with the new html code\n */\n update(node: XMLQuery, cdataBlock: string) {\n const result = ExtDomQuery.byId(node.id.value, true).outerHTML(cdataBlock, false, false);\n const sourceForm = result?.firstParent(HTML_TAG_FORM).orElseLazy(() => result.byTagName(HTML_TAG_FORM, true));\n if (sourceForm) {\n this.storeForPostProcessing(sourceForm, result);\n }\n }\n\n /**\n * Delete handler, simply deletes the node referenced by the xml data\n * @param node\n */\n delete(node: XMLQuery) {\n DQ.byId(node.id.value, true).delete();\n }\n\n /**\n * attributes leaf tag... process the attributes\n *\n * @param node\n */\n attributes(node: XMLQuery) {\n const elem = DQ.byId(node.id.value, true);\n\n node.byTagName(XML_TAG_ATTR).each((item: XMLQuery) => {\n elem.attr(item.attr(ATTR_NAME).value).value = item.attr(ATTR_VALUE).value;\n });\n }\n\n /**\n * @param shadowDocument a shadow document which is needed for further processing\n */\n replaceViewRoot(shadowDocument: XMLQuery) {\n this.replaceHead(shadowDocument);\n this.replaceBody(shadowDocument);\n }\n\n /**\n * Insert handling, either before or after\n *\n * @param node\n */\n insert(node: XMLQuery) {\n //let insertId = node.id; //not used atm\n\n const before = node.attr(XML_TAG_BEFORE);\n const after = node.attr(XML_TAG_AFTER);\n const insertNodes = DQ.fromMarkup(<any>node.cDATAAsString);\n\n if (before.isPresent()) {\n DQ.byId(before.value, true).insertBefore(insertNodes);\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n if (after.isPresent()) {\n const domQuery = DQ.byId(after.value, true);\n domQuery.insertAfter(insertNodes);\n\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n }\n\n /**\n * Handler for the case <insert << before id=\"...\n *\n * @param node the node hosting the insert data\n */\n insertWithSubTags(node: XMLQuery) {\n const before = node.querySelectorAll(XML_TAG_BEFORE);\n const after = node.querySelectorAll(XML_TAG_AFTER);\n\n before.each(item => {\n const insertId = item.attr(ATTR_ID);\n const insertNodes = DQ.fromMarkup(<any>item.cDATAAsString);\n if (insertId.isPresent()) {\n DQ.byId(insertId.value, true).insertBefore(insertNodes);\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n });\n\n after.each(item => {\n const insertId = item.attr(ATTR_ID);\n const insertNodes = DQ.fromMarkup(<any>item.cDATAAsString);\n if (insertId.isPresent()) {\n DQ.byId(insertId.value, true).insertAfter(insertNodes);\n this.internalContext.assign(UPDATE_ELEMS).value.push(insertNodes);\n }\n });\n }\n\n /**\n * Process the viewState update, update the affected\n * forms with their respective new viewState values\n *\n */\n processViewState(node: XMLQuery): boolean {\n if (ResponseProcessor.isViewStateNode(node)) {\n const state = node.cDATAAsString;\n this.internalContext.assign(APPLIED_VST, node.id.value).value = new StateHolder($nsp(node.id.value), state);\n return true;\n }\n return false;\n }\n\n processClientWindow(node: XMLQuery): boolean {\n if (ResponseProcessor.isClientWindowNode(node)) {\n const state = node.cDATAAsString;\n this.internalContext.assign(APPLIED_CLIENT_WINDOW, node.id.value).value = new StateHolder($nsp(node.id.value), state);\n return true;\n }\n }\n\n /**\n * generic global eval which runs the embedded css and scripts\n */\n globalEval() {\n // phase one, if we have head inserts, we build up those before going into the script eval phase\n let insertHeadElems = new ExtDomQuery(...this.internalContext.getIf(DEFERRED_HEAD_INSERTS).value);\n insertHeadElems.runHeadInserts(true);\n\n // phase 2 we run a script eval on all updated elements in the body\n let updateElems = new ExtDomQuery(...this.internalContext.getIf(UPDATE_ELEMS).value);\n updateElems.runCss();\n // phase 3, we do the same for the css\n updateElems.runScripts();\n }\n\n /**\n * Postprocessing view state fixing\n * this appends basically the incoming view states to the forms.\n * It is called from outside after all forms have been processed basically\n * as last lifecycle step, before going into the next request.\n */\n fixViewStates() {\n ofAssoc(this.internalContext.getIf(APPLIED_VST).orElse({}).value)\n .forEach(([, value]) => {\n const namingContainerId = this.internalContext.getIf(NAMING_CONTAINER_ID);\n const namedViewRoot = !!this.internalContext.getIf(NAMED_VIEWROOT).value\n const affectedForms = this.getContainerForms(namingContainerId)\n .filter(affectedForm => this.isInExecuteOrRender(affectedForm));\n\n this.appendViewStateToForms(affectedForms, namedViewRoot, value.value, namingContainerId.orElse(\"\").value);\n })\n }\n\n\n\n /**\n * same as with view states before applies the incoming client windows as last step after the rest of the processing\n * is done.\n */\n fixClientWindow() {\n ofAssoc(this.internalContext.getIf(APPLIED_CLIENT_WINDOW).orElse({}).value)\n .forEach(([, value]) => {\n const namingContainerId = this.internalContext.getIf(NAMING_CONTAINER_ID);\n const namedViewRoot = !!this.internalContext.getIf(NAMED_VIEWROOT).value;\n const affectedForms = this.getContainerForms(namingContainerId)\n .filter(affectedForm => this.isInExecuteOrRender(affectedForm));\n\n this.appendClientWindowToForms(affectedForms, namedViewRoot, value.value, namingContainerId.orElse(\"\").value);\n });\n }\n\n updateNamedViewRootState() {\n let partialId = this.internalContext.getIf(NAMING_CONTAINER_ID);\n let namedViewRoot = this.internalContext.getIf(NAMED_VIEWROOT);\n if(partialId.isPresent() &&\n (namedViewRoot.isAbsent() ||\n !namedViewRoot.value)) {\n const SEP = $faces().separatorchar;\n this.internalContext.assign(NAMED_VIEWROOT).value = (!!document.getElementById(partialId.value)) || DQ$(`input[name*='${$nsp(P_VIEWSTATE)}']`)\n .filter(node => node.attr(\"name\").value.indexOf(partialId.value + SEP) == 0).length > 0;\n }\n }\n\n /**\n * all processing done we can close the request and send the appropriate events\n */\n done() {\n const eventData = EventData.createFromRequest(this.request.value, this.internalContext, this.externalContext, SUCCESS);\n\n //because some frameworks might decorate them over the context in the response\n const eventHandler = this.externalContext.getIf(ON_EVENT).orElseLazy(() => this.internalContext.getIf(ON_EVENT).value).orElse(EMPTY_FUNC).value;\n Implementation.sendEvent(eventData, eventHandler);\n }\n\n /**\n * proper viewState -> form assignment\n *\n * @param forms the forms to append the viewState to\n * @param viewState the final viewState\n * @param namingContainerId\n */\n private appendViewStateToForms(forms: DQ, namedViewRoot: boolean, viewState: string, namingContainerId = \"\") {\n this.assignState(forms, $nsp(SEL_VIEWSTATE_ELEM), namedViewRoot, viewState, namingContainerId);\n }\n\n\n /**\n * proper clientWindow -> form assignment\n *\n * @param forms the forms to append the viewState to\n * @param clientWindow the final viewState\n * @param namingContainerId\n */\n private appendClientWindowToForms(forms: DQ, namedViewRoot: boolean, clientWindow: string, namingContainerId = \"\") {\n this.assignState(forms, $nsp(SEL_CLIENT_WINDOW_ELEM), namedViewRoot, clientWindow, namingContainerId);\n }\n\n /**\n * generic append state which appends a certain state as hidden element to an existing set of forms\n *\n * @param forms the forms to append or change to\n * @param selector the selector for the state\n * @param namedViewRoot if set to true, the name is also prefixed\n * @param state the state itself which needs to be assigned\n *\n * @param namingContainerId\n * @private\n */\n private assignState(forms: DQ, selector: string, namedViewRoot: boolean, state: string, namingContainerId: string) {\n /**\n * creates the viewState or client window id element\n * @param form\n */\n const createAndAppendHiddenInput = (form: DomQuery) => {\n return new HiddenInputBuilder(selector)\n .withNamingContainerId(namingContainerId)\n .withParent(form)\n .withNamedViewRoot(namedViewRoot)\n .build();\n };\n\n forms.each(form => {\n const hiddenInput = form.querySelectorAll(selector)\n .orElseLazy(() => createAndAppendHiddenInput(form));\n hiddenInput.val = state;\n });\n }\n\n /**\n * Stores certain aspects of the dom for later post-processing\n *\n * @param updateForms the update forms which should receive standardized internal jsf data\n * @param toBeEvaluated the resulting elements which should be evaluated\n */\n private storeForPostProcessing(updateForms: DQ, toBeEvaluated: DQ) {\n this.storeForUpdate(updateForms);\n this.storeForEval(toBeEvaluated);\n }\n\n /**\n * helper to store a given form for the update post-processing (viewState)\n *\n * @param updateForms the dom query object pointing to the forms which need to be updated\n */\n private storeForUpdate(updateForms: DQ) {\n this.internalContext.assign(UPDATE_FORMS).value.push(updateForms);\n }\n\n /**\n * same for eval (js and css)\n *\n * @param toBeEvaluated\n */\n private storeForEval(toBeEvaluated: DQ) {\n this.internalContext.assign(UPDATE_ELEMS).value.push(toBeEvaluated);\n }\n\n /**\n * check whether a given XMLQuery node is an explicit viewState node\n *\n * @param node the node to check\n * @returns if it is a viewState node\n */\n private static isViewStateNode(node: XMLQuery): boolean {\n const SEP = $faces().separatorchar;\n return \"undefined\" != typeof node?.id?.value && (node?.id?.value == $nsp(P_VIEWSTATE) ||\n node?.id?.value?.indexOf([SEP, $nsp(P_VIEWSTATE)].join(EMPTY_STR)) != -1 ||\n node?.id?.value?.indexOf([$nsp(P_VIEWSTATE), SEP].join(EMPTY_STR)) != -1);\n }\n\n /**\n * incoming client window node also needs special processing\n *\n * @param node the node to check\n * @returns true of it ii\n */\n private static isClientWindowNode(node: XMLQuery): boolean {\n const SEP = $faces().separatorchar;\n return \"undefined\" != typeof node?.id?.value && (node?.id?.value == $nsp(P_CLIENT_WINDOW) ||\n node?.id?.value?.indexOf([SEP, $nsp(P_CLIENT_WINDOW)].join(EMPTY_STR)) != -1 ||\n node?.id?.value?.indexOf([$nsp(P_CLIENT_WINDOW), SEP].join(EMPTY_STR)) != -1);\n }\n\n private triggerOnError(errorData: ErrorData) {\n this.externalContext.getIf(ON_ERROR).orElseLazy(() => this.internalContext.getIf(ON_ERROR).value).orElse(EMPTY_FUNC).value(errorData);\n }\n\n /**\n * filters the forms according to being member of the \"execute\" or \"render\" cycle\n * @param affectedForm\n * @private\n */\n private isInExecuteOrRender(affectedForm) {\n const executes = this.externalContext.getIf($nsp(P_EXECUTE)).orElse(\"@none\").value.split(/\\s+/gi);\n const renders = this.externalContext.getIf(P_RENDER_OVERRIDE)\n .orElseLazy(() => this.externalContext.getIf($nsp(P_RENDER)).value)\n .orElse(IDENT_NONE).value.split(/\\s+/gi);\n const executeAndRenders = executes.concat(...renders);\n return [...executeAndRenders].filter(nameOrId => {\n if ([IDENT_ALL, IDENT_NONE].indexOf(nameOrId) != -1) {\n return true;\n }\n\n const NAME_OR_ID = this.getNameOrIdSelector(nameOrId);\n //either the form directly is in execute or render or one of its children or one of its parents\n return affectedForm.matchesSelector(NAME_OR_ID) ||\n affectedForm.querySelectorAll(NAME_OR_ID).isPresent() ||\n affectedForm.firstParent(NAME_OR_ID).isPresent();\n }).length > 0;\n }\n\n /**\n * gets all forms under a single naming container id\n * @param namingContainerId\n * @private\n */\n private getContainerForms(namingContainerId: Config) {\n if (namingContainerId.isPresent()) {\n //naming container mode, all forms under naming container id must be processed\n return DQ$(this.getNameOrIdSelector(namingContainerId.value))\n // missing condition if the naming container is not present we have to\n // use the body as fallback\n .orElseLazy(() => DQ.byTagName(HTML_TAG_BODY))\n .byTagName(HTML_TAG_FORM, true);\n } else {\n return DQ.byTagName(HTML_TAG_FORM);\n }\n }\n\n private getNameOrIdSelector(nameOrId) {\n return `[id='${nameOrId}'], [name='${nameOrId}']`;\n }\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {Config, DQ} from \"mona-dish\";\nimport {$nsp, EMPTY_STR, IDENT_NONE, P_VIEWSTATE} from \"../core/Const\";\n\nimport {\n encodeFormData,\n fixEmptyParameters, getFormInputsAsArr\n} from \"../util/FileUtils\";\nimport {ExtLang} from \"../util/Lang\";\nimport ofAssoc = ExtLang.ofAssoc;\nimport {Es2019Array} from \"mona-dish\";\n\n\ntype ParamsMapper<V, K> = (key: V, item: K) => [V, K];\nconst defaultParamsMapper: ParamsMapper<string, any> = (key, item) => [key, item];\n\n/**\n * A unified form data class\n * which builds upon our configuration.\n *\n * We cannot use standard html5 forms everywhere\n * due to api constraints on the HTML Form object in IE11\n * and due to the url encoding constraint given by the faces.js spec\n *\n *\n * internal storage format\n * every value is stored as an array\n * even scalar ones!\n */\nexport class XhrFormData extends Config {\n /**\n * Checks if the given datasource is a multipart request source\n * multipart is only needed if one of the executes is a file input\n * since file inputs are stateless, they fall out of the view state\n * and need special handling. With file submits we have to send a formData object\n * instead of an encoded string files cannot be sent that way\n */\n isMultipartRequest: boolean = false;\n\n /**\n * data collector from a given form\n *\n * @param dataSource either a form as DomQuery object or an encoded url string\n * @param paramsMapper a remapper for the params keys and values\n * @param executes the executes id list for the elements to being processed\n * @param partialIds partial ids to collect, to reduce the data sent down\n */\n constructor(private dataSource: DQ, private paramsMapper: ParamsMapper<string, any> = defaultParamsMapper, executes?: string[], private partialIds?: string[]) {\n super({});\n //encode and append the issuing item if not a partial ids array of ids is passed\n /*\n * Spec. 13.3.1\n * Collect and encode input elements.\n * Additionally the hidden element jakarta.faces.ViewState\n * Enhancement partial page submit\n */\n this.resolveRequestType(this.dataSource, executes);\n this.encodeSubmittableFields(this.dataSource, this.partialIds);\n this.applyViewState(this.dataSource);\n }\n\n /**\n * @returns a Form data representation, this is needed for file submits\n */\n toFormData(): FormData {\n /*\n * expands key: [item1, item2]\n * to: [{key: key, value: item1}, {key: key, value: item2}]\n */\n let expandValueArrays = ([key, item]) => {\n if (Array.isArray(item)) {\n return new Es2019Array(...item).map(value => {\n return {key, value}\n })\n }\n return [{key, value: item}]\n }\n\n /*\n * remaps the incoming {key, value} tuples\n * to naming container prefixed keys and values\n */\n let remapForNamingContainer = ({key, value}) => {\n key = this.remapKeyForNamingContainer(key);\n return {key, value}\n };\n\n /*\n * collects everything into a FormData object\n */\n return ofAssoc(this.value)\n .flatMap(expandValueArrays)\n .map(remapForNamingContainer)\n .reduce((formData: FormData, {key, value}: any) => {\n formData.append(key, value);\n return formData;\n }, new FormData()) as FormData;\n }\n\n /**\n * returns an encoded string representation of our xhr form data\n *\n * @param defaultStr optional default value if nothing is there to encode\n */\n toString(defaultStr = EMPTY_STR): string {\n return encodeFormData(this, this.paramsMapper, defaultStr);\n }\n\n /**\n * generic post init code, for now, this performs some post assign data post-processing\n * @param rootElement the root element which knows the request type (usually a form)\n * @param executes the executable dom nodes which need to be processed into the form data, which we can send\n * in our ajax request\n */\n private resolveRequestType(rootElement: DQ, executes?: Array<string>) {\n if (!executes || executes.indexOf(IDENT_NONE) != -1) {\n return;\n }\n this.isMultipartRequest = rootElement.isMultipartCandidate(true);\n }\n\n /**\n * special case view state handling\n *\n * @param form the form holding the view state value\n */\n private applyViewState(form: DQ) {\n if (this.getIf($nsp(P_VIEWSTATE)).isPresent()) {\n return;\n }\n let viewStateElement = form.querySelectorAllDeep(`[name*='${$nsp(P_VIEWSTATE)}'`);\n let viewState = viewStateElement.inputValue;\n this.appendIf(viewState.isPresent(), this.remapKeyForNamingContainer(viewStateElement.name.value)).value = viewState.value;\n }\n\n /**\n * determines fields to submit\n * @param {Node} parentItem - form element item is nested in\n * @param {Array} partialIds - ids fo PPS\n */\n private encodeSubmittableFields(parentItem: DQ, partialIds: string[] = []) {\n\n const mergeIntoThis = ([key, value]) => this.append(key).value = value;\n const namingContainerRemap = ([key, value]) => this.paramsMapper(key as string, value);\n\n const remappedPartialIds = partialIds.map(partialId => this.remapKeyForNamingContainer(partialId));\n const partialIdsFilter = ([key, value]) => (!remappedPartialIds.length || key.indexOf(\"@\") == 0) ? true :\n remappedPartialIds.indexOf(key) != -1;\n\n let inputs = getFormInputsAsArr(parentItem);\n inputs\n .map(fixEmptyParameters)\n .map(namingContainerRemap)\n .filter(partialIdsFilter)\n .forEach(mergeIntoThis);\n }\n\n private remapKeyForNamingContainer(key: string): string {\n return this.paramsMapper(key, \"\")[0];\n }\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {AsyncRunnable, IAsyncRunnable} from \"../util/AsyncRunnable\";\nimport {Config, DQ, XMLQuery} from \"mona-dish\";\nimport {Implementation} from \"../AjaxImpl\";\n\nimport {XhrFormData} from \"./XhrFormData\";\nimport {ErrorData} from \"./ErrorData\";\nimport {EventData} from \"./EventData\";\nimport {ExtLang} from \"../util/Lang\";\nimport {\n $faces,\n BEGIN,\n COMPLETE,\n CONTENT_TYPE,\n CTX_PARAM_MF_INTERNAL,\n CTX_PARAM_REQ_PASS_THR,\n ERROR,\n HEAD_FACES_REQ,\n MALFORMEDXML,\n NO_TIMEOUT,\n ON_ERROR,\n ON_EVENT,\n P_EXECUTE,\n REQ_ACCEPT,\n REQ_TYPE_GET,\n REQ_TYPE_POST,\n SOURCE,\n STATE_EVT_TIMEOUT,\n STD_ACCEPT,\n URL_ENCODED,\n VAL_AJAX,\n IDENT_NONE,\n CTX_PARAM_SRC_FRM_ID,\n CTX_PARAM_SRC_CTL_ID,\n CTX_PARAM_PPS,\n EMPTY_RESPONSE,\n HTTP_ERROR,\n EMPTY_STR,\n $nsp,\n P_BEHAVIOR_EVENT,\n CTX_PARAM_UPLOAD_ON_PROGRESS,\n CTX_PARAM_UPLOAD_LOAD,\n CTX_PARAM_UPLOAD_LOADSTART,\n CTX_PARAM_UPLOAD_LOADEND,\n CTX_PARAM_UPLOAD_ABORT,\n CTX_PARAM_UPLOAD_TIMEOUT,\n CTX_PARAM_UPLOAD_ERROR,\n CTX_PARAM_UPLOAD_PREINIT\n} from \"../core/Const\";\nimport {\n resolveFinalUrl,\n resolveHandlerFunc,\n resoveNamingContainerMapper\n} from \"./RequestDataResolver\";\nimport failSaveExecute = ExtLang.failSaveExecute;\nimport {ExtConfig} from \"../util/ExtDomQuery\";\n\n/**\n * Faces XHR Request Wrapper\n * as AsyncRunnable for our Asynchronous queue\n * This means from the outside the\n * xhr request is similar to a Promise in a way\n * that you can add then and catch and finally callbacks.\n *\n *\n * The idea is that we basically just enqueue\n * a single ajax request into our queue\n * and let the queue do the processing.\n *\n *\n */\n\nexport class XhrRequest extends AsyncRunnable<XMLHttpRequest> {\n\n private responseContext: Config;\n\n private stopProgress = false;\n\n\n private xhrObject = new XMLHttpRequest();\n\n static readonly TYPE_CHECKBOX = \"checkbox\";\n static readonly TYPE_RADIO = \"radio\";\n\n\n /**\n * Required Parameters\n *\n * @param requestContext the request context with all pass through values\n * @param internalContext internal context with internal info which is passed through, not used by the user\n * Optional Parameters\n * @param timeout optional xhr timeout\n * @param ajaxType optional request type, default \"POST\"\n * @param contentType optional content type, default \"application/x-www-form-urlencoded\"\n */\n constructor(\n private requestContext: ExtConfig,\n private internalContext: Config,\n private timeout = NO_TIMEOUT,\n private ajaxType = REQ_TYPE_POST,\n private contentType = URL_ENCODED\n ) {\n super();\n // we omit promises here because we have to deal with cancel functionality,\n // and promises to not provide that (yet) instead we have our async queue\n // which uses an api internally, which is very close to promises\n this.registerXhrCallbacks((data: any) => this.resolve(data), (data: any) => this.reject(data));\n }\n\n start(): IAsyncRunnable<XMLHttpRequest> {\n\n let ignoreErr = failSaveExecute;\n let xhrObject = this.xhrObject;\n let sourceForm = DQ.byId(this.internalContext.getIf(CTX_PARAM_SRC_FRM_ID).value)\n\n\n let executesArr = () => {\n return this.requestContext.getIf(CTX_PARAM_REQ_PASS_THR, P_EXECUTE).get(IDENT_NONE).value.split(/\\s+/gi);\n };\n\n try {\n // encoded we need to decode\n // We generated a base representation of the current form\n // in case someone has overloaded the viewState with additional decorators we merge\n // that in, there is no way around it, the spec allows it and getViewState\n // must be called, so whatever getViewState delivers has higher priority then\n // whatever the formData object delivers\n // the partialIdsArray arr is almost deprecated legacy code where we allowed to send a separate list of partial\n // ids for reduced load and server processing, this will be removed soon, we can handle the same via execute\n const executes = executesArr();\n const partialIdsArray = this.internalContext.getIf(CTX_PARAM_PPS).value === true ? executes : [];\n const formData: XhrFormData = new XhrFormData(\n sourceForm,\n resoveNamingContainerMapper(this.internalContext),\n executes, partialIdsArray\n );\n\n this.contentType = formData.isMultipartRequest ? \"undefined\" : this.contentType;\n\n // next step the pass through parameters are merged in for post params\n this.requestContext.$nspEnabled = false;\n const requestContext = this.requestContext;\n const requestPassThroughParams = requestContext.getIf(CTX_PARAM_REQ_PASS_THR) as ExtConfig;\n\n // we are turning off here the jsf, faces remapping because we are now dealing with\n // pass-through parameters\n requestPassThroughParams.$nspEnabled = false;\n // this is an extension where we allow pass through parameters to be sent down additionally\n // this can be used and is used in the impl to enrich the post request parameters with additional\n // information\n try {\n formData.shallowMerge(requestPassThroughParams, true, true);\n } finally {\n // unfortunately as long as we support\n // both namespaces we have to keep manual control\n // on the key renaming before doing ops like deep copy\n this.requestContext.$nspEnabled = true;\n requestPassThroughParams.$nspEnabled = true;\n }\n\n this.appendIssuingItem(formData);\n\n this.responseContext = requestPassThroughParams.deepCopy;\n\n // we have to shift the internal passthroughs around to build up our response context\n const responseContext = this.responseContext;\n\n responseContext.assign(CTX_PARAM_MF_INTERNAL).value = this.internalContext.value;\n\n // per spec the onEvent and onError handlers must be passed through to the response\n responseContext.assign(ON_EVENT).value = requestContext.getIf(ON_EVENT).value;\n responseContext.assign(ON_ERROR).value = requestContext.getIf(ON_ERROR).value;\n\n xhrObject.open(this.ajaxType, resolveFinalUrl(sourceForm, formData, this.ajaxType), true);\n\n // adding timeout\n this.timeout ? xhrObject.timeout = this.timeout : null;\n\n // a bug in the xhr stub library prevents the setRequestHeader to be properly executed on fake xhr objects\n // normal browsers should resolve this\n // tests can quietly fail on this one\n if (this.contentType != \"undefined\") {\n ignoreErr(() => xhrObject.setRequestHeader(CONTENT_TYPE, `${this.contentType}; charset=utf-8`));\n }\n\n ignoreErr(() => xhrObject.setRequestHeader(HEAD_FACES_REQ, VAL_AJAX));\n\n // probably not needed anymore, will test this\n // some webkit based mobile browsers do not follow the w3c spec of\n // setting, they accept headers automatically\n ignoreErr(() => xhrObject.setRequestHeader(REQ_ACCEPT, STD_ACCEPT));\n\n this.sendEvent(BEGIN);\n this.sendRequest(formData);\n } catch (e) {\n // this happens usually in a client side condition, hence we have to deal in with it in a client\n // side manner\n this.handleErrorAndClearQueue(e);\n throw e;\n }\n return this;\n }\n\n\n\n cancel() {\n try {\n // this causes onError to be called where the error\n // handling takes over\n this.xhrObject.abort();\n } catch (e) {\n this.handleError(e);\n }\n }\n\n\n /**\n * attaches the internal event and processing\n * callback within the promise to our xhr object\n *\n * @param resolve\n * @param reject\n */\n private registerXhrCallbacks(resolve: Consumer<any>, reject: Consumer<any>) {\n const xhrObject = this.xhrObject;\n\n xhrObject.onabort = () => {\n this.onAbort(resolve, reject);\n };\n xhrObject.ontimeout = () => {\n this.onTimeout(resolve, reject);\n };\n xhrObject.onload = () => {\n this.onResponseReceived(resolve)\n };\n xhrObject.onloadend = () => {\n this.onResponseProcessed(this.xhrObject, resolve);\n };\n\n if(xhrObject?.upload) {\n //this is an extension so that we can send the upload object of the current\n //request before any operation\n this.internalContext.getIf(CTX_PARAM_UPLOAD_PREINIT).value?.(xhrObject.upload);\n //now we hook in the upload events\n xhrObject.upload.addEventListener(\"progress\", (event: ProgressEvent) => {\n this.internalContext.getIf(CTX_PARAM_UPLOAD_ON_PROGRESS).value?.(xhrObject.upload, event);\n });\n xhrObject.upload.addEventListener(\"load\", (event: ProgressEvent) => {\n this.internalContext.getIf(CTX_PARAM_UPLOAD_LOAD).value?.(xhrObject.upload, event);\n });\n xhrObject.upload.addEventListener(\"loadstart\", (event: ProgressEvent) => {\n this.internalContext.getIf(CTX_PARAM_UPLOAD_LOADSTART).value?.(xhrObject.upload, event);\n });\n xhrObject.upload.addEventListener(\"loadend\", (event: ProgressEvent) => {\n this.internalContext.getIf(CTX_PARAM_UPLOAD_LOADEND).value?.(xhrObject.upload, event);\n });\n xhrObject.upload.addEventListener(\"abort\", (event: ProgressEvent) => {\n this.internalContext.getIf(CTX_PARAM_UPLOAD_ABORT).value?.(xhrObject.upload, event);\n });\n xhrObject.upload.addEventListener(\"timeout\", (event: ProgressEvent) => {\n this.internalContext.getIf(CTX_PARAM_UPLOAD_TIMEOUT).value?.(xhrObject.upload, event);\n });\n xhrObject.upload.addEventListener(\"error\", (event: ProgressEvent) => {\n this.internalContext.getIf(CTX_PARAM_UPLOAD_ERROR).value?.(xhrObject.upload, event);\n });\n\n }\n\n xhrObject.onerror = (errorData: any) => {\n // Safari in rare cases triggers an error when cancelling a request internally, or when\n // in this case we simply ignore the request and clear up the queue, because\n // it is not safe anymore to proceed with the current queue\n\n // This bypasses a Safari issue where it keeps requests hanging after page unload\n // and then triggers a cancel error on then instead of just stopping\n // and clearing the code\n // in a page unload case it is safe to clear the queue\n // in the exact safari case any request after this one in the queue is invalid\n // because the queue references xhr requests to a page which already is gone!\n if (this.isCancelledResponse(this.xhrObject)) {\n /*\n * this triggers the catch chain and after that finally\n */\n this.stopProgress = true;\n reject();\n return;\n }\n // error already processed somewhere else\n if (this.stopProgress) {\n return;\n }\n this.handleError(errorData);\n };\n }\n\n private isCancelledResponse(currentTarget: XMLHttpRequest): boolean {\n return currentTarget?.status === 0 && // cancelled internally by browser\n currentTarget?.readyState === 4 &&\n currentTarget?.responseText === '' &&\n currentTarget?.responseXML === null;\n }\n\n /*\n * xhr processing callbacks\n *\n * Those methods are the callbacks called by\n * the xhr object depending on its own state\n */\n /**\n * client side abort... also here for now we clean the queue\n *\n * @param resolve\n * @param reject\n * @private\n */\n private onAbort(resolve: Consumer<any>, reject: Consumer<any>) {\n // reject means clear queue, in this case we abort entirely the processing\n // does not happen yet, we have to probably rethink this strategy in the future\n // when we introduce cancel functionality\n this.handleHttpError(reject);\n }\n\n /**\n * request timeout, this must be handled like a generic server error per spec\n * unfortunately, so we have to jump to the next item (we cancelled before)\n * @param resolve\n * @param reject\n * @private\n */\n private onTimeout(resolve: Consumer<any>, reject: Consumer<any>) {\n // timeout also means we we probably should clear the queue,\n // the state is unsafe for the next requests\n this.sendEvent(STATE_EVT_TIMEOUT);\n this.handleHttpError(resolve);\n }\n\n /**\n * the response is received and normally is a normal response\n * but also can be some kind of error (http code >= 300)\n * In any case the response will be resolved either as error or response\n * and the next item in the queue will be processed\n * @param resolve\n * @private\n */\n private onResponseReceived(resolve: Consumer<any>) {\n\n this.sendEvent(COMPLETE);\n\n //request error resolution as per spec:\n if(!this.processRequestErrors(resolve)) {\n $faces().ajax.response(this.xhrObject, this.responseContext.value ?? {});\n }\n }\n\n private processRequestErrors(resolve: Consumer<any>): boolean {\n const responseXML = new XMLQuery(this.xhrObject?.responseXML);\n const responseCode = this.xhrObject?.status ?? -1;\n if(responseXML.isXMLParserError()) {\n // invalid response\n const errorName = \"Invalid Response\";\n const errorMessage = \"The response xml is invalid\";\n\n this.handleGenericResponseError(errorName, errorMessage, MALFORMEDXML, resolve);\n return true;\n } else if(responseXML.isAbsent()) {\n // empty response\n const errorName = \"Empty Response\";\n const errorMessage = \"The response has provided no data\";\n\n this.handleGenericResponseError(errorName, errorMessage, EMPTY_RESPONSE, resolve);\n return true;\n } else if (responseCode >= 300 || responseCode < 200) {\n // other server errors\n // all errors from the server are resolved without interfering in the queue\n this.handleHttpError(resolve);\n return true;\n }\n //additional errors are application errors and must be handled within the response\n return false;\n }\n private handleGenericResponseError(errorName: string, errorMessage: string, responseStatus: string, resolve: (s?: any) => void) {\n const errorData: ErrorData = new ErrorData(\n this.internalContext.getIf(CTX_PARAM_SRC_CTL_ID).value,\n errorName, errorMessage,\n this.xhrObject?.responseText ?? \"\",\n this.xhrObject?.responseXML ?? null,\n this.xhrObject.status,\n responseStatus\n );\n this.finalizeError(errorData, resolve);\n }\n\n private handleHttpError(resolveOrReject: Function, errorMessage: string = \"Generic HTTP Serror\") {\n this.stopProgress = true;\n\n const errorData = new ErrorData(\n this.internalContext.getIf(CTX_PARAM_SRC_CTL_ID).value,\n HTTP_ERROR, errorMessage,\n this.xhrObject?.responseText ?? \"\",\n this.xhrObject?.responseXML ?? null,\n this.xhrObject?.status ?? -1,\n HTTP_ERROR\n )\n this.finalizeError(errorData, resolveOrReject);\n }\n\n private finalizeError(errorData: ErrorData, resolveOrReject: Function) {\n try {\n this.handleError(errorData, true);\n } finally {\n // we issue a resolveOrReject in this case to allow the system to recover\n // reject would clean up the queue\n // resolve would trigger the next element in the queue to be processed\n resolveOrReject(errorData);\n this.stopProgress = true;\n }\n }\n\n /**\n * last minute cleanup, the request now either is fully done\n * or not by having had a cancel or error event be\n * @param data\n * @param resolve\n * @private\n */\n private onResponseProcessed(data: any, resolve: Consumer<any>) {\n // if stop progress true, the cleanup already has been performed\n if (this.stopProgress) {\n return;\n }\n /*\n * normal case, cleanup == next item if possible\n */\n resolve(data);\n }\n\n private sendRequest(formData: XhrFormData) {\n const isPost = this.ajaxType != REQ_TYPE_GET;\n if (formData.isMultipartRequest) {\n // in case of a multipart request we send in a formData object as body\n this.xhrObject.send((isPost) ? formData.toFormData() : null);\n } else {\n // in case of a normal request we send it normally\n this.xhrObject.send((isPost) ? formData.toString() : null);\n }\n }\n\n /*\n * other helpers\n */\n private sendEvent(evtType: string) {\n const eventData = EventData.createFromRequest(this.xhrObject, this.internalContext, this.requestContext, evtType);\n try {\n // User code error, we might cover\n // this in onError, but also we cannot swallow it.\n // We need to resolve the local handlers lazily,\n // because some frameworks might decorate them over the context in the response\n let eventHandler = resolveHandlerFunc(this.requestContext, this.responseContext, ON_EVENT);\n Implementation.sendEvent(eventData, eventHandler);\n } catch (e) {\n e.source = e?.source ?? this.requestContext.getIf(SOURCE).value;\n // this is a client error, no save state anymore for queue processing!\n this.handleErrorAndClearQueue(e);\n // we forward the error upward like all client side errors\n throw e;\n }\n }\n\n private handleErrorAndClearQueue(e, responseFormatError: boolean = false) {\n this.handleError(e, responseFormatError);\n this.reject(e);\n }\n\n private handleError(exception, responseFormatError: boolean = false) {\n const errorData = (responseFormatError) ? ErrorData.fromHttpConnection(exception.source, exception.type, exception.message ?? EMPTY_STR, exception.responseText, exception.responseXML, exception.responseCode, exception.status) : ErrorData.fromClient(exception);\n const eventHandler = resolveHandlerFunc(this.requestContext, this.responseContext, ON_ERROR);\n\n Implementation.sendError(errorData, eventHandler);\n }\n\n private appendIssuingItem(formData: XhrFormData) {\n const issuingItemId = this.internalContext.getIf(CTX_PARAM_SRC_CTL_ID).value;\n\n //to avoid sideffects with buttons we only can append the issuing item if no behavior event is set\n //MYFACES-4679!\n const eventType = formData.getIf($nsp(P_BEHAVIOR_EVENT)).value?.[0] ?? null;\n const isBehaviorEvent = (!!eventType) && eventType != 'click';\n\n //not encoded\n if(issuingItemId && formData.getIf(issuingItemId).isAbsent() && !isBehaviorEvent) {\n const issuingItem = DQ.byId(issuingItemId);\n const itemValue = issuingItem.inputValue;\n const arr = new ExtConfig({});\n const type: string = issuingItem.type.orElse(\"\").value.toLowerCase();\n\n //Checkbox and radio only value pass if checked is set, otherwise they should not show\n //up at all, and if checked is set, they either can have a value or simply being boolean\n if((type == XhrRequest.TYPE_CHECKBOX || type == XhrRequest.TYPE_RADIO) && !issuingItem.checked) {\n return;\n } else if((type == XhrRequest.TYPE_CHECKBOX || type == XhrRequest.TYPE_RADIO)) {\n arr.assign(issuingItemId).value = itemValue.orElse(true).value;\n } else if (itemValue.isPresent()) {\n arr.assign(issuingItemId).value = itemValue.value;\n }\n\n formData.shallowMerge(arr, true, true);\n }\n }\n}","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {DQ} from \"mona-dish\";\nimport {ExtLang} from \"../impl/util/Lang\";\n\n/**\n * legacy code to enable various aspects\n * of myfaces, used to be rendered inline\n * for jsf 2.0 we can externalize it into its own custom resource\n *\n * note this is a straight 1:1 port from the existing codebase\n * (not too much work has been spent here, the important thing is, that\n * the namespace and functions need to be kept intact for legacy code)\n *\n * we might move the code over in the future, but for now a straight 1:1 port suffices\n */\nexport module oam {\n import ofAssoc = ExtLang.ofAssoc;\n /**\n * sets a hidden input field\n * @param formName the formName\n * @param name the hidden field\n * @param value the value to be rendered\n */\n export const setHiddenInput = function (formName: string, name: string, value: string): void {\n DQ.byId(document.forms[formName])\n .each(form => {\n const input = form.querySelectorAll(`input[type='hidden'][name='${name}']`);\n if (input.isPresent()) {\n input.inputValue.value = value;\n } else {\n const newInput = DQ.fromMarkup(`<input type='hidden' id='${name}' name='${name}'>`);\n newInput.inputValue.value = value;\n newInput.appendTo(form);\n }\n });\n };\n\n /**\n * clears a hidden input field\n *\n * @param formName formName for the input\n * @param name the name of the input field\n */\n export const clearHiddenInput = function (formName: string, name: string): void {\n let element = document.forms?.[formName]?.elements?.[name];\n if(!element) {\n return;\n }\n DQ.byId(element).delete();\n };\n\n // noinspection JSUnusedGlobalSymbols,JSUnusedLocalSymbols\n /**\n * does special form submit remapping\n * re-maps the issuing command link into something,\n * the \"decode\" of the command link on the server can understand\n *\n * @param formName\n * @param linkId\n * @param target\n * @param params\n */\n export const submitForm = function (formName: string, linkId: string | null = null, target: string |null = null, params: AssocArr<any> | Tuples<string, any> | null = {} ): boolean {\n\n\n //handle a possible incoming null, not sure if this is used that way anywhere, but we allow it\n params = (!params) ? {} : params;\n\n let clearFn = 'clearFormHiddenParams_' + formName.replace(/-/g, '\\$:').replace(/:/g, '_');\n window?.[clearFn]?.(formName);\n\n //autoscroll code\n if (window?.myfaces?.core?.config?.autoScroll && (window as any)?.getScrolling) {\n myfaces.oam.setHiddenInput(formName, 'autoScroll', (window as any)?.getScrolling());\n }\n let paramsStream: Array<[string, any]> = Array.isArray(params) ? [...params] : ofAssoc(params);\n paramsStream.forEach(([key, data]) => myfaces.oam.setHiddenInput(formName, key, data));\n\n //we call the namespaced function, to allow decoration, via a direct call we would\n myfaces.oam.setHiddenInput(formName, `${formName}:_idcl`, linkId ?? '');\n\n\n DQ.byId(document.forms?.[formName] ?? document.getElementById(formName)).each(form => {\n const ATTR_TARGET = \"target\";\n const formElement = form.getAsElem(0).value as HTMLFormElement;\n const oldTarget = (form.getAsElem(0).value as HTMLFormElement).getAttribute(\"target\");\n\n if(target != \"null\" && target) {\n (form.getAsElem(0).value as HTMLFormElement).setAttribute(\"target\", target);\n }\n\n const result = formElement?.onsubmit?.(null);\n\n try {\n if ((!!result) || 'undefined' == typeof result) {\n formElement.submit();\n }\n } catch (e) {\n window?.console.error(e);\n } finally {\n if(oldTarget == null || oldTarget == \"null\") {\n (form.getAsElem(0).value as HTMLFormElement).removeAttribute(\"target\");\n } else {\n (form.getAsElem(0).value as HTMLFormElement).setAttribute(\"target\", oldTarget);\n }\n\n // noinspection JSUnusedLocalSymbols\n paramsStream.forEach(([key, data]) => {\n myfaces.oam.clearHiddenInput(formName, key);\n });\n myfaces.oam.clearHiddenInput(formName, `${formName}:_idcl`);\n }\n\n });\n return false;\n };\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","/*! Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\"use strict\";\n/**\n * jsf.js init layer which provides as per spec the proper\n * window namespace if it does not exist already\n * if this file is included then the code falls back with its namespaces\n * on jsf2.3 or earlier level, for 4.0+ please include faces.js\n */\nif(!window?.jsf) {\n const faces = require(\"./_api\").faces;\n (window as any)['jsf'] = window?.jsf ?? faces;\n window.jsf.specversion = 230000;\n delete window.jsf.contextpath;\n\n let faces4Init = faces.push.init;\n /*\n * we shim back the breaking api change from 3.0 to 4.0\n * onerror is gone\n */\n faces.push.init = (socketClientId: string,\n url: string,\n channel: string,\n onopen: Function,\n onmessage: Function,\n // no on error api change for 4.0\n //onerror: Function,\n onclose: Function,\n behaviors: any,\n autoConnect: boolean) => {\n faces4Init(socketClientId, url, channel, onopen, onmessage, null, onclose, behaviors, autoConnect);\n }\n}\nif(!window?.myfaces?.ab) {\n const myfaces = require(\"./_api\").myfaces;\n //namespace might be extended is not exclusively reserved so we merge\n (window as any)[\"myfaces\"] = window?.myfaces ?? {};\n if(!window?.myfaces?.ab) {\n const myfaces = require(\"./_api\").myfaces;\n //namespace might be extended is not exclusively reserved so we merge\n (window as any)[\"myfaces\"] = window?.myfaces ?? {};\n Object.keys(myfaces).forEach(key => window.myfaces[key] = window.myfaces?.[key] ?? myfaces[key]);\n }\n}\n\nexport var jsf = window.jsf;\nexport var myfaces = window.myfaces;"],"names":[],"sourceRoot":""}
|