badmfck-api-server 2.4.6 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. package/dist/apiServer/APIService.js +2 -1
  2. package/dist/apiServer/APIService.js.map +1 -0
  3. package/dist/apiServer/BaseEndpoint.js +1 -0
  4. package/dist/apiServer/BaseEndpoint.js.map +1 -0
  5. package/dist/apiServer/BaseService.js +1 -0
  6. package/dist/apiServer/BaseService.js.map +1 -0
  7. package/dist/apiServer/ClusterService.d.ts +18 -5
  8. package/dist/apiServer/ClusterService.js +45 -14
  9. package/dist/apiServer/ClusterService.js.map +1 -0
  10. package/dist/apiServer/DocumentService.js +1 -0
  11. package/dist/apiServer/DocumentService.js.map +1 -0
  12. package/dist/apiServer/HUBService.d.ts +11 -4
  13. package/dist/apiServer/HUBService.js +79 -18
  14. package/dist/apiServer/HUBService.js.map +1 -0
  15. package/dist/apiServer/LocalRequest.js +1 -0
  16. package/dist/apiServer/LocalRequest.js.map +1 -0
  17. package/dist/apiServer/LogService.js +1 -0
  18. package/dist/apiServer/LogService.js.map +1 -0
  19. package/dist/apiServer/MysqlService.js +4 -3
  20. package/dist/apiServer/MysqlService.js.map +1 -0
  21. package/dist/apiServer/WSAPITransport.js +1 -0
  22. package/dist/apiServer/WSAPITransport.js.map +1 -0
  23. package/dist/apiServer/WebSocketHandler.d.ts +0 -0
  24. package/dist/apiServer/WebSocketHandler.js +2 -0
  25. package/dist/apiServer/WebSocketHandler.js.map +1 -0
  26. package/dist/apiServer/WebsocketService.js +1 -0
  27. package/dist/apiServer/WebsocketService.js.map +1 -0
  28. package/dist/apiServer/cluster/HUBConnection.d.ts +25 -25
  29. package/dist/apiServer/cluster/HUBConnection.js +107 -86
  30. package/dist/apiServer/cluster/HUBConnection.js.map +1 -0
  31. package/dist/apiServer/cluster/HUBHandlres.d.ts +0 -0
  32. package/dist/apiServer/cluster/HUBHandlres.js +2 -0
  33. package/dist/apiServer/cluster/HUBHandlres.js.map +1 -0
  34. package/dist/apiServer/deployment/Deployment.js +1 -0
  35. package/dist/apiServer/deployment/Deployment.js.map +1 -0
  36. package/dist/apiServer/helper/DataProvider.js +1 -0
  37. package/dist/apiServer/helper/DataProvider.js.map +1 -0
  38. package/dist/apiServer/helper/Sleep.d.ts +1 -0
  39. package/dist/apiServer/helper/Sleep.js +6 -0
  40. package/dist/apiServer/helper/Sleep.js.map +1 -0
  41. package/dist/apiServer/helper/UID.js +1 -0
  42. package/dist/apiServer/helper/UID.js.map +1 -0
  43. package/dist/apiServer/helper/Validator.js +1 -0
  44. package/dist/apiServer/helper/Validator.js.map +1 -0
  45. package/dist/apiServer/monitor/Monitor.js +1 -0
  46. package/dist/apiServer/monitor/Monitor.js.map +1 -0
  47. package/dist/apiServer/routes/Liveness.js +1 -0
  48. package/dist/apiServer/routes/Liveness.js.map +1 -0
  49. package/dist/apiServer/routes/Readiness.js +1 -0
  50. package/dist/apiServer/routes/Readiness.js.map +1 -0
  51. package/dist/apiServer/structures/DefaultErrors.js +1 -0
  52. package/dist/apiServer/structures/DefaultErrors.js.map +1 -0
  53. package/dist/apiServer/structures/HTTPStatus.js +1 -0
  54. package/dist/apiServer/structures/HTTPStatus.js.map +1 -0
  55. package/dist/apiServer/structures/Interfaces.js +1 -0
  56. package/dist/apiServer/structures/Interfaces.js.map +1 -0
  57. package/dist/index.js +1 -0
  58. package/dist/index.js.map +1 -0
  59. package/package.json +2 -2
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.HUBService = exports.REQ_CLUSTER_NODE = void 0;
4
7
  const ws_1 = require("ws");
@@ -7,6 +10,7 @@ const BaseService_1 = require("./BaseService");
7
10
  const HUBConnection_1 = require("./cluster/HUBConnection");
8
11
  const LogService_1 = require("./LogService");
9
12
  const badmfck_signal_1 = require("badmfck-signal");
13
+ const DefaultErrors_1 = __importDefault(require("./structures/DefaultErrors"));
10
14
  exports.REQ_CLUSTER_NODE = new badmfck_signal_1.Req(undefined, "REQ_CLUSTER_NODE");
