[omniORB] Attributes in omniORBpy

Kevin Wooten kwooten@itracs.com
Thu Nov 21 23:21:01 2002


This is a multi-part message in MIME format.

------_=_NextPart_001_01C291B1.7E249746
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

Even better Python 2.2 has descriptors that support simple get/set
properties e.g.

	class test:
		def getProp(self):
			return self.__prop
		def setProp(self,val):
			self.__prop =3D val

		#define a property
		prop =3D property( getProp, setProp, None, "a property" )
		# The setter (second parameter) can be None for
read-only 			# attributes
		# The third parameter is the name of an optional deleter
for
		# use in "del test.prop" statements, and the last is a
doc
		# string

These additions are sufficiently non-intrusive and could be added
without introducing problems in the mapping ( since the only token it
introduces is the name of the attribute itself ). This is entirely up to
Duncan though.

I have already altered my omniidl's python backend to emit these
properties.
The file is attached. It should replace the python.py file in your
omniidl_be directory.

-----Original Message-----
From: Leandro Fanzone [mailto:leandro@hasar.com]=20
Sent: Thursday, November 21, 2002 11:25 AM
To: omniorb-list@omniorb-support.com
Subject: [omniORB] Attributes in omniORBpy

Attributes in omniORBpy are mapped as methods (_get_/_set_). Though I=20
know the OMG specification says it must be so, I thought that it would=20
be useful to also have a direct mapping using the=20
__setattr__/__getattr__ technique; these methods could call the=20
"official" methods using exec, for example. In this way we could access=20
the attributes from a client in a more straightforward fashion than=20
calling methods. I'm sure you already gave this some thought; did you=20
find something that prevented this from being done?
Thank you in advance,

Leandro Fanzone

_______________________________________________
omniORB-list mailing list
omniORB-list@omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list

------_=_NextPart_001_01C291B1.7E249746
Content-Type: application/octet-stream;
	name="python.py"
Content-Transfer-Encoding: base64
Content-Description: python.py
Content-Disposition: attachment;
	filename="python.py"

