@esri/solution-simple-types 1.1.2 → 1.2.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/dist/esm/dashboard.d.ts +0 -1
- package/dist/esm/dashboard.js +55 -56
- package/dist/esm/dashboard.js.map +1 -1
- package/dist/esm/helpers/convert-item-to-template.d.ts +3 -2
- package/dist/esm/helpers/convert-item-to-template.js +35 -37
- package/dist/esm/helpers/convert-item-to-template.js.map +1 -1
- package/dist/esm/helpers/create-item-from-template.js +33 -41
- package/dist/esm/helpers/create-item-from-template.js.map +1 -1
- package/dist/esm/helpers/update-notebook-data.js +1 -1
- package/dist/esm/helpers/update-notebook-data.js.map +1 -1
- package/dist/esm/notebook.d.ts +3 -2
- package/dist/esm/notebook.js +16 -15
- package/dist/esm/notebook.js.map +1 -1
- package/dist/esm/oic.d.ts +3 -2
- package/dist/esm/oic.js +30 -29
- package/dist/esm/oic.js.map +1 -1
- package/dist/esm/quickcapture.d.ts +3 -2
- package/dist/esm/quickcapture.js +22 -21
- package/dist/esm/quickcapture.js.map +1 -1
- package/dist/esm/simple-types.d.ts +3 -2
- package/dist/esm/simple-types.js +4 -3
- package/dist/esm/simple-types.js.map +1 -1
- package/dist/esm/webmap.d.ts +3 -2
- package/dist/esm/webmap.js +39 -39
- package/dist/esm/webmap.js.map +1 -1
- package/dist/esm/webmappingapplication.d.ts +3 -2
- package/dist/esm/webmappingapplication.js +126 -128
- package/dist/esm/webmappingapplication.js.map +1 -1
- package/dist/esm/workforce.d.ts +3 -2
- package/dist/esm/workforce.js +4 -3
- package/dist/esm/workforce.js.map +1 -1
- package/dist/node/dashboard.d.ts +0 -1
- package/dist/node/dashboard.js +56 -57
- package/dist/node/dashboard.js.map +1 -1
- package/dist/node/helpers/convert-item-to-template.d.ts +3 -2
- package/dist/node/helpers/convert-item-to-template.js +43 -45
- package/dist/node/helpers/convert-item-to-template.js.map +1 -1
- package/dist/node/helpers/create-item-from-template.js +37 -45
- package/dist/node/helpers/create-item-from-template.js.map +1 -1
- package/dist/node/helpers/notebook-helpers.js +3 -3
- package/dist/node/helpers/notebook-helpers.js.map +1 -1
- package/dist/node/helpers/quickcapture-helpers.js +2 -2
- package/dist/node/helpers/quickcapture-helpers.js.map +1 -1
- package/dist/node/helpers/simple-type-helpers.js +2 -2
- package/dist/node/helpers/simple-type-helpers.js.map +1 -1
- package/dist/node/helpers/update-notebook-data.js +2 -2
- package/dist/node/helpers/update-notebook-data.js.map +1 -1
- package/dist/node/index.js +6 -6
- package/dist/node/index.js.map +1 -1
- package/dist/node/notebook.d.ts +3 -2
- package/dist/node/notebook.js +18 -17
- package/dist/node/notebook.js.map +1 -1
- package/dist/node/oic.d.ts +3 -2
- package/dist/node/oic.js +31 -30
- package/dist/node/oic.js.map +1 -1
- package/dist/node/quickcapture.d.ts +3 -2
- package/dist/node/quickcapture.js +24 -23
- package/dist/node/quickcapture.js.map +1 -1
- package/dist/node/simple-types.d.ts +3 -2
- package/dist/node/simple-types.js +9 -8
- package/dist/node/simple-types.js.map +1 -1
- package/dist/node/webmap.d.ts +3 -2
- package/dist/node/webmap.js +40 -40
- package/dist/node/webmap.js.map +1 -1
- package/dist/node/webmappingapplication.d.ts +3 -2
- package/dist/node/webmappingapplication.js +127 -129
- package/dist/node/webmappingapplication.js.map +1 -1
- package/dist/node/workforce.d.ts +3 -2
- package/dist/node/workforce.js +5 -4
- package/dist/node/workforce.js.map +1 -1
- package/dist/umd/dashboard.d.ts +0 -1
- package/dist/umd/helpers/convert-item-to-template.d.ts +3 -2
- package/dist/umd/notebook.d.ts +3 -2
- package/dist/umd/oic.d.ts +3 -2
- package/dist/umd/quickcapture.d.ts +3 -2
- package/dist/umd/simple-types.d.ts +3 -2
- package/dist/umd/simple-types.umd.js +2142 -2152
- package/dist/umd/simple-types.umd.js.map +1 -1
- package/dist/umd/simple-types.umd.min.js +3 -3
- package/dist/umd/simple-types.umd.min.js.map +1 -1
- package/dist/umd/webmap.d.ts +3 -2
- package/dist/umd/webmappingapplication.d.ts +3 -2
- package/dist/umd/workforce.d.ts +3 -2
- package/package.json +23 -23
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-item-to-template.js","sourceRoot":"","sources":["../../../src/helpers/convert-item-to-template.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"convert-item-to-template.js","sourceRoot":"","sources":["../../../src/helpers/convert-item-to-template.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,gDAAgD;AAChD,0CAA0C;AAC1C,wCAAwC;AACxC,8BAA8B;AAC9B,gDAAgD;AAChD,oCAAoC;AACpC,kEAAkE;AAClE,0CAA0C;AAE1C;;;;;;;;;;GAUG;AACH,SAAgB,qBAAqB,CACnC,cAAsB,EACtB,QAAa,EACb,kBAAsC,EACtC,iBAAqC,EACrC,kBAAuB;IAEvB,OAAO,IAAI,OAAO,CAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3D,gBAAgB;QAChB,MAAM,YAAY,GAAyB,MAAM,CAAC,6BAA6B,CAC7E,QAAQ,CACT,CAAC;QAEF,uCAAuC;QACvC,YAAY,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,cAAc,CAC1C,YAAY,CAAC,IAAI,CAAC,EAAE,EACpB,YAAY,CAAC,IAAI,CAAC,EAAE,EACpB,SAAS,CACV,CAAC;QAEF,wBAAwB;QACxB,MAAM,cAAc,GAAG,MAAM,CAAC,kCAAkC,CAC9D,YAAY,CAAC,MAAM,EACnB,SAAS,EACT,iBAAiB,CAClB,CAAC;QAEF,iCAAiC;QACjC,IAAI,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACtC,QAAQ,QAAQ,CAAC,IAAI,EAAE;YACrB,KAAK,WAAW,CAAC;YACjB,KAAK,oBAAoB,CAAC;YAC1B,KAAK,iBAAiB,CAAC;YACvB,KAAK,gBAA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,CACb,CAAC;oBACF,MAAM;aACT;YAED,aAAa,CAAC,IAAI,CAChB,GAAG,EAAE;gBACH,wBAAwB,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,CAC3C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CACzB,CAAC;YACJ,CAAC,EACD,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAChC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AA/LD,sDA+LC"}
|
|
@@ -16,12 +16,12 @@ exports.createItemFromTemplate = void 0;
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const common = require("@esri/solution-common");
|
|
20
|
+
const notebook = require("../notebook");
|
|
21
|
+
const webmappingapplication = require("../webmappingapplication");
|
|
22
|
+
const workforce = require("../workforce");
|
|
23
23
|
function createItemFromTemplate(template, templateDictionary, destinationAuthentication, itemProgressCallback) {
|
|
24
|
-
return new Promise(
|
|
24
|
+
return new Promise(resolve => {
|
|
25
25
|
// Interrupt process if progress callback returns `false`
|
|
26
26
|
if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Started, 0)) {
|
|
27
27
|
itemProgressCallback(template.itemId, common.EItemProgressStatus.Ignored, 0);
|
|
@@ -29,59 +29,55 @@ function createItemFromTemplate(template, templateDictionary, destinationAuthent
|
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
31
31
|
// Replace the templatized symbols in a copy of the template
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
let newItemTemplate = common.cloneObject(template);
|
|
33
|
+
newItemTemplate = common.replaceInTemplate(newItemTemplate, templateDictionary);
|
|
34
34
|
// Create the item, then update its URL with its new id
|
|
35
35
|
// some fieldnames are used as keys for objects
|
|
36
36
|
// when we templatize field references for web applications we first stringify the components of the
|
|
37
37
|
// web application that could contain field references and then serach for them with a regular expression.
|
|
38
38
|
// We also need to stringify the web application when de-templatizing so it will find all of these occurrences as well.
|
|
39
39
|
if (template.type === "Web Mapping Application" && template.data) {
|
|
40
|
-
|
|
40
|
+
newItemTemplate = JSON.parse(common.replaceInTemplate(JSON.stringify(newItemTemplate), templateDictionary));
|
|
41
41
|
}
|
|
42
42
|
if (template.item.thumbnail) {
|
|
43
|
-
|
|
43
|
+
newItemTemplate.item.thumbnail = template.item.thumbnail; // make sure that our File is still there
|
|
44
44
|
}
|
|
45
45
|
common
|
|
46
|
-
.createItemWithData(
|
|
47
|
-
.then(
|
|
46
|
+
.createItemWithData(newItemTemplate.item, newItemTemplate.data, destinationAuthentication, templateDictionary.folderId)
|
|
47
|
+
.then(createResponse => {
|
|
48
48
|
// Interrupt process if progress callback returns `false`
|
|
49
49
|
if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Created, template.estimatedDeploymentCostFactor / 2, createResponse.id)) {
|
|
50
50
|
itemProgressCallback(template.itemId, common.EItemProgressStatus.Cancelled, 0);
|
|
51
51
|
common
|
|
52
52
|
.removeItem(createResponse.id, destinationAuthentication)
|
|
53
|
-
.then(
|
|
54
|
-
return resolve(common.generateEmptyCreationResponse(template.type));
|
|
55
|
-
}, function () {
|
|
56
|
-
return resolve(common.generateEmptyCreationResponse(template.type));
|
|
57
|
-
});
|
|
53
|
+
.then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
|
|
58
54
|
}
|
|
59
55
|
else {
|
|
60
56
|
// Add the new item to the settings
|
|
61
57
|
templateDictionary[template.itemId] = {
|
|
62
58
|
itemId: createResponse.id
|
|
63
59
|
};
|
|
64
|
-
|
|
60
|
+
newItemTemplate.itemId = createResponse.id;
|
|
65
61
|
// Set the appItemId manually to get around cases where the path was incorrectly set
|
|
66
62
|
// in legacy deployments
|
|
67
|
-
if (
|
|
63
|
+
if (newItemTemplate.type === "Web Mapping Application" &&
|
|
68
64
|
template.data) {
|
|
69
|
-
common.setProp(
|
|
65
|
+
common.setProp(newItemTemplate, "data.appItemId", createResponse.id);
|
|
70
66
|
}
|
|
71
|
-
|
|
67
|
+
const postProcess = common.hasUnresolvedVariables(newItemTemplate.data);
|
|
72
68
|
// Update the template again now that we have the new item id
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
const originalURL = newItemTemplate.item.url;
|
|
70
|
+
newItemTemplate = common.replaceInTemplate(newItemTemplate, templateDictionary);
|
|
75
71
|
// Update relationships
|
|
76
|
-
|
|
77
|
-
if (
|
|
72
|
+
let relationshipsDef = Promise.resolve([]);
|
|
73
|
+
if (newItemTemplate.relatedItems) {
|
|
78
74
|
// Templatize references in relationships obj
|
|
79
|
-
|
|
75
|
+
const updatedRelatedItems = common.replaceInTemplate(common.templatizeIds(newItemTemplate.relatedItems), templateDictionary);
|
|
80
76
|
// Add the relationships
|
|
81
|
-
relationshipsDef = common.addForwardItemRelationships(
|
|
77
|
+
relationshipsDef = common.addForwardItemRelationships(newItemTemplate.itemId, updatedRelatedItems, destinationAuthentication);
|
|
82
78
|
}
|
|
83
79
|
// Check for extra processing for web mapping application et al.
|
|
84
|
-
|
|
80
|
+
let customProcDef;
|
|
85
81
|
if (template.type === "Web Mapping Application" &&
|
|
86
82
|
template.data &&
|
|
87
83
|
common.hasAnyKeyword(template, [
|
|
@@ -90,51 +86,47 @@ function createItemFromTemplate(template, templateDictionary, destinationAuthent
|
|
|
90
86
|
"Web AppBuilder"
|
|
91
87
|
])) {
|
|
92
88
|
// If this is a Web AppBuilder application, we will create a Code Attachment for downloading
|
|
93
|
-
customProcDef = webmappingapplication.fineTuneCreatedItem(template,
|
|
89
|
+
customProcDef = webmappingapplication.fineTuneCreatedItem(template, newItemTemplate, templateDictionary, destinationAuthentication);
|
|
94
90
|
}
|
|
95
91
|
else if (template.type === "Workforce Project") {
|
|
96
|
-
customProcDef = workforce.fineTuneCreatedItem(
|
|
92
|
+
customProcDef = workforce.fineTuneCreatedItem(newItemTemplate, destinationAuthentication, templateDictionary);
|
|
97
93
|
}
|
|
98
94
|
else if (template.type === "Notebook") {
|
|
99
|
-
customProcDef = notebook.fineTuneCreatedItem(template,
|
|
95
|
+
customProcDef = notebook.fineTuneCreatedItem(template, newItemTemplate, templateDictionary, destinationAuthentication);
|
|
100
96
|
}
|
|
101
|
-
else if (originalURL !==
|
|
97
|
+
else if (originalURL !== newItemTemplate.item.url) {
|
|
102
98
|
// For web mapping applications that are not Web AppBuilder apps
|
|
103
|
-
customProcDef = new Promise(
|
|
99
|
+
customProcDef = new Promise((resolve2, reject2) => {
|
|
104
100
|
common
|
|
105
|
-
.updateItemURL(createResponse.id,
|
|
106
|
-
.then(
|
|
101
|
+
.updateItemURL(createResponse.id, newItemTemplate.item.url, destinationAuthentication)
|
|
102
|
+
.then(() => resolve2(), reject2);
|
|
107
103
|
});
|
|
108
104
|
}
|
|
109
105
|
else {
|
|
110
106
|
customProcDef = Promise.resolve(null);
|
|
111
107
|
}
|
|
112
|
-
Promise.all([relationshipsDef, customProcDef]).then(
|
|
108
|
+
Promise.all([relationshipsDef, customProcDef]).then(() => {
|
|
113
109
|
// Interrupt process if progress callback returns `false`
|
|
114
110
|
if (!itemProgressCallback(template.itemId, common.EItemProgressStatus.Finished, template.estimatedDeploymentCostFactor / 2, createResponse.id)) {
|
|
115
111
|
itemProgressCallback(template.itemId, common.EItemProgressStatus.Cancelled, 0);
|
|
116
112
|
common
|
|
117
113
|
.removeItem(createResponse.id, destinationAuthentication)
|
|
118
|
-
.then(
|
|
119
|
-
return resolve(common.generateEmptyCreationResponse(template.type));
|
|
120
|
-
}, function () {
|
|
121
|
-
return resolve(common.generateEmptyCreationResponse(template.type));
|
|
122
|
-
});
|
|
114
|
+
.then(() => resolve(common.generateEmptyCreationResponse(template.type)), () => resolve(common.generateEmptyCreationResponse(template.type)));
|
|
123
115
|
}
|
|
124
116
|
else {
|
|
125
117
|
resolve({
|
|
126
|
-
item:
|
|
118
|
+
item: newItemTemplate,
|
|
127
119
|
id: createResponse.id,
|
|
128
|
-
type:
|
|
129
|
-
postProcess:
|
|
120
|
+
type: newItemTemplate.type,
|
|
121
|
+
postProcess: postProcess
|
|
130
122
|
});
|
|
131
123
|
}
|
|
132
|
-
},
|
|
124
|
+
}, () => {
|
|
133
125
|
itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
|
|
134
126
|
resolve(common.generateEmptyCreationResponse(template.type)); // fails to deploy all resources to the item
|
|
135
127
|
});
|
|
136
128
|
}
|
|
137
|
-
},
|
|
129
|
+
}, () => {
|
|
138
130
|
itemProgressCallback(template.itemId, common.EItemProgressStatus.Failed, 0);
|
|
139
131
|
resolve(common.generateEmptyCreationResponse(template.type)); // fails to create item
|
|
140
132
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-item-from-template.js","sourceRoot":"","sources":["../../../src/helpers/create-item-from-template.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,
|
|
1
|
+
{"version":3,"file":"create-item-from-template.js","sourceRoot":"","sources":["../../../src/helpers/create-item-from-template.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,gDAAgD;AAChD,wCAAwC;AACxC,kEAAkE;AAClE,0CAA0C;AAE1C,SAAgB,sBAAsB,CACpC,QAA8B,EAC9B,kBAAuB,EACvB,yBAA6C,EAC7C,oBAAkD;IAElD,OAAO,IAAI,OAAO,CAAyC,OAAO,CAAC,EAAE;QACnE,yDAAyD;QACzD,IACE,CAAC,oBAAoB,CACnB,QAAQ,CAAC,MAAM,EACf,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAClC,CAAC,CACF,EACD;YACA,oBAAoB,CAClB,QAAQ,CAAC,MAAM,EACf,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAClC,CAAC,CACF,CAAC;YACF,OAAO,CAAC,MAAM,CAAC,6B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updateNotebookData = exports.convertItemToTemplate = exports.createItemF
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
const convert_item_to_template_1 = require("./convert-item-to-template");
|
|
20
20
|
Object.defineProperty(exports, "convertItemToTemplate", { enumerable: true, get: function () { return convert_item_to_template_1.convertItemToTemplate; } });
|
|
21
|
-
|
|
21
|
+
const create_item_from_template_1 = require("./create-item-from-template");
|
|
22
22
|
Object.defineProperty(exports, "createItemFromTemplate", { enumerable: true, get: function () { return create_item_from_template_1.createItemFromTemplate; } });
|
|
23
|
-
|
|
23
|
+
const update_notebook_data_1 = require("./update-notebook-data");
|
|
24
24
|
Object.defineProperty(exports, "updateNotebookData", { enumerable: true, get: function () { return update_notebook_data_1.updateNotebookData; } });
|
|
25
25
|
//# sourceMappingURL=notebook-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notebook-helpers.js","sourceRoot":"","sources":["../../../src/helpers/notebook-helpers.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,
|
|
1
|
+
{"version":3,"file":"notebook-helpers.js","sourceRoot":"","sources":["../../../src/helpers/notebook-helpers.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,yEAAmE;AAKlC,sGALxB,gDAAqB,OAKwB;AAJtD,2EAAqE;AAI5D,uGAJA,kDAAsB,OAIA;AAH/B,iEAA4D;AAGJ,mGAH/C,yCAAkB,OAG+C"}
|
|
@@ -16,8 +16,8 @@ exports.convertItemToTemplate = exports.createItemFromTemplate = void 0;
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
const convert_item_to_template_1 = require("./convert-item-to-template");
|
|
20
20
|
Object.defineProperty(exports, "convertItemToTemplate", { enumerable: true, get: function () { return convert_item_to_template_1.convertItemToTemplate; } });
|
|
21
|
-
|
|
21
|
+
const create_item_from_template_1 = require("./create-item-from-template");
|
|
22
22
|
Object.defineProperty(exports, "createItemFromTemplate", { enumerable: true, get: function () { return create_item_from_template_1.createItemFromTemplate; } });
|
|
23
23
|
//# sourceMappingURL=quickcapture-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quickcapture-helpers.js","sourceRoot":"","sources":["../../../src/helpers/quickcapture-helpers.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,
|
|
1
|
+
{"version":3,"file":"quickcapture-helpers.js","sourceRoot":"","sources":["../../../src/helpers/quickcapture-helpers.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,yEAAmE;AAIlC,sGAJxB,gDAAqB,OAIwB;AAHtD,2EAAqE;AAG5D,uGAHA,kDAAsB,OAGA"}
|
|
@@ -16,8 +16,8 @@ exports.convertItemToTemplate = exports.createItemFromTemplate = void 0;
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
const convert_item_to_template_1 = require("./convert-item-to-template");
|
|
20
20
|
Object.defineProperty(exports, "convertItemToTemplate", { enumerable: true, get: function () { return convert_item_to_template_1.convertItemToTemplate; } });
|
|
21
|
-
|
|
21
|
+
const create_item_from_template_1 = require("./create-item-from-template");
|
|
22
22
|
Object.defineProperty(exports, "createItemFromTemplate", { enumerable: true, get: function () { return create_item_from_template_1.createItemFromTemplate; } });
|
|
23
23
|
//# sourceMappingURL=simple-type-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simple-type-helpers.js","sourceRoot":"","sources":["../../../src/helpers/simple-type-helpers.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,
|
|
1
|
+
{"version":3,"file":"simple-type-helpers.js","sourceRoot":"","sources":["../../../src/helpers/simple-type-helpers.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,yEAAmE;AAIlC,sGAJxB,gDAAqB,OAIwB;AAHtD,2EAAqE;AAG5D,uGAHA,kDAAsB,OAGA"}
|
|
@@ -16,9 +16,9 @@ exports.updateNotebookData = void 0;
|
|
|
16
16
|
* See the License for the specific language governing permissions and
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
const solution_common_1 = require("@esri/solution-common");
|
|
20
20
|
function updateNotebookData(itemId, data, authentication) {
|
|
21
|
-
|
|
21
|
+
const updateOptions = {
|
|
22
22
|
id: itemId,
|
|
23
23
|
data: (0, solution_common_1.jsonToBlob)(data)
|
|
24
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-notebook-data.js","sourceRoot":"","sources":["../../../src/helpers/update-notebook-data.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,
|
|
1
|
+
{"version":3,"file":"update-notebook-data.js","sourceRoot":"","sources":["../../../src/helpers/update-notebook-data.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;GAcG;AACH,2DAK+B;AAE/B,SAAgB,kBAAkB,CAChC,MAAc,EACd,IAAS,EACT,cAA2B;IAE3B,MAAM,aAAa,GAAgB;QACjC,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,IAAA,4BAAU,EAAC,IAAI,CAAC;KACvB,CAAC;IACF,OAAO,IAAA,4BAAU,EAAC,aAAa,EAAE,cAAc,CAAC,CAAC;AACnD,CAAC;AAVD,gDAUC"}
|
package/dist/node/index.js
CHANGED
|
@@ -21,16 +21,16 @@ exports.quickcaptureProcessor = exports.quickcaptureHelpers = exports.simpleType
|
|
|
21
21
|
*
|
|
22
22
|
* @module simple-types
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
const simpleTypeHelpers = require("./helpers/simple-type-helpers");
|
|
25
25
|
exports.simpleTypeHelpers = simpleTypeHelpers;
|
|
26
|
-
|
|
26
|
+
const notebookHelpers = require("./helpers/notebook-helpers");
|
|
27
27
|
exports.notebookHelpers = notebookHelpers;
|
|
28
|
-
|
|
28
|
+
const quickcaptureHelpers = require("./helpers/quickcapture-helpers");
|
|
29
29
|
exports.quickcaptureHelpers = quickcaptureHelpers;
|
|
30
|
-
|
|
30
|
+
const simpleTypes = require("./simple-types");
|
|
31
31
|
exports.simpleTypes = simpleTypes;
|
|
32
|
-
|
|
32
|
+
const notebookProcessor = require("./notebook");
|
|
33
33
|
exports.notebookProcessor = notebookProcessor;
|
|
34
|
-
|
|
34
|
+
const quickcaptureProcessor = require("./quickcapture");
|
|
35
35
|
exports.quickcaptureProcessor = quickcaptureProcessor;
|
|
36
36
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;;GAIG;AACH,mEAAmE;AAWjE,8CAAiB;AAVnB,8DAA8D;AAS5D,0CAAe;AARjB,sEAAsE;AAUpE,kDAAmB;AATrB,8CAA8C;AAK5C,kCAAW;AAJb,gDAAgD;AAK9C,8CAAiB;AAJnB,wDAAwD;AAQtD,sDAAqB"}
|
package/dist/node/notebook.d.ts
CHANGED
|
@@ -19,11 +19,12 @@ import * as common from "@esri/solution-common";
|
|
|
19
19
|
*
|
|
20
20
|
* @param solutionItemId The solution to contain the template
|
|
21
21
|
* @param itemInfo Info about the item
|
|
22
|
-
* @param
|
|
22
|
+
* @param destAuthentication Credentials for requests to the destination organization
|
|
23
|
+
* @param srcAuthentication Credentials for requests to source items
|
|
23
24
|
* @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
24
25
|
* @return A promise that will resolve when the template has been created
|
|
25
26
|
*/
|
|
26
|
-
export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any,
|
|
27
|
+
export declare function convertItemToTemplate(solutionItemId: string, itemInfo: any, destAuthentication: common.UserSession, srcAuthentication: common.UserSession, templateDictionary: any): Promise<common.IItemTemplate>;
|
|
27
28
|
export declare function createItemFromTemplate(template: common.IItemTemplate, templateDictionary: any, destinationAuthentication: common.UserSession, itemProgressCallback: common.IItemProgressCallback): Promise<common.ICreateItemFromTemplateResponse>;
|
|
28
29
|
/**
|
|
29
30
|
* Converts a Python Notebook item to a template.
|
package/dist/node/notebook.js
CHANGED
|
@@ -16,23 +16,24 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.postProcess = exports.fineTuneCreatedItem = exports.convertNotebookToTemplate = exports.createItemFromTemplate = exports.convertItemToTemplate = void 0;
|
|
19
|
-
|
|
19
|
+
const common = require("@esri/solution-common");
|
|
20
20
|
// Need to import collectively to enable spying
|
|
21
|
-
|
|
21
|
+
const notebookHelpers = require("./helpers/notebook-helpers");
|
|
22
22
|
/**
|
|
23
23
|
* Converts a notebook item into a template.
|
|
24
24
|
*
|
|
25
25
|
* @param solutionItemId The solution to contain the template
|
|
26
26
|
* @param itemInfo Info about the item
|
|
27
|
-
* @param
|
|
27
|
+
* @param destAuthentication Credentials for requests to the destination organization
|
|
28
|
+
* @param srcAuthentication Credentials for requests to source items
|
|
28
29
|
* @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
|
|
29
30
|
* @return A promise that will resolve when the template has been created
|
|
30
31
|
*/
|
|
31
|
-
function convertItemToTemplate(solutionItemId, itemInfo,
|
|
32
|
+
function convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary) {
|
|
32
33
|
// Delegate back to simple-types, which will in-turn delegate
|
|
33
34
|
// to convertNotebookToTemplate at the correct point in the process
|
|
34
35
|
// This is a temporary refactor step
|
|
35
|
-
return notebookHelpers.convertItemToTemplate(solutionItemId, itemInfo,
|
|
36
|
+
return notebookHelpers.convertItemToTemplate(solutionItemId, itemInfo, destAuthentication, srcAuthentication, templateDictionary);
|
|
36
37
|
}
|
|
37
38
|
exports.convertItemToTemplate = convertItemToTemplate;
|
|
38
39
|
// Delegate back to simple-types
|
|
@@ -49,17 +50,17 @@ exports.createItemFromTemplate = createItemFromTemplate;
|
|
|
49
50
|
*/
|
|
50
51
|
function convertNotebookToTemplate(itemTemplate) {
|
|
51
52
|
// The templates data to process
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
const data = itemTemplate.data;
|
|
54
|
+
let dataString = JSON.stringify(data);
|
|
55
|
+
const idTest = /[0-9A-F]{32}/gim;
|
|
55
56
|
if (data && idTest.test(dataString)) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
ids.forEach(
|
|
59
|
-
if (
|
|
60
|
-
|
|
57
|
+
const ids = dataString.match(idTest);
|
|
58
|
+
const verifiedIds = [];
|
|
59
|
+
ids.forEach(id => {
|
|
60
|
+
if (verifiedIds.indexOf(id) === -1) {
|
|
61
|
+
verifiedIds.push(id);
|
|
61
62
|
// templatize the itemId--but only once per unique id
|
|
62
|
-
|
|
63
|
+
const regEx = new RegExp(id, "gm");
|
|
63
64
|
dataString = dataString.replace(regEx, "{{" + id + ".itemId}}");
|
|
64
65
|
// update the dependencies
|
|
65
66
|
if (itemTemplate.dependencies.indexOf(id) === -1) {
|
|
@@ -83,15 +84,15 @@ exports.convertNotebookToTemplate = convertNotebookToTemplate;
|
|
|
83
84
|
* @return A promise that will resolve once any updates have been made
|
|
84
85
|
*/
|
|
85
86
|
function fineTuneCreatedItem(originalTemplate, newlyCreatedItem, templateDictionary, authentication) {
|
|
86
|
-
return new Promise(
|
|
87
|
-
|
|
87
|
+
return new Promise((resolve, reject) => {
|
|
88
|
+
const updateOptions = {
|
|
88
89
|
id: newlyCreatedItem.itemId,
|
|
89
90
|
url: newlyCreatedItem.item.url,
|
|
90
91
|
data: common.jsonToFile(newlyCreatedItem.data, newlyCreatedItem.itemId + ".ipynb")
|
|
91
92
|
};
|
|
92
93
|
common
|
|
93
94
|
.updateItem(updateOptions, authentication)
|
|
94
|
-
.then(
|
|
95
|
+
.then(() => resolve(null), reject);
|
|
95
96
|
});
|
|
96
97
|
}
|
|
97
98
|
exports.fineTuneCreatedItem = fineTuneCreatedItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notebook.js","sourceRoot":"","sources":["../../src/notebook.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"notebook.js","sourceRoot":"","sources":["../../src/notebook.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,gDAAgD;AAChD,+CAA+C;AAC/C,8DAA8D;AAE9D;;;;;;;;;GASG;AACH,SAAgB,qBAAqB,CACnC,cAAsB,EACtB,QAAa,EACb,kBAAsC,EACtC,iBAAqC,EACrC,kBAAuB;IAEvB,6DAA6D;IAC7D,mEAAmE;IACnE,oCAAoC;IACpC,OAAO,eAAe,CAAC,qBAAqB,CAC1C,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,CACnB,CAAC;AACJ,CAAC;AAjBD,sDAiBC;AAED,gCAAgC;AAChC,oCAAoC;AACpC,SAAgB,sBAAsB,CACpC,QAA8B,EAC9B,kBAAuB,EACvB,yBAA6C,EAC7C,oBAAkD;IAElD,OAAO,eAAe,CAAC,sBAAsB,CAC3C,QAAQ,EACR,kBAAkB,EAClB,yBAAyB,EACzB,oBAAoB,CACrB,CAAC;AACJ,CAAC;AAZD,wDAYC;AAED;;;;;GAKG;AACH,SAAgB,yBAAyB,CACvC,YAAkC;IAElC,gCAAgC;IAChC,MAAM,IAAI,GAAQ,YAAY,CAAC,IAAI,CAAC;IACpC,IAAI,UAAU,GAAW,I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,MAAM,CAAC,UAAU,CACrB,gBAAgB,CAAC,IAAI,EACrB,gBAAgB,CAAC,MAAM,GAAG,QAAQ,CACnC;SACF,CAAC;QACF,MAAM;aACH,UAAU,CAAC,aAAa,EAAE,cAAc,CAAC;aACzC,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC;AAnBD,kDAmBC;AAED;;;;;;;;;GASG;AACH,SAAgB,WAAW,CACzB,MAAc,EACd,IAAY,EACZ,SAAgB,EAChB,QAA8B,EAC9B,SAAiC,EACjC,kBAAuB,EACvB,cAAkC;IAElC,OAAO,MAAM,CAAC,gCAAgC,CAC5C,MAAM,EACN,kBAAkB,EAClB,cAAc,CACf,CAAC;AACJ,CAAC;AAdD,kCAcC"}
|
package/dist/node/oic.d.ts
CHANGED
|
@@ -18,10 +18,11 @@ import * as common from "@esri/solution-common";
|
|
|
18
18
|
* Converts an AGOL OIC (Oriented Imagery Catalog) item to a template.
|
|
19
19
|
*
|
|
20
20
|
* @param itemTemplate Template for the OIC (Oriented Imagery Catalog) item
|
|
21
|
-
* @param
|
|
21
|
+
* @param destAuthentication Credentials for requests to the destination organization
|
|
22
|
+
* @param srcAuthentication Credentials for requests to source items
|
|
22
23
|
* @return Template for the solution item that contains key details for item reconstruction
|
|
23
24
|
*/
|
|
24
|
-
export declare function convertItemToTemplate(itemTemplate: common.IItemTemplate,
|
|
25
|
+
export declare function convertItemToTemplate(itemTemplate: common.IItemTemplate, destAuthentication: common.UserSession, srcAuthentication: common.UserSession): Promise<common.IItemTemplate>;
|
|
25
26
|
/**
|
|
26
27
|
* Gets the ids of the dependencies of an AGOL OIC (Oriented Imagery Catalog) item.
|
|
27
28
|
*
|
package/dist/node/oic.js
CHANGED
|
@@ -16,29 +16,29 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports._templatizeOicLayerUrl = exports._getLayerIds = exports._extractDependencies = exports.convertItemToTemplate = void 0;
|
|
19
|
-
|
|
19
|
+
const common = require("@esri/solution-common");
|
|
20
20
|
// ------------------------------------------------------------------------------------------------------------------ //
|
|
21
21
|
/**
|
|
22
22
|
* Converts an AGOL OIC (Oriented Imagery Catalog) item to a template.
|
|
23
23
|
*
|
|
24
24
|
* @param itemTemplate Template for the OIC (Oriented Imagery Catalog) item
|
|
25
|
-
* @param
|
|
25
|
+
* @param destAuthentication Credentials for requests to the destination organization
|
|
26
|
+
* @param srcAuthentication Credentials for requests to source items
|
|
26
27
|
* @return Template for the solution item that contains key details for item reconstruction
|
|
27
28
|
*/
|
|
28
|
-
function convertItemToTemplate(itemTemplate,
|
|
29
|
-
return new Promise(
|
|
29
|
+
function convertItemToTemplate(itemTemplate, destAuthentication, srcAuthentication) {
|
|
30
|
+
return new Promise((resolve, reject) => {
|
|
30
31
|
// Extract dependencies
|
|
31
|
-
_extractDependencies(itemTemplate,
|
|
32
|
-
var _a;
|
|
32
|
+
_extractDependencies(itemTemplate, srcAuthentication).then((results) => {
|
|
33
33
|
itemTemplate.dependencies = results.dependencies;
|
|
34
34
|
// Templatize the map layer ids after we've extracted them as dependencies
|
|
35
35
|
/* istanbul ignore else */
|
|
36
|
-
if (
|
|
36
|
+
if (itemTemplate.data?.properties) {
|
|
37
37
|
itemTemplate.data.properties.ServiceURL = _templatizeOicLayerUrl(itemTemplate.data.properties.ServiceURL, results.urlHash);
|
|
38
38
|
itemTemplate.data.properties.OverviewURL = _templatizeOicLayerUrl(itemTemplate.data.properties.OverviewURL, results.urlHash);
|
|
39
39
|
}
|
|
40
40
|
resolve(itemTemplate);
|
|
41
|
-
},
|
|
41
|
+
}, e => reject(common.fail(e)));
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
exports.convertItemToTemplate = convertItemToTemplate;
|
|
@@ -51,11 +51,10 @@ exports.convertItemToTemplate = convertItemToTemplate;
|
|
|
51
51
|
* @protected
|
|
52
52
|
*/
|
|
53
53
|
function _extractDependencies(itemTemplate, authentication) {
|
|
54
|
-
return new Promise(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
var layerURLs = [];
|
|
54
|
+
return new Promise((resolve, reject) => {
|
|
55
|
+
const dependencies = [];
|
|
56
|
+
if (itemTemplate.data?.properties) {
|
|
57
|
+
const layerURLs = [];
|
|
59
58
|
/* istanbul ignore else */
|
|
60
59
|
if (itemTemplate.data.properties.ServiceURL) {
|
|
61
60
|
layerURLs.push(itemTemplate.data.properties.ServiceURL);
|
|
@@ -66,9 +65,9 @@ function _extractDependencies(itemTemplate, authentication) {
|
|
|
66
65
|
itemTemplate.data.properties.ServiceURL) {
|
|
67
66
|
layerURLs.push(itemTemplate.data.properties.OverviewURL);
|
|
68
67
|
}
|
|
69
|
-
_getLayerIds(layerURLs, dependencies, authentication).then(
|
|
68
|
+
_getLayerIds(layerURLs, dependencies, authentication).then(results => {
|
|
70
69
|
resolve(results);
|
|
71
|
-
},
|
|
70
|
+
}, e => reject(common.fail(e)));
|
|
72
71
|
}
|
|
73
72
|
else {
|
|
74
73
|
resolve({
|
|
@@ -89,18 +88,18 @@ exports._extractDependencies = _extractDependencies;
|
|
|
89
88
|
* @protected
|
|
90
89
|
*/
|
|
91
90
|
function _getLayerIds(layerURLs, dependencies, authentication) {
|
|
92
|
-
return new Promise(
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
return new Promise((resolve, reject) => {
|
|
92
|
+
const urlHash = {};
|
|
93
|
+
const options = {
|
|
95
94
|
f: "json",
|
|
96
95
|
authentication: authentication
|
|
97
96
|
};
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
const layerPromises = [];
|
|
98
|
+
const layerChecks = {};
|
|
99
|
+
const filteredLayerURLs = layerURLs.filter(layerURL => {
|
|
101
100
|
if (layerURL) {
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
const results = /.+FeatureServer/g.exec(layerURL);
|
|
102
|
+
const baseUrl = Array.isArray(results) && results.length > 0 ? results[0] : undefined;
|
|
104
103
|
if (baseUrl) {
|
|
105
104
|
// avoid redundant checks when we have a layer with subLayers
|
|
106
105
|
/* istanbul ignore else */
|
|
@@ -119,11 +118,11 @@ function _getLayerIds(layerURLs, dependencies, authentication) {
|
|
|
119
118
|
}
|
|
120
119
|
});
|
|
121
120
|
if (layerPromises.length > 0) {
|
|
122
|
-
Promise.all(layerPromises).then(
|
|
123
|
-
serviceResponses.forEach(
|
|
121
|
+
Promise.all(layerPromises).then(serviceResponses => {
|
|
122
|
+
serviceResponses.forEach((serviceResponse, i) => {
|
|
124
123
|
/* istanbul ignore else */
|
|
125
124
|
if (common.getProp(serviceResponse, "serviceItemId")) {
|
|
126
|
-
|
|
125
|
+
const id = serviceResponse.serviceItemId;
|
|
127
126
|
/* istanbul ignore else */
|
|
128
127
|
if (dependencies.indexOf(id) < 0) {
|
|
129
128
|
dependencies.push(id);
|
|
@@ -135,7 +134,7 @@ function _getLayerIds(layerURLs, dependencies, authentication) {
|
|
|
135
134
|
dependencies: dependencies,
|
|
136
135
|
urlHash: urlHash
|
|
137
136
|
});
|
|
138
|
-
},
|
|
137
|
+
}, e => reject(common.fail(e)));
|
|
139
138
|
}
|
|
140
139
|
else {
|
|
141
140
|
resolve({
|
|
@@ -155,13 +154,15 @@ exports._getLayerIds = _getLayerIds;
|
|
|
155
154
|
* @protected
|
|
156
155
|
*/
|
|
157
156
|
function _templatizeOicLayerUrl(layerURL, urlHash) {
|
|
158
|
-
|
|
157
|
+
let templatizedURL = layerURL;
|
|
159
158
|
if (layerURL) {
|
|
160
|
-
|
|
159
|
+
const id = urlHash[layerURL];
|
|
161
160
|
if (id) {
|
|
162
|
-
|
|
161
|
+
const layerId = layerURL.substr(layerURL.lastIndexOf("/") + 1);
|
|
163
162
|
templatizedURL = common.templatizeTerm(id, id, ".layer" + layerId + ".url");
|
|
164
163
|
}
|
|
164
|
+
// replace everything up until /home with portalBaseUrl var and templatize the itemId
|
|
165
|
+
templatizedURL = common.templatizeIds(templatizedURL.replace(/.+?(?=\/home)/, "{{portalBaseUrl}}"));
|
|
165
166
|
}
|
|
166
167
|
return templatizedURL;
|
|
167
168
|
}
|
package/dist/node/oic.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oic.js","sourceRoot":"","sources":["../../src/oic.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"oic.js","sourceRoot":"","sources":["../../src/oic.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,gDAAgD;AAEhD,wHAAwH;AAExH;;;;;;;GAOG;AACH,SAAgB,qBAAqB,CACnC,YAAkC,EAClC,kBAAsC,EACtC,iBAAqC;IAErC,OAAO,IAAI,OAAO,CAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3D,uBAAuB;QACvB,oBAAoB,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC,IAAI,CACxD,CAAC,OAAY,EAAE,EAAE;YACf,YAAY,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;YAEjD,0EAA0E;YAC1E,0BAA0B;YAC1B,IAAI,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE;gBACjC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,GAAG,sBAAsB,CAC9D,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,EACvC,OAAO,CAAC,OAAO,CAChB,CAAC;gBACF,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,GAAG,sBAAsB,CAC/D,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EACxC,OAAO,CAAC,OAAO,CAChB,CAAC;aACH;YAED,OAAO,CAAC,YAAY,CAAC,CAAC;QACxB,CAAC,EACD,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CA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