11
15
  class HUBService extends BaseService_1.BaseService {
12
16
  options;
@@ -15,6 +19,29 @@ class HUBService extends BaseService_1.BaseService {
15
19
  constructor(options) {
16
20
  super("HUBService");
17
21
  this.options = options;
22
+ this.handlers = [
23
+ new badmfck_signal_1.Req(async (req) => {
24
+ if (!req.data || !Array.isArray(req.data))
25
+ return { ...DefaultErrors_1.default.BAD_REQUEST, details: "data array is not set" };
26
+ const incomingCluster = this.nodes.get(req.connection.options.targetID ?? "");
27
+ if (!incomingCluster)
28
+ return { ...DefaultErrors_1.default.BAD_REQUEST, details: "cluster for incoming connection not found" };
29
+ const result = [];
30
+ for (let i of req.data) {
31
+ const clusterNode = this.nodes.get(i);
32
+ if (clusterNode) {
33
+ result.push({
34
+ url: clusterNode.url,
35
+ publicKey: clusterNode.publicKey,
36
+ id: clusterNode.clusterID
37
+ });
38
+ }
39
+ if (incomingCluster.watchlist.filter(x => x === i).length === 0)
40
+ incomingCluster.watchlist.push(i + "");
41
+ }
42
+ return result;
43
+ }, "REQ_PARTY")
44
+ ];
18
45
  }
19
46
  async init() {
20
47
  super.init();
@@ -26,11 +53,16 @@ class HUBService extends BaseService_1.BaseService {
26
53
  path: "/hub"
27
54
  });
28
55
  wss.on("connection", (ws) => {
29
- (0, LogService_1.logInfo)("HUBService: new connection on wss server");
30
56
  const conn = new HUBConnection_1.HUBConnection({
31
57
  ws: ws,
32
- privateKey: this.options.hubPrivateKey,
33
- hubID: this.options.hubID,
58
+ direction: "incoming",
59
+ hostID: this.options.hostID,
60
+ hostPrivateKey: this.options.hostPrivateKey,
61
+ hostPublicKey: this.options.hostPublicKey,
62
+ hostURL: this.options.hostURL + "/hub",
63
+ targetID: null,
64
+ targetPublicKey: null,
65
+ targetURL: null,
34
66
  onAuthorized: () => this.onConnectionAuthorized(conn),
35
67
  onClose: () => this.onConnectionClosed(conn),
36
68
  handlers: this.handlers
@@ -41,31 +73,60 @@ class HUBService extends BaseService_1.BaseService {
41
73
  });
42
74
  }
43
75
  onConnectionAuthorized(conn) {
44
- (0, LogService_1.logInfo)("HUBService: authorized connection");
45
- let clusterNode = this.nodes.get(conn.clientID);
76
+ if (!conn.options.targetID) {
77
+ (0, LogService_1.logError)("HUBService: connection targetID is not set");
78
+ return;
79
+ }
80
+ let clusterNode = this.nodes.get(conn.options.targetID);
46
81
  if (!clusterNode) {
47
82
  (0, LogService_1.logInfo)("HUBService: new cluster node connected");
48
83
  clusterNode = {
49
- clusterID: conn.clientID,
50
- url: conn.url,
51
- publicKey: conn.publicKey,
52
- privateKey: "123",
53
- ws: []
84
+ clusterID: conn.options.targetID,
85
+ url: conn.options.targetURL,
86
+ publicKey: conn.options.targetPublicKey,
87
+ privateKey: conn.options.hostPrivateKey,
88
+ ws: [],
89
+ watchlist: []
54
90
  };
55
- this.nodes.set(conn.clientID, clusterNode);
91
+ this.nodes.set(conn.options.targetID, clusterNode);
56
92
  }
57
93
  clusterNode.ws.push(conn);
94
+ (0, LogService_1.logInfo)("HUBService: new authorized connection added to cluster node");
95
+ for (let [id, cluster] of this.nodes) {
96
+ for (let i of cluster.watchlist) {
97
+ if (i === clusterNode.clusterID) {
98
+ cluster.ws.forEach(x => {
99
+ x.send({
100
+ method: "S_PARTY_AVAILABLE",
101
+ data: {
102
+ url: clusterNode.url,
103
+ publicKey: clusterNode.publicKey,
104
+ id: clusterNode.clusterID
105
+ },
106
+ callbackID: 0
107
+ });
108
+ });
109
+ }
110
+ }
111
+ }
58
112
  }
59
113
  onConnectionClosed(conn) {
114
+ if (!conn.options.targetID) {
115
+ (0, LogService_1.logError)("HUBService: connection targetID is not set");
116
+ return;
117
+ }
118
+ const clusterNode = this.nodes.get(conn.options.targetID);
119
+ if (!clusterNode) {
120
+ (0, LogService_1.logError)("HUBService: cluster node not found");
121
+ return;
122
+ }
123
+ clusterNode.ws = clusterNode.ws.filter(x => x !== conn);
60
124
  (0, LogService_1.logInfo)("HUBService: connection closed");
61
- const clusterNode = this.nodes.get(conn.clientID);
62
- if (clusterNode) {
63
- clusterNode.ws = clusterNode.ws.filter(x => x !== conn);
64
- if (!clusterNode.ws.length) {
65
- (0, LogService_1.logInfo)("HUBService: cluster node disconnected");
66
- this.nodes.delete(conn.clientID);
67
- }
125
+ if (!clusterNode.ws.length) {
126
+ (0, LogService_1.logInfo)("HUBService: cluster node disconnected");
127
+ this.nodes.delete(conn.options.targetID);
68
128
  }
69
129
  }
70
130
  }
71
131
  exports.HUBService = HUBService;
132
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSFVCU2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hcGlTZXJ2ZXIvSFVCU2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSwyQkFBZ0Q7QUFDaEQsNkNBQStDO0FBQy9DLCtDQUE0QztBQUM1QywyREFBd0Q7QUFDeEQsNkNBQWlEO0FBQ2pELG1EQUE2QztBQUU3QywrRUFBdUQ7QUEwQjFDLFFBQUEsZ0JBQWdCLEdBQUcsSUFBSSxvQkFBRyxDQUFzRCxTQUFTLEVBQUUsa0JBQWtCLENBQUMsQ0FBQztBQUU1SCxNQUFhLFVBQVcsU0FBUSx5QkFBVztJQUUxQyxPQUFPLENBQW9CO0lBQzNCLEtBQUssR0FBOEIsSUFBSSxHQUFHLEVBQUUsQ0FBQztJQUM3QyxRQUFRLEdBQThELEVBQUUsQ0FBQztJQUV6RSxZQUFZLE9BQTBCO1FBQ3JDLEtBQUssQ0FBQyxZQUFZLENBQUMsQ0FBQTtRQUNuQixJQUFJLENBQUMsT0FBTyxHQUFHLE9BQU8sQ0FBQztRQUN2QixJQUFJLENBQUMsUUFBUSxHQUFHO1lBQ2YsSUFBSSxvQkFBRyxDQUF3QyxLQUFLLEVBQUUsR0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,CAAC,WAAW,EAAE;YACjB,IAAA,qBAAQ,EAAC,oCAAoC,CAAC,CAAA;YAC9C,OAAO;SACP;QAED,WAAW,CAAC,EAAE,GAAG,WAAW,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;QAExD,IAAA,oBAAO,EAAC,+BAA+B,CAAC,CAAA;QACxC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE;YAC3B,IAAA,oBAAO,EAAC,uCAAuC,CAAC,CAAA;YAChD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;SACzC;IACF,CAAC;CACD;AAxJD,gCAwJC","sourcesContent":["import WebSocket, { WebSocketServer } from \"ws\";\nimport { REQ_HTTP_SERVER } from \"./APIService\";\nimport { BaseService } from \"./BaseService\";\nimport { HUBConnection } from \"./cluster/HUBConnection\";\nimport { logError, logInfo } from \"./LogService\";\nimport Signal, { Req } from \"badmfck-signal\";\nimport { IError } from \"./structures/Interfaces\";\nimport DefaultErrors from \"./structures/DefaultErrors\";\nimport { IPartyHost } from \"./ClusterService\";\n\n\nexport interface HUBServiceOptions {\n\thostID: string,\n\thostPublicKey: string,\n\thostPrivateKey: string,\n\thostURL: string,\n}\n\nexport interface IClusterNode {\n\tclusterID: string,\n\turl: string,\n\tpublicKey: string,\n\tprivateKey: string,\n\tws: HUBConnection[],\n\twatchlist:string[] // parties id that this cluster can connect to\n}\n\nexport interface IWebsocketPacket<T = any> {\n\tdata: T,\n\tauthorized: boolean\n\tconnection: HUBConnection\n}\n\nexport const REQ_CLUSTER_NODE = new Req<string, { url: string, publicKey: string } | IError>(undefined, \"REQ_CLUSTER_NODE\");\n\nexport class HUBService extends BaseService {\n\n\toptions: HUBServiceOptions;\n\tnodes: Map<string, IClusterNode> = new Map();\n\thandlers: (Signal<IWebsocketPacket> | Req<IWebsocketPacket, any>)[] = [];\n\n\tconstructor(options: HUBServiceOptions) {\n\t\tsuper(\"HUBService\")\n\t\tthis.options = options;\n\t\tthis.handlers = [\n\t\t\tnew Req<IWebsocketPacket, IPartyHost[]|IError>(async (req) => {\n\t\t\t\t// check incoming params\n\t\t\t\tif(!req.data || !Array.isArray(req.data))\n\t\t\t\t\treturn {...DefaultErrors.BAD_REQUEST,details:\"data array is not set\"}\n\n\t\t\t\t// get incoming cluster\n\t\t\t\tconst incomingCluster = this.nodes.get(req.connection.options.targetID ?? \"\");\n\t\t\t\tif(!incomingCluster)\n\t\t\t\t\treturn {...DefaultErrors.BAD_REQUEST,details:\"cluster for incoming connection not found\"}\n\n\t\t\t\t// check\n\t\t\t\tconst result = []; \n\t\t\t\tfor(let i of req.data){\n\t\t\t\t\tconst clusterNode = this.nodes.get(i);\n\t\t\t\t\tif(clusterNode){\n\t\t\t\t\t\tresult.push({\n\t\t\t\t\t\t\turl:clusterNode.url,\n\t\t\t\t\t\t\tpublicKey:clusterNode.publicKey,\n\t\t\t\t\t\t\tid:clusterNode.clusterID\t\t\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\n\t\t\t\t\tif(incomingCluster.watchlist.filter(x=>x===i).length===0)\n\t\t\t\t\t\tincomingCluster.watchlist.push(i+\"\");\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\n\t\t\t}, \"REQ_PARTY\")\n\t\t];\n\t}\n\n\tasync init() {\n\t\tsuper.init();\n\t}\n\n\tasync applicationReady() {\n\t\tconst server = await REQ_HTTP_SERVER.request();\n\n\t\tconst wss = new WebSocketServer({\n\t\t\tserver: server.http,\n\t\t\tpath: \"/hub\"\n\t\t})\n\n\t\twss.on(\"connection\", (ws) => {\n\t\t\tconst conn: HUBConnection = new HUBConnection({\n\t\t\t\tws: ws,\n\t\t\t\tdirection: \"incoming\",\n\n\t\t\t\thostID: this.options.hostID,\n\t\t\t\thostPrivateKey: this.options.hostPrivateKey,\n\t\t\t\thostPublicKey: this.options.hostPublicKey,\n\t\t\t\thostURL: this.options.hostURL + \"/hub\",\n\n\t\t\t\t// will be filled after authorization\n\t\t\t\ttargetID: null,\n\t\t\t\ttargetPublicKey: null,\n\t\t\t\ttargetURL: null,\n\n\t\t\t\tonAuthorized: () => this.onConnectionAuthorized(conn),\n\t\t\t\tonClose: () => this.onConnectionClosed(conn),\n\t\t\t\thandlers: this.handlers\n\t\t\t})\n\t\t})\n\n\t\twss.on(\"error\", (err) => {\n\t\t\tconsole.error(\"HUBService: error: \", err)\n\t\t})\n\n\t}\n\n\tonConnectionAuthorized(conn: HUBConnection) {\n\t\t\n\t\tif (!conn.options.targetID) {\n\t\t\tlogError(\"HUBService: connection targetID is not set\")\n\t\t\treturn;\n\t\t}\n\n\t\tlet clusterNode = this.nodes.get(conn.options.targetID)\n\n\t\tif (!clusterNode) {\n\t\t\tlogInfo(\"HUBService: new cluster node connected\")\n\t\t\tclusterNode = {\n\t\t\t\tclusterID: conn.options.targetID,\n\t\t\t\turl: conn.options.targetURL!,\n\t\t\t\tpublicKey: conn.options.targetPublicKey!,\n\t\t\t\tprivateKey: conn.options.hostPrivateKey,\n\t\t\t\tws: [],\n\t\t\t\twatchlist:[]\n\t\t\t}\n\t\t\tthis.nodes.set(conn.options.targetID, clusterNode);\n\t\t}\n\n\t\tclusterNode.ws.push(conn);\n\t\tlogInfo(\"HUBService: new authorized connection added to cluster node\")\n\n\t\t// FIND IN WATCHLIST\n\t\tfor(let [id,cluster] of this.nodes){\n\t\t\tconsole.log(\"find id in watchlist throught clusters\")\n\t\t\tfor(let i of cluster.watchlist){\n\t\t\t\tif(i===clusterNode.clusterID){\n\t\t\t\t\t// send to cluster\n\t\t\t\t\tcluster.ws.forEach(x=>{\n\t\t\t\t\t\tx.send({\n\t\t\t\t\t\t\tmethod:\"S_PARTY_AVAILABLE\",\n\t\t\t\t\t\t\tdata:{\n\t\t\t\t\t\t\t\turl:clusterNode!.url,\n\t\t\t\t\t\t\t\tpublicKey:clusterNode!.publicKey,\n\t\t\t\t\t\t\t\tid:clusterNode!.clusterID\t\t\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tcallbackID:1\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\n\n\tonConnectionClosed(conn: HUBConnection) {\n\t\t\n\t\tif (!conn.options.targetID) {\n\t\t\tlogError(\"HUBService: connection targetID is not set\")\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tconst clusterNode = this.nodes.get(conn.options.targetID);\n\n\t\tif (!clusterNode) {\n\t\t\tlogError(\"HUBService: cluster node not found\")\n\t\t\treturn;\n\t\t}\n\n\t\tclusterNode.ws = clusterNode.ws.filter(x => x !== conn);\n\n\t\tlogInfo(\"HUBService: connection closed\")\n\t\tif (!clusterNode.ws.length) {\n\t\t\tlogInfo(\"HUBService: cluster node disconnected\")\n\t\t\tthis.nodes.delete(conn.options.targetID);\n\t\t}\n\t}\n}"]}
@@ -30,3 +30,4 @@ const LocalRequest = async (ep, data, method, headers) => {
30
30
  console.log(resp);
31
31
  };
32
32
  exports.LocalRequest = LocalRequest;
33
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9jYWxSZXF1ZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FwaVNlcnZlci9Mb2NhbFJlcXVlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsa0RBQXdFO0FBc0NqRSxNQUFNLFlBQVksR0FBRyxLQUFLLEVBQUUsRUFBVSxFQUFFLElBQVUsRUFBRSxNQUFlLEVBQUMsT0FBOEIsRUFBRSxFQUFFO0lBQzVHLElBQUksQ0FBQyxHQUFHLEtBQUssQ0FBQTtJQUNiLElBQUksTUFBTTtRQUNULENBQUMsR0FBRyxNQUFNLENBQUMsV0FBVyxFQUFFLENBQUM7SUFDMUIsSUFBSSxJQUFJLElBQUksQ0FBQy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ACD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AAClB,CAAC,CAAA;AAzBY,QAAA,YAAY,gBAyBxB","sourcesContent":["import axios, { AxiosResponse, InternalAxiosRequestConfig } from \"axios\"\n\n/*axios.interceptors.request.use((x:InternalAxiosRequestConfig<any>)=>{\n\tconsole.log(`AXIOS REQ:\\n\\turl:${x.url}\\n\\tmethod: ${x.method}\\n\\tdata: ${(()=>{\n\t\tif(typeof x.data === \"string\" )\n\t\t\treturn x.data\n\n\t\treturn JSON.stringify(x.data,null,\"\\t\\t\");\n\t})()}\\n\\theaders:\\n${(()=>{\n\t\tlet h = \"\";\n\t\tfor(let i in x.headers){\n\t\t\tif(h!==\"\")\n\t\t\t\th+=\"\\n\"\n\t\t\th+=\"\\t\\t\"+i+\" = \"+x.headers[i]\n\t\t}\n\t\treturn h\n\t})()}`)\n\treturn x;\n})\n\naxios.interceptors.response.use((x:AxiosResponse)=>{\n\tconsole.log(`AXIOS RESP:\\n\\tdata: ${(()=>{\n\t\tif(typeof x.data === \"string\" )\n\t\t\treturn x.data\n\n\t\treturn JSON.stringify(x.data,null,\"\\t\\t\");\n\t})()}\\n\\theaders:\\n${(()=>{\n\t\tlet h = \"\";\n\t\tfor(let i in x.headers){\n\t\t\tif(h!==\"\")\n\t\t\t\th+=\"\\n\"\n\t\t\th+=\"\\t\\t\"+i+\" = \"+x.headers[i]\n\t\t}\n\t\treturn h\n\t})()}`)\n\treturn x;\n})*/\n\nexport const LocalRequest = async (ep: string, data?: any, method?: string,headers?:{[key:string]:string}) => {\n\tlet m = \"get\"\n\tif (method)\n\t\tm = method.toLowerCase();\n\tif (data && !method)\n\t\tm = \"post\"\n\n\tif (ep.startsWith(\"/\"))\n\t\tep = ep.substring(1)\n\tlet url = \"http://localhost:8091/\" + ep;\n\t\n\tif (ep.toLowerCase().startsWith(\"http\"))\n\t\turl = ep;\n\n\tlet resp = null;\n\tconsole.log(\"open url: \", url)\n\ttry {\n\t\tif (m === \"get\")\n\t\t\tresp = await axios.get(url,{headers:headers});\n\t\tif (m === \"post\")\n\t\t\tresp = await axios.post(url, data,{headers:headers})\n\t} catch (e) {\n\t\tconsole.log(\"ERROR! cant open url\",e)\n\t}\n\tconsole.log(resp)\n}\n"]}
@@ -216,3 +216,4 @@ class LogService extends BaseService_1.BaseService {
216
216
  }