IyAtKi0gcHl0aG9uIC0qLQ0KIyAgICAgICAgICAgICAgICAgICAgICAgICAgIFBhY2thZ2UgICA6
IG9tbmlpZGwNCiMgcHl0aG9uLnB5ICAgICAgICAgICAgICAgICBDcmVhdGVkIG9uOiAxOTk5LzE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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nLnNwbGl0KHN0
dWJfcGFja2FnZSwgIi4iKSkNCiAgICAgICAgICAgIGlmIHN0dWJfcGFja2FnZSAhPSAiIjoNCiAg
ICAgICAgICAgICAgICBzdHViX3BhY2thZ2UgPSBzdHViX3BhY2thZ2UgKyAiLiINCg0KICAgICAg
ICBlbGlmIGFyZ1s6OF0gPT0gInBhY2thZ2U9IjoNCiAgICAgICAgICAgIG1vZHVsZV9wYWNrYWdl
ID0gc3R1Yl9wYWNrYWdlID0gYXJnWzg6XQ0KICAgICAgICAgICAgc3R1Yl9kaXJlY3RvcnkgPSBh
cHBseShvcy5wYXRoLmpvaW4sDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0
cmluZy5zcGxpdChzdHViX3BhY2thZ2UsICIuIikpDQogICAgICAgICAgICBpZiBtb2R1bGVfcGFj
a2FnZSAhPSAiIjoNCiAgICAgICAgICAgICAgICBtb2R1bGVfcGFja2FnZSA9IHN0dWJfcGFja2Fn
ZSA9IG1vZHVsZV9wYWNrYWdlICsgIi4iDQoNCiAgICAgICAgZWxpZiBhcmdbOjddID09ICJnbG9i
YWw9IjoNCiAgICAgICAgICAgIGdsb2JhbF9tb2R1bGUgPSBhcmdbNzpdDQogICAgICAgICAgICBp
ZiBnbG9iYWxfbW9kdWxlID09ICIiOg0KICAgICAgICAgICAgICAgIHN5cy5zdGRlcnIud3JpdGUo
bWFpbi5jbWRuYW1lICsgXA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIjogWW91
IG1heSBub3QgaGF2ZSBhbiB1bm5hbWVkIGdsb2JhbCAiIFwNCiAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICJtb2R1bGUuXG4iKQ0KICAgICAgICAgICAgICAgIHN5cy5leGl0KDEpDQog
ICAgICAgICAgICAgICAgDQogICAgICAgIGVsc2U6DQogICAgICAgICAgICBzeXMuc3RkZXJyLndy
aXRlKG1haW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sZi5zdC5vdXQoaW1wb3J0X2lkbF9m
aWxlLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkbGZpbGU9bm9kZS5maWxlKCksDQog
ICAgICAgICAgICAgICAgICAgICAgICAgICAgaWZpbGVuYW1lPXN0dWJfcGFja2FnZSArIGlmaWxl
bmFtZSkNCiAgICAgICAgICAgIHJldHVybiAxDQogICAgICAgIA0KICAgICMNCiAgICAjIFRoZSBn
bG9iYWwgbW9kdWxlDQogICAgIw0KICAgIGRlZiB2aXNpdEFTVChzZWxmLCBub2RlKToNCiAgICAg
ICAgc2VsZi5hdF9tb2R1bGVfc2NvcGUgPSAxDQogICAgICAgIHNlbGYuYXRfZ2xvYmFsX3Njb3Bl
ID0gMQ0KICAgICAgICBzZWxmLmN1cnJlbnRTY29wZSAgICA9IFsiXzBfIiArIGdsb2JhbF9tb2R1
bGVdDQoNCiAgICAgICAgZGVjbHNfaW5fZ2xvYmFsX21vZHVsZSA9IDANCg0KICAgICAgICBmb3Ig
biBpbiBub2RlLmRlY2xhcmF0aW9ucygpOg0KICAgICAgICAgICAgaWYgbm90IGlzaW5zdGFuY2Uo
biwgaWRsYXN0Lk1vZHVsZSk6DQogICAgICAgICAgICAgICAgZGVjbHNfaW5fZ2xvYmFsX21vZHVs
ZSA9IDENCiAgICAgICAgICAgICAgICBicmVhaw0KDQogICAgICAgIGlmIGRlY2xzX2luX2dsb2Jh
bF9tb2R1bGU6DQogICAgICAgICAgICBzZWxmLm1vZG5hbWUgPSBnbG9iYWxfbW9kdWxlDQogICAg
ICAgICAgICBzZWxmLnN0Lm91dChtb2R1bGVfc3RhcnQsDQogICAgICAgICAgICAgICAgICAgICAg
ICBzbmFtZT1nbG9iYWxfbW9kdWxlLA0KICAgICAgICAgICAgICAgICAgICAgICAgc19zbmFtZT1z
a2VsZXRvbk1vZHVsZU5hbWUoZ2xvYmFsX21vZHVsZSksDQogICAgICAgICAgICAgICAgICAgICAg
ICBmaWxlbmFtZT1ub2RlLmZpb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s
Zi5tb2RuYW1lKQ0KDQogICAgIw0KICAgICMgSW50ZXJmYWNlDQogICAgIw0KICAgIGRlZiB2aXNp
dEludGVyZmFjZShzZWxmLCBub2RlKToNCiAgICAgICAgaWYgc2VsZi5oYW5kbGVJbXBvcnRlZChu
b2RlKTogcmV0dXJuDQoNCiAgICAgICAgaWYgbm9kZS5hYnN0cmFjdCgpOg0KICAgICAgICAgICAg
c3lzLnN0ZGVyci53cml0ZShub2RlLmZpbGUoKSArICI6IiArIHN0cihub2RlLmxpbmUoKSkgKyBc
DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICI6IG9tbmlPUkJweSBkb2VzIG5vdCBzdXBw
b3J0IGFic3RyYWN0ICIgXA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiaW50ZXJmYWNl
c1xuIikNCiAgICAgICAgICAgIHN5cy5leGl0KDEpDQoNCiAgICAgICAgYXNzZXJ0IHNlbGYuYXRf
bW9kdWxlX3Njb3BlDQogICAgICAgIGlmaWQgPSBtYW5nbGUobm9kZS5pZGVudGlmaWVyKCkpDQoN
CiAgICAgICAgaWYgbGVuKG5vZGUuaW5oZXJpdHMoKSkgPiAwOg0KICAgICAgICAgICAgaW5oZXJp
dGwgPSBbXQ0KICAgICAgICAgICAgZm9yIGkgaW4gbm9kZS5pbmhlcml0cygpOg0KICAgICAgICAg
ICAgICAgIHdoaWxlIGlzaW5zdGFuY2UoaSwgaWRsYXN0LkRlY2xhcmF0b3IpOg0KICAgICAgICAg
ICAgICAgICAgICBpID0gaS5hbGlhcygpLmFsaWFzVHlwZSgpDQogICAgICAgICAgICAgICAgaW5o
ZXJpdGwuYXBwZW5kKGRvdE5hbWUoZml4dXBTY29wZWROYW1lKGkuc2NvcGVkTmFtZSgpKSkpDQog
ICAgICAgICAgICANCiAgICAgICAgICAgIGluaGVyaXRzID0gIigiICsgc3RyaW5nLmpvaW4oaW5o
ZXJpdGwsICIsICIpICsgIikiDQogICAgICAgIGVsc2U6DQogICAgICAgICA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Y3R4dHMNCiAgICAgICAgICAgICAg
ICBlbHNlOg0KICAgICAgICAgICAgICAgICAgICBjdHh0cyA9ICIiDQoNCiAgICAgICAgICAgICAg
ICAjIE91dHB1dCB0aGUgZGVjbGFyYXRpb24NCiAgICAgICAgICAgICAgICBzZWxmLnN0Lm91dChv
cGVyYXRpb25fZGVzY3JpcHRvciwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcG5hbWUg
PSBtYW5nbGUoYy5pZGVudGlmaWVyKCkpLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlu
ZHMgICA9IGluZHMsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0ZHMgID0gb3V0ZHMs
DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhjcyAgID0gZXhjcywNCiAgICAgICAgICAg
ICAgICAgICAgICAgICAgICBjdHh0cyAgPSBjdHh0cywNCiAgICAgICAgICAgICAgICAgICAgICAg
ICAgICBpZmlkICAgPSBpZmlkKQ0KDQogICAgICAgICMgT2JqcmVmIGNsYXNzDQogICAgICAgIGlm
IGxlbihub2RlLmluaGVyaXRzKCkpID4gMDoNCiAgICAgICAgICAgIGluaGVyaXRsID0gW10NCiAg
ICAgICAgICAgIGZvciBpIGluIG5vZGUuaW5oZXJpdHMoKToNCiAgICAgICAgICAgICAgICB3aGls
ZSBpc2luc3RhbmNlKGksIGlkbGFzdC5EZWNsYXJhdG9yKToNCiAgICAgICAgICAgICAgICAgICAg
aSA9IGkuYWxpYXMoKS5hbGlhc1R5cGUoKQ0KICAgICAgICAgICAgICAgIHNuID0gZml4dXBTY29w
ZWROYW1lKGkuc2NvcGVkTmFtZSgpKQ0KICAgICAgICAgICAgICAgIGluaGVyaXRsLmFwcGVuZChk
b3ROYW1lKHNuWzotMV0gKyBbIl9vYmpyZWZfIiArIHNuWy0xXV0pKQ0KICAgICAgICAgICAgICAg
IA0KICAgICAgICAgICAgaW5oZXJpdHMgPSAiKCIgKyBzdHJpbmcuam9pbihpbmhlcml0bCwgIiwg
IikgKyAiKSINCiAgICAgICAgZWxzZToNCiAgICAgICAgICAgIGluaGVyaXRzID0gIihDT1JCQS5P
YmplY3QpIg0KDQogICAgICAgIHNlbGYuc3Qub3V0KG9ianJlZl9jbGFzcywgaWZpZD1pZmlkLCBp
bmhlcml0cz1pbmhlcml0cykNCg0KICAgICAgICBpZiBsZW4obm9kZS5pbmhlcml0cygpKSA+IDA6
DQogICAgICAgICAgICBmb3IgaW5jbGFzcyBpbiBpbmhlcml0bDoNCiAgICAgICAgICAgICAgICBz
ZWxmLnN0Lm91dChvYmpyZWZfaW5oZXJpdF9pbml0LCBpbmNsYXNzPWluY2xhc3MpDQogICAgICAg
IGVsc2U6DQogICAgICAgICAgICBzZWxmLnN0Lm91dChvYmpyZWZfb2JqZWN0X2luaXQpDQoNCiAg
ICAgICAgIyBPcGVyYXRpb25zIGFuZCBhdHRyaWJ1dGVzDQogICAgICAgIG1ldGhvZGwgPSBbXQ0K
DQogICAgICAgIGZvciBjIGluIG5vZGUuY2FsbGFibGVzKCk6DQogICAgICAgICAgICBpZiBpc2lu
c3RhbmNlKGMsIGlkbGFzdC5BdHRyaWJ1dGUpOg0KDQogICAgICAgICAgICAgICAgZm9yIGF0dHIg
aW4gYy5pZGVudGlmaWVycygpOg0KDQogICAgICAgICAgICAgICAgICAgIHNlbGYuc3Qub3V0KG9i
anJlZl9hdHRyaWJ1dGVfZ2V0LA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRy
ICAgID0gYXR0ciwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWZpZCAgICA9IGlm
aWQsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZG5hbWUgPSBzZWxmLm1vZG5h
bWUpDQoNCiAgICAgICAgICAgICAgICAgICAgZ2V0dGVyID0gIl9nZXRfIiArIGF0dHI7ICAgICAg
ICAgICAgICAgICAgICANCiAgICAgICAgICAgICAgICAgICAgbWV0aG9kbC5hcHBlbmQoJyJfZ2V0
XycgKyBhdHRyICsgJyInKQ0KDQogICAgICAgICAgICAgICAgICAgIGlmIG5vdCBjLnJlYWRvbmx5
KCk6DQoNCiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuc3Qub3V0KG9ianJlZl9hdHRyaWJ1
dGVfc2V0LA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0ciAgICA9IGF0
dHIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZmlkICAgID0gaWZpZCwN
CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZG5hbWUgPSBzZWxmLm1vZG5h
bWUpDQogICAgICAgICAgICAgICAgICAgICAgICANCiAgICAgICAgICAgICAgICAgICAgICAgIG1l
dGhvZGwuYXBwZW5kKCciX3NldF8nICsgYXR0ciArICciJykNCg0KICAgICAgICAgICAgICAgICAg
ICAgICAgc2V0dGVyID0gIl9zZXRfIiArIGF0dHINCiAgICAgICAgICAgICAgICAgICAgZWxzZToN
CiAgICAgICAgICAgICAgICAgICAgICAgIHNldHRlciA9ICJOb25lIg0KDQogICAgICAgICAgICAg
ICAgICAgIHNlbGYuc3Qub3V0KG9ianJlZl9hdHRyaWJ1dGVfcHJvcCwNCiAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgYXR0ciA9IGF0dHIsDQogICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgIGdldHRlciA9IGdldHRlciwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
c2V0dGVyID0gc2V0dGVyKQ0KDQogICAgICAgICAgICBlbHNlOiAjIE9wZXJhdGlvbg0KICAgICAg
ICAgICAgICAgIG9wbmFtZSA9IG1hbmdsZShjLmlkZW50aWZpZXIoKSkNCiAgICAgICAgICAgICAg
ICANCiAgICAgICAgICAgICAgICBzZWxmLnN0Lm91dChvYmpyZWZfb3BlcmF0aW9uLA0KICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIG9wbmFtZSAgPSBvcG5hbWUsDQogICAgICAgICAgICAgICAg
ICAgICAgICAgICAgaWZpZCAgICA9IGlmaWQsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAg
bW9kbmFtZSA9IHNlbGYubW9kbmFtZSkNCiAgICAgICAgICAgICAgICANCiAgICAgICAgICAgICAg
ICBtZXRob2RsLmFwcGVuZCgnIicgKyBvcG5hbWUgKyAnIicpDQoNCiAgICAgICAgIyBfX21ldGhv
ZHNfXyBhc3NpZ25tZW50DQogICAgICAgIG1ldGhvZHMgPSAiWyIgKyBzdHJpbmcuam9pbihtZXRo
b2RsLCAiLCAiKSArICJdIg0KDQogICAgICAgIGlmIGxlbihub2RlLmluaGVyaXRzKCkpID4gMDoN
CiAgICAgICAgICAgIGluaGVyaXRsID0gW10NCiAgICAgICAgICAgIGZvciBpIGluIG5vZGUuaW5o
ZXJpdHMoKToNCiAgICAgICAgICAgICAgICB3aGlsZSBpc2luc3RhbmNlKGksIGlkbGFzdC5EZWNs
YXJhdG9yKToNCiAgICAgICAgICAgICAgICAgICAgaSA9IGkuYWxpYXMoKS5hbGlhc1R5cGUoKQ0K
ICAgICAgICAgICAgICAgIHNuID0gZml4dXBTY29wZWROYW1lKGkuc2NvcGVkTmFtZSgpKQ0KICAg
ICAgICAgICAgICAgIG1ldGhvZHMgPSBtZXRob2RzICsgIiArICIgKyBcDQogICAgICAgICAgICAg
ICAgICAgICAgICAgIGRvdE5hbWUoc25bOi0xXSArIFsiX29ianJlZl8iICsgc25bLTFdXSkgKyBc
DQogICAgICAgICAgICAgICAgICAgICAgICAgICIuX19tZXRob2RzX18iDQogICAgICAgIGVsc2U6
DQogICAgICAgICAgICBtZXRob2RzID0gbWV0aG9kcyArICIgKyBDT1JCQS5PYmplY3QuX19tZXRo
b2RzX18iDQoNCiAgICAgICAgc2VsZi5zdC5vdXQob2JqcmVmX21ldGhvZHMsIG1ldGhvZHMgPSBt
ZXRob2RzKQ0KDQogICAgICAgICMgcmVnaXN0ZXJPYmpSZWYoKQ0KICAgICAgICBzZWxmLnN0Lm91
dChvYmpyZWZfcmVnaXN0ZXIsIGlmaWQgPSBpZmlkLCBtb2RuYW1lID0gc2VsZi5tb2RuYW1lKQ0K
DQogICAgICAgICMgU2tlbGV0b24gY2xhc3MNCiAgICAgICAgaWYgbGVuKG5vZGUuaW5oZXJpdHMo
KSkgPiAwOg0KICAgICAgICAgICAgaW5oZXJpdGwgPSBbXQ0KICAgICAgICAgICAgZm9yIGkgaW4g
bm9kZS5pbmhlcml0cygpOg0KICAgICAgICAgICAgICAgIHdoaWxlIGlzaW5zdGFuY2UoaSwgaWRs
YXN0LkRlY2xhcmF0b3IpOg0KICAgICAgICAgICAgICAgICAgICBpID0gaS5hbGlhcygpLmFsaWFz
VHlwZSgpDQogICAgICAgICAgICAgICAgZnNuID0gZml4dXBTY29wZWROYW1lKGkuc2NvcGVkTmFt
ZSgpKQ0KICAgICAgICAgICAgICAgIGRzbiA9IGRvdE5hbWUoZnNuKQ0KICAgICAgICAgICAgICAg
IHNzbiA9IHNrZWxldG9uTW9kdWxlTmFtZShkc24pDQogICAgICAgICAgICAgICAgaW5oZXJpdGwu
YXBwZW5kKHNzbikNCiAgICAgICAgICAgICAgICANCiAgICAgICAgICAgIGluaGVyaXRzID0gc3Ry
aW5nLmpvaW4oaW5oZXJpdGwsICIsICIpDQogICAgICAgIGVsc2U6DQogICAgICAgICAgICBpbmhl
cml0cyA9ICJQb3J0YWJsZVNlcnZlci5TZXJ2YW50Ig0KDQogICAgICAgIHNlbGYuc3Qub3V0KHNr
ZWxldG9uX2NsYXNzLA0KICAgICAgICAgICAgICAgICAgICBpZmlkICAgICAgPSBpZmlkLA0KICAg
ICAgICAgICAgICAgICAgICBpbmhlcml0cyAgPSBpbmhlcml0cywNCiAgICAgICAgICAgICAgICAg
ICAgbW9kbmFtZSAgID0gc2VsZi5tb2RuYW1lLA0KICAgICAgICAgICAgICAgICAgICBzX21vZG5h
bWUgPSBza2VsZXRvbk1vZHVsZU5hbWUoc2VsZi5tb2RuYW1lKSwNCiAgICAgICAgICAgICAgICAg
ICAgcGFja2FnZSAgID0gbW9kdWxlX3BhY2thZ2UpDQoNCiAgICAgICAgIyBPcGVyYXRpb25zIGFu
ZCBhdHRyaWJ1dGVzDQogICAgICAgIG1ldGhvZGwgPSBbXQ0KDQogICAgICAgIGZvciBjIGluIG5v
ZGUuY2FsbGFibGVzKCk6DQogICAgICAgICAgICBpZiBpc2luc3RhbmNlKGMsIGlkbGFzdC5BdHRy
aWJ1dGUpOg0KDQogICAgICAgICAgICAgICAgZm9yIGF0dHIgaW4gYy5pZGVudGlmaWVycygpOg0K
DQogICAgICAgICAgICAgICAgICAgIG1ldGhvZGwuYXBwZW5kKCciX2dldF8nICsgYXR0ciArICci
OiAnICsgXA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnXzBfJyArIHNlbGYu
bW9kbmFtZSArICcuJyArIFwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWZp
ZCArICcuJyArICdfZF9fZ2V0XycgKyBhdHRyKQ0KDQogICAgICAgICAgICAgICAgICAgIGlmIG5v
dCBjLnJlYWRvbmx5KCk6DQoNCiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZGwuYXBwZW5k
KCciX3NldF8nICsgYXR0ciArICciOiAnICsgXA0KICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgJ18wXycgKyBzZWxmLm1vZG5hbWUgKyAnLicgKyBcDQogICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICBpZmlkICsgJy4nICsgJ19kX19zZXRfJyArIGF0dHIp
DQoNCiAgICAgICAgICAgIGVsc2U6ICMgT3BlcmF0aW9uDQogICAgICAgICAgICAgICAgb3BuYW1l
ID0gbWFuZ2xlKGMuaWRlbnRpZmllcigpKQ0KICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAg
ICAgIG1ldGhvZGwuYXBwZW5kKCciJyArIG9wbmFtZSArICciOiAnICsgJ18wXycgKyBzZWxmLm1v
ZG5hbWUgKyBcDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJy4nICsgaWZpZCArICcu
JyArICdfZF8nICsgb3BuYW1lKQ0KDQogICAgICAgIG1ldGhvZG1hcCA9ICJ7IiArIHN0cmluZy5q
b2luKG1ldGhvZGwsICIsICIpICsgIn0iDQoNCiAgICAgICAgc2VsZi5zdC5vdXQoc2tlbGV0b25f
bWV0aG9kbWFwLCBtZXRob2RtYXAgPSBtZXRob2RtYXApDQoNCiAgICAgICAgaWYgbGVuKG5vZGUu
aW5oZXJpdHMoKSkgPiAwOg0KICAgICAgICAgICAgZm9yIGluaGVyaXRjbGFzcyBpbiBpbmhlcml0
bDoNCiAgICAgICAgICAgICAgICBzZWxmLnN0Lm91dChza2VsZXRvbl9pbmhlcml0bWFwLCBpbmhl
cml0Y2xhc3MgPSBpbmhlcml0Y2xhc3MpDQoNCiAgICAgICAgc2VsZi5zdC5vdXQoc2tlbGV0b25f
ZW5kLA0KICAgICAgICAgICAgICAgICAgICBpZmlkICAgICAgPSBpZmlkLA0KICAgICAgICAgICAg
ICAgICAgICBtb2RuYW1lICAgPSBzZWxmLm1vZG5hbWUsDQogICAgICAgICAgICAgICAgICAgIHNf
bW9kbmFtZSA9IHNrZWxldG9uTW9kdWxlTmFtZShzZWxmLm1vZG5hbWUpLA0KICAgICAgICAgICAg
ICAgICAgICBwYWNrYWdlICAgPSBtb2R1bGVfcGFja2FnZSkNCg0KICAgICMNCiAgICAjIENvbnN0
YW50DQogICAgIw0KICAgIGRlZiB2aXNpdENvbnN0KHNlbGYsIG5vZGUpOg0KICAgICAgICBpZiBz
ZWxmLmhhbmRsZUltcG9ydGVkKG5vZGUpOiByZXR1cm4NCg0KICAgICAgICBjbmFtZSA9IG1hbmds
ZShub2RlLmlkZW50aWZpZXIoKSkNCg0KICAgICAgICBpZiBzZWxmLmF0X21vZHVsZV9zY29wZToN
CiAgICAgICAgICAgIHZhbHVlID0gdmFsdWVUb1N0cmluZyhub2RlLnZhbHVlKCksIG5vZGUuY29u
c3RLaW5kKCksIFtdKQ0KICAgICAgICBlbHNlOg0KICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZVRv
U3RyaW5nKG5vZGUudmFsdWUoKSwgbm9kZS5jb25zdEtpbmQoKSwNCiAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICBzZWxmLmN1cnJlbnRTY29wZSkNCiAgICAgICAgaWYgc2VsZi5hdF9t
b2R1bGVfc2NvcGU6DQogICAgICAgICAgICBzZWxmLnN0Lm91dChjb25zdGFudF9hdF9tb2R1bGVf
c2NvcGUsDQogICAgICAgICAgICAgICAgICAgICAgICBjbmFtZSAgID0gY25hbWUsDQogICAgICAg
ICAgICAgICAgICAgICAgICB2YWx1ZSAgID0gdmFsdWUsDQogICAgICAgICAgICAgICAgICAgICAg
ICBtb2RuYW1lID0gc2VsZi5tb2RuYW1lKQ0KICAgICAgICBlbHNlOg0KICAgICAgICAgICAgc2Vs
Zi5zdC5vdXQoY29uc3RhbnQsDQogICAgICAgICAgICAgICAgICAgICAgICBjbmFtZSAgID0gY25h
bWUsDQogICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSAgID0gdmFsdWUpDQoNCiAgICAjDQog
ICAgIyBUeXBlZGVmDQogICAgIw0KICAgIGRlZiB2aXNpdFR5cGVkZWYoc2VsZiwgbm9kZSk6DQog
ICAgICAgIGlmIHNlbGYuaGFuZGxlSW1wb3J0ZWQobm9kZSk6IHJldHVybg0KDQogICAgICAgIGlm
IG5vZGUuY29uc3RyVHlwZSgpOg0KICAgICAgICAgICAgbm9kZS5hbGlhc1R5cGUoKS5kZWNsKCku
YWNjZXB0KHNlbGYpDQoNCiAgICAgICAgZm9yIGRlY2wgaW4gbm9kZS5kZWNsYXJhdG9ycygpOg0K
ICAgICAgICAgICAgdGRuYW1lID0gbWFuZ2xlKGRlY2wuaWRlbnRpZmllcigpKQ0KICAgICAgICAg
ICAgaWYgc2VsZi5hdF9tb2R1bGVfc2NvcGU6DQogICAgICAgICAgICAgICAgZGVzYyAgID0gdHlw
ZUFuZERlY2xhcmF0b3JUb0Rlc2NyaXB0b3Iobm9kZS5hbGlhc1R5cGUoKSwNCiAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWNsLCBbXSkNCiAg
ICAgICAgICAgICAgICB0ZGRlc2MgPSB0eXBlQW5kRGVjbGFyYXRvclRvRGVzY3JpcHRvcihub2Rl
LmFsaWFzVHlwZSgpLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIGRlY2wsIFtdLCAxKQ0KDQogICAgICAgICAgICAgICAgdW5hbGlhc2VkX3R5
cGUgPSBub2RlLmFsaWFzVHlwZSgpLnVuYWxpYXMoKQ0KDQogICAgICAgICAgICAgICAgaWYgbGVu
KGRlY2wuc2l6ZXMoKSkgPT0gMCBhbmQgXA0KICAgICAgICAgICAgICAgICAgIHVuYWxpYXNlZF90
eXBlLmtpbmQoKSBpbiBbaWRsdHlwZS50a19zdHJ1Y3QsDQogICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICBpZGx0eXBlLnRrX3VuaW9uXToNCg0KICAgICAgICAgICAg
ICAgICAgICBwYXJlbnQgPSBkb3ROYW1lKGZpeHVwU2NvcGVkTmFtZSh1bmFsaWFzZWRfdHlwZS5k
ZWNsKCkuXA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICBzY29wZWROYW1lKCkpKQ0KDQogICAgICAgICAgICAgICAgICAgIHNlbGYuc3Qub3V0KHR5
cGVkZWZfc3RydWN0X3VuaW9uX2hlYWRlciwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgdGRuYW1lID0gdGRuYW1lLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXBv
SWQgPSBkZWNsLnJlcG9JZCgpLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJl
bnQgPSBwYXJlbnQpDQoNCiAgICAgICAgICAgICAgICBlbGlmIGxlbihkZWNsLnNpemVzKCkpID09
IDAgYW5kXA0KICAgICAgICAgICAgICAgICAgICAgdW5hbGlhc2VkX3R5cGUua2luZCgpID09IGlk
bHR5cGUudGtfZml4ZWQ6DQoNCiAgICAgICAgICAgICAgICAgICAgc2VsZi5zdC5vdXQodHlwZWRl
Zl9maXhlZF9oZWFkZXIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRkbmFtZSA9
IHRkbmFtZSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVwb0lkID0gZGVjbC5y
ZXBvSWQoKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlnaXRzID0gdW5hbGlh
c2VkX3R5cGUuZGlnaXRzKCksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjYWxl
ICA9IHVuYWxpYXNlZF90eXBlLnNjYWxlKCkpDQogICAgICAgICAgICAgICAgICAgIA0KICAgICAg
ICAgICAgICAgIGVsc2U6DQogICAgICAgICAgICAgICAgICAgIHNlbGYuc3Qub3V0KHR5cGVkZWZf
aGVhZGVyLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZG5hbWUgID0gdGRuYW1l
LA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXBvSWQgID0gZGVjbC5yZXBvSWQo
KSkNCg0KICAgICAgICAgICAgICAgIHNlbGYuc3Qub3V0KHR5cGVkZWZfYXRfbW9kdWxlX3Njb3Bl
LA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRkbmFtZSAgPSB0ZG5hbWUsDQogICAgICAg
ICAgICAgICAgICAgICAgICAgICAgZGVzYyAgICA9IGRlc2MsDQogICAgICAgICAgICAgICAgICAg
ICAgICAgICAgdGRkZXNjICA9IHRkZGVzYywNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBt
b2RuYW1lID0gc2VsZi5tb2RuYW1lKQ0KICAgICAgICAgICAgZWxzZToNCiAgICAgICAgICAgICAg
ICBkZXNjICAgPSB0eXBlQW5kRGVjbGFyYXRvclRvRGVzY3JpcHRvcihub2RlLmFsaWFzVHlwZSgp
LA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
IGRlY2wsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgc2VsZi5jdXJyZW50U2NvcGUpDQogICAgICAgICAgICAgICAgdGRkZXNjID0gdHlwZUFu
ZERlY2xhcmF0b3JUb0Rlc2NyaXB0b3Iobm9kZS5hbGlhc1R5cGUoKSwNCiAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWNsLA0KICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuY3VycmVu
dFNjb3BlLCAxKQ0KDQogICAgICAgICAgICAgICAgdW5hbGlhc2VkX3R5cGUgPSBub2RlLmFsaWFz
VHlwZSgpLnVuYWxpYXMoKQ0KDQogICAgICAgICAgICAgICAgaWYgbGVuKGRlY2wuc2l6ZXMoKSkg
PT0gMCBhbmQgXA0KICAgICAgICAgICAgICAgICAgIHVuYWxpYXNlZF90eXBlLmtpbmQoKSBpbiBb
aWRsdHlwZS50a19zdHJ1Y3QsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICBpZGx0eXBlLnRrX3VuaW9uXToNCg0KICAgICAgICAgICAgICAgICAgICBwc25hbWUg
ID0gdW5hbGlhc2VkX3R5cGUuZGVjbCgpLnNjb3BlZE5hbWUoKQ0KICAgICAgICAgICAgICAgICAg
ICBteXNjb3BlID0gZGVjbC5zY29wZWROYW1lKClbOi0xXQ0KDQogICAgICAgICAgICAgICAgICAg
ICMgSWYgdGhlIHN0cnVjdC91bmlvbiBkZWZpbml0aW9uIGlzIGluIHRoZSBzYW1lDQogICAgICAg
ICAgICAgICAgICAgICMgc2NvcGUgYXMgdGhlIHR5cGVkZWYsIHdlIG11c3QgdXNlIGEgcmVsYXRp
dmUNCiAgICAgICAgICAgICAgICAgICAgIyBuYW1lIHRvIHJlZmVyIHRvIHRoZSBwYXJlbnQgY2xh
c3MsIHNpbmNlIHRoZQ0KICAgICAgICAgICAgICAgICAgICAjIGVuY2xvc2luZyBQeXRob24gY2xh
c3MgaGFzIG5vdCB5ZXQgYmVlbiBmdWxseQ0KICAgICAgICAgICAgICAgICAgICAjIGRlZmluZWQu
DQoNCiAgICAgICAgICAgICAgICAgICAgaWYgcHNuYW1lWzpsZW4obXlzY29wZSldID09IG15c2Nv
cGU6DQogICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnQgPSBkb3ROYW1lKHBzbmFtZVtsZW4o
bXlzY29wZSk6XSkNCiAgICAgICAgICAgICAgICAgICAgZWxzZToNCiAgICAgICAgICAgICAgICAg
ICAgICAgIHBhcmVudCA9IGRvdE5hbWUoZml4dXBTY29wZWROYW1lKHBzbmFtZSkpDQoNCiAgICAg
ICAgICAgICAgICAgICAgc2VsZi5zdC5vdXQodHlwZWRlZl9zdHJ1Y3RfdW5pb25faGVhZGVyLA0K
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZG5hbWUgPSB0ZG5hbWUsDQogICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgIHJlcG9JZCA9IGRlY2wucmVwb0lkKCksDQogICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmVudCA9IHBhcmVudCkNCiAgICAgICAgICAgICAg
ICBlbHNlOg0KICAgICAgICAgICAgICAgICAgICBzZWxmLnN0Lm91dCh0eXBlZGVmX2hlYWRlciwN
CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGRuYW1lICA9IHRkbmFtZSwNCiAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVwb0lkICA9IGRlY2wucmVwb0lkKCkpDQoNCiAg
ICAgICAgICAgICAgICBzZWxmLnN0Lm91dCh0eXBlZGVmLA0KICAgICAgICAgICAgICAgICAgICAg
ICAgICAgIHRkbmFtZSAgPSB0ZG5hbWUsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVz
YyAgICA9IGRlc2MsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGRkZXNjICA9IHRkZGVz
YykNCiAgICAjDQogICAgIyBTdHJ1Y3QNCiAgICAjDQogICAgZGVmIHZpc2l0U3RydWN0KHNlbGYs
IG5vZGUpOg0KICAgICAgICBpZiBzZWxmLmhhbmRsZUltcG9ydGVkKG5vZGUpOiByZXR1cm4NCg0K
ICAgICAgICBzbmFtZSA9IG1hbmdsZShub2RlLmlkZW50aWZpZXIoKSkNCg0KICAgICAgICBmc2Nv
cGVkTmFtZSA9IGZpeHVwU2NvcGVkTmFtZShub2RlLnNjb3BlZE5hbWUoKSwgIiIpDQoNCiAgICAg
ICAgaWYgbm9kZS5yZWN1cnNpdmUoKToNCiAgICAgICAgICAgIGlmIHNlbGYuYXRfbW9kdWxlX3Nj
b3BlOg0KICAgICAgICAgICAgICAgIHNlbGYuc3Qub3V0KHJlY3Vyc2l2ZV9zdHJ1Y3RfZGVzY3Jf
YXRfbW9kdWxlX3Njb3BlLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNuYW1lICAgPSBz
bmFtZSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXBvSWQgID0gbm9kZS5yZXBvSWQo
KSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RuYW1lID0gc2VsZi5tb2RuYW1lKQ0K
ICAgICAgICAgICAgZWxzZToNCiAgICAgICAgICAgICAgICBzZWxmLnN0Lm91dChyZWN1cnNpdmVf
c3RydWN0X2Rlc2NyLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNuYW1lICAgPSBzbmFt
ZSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXBvSWQgID0gbm9kZS5yZXBvSWQoKSwN
CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzY29wZSAgID0gZG90TmFtZShmc2NvcGVkTmFt
ZVs6LTFdKSkNCg0KICAgICAgICBzZWxmLnN0Lm91dChzdHJ1Y3RfY2xhc3MsDQogICAgICAgICAg
ICAgICAgICAgIHNuYW1lICAgICAgPSBzbmFtZSwNCiAgICAgICAgICAgICAgICAgICAgcmVwb0lk
ICAgICA9IG5vZGUucmVwb0lkKCksDQogICAgICAgICAgICAgICAgICAgIHNjb3BlZG5hbWUgPSBk
b3ROYW1lKGZzY29wZWROYW1lKSkNCg0KICAgICAgICBtbmFtZWwgPSBbXQ0KICAgICAgICBtZGVz
Y2wgPSBbXQ0KICAgICAgICBmb3IgbWVtIGluIG5vZGUubWVtYmVycygpOg0KDQogICAgICAgICAg
ICAjIERlYWwgd2l0aCBuZXN0ZWQgZGVjbGFyYXRpb25zDQogICAgICAgICAgICBpZiBtZW0uY29u
c3RyVHlwZSgpOg0KICAgICAgICAgICAgICAgIHNlbGYuc3QuaW5jX2luZGVudCgpDQogICAgICAg
ICAgICAgICAgYW1zID0gc2VsZi5hdF9tb2R1bGVfc2NvcGUNCiAgICAgICAgICAgICAgICBzZWxm
LmF0X21vZHVsZV9zY29wZSA9IDANCiAgICAgICAgICAgICAgICBzZWxmLmN1cnJlbnRTY29wZS5h
cHBlbmQobm9kZS5pZGVudGlmaWVyKCkpDQogICAgICAgICAgICAgICAgDQogICAgICAgICAgICAg
ICAgbWVtLm1lbWJlclR5cGUoKS5kZWNsKCkuYWNjZXB0KHNlbGYpDQoNCiAgICAgICAgICAgICAg
ICBzZWxmLmN1cnJlbnRTY29wZS5wb3AoKQ0KICAgICAgICAgICAgICAgIHNlbGYuYXRfbW9kdWxl
X3Njb3BlID0gYW1zDQogICAgICAgICAgICAgICAgc2VsZi5zdC5kZWNfaW5kZW50KCkNCiAgICAg
ICAgICAgICAgICBzZWxmLnN0Lm91dCgiIikNCg0KICAgICAgICAgICAgZm9yIGRlY2wgaW4gbWVt
LmRlY2xhcmF0b3JzKCk6DQogICAgICAgICAgICAgICAgbW5hbWVsLmFwcGVuZChtYW5nbGUoZGVj
bC5pZGVudGlmaWVyKCkpKQ0KICAgICAgICAgICAgICAgIG1kZXNjbC5hcHBlbmQoJyInICsgbWFu
Z2xlKGRlY2wuaWRlbnRpZmllcigpKSArICciJykNCiAgICAgICAgICAgICAgICANCiAgICAgICAg
ICAgICAgICBpZiBzZWxmLmF0X21vZHVsZV9zY29wZToNCiAgICAgICAgICAgICAgICAgICAgbWRl
c2NsLmFwcGVuZChcDQogICAgICAgICAgICAgICAgICAgICAgICB0eXBlQW5kRGVjbGFyYXRvclRv
RGVzY3JpcHRvcihtZW0ubWVtYmVyVHlwZSgpLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVjbCwNCiAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdKSkNCiAgICAgICAgICAgICAgICBlbHNl
Og0KICAgICAgICAgICAgICAgICAgICBtZGVzY2wuYXBwZW5kKFwNCiAgICAgICAgICAgICAgICAg
ICAgICAgIHR5cGVBbmREZWNsYXJhdG9yVG9EZXNjcmlwdG9yKG1lbS5tZW1iZXJUeXBlKCksDQog
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWNs
LA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
c2VsZi5jdXJyZW50U2NvcGUpKQ0KICAgICAgICBpZiBsZW4obW5hbWVsKSA+IDA6DQogICAgICAg
ICAgICBtbmFtZXMgPSAiLCAiICsgc3RyaW5nLmpvaW4obW5hbWVsLCAiLCAiKQ0KDQogICAgICAg
ICAgICBzZWxmLnN0Lm91dChzdHJ1Y3RfY2xhc3NfaW5pdCwgbW5hbWVzID0gbW5hbWVzKQ0KDQog
ICAgICAgICAgICBmb3IgbW5hbWUgaW4gbW5hbWVsOg0KICAgICAgICAgICAgICAgIHNlbGYuc3Qu
b3V0KHN0cnVjdF9pbml0X21lbWJlciwgbW5hbWUgPSBtbmFtZSkNCg0KICAgICAgICBpZiBsZW4o
bWRlc2NsKSA+IDA6DQogICAgICAgICAgICBtZGVzY3MgPSAiLCAiICsgc3RyaW5nLmpvaW4obWRl
c2NsLCAiLCAiKQ0KICAgICAgICBlbHNlOg0KICAgICAgICAgICAgbWRlc2NzID0gIiINCg0KICAg
ICAgICBpZiBzZWxmLmF0X21vZHVsZV9zY29wZToNCiAgICAgICAgICAgIHNlbGYuc3Qub3V0KHN0
cnVjdF9kZXNjcmlwdG9yX2F0X21vZHVsZV9zY29wZSwNCiAgICAgICAgICAgICAgICAgICAgICAg
IHNuYW1lICAgPSBzbmFtZSwNCiAgICAgICAgICAgICAgICAgICAgICAgIG1kZXNjcyAgPSBtZGVz
Y3MsDQogICAgICAgICAgICAgICAgICAgICAgICBtb2RuYW1lID0gc2VsZi5tb2RuYW1lKQ0KICAg
ICAgICAgICAgDQogICAgICAgICAgICBzZWxmLnN0Lm91dChzdHJ1Y3RfcmVnaXN0ZXJfYXRfbW9k
dWxlX3Njb3BlLA0KICAgICAgICAgICAgICAgICAgICAgICAgc25hbWUgICA9IHNuYW1lLA0KICAg
ICAgICAgICAgICAgICAgICAgICAgbW9kbmFtZSA9IHNlbGYubW9kbmFtZSkNCiAgICAgICAgZWxz
ZToNCiAgICAgICAgICAgIHNlbGYuc3Qub3V0KHN0cnVjdF9kZXNjcmlwdG9yLA0KICAgICAgICAg
ICAgICAgICAgICAgICAgc25hbWUgID0gc25hbWUsDQogICAgICAgICAgICAgICAgICAgICAgICBt
ZGVzY3MgPSBtZGVzY3MsDQogICAgICAgICAgICAgICAgICAgICAgICBzY29wZSAgPSBkb3ROYW1l
KGZzY29wZWROYW1lWzotMV0pKQ0KDQogICAgICAgICAgICBzZWxmLnN0Lm91dChzdHJ1Y3RfcmVn
aXN0ZXIsIHNuYW1lID0gc25hbWUpDQoNCiAgICAjDQogICAgIyBGb3J3YXJkIHN0cnVjdA0KICAg
ICMNCiAgICBkZWYgdmlzaXRTdHJ1Y3RGb3J3YXJkKHNlbGYsIG5vZGUpOg0KICAgICAgICBpZiBz
ZWxmLmhhbmRsZUltcG9ydGVkKG5vZGUpOiByZXR1cm4NCg0KICAgICAgICBzbmFtZSA9IG1hbmds
ZShub2RlLmlkZW50aWZpZXIoKSkNCg0KICAgICAgICBpZiBzZWxmLmF0X21vZHVsZV9zY29wZToN
CiAgICAgICAgICAgIHNlbGYuc3Qub3V0KGZvcndhcmRfc3RydWN0X2Rlc2NyX2F0X21vZHVsZV9z
Y29wZSwNCiAgICAgICAgICAgICAgICAgICAgICAgIHNuYW1lICAgPSBzbmFtZSwNCiAgICAgICAg
ICAgICAgICAgICAgICAgIHJlcG9JZCAgPSBub2RlLnJlcG9JZCgpLA0KICAgICAgICAgICAgICAg
ICAgICAgICAgbW9kbmFtZSA9IHNlbGYubW9kbmFtZSkNCiAgICAgICAgZWxzZToNCiAgICAgICAg
ICAgIHNlbGYuc3Qub3V0KGZvcndhcmRfc3RydWN0X2Rlc2NyLA0KICAgICAgICAgICAgICAgICAg
ICAgICAgc25hbWUgICA9IHNuYW1lLA0KICAgICAgICAgICAgICAgICAgICAgICAgcmVwb0lkICA9
IG5vZGUucmVwb0lkKCksDQogICAgICAgICAgICAgICAgICAgICAgICBtb2RuYW1lID0gc2VsZi5t
b2RuYW1lKQ0KDQogICAgIw0KICAgICMgRXhjZXB0aW9uDQogICAgIw0KICAgIGRlZiB2aXNpdEV4
Y2VwdGlvbihzZWxmLCBub2RlKToNCiAgICAgICAgaWYgc2VsZi5oYW5kbGVJbXBvcnRlZChub2Rl
KTogcmV0dXJuDQoNCiAgICAgICAgc25hbWUgPSBtYW5nbGUobm9kZS5pZGVudGlmaWVyKCkpDQog
ICAgICAgIGZzY29wZWROYW1lID0gZml4dXBTY29wZWROYW1lKG5vZGUuc2NvcGVkTmFtZSgpLCAi
IikNCiAgICAgICAgc2VsZi5zdC5vdXQoZXhjZXB0aW9uX2NsYXNzLA0KICAgICAgICAgICAgICAg
ICAgICBzbmFtZSA9IHNuYW1lLA0KICAgICAgICAgICAgICAgICAgICByZXBvSWQgPSBub2RlLnJl
cG9JZCgpLA0KICAgICAgICAgICAgICAgICAgICBzY29wZWRuYW1lID0gZG90TmFtZShmc2NvcGVk
TmFtZSkpDQoNCiAgICAgICAgbW5hbWVsID0gW10NCiAgICAgICAgbWRlc2NsID0gW10NCiAgICAg
ICAgZm9yIG1lbSBpbiBub2RlLm1lbWJlcnMoKToNCg0KICAgICAgICAgICAgIyBEZWFsIHdpdGgg
bmVzdGVkIGRlY2xhcmF0aW9ucw0KICAgICAgICAgICAgaWYgbWVtLmNvbnN0clR5cGUoKToNCiAg
ICAgICAgICAgICAgICBzZWxmLnN0LmluY19pbmRlbnQoKQ0KICAgICAgICAgICAgICAgIGFtcyA9
IHNlbGYuYXRfbW9kdWxlX3Njb3BlDQogICAgICAgICAgICAgICAgc2VsZi5hdF9tb2R1bGVfc2Nv
cGUgPSAwDQogICAgICAgICAgICAgICAgc2VsZi5jdXJyZW50U2NvcGUuYXBwZW5kKG5vZGUuaWRl
bnRpZmllcigpKQ0KICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgICAgIG1lbS5tZW1iZXJU
eXBlKCkuZGVjbCgpLmFjY2VwdChzZWxmKQ0KDQogICAgICAgICAgICAgICAgc2VsZi5jdXJyZW50
U2NvcGUucG9wKCkNCiAgICAgICAgICAgICAgICBzZWxmLmF0X21vZHVsZV9zY29wZSA9IGFtcw0K
ICAgICAgICAgICAgICAgIHNlbGYuc3QuZGVjX2luZGVudCgpDQogICAgICAgICAgICAgICAgc2Vs
Zi5zdC5vdXQoIiIpDQoNCiAgICAgICAgICAgIGZvciBkZWNsIGluIG1lbS5kZWNsYXJhdG9ycygp
Og0KICAgICAgICAgICAgICAgIG1uYW1lbC5hcHBlbmQobWFuZ2xlKGRlY2wuaWRlbnRpZmllcigp
KSkNCiAgICAgICAgICAgICAgICBtZGVzY2wuYXBwZW5kKCciJyArIG1hbmdsZShkZWNsLmlkZW50
aWZpZXIoKSkgKyAnIicpDQoNCiAgICAgICAgICAgICAgICBpZiBzZWxmLmF0X21vZHVsZV9zY29w
ZToNCiAgICAgICAgICAgICAgICAgICAgbWRlc2NsLmFwcGVuZChcDQogICAgICAgICAgICAgICAg
ICAgICAgICB0eXBlQW5kRGVjbGFyYXRvclRvRGVzY3JpcHRvcihtZW0ubWVtYmVyVHlwZSgpLA0K
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVj
bCwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
IFtdKSkNCiAgICAgICAgICAgICAgICBlbHNlOg0KICAgICAgICAgICAgICAgICAgICBtZGVzY2wu
YXBwZW5kKFwNCiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVBbmREZWNsYXJhdG9yVG9EZXNj
cmlwdG9yKG1lbS5tZW1iZXJUeXBlKCksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICBkZWNsLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5jdXJyZW50U2NvcGUpKQ0KDQogICAgICAg
IGlmIGxlbihtbmFtZWwpID4gMDoNCiAgICAgICAgICAgIG1uYW1lcyA9ICIsICIgKyBzdHJpbmcu
am9pbihtbmFtZWwsICIsICIpDQogICAgICAgICAgICBzZWxmLnN0Lm91dChleGNlcHRpb25fY2xh
c3NfaW5pdCwgbW5hbWVzID0gbW5hbWVzKQ0KDQogICAgIC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Zi5j
dXJyZW50U2NvcGUpDQoNCiAgICAgICAgZnNjb3BlZE5hbWUgPSBmaXh1cFNjb3BlZE5hbWUobm9k
ZS5zY29wZWROYW1lKCksICIiKQ0KICAgICAgICANCiAgICAgICAgaWYgbm9kZS5yZWN1cnNpdmUo
KToNCiAgICAgICAgICAgIGlmIHNlbGYuYXRfbW9kdWxlX3Njb3BlOg0KICAgICAgICAgICAgICAg
IHNlbGYuc3Qub3V0KHJlY3Vyc2l2ZV91bmlvbl9kZXNjcl9hdF9tb2R1bGVfc2NvcGUsDQogICAg
ICAgICAgICAgICAgICAgICAgICAgICAgdW5hbWUgICA9IHVuYW1lLA0KICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIHJlcG9JZCAgPSBub2RlLnJlcG9JZCgpLA0KICAgICAgICAgICAgICAgICAg
ICAgICAgICAgIG1vZG5hbWUgPSBzZWxmLm1vZG5hbWUpDQogICAgICAgICAgICBlbHNlOg0KICAg
ICAgICAgICAgICAgIHNlbGYuc3Qub3V0KHJlY3Vyc2l2ZV91bmlvbl9kZXNjciwNCiAgICAgICAg
ICAgICAgICAgICAgICAgICAgICB1bmFtZSAgID0gdW5hbWUsDQogICAgICAgICAgICAgICAgICAg
ICAgICAgICAgcmVwb0lkICA9IG5vZGUucmVwb0lkKCksDQogICAgICAgICAgICAgICAgICAgICAg
ICAgICAgc2NvcGUgICA9IGRvdE5hbWUoZnNjb3BlZE5hbWVbOi0xXSkpDQoNCiAgICAgICAgc2Vs
Zi5zdC5vdXQodW5pb25fY2xhc3MsDQogICAgICAgICAgICAgICAgICAgIHVuYW1lICAgICAgPSB1
bmFtZSwNCiAgICAgICAgICAgICAgICAgICAgcmVwb0lkICAgICA9IG5vZGUucmVwb0lkKCksDQog
ICAgICAgICAgICAgICAgICAgIHNjb3BlZG5hbWUgPSBkb3ROYW1lKGZzY29wZWROYW1lKSkNCg0K
ICAgICAgICBpZiBub2RlLmNvbnN0clR5cGUoKToNCiAgICAgICAgICAgIHNlbGYuc3QuaW5jX2lu
ZGVudCgpDQogICAgICAgICAgICBhbXMgPSBzZWxmLmF0X21vZHVsZV9zY29wZQ0KICAgICAgICAg
ICAgc2VsZi5hdF9tb2R1bGVfc2NvcGUgPSAwDQogICAgICAgICAgICBzZWxmLmN1cnJlbnRTY29w
ZS5hcHBlbmQobm9kZS5pZGVudGlmaWVyKCkpDQogICAgICAgICAgICANCiAgICAgICAgICAgIG5v
ZGUuc3dpdGNoVHlwZSgpLmRlY2woKS5hY2NlcHQoc2VsZikNCg0KICAgICAgICAgICAgc2VsZi5j
dXJyZW50U2NvcGUucG9wKCkNCiAgICAgICAgICAgIHNlbGYuYXRfbW9kdWxlX3Njb3BlID0gYW1z
DQogICAgICAgICAgICBzZWxmLnN0LmRlY19pbmRlbnQoKQ0KDQogICAgICAgIGRlZl9tICAgID0g
Ik5vbmUiDQogICAgICAgIGRlZl9kICAgID0gIk5vbmUiDQogICAgICAgIG1fZGVmICAgID0gIk5v
bmUiDQogICAgICAgIGRlZnBvcyAgID0gIi0xIg0KICAgICAgICBtX3RvX2RfbCA9IFtdDQogICAg
ICAgIGRfdG9fbV9sID0gW10NCiAgICAgICAgbV91bl9sICAgPSBbXQ0KICAgICAgICBkX21hcF9s
ICA9IFtdDQoNCiAgICAgICAgaSA9IDANCiAgICAgICAgZm9yIGNhc2UgaW4gbm9kZS5jYXNlcygp
Og0KDQogICAgICAgICAgICAjIERlYWwgd2l0aCBuZXN0ZWQgZGVjbGFyYXRpb25zDQogICAgICAg
ICAgICBpZiBjYXNlLmNvbnN0clR5cGUoKToNCiAgICAgICAgICAgICAgICBzZWxmLnN0LmluY19p
bmRlbnQoKQ0KICAgICAgICAgICAgICAgIGFtcyA9IHNlbGYuYXRfbW9kdWxlX3Njb3BlDQogICAg
ICAgICAgICAgICAgc2VsZi5hdF9tb2R1bGVfc2NvcGUgPSAwDQogICAgICAgICAgICAgICAgc2Vs
Zi5jdXJyZW50U2NvcGUuYXBwZW5kKG5vZGUuaWRlbnRpZmllcigpKQ0KICAgICAgICAgICAgICAg
IA0KICAgICAgICAgICAgICAgIGNhc2UuY2FzZVR5cGUoKS5kZWNsKCkuYWNjZXB0KHNlbGYpDQoN
CiAgICAgICAgICAgICAgICBzZWxmLmN1cnJlbnRTY29wZS5wb3AoKQ0KICAgICAgICAgICAgICAg
IHNlbGYuYXRfbW9kdWxlX3Njb3BlID0gYW1zDQogICAgICAgICAgICAgICAgc2VsZi5zdC5kZWNf
aW5kZW50KCkNCiAgICAgICAgICAgICAgICBzZWxmLnN0Lm91dCgiIikNCg0KICAgICAgICAgICAg
aWYgc2VsZi5hdF9tb2R1bGVfc2NvcGU6DQogICAgICAgICAgICAgICAgY3R5cGUgPSB0eXBlQW5k
RGVjbGFyYXRvclRvRGVzY3JpcHRvcihjYXNlLmNhc2VUeXBlKCksDQogICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlLmRlY2xhcmF0b3IoKSwN
CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtd
KQ0KICAgICAgICAgICAgZWxzZToNCiAgICAgICAgICAgICAgICBjdHlwZSA9IHR5cGVBbmREZWNs
YXJhdG9yVG9EZXNjcmlwdG9yKGNhc2UuY2FzZVR5cGUoKSwNCiAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UuZGVjbGFyYXRvcigpLA0KICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5j
dXJyZW50U2NvcGUpDQoNCiAgICAgICAgICAgIGNuYW1lID0gbWFuZ2xlKGNhc2UuZGVjbGFyYXRv
cigpLmlkZW50aWZpZXIoKSkNCg0KICAgICAgICAgICAgZm9yIGxhYmVsIGluIGNhc2UubGFiZWxz
KCk6DQogICAgICAgICAgICAgICAgaWYgbGFiZWwuZGVmYXVsdCgpOg0KICAgICAgICAgICAgICAg
ICAgICBkZWZfbSAgPSAnIicgKyBjbmFtZSArICciJw0KICAgICAgICAgICAgICAgICAgICBkZWZw
b3MgPSBzdHIoaSkNCiAgICAgICAgICAgICAgICAgICAgaWYgc2VsZi5hdF9tb2R1bGVfc2NvcGU6
DQogICAgICAgICAgICAgICAgICAgICAgICBkZWZfZCAgPSB2YWx1ZVRvU3RyaW5nKGxhYmVsLnZh
bHVlKCksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxh
YmVsLmxhYmVsS2luZCgpLCBbXSkNCiAgICAgICAgICAgICAgICAgICAgICAgIG1fZGVmICA9ICJf
MF8iICsgc2VsZi5tb2RuYW1lICsgIi5fbV8iICsgdW5hbWUgKyBcDQogICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAiWyIgKyBkZWZwb3MgKyAiXSINCiAgICAgICAgICAgICAgICAgICAg
ZWxzZToNCiAgICAgICAgICAgICAgICAgICAgICAgIGRlZl9kICA9IHZhbHVlVG9TdHJpbmcobGFi
ZWwudmFsdWUoKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgbGFiZWwubGFiZWxLaW5kKCksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIHNlbGYuY3VycmVudFNjb3BlKQ0KICAgICAgICAgICAgICAgICAgICAgICAg
bV9kZWYgID0gIl9tXyIgKyB1bmFtZSArICJbIiArIGRlZnBvcyArICJdIg0KDQogICAgICAgICAg
ICAgICAgICAgIG1fdW5fbC5hcHBlbmQoJygnICsgZGVmX2QgKyAnLCAiJyArIGNuYW1lICsgJyIs
ICcgK1wNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdHlwZSArICcpJykNCiAg
ICAgICAgICAgICAgICBlbHNlOg0KICAgICAgICAgICAgICAgICAgICBpZiBzZWxmLmF0X21vZHVs
ZV9zY29wZToNCiAgICAgICAgICAgICAgICAgICAgICAgIHNsYWJlbCA9IHZhbHVlVG9TdHJpbmco
bGFiZWwudmFsdWUoKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgbGFiZWwubGFiZWxLaW5kKCksIFtdKQ0KICAgICAgICAgICAgICAgICAgICBlbHNlOg0K
ICAgICAgICAgICAgICAgICAgICAgICAgc2xhYmVsID0gdmFsdWVUb1N0cmluZyhsYWJlbC52YWx1
ZSgpLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYWJl
bC5sYWJlbEtpbmQoKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgc2VsZi5jdXJyZW50U2NvcGUpDQoNCiAgICAgICAgICAgICAgICAgICAgbV90b19kX2wu
YXBwZW5kKCciJyArIGNuYW1lICsgJyI6ICcgKyBzbGFiZWwpDQogICAgICAgICAgICAgICAgICAg
IGRfdG9fbV9sLmFwcGVuZChzbGFiZWwgKyAnOiAiJyArIGNuYW1lICsgJyInKQ0KDQogICAgICAg
ICAgICAgICAgICAgIG1fdW5fbC5hcHBlbmQoJygnICsgc2xhYmVsICsgJywgIicgKyBjbmFtZSAr
ICciLCAnICtcDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3R5cGUgKyAnKScp
DQoNCiAgICAgICAgICAgICAgICAgICAgaWYgc2VsZi5hdF9tb2R1bGVfc2NvcGU6DQogICAgICAg
ICAgICAgICAgICAgICAgICBkX21hcF9sLmFwcGVuZChzbGFiZWwgKyAnOiAnICsgJ18wXycgKyBz
ZWxmLm1vZG5hbWUgKyBcDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAi
Ll9tXyIgKyB1bmFtZSArICJbIiArIHN0cihpKSArICJdIikNCiAgICAgICAgICAgICAgICAgICAg
ZWxzZToNCiAgICAgICAgICAgICAgICAgICAgICAgIGRfbWFwX2wuYXBwZW5kKHNsYWJlbCArICc6
ICcgKyAiX21fIiArIFwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVu
YW1lICsgIlsiICsgc3RyKGkpICsgIl0iKQ0KICAgICAgICAgICAgICAgIGkgPSBpICsgMQ0KDQog
ICAgICAgIG1fdG9fZCA9IHN0cmluZy5qb2luKG1fdG9fZF9sLCAiLCAiKQ0KICAgICAgICBkX3Rv
X20gPSBzdHJpbmcuam9pbihkX3RvX21fbCwgIiwgIikNCiAgICAgICAgbV91biAgID0gc3RyaW5n
LmpvaW4obV91bl9sLCAgICIsICIpDQogICAgICAgIGRfbWFwICA9IHN0cmluZy5qb2luKGRfbWFw
X2wsICAiLCAiKQ0KDQogICAgICAgIGlmIHNlbGYuYXRfbW9kdWxlX3Njb3BlOg0KICAgICAgICAg
ICAgc2VsZi5zdC5vdXQodW5pb25fZGVzY3JpcHRvcl9hdF9tb2R1bGVfc2NvcGUsDQogICAgICAg
ICAgICAgICAgICAgICAgICB1bmFtZSAgID0gdW5hbWUsDQogICAgICAgICAgICAgICAgICAgICAg
ICBtX3RvX2QgID0gbV90b19kLA0KICAgICAgICAgICAgICAgICAgICAgICAgZF90b19tICA9IGRf
dG9fbSwNCiAgICAgICAgICAgICAgICAgICAgICAgIGRlZl9tICAgPSBkZWZfbSwNCiAgICAgICAg
ICAgICAgICAgICAgICAgIGRlZl9kICAgPSBkZWZfZCwNCiAgICAgICAgICAgICAgICAgICAgICAg
IG1fdW4gICAgPSBtX3VuLA0KICAgICAgICAgICAgICAgICAgICAgICAgc3R5cGUgICA9IHN0eXBl
LA0KICAgICAgICAgICAgICAgICAgICAgICAgZGVmcG9zICA9IGRlZnBvcywNCiAgICAgICAgICAg
ICAgICAgICAgICAgIG1fZGVmICAgPSBtX2RlZiwNCiAgICAgICAgICAgICAgICAgICAgICAgIGRf
bWFwICAgPSBkX21hcCwNCiAgICAgICAgICAgICAgICAgICAgICAgIG1vZG5hbWUgPSBzZWxmLm1v
ZG5hbWUpDQogICAgICAgICAgICANCiAgICAgICAgICAgIHNlbGYuc3Qub3V0KHVuaW9uX3JlZ2lz
dGVyX2F0X21vZHVsZV9zY29wZSwNCiAgICAgICAgICAgICAgICAgICAgICAgIHVuYW1lICAgPSB1
bmFtZSwNCiAgICAgICAgICAgICAgICAgICAgICAgIG1vZG5hbWUgPSBzZWxmLm1vZG5hbWUpDQog
ICAgICAgIGVsc2U6DQogICAgICAgICAgICBzZWxmLnN0Lm91dCh1bmlvbl9kZXNjcmlwdG9yLA0K
ICAgICAgICAgICAgICAgICAgICAgICAgdW5hbWUgICA9IHVuYW1lLA0KICAgICAgICAgICAgICAg
ICAgICAgICAgbV90b19kICA9IG1fdG9fZCwNCiAgICAgICAgICAgICAgICAgICAgICAgIGRfdG9f
bSAgPSBkX3RvX20sDQogICAgICAgICAgICAgICAgICAgICAgICBkZWZfbSAgID0gZGVmX20sDQog
ICAgICAgICAgICAgICAgICAgICAgICBkZWZfZCAgID0gZGVmX2QsDQogICAgICAgICAgICAgICAg
ICAgICAgICBtX3VuICAgID0gbV91biwNCiAgICAgICAgICAgICAgICAgICAgICAgIHN0eXBlICAg
PSBzdHlwZSwNCiAgICAgICAgICAgICAgICAgICAgICAgIGRlZnBvcyAgPSBkZWZwb3MsDQogICAg
ICAgICAgICAgICAgICAgICAgICBtX2RlZiAgID0gbV9kZWYsDQogICAgICAgICAgICAgICAgICAg
ICAgICBkX21hcCAgID0gZF9tYXAsDQogICAgICAgICAgICAgICAgICAgICAgICBzY29wZSAgID0g
ZG90TmFtZShmc2NvcGVkTmFtZVs6LTFdKSkNCiAgICAgICAgICAgIA0KICAgICAgICAgICAgc2Vs
Zi5zdC5vdXQodW5pb25fcmVnaXN0ZXIsIHVuYW1lID0gdW5hbWUpDQoNCiAgICAjDQogICAgIyBG
b3J3YXJkIHVuaW9uDQogICAgIw0KICAgIGRlZiB2aXNpdFVuaW9uRm9yd2FyZChzZWxmLCBub2Rl
KToNCiAgICAgICAgaWYgc2VsZi5oYW5kbGVJbXBvcnRlZChub2RlKTogcmV0dXJuDQoNCiAgICAg
ICAgdW5hbWUgPSBtYW5nbGUobm9kZS5pZGVudGlmaWVyKCkpDQoNCiAgICAgICAgaWYgc2VsZi5h
dF9tb2R1bGVfc2NvcGU6DQogICAgICAgICAgICBzZWxmLnN0Lm91dChmb3J3YXJkX3VuaW9uX2Rl
c2NyX2F0X21vZHVsZV9zY29wZSwNCiAgICAgICAgICAgICAgICAgICAgICAgIHVuYW1lICAgPSB1
bmFtZSwNCiAgICAgICAgICAgICAgICAgICAgICAgIHJlcG9JZCAgPSBub2RlLnJlcG9JZCgpLA0K
ICAgICAgICAgICAgICAgICAgICAgICAgbW9kbmFtZSA9IHNlbGYubW9kbmFtZSkNCiAgICAgICAg
ZWxzZToNCiAgICAgICAgICAgIHNlbGYuc3Qub3V0KGZvcndhcmRfdW5pb25fZGVzY3IsDQogICAg
ICAgICAgICAgICAgICAgICAgICB1bmFtZSAgID0gdW5hbWUsDQogICAgICAgICAgICAgICAgICAg
ICAgICByZXBvSWQgID0gbm9kZS5yZXBvSWQoKSwNCiAgICAgICAgICAgICAgICAgICAgICAgIG1v
ZG5hbWUgPSBzZWxmLm1vZG5hbWUpDQoNCiAgICAjDQogICAgIyBFbnVtDQogICAgIw0KICAgIGRl
ZiB2aXNpdEVudW0oc2VsZiwgbm9kZSk6DQogICAgICAgIGlmIHNlbGYuaGFuZGxlSW1wb3J0ZWQo
bm9kZSk6IHJldHVybg0KDQogICAgICAgIGVuYW1lID0gbWFuZ2xlKG5vZGUuaWRlbnRpZmllcigp
KQ0KICAgICAgICBzZWxmLnN0Lm91dChlbnVtX3N0YXJ0LCBlbmFtZSA9IGVuYW1lKQ0KDQogICAg
ICAgIGk9MA0KICAgICAgICBlbGlzdCA9IFtdDQogICAgICAgIGZvciBpdGVtIGluIG5vZGUuZW51
bWVyYXRvcnMoKToNCiAgICAgICAgICAgIGV2YWwgPSBzdHIoaSkNCg0KICAgICAgICAgICAgaWYg
c2VsZi5hdF9tb2R1bGVfc2NvcGU6DQogICAgICAgICAgICAgICAgc2VsZi5zdC5vdXQoZW51bV9p
dGVtX2F0X21vZHVsZV9zY29wZSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtICAg
ID0gaXRlbS5pZGVudGlmaWVyKCksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbCAg
ICA9IGV2YWwsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kbmFtZSA9IHNlbGYubW9k
bmFtZSkNCiAgICAgICAgICAgIGVsc2U6DQogICAgICAgICAgICAgICAgc2VsZi5zdC5vdXQoZW51
bV9pdGVtLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0gICAgPSBpdGVtLmlkZW50
aWZpZXIoKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsICAgID0gZXZhbCkNCg0K
ICAgICAgICAgICAgaWYgc2VsZi5hdF9tb2R1bGVfc2NvcGU6DQogICAgICAgICAgICAgICAgZWxp
c3QuYXBwZW5kKGRvdE5hbWUoZml4dXBTY29wZWROYW1lKGl0ZW0uc2NvcGVkTmFtZSgpKSkpDQog
ICAgICAgICAgICBlbHNlOg0KICAgICAgICAgICAgICAgIGVsaXN0LmFwcGVuZChpdGVtLmlkZW50
aWZpZXIoKSkNCg0KICAgICAgICAgICAgaSA9IGkgKyAxDQoNCiAgICAgICAgZWl0ZW1zID0gc3Ry
aW5nLmpvaW4oZWxpc3QsICIsICIpDQoNCiAgICAgICAgaWYgc2VsZi5hdF9tb2R1bGVfc2NvcGU6
DQogICAgICAgICAgICBzZWxmLnN0Lm91dChlbnVtX29iamVjdF9hbmRfZGVzY3JpcHRvcl9hdF9t
b2R1bGVfc2NvcGUsDQogICAgICAgICAgICAgICAgICAgICAgICBlbmFtZSAgID0gZW5hbWUsDQog
ICAgICAgICAgICAgICAgICAgICAgICByZXBvSWQgID0gbm9kZS5yZXBvSWQoKSwNCiAgICAgICAg
ICAgICAgICAgICAgICAgIGVpdGVtcyAgPSBlaXRlbXMsDQogICAgICAgICAgICAgICAgICAgICAg
ICBtb2RuYW1lID0gc2VsZi5tb2RuYW1lKQ0KICAgICAgICBlbHNlOg0KICAgICAgICAgICAgc2Vs
Zi5zdC5vdXQoZW51bV9vYmplY3RfYW5kX2Rlc2NyaXB0b3IsDQogICAgICAgICAgICAgICAgICAg
ICAgICBlbmFtZSAgID0gZW5hbWUsDQogICAgICAgICAgICAgICAgICAgICAgICByZXBvSWQgID0g
bm9kZS5yZXBvSWQoKSwNCiAgICAgICAgICAgICAgICAgICAgICAgIGVpdGVtcyAgPSBlaXRlbXMp
DQoNCiAgICBkZWYgdmlzaXROYXRpdmUoc2VsZiwgbm9kZSk6DQogICAgICAgIGlmIHNlbGYuaGFu
ZGxlSW1wb3J0ZWQobm9kZSk6IHJldHVybg0KDQogICAgICAgIHN5cy5zdGRlcnIud3JpdGUobWFp
bi5jbWRuYW1lICsgXA0KICAgICAgICAgICAgICAgICAgICAgICAgICI6IFdhcm5pbmc6IGlnbm9y
aW5nIGRlY2xhcmF0aW9uIG9mIG5hdGl2ZSAiICsgXA0KICAgICAgICAgICAgICAgICAgICAgICAg
IG5vZGUuaWRlbnRpZmllcigpICsgIlxuIikNCg0KICAgIGRlZiB2aXNpdFZhbHVlRm9yd2FyZChz
ZWxmLCBub2RlKToNCiAgICAgICAgc3lzLnN0ZGVyci53cml0ZShub2RlLmZpbGUoKSArICI6IiAr
IHN0cihub2RlLmxpbmUoKSkgKyBcDQogICAgICAgICAgICAgICAgICAgICAgICAgIjogb21uaU9S
QnB5IGRvZXMgbm90IHN1cHBvcnQgdmFsdWV0eXBlXG4iKQ0KICAgICAgICBzeXMuZXhpdCgxKQ0K
DQogICAgZGVmIHZpc2l0VmFsdWVCb3goc2VsZiwgbm9kZSk6DQogICAgICAgIHN5cy5zdGRlcnIu
d3JpdGUobm9kZS5maWxlKCkgKyAiOiIgKyBzdHIobm9kZS5saW5lKCkpICsgXA0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ByZXR1cm4gTm9uZQ0KDQpkZWYgZG9jV2FybmluZyhu
b2RlKToNCiAgICBzeXMuc3RkZXJyLndyaXRlKG1haW4uY21kbmFtZSArIFwNCiAgICAgICAgICAg
ICAgICAgICAgICI6IFdhcm5pbmc6IENvbnN0YW50ICciICsgbm9kZS5pZGVudGlmaWVyKCkgKyAi
JyBsb29rcyAiDQogICAgICAgICAgICAgICAgICAgICAibGlrZSBhIFB5dGhvbiBkb2NzdHJpbmcs
IGJ1dCB0aGVyZSBpcyBubyBkZWNsYXJhdGlvbiAiDQogICAgICAgICAgICAgICAgICAgICAibmFt
ZWQgJyIgKyBub2RlLmlkZW50aWZpZXIoKVs6LTddICsgIicuXG4iKQ0KICAgIA0KY2xhc3MgRG9j
c3RyaW5nVmlzaXRvciAoaWRsdmlzaXRvci5Bc3RWaXNpdG9yKToNCiAgICBkZWYgX19pbml0X18o
c2VsZiwgc3QpOg0KICAgICAgICBzZWxmLmRvY3MgPSBbXQ0KICAgICAgICBzZWxmLnN0ICAgPSBz
dA0KDQogICAgZGVmIG91dHB1dChzZWxmKToNCiAgICAgICAgaWYgc2VsZi5kb2NzOg0KICAgICAg
ICAgICAgc2VsZi5zdC5vdXQoIiIiXA0KIw0KIyBEb2NzdHJpbmdzDQojDQoiIiIpDQogICAgICAg
IGZvciBuc24sIGRzbiBpbiBzZWxmLmRvY3M6DQogICAgICAgICAgICBuc24gPSBmaXh1cFNjb3Bl
ZE5hbWUobnNuKQ0KICAgICAgICAgICAgZHNuID0gZml4dXBTY29wZWROYW1lKGRzbikNCg0KICAg
ICAgICAgICAgc2VsZi5zdC5vdXQoIkBub2RlQC5fX2RvY19fID0gQGRvY0AiLA0KICAgICAgICAg
ICAgICAgICAgICAgICAgbm9kZT1kb3ROYW1lKG5zbiksIGRvYz1kb3ROYW1lKGRzbikpDQogICAg
ICAgICAgICANCiAgICAgICAgaWYgc2VsZi5kb2NzOg0KICAgICAgICAgICAgc2VsZi5zdC5vdXQo
IiIpDQoNCiAgICBkZWYgdmlzaXRBU1Qoc2VsZiwgbm9kZSk6DQogICAgICAgIGZvciBuIGluIG5v
ZGUuZGVjbGFyYXRpb25zKCk6DQogICAgICAgICAgICBpZiBub3Qgb3V0cHV0X2lubGluZSBhbmQg
bm90IG4ubWFpbkZpbGUoKTogY29udGludWUNCiAgICAgICAgICAgIA0KICAgICAgICAgICAgZCA9
IGRvY0NvbnN0KG4pDQogICAgICAgICAgICBpZiBkOg0KICAgICAgICAgICAgICAgIG9rID0gMA0K
ICAgICAgICAgICAgICAgIGZvciBvIGluIG5vZGUuZGVjbGFyYXRpb25zKCk6DQogICAgICAgICAg
ICAgICAgICAgIGlmIG5vZGVJZChvKSA9PSBkOg0KICAgICAgICAgICAgICAgICAgICAgICAgc2Vs
Zi5kb2NzLmFwcGVuZCgoby5zY29wZWROYW1lKCksIG4uc2NvcGVkTmFtZSgpKSkNCiAgICAgICAg
ICAgICAgICAgICAgICAgIGlmIGlzaW5zdGFuY2UobywgaWRsYXN0LkludGVyZmFjZSk6DQogICAg
ICAgICAgICAgICAgICAgICAgICAgICAgc24gPSBvLnNjb3BlZE5hbWUoKVs6XQ0KICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIHNuWy0xXSA9ICJfb2JqcmVmXyIgKyBzblstMV0NCiAgICAgICAg
ICAgICAgICAgICAgICAgICAgICBzZWxmLmRvY3MuYXBwZW5kKChzbiwgbi5zY29wZWROYW1lKCkp
KQ0KICAgICAgICAgICAgICAgICAgICAgICAgb2sgPSAxDQogICAgICAgICAgICAgICAgICAgICAg
ICBicmVhaw0KICAgICAgICAgICAgICAgIGlmIG5vdCBvazoNCiAgICAgICAgICAgICAgICAgICAg
ZG9jV2FybmluZyhuKQ0KICAgICAgICAgICAgbi5hY2NlcHQoc2VsZikNCg0KICAgIGRlZiB2aXNp
dE1vZHVsZShzZWxmLCBub2RlKToNCiAgICAgICAgZm9yIG4gaW4gbm9kZS5kZWZpbml0aW9ucygp
Og0KICAgICAgICAgICAgZCA9IGRvY0NvbnN0KG4pDQogICAgICAgICAgICBpZiBkOg0KICAgICAg
ICAgICAgICAgIGlmIGQgPT0gbm9kZS5pZGVudGlmaWVyKCk6DQogICAgICAgICAgICAgICAgICAg
IHNlbGYuZG9jcy5hcHBlbmQoKG5vZGUuc2NvcGVkTmFtZSgpLCBuLnNjb3BlZE5hbWUoKSkpDQog
ICAgICAgICAgICAgICAgZWxzZToNCiAgICAgICAgICAgICAgICAgICAgb2sgPSAwDQogICAgICAg
ICAgICAgICAgICAgIGZvciBvIGluIG5vZGUuZGVmaW5pdGlvbnMoKToNCiAgICAgICAgICAgICAg
ICAgICAgICAgIGlmIG5vZGVJZChvKSA9PSBkOg0KICAgICAgICAgICAgICAgICAgICAgICAgICAg
IHNlbGYuZG9jcy5hcHBlbmQoKG8uc2NvcGVkTmFtZSgpLCBuLnNjb3BlZE5hbWUoKSkpDQogICAg
ICAgICAgICAgICAgICAgICAgICAgICAgaWYgaXNpbnN0YW5jZShvLCBpZGxhc3QuSW50ZXJmYWNl
KToNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc24gPSBvLnNjb3BlZE5hbWUoKVs6
XQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzblstMV0gPSAiX29ianJlZl8iICsg
c25bLTFdDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuZG9jcy5hcHBlbmQo
KHNuLCBuLnNjb3BlZE5hbWUoKSkpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgb2sgPSAx
DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsNCiAgICAgICAgICAgICAgICAgICAg
aWYgbm90IG9rOg0KICAgICAgICAgICAgICAgICAgICAgICAgZG9jV2FybmluZyhuKQ0KICAgICAg
ICAgICAgbi5hY2NlcHQoc2VsZikNCg0KICAgIGRlZiB2aXNpdEludGVyZmFjZShzZWxmLCBub2Rl
KToNCiAgICAgICAgZm9yIG4gaW4gbm9kZS5kZWNsYXJhdGlvbnMoKToNCiAgICAgICAgICAgIGQg
PSBkb2NDb25zdChuKQ0KICAgICAgICAgICAgaWYgZDoNCiAgICAgICAgICAgICAgICBpZiBkID09
IG5vZGUuaWRlbnRpZmllcigpOg0KICAgICAgICAgICAgICAgICAgICBzZWxmLmRvY3MuYXBwZW5k
KChub2RlLnNjb3BlZE5hbWUoKSwgbi5zY29wZWROYW1lKCkpKQ0KICAgICAgICAgICAgICAgICAg
ICBzbiA9IG5vZGUuc2NvcGVkTmFtZSgpWzpdDQogICAgICAgICAgICAgICAgICAgIHNuWy0xXSA9
ICJfb2JqcmVmXyIgKyBzblstMV0NCiAgICAgICAgICAgICAgICAgICAgc2VsZi5kb2NzLmFwcGVu
ZCgoc24sIG4uc2NvcGVkTmFtZSgpKSkNCiAgICAgICAgICAgICAgICBlbHNlOg0KICAgICAgICAg
ICAgICAgICAgICBvayA9IDANCiAgICAgICAgICAgICAgICAgICAgZm9yIG8gaW4gbm9kZS5kZWNs
YXJhdGlvbnMoKToNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIG5vZGVJZChvKSA9PSBkOg0K
ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuZG9jcy5hcHBlbmQoKG8uc2NvcGVkTmFt
ZSgpLCBuLnNjb3BlZE5hbWUoKSkpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgb2sgPSAx
DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsNCiAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgDQogICAgICAgICAgICAgICAgICAgIGlmIG9rOg0KICAgICAgICAgICAgICAg
ICAgICAgICAgY29udGludWUNCg0KICAgICAgICAgICAgICAgICAgICBmb3IgbyBpbiBub2RlLmNh
bGxhYmxlcygpOg0KICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi50YXJnZXRfaWQgICA9IGQN
CiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYudGFyZ2V0X25vZGUgPSBuDQogICAgICAgICAg
ICAgICAgICAgICAgICBzZWxmLm9rICAgICAgICAgID0gMA0KICAgICAgICAgICAgICAgICAgICAg
ICAgby5hY2NlcHQoc2VsZikNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIHNlbGYub2s6DQog
ICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsNCiAgICAgICAgICAgICAgICAgICAgDQog
ICAgICAgICAgICAgICAgICAgIGlmIG5vdCBzZWxmLm9rOiAgICANCiAgICAgICAgICAgICAgICAg
ICAgICAgIGRvY1dhcm5pbmcobikNCg0KICAgIGRlZiB2aXNpdE9wZXJhdGlvbihzZWxmLCBub2Rl
KToNCiAgICAgICAgaWYgbm9kZS5pZGVudGlmaWVyKCkgPT0gc2VsZi50YXJnZXRfaWQ6DQogICAg
ICAgICAgICBzbiA9IG5vZGUuc2NvcGVkTmFtZSgpICsgWyJpbV9mdW5jIl0NCiAgICAgICAgICAg
IHNuWy0zXSA9ICJfb2JqcmVmXyIgKyBzblstM10NCiAgICAgICAgICAgIHNlbGYuZG9jcy5hcHBl
bmQoKHNuLCBzZWxmLnRhcmdldF9ub2RlLnNjb3BlZE5hbWUoKSkpDQogICAgICAgICAgICBzZWxm
Lm9rID0gMQ0KDQogICAgZGVmIHZpc2l0QXR0cmlidXRlKHNlbGYsIG5vZGUpOg0KICAgICAgICBm
b3IgbiBpbiBub2RlLmRlY2xhcmF0b3JzKCk6DQogICAgICAgICAgICBpZiBuLmlkZW50aWZpZXIo
KSA9PSBzZWxmLnRhcmdldF9pZDoNCiAgICAgICAgICAgICAgICBzbiA9IG4uc2NvcGVkTmFtZSgp
ICsgWyJpbV9mdW5jIl0NCiAgICAgICAgICAgICAgICBzblstM10gPSAiX29ianJlZl8iICsgc25b
LTNdDQogICAgICAgICAgICAgICAgc25bLTJdID0gIl9nZXRfIiAgICArIHNuWy0yXQ0KICAgICAg
ICAgICAgICAgIHNlbGYuZG9jcy5hcHBlbmQoKHNuLCBzZWxmLnRhcmdldF9ub2RlLnNjb3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ZXJyLndyaXRlKG1haW4uY21kbmFtZSArICc6IE91dHB1dCBlcnJvcjogIicgKyBtb2RmaWxlICtc
DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICciIGV4aXN0cyBidXQgaXMgbm90IGEgZmls
ZS5cbicpDQogICAgICAgICAgICBzeXMuZXhpdCgxKQ0KDQogICAgICAgICMgSW5zZXJ0IHRoZSBp
bXBvcnQgbGluZSBmb3IgdGhlIGN1cnJlbnQgSURMIGZpbGUNCiAgICAgICAgaW5mICA9IG9wZW4o
bW9kZmlsZSwgInIiKQ0KICAgICAgICBvdXRmID0gb3Blbih0bXBmaWxlLCAidyIpDQoNCiAgICAg
ICAgbGluZSA9ICIiDQogICAgICAgIHdoaWxlIGxpbmVbOjddICE9ICIjICoqIDEuIjoNCiAgICAg
ICAgICAgIGxpbmUgPSBpbmYucmVhZGxpbmUoKQ0KICAgICAgICAgICAgaWYgbGluZSA9PSAiIjoN
CiAgICAgICAgICAgICAgICBzeXMuc3RkZXJyLndyaXRlKG1haW4uY21kbmFtZSArICc6IE91dHB1
dCBlcnJvcjogIicgKyBcDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RmaWxl
ICsgXA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJyIgZW5kZWQgYmVmb3JlIEkg
Zm91bmQgYSAiIyAqKiAxLiIgdGFnLlxuJyBcDQogICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAnSGF2ZSB5b3UgbGVmdCBiZWhpbmQgc29tZSBmaWxlcyBmcm9tIGEgJyAgXA0KICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2RpZmZlcmVudCBQeXRob24gT1JCP1xuJykNCiAg
ICAgICAgICAgICAgICBzeXMuZXhpdCgxKQ0KICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAg
b3V0Zi53cml0ZShsaW5lKQ0KICAgICAgICAgICAgDQogICAgICAgIGFscmVhZHkgICAgPSAwDQog
ICAgICAgIG91dHB1dGxpbmUgPSAiaW1wb3J0ICIgKyBweW1vZHVsZSArICJcbiINCg0KICAgICAg
ICB3aGlsZSBsaW5lICE9ICJcbiI6DQogICAgICAgICAgICBsaW5lID0gaW5mLnJlYWRsaW5lKCkN
CiAgICAgICAgICAgIGlmIGxpbmUgPT0gIiI6DQogICAgICAgICAgICAgICAgc3lzLnN0ZGVyci53
cml0ZShtYWluLmNtZG5hbWUgKyAnOiBPdXRwdXQgZXJyb3I6ICInICsgXA0KICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgbW9kZmlsZSArXA0KICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgJyIgZW5kZWQgd2hpbGUgSSB3YXMgbG9va2luZyBhdCBpbXBvcnRzLlxuJykNCiAg
ICAgICAgICAgICAgICBzeXMuZXhpdCgxKQ0KDQogICAgICAgICAgICBpZiBsaW5lICE9ICJcbiI6
DQogICAgICAgICAgICAgICAgb3V0Zi53cml0ZShsaW5lKQ0KICAgICAgICAgICAgICAgIGlmIGxp
bmUgPT0gb3V0cHV0bGluZToNCiAgICAgICAgICAgICAgICAgICAgYWxyZWFkeSA9IDENCg0KICAg
ICAgICBpZiBub3QgYWxyZWFkeToNCiAgICAgICAgICAgIG91dGYud3JpdGUob3V0cHV0bGluZSkN
Cg0KICAgICAgICBvdXRmLndyaXRlKCJcbiIpDQoNCiAgICAgICAgIyBPdXRwdXQgdGhlIHJlc3Qg
b2YgdGhlIGZpbGUNCiAgICAgICAgd2hpbGUgbGluZSAhPSAiIjoNCiAgICAgICAgICAgIGxpbmUg
PSBpbmYucmVhZGxpbmUoKQ0KICAgICAgICAgICAgb3V0Zi53cml0ZShsaW5lKQ0KDQogICAgICAg
IGluZi5jbG9zZSgpDQogICAgICAgIG91dGYuY2xvc2UoKQ0KDQogICAgICAgIG9zLnJlbW92ZSht
b2RmaWxlKQ0KICAgICAgICBvcy5yZW5hbWUodG1wZmlsZSwgbW9kZmlsZSkNCg0KDQogICAgIyBH
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gICAgICAgICAgICAgICAgICAgICAgICAg
JyIgZW5kZWQgYmVmb3JlIEkgZm91bmQgYSAiIyAqKiAyLiIgdGFnLlxuJykNCiAgICAgICAgICAg
ICAgICBzeXMuZXhpdCgxKQ0KICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgb3V0Zi53cml0
ZShsaW5lKQ0KICAgICAgICAgICAgDQogICAgICAgIGFscmVhZHkgICAgPSAwDQogICAgICAgIG91
dHB1dGxpbmUgPSAiaW1wb3J0ICIgKyBzdWJtb2QgKyAiXG4iDQoNCiAgICAgICAgd2hpbGUgbGlu
ZSAhPSAiXG4iOg0KICAgICAgICAgICAgbGluZSA9IGluZi5yZWFkbGluZSgpDQogICAgICAgICAg
ICBpZiBsaW5lID09ICIiOg0KICAgICAgICAgICAgICAgIHN5cy5zdGRlcnIud3JpdGUobWFpbi5j
bWRuYW1lICsgJzogT3V0cHV0IGVycm9yOiAiJyArIFwNCiAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgIG1vZGZpbGUgK1wNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICci
IGVuZGVkIHdoaWxlIEkgd2FzIGxvb2tpbmcgYXQgaW1wb3J0cy5cbicpDQogICAgICAgICAgICAg
ICAgc3lzLmV4aXQoMSkNCg0KICAgICAgICAgICAgaWYgbGluZSAhPSAiXG4iOg0KICAgICAgICAg
ICAgICAgIG91dGYud3JpdGUobGluZSkNCiAgICAgICAgICAgICAgICBpZiBsaW5lID09IG91dHB1
dGxpbmU6DQogICAgICAgICAgICAgICAgICAgIGFscmVhZHkgPSAxDQoNCiAgICAgICAgaWYgbm90
IGFscmVhZHk6DQogICAgICAgICAgICBvdXRmLndyaXRlKG91dHB1dGxpbmUpDQoNCiAgICAgICAg
b3V0Zi53cml0ZSgiXG4iKQ0KDQogICAgICAgICMgT3V0cHV0IHRoZSByZXN0IG9mIHRoZSBmaWxl
DQogICAgICAgIHdoaWxlIGxpbmUgIT0gIiI6DQogICAgICAgICAg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AgICc6IFdhcm5pbmc6IGRpc2FibGluZyBvbGQtc3R5bGUgJyBcDQogICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnUE9BXyBtb2R1bGUgaW4gIicgKyBtb2RwYXRo
ICsgJyJcbicpDQoNCiAgICAgICAgICAgICAgICBvdXRmID0gb3Blbih0bXBmaWxlLCAidyIpDQog
ICAgICAgICAgICAgICAgc3QgICA9IG91dHB1dC5TdHJlYW0ob3V0ZiwgNCkNCg0KICAgICAgICAg
ICAgICAgIHN0Lm91dChweW1vZHVsZV9kZWFkX3ByZWZpeCwgbW9kdWxlPW1vZHVsZSwNCiAgICAg
ICAgICAgICAgICAgICAgICAgc2tlbG5hbWUgPSBza2VsZXRvbk1vZHVsZU5hbWUobW9kdWxlKSkN
Cg0KICAgICAgICAgICAgICAgIHdoaWxlIGxpbmUgIT0gIiI6DQogICAgICAgICAgICAgICAgICAg
IG91dGYud3JpdGUobGluZSkNCiAgICAgICAgICAgICAgICAgICAgbGluZSA9IGluZi5yZWFkbGlu
ZSgpDQoNCiAgICAgICAgICAgICAgICBkZWwgc3QNCiAgICAgICAgICAgICAgICBpbmYuY2xvc2Uo
KQ0KICAgICAgICAgICAgICAgIG91dGYuY2xvc2UoKQ0KDQogICAgICAgICAgICAgICAgb3MucmVt
b3ZlKG1vZGZpbGUpDQogICAgICAgICAgICAgICAgb3MucmVuYW1lKHRtcGZpbGUsIG1vZGZpbGUp
DQoNCiAgICAgICAgICAgIGVsc2U6DQogICAgICAgICAgICAgICAgc3lzLnN0ZGVyci53cml0ZSht
YWluLmNtZG5hbWUgKyBcDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnOiBXYXJu
aW5nOiBwcmV2aW91c2x5IGRpc2FibGVkIG9sZC1zdHlsZSAnIFwNCiAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICdQT0FfIG1vZHVsZSBpbiAiJyArIG1vZHBhdGggKyAnIlxuJykNCg==

------_=_NextPart_001_01C291B1.7E249746--