mirror of
https://github.com/alantang1977/hipy.git
synced 2024-11-22 14:46:56 +02:00
1 line
7.6 KiB
JavaScript
1 line
7.6 KiB
JavaScript
|
Z2xvYmFsVGhpcy5wb3N0MiA9IGZ1bmN0aW9uIChfdXJsLCBfZGF0YSkgewogICAgLy8gbGV0IGRhdGEgPSBidWlsZFVybChfdXJsLF9kYXRhKS5zcGxpdCgnPycpWzFdOwogICAgLy8gcmV0dXJuIHBvc3QoX3VybCx7Ym9keTplbmNvZGVVUklDb21wb25lbnQoZGF0YSksaGVhZGVyczpydWxlLmhlYWRlcnN9KTsKICAgIHJldHVybiBwb3N0KF91cmwsIHtkYXRhOiBfZGF0YSwgaGVhZGVyczogcnVsZS5oZWFkZXJzfSk7Cn0KdmFyIHJ1bGUgPSB7CiAgICDnsbvlnos6ICflkKzmrYwnLC8v5b2x6KeGfOWQrOS5pnzmvKvnlLt85bCP6K+0CiAgICB0aXRsZTogJ0tUVuatjOWOhVvlkKxdJywKICAgIC8vIGhvc3Q6ICdodHRwczovL3Zwc2RuLmxldXNlLnRvcCcsCiAgICBob3N0OiAnaHR0cHM6Ly9hcGkuY2xvdWRmbGFyZS5jb20nLAogICAgcm9vdDogJ2h0dHBzOi8vYXBpLmNsb3VkZmxhcmUuY29tL2NsaWVudC92NC9hY2NvdW50cy8xZWNjNGE5NDdjNWE1MTg0MjcxNDFmNGE2OGM4NmVhMS9kMS9kYXRhYmFzZS80ZjEzODVhYi1mOTUyLTQwNGEtODcwYS1lNGNmZWY0YmQ5ZmQvcXVlcnknLAogICAgbWt0dlVybDogJ2h0dHA6Ly90eHlzb25nLm15c290by5jYy9zb25ncy8nLAogICAgdXJsOiAnL3NlYXJjaG12P3RhYmxlPWZ5Y2xhc3MmcGc9ZnlwYWdlI2Z5ZmlsdGVyJywKICAgIHNlYXJjaFVybDogJy9zZWFyY2htdj9rZXl3b3Jkcz0qKiZwZz1meXBhZ2UnLAogICAgcGljOiAnaHR0cHM6Ly9hcGkucGF1Z3JhbS5jb20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4QmpQcVg5bWpGcTJBMk01S3VsNklnM0Q4eicsCiAgICB9LAogICAgdGltZW91dDogNTAwMCwKICAgIGNsYXNzX25hbWU6ICfmrYzmiYsm5puy5bqTJywKICAgIGNsYXNzX3VybDogJ3NpbmdlciZzb25nJywKICAgIOS4gOe6pzogJGpzLnRvU3RyaW5nKCgpID0+IHsKICAgICAgICBsZXQgZCA9IFtdOwogICAgICAgIC8vIGxldCBfdXJsID0gaW5wdXQuc3BsaXQoJyMnKVswXTsKICAgICAgICBsZXQgX3VybCA9IHJ1bGUucm9vdDsKICAgICAgICBsZXQgcGFyYW1zID0gW107CiAgICAgICAgbGV0IHNxbCA9ICcnOwogICAgICAgIGxldCBzaXplID0gMjA7CiAgICAgICAgbGV0IHBnID0gTVlfUEFHRTsKICAgICAgICBpZiAoTVlfQ0FURSA9PT0gJ3NpbmdlcicpIHsKICAgICAgICAgICAgc3FsID0gJ3NlbGVjdCBuYW1lLCBpZCBmcm9tIHNpbmdlciB3aGVyZSAxPTEnOwogICAgICAgICAgICBpZiAoTVlfRkwucmVnaW9uKSB7CiAgICAgICAgICAgICAgICBwYXJhbXMucHVzaChNWV9GTC5yZWdpb24pOwogICAgICAgICAgICAgICAgc3FsICs9ICcgYW5kIHJlZ2lvbl9pZCA9ID8nOwogICAgICAgICAgICAgICAgLy8gX3VybCArPSAnJndoZXJlPXJlZ2lvbl9pZCZrZXl3b3Jkcz0nICsgTVlfRkwucmVnaW9uICsgJyZzaXplPTIxJzsKICAgICAgICAgICAgfSBlbHNlIGlmIChNWV9GTC5mb3JtKSB7CiAgICAgICAgICAgICAgICBwYXJhbXMucHVzaChNWV9GTC5mb3JtKTsKICAgICAgICAgICAgICAgIHNxbCArPSAnIGFuZCBmb3JtX2lkID0gPyc7CiAgICAgICAgICAgICAgICAvLyBfdXJsICs9ICcmd2hlcmU9Zm9ybV9pZCZrZXl3b3Jkcz0nICsgTVlfRkwuZm9ybSArICcmc2l6ZT0yMSc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgc3FsICs9IGAgb3JkZXIgYnkgaWQgbGltaXQgJHsocGcgLSAxKSAqIHNpemV9LCR7c2l6ZX07YDsKICAgICAgICAgICAgbGV0IGh0bWwgPSBwb3N0MihfdXJsLCB7cGFyYW1zOiBwYXJhbXMsIHNxbDogc3FsfSk7CiAgICAgICAgICAgIGxldCBqc29uID0gSlNPTi5wYXJzZShodG1sKTsKICAgICAgICAgICAgZCA9IGpzb24ucmVzdWx0WzBdLnJlc3VsdHMubWFwKGl0ZW0gPT4gewogICAgICAgICAgICAgICAgbGV0IHBpYyA9IHJ1bGUubWt0dlVybCArIGl0ZW0uaWQgKyAnLmpwZyc7CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIHZvZF9pZDogaXRlbS5uYW1lICsgJ0BAJyArIGl0ZW0ubmFtZSArICdAQCcgKyBwaWMsCiAgICAgICAgICAgICAgICAgICAgdm9kX25hbWU6IGl0ZW0ubmFtZSwKICAgICAgICAgICAgICAgICAgICB2b2RfcGljOiBwaWMsCiAgICAgICAgICAgICAgICAgICAgdm9kX3JlbWFya3M6ICcnLAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9IGVsc2UgaWYgKE1ZX0NBVEUgPT09ICdzb25nJykgewogICAgICAgICAgICBzcWwgPSAnc2VsZWN0IG51bWJlciwgbmFtZSBmcm9tIHNvbmcgd2hlcmUgMT0xJzsKICAgICAgICAgICAgaWYgKE1ZX0ZMLmxhbikgewogICA
|