217
217
  }
218
218
  exports.LogService = LogService;
219
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9nU2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9hcGlTZXJ2ZXIvTG9nU2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLGlFQUE2QztBQUM3QywrQ0FBNEM7QUFFNUMsSUFBWSxTQU1YO0FBTkQsV0FBWSxTQUFTO0lBQ2pCLHVDQUFLLENBQUE7SUFDTCx5Q0FBTSxDQUFBO0lBQ04seUNBQU0sQ0FBQTtJQUNOLDJDQUFPLENBQUE7SUFDUCx5Q0FBTSxDQUFBO0FBQ1YsQ0FBQyxFQU5XLFNBQVMseUJBQVQsU0FBUyxRQU1wQjtBQWtCTSxNQUFNLG9CQUFvQixHQUFDLEdBQXFCLEVBQUU7SUFDckQsT0FBTztRQUNILFNBQVMsRUFBQyxHQUFHO1FBQ2IsU0FBUyxFQUFDLElBQUk7UUFDZCxLQUFLLEVBQUMsU0FBUyxDQUFDLEdBQUc7S0FDdEIsQ0FBQTtBQUNMLENBQUMsQ0FBQTtBQU5ZLFFBQUEsb0JBQW9CLHdCQU1oQztBQUVNLE1BQU0sT0FBTyxHQUFDLENBQUMsT0FBVyxFQUFDLEdBQUcsUUFBYyxFQUFDLEVBQUUsR0FBQyxhQUFLLENBQUMsTUFBTSxDQUFDLEVBQUMsS0FBSyxFQUFDLFNBQVMsQ0FBQyxJQUFJLEVBQU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gICAgICAgdGhpcy5jaGVja1RleHRMaW1pdCgpO1xuICAgIH1cblxuICAgIGFzeW5jIGluaXQoKXtcbiAgICAgICAgXG4gICAgICAgIFJFUV9MT0dfVU5JUVVFX1NFUlZJQ0VTLmxpc3RlbmVyID0gYXN5bmMgKCk9PntcbiAgICAgICAgICAgIGNvbnN0IGFycj1bXTtcbiAgICAgICAgICAgIGZvcihsZXQgaSBvZiB0aGlzLnVuaXF1ZVNlcnZpY2VzKVxuICAgICAgICAgICAgICAgIGFyci5wdXNoKHtuYW1lOmlbMF0sY291bnQ6aVsxXX0pXG4gICAgICAgICAgICByZXR1cm4gYXJyO1xuICAgICAgICB9XG5cbiAgICAgICAgUkVRX0xPRy5saXN0ZW5lciA9IGFzeW5jIChyZXEpID0+IHtcbiAgICAgICAgICAgIGlmKHJlcSAmJiByZXEubGFzdElEKXsgIFxuICAgICAgICAgICAgICAgIGxldCByZXN1bHQ9dGhpcy5sb2cuZmlsdGVyKHZhbD0+dmFsLmlkPnJlcS5sYXN0SUQpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICAgICAgfWVsc2VcbiAgICAgICAgICAgICAgICByZXR1cm4gWy4uLnRoaXMubG9nXVxuICAgICAgICB9XG5cbiAgICAgICAgU19MT0dfU0VUX1RFWFRfTElNSVQuc3Vic2NyaWJlKGw9PntcbiAgICAgICAgICAgIHRoaXMub3B0aW9ucy50ZXh0TGltaXQ9bDtcbiAgICAgICAgICAgIHRoaXMuY2hlY2tUZXh0TGltaXQoKTtcbiAgICAgICAgfSlcbiAgICAgICAgXG4gICAgICAgIFNfTE9HX0FERF9TRVJWSUNFX1RPX1dBVENILnN1YnNjcmliZShzZXJ2aWNlPT57XG4gICAgICAgICAgICBpZighdGhpcy5vcHRpb25zLndhdGNoRm9yKVxuICAgICAgICAgICAgICAgIHRoaXMub3B0aW9ucy53YXRjaEZvcj1bXTtcblxuICAgICAgICAgICAgaWYodGhpcy5vcHRpb25zLndhdGNoRm9yLmZpbmQodmFsPT52YWw9PT1zZXJ2aWNlKSl7XG4gICAgICAgICAgICAgICAgbG9nQ3JpdChcIiR7TG9nU2VydmljZS5qc31cIixcIlNlcnZpY2UgXFxcIlwiK3NlcnZpY2UrXCJcXFwiIGFsZXJlYWR5IGFkZGVkXCIpO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMub3B0aW9ucy53YXRjaEZvci5wdXNoKHNlcnZpY2UpO1xuICAgICAgICB9KVxuXG4gICAgICAgIFNfTE9HX1JFTU9WRV9TRVJWSUNFX0ZST01fV0FUQ0guc3Vic2NyaWJlKHNlcnZpY2U9PntcbiAgICAgICAgICAgIGlmKCF0aGlzLm9wdGlvbnMud2F0Y2hGb3IpXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuXG4gICAgICAgICAgICB0cnl7XG4gICAgICAgICAgICBjb25zdCBpID0gdGhpcy5vcHRpb25zLndhdGNoRm9yLmZpbmRJbmRleCh2YWw9PnZhbD09PXNlcnZpY2UpXG4gICAgICAgICAgICBpZihpPi0xKVxuICAgICAgICAgICAgICAgIHRoaXMub3B0aW9ucy53YXRjaEZvci5zcGxpY2UoaSwxKTtcbiAgICAgICAgICAgIH1jYXRjaChlKXtcbiAgICAgICAgICAgICAgICBsb2dDcml0KFwiJHtMb2dTZXJ2aWNlLmpzfVwiLFwiU2VydmljZSBcXFwiXCIrc2VydmljZStcIlxcXCIgbm90IGRlbGV0ZWRcIik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pXG5cbiAgICAgICAgU19MT0dfQ0hBTkdFX0xFVkVMLnN1YnNjcmliZShsPT57dGhpcy5sZXZlbD1sfSlcblxuICAgICAgICBTX0xPR19GTFVTSC5zdWJzY3JpYmUoKCk9PnRoaXMubG9nPVtdKVxuXG4gICAgICAgIFNfTE9HLnN1YnNjcmliZSgobG9nKT0+e1xuXG4gICAgICAgICAgICBpZihsb2cubGV2ZWw8dGhpcy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ICAgICAgICAgICAgICAgc2hvd2xvZz10cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmKCFzaG93bG9nICYmIHRoaXMubGV2ZWw9PT1MT0dfTEVWRUwuQ1JJVClcbiAgICAgICAgICAgICAgICBzaG93bG9nPXRydWU7XG5cbiAgICAgICAgICAgIGlmKG9wdGlvbmFsKXtcbiAgICAgICAgICAgICAgICBmb3IobGV0IGkgb2Ygb3B0aW9uYWwpXG4gICAgICAgICAgICAgICAgICAgIHRleHQrPVwiLCBcIit0aGlzLmNyZWF0ZVRleHQoaSx0aGlzLmxldmVsKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29uc3QgZCA9IG5ldyBEYXRlKCk7XG4gICAgICAgICAgICBjb25zdCBsb2dpdGVtOklMb2dJdGVtPXtcbiAgICAgICAgICAgICAgICBsZXZlbDpsb2cubGV2ZWwsXG4gICAgICAgICAgICAgICAgaWQ6TG9nU2VydmljZS5uZXh0SUQrKyxcbiAgICAgICAgICAgICAgICB0ZXh0OnRleHQsXG4gICAgICAgICAgICAgICAgdGltZTpkLmdldFRpbWUoKSxcbiAgICAgICAgICAgICAgICBkYXRlOnRoaXMuY3JlYXRlRGF0ZShkKSxcbiAgICAgICAgICAgICAgICBzb3VyY2U6c291cmNlXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIG91dHB1dCBhcyBzdHJpbmdcbiAgICAgICAgICAgIGlmKHRoaXMub3B0aW9ucy5vdXRwdXQpeyAgICBcbiAgICAgICAgICAgICAgICB0aGlzLm9wdGlvbnMub3V0cHV0KGxvZ2l0ZW0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBmaXJlIGxvZyBpdGVtXG4gICAgICAgICAgICBTX0xPR19DUkVBVEVELmludm9rZShsb2dpdGVtKVxuXG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AgY3JlYXRlVGV4dChkYXRhOmFueSxsZXZlbDpMT0dfTEVWRUwpe1xuICAgICAgICBcbiAgICAgICAgaWYoZGF0YSA9PT0gbnVsbClcbiAgICAgICAgICAgIHJldHVybiBcIm51bGxcIlxuXG4gICAgICAgIGlmKGRhdGEgPT09IHVuZGVmaW5lZClcbiAgICAgICAgICAgIHJldHVybiBcInVuZGVmaW5lZFwiXG5cbiAgICAgICAgbGV0IHJlcz1cIlwiXG4gICAgICAgIFxuICAgICAgICBpZih0eXBlb2YgZGF0YSA9PT1cIm9iamVjdFwiKXtcbiAgICAgICAgICAgXG4gICAgICAgICAgICB0cnl7XG4gICAgICAgICAgICAgICAgY29uc3QgdG1wID1KU09OLnN0cmluZ2lmeShkYXRhLG51bGwsXCJcXHRcIilcbiAgICAgICAgICAgICAgICByZXMgPSB0bXAgPz8gXCJcIjtcbiAgICAgICAgICAgIH1jYXRjaChlKXtcbiAgICAgICAgICAgICAgICBpZihcInRvU3RyaW5nXCIgaW4gZGF0YSAmJiBkYXRhLnRvU3RyaW5nICYmIHR5cGVvZiBkYXRhLnRvU3RyaW5nID09PSBcImZ1bmN0aW9uXCIpXG4gICAgICAgICAgICAgICAgICAgIHJlcyA9IGRhdGEudG9TdHJpbmcoKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICBcblxuICAgICAgICAgICAgaWYoYCR7ZGF0YX1gPT09XCJbb2JqZWN0IE1hcF1cIiAmJiBcInNpemVcIiBpbiBkYXRhKXtcbiAgICAgICAgICAgICAgICAvLyB0cnkgdG8gcGFyc2UgbWFwIVxuICAgICAgICAgICAgICAgIHRyeXtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYXJyPVtdO1xuICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgb2YgZGF0YSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGFyci5wdXNoKHtrZXk6aVswXSx2YWx1ZTppWzFdfSlcbiAgICAgICAgICAgICAgICAgICAgcmVzID0gXCJNQVAgKHNpemU6XCIrZGF0YS5zaXplK1wiKSBcXG5cIitKU09OLnN0cmluZ2lmeShhcnIsbnVsbCxcIlxcdFwiKTtcbiAgICAgICAgICAgICAgICB9Y2F0Y2goZSl7fVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZihBcnJheS5pc0FycmF5KGRhdGEpKVxuICAgICAgICAgICAgICAgIHJlcytcIiwgdG90YWwgaXRlbXM6IFwiK2RhdGEubGVuZ3RoICAgXG5cbiAgICAgICAgfWVsc2V7XG4gICAgICAgICAgICByZXM9ZGF0YStcIlwiXG4gICAgICAgIH1cblxuICAgICAgICBpZihyZXMubGVuZ3RoPnRoaXMub3B0aW9ucy50ZXh0TGltaXQgJiYgbGV2ZWw9PT1MT0dfTEVWRUwuSU5GTylcbiAgICAgICAgICAgIHJlcz1yZXMuc3Vic3RyaW5nKDAsdGhpcy5vcHRpb25zLnRleHRMaW1pdCkrXCIuLi4gKHRvdGFsOiBcIityZXMubGVuZ3RoK1wiKVwiXG4gICAgICAgIHJldHVybiByZXNcbiAgICB9XG59Il19
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogService.js","sourceRoot":"","sources":["../../src/apiServer/LogService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAA6C;AAC7C,+CAA4C;AAE5C,IAAY,SAMX;AAND,WAAY,SAAS;IACjB,uCAAK,CAAA;IACL,yCAAM,CAAA;IACN,yCAAM,CAAA;IACN,2CAAO,CAAA;IACP,yCAAM,CAAA;AACV,CAAC,EANW,SAAS,yBAAT,SAAS,QAMpB;AAkBM,MAAM,oBAAoB,GAAC,GAAqB,EAAE;IACrD,OAAO;QACH,SAAS,EAAC,GAAG;QACb,SAAS,EAAC,IAAI;QACd,KAAK,EAAC,SAAS,CAAC,GAAG;KACtB,CAAA;AACL,CAAC,CAAA;AANY,QAAA,oBAAoB,wBAMhC;AAEM,MAAM,OAAO,GAAC,CAAC,OAAW,EAAC,GAAG,QA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AAc,GAAC,GAAG,CAAC,MAAM,GAAC,GAAG,CAAA;QAC7E,OAAO,GAAG,CAAA;IACd,CAAC;;AAjML,gCAkMC","sourcesContent":["import Signal, { Req } from \"badmfck-signal\";\nimport { BaseService } from \"./BaseService\";\n\nexport enum LOG_LEVEL{\n ALL=0,\n INFO=1,\n WARN=2,\n ERROR=3,\n CRIT=4\n}\nexport interface ILogItem{\n id:number,\n level:LOG_LEVEL,\n time:number,\n text:string\n date:string\n source:string\n}\n\nexport interface ILogServiceOptions{\n output?:(data:ILogItem)=>void,\n stackSize:number\n level:LOG_LEVEL\n textLimit:number\n watchFor?:string[]\n}\n\nexport const getDefaultLogOptions=():ILogServiceOptions=>{\n return {\n stackSize:100,\n textLimit:1024,\n level:LOG_LEVEL.ALL\n }\n}\n\nexport const logInfo=(message:any,...optional:any[])=>{S_LOG.invoke({level:LOG_LEVEL.INFO,data:[message,optional]})}\nexport const logWarn=(message:any,...optional:any[])=>{S_LOG.invoke({level:LOG_LEVEL.WARN,data:[message,optional]})}\nexport const logCrit=(message:any,...optional:any[])=>{S_LOG.invoke({level:LOG_LEVEL.CRIT,data:[message,optional]})}\nexport const logError=(message:any,...optional:any[])=>{S_LOG.invoke({level:LOG_LEVEL.ERROR,data:[message,optional]})}\n\n\nexport const S_LOG=new Signal<{level:LOG_LEVEL,data:any[]}>()\nexport const S_LOG_CREATED=new Signal<ILogItem>()\nexport const S_LOG_CHANGE_LEVEL=new Signal<LOG_LEVEL>();\nexport const S_LOG_FLUSH=new Signal<void>();\nexport const S_LOG_ADD_SERVICE_TO_WATCH=new Signal<string>();\nexport const S_LOG_REMOVE_SERVICE_FROM_WATCH=new Signal<string>();\nexport const S_LOG_SET_TEXT_LIMIT=new Signal<number>();\nexport const REQ_LOG=new Req<{lastID:number}|null|undefined,ILogItem[]>();\nexport const REQ_LOG_UNIQUE_SERVICES=new Req<void,{name:string,count:number}[]>();\n\nexport class LogService extends BaseService{\n\n static nextID=0;\n log:ILogItem[]=[];\n options:ILogServiceOptions\n level:LOG_LEVEL=LOG_LEVEL.ALL\n \n uniqueServices:Map<string,number>=new Map() // service name (name.js) & count of log requests\n\n constructor(opt?:ILogServiceOptions){\n super(\"LogService\");\n if(!opt)\n opt=getDefaultLogOptions();\n this.options=opt;\n this.level = opt.level\n this.checkTextLimit();\n }\n\n async init(){\n \n REQ_LOG_UNIQUE_SERVICES.listener = async ()=>{\n const arr=[];\n for(let i of this.uniqueServices)\n arr.push({name:i[0],count:i[1]})\n return arr;\n }\n\n REQ_LOG.listener = async (req) => {\n if(req && req.lastID){ \n let result=this.log.filter(val=>val.id>req.lastID)\n return result\n }else\n return [...this.log]\n }\n\n S_LOG_SET_TEXT_LIMIT.subscribe(l=>{\n this.options.textLimit=l;\n this.checkTextLimit();\n })\n \n S_LOG_ADD_SERVICE_TO_WATCH.subscribe(service=>{\n if(!this.options.watchFor)\n this.options.watchFor=[];\n\n if(this.options.watchFor.find(val=>val===service)){\n logCrit(\"${LogService.js}\",\"Service \\\"\"+service+\"\\\" aleready added\");\n return;\n }\n this.options.watchFor.push(service);\n })\n\n S_LOG_REMOVE_SERVICE_FROM_WATCH.subscribe(service=>{\n if(!this.options.watchFor)\n return;\n\n try{\n const i = this.options.watchFor.findIndex(val=>val===service)\n if(i>-1)\n this.options.watchFor.splice(i,1);\n }catch(e){\n logCrit(\"${LogService.js}\",\"Service \\\"\"+service+\"\\\" not deleted\");\n }\n })\n\n S_LOG_CHANGE_LEVEL.subscribe(l=>{this.level=l})\n\n S_LOG_FLUSH.subscribe(()=>this.log=[])\n\n S_LOG.subscribe((log)=>{\n\n if(log.level<this.level)\n return;\n\n const msg=log.data[0];\n const optional=log.data[1];\n let text = this.createText(msg,log.level);\n let source=\"\";\n if(text.startsWith(\"${\") && text.endsWith(\"}\") && text.indexOf(\".js\")!==-1){\n source=text.substring(2,text.length-1);\n text = \"\"\n }\n\n const usc=this.uniqueServices.get(source) ?? 0;\n this.uniqueServices.set(source,usc+1)\n\n let showlog=true;\n if(this.options && this.options.watchFor && Array.isArray(this.options.watchFor) && this.options.watchFor.length>0){\n showlog=false;\n for(let i of this.options.watchFor){\n if(source.toLowerCase().indexOf(i.toLowerCase())!==-1){\n showlog=true;\n break;\n }\n }\n }\n\n if(!showlog && this.level===LOG_LEVEL.CRIT)\n showlog=true;\n\n if(optional){\n for(let i of optional)\n text+=\", \"+this.createText(i,this.level);\n }\n\n const d = new Date();\n const logitem:ILogItem={\n level:log.level,\n id:LogService.nextID++,\n text:text,\n time:d.getTime(),\n date:this.createDate(d),\n source:source\n }\n\n // output as string\n if(this.options.output){ \n this.options.output(logitem);\n }\n\n // fire log item\n S_LOG_CREATED.invoke(logitem)\n\n // add log item to stack\n this.log.push(logitem);\n let limit = this.options.stackSize ?? 100\n if(limit>1000)\n limit = 1000\n if(this.log.length>limit)\n this.log.shift();\n\n })\n\n super.init();\n }\n\n checkTextLimit(){\n if(this.options.textLimit>1024*4)\n this.options.textLimit=1024*4\n }\n\n createDate(d?:Date):string{\n if(!d)\n d=new Date();\n return d.getFullYear()+\"-\"+this.leadZero(d.getMonth()+1)+\"-\"+this.leadZero(d.getDate())+\" \"+this.leadZero(d.getHours())+\":\"+this.leadZero(d.getMinutes())+\":\"+this.leadZero(d.getSeconds());\n }\n\n leadZero(num:number):string{\n if(num<10)\n return \"0\"+num;\n return num+\"\"\n }\n\n createText(data:any,level:LOG_LEVEL){\n \n if(data === null)\n return \"null\"\n\n if(data === undefined)\n return \"undefined\"\n\n let res=\"\"\n \n if(typeof data ===\"object\"){\n \n try{\n const tmp =JSON.stringify(data,null,\"\\t\")\n res = tmp ?? \"\";\n }catch(e){\n if(\"toString\" in data && data.toString && typeof data.toString === \"function\")\n res = data.toString()\n }\n \n\n if(`${data}`===\"[object Map]\" && \"size\" in data){\n // try to parse map!\n try{\n const arr=[];\n for(let i of data)\n arr.push({key:i[0],value:i[1]})\n res = \"MAP (size:\"+data.size+\") \\n\"+JSON.stringify(arr,null,\"\\t\");\n }catch(e){}\n }\n \n if(Array.isArray(data))\n res+\", total items: \"+data.length \n\n }else{\n res=data+\"\"\n }\n\n if(res.length>this.options.textLimit && level===LOG_LEVEL.INFO)\n res=res.substring(0,this.options.textLimit)+\"... (total: \"+res.length+\")\"\n return res\n }\n}"]}
@@ -429,9 +429,9 @@ class MysqlService extends BaseService_1.BaseService {
429
429
  name: mo.name ?? i,
430
430
  value: mo.value,
431
431
  system: mo.system,
432
- ignoreInInsert: mo.system,
433
- ignoreInUpdate: mo.system,
434
- useInReplace: mo.system
432
+ ignoreInInsert: mo.ignoreInInsert,
433
+ ignoreInUpdate: mo.ignoreInUpdate,
434
+ useInReplace: mo.useInReplace
435
435
  });
436
436
  }
437
437
  else {
@@ -701,3 +701,4 @@ const encrypt = (txt) => {
701
701
  }
702
702
  };
703
703
  exports.default = MysqlService;
704
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTXlzcWxTZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2FwaVNlcnZlci9NeXNxbFNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFQSwrQ0FBNEM7QUFDNUMsaUVBQTZDO0FBQzdDLG1DQUFxRTtBQUNyRSw2Q0FBbUU7QUFDbkUsc0RBQXVDO0FBQ3ZDLDRDQUFtQjtBQUNuQixnREFBdUI7QUFHVixRQUFBLGVBQWUsR0FBQyxJQUFJLHdCQUFNLEVBQVEsQ0FBQTtBQUNsQyxRQUFBLGVBQWUsR0FBRyxJQUFJLG9CQUFHLENBQXdDLFNBQVMsRUFBQyxpQkFBaUIsQ0FBQyxDQUFDO0FBRzlGLFFBQUEsZ0JBQWdCLEdBQUcsSUFBSSxvQkFBRyxDQUF5QixTQUFTLEVBQUMsOEJBQThCLENBQUMsQ0FBQztBQUM3RixRQUFBLGdCQ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5heFRyYW5zYWN0aW9uV2FpdFRpbWU7XG5cbiAgICAgICAgc2V0SW50ZXJ2YWwoKCk9PntcbiAgICAgICAgICAgIC8vIGNoZWNrIHRyYW5zYWN0aW9uc1xuICAgICAgICAgICAgY29uc3Qgbm93ID0gRGF0ZS5ub3coKTtcbiAgICAgICAgICAgIGNvbnN0IGNvdW50ID0gdGhpcy50cmFuc2FjdGlvbnMubGVuZ3RoO1xuICAgICAgICAgICAgY29uc3QgcmVtb3ZlZElEczpudW1iZXJbXT1bXTtcbiAgICAgICAgICAgIGZvcihsZXQgaSBvZiB0aGlzLnRyYW5zYWN0aW9ucyl7XG4gICAgICAgICAgICAgICAgaWYobm93LWkudGltZXN0YW1wPnRoaXMubWF4VHJhbnNhY3Rpb25XYWl0VGltZSl7XG4gICAgICAgICAgICAgICAgICAgIGxvZ0Vycm9yKFwiUmVsZWFzZSB0cmFuc2FjdGlvbiBjb25uZWN0aW9uIGR1ZSB0byB0aW1lb3V0XCIpXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucm9sbGJhY2tUcmFuc2FjdGlvbihpLHRydWUpO1xuICAgICAgICAgICAgICAgICAgICByZW1vdmVkSURzLnB1c2goaS5pZClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMudHJhbnNhY3Rpb25zID0gdGhpcy50cmFuc2FjdGlvbnMuZmlsdGVyKGk9PiFyZW1vdmVkSURzLmluY2x1ZGVzKGkuaWQpKVxuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZih0aGlzLmRlYnVnKVxuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiUmVtb3ZlZDogXCIsY291bnQtdGhpcy50cmFuc2FjdGlvbnMubGVuZ3RoKVxuXG4gICAgICAgICAgICBcblxuICAgICAgICB9LDEwMDAqMzApXG5cbiAgICAgICAgc2V0SW50ZXJ2YWwoKCk9PntcbiAgICAgICAgICAgIGlmKCF0aGlzLmZhaWxSZXBvcn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XCJOT19QT09MXCIsbWVzc2FnZTpcIk15c3FsIHBvb2wgbm90IGNyZWF0ZWRcIn1cblxuICAgICAgICAgICAgLy8gZmluZCBjb25uIGluIHRyYW5zYWN0aW9uc1xuICAgICAgICAgICAgZm9yKGxldCBpIG9mIHRoaXMudHJhbnNhY3Rpb25zKXtcbiAgICAgICAgICAgICAgICBpZihpLmNvbm49PT1jb25uKXtcbiAgICAgICAgICAgICAgICAgICAgbG9nSW5mbyhcIllvdXIgY29ubmVjdGlvbiBpcyBpbiB0cmFuc2FjdGlvblwiKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge2NvZGU6XCJDT05OX0lOX1RSWFwiLGVycm5vOjEwMDAwNSxmYXRhbDp0cnVlLHNxbDpcIlwiLG5hbWU6XCJDT05OX0lOX1RSWFwiLG1lc3NhZ2U6XCJDb25uZWN0aW9uIGlzIGluIHRyYW5zYWN0aW9uXCJ9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb25zdCB0aWQgPSBNeXNxbFNlcnZpY2UubmV4dFRyYW5zYWN0aW9uSUQrKztcbiAgICAgICAgICAgIGlmKHRoaXMuZGVidWcpXG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJCZWdpbiB0cmFuc2FjdGlvbiB3aXRoIGlkIFwiLHRpZClcblxuICAgICAgICAgICAgdHJ5e1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIC8vIGF3YWl0IGNvbm4uYmVnaW5UcmFuc2FjdGlvbigpO1xuICAgICAgICAgICAgICAgIGF3YWl0IGNvbm4ucXVlcnkoXCJTVEFSVCBUUkFOU0FDVElPTlwiKTtcbiAgICAgICAgICAgICAgICAvL2NvbnN0IHJlcyA9IGF3YWl0IGNvbm4ucXVlcnkoXCJTRVQgYXV0b2NvbW1pdD0wXCIpO1xuICAgICAgICAgICAgICAgIGlmKHRoaXMuZGVidWcpXG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiVHJhbnNhY3Rpb24gc3RhcnRlZFwiKVxuXG4gICAgICAgICAgICB9Y2F0Y2goZSl7XG4gICAgICAgICAgICAgICB0aGlzLnJvbGxiYWNrVHJhbnNhY3Rpb24oe2lkOnRpZCxjb25uOmNvbm4sdGltZXN0YW1wOkRhdGUubm93KCkscXVlcmllczpbe3NxbDpcIlNUQVJUIFRSQU5TQUNUSU9OXCIsc3RhdHVzOlwiZXJyb3JcIn1dfSlcbiAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmNyZWF0ZU15c3FsUXVlcnlFcnJvcihlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy50cmFuc2FjdGlvbnMucHVzaCh7XG4gICAgICAgICAgICAgICAgaWQ6dGlkLFxuICAgICAgICAgICAgICAgIHRpbWVzdGFtcDpEYXRlLm5vdygpLFxuICAgICAgICAgICAgICAgIGNvbm46Y29ubixcbiAgICAgICAgICAgICAgICBxdWVyaWVzOltdXG4gICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICBpZih0aGlzLmRlYnVnKVxuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiVHJhbnNhY3Rpb25zIHBvb2w6IFwiLHRoaXMudHJhbnNhY3Rpb25zKVxuXG4gICAgICAgICAgICByZXR1cm4gdGlkO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICBSRVFfTVlTUUxfVFFVRVJZLmxpc3RlbmVyPWFzeW5jIGRhdGE9PntcbiAgICAgICAgICAgIGNvbnN0IHRyeCA9IHRoaXMudHJhbnNhY3Rpb25zLmZpbmQoaT0+aS5pZD09PWRhdGEudGlkKTtcbiAgICAgICAgICAgIGlmKCF0cngpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHtlcnI6IHtcbiAgICAgICAgICAgICAgICAgICAgY29kZTpcIk5PX1RSWFwiLFxuICAgICAgICAgICAgICAgICAgICBlcnJubzoxMDAwMDQsXG4gICAgICAgICAgICAgICAgICAgIGZhdGFsOnRydWUsXG4gICAgICAgICAgICAgICAgICAgIHNxbDpcIlwiLFxuICAgICAgICAgICAgICAgICAgICBuYW1lOlwiTk9fVFJYXCIsXG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6XCJUcmFuc2FjdGlvbiBub3QgZm91bmRcIlxuICAgICAgICAgICAgICAgIH0sZGF0YTpudWxsLHJvbGxiYWNrRXJyb3I6bnVsbH1cblxuICAgICAgICAgICAgY29uc3QgcXVlcnkgPSBNeXNxbFNlcnZpY2UucHJlcGFyZVF1ZXJ5KGRhdGEucXVlcnkucXVlcnksZGF0YS5xdWVyeS5maWVsZHMpO1xuICAgICAgICAgICAgbGV0IGVycj1udWxsO1xuICAgICAgICAgICAgbGV0IHNxbERhdGEgPSBudWxsO1xuXG4gICAgICAgICAgICBpZih0aGlzLmRlYnVnKVxuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiRXhlY3V0ZSBxdWVyeSBvbiB0cmFuc2FjdGlvbjogXCIsdHJ4KVxuXG4gICAgICAgICAgICB0cnl7XG4gICAgICAgICAgICAgICAgc3FsRGF0YSA9IGF3YWl0IHRyeC5jb25uLnF1ZXJ5KHF1ZXJ5KTtcbiAgICAgICAgICAgIH1jYXRjaChlKXsgZXJyID0gdGhpcy5jcmVhdGVNeXNxbFF1ZXJ5RXJyb3IoZSk7fVxuXG4gICAgICAgICAgICBpZihlcnIpXG4gICAgICAgICAgICAgICAgdGhpcy5yb2xsYmFja1RyYW5zYWN0aW9uKHRyeCk7XG5cbiAgICAgICAgICAgIGlmKHRoaXMuZGVidWcpXG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJRdWVyeSBleGVjdXRpb24gc3RhdHVzOlwiLGVycj9lcnIubWVzc2FnZTpcImNvbXBsZXRlZFwiKVxuXG4gICAgICAgICAgICB0cngucXVlcmllcy5wdXNoKHtzcWw6cXVlcnksc3RhdHVzOmVycj9lcnIubWVzc2FnZTpcImNvbXBsZXRlZFwifSlcblxuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBkYXRhOnNxbERhdGE/c3FsRGF0YVswXTpudWxsLFxuICAgICAgICAgICAgICAgIGVycm9yOmVycixcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICBSRVFfTVlTUUxfVFJPTExCQUNLLmxpc3RlbmVyPWFzeW5jICh0aWQ6bnVtYmVyKT0+e1xuICAgICAgICAgICAgY29uc3QgdHJ4ID0gdGhpcy50cmFuc2FjdGlvbnMuZmluZChpPT5pLmlkPT09dGlkKTtcbiAgICAgICAgICAgIGlmKCF0cngpe1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGNvZGU6XCJOT19UUlhcIixcbiAgICAgICAgICAgICAgICAgICAgZXJybm86MTAwMDA0LFxuICAgICAgICAgICAgICAgICAgICBmYXRhbDp0cnVlLFxuICAgICAgICAgICAgICAgICAgICBzcWw6XCJcIixcbiAgICAgICAgICAgICAgICAgICAgbmFtZTpcIk5PX1RSWFwiLFxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOlwiVHJhbnNhY3Rpb24gbm90IGZvdW5kXCJcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGF3YWl0IHRoaXMucm9sbGJhY2tUcmFuc2FjdGlvbih0cngpO1xuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cblxuICAgICAgICBSRVFfTVlTUUxfVENPTU1JVC5saXN0ZW5lcj1hc3luYyAodGlkOm51bWJlcik9PntcbiAgICAgICAgICAgIGNvbnN0IHRyeCA9IHRoaXMudHJhbnNhY3Rpb25zLmZpbmQoaT0+aS5pZD09PXRpZCk7XG4gICAgICAgICAgICBpZighdHJ4KXtcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBjb2RlOlwiTk9fVFJYXCIsXG4gICAgICAgICAgICAgICAgICAgIGVycm5vOjEwMDAwNCxcbiAgICAgICAgICAgICAgICAgICAgZmF0YWw6dHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgc3FsOlwiXCIsXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6XCJOT19UUlhcIixcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTpcIlRyYW5zYWN0aW9uIG5vdCBmb3VuZFwiXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG5cbiAgICAgICAgICAgIGlmKHRoaXMuZGVidWcpXG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2coXCJDb21taXQgdHJhbnNhY3Rpb246XCIsdHJ4KVxuICAgICAgICAgICAgXG4gICAgICAgICAgICAvLyByZW1vdmUgZnJvbSB0cmFuc2FjdGlvbnNcbiAgICAgICAgICAgIHRoaXMudHJhbnNhY3Rpb25zID0gdGhpcy50cmFuc2FjdGlvbnMuZmlsdGVyKGk9PmkuaWQhPT10aWQpO1xuXG4gICAgICAgICAgICBpZih0aGlzLmRlYnVnKVxuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiVHJhbnNhY3Rpb24gcG9vbDpcIix0aGlzLnRyYW5zYWN0aW9ucyApXG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGNvbnN0IGVyciA9IGF3YWl0IHRoaXMuY29tbWl0KHRyeCk7XG5cbiAgICAgICAgICAgIHJldHVybiBlcnI7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBhc3luYyBjb21taXQodHJ4OklUcmFuc2FjdGlvbik6UHJvbWlzZTxNeXNxbEVycm9yfG51bGw+e1xuICAgICAgIFxuICAgICAgICB0cnl7XG4gICAgICAgICAgICBhd2FpdCB0cnguY29ubi5jb21taXQoKTtcbiAgICAgICAgICAgIC8vYXdhaXQgdHJ4LmNvbm4ucXVlcnkoXCJDT01NSVRcIik7XG4gICAgICAgICAgICB0cnguY29ubi5yZW1vdmVBbGxMaXN0ZW5lcnMoKTtcbiAgICAgICAgICAgIHRyeC5jb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jY2Vzc1RpbWUgPSBEYXRlLm5vdygpO1xuXG4gICAgICAgIH1cblxuICAgICAgICBcbiAgICAgICAgaWYodGhpcy5vcHRpb25zLnRyYW5zYWN0aW9uRmFpbFJlcG9ydClcbiAgICAgICAgICAgIHRoaXMub3B0aW9ucy50cmFuc2FjdGlvbkZhaWxSZXBvcnQodHJ4LG1lc3NhZ2UpO1xuICAgIH1cblxuXG4gICAgYXN5bmMgcmVjcmVhdGVQb29sKCk6UHJvbWlzZTxib29sZWFuPntcblxuICAgICAgICBsb2dJbmZvKFwiJHtNeXNxbFNlcnZpY2UuanN9XCIsXCJDb25uZWN0aW5nIHRvIG15c3FsOiBcXG4gSE9TVDogXCIrdGhpcy5vcHRpb25zLmhvc3QrJ1xcbiBQT1JUOicrdGhpcy5vcHRpb25zLnBvcnQpXG5cbiAgICAgICAgaWYodGhpcy5wb29sKXtcbiAgICAgICAgICAgIHRoaXMucG9vbC5yZW1vdmVBbGxMaXN0ZW5lcnMoKTtcbiAgICAgICAgICAgIHRyeXthd2FpdCB0aGlzLnBvb2wuZW5kKCk7fWNhdGNoKGUpe1xuICAgICAgICAgICAgICAgIGxvZ0NyaXQoXCIke015c3FsU2VydmljZS5qc31cIixcIkNhbid0IGNsb3NlIE1ZU1FMIHBvb2whXCIpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLnBvb2wgPSBudWxsO1xuICAgICAgICB9XG5cbiAgICAgICAgdHJ5e1xuICAgICAgICAgICAgdGhpcy5wb29sID1teXNxbC5jcmVhdGVQb29sKHtcbiAgICAgICAgICAgICAgICBob3N0OiB0aGlzLm9wdGlvbnMuaG9zdFxuICAgICAgICAgICAgICAgICx1c2VyOiB0aGlzLm9wdGlvbnMudXNlclxuICAgICAgICAgICAgICAgICxwYXNzd29yZDogdGhpcy5vcHRpb25zLnBhc3N3b3JkXG4gICAgICAgICAgICAgICAgLGRhdGFiYXNlOiB0aGlzLm9wdGlvbnMuZGF0YWJhc2VcbiAgICAgICAgIC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VElPTiBFTlFVRVVFRFwiKVxuICAgICAgICB9KVxuICAgICAgICBcbiAgICAgICAgLy8gQ2hlY2sgY29ubmVjdGlvblxuICAgICAgICBpZih0aGlzLmRlYnVnKVxuICAgICAgICAgICAgY29uc29sZS5sb2coXCJDaGVjayBteXNxbCBjb25uZWN0aW9uXCIpXG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShhc3luYyAocmVzb2x2ZSxyZWplY3QpPT57XG4gICAgICAgICAgICB0cnl7XG4gICAgICAgICAgICAgICAgY29uc3QgY29ubiA9IGF3YWl0IHRoaXMucG9vbD8uZ2V0Q29ubmVjdGlvbigpXG4gICAgICAgICAgICAgICAgaWYoY29ubil7XG4gICAgICAgICAgICAgICAgICAgIGNvbm4/LnJlbGVhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgbG9nSW5mbyhcIiR7TXlzcWxTZXJ2aWNlLmpzfVwiLFwiQ29ubmVjdGVkIHRvIE1ZU1FMIVwiKVxuICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHRydWUpXG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIH1lbHNlXG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUoZmFsc2UpXG4gICAgICAgICAgICB9Y2F0Y2goZSl7XG4gICAgICAgICAgICAgICAgbG9nQ3JpdChcIiR7TXlzcWxTZXJ2aWNlLmpzfVwiLFwiQ2FuJ3QgY29ubmVjdCB0byBNWVNRTCFcIilcbiAgICAgICAgICAgICAgICByZXNvbHZlKGZhbHNlKVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgIH1cblxuICAgIGFzeW5jIG9uQXBwbGljYXRpb25SZWFkeSgpIHt9XG5cblxuICAgIHN0YXRpYyBmaWVsZHNUb09iamVjdChmaWVsZHM6TXlzcWxRdWVyeUZpZWxkW118TXlzcWxRdWVyeUZpZWxkT2JqZWN0LGlnbm9yZVN5c3RlbVBhcmFtZXRlcnM/OmJvb2xlYW4pOk15c3FsUXVlcnlGaWVsZE9iamVjdHtcbiAgICAgICAgaWYoIUFycmF5LmlzQXJyYXkoZmllbGRzKSlcbiAgICAgICAgICAgIHJldHVybiBmaWVsZHM7XG4gICAgICAgIGNvbnN0IG9iajpNeXNxbFF1ZXJ5RmllbGRPYmplY3Q9e307XG4gICAgICAgIGZvcihsZXQgaSBvZiBmaWVsZHMpe1xuICAgICAgICAgICAgaWYoIWkubmFtZSlcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGlmKHR5cGVvZiBpLnZhbHVlIT09IFwib2JqZWN0XCIpXG4gICAgICAgICAgICAgICAgb2JqW2kubmFtZV09aS52YWx1ZTtcbiAgICAgICAgICAgIGVsc2V7XG4gICAgICAgICAgICAgICAgaWYoIWlnbm9yZVN5c3RlbVBhcmFtZXRlcnMpe1xuICAgICAgICAgICAgICAgICAgICBvYmpbaS5uYW1lXT17XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTppLnZhbHVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3lzdGVtOmkuc3lzdGVtLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWdub3JlSW5JbnNlcnQ6aS5pZ25vcmVJbkluc2VydCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlnbm9yZUluVXBkYXRlOmkuaWdub3JlSW5VcGRhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICB1c2VJblJlcGxhY2U6aS51c2VJblJlcGxhY2UsXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOmkubmFtZVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfWVsc2VcbiAgICAgICAgICAgICAgICAgICAgb2JqW2kubmFtZV09aS52YWx1ZVxuICAgICAgICAgICAgfVxuXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG9iajtcbiAgICB9XG5cbiAgICBzdGF0aWMgb2JqZWN0VG9GaWVsZHMob2JqOk15c3FsUXVlcnlGaWVsZE9iamVjdHxNeXNxbFF1ZXJ5RmllbGRbXSk6TXlzcWxRdWVyeUZpZWxkW117XG4gICAgICAgIGlmKEFycmF5LmlzQXJyYXkob2JqKSlcbiAgICAgICAgICAgIHJldHVybiBvYmo7XG4gICAgICAgIGNvbnN0IGZpZWxkczpNeXNxbFF1ZXJ5RmllbGRbXT1bXTtcbiAgICAgICAgZm9yKGxldCBpIGluIG9iail7XG4gICAgICAgICAgICBpZihvYmpbaV0gJiYgdHlwZW9mIG9ialtpXSA9PT0gXCJvYmplY3RcIil7XG4gICAgICAgICAgICAgICAgbGV0IG1vID0gb2JqW2ldIGFzIFJlY29yZDxzdHJpbmcsc3RyaW5nfG51bWJlcnxib29sZWFufG51bGx8dW5kZWZpbmVkPjtcbiAgICAgICAgICAgICAgICBpZighbW8pe1xuICAgICAgICAgICAgICAgICAgICBtbz17XG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOmksXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTpudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3lzdGVtOmZhbHNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgaWdub3JlSW5JbnNlcnQ6ZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgICAgICBpZ25vcmVJblVwZGF0ZTpmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVzZUluUmVwbGFjZTpmYWxzZVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGZpZWxkcy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgbmFtZTptby5uYW1lIGFzIHN0cmluZyA/PyBpLFxuICAgICAgICAgICAgICAgICAgICB2YWx1ZTptby52YWx1ZSxcbiAgICAgICAgICAgICAgICAgICAgc3lzdGVtOm1vLnN5c3RlbSBhcyBib29sZWFuLFxuICAgICAgICAgICAgICAgICAgICBpZ25vcmVJbkluc2VydDptby5pZ25vcmVJbkluc2VydCBhcyBib29sZWFuLFxuICAgICAgICAgICAgICAgICAgICBpZ25vcmVJblVwZGF0ZTptby5pZ25vcmVJblVwZGF0ZSBhcyBib29sZWFuLFxuICAgICAgICAgICAgICAgICAgICB1c2VJblJlcGxhY2U6bW8udXNlSW5SZXBsYWNlIGFzIGJvb2xlYW5cbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfWVsc2V7XG4gICAgICAgICAgICAgICAgZmllbGRzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBuYW1lOmksXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOm9ialtpXSBhcyBzdHJpbmd8bnVtYmVyfGJvb2xlYW58bnVsbHx1bmRlZmluZWRcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmaWVsZHM7XG4gICAgfVxuXG4gICAgc3RhdGljIHByZXBhcmVRdWVyeShxdWVyeTpzdHJpbmcsZmllbGRzOk15c3FsUXVlcnlGaWVsZFtdfE15c3FsUXVlcnlGaWVsZE9iamVjdCk6c3RyaW5ne1xuICAgICAgICBcbiAgICAgICAgaWYoIUFycmF5LmlzQXJyYXkoZmllbGRzKSlcbiAgICAgICAgICAgIGZpZWxkcyA9IE15c3FsU2VydmljZS5vYmplY3RUb0ZpZWxkcyhmaWVsZHMpO1xuXG4gICAgICAgIGZvcihsZXQgaSBvZiBmaWVsZHMpe1xuICAgICAgICAgICAgY29uc3QgdmFsID10aGlzLnByZXBhcmVRdWVyeUZpZWxkVmFsdWUoaS52YWx1ZSxpLnN5c3RlbSk7XG4gICAgICAgICAgICBpLl9wYXJzZWRWYWx1ZT12YWw7XG4gICAgICAgICAgICBxdWVyeT1xdWVyeS5yZXBsYWNlQWxsKFwiQFwiK2kubmFtZSx2YWwrXCJcIilcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRtcCA9IHF1ZXJ5LnRvTG93ZXJDYXNlKCk7XG4gICAgICAgIGlmKHRtcC5pbmR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AgICAgICAgIGxldCBvbmluc2VydFZhbHVlcz1bXVxuICAgICAgICAgICAgZm9yKGxldCBpIG9mIGZpZWxkcyl7XG4gICAgICAgICAgICAgICAgaWYoaS5pZ25vcmVJbkluc2VydClcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgb25pbnNlcnROYW1lcy5wdXNoKGkubmFtZSlcbiAgICAgICAgICAgICAgICBvbmluc2VydFZhbHVlcy5wdXNoKGkuX3BhcnNlZFZhbHVlKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcXVlcnkgPSBxdWVyeS5yZXBsYWNlQWxsKFwiQGluc2VydFwiLGAoJHtvbmluc2VydE5hbWVzLmpvaW4oXCIsXCIpfSkgVkFMVUVTICgke29uaW5zZXJ0VmFsdWVzLmpvaW4oXCIsXCIpfSlgKVxuICAgICAgICB9XG5cbiAgICAgICAgaWYocXVlcnkuaW5kZXhPZihcIkBvbnVwZGF0ZVwiKSE9PS0xKXtcbiAgICAgICAgICAgIGxldCBvblVwZGF0ZT1bXVxuICAgICAgICAgICAgZm9yKGxldCBpIG9mIGZpZWxkcyl7XG4gICAgICAgICAgICAgICAgaWYoaS5pZ25vcmVJblVwZGF0ZSlcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgb25VcGRhdGUucHVzaCgnYCcraS5uYW1lLnJlcGxhY2VBbGwoXCJgXCIsJycpLnJlcGxhY2VBbGwoJ1xcXCInLFwiXCIpLnJlcGxhY2VBbGwoJ1xcJycsXCJcIikrJ2AgPSAnK2kuX3BhcnNlZFZhbHVlKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcXVlcnkgPSBxdWVyeS5yZXBsYWNlQWxsKFwiQG9udXBkYXRlXCIsb25VcGRhdGUuam9pbihcIiAsIFwiKSlcbiAgICAgICBcbiAgICAgICAgfVxuXG4gICAgICAgIGlmKHF1ZXJ5LmluZGV4T2YoJ0BvbmR1cGxpY2F0ZScpIT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IG51bGwgfHwgdmFsdWUgPT09IHVuZGVmaW5lZClcbiAgICAgICAgICAgIHJldHVybiBcIk5VTExcIlxuICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgfVxuXG5cbiAgICBhc3luYyBleGVjdXRlKHF1ZXJ5OnN0cmluZyxyb2xsYmFja1F1ZXJ5OnN0cmluZ3xudWxsLHRyYW5zYWN0aW9uSUQ6bnVtYmVyKTpQcm9taXNlPE15c3FsUmVzdWx0PntcbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKGFzeW5jIChyZXNvbHZlOihkYXRhOk15c3FsUmVzdWx0KT0+dm9pZCxyZWplY3QpPT57XG4gICAgICAgICAgICAvLyBDaGVjayBwb29sXG4gICAgICAgICAgICBpZighdGhpcy5wb29sKXtcbiAgICAgICAgICAgICAgICBsb2dFcnJvcihcIiR7TXlzcWxTZXJ2aWNlLmpzfVwiLFwiTm8gcG9vbFwiKVxuICAgICAgICAgICAgICAgIHJlc29sdmUoe1xuICAgICAgICAgICAgICAgICAgICBlcnJvcjp7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb2RlOiBcIk5PX1BPT0xcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm5vOiAxMDAwMDAsXG4gICAgICAgICAgICAgICAgICAgICAgICBmYXRhbDogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNxbDogcXVlcnksXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOlwiTk9fUE9PTFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTpcIk15c3FsIHBvb2wgbm90IGNyZWF0ZWRcIlxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBkYXRhOm51bGwsXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgdHJ5e1xuICAgICAgICAgICAgICAgIGxldCBjb25uOm15c3FsLlBvb2xDb25uZWN0aW9ufG51bGw9bnVsbFxuICAgICAgICAgICAgICAgIGlmKHRyYW5zYWN0aW9uSUQgJiYgdHJhbnNhY3Rpb25JRD4wKXtcbiAgICAgICAgICAgICAgICAgICAgY29ubiA9IHRoaXMudHJhbnNhY3Rpb25zLmZpbmQoaT0+aS5pZD09PXRyYW5zYWN0aW9uSUQpPy5jb25uID8/IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIGlmKHRoaXMuZGVidWcpXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhcIkV4ZWN1dGUgcXVlcnkgb24gdHJhbnNhY3Rpb246IFwiLGNvbm4pXG4gICAgICAgICAgICAgICAgfWVsc2V7XG4gICAgICAgICAgICAgICAgICAgIGNvbm4gPSBhd2FpdCB0aGlzLnBvb2wuZ2V0Q29ubmVjdGlvbigpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmKHRoaXMuZGVidWcpXG4gICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKFwiRXhlY3V0ZSBxdWVyeVwiLGNvbm4pXG5cbiAgICAgICAgICAgICAgICAvLyBpZiBjb25uZWN0aW9uIG5vdCBjcmVhdGVkXG4gICAgICAgICAgICAgICAgaWYoIWNvbm4pe1xuICAgICAgICAgICAgICAgICAgICBsb2dDcml0KFwiJHtNeXNxbFNlcnZpY2UuanN9XCIsYE5vIGNvbm5lY3Rpb24gY3JlYXRlZCFgKVxuICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yOntcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlOiBcIk5PX0NPTk5cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJubzogMTAwMDAxLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZhdGFsOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNxbDogcXVlcnksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTpcIk5PX0NPTk5cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOlwiTXlzcWwgcG9vbCBjYW50IGdldCBjb25uZWN0aW9uXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhOm51bGwsXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAvLyBEbyBzZW5kIHF1ZXJ5XG4gICAgICAgICAgICAgICAgZm9yKGxldCBpIG9mIHRoaXMudHJhbnNhY3Rpb25zKXtcbiAgICAgICAgICAgICAgICAgICAgaWYoaS5jb25uPT09Y29ubil7XG4gICAgICAgICAgICAgICAgICAgICAgICBsb2dJbmZvKFwiWW91ciBjb25uZWN0aW9uIGlzIGluIHRyYW5zYWN0aW9uXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLnNlbmRRdWVyeShjb25uLHF1ZXJ5LHJlc29sdmUscm9sbGJhY2tRdWVyeSk7XG5cbiAgICAgICAgICAgIH1jYXRjaChlKXtcbiAgICAgICAgICAgICAgICBsb2dFcnJvcihcIiR7TXlzcWxTZXJ2aWNlLmpzfVwiLGUpO1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIC8vIHJlY3JlYXRlIHBvb2wsIGNvbm5lY3Rpb24gZXJyb3JcbiAgICAgICAgICAgICAgICBpZihgJHtlfWAuaW5kZXhPZignRUNPTk5SRUZVU0VEJykhPT0tMSlcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZWNyZWF0ZVBvb2woKTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICByZXNvbHZlKHtcbiAgICAgICAgICAgICAgICAgICAgZXJyb3I6e1xuICAgICAgICAgICAgICAgICAgICAgICAgY29kZTogXCJOT19DT05OXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJubzogMTAwMDAxLFxuICAgICAgICAgICAgICAgICAgICAgICAgZmF0YWw6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICBzcWw6IHF1ZXJ5LFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTpcIk5PX0NPTk5cIixcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6KGUgJiYgdHlwZW9mIGUgPT09IFwib2JqZWN0XCIgJiYgXCJtZXNzYWdlXCIgaW4gZSBhcyBhbnkpPyhlIGFzIGFueSkubWVzc2FnZTpcIk15c3FsIGNhbnQgZ2V0IGNvbm5lY3Rpb25cIlxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBkYXRhOm51bGxcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgYXN5bmMgc2VuZFF1ZXJ5KGNvbm46bXlzcWwuUG9vbENvbm5lY3Rpb24scXVlcnk6c3RyaW5nLHJlc29sdmU6KGRhdGE6TXlzcWxSZXN1bHQpPT52b2lkLHJvbGxiYWNrOnN0cmluZ3xudWxsKXtcbiAgICAgICAgXG4gICAgICAgIGxldCBlcnJDYXRjaGVkPWZhbHNlO1xuXG4gICAgICAgIGNvbm4ub24oXCJlcnJvclwiLGFzeW5jIGVycj0+e1xuICAgICAgICAgICAgZXJyQ2F0Y2hlZD10cnVlO1xuXG4gICAgICAgICAgICBsZXQgcm9sbGJhY2tFcnJvciA9IG51bGw7XG4gICAgICAgICAgICBpZihyb2xsYmFjaylcbiAgICAgICAgICAgICAgICByb2xsYmFja0Vycm9yPShhd2FpdCB0aGlzLnF1ZXJ5QXN5bmMoY29ubixyb2xsYmFjaykpLmVyclxuICAgICAgIFxuICAgICAgICAgICAgbG9nRXJyb3IoXCIke015c3FsU2VydmljZS5qc30tPmNvbm4ub24oJ2Vycm9yJylcIixlcnIpXG5cbiAgICAgICAgICAgIC8vIGNsb3NlIGNvbm4gb24gc3VjY2Vzc1xuICAgICAgICAgICAgdHJ5e1xuICAgICAgICAgICAgICAgIGNvbm4ucmVsZWFzZSgpO1xuICAgICAgICAgICAgICAgIGNvbm4ucmVtb3ZlQWxsTGlzdGVuZXJzKCk7XG4gICAgICAgICAgICB9Y2F0Y2goZSl7fVxuICAgICBcbiAgICAgICAgICAgIHJlc29sdmUoe1xuICAgICAgICAgICAgICAgIGVycm9yOntcbiAgICAgICAgICAgICAgICAgICAgY29kZTogXCJDT05OX0VSUlwiLFxuICAgICAgICAgICAgICAgICAgICBlcnJubzogMTAwMDAzLFxuICAgICAgICAgICAgICAgICAgICBmYXRhbDogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgc3FsOiBxdWVyeSxcbiAgICAgICAgICAgICAgICAgICAgbmFtZTpcIkNPTk5fRVJSXCIsXG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6XCJFcnJvcjogXCIrZXJyXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBkYXRhOm51bGwsXG4gICAgICAgICAgICAgICAgcm9sbGJhY2tFcnJvcjpyb2xsYmFja0Vycm9yXG4gICAgICAgICAgICB9KVxuICAgICAgICB9KVxuXG5cblxuICAgICAgICBsb2dJbmZvKFwiJHtNeXNxbFNlcnZpY2UuanN9XCIscXVlcnkpXG5cbiAgICAgICAgLy8gc2VuZCBxdWVyeVxuICAgICAgICBjb25zdCBxdWVyeVJlc3VsdCA9IGF3YWl0IHRoaXMucXVlcnlBc3luYyhjb25uLHF1ZXJ5KTtcblxuICAgICAgICAvLyBoYW5kbGUgZXJyb3JcbiAgICAgICAgaWYocXVlcnlSZXN1bHQuZXJyKXtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgLy8gcm9sbGJhY2tcbiAgICAgICAgICAgIGxldCByb2xsYmFja0Vycm9yPW51bGw7XG4gICAgICAgICAgICBpZihyb2xsYmFjaylcbiAgICAgICAgICAgICAgICByb2xsYmFja0Vycm9yPShhd2FpdCB0aGlzLnF1ZXJ5QXN5bmMoY29ubixyb2xsYmFjaykpLmVyclxuXG4gICAgICAgICAgICAvLyBjbG9zZSBjb25uZWN0aW9uXG4gICAgICAgICAgICB0cnl7XG4gICAgICAgICAgICAgICAgY29ubi5yZWxlYXNlKCk7XG4gICAgICAgICAgICAgICAgY29ubi5yZW1vdmVBbGxMaXN0ZW5lcnMoKTtcbiAgICAgICAgICAgIH1jYXRjaChlKXt9XG5cbiAgICAgICAgICAgIC8vIGRldGVybWluZSBkdXBsaWNhdGUgZXJyb3JcbiAgICAgICAgICAgIGNvbnN0IGR1cCA9IGAke3F1ZXJ5UmVzdWx0LmVycn1gLnRvTG93ZXJDYXNlKCkuaW5kZXhPZihcImVyX2R1cF9lbnRyeVwiKSE9PS0xO1xuXG4gICAgICAgICAgICBsb2dFcnJvcihcIiR7TXlzcWxTZXJ2aWNlLmpzfS0+cXVlcnkgZXJyb3JcIixxdWVyeVJlc3VsdC5lcnIpO1xuXG4gICAgICAgICAgICByZXNvbHZlKHtcbiAgICAgICAgICAgICAgICBlcnJvcjpxdWVyeVJlc3VsdC5lcnIsXG4gICAgICAgICAgICAgICAgZGF0YTpudWxsLFxuICAgICAgICAgICAgICAgIHJvbGxiYWNrRXJyb3I6cm9sbGJhY2tFcnJvcixcbiAgICAgICAgICAgICAgICBpc0R1cGxpY2F0ZUVycm9yOmR1cFxuICAgICAgICAgICAgfSlcbiAgICAgICAgfVxuXG5cbiAgICAgICAgLy8gY2xvc2UgY29ubiBvbiBzdWNjZXNzXG4gICAgICAgIHRyeXtcbiAgICAgICAgICAgIGNvbm4ucmVsZWFzZSgpO1xuICAgICAgICAgICAgY29ubi5yZW1vdmVBbGxMaXN0ZW5lcnMoKTtcbiAgICAgICAgfWNhdGNoKGUpe31cblxuICAgICAgICAvLyBoYW5kbGUgc3VjY2Vzc1xuICAgICAgICByZXNvbHZlKHtcbiAgICAgICAgICAgIGVycm9yOnF1ZXJ5UmVzdWx0LmVycixcbiAgICAgICAgICAgIGRhdGE6cXVlcnlSZXN1bHQucmVzdWx0cyxcbiAgICAgICAgfSlcblxuICAgIH1cblxuXG4gICAgLy8gQXN5bmMgcXVlcnkgd3JhcHBlciB0byBjb25uLnF1ZXJ5XG4gICAgYXN5bmMgcXVlcnlBc3luYyhjb25uOm15c3FsLlBvb2xDb25uZWN0aW9uLHF1ZXJ5OnN0cmluZyk6UHJvbWlzZTx7ZXJyOk15c3FsRXJyb3J8bnVsbCxyZXN1bHRzPzphbnl9PntcblxuICAgICAgICBsZXQgcmVzdWx0PW51bGw7XG4gICAgICAgIHRyeXtcbiAgICAgICAgICAgIHJlc3VsdCA9IGF3YWl0IGNvbm4ucXVlcnkocXVlcnkpO1xuICAgICAgICB9Y2F0Y2goZSl7XG4gICAgICAgICAgICByZXR1cm4ge2Vycjp0aGlzLmNyZWF0ZU15c3FsUXVlcnlFcnJvcihlKX07XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgZXJyOm51bGwsXG4gICAgICAgICAgICByZXN1bHRzOnJlc3VsdFswXSxcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGNyZWF0ZU15c3FsUXVlcnlFcnJvcihlcnI6YW55KTpNeXNxbEVycm9ye1xuICAgICAgICBpZihlcnIgJiYgIHR5cGVvZiBlcnI9PT1cIm9iamVjdFwiICYmIFwiY29kZVwiIGluIGVyciAmJiBcImVycm5vXCIgaW4gZXJyICYmIFwic3FsXCIgaW4gZXJyICYmIFwibmFtZVwiIGluIGVyciAmJiBcIm1lc3NhZ2VcIiBpbiBlcnIpe1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgY29kZTogZXJyLmNvZGUsXG4gICAgICAgICAgICAgICAgICAgIGVycm5vOiBlcnIuZXJybm8sXG4gICAgICAgICAgICAgICAgICAgIHNxbDogZXJyLnNxbCxcbiAgICAgICAgICAgICAgICAgICAgbmFtZTplcnIubmFtZSxcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTplcnIubWVzc2FnZVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgfVxuICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgY29kZTogXCJRVUVSWV9FUlJcIixcbiAgICAgICAgICAgICAgICBlcnJubzogMTAwMDAyLFxuICAgICAgICAgICAgICAgIGZhdGFsOiB0cnVlLFxuICAgICAgICAgICAgICAgIHNxbDogXCJubyBxdWVyeVwiLFxuICAgICAgICAgICAgICAgIG5hbWU6XCJRVUVSWV9FUlJcIixcbiAgICAgICAgICAgICAgICBtZXNzYWdlOlwiRXJyb3I6IFwiKyhlcnIpP2VycjpcIlwiXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG59XG5cblxuY29uc3Qgc2VjcmV0X2tleT1cIkFLTFdrYWp3JV4mZGd3cWh3Izk4NDUzaTIzYmZrMjNybjJrbmtuZ2xyZ2plaXRcIlxuY29uc3Qgc2VjcmV0X2l2PVwicnRoYWRyZmsyM3JuMmtuIypGTktBQGd0NDRkZjN0c2xyZ2ojIyFpdFwiXG5cbi8vIEdlbmVyYXRlIHNlY3JldCBoYXNoIHdpdGggY3J5cHRvIHRvIHVzZSBmb3IgZW5jcnlwdGlvblxuY29uc3Qga2V5ID0gY3JlYXRlSGFzaCgnc2hhNTEyJykudXBkYXRlKHNlY3JldF9rZXkpLmRpZ2VzdCgnaGV4Jykuc3Vic3RyaW5nKDAsIDMyKVxuY29uc3QgaXYgPSBjcmVhdGVIYXNoKCdzaGE1MTInKS51cGRhdGUoc2VjcmV0X2l2KS5kaWdlc3QoJ2hleCcpLnN1YnN0cmluZygwLCAxNilcblxuY29uc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