jsf.js_next_gen 4.0.0-beta-23 → 4.0.1-alpha.0
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/.nyc_output/09ca9ebc-2305-4357-8db9-48ddfc7dfde2.json +1 -0
- package/.nyc_output/7c496a14-166e-4aa5-85b9-47b22b055ad8.json +1 -0
- package/.nyc_output/processinfo/09ca9ebc-2305-4357-8db9-48ddfc7dfde2.json +1 -0
- package/.nyc_output/processinfo/7c496a14-166e-4aa5-85b9-47b22b055ad8.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/README.md +13 -21
- package/dist/docs/assets/main.js +56 -52
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/assets/style.css +23 -0
- package/dist/docs/functions/faces.ajax.addOnError.html +2 -0
- package/dist/docs/functions/faces.ajax.addOnEvent.html +2 -0
- package/dist/docs/functions/faces.push.close.html +4 -2
- package/dist/docs/functions/faces.push.init.html +19 -7
- package/dist/docs/functions/faces.push.open.html +4 -2
- package/dist/docs/functions/myfaces.ab.html +9 -4
- package/dist/docs/functions/myfaces.onDomReady.html +72 -0
- package/dist/docs/index.html +16 -18
- package/dist/docs/modules/myfaces.html +3 -1
- package/dist/docs/variables/myfaces.oam.html +2 -1
- package/dist/window/faces-development.js +2846 -2085
- package/dist/window/faces-development.js.br +0 -0
- package/dist/window/faces-development.js.gz +0 -0
- package/dist/window/faces-development.js.map +1 -1
- package/dist/window/faces.js +1 -1
- package/dist/window/faces.js.LICENSE.txt +17 -2
- package/dist/window/faces.js.br +0 -0
- package/dist/window/faces.js.gz +0 -0
- package/dist/window/faces.js.map +1 -1
- package/dist/window/jsf-development.js +2856 -2084
- package/dist/window/jsf-development.js.br +0 -0
- package/dist/window/jsf-development.js.gz +0 -0
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.LICENSE.txt +17 -2
- package/dist/window/jsf.js.br +0 -0
- package/dist/window/jsf.js.gz +0 -0
- package/dist/window/jsf.js.map +1 -1
- package/package.json +19 -18
- package/plans for 4.0.1.txt +8 -0
- package/src/main/test.xml +23 -0
- package/src/main/typescript/@types/definitions/index.d.ts +19 -2
- package/src/main/typescript/api/_api.ts +68 -25
- package/src/main/typescript/api/jsf.ts +18 -0
- package/src/main/typescript/impl/AjaxImpl.ts +204 -100
- package/src/main/typescript/impl/PushImpl.ts +63 -38
- package/src/main/typescript/impl/core/Const.ts +56 -40
- package/src/main/typescript/impl/util/Assertions.ts +16 -8
- package/src/main/typescript/impl/util/AsyncRunnable.ts +85 -10
- package/src/main/typescript/impl/util/ExtDomQuery.ts +65 -54
- package/src/main/typescript/impl/util/FileUtils.ts +108 -0
- package/src/main/typescript/impl/util/HiddenInputBuilder.ts +93 -0
- package/src/main/typescript/impl/util/Lang.ts +91 -35
- package/src/main/typescript/impl/util/XhrQueueController.ts +112 -0
- package/src/main/typescript/impl/xhrCore/ErrorData.ts +15 -10
- package/src/main/typescript/impl/xhrCore/EventData.ts +3 -3
- package/src/main/typescript/impl/xhrCore/IResponseProcessor.ts +25 -11
- package/src/main/typescript/impl/xhrCore/RequestDataResolver.ts +78 -32
- package/src/main/typescript/impl/xhrCore/ResonseDataResolver.ts +10 -10
- package/src/main/typescript/impl/xhrCore/Response.ts +66 -49
- package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +211 -138
- package/src/main/typescript/impl/xhrCore/XhrFormData.ts +92 -166
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +111 -120
- package/src/main/typescript/myfaces/OamSubmit.ts +30 -14
- package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +163 -27
- package/src/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.ts +4 -4
- package/src/main/typescript/test/frameworkBase/_ext/monadish/fixtures/blank.css +0 -0
- package/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.ts +921 -0
- package/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.ts +108 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +111 -3
- package/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.ts +40 -1
- package/src/main/typescript/test/frameworkBase/_ext/shared/fixtures/jakarta.faces.resource/faces.js.jsf +0 -0
- package/src/main/typescript/test/impl/ImplTest.spec.ts +3 -3
- package/src/main/typescript/test/impl/ImplTest_23.spec.ts +3 -7
- package/src/main/typescript/test/myfaces/OnLoadSpec.ts +52 -0
- package/src/main/typescript/test/queue/AsynchronousProbe.ts +5 -5
- package/src/main/typescript/test/queue/AsynchronousQueueTest.spec.ts +4 -3
- package/src/main/typescript/test/xhrCore/EventTests.spec.ts +28 -22
- package/src/main/typescript/test/xhrCore/FileUploadTest.spec.ts +5 -2
- package/src/main/typescript/test/xhrCore/NamespacesRequestTest.spec.ts +203 -0
- package/src/main/typescript/test/xhrCore/OamSubmitTest.spec.ts +177 -0
- package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +158 -17
- package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +320 -15
- package/src/main/typescript/test/xhrCore/RequestTest_23.spec.ts +45 -4
- package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +374 -35
- package/src/main/typescript/test/xhrCore/ResponseTest23.spec.ts +43 -9
- package/src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.ts +109 -0
- package/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts +67 -49
- package/src/main/typescript/test.xml +6 -0
- package/src/main/typescript/tsconfig.json +1 -1
- package/src/test/resources/jsf-development.js +1 -1
- package/src/tmp/test.html +12 -88
- package/target/api/_api.js +63 -21
- package/target/api/_api.js.map +1 -1
- package/target/api/jsf.js +11 -0
- package/target/api/jsf.js.map +1 -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/impl/AjaxImpl.js +177 -81
- package/target/impl/AjaxImpl.js.map +1 -1
- package/target/impl/PushImpl.js +66 -35
- package/target/impl/PushImpl.js.map +1 -1
- package/target/impl/core/Const.js +54 -39
- package/target/impl/core/Const.js.map +1 -1
- package/target/impl/core/Context.js +10 -0
- package/target/impl/core/Context.js.map +1 -0
- package/target/impl/util/Assertions.js +12 -7
- package/target/impl/util/Assertions.js.map +1 -1
- package/target/impl/util/AsyncQueue.js.map +1 -1
- package/target/impl/util/AsyncRunnable.js +60 -0
- package/target/impl/util/AsyncRunnable.js.map +1 -1
- package/target/impl/util/ExtDomQuery.js +66 -48
- package/target/impl/util/ExtDomQuery.js.map +1 -1
- package/target/impl/util/FileUtils.js +97 -0
- package/target/impl/util/FileUtils.js.map +1 -0
- package/target/impl/util/HiddenElementBuilder.js +7 -0
- package/target/impl/util/HiddenElementBuilder.js.map +1 -0
- package/target/impl/util/HiddenInputBuilder.js +83 -0
- package/target/impl/util/HiddenInputBuilder.js.map +1 -0
- package/target/{types/index.js → impl/util/IAsyncRunnable.js} +11 -2
- package/target/impl/util/IAsyncRunnable.js.map +1 -0
- package/target/impl/util/Lang.js +81 -31
- package/target/impl/util/Lang.js.map +1 -1
- package/target/impl/util/URLCodec.js +77 -0
- package/target/impl/util/URLCodec.js.map +1 -0
- package/target/impl/util/XhrQueueController.js +107 -0
- package/target/impl/util/XhrQueueController.js.map +1 -0
- package/target/impl/xhrCore/ErrorData.js +10 -8
- package/target/impl/xhrCore/ErrorData.js.map +1 -1
- package/target/impl/xhrCore/EventData.js +2 -2
- package/target/impl/xhrCore/EventData.js.map +1 -1
- package/target/impl/xhrCore/RequestContext.js +11 -0
- package/target/impl/xhrCore/RequestContext.js.map +1 -0
- package/target/impl/xhrCore/RequestDataResolver.js +70 -23
- package/target/impl/xhrCore/RequestDataResolver.js.map +1 -1
- package/target/impl/xhrCore/ResonseDataResolver.js +9 -9
- package/target/impl/xhrCore/ResonseDataResolver.js.map +1 -1
- package/target/impl/xhrCore/Response.js +44 -29
- package/target/impl/xhrCore/Response.js.map +1 -1
- package/target/impl/xhrCore/ResponseProcessor.js +187 -119
- package/target/impl/xhrCore/ResponseProcessor.js.map +1 -1
- package/target/impl/xhrCore/XhrFormData.js +82 -156
- package/target/impl/xhrCore/XhrFormData.js.map +1 -1
- package/target/impl/xhrCore/XhrQueHandler.js +11 -0
- package/target/impl/xhrCore/XhrQueHandler.js.map +1 -0
- package/target/impl/xhrCore/XhrQueueController.js +62 -0
- package/target/impl/xhrCore/XhrQueueController.js.map +1 -0
- package/target/impl/xhrCore/XhrRequest.js +94 -106
- package/target/impl/xhrCore/XhrRequest.js.map +1 -1
- package/target/myfaces/OamSubmit.js +25 -14
- package/target/myfaces/OamSubmit.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +124 -23
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/ExtendedArrayTest.spec.js +76 -0
- package/target/test/frameworkBase/_ext/monadish/ExtendedArrayTest.spec.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +4 -4
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +1 -1
- package/target/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js +925 -0
- package/target/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js +112 -0
- package/target/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js.map +1 -0
- package/target/test/frameworkBase/_ext/shared/StandardInits.js +103 -3
- package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js +37 -1
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -1
- package/target/test/impl/ImplTest.spec.js +2 -2
- package/target/test/impl/ImplTest.spec.js.map +1 -1
- package/target/test/impl/ImplTest_23.spec.js +2 -2
- package/target/test/impl/ImplTest_23.spec.js.map +1 -1
- package/target/test/myfaces/OnLoadSpec.js +57 -0
- package/target/test/myfaces/OnLoadSpec.js.map +1 -0
- package/target/test/queue/AsynchronousQueueTest.spec.js +3 -3
- package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -1
- package/target/test/xhrCore/EventTests.spec.js +26 -19
- package/target/test/xhrCore/EventTests.spec.js.map +1 -1
- package/target/test/xhrCore/FileUploadTest.spec.js +2 -1
- package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -1
- package/target/test/xhrCore/NamespacesRequestTest.spec.js +204 -0
- package/target/test/xhrCore/NamespacesRequestTest.spec.js.map +1 -0
- package/target/test/xhrCore/OamSubmitTest.spec.js +180 -0
- package/target/test/xhrCore/OamSubmitTest.spec.js.map +1 -0
- package/target/test/xhrCore/RequestParamsTest.spec.js +142 -10
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest.spec.js +288 -11
- package/target/test/xhrCore/RequestTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestTest_23.spec.js +40 -2
- package/target/test/xhrCore/RequestTest_23.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest.spec.js +315 -24
- package/target/test/xhrCore/ResponseTest.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest23.spec.js +38 -8
- package/target/test/xhrCore/ResponseTest23.spec.js.map +1 -1
- package/target/test/xhrCore/TobagoFileUploadTest.spec.js +128 -0
- package/target/test/xhrCore/TobagoFileUploadTest.spec.js.map +1 -0
- package/target/test/xhrCore/XhrFormDataTest.spec.js +57 -34
- package/target/test/xhrCore/XhrFormDataTest.spec.js.map +1 -1
- 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 +24 -0
- package/target/test-classes/jsf-development.js +3559 -0
- 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 +1 -0
- package/target/test-classes/jsf.js +3 -0
- package/target/test-classes/jsf.js.br +0 -0
- package/target/test-classes/jsf.js.gz +0 -0
- package/tmp.xml +36 -0
- package/.nyc_output/2303b649-59d9-485c-9228-73b0ec8787a7.json +0 -1
- package/.nyc_output/756f2f03-c85b-4cdb-9b92-5799eb45ef1e.json +0 -1
- package/.nyc_output/processinfo/2303b649-59d9-485c-9228-73b0ec8787a7.json +0 -1
- package/.nyc_output/processinfo/756f2f03-c85b-4cdb-9b92-5799eb45ef1e.json +0 -1
- package/src/main/typescript/impl/util/AsyncQueue.ts +0 -133
- package/src/main/typescript/test/frameworkBase/_ext/monadish/StreamTest.spec.ts +0 -231
- package/target/types/index.js.map +0 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
3
|
+
* this work for additional information regarding copyright ownership.
|
|
4
|
+
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
5
|
+
* (the "License"); you may not use this file except in compliance with
|
|
6
|
+
* the License. You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import {describe, it} from "mocha";
|
|
17
|
+
import * as sinon from "sinon";
|
|
18
|
+
import {expect} from "chai";
|
|
19
|
+
import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
20
|
+
import {DomQuery} from "mona-dish";
|
|
21
|
+
import {Implementation} from "../../impl/AjaxImpl";
|
|
22
|
+
import defaultFileForm = StandardInits.tobagoFileForm;
|
|
23
|
+
|
|
24
|
+
declare var faces: any;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* specialized tests testing the xhr core behavior when it hits the xmlHttpRequest object
|
|
28
|
+
*/
|
|
29
|
+
describe('Tests on the xhr core when it starts to call the request', function () {
|
|
30
|
+
beforeEach(async function () {
|
|
31
|
+
|
|
32
|
+
let waitForResult = defaultFileForm();
|
|
33
|
+
return waitForResult.then((close) => {
|
|
34
|
+
|
|
35
|
+
this.xhr = sinon.useFakeXMLHttpRequest();
|
|
36
|
+
this.requests = [];
|
|
37
|
+
|
|
38
|
+
this.respond = (response: string): XMLHttpRequest => {
|
|
39
|
+
let xhrReq = this.requests.shift();
|
|
40
|
+
xhrReq.responsetype = "text/xml";
|
|
41
|
+
xhrReq.respond(200, {'Content-Type': 'text/xml'}, response);
|
|
42
|
+
return xhrReq;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
this.xhr.onCreate = (xhr) => {
|
|
46
|
+
this.requests.push(xhr);
|
|
47
|
+
};
|
|
48
|
+
(<any>global).XMLHttpRequest = this.xhr;
|
|
49
|
+
window.XMLHttpRequest = this.xhr;
|
|
50
|
+
|
|
51
|
+
this.closeIt = () => {
|
|
52
|
+
(<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
53
|
+
Implementation.reset();
|
|
54
|
+
close();
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
});
|
|
59
|
+
afterEach(function () {
|
|
60
|
+
this.closeIt();
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it('tobago file upload', function (done) {
|
|
64
|
+
let send = sinon.spy(XMLHttpRequest.prototype, "send");
|
|
65
|
+
|
|
66
|
+
const POST = "POST";
|
|
67
|
+
|
|
68
|
+
try {
|
|
69
|
+
let fileUploadField = DomQuery.byId("page:fileAjax::field");
|
|
70
|
+
let actionElement = DomQuery.byId("page:fileAjax");
|
|
71
|
+
|
|
72
|
+
fileUploadField.addEventListener("change", (event: Event) => {
|
|
73
|
+
faces.ajax.request(
|
|
74
|
+
actionElement,
|
|
75
|
+
event,
|
|
76
|
+
{
|
|
77
|
+
"javax.faces.behavior.event": "change",
|
|
78
|
+
execute: 'page:fileAjax',
|
|
79
|
+
render: null
|
|
80
|
+
});
|
|
81
|
+
}).dispatchEvent(new Event("change"));
|
|
82
|
+
|
|
83
|
+
expect(this.requests.length).to.eq(1);
|
|
84
|
+
let request = this.requests[0];
|
|
85
|
+
expect(request.method).to.eq(POST);
|
|
86
|
+
expect(request.async).to.be.true;
|
|
87
|
+
expect(send.called).to.be.true;
|
|
88
|
+
expect(send.callCount).to.eq(1);
|
|
89
|
+
expect(request.requestBody instanceof FormData).to.be.true;
|
|
90
|
+
|
|
91
|
+
let formData: FormData = request.requestBody;
|
|
92
|
+
expect(formData.get("page::lastFocusId")).to.eq("");
|
|
93
|
+
expect(formData.get("org.apache.myfaces.tobago.webapp.Secret")).to.eq("secretValue");
|
|
94
|
+
expect(formData.get("javax.faces.ViewState")).to.eq("viewStateValue");
|
|
95
|
+
expect(formData.get("javax.faces.RenderKitId")).to.eq("tobago");
|
|
96
|
+
expect(formData.get("javax.faces.ClientWindow")).to.eq("clientWindowValue");
|
|
97
|
+
expect(formData.get("javax.faces.behavior.event")).to.eq("change");
|
|
98
|
+
expect(formData.get("jakarta.faces.partial.event")).to.eq("change");
|
|
99
|
+
expect(formData.get("jakarta.faces.source")).to.eq("page:fileAjax");
|
|
100
|
+
expect(formData.get("jakarta.faces.partial.ajax")).to.eq("true");
|
|
101
|
+
expect(formData.get("page::form")).to.eq("page::form");
|
|
102
|
+
expect(formData.get("jakarta.faces.partial.execute")).to.eq("page:fileAjax");
|
|
103
|
+
|
|
104
|
+
} finally {
|
|
105
|
+
send.restore();
|
|
106
|
+
}
|
|
107
|
+
done();
|
|
108
|
+
});
|
|
109
|
+
});
|
|
@@ -19,58 +19,75 @@ import {DQ} from "mona-dish";
|
|
|
19
19
|
import * as sinon from 'sinon';
|
|
20
20
|
import {XhrFormData} from "../../impl/xhrCore/XhrFormData";
|
|
21
21
|
import {expect} from "chai";
|
|
22
|
+
import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
23
|
+
import defaultMyFaces = StandardInits.defaultMyFaces;
|
|
24
|
+
import {Implementation} from "../../impl/AjaxImpl";
|
|
22
25
|
|
|
23
26
|
const jsdom = require("jsdom");
|
|
24
27
|
const {JSDOM} = jsdom;
|
|
25
28
|
|
|
26
29
|
describe('XhrFormData tests', function () {
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
31
|
+
beforeEach(async function () {
|
|
32
|
+
|
|
33
|
+
let waitForResult = defaultMyFaces();
|
|
34
|
+
|
|
35
|
+
return waitForResult.then((close) => {
|
|
36
|
+
|
|
37
|
+
this.xhr = sinon.useFakeXMLHttpRequest();
|
|
38
|
+
this.requests = [];
|
|
39
|
+
this.xhr.onCreate = (xhr) => {
|
|
40
|
+
this.requests.push(xhr);
|
|
41
|
+
};
|
|
42
|
+
(<any>global).XMLHttpRequest = this.xhr;
|
|
43
|
+
window.XMLHttpRequest = this.xhr;
|
|
44
|
+
|
|
45
|
+
this.jsfAjaxResponse = sinon.spy((<any>global).faces.ajax, "response");
|
|
46
|
+
|
|
47
|
+
this.closeIt = () => {
|
|
48
|
+
(<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
49
|
+
this.jsfAjaxResponse.restore();
|
|
50
|
+
Implementation.reset();
|
|
51
|
+
close();
|
|
52
|
+
}
|
|
53
|
+
});
|
|
48
54
|
});
|
|
49
55
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
56
|
+
beforeEach(function () {
|
|
57
|
+
|
|
58
|
+
let waitForResult = defaultMyFaces();
|
|
59
|
+
|
|
60
|
+
return waitForResult.then((close) => {
|
|
61
|
+
(<any>global).window = window;
|
|
62
|
+
(<any>global).body = window.document.body;
|
|
63
|
+
(<any>global).document = window.document;
|
|
64
|
+
global.body.innerHTML = `
|
|
65
|
+
<div id="id_1"></div>
|
|
66
|
+
<div id="id_2" booga="blarg"></div>
|
|
67
|
+
<div id="id_3"></div>
|
|
68
|
+
<div id="id_4"></div>
|
|
69
|
+
`;
|
|
70
|
+
(<any>global).navigator = {
|
|
71
|
+
language: "en-En"
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
this.xhr = sinon.useFakeXMLHttpRequest();
|
|
75
|
+
this.requests = [];
|
|
76
|
+
this.xhr.onCreate = (xhr) => {
|
|
77
|
+
this.requests.push(xhr);
|
|
78
|
+
};
|
|
79
|
+
(<any>global).XMLHttpRequest = this.xhr;
|
|
80
|
+
window.XMLHttpRequest = this.xhr;
|
|
81
|
+
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
this.afterEach(function () {
|
|
85
|
+
(<any>global).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it("must have multiple values for a name", function () {
|
|
90
|
+
window.document.body.innerHTML = `<form id="page::form">
|
|
74
91
|
<tobago-select-many-checkbox id="page:animals">
|
|
75
92
|
<label for="page:animals">Checkbox Group</label>
|
|
76
93
|
<label><input type="checkbox" name="page:animals" id="page:animals::0" value="Cat" checked="checked">Cat</label>
|
|
@@ -84,10 +101,11 @@ describe('XhrFormData tests', function () {
|
|
|
84
101
|
</div>
|
|
85
102
|
</form>`;
|
|
86
103
|
|
|
87
|
-
|
|
88
|
-
|
|
104
|
+
global.debugf2 = true;
|
|
105
|
+
const xhrFormData = new XhrFormData(DQ.byId("page::form"));
|
|
106
|
+
const formData = xhrFormData.toString();
|
|
89
107
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
108
|
+
expect(formData).to.contain("animals=Cat");
|
|
109
|
+
expect(formData).to.contain("animals=Fox");
|
|
110
|
+
});
|
|
93
111
|
});
|
|
@@ -3121,7 +3121,7 @@ var XhrFormData = /** @class */ (function (_super) {
|
|
|
3121
3121
|
*/
|
|
3122
3122
|
XhrFormData.prototype.assignEncodedString = function (encoded) {
|
|
3123
3123
|
var keyValueEntries = decodeURIComponent(encoded).split(/&/gi);
|
|
3124
|
-
this.
|
|
3124
|
+
this.assignKeyValueEntries(keyValueEntries);
|
|
3125
3125
|
};
|
|
3126
3126
|
XhrFormData.prototype.assignString = function (keyValueEntries) {
|
|
3127
3127
|
var toMerge = new mona_dish_1.Config({});
|
package/src/tmp/test.html
CHANGED
|
@@ -1,92 +1,16 @@
|
|
|
1
|
-
<h2>protocol testcase1</h2>
|
|
2
|
-
|
|
3
|
-
<div id="centerDiv">
|
|
4
|
-
|
|
5
|
-
<h1>Selenium Testprobe for insert update delete and attribute change</h1>
|
|
6
|
-
|
|
7
|
-
<h2>This test tests all aspects of the protocol, under xhr and iframe conditions</h2>
|
|
8
|
-
|
|
9
|
-
<div id="testResults">
|
|
10
|
-
|
|
11
|
-
<h3>Test Results</h3>
|
|
12
|
-
|
|
13
|
-
<div id="evalarea1">booga</div>
|
|
14
|
-
|
|
15
|
-
<div id="evalarea2">eval area 2 triggered by update</div>
|
|
16
|
-
|
|
17
|
-
<div id="evalarea3">eval area 3 triggered by insert</div>
|
|
18
|
-
|
|
19
|
-
<div id="evalarea4">eval area 4 triggered by a click on the changed attributes area</div>
|
|
20
|
-
|
|
21
|
-
<div id="changesArea">update insert area</div>
|
|
22
|
-
|
|
23
|
-
<div id="deleteable">delete area will be deleted once you press the delete button</div>
|
|
24
|
-
|
|
25
|
-
<div id="attributeChange">attributes changes area</div>
|
|
26
|
-
|
|
27
|
-
<div id="resource_area_1"></div>
|
|
28
|
-
<div id="resource_area_2"></div>
|
|
29
|
-
<div id="resource_area_3"></div>
|
|
30
|
-
<script nonce="test12d3" type="text/javascript" src="../../../xhrCore/fixtures/nonce_script.js"></script>
|
|
31
|
-
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
<h2>Call actions via normal ppr</h2>
|
|
35
|
-
|
|
36
|
-
<form id="form1" action="./test.mockup">
|
|
37
|
-
|
|
38
|
-
<input type="hidden" id="jakarta.faces.ViewState" name="jakarta.faces.ViewState" value="blubbblubblubb">
|
|
39
|
-
|
|
40
|
-
<input type="button" id="cmd_eval" value="eval"
|
|
41
|
-
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'eval1');">
|
|
42
|
-
|
|
43
|
-
<input type="button" id="cmd_update_insert" value="update insert"
|
|
44
|
-
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'updateinsert1');">
|
|
45
|
-
|
|
46
|
-
<input type="button" id="cmd_simple_resource" value="simple resource"
|
|
47
|
-
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'simpleresource');">
|
|
48
|
-
|
|
49
|
-
<input type="button" id="cmd_complex_resource" value="complex resource"
|
|
50
|
-
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'complex_resource');">
|
|
51
|
-
|
|
52
|
-
<input type="button" id="cmd_complex_resource2" value="complex resource2"
|
|
53
|
-
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'complex_resource2');">
|
|
54
|
-
|
|
55
|
-
<input type="button" id="cmd_update_insert2" value="update insert second protocol path"
|
|
56
|
-
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'updateinsert2');">
|
|
57
|
-
|
|
58
|
-
<input type="button" id="cmd_delete" value="delete"
|
|
59
|
-
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'delete1');">
|
|
60
|
-
|
|
61
|
-
<input type="button" id="cmd_replace" value="Replace Body"
|
|
62
|
-
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'body_replace1');">
|
|
63
|
-
|
|
64
|
-
<input type="button" id="cmd_attributeschange" value="change attributes"
|
|
65
|
-
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'attributes');">
|
|
66
|
-
|
|
67
|
-
<input type="button" id="cmd_illegalresponse" value="illegal response, error trigger"
|
|
68
|
-
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'illegalResponse');">
|
|
69
|
-
|
|
70
|
-
<input type="button" id="cmd_viewstate" value="Viewstate only update trigger"
|
|
71
|
-
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'viewstate');">
|
|
72
|
-
|
|
73
|
-
<input type="button" id="cmd_error" value="Server error with error response"
|
|
74
|
-
onclick="emitPPR(this, ('undefined' == typeof event)? null: event, 'errors');">
|
|
75
|
-
|
|
76
|
-
<input type="button" id="cmd_error_component" value="Error: no component given"
|
|
77
|
-
onclick="(window.faces || window.jsf).ajax.request(null, event, {}); return false">
|
|
78
1
|
|
|
2
|
+
<div id="viewroot_1">
|
|
3
|
+
<form id="viewroot_1:form1">
|
|
4
|
+
<button type="submit" id="viewroot_1:submit_1"></button>
|
|
5
|
+
<input type="hidden" id="viewroot_1:form1:jakarta.faces.ViewState:1" name="jakarta.faces.ViewState" value="updatedVST">
|
|
79
6
|
</form>
|
|
7
|
+
<form id="viewroot_1:form2">
|
|
8
|
+
<button type="submit" id="viewroot_1:submit_2"></button>
|
|
9
|
+
</form>
|
|
10
|
+
</div>
|
|
80
11
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
function emitPPR(source, event, action, useIframe, formName) {
|
|
87
|
-
document.getElementById(formName || "form1").action = target;
|
|
88
|
-
|
|
89
|
-
(window?.faces ?? window.jsf).ajax.request(/*String|Dom Node*/ source, /*|EVENT|*/ (window.event) ? window.event : event, /*{|OPTIONS|}*/ {op: action});
|
|
90
|
-
}
|
|
91
|
-
</script>
|
|
12
|
+
<div id="viewroot_2">
|
|
13
|
+
<form id="viewroot_2:form1">
|
|
14
|
+
<button type="submit" id="viewroot_1:submit_2"></button>
|
|
15
|
+
</form>
|
|
92
16
|
</div>
|
package/target/api/_api.js
CHANGED
|
@@ -47,9 +47,9 @@ var faces;
|
|
|
47
47
|
faces.implversion = 0;
|
|
48
48
|
/**
|
|
49
49
|
* SeparatorChar as defined by facesContext.getNamingContainerSeparatorChar()
|
|
50
|
-
* @type {Char}
|
|
51
50
|
*/
|
|
52
51
|
faces.separatorchar = getSeparatorChar();
|
|
52
|
+
// noinspection JSUnusedGlobalSymbols
|
|
53
53
|
/**
|
|
54
54
|
* Context Path as defined externalContext.requestContextPath
|
|
55
55
|
*/
|
|
@@ -95,7 +95,7 @@ var faces;
|
|
|
95
95
|
return AjaxImpl_1.Implementation.getClientWindow(rootNode);
|
|
96
96
|
}
|
|
97
97
|
faces.getClientWindow = getClientWindow;
|
|
98
|
-
//private helper functions
|
|
98
|
+
// private helper functions
|
|
99
99
|
function getSeparatorChar() {
|
|
100
100
|
const sep = '#{facesContext.namingContainerSeparatorChar}';
|
|
101
101
|
//We now enable standalone mode, the separator char was not mapped we make a fallback to 2.3 behavior
|
|
@@ -151,7 +151,7 @@ var faces;
|
|
|
151
151
|
* <li> eventData.responseXML: the requestInternal response xml </li>
|
|
152
152
|
* </ul>
|
|
153
153
|
*
|
|
154
|
-
* @param
|
|
154
|
+
* @param errorFunc error handler must be of the format <i>function errorListener(<errorData>)</i>
|
|
155
155
|
*/
|
|
156
156
|
function addOnError(errorFunc) {
|
|
157
157
|
AjaxImpl_1.Implementation.addOnError(errorFunc);
|
|
@@ -161,7 +161,7 @@ var faces;
|
|
|
161
161
|
* Adds a global event listener to the ajax event queue. The event listener must be a function
|
|
162
162
|
* of following format: <i>function eventListener(<eventData>)</i>
|
|
163
163
|
*
|
|
164
|
-
* @param
|
|
164
|
+
* @param eventFunc event must be of the format <i>function eventListener(<eventData>)</i>
|
|
165
165
|
*/
|
|
166
166
|
function addOnEvent(eventFunc) {
|
|
167
167
|
AjaxImpl_1.Implementation.addOnEvent(eventFunc);
|
|
@@ -176,7 +176,7 @@ var faces;
|
|
|
176
176
|
* if any of the code returns false, the execution
|
|
177
177
|
* is terminated prematurely skipping the rest of the code!
|
|
178
178
|
*
|
|
179
|
-
* @param {
|
|
179
|
+
* @param {HTMLElement | String} source, the callee object
|
|
180
180
|
* @param {Event} event, the event object of the callee event triggering this function
|
|
181
181
|
* @param funcs ... arbitrary array of functions or strings
|
|
182
182
|
* @returns true if the chain has succeeded false otherwise
|
|
@@ -189,19 +189,24 @@ var faces;
|
|
|
189
189
|
let push;
|
|
190
190
|
(function (push) {
|
|
191
191
|
/**
|
|
192
|
-
* @param
|
|
193
|
-
* @param
|
|
194
|
-
* @param
|
|
195
|
-
* @param
|
|
192
|
+
* @param socketClientId the sockets client identifier
|
|
193
|
+
* @param url the uri to reach the socket
|
|
194
|
+
* @param channel the channel name/id
|
|
195
|
+
* @param onopen The function to be invoked when the web socket is opened.
|
|
196
|
+
* @param onmessage The function to be invoked when a message is received.
|
|
197
|
+
* @param onerror The function to be invoked when an error occurs.
|
|
198
|
+
* @param onclose The function to be invoked when the web socket is closed.
|
|
199
|
+
* @param behaviors functions which are invoked whenever a message is received
|
|
200
|
+
* @param autoConnect Whether or not to automatically open the socket. Defaults to <code>false</code>.
|
|
196
201
|
*/
|
|
197
|
-
function init(socketClientId,
|
|
198
|
-
PushImpl_1.PushImpl.init(socketClientId,
|
|
202
|
+
function init(socketClientId, url, channel, onopen, onmessage, onerror, onclose, behaviors, autoConnect) {
|
|
203
|
+
PushImpl_1.PushImpl.init(socketClientId, url, channel, onopen, onmessage, onerror, onclose, behaviors, autoConnect);
|
|
199
204
|
}
|
|
200
205
|
push.init = init;
|
|
201
206
|
/**
|
|
202
207
|
* Open the web socket on the given channel.
|
|
203
|
-
* @param
|
|
204
|
-
* @throws
|
|
208
|
+
* @param socketClientId The name of the web socket channel.
|
|
209
|
+
* @throws Error is thrown, if the channel is unknown.
|
|
205
210
|
*/
|
|
206
211
|
function open(socketClientId) {
|
|
207
212
|
PushImpl_1.PushImpl.open(socketClientId);
|
|
@@ -209,8 +214,8 @@ var faces;
|
|
|
209
214
|
push.open = open;
|
|
210
215
|
/**
|
|
211
216
|
* Close the web socket on the given channel.
|
|
212
|
-
* @param
|
|
213
|
-
* @throws
|
|
217
|
+
* @param socketClientId The id of the web socket client.
|
|
218
|
+
* @throws Error is thrown, if the channel is unknown.
|
|
214
219
|
*/
|
|
215
220
|
function close(socketClientId) {
|
|
216
221
|
PushImpl_1.PushImpl.close(socketClientId);
|
|
@@ -229,23 +234,60 @@ var myfaces;
|
|
|
229
234
|
* @param event the event
|
|
230
235
|
* @param eventName event name for java.jakarta.faces.behavior.evemnt
|
|
231
236
|
* @param execute execute list as passed down in faces.ajax.request
|
|
232
|
-
* @param render
|
|
233
|
-
* @param options
|
|
237
|
+
* @param render the render list as string
|
|
238
|
+
* @param options the options which need to be mered in
|
|
234
239
|
*/
|
|
235
240
|
function ab(source, event, eventName, execute, render, options = {}) {
|
|
236
|
-
var _a;
|
|
241
|
+
var _a, _b;
|
|
237
242
|
if (eventName) {
|
|
238
|
-
options[(0
|
|
243
|
+
options[Const_1.CTX_OPTIONS_PARAMS] = (_a = options === null || options === void 0 ? void 0 : options[Const_1.CTX_OPTIONS_PARAMS]) !== null && _a !== void 0 ? _a : {};
|
|
244
|
+
options[Const_1.CTX_OPTIONS_PARAMS][(0, Const_1.$nsp)(Const_1.P_BEHAVIOR_EVENT)] = eventName;
|
|
239
245
|
}
|
|
240
246
|
if (execute) {
|
|
241
|
-
options[Const_1.
|
|
247
|
+
options[Const_1.CTX_OPTIONS_EXECUTE] = execute;
|
|
242
248
|
}
|
|
243
249
|
if (render) {
|
|
244
250
|
options[Const_1.CTX_PARAM_RENDER] = render;
|
|
245
251
|
}
|
|
246
|
-
((
|
|
252
|
+
((_b = window === null || window === void 0 ? void 0 : window.faces) !== null && _b !== void 0 ? _b : window.jsf).ajax.request(source, event, options);
|
|
247
253
|
}
|
|
248
254
|
myfaces.ab = ab;
|
|
255
|
+
const onReadyChain = [];
|
|
256
|
+
let readyStateListener = null;
|
|
257
|
+
// noinspection JSUnusedGlobalSymbols
|
|
258
|
+
/**
|
|
259
|
+
* Helper function in the myfaces namespace to handle document ready properly for the load case
|
|
260
|
+
* the ajax case, does not need proper treatment, since it is deferred anyway.
|
|
261
|
+
* Used by command script as helper function!
|
|
262
|
+
*
|
|
263
|
+
* @param executionFunc the function to be executed upon ready
|
|
264
|
+
*/
|
|
265
|
+
function onDomReady(executionFunc) {
|
|
266
|
+
if (document.readyState !== "complete") {
|
|
267
|
+
onReadyChain.push(executionFunc);
|
|
268
|
+
if (!readyStateListener) {
|
|
269
|
+
readyStateListener = () => {
|
|
270
|
+
window.removeEventListener("DOMContentLoaded", readyStateListener);
|
|
271
|
+
readyStateListener = null;
|
|
272
|
+
try {
|
|
273
|
+
onReadyChain.forEach(func => func());
|
|
274
|
+
}
|
|
275
|
+
finally {
|
|
276
|
+
//done we clear now the ready chain
|
|
277
|
+
onReadyChain.length = 0;
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
window.addEventListener("DOMContentLoaded", readyStateListener);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
if (readyStateListener) {
|
|
285
|
+
readyStateListener();
|
|
286
|
+
}
|
|
287
|
+
executionFunc();
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
myfaces.onDomReady = onDomReady;
|
|
249
291
|
/**
|
|
250
292
|
* legacy oam functions
|
|
251
293
|
*/
|
package/target/api/_api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_api.js","sourceRoot":"","sources":["../../src/main/typescript/api/_api.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,+CAAgD;AAChD,+CAA0C;AAC1C,oDAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"_api.js","sourceRoot":"","sources":["../../src/main/typescript/api/_api.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,+CAAgD;AAChD,+CAA0C;AAC1C,oDAAiD;AACjD,8CAAqH;AAIrH,4EAA4E;AAC5E,yBAAyB;AACzB,IAAc,KAAK,CAuNlB;AAvND,WAAc,KAAK;IAGf;;;;;;;;;;OAUG;IACQ,iBAAW,GAAG,MAAM,CAAC;IAChC;;;;;;;OAOG;IACQ,iBAAW,GAAG,CAAC,CAAC;IAE3B;;OAEG;IACQ,mBAAa,GAAW,gBAAgB,EAAE,CAAC;IAEtD,qCAAqC;IACrC;;OAEG;IACQ,iBAAW,GAAW,oDAAoD,CAAC;IACtF,0CAA0C;IAE1C;;;;;;;;;;;;;;OAcG;IACH,SAAgB,eAAe;QAC3B,OAAO,yBAAc,CAAC,eAAe,EAAE,CAAC;IAC5C,CAAC;IAFe,qBAAe,kBAE9B,CAAA;IAED;;;;;;;OAOG;IACH,SAAgB,YAAY,CAAC,WAA6B;QACtD,OAAO,yBAAc,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IACpD,CAAC;IAFe,kBAAY,eAE3B,CAAA;IAED;;;;OAIG;IACH,SAAgB,eAAe,CAAC,QAA2B;QACvD,OAAO,yBAAc,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IACpD,CAAC;IAFe,qBAAe,kBAE9B,CAAA;IAED,2BAA2B;IAC3B,SAAS,gBAAgB;QACrB,MAA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B,CAAC,EApEa,OAAO,GAAP,eAAO,KAAP,eAAO,QAoEpB"}
|
package/target/api/jsf.js
CHANGED
|
@@ -28,6 +28,17 @@ if (!(window === null || window === void 0 ? void 0 : window.jsf)) {
|
|
|
28
28
|
window['jsf'] = (_a = window === null || window === void 0 ? void 0 : window.jsf) !== null && _a !== void 0 ? _a : faces;
|
|
29
29
|
window.jsf.specversion = 230000;
|
|
30
30
|
delete window.jsf.contextpath;
|
|
31
|
+
let faces4Init = faces.push.init;
|
|
32
|
+
/*
|
|
33
|
+
* we shim back the breaking api change from 3.0 to 4.0
|
|
34
|
+
* onerror is gone
|
|
35
|
+
*/
|
|
36
|
+
faces.push.init = (socketClientId, url, channel, onopen, onmessage,
|
|
37
|
+
// no on error api change for 4.0
|
|
38
|
+
//onerror: Function,
|
|
39
|
+
onclose, behaviors, autoConnect) => {
|
|
40
|
+
faces4Init(socketClientId, url, channel, onopen, onmessage, null, onclose, behaviors, autoConnect);
|
|
41
|
+
};
|
|
31
42
|
}
|
|
32
43
|
if (!((_b = window === null || window === void 0 ? void 0 : window.myfaces) === null || _b === void 0 ? void 0 : _b.ab)) {
|
|
33
44
|
const myfaces = require("./_api").myfaces;
|
package/target/api/jsf.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsf.js","sourceRoot":"","sources":["../../src/main/typescript/api/jsf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,YAAY,CAAC;;;;AACb;;;;;GAKG;AACH,IAAG,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,GAAG,CAAA,EAAE;IACb,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;IACrC,MAAc,CAAC,KAAK,CAAC,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,GAAG,mCAAI,KAAK,CAAC;IAC9C,MAAM,CAAC,GAAG,CAAC,WAAW,GAAG,MAAM,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