xiaomianao666

小程序:AI识片

Jun 13th, 2024
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@AI识片@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiQUnor4bniYciLCJhdXRob3IiOiIiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IyMiLCJ2ZXJzaW9uIjo1NiwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJ0b29sIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG52YXIgZCA9IFtdO1xuZC5wdXNoKHtcbiAgICB0aXRsZTogXCLnu4jmnoHlpKfmi5vvvIzovpPlhaXmkJzntKLlnLDlnYDnlJ/miJDop4TliJlcIixcbiAgICB1cmw6IFwiXCIsXG4gICAgY29sX3R5cGU6IFwidGV4dF9jZW50ZXJfMVwiLFxuICAgIGRlc2M6IFwiXCIsXG4gICAgcGljX3VybDogXCJcIlxufSk7XG5cbmQucHVzaCh7XG4gICAgdGl0bGU6IFwiXCIsXG4gICAgdXJsOiBcIlwiLFxuICAgIGNvbF90eXBlOiBcImlucHV0XCIsXG4gICAgZGVzYzogXCLor7fovpPlhaXopoHnlJ/miJDnmoTop4TliJnlkIjpm4blkI1cIixcbiAgICBwaWNfdXJsOiBcIlwiLFxuICAgIGV4dHJhOiB7ICAgICAgICBcbiAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcbiAgICAgICAgb25DaGFuZ2U6ICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICAgICAgcHV0TXlWYXIoXCJyMVwiLCBpbnB1dCk7XG4gICAgICAgIH0pLFxuICAgICAg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1cmx4ID0gXFxcIndlYlJ1bGU6Ly9cXFwiICsgaXQuaHJlZiArIFxcXCJAXFxcIiArIF93ZWI7XFxuICAgICAgICAgICAgdmFyIGV4dHJheCA9IHtcXG4gICAgICAgICAgICAgICAganNMb2FkaW5nSW5qZWN0OiB0cnVlLFxcbiAgICAgICAgICAgICAgICBpZDogaXQuaHJlZixcXG4gICAgICAgICAgICAgICAgYmxvY2tSdWxlczogWycubTRhJywgJy5tcDMnLCAnLmZsdicsICcuYXZpJywgJy4zZ3AnLCAnLm1wZWcnLCAnLndtdicsICcubW92JywgJy5ybXZiJywgJy5naWYnLCAnLmpwZWcnLCAnLnBuZycsICcuaWNvJywgJy5zdmcnXVxcbiAgICAgICAgICAgIH07XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHZhciB1cmx4ID0gXFxcInZpZGVvOi8vXFxcIiArIGl0LmhyZWY7XFxuICAgICAgICAgICAgdmFyIGV4dHJheCA9IHtcXG4gICAgICAgICAgICAgICAgaWQ6IGl0LmhyZWZcXG4gICAgICAgICAgICB9O1xcbiAgICAgICAgfVxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogdCxcXG4gICAgICAgICAgICB1cmw6IHVybHgsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzNcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiBleHRyYXhcXG4gICAgICAgIH0pO1xcbiAgICB9XFxufVxcbmlmIChkLmxlbmd0aCA9PSAwKSB7XFxuICAgIC8v5Yy56YWN5aSx6LSlXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIlxcXCIsXFxuICAgICAgICB1cmw6IHVybCxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwieDVfd2Vidmlld19zaW5nbGVcXFwiLFxcbiAgICAgICAgZGVzYzogXFxcImZsb2F0JiYxMDAlXFxcIixcXG4gICAgICAgIHBpY191cmw6IFxcXCJcXFwiL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L2956ysXFxcIiArIHAgKyBcXFwi6aG15Lit77yM6L+b5bqm77yaMS9cXFwiICsgZGF0YS5sZW5ndGgsXFxuICAgICAgICAgICAgdXJsOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgIGRlc2M6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgIHBpY191cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiBwYWdlaWRcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgfVxcbiAgICBzZXRSZXN1bHQoZCk7XFxuICAgIGxvZyhkYXRhLmxlbmd0aCk7XFxuICAgIGlmIChkYXRhLmxlbmd0aCA+IDApIHtcXG4gICAgICAgIC8v5aSa57q/56iL5Yqg6L29ICAgICAgICBcXG4gICAgICAgIGxldCByZWFsUGFnZSA9IFxcXCJcXFwiID09IHIgPyAxIDogcDtcXG4gICAgICAgIGxldCB0YXNrcyA9IGRhdGEubWFwKGl0ID0+IHtcXG4gICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICBmdW5jOiBmdW5jdGlvbihydWxlKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcnVsZS5maW5kKHMsIHJlYWxQYWdlKTtcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgcGFyYW06IGl0LFxcbiAgICAgICAgICAgICAgICBpZDogXFxcInJ1bGVAXFxcIiArIGl0Lm5hbWVcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGJhdGNoRXhlY3V0ZSh0YXNrcywge1xcbiAgICAgICAgICAgIGZ1bmM6IGZ1bmN0aW9uKHBhcmFtLCBpZCwgZXJyb3IsIHJlc3VsdCkge1xcbiAgICAgICAgICAgICAgICAvL2xvZyhcXFwibGlzdGVuZXI6IFxcXCIgKyAocmVzdWx0IHx8IFtdKS5sZW5ndGgpXFxuICAgICAgICAgICAgICAgIHBhcmFtLmkgPSBwYXJhbS5pICsgMTtcXG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdCkge1xcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpdCBvZiByZXN1bHQpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW0uaiA9IHBhcmFtLmogKyAxO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQmVmb3JlKHBhZ2VpZCwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHdyYXAoaXQudGl0bGUsIHMpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogaXQuZGVzYyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogaXQudXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDogaXQucGljX3VybCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBpdC5waWNfdXJsID8gJ21vdmllXzFfdmVydGljYWxfcGljJyA6IFxcXCJ0ZXh0XzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IGl0LmV4dHJhXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cXG5cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAocGFyYW0uaSA+PSBwYXJhbS5hbGwpIHtcXG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZUl0ZW0ocGFnZWlkKVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLliqDovb3nrKxcXFwiICsgTVlfUEFHRSArIFxcXCLpobXkuK3vvIzov5vluqbvvJpcXFwiICsgKHBhcmFtLmkgKyAxKSArIFxcXCIvXFxcIiArIHBhcmFtLmFsbCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHBhZ2VpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHBhcmFtOiB7XFxuICAgICAgICAgICAgICAgIGFsbDogZGF0YS5sZW5ndGgsXFxuICAgICAgICAgICAgICAgIGk6IDAsXFxuICAgICAgICAgICAgICAgIGo6IC0xXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgfVxcbn0gZWxzZSB7XFxuICAgIGxldCB7XFxuICAgICAgICBsb2FkXFxuICAgIH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9kYXRhXFxcIik7XFxuICAgIGxldCBkYXRhID0gbG9hZCgtMSwgbnVsbCk7XFxuICAgIGlmIChkYXRhLmxlbmd0aCA+IDApIHtcXG4gICAgICAgICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL21hbmFnZVxcXCIpKGQsIGRhdGEubWFwKGl0ID0+IGl0Lm5hbWUpKTtcXG4gICAgICAgIGZvciAobGV0IGl0IG9mIGRhdGEpIHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXQubmFtZSxcXG4gICAgICAgICAgICAgICAgdXJsOiBcXFwic2VsZWN0Oi8vXFxcIiArIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi6K+36YCJ5oup5pON5L2cXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbDogMSxcXG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnM6IFtcXFwi6K6/6Zeu6aaW6aG1XFxcIiwgXFxcIuaQnOe0ouatpOermVxcXCJdLFxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHVybCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwi6K6/6Zeu6aaW6aG1XFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNWV9VUkwgPSB1cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9wYWdlL3g1P3U9XFxcIiArIGJhc2U2NEVuY29kZShnZXRIb21lKHVybCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3BhZ2Uvc2luZ2xlc1xcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9LCBpdC51cmwpXFxuICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImZsZXhfYnV0dG9uXFxcIixcXG4gICAgICAgICAgICAgICAgZGVzYzogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgIHBpY191cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgUlVMRToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IGl0Lm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBpdC51cmxcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLnpoHnlKhcXFwiICsgaXQubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygobmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maXJtKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5rip6aao5o+Q56S6XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6IFxcXCLnoa7orqTliKDpmaTnpoHnlKhcXFwiICsgbmFtZSArIFxcXCLlkJfvvJ9cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlybTogJC50b1N0cmluZygobmFtZSwgcnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZVJ1bGVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvZGF0YT9ydWxlPVxcXCIgKyBydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZW1vdmVSdWxlKG5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL09LXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIG5hbWUsIE1ZX1JVTEUudGl0bGUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgaXQubmFtZSlcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuiuv+mXrummlumhtVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAganM6IFxcXCInaGlrZXI6Ly9wYWdlL3g1P3U9XFxcIiArIGJhc2U2NEVuY29kZShnZXRIb21lKGl0LnVybCkpICsgXFxcIidcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLmkJzntKLmraTmupBcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGpzOiBcXFwiJ2hpa2VyOi8vcGFnZS9zaW5nbGVzJ1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfVxcbn1cXG5cXG5zZXRSZXN1bHQoZCk7XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLmlbDmja5cIixcInBhdGhcIjpcImRhdGFcIixcInJ1bGVcIjpcIi8v5bm25Y+R6KeE5YiZ5pWwXFxubGV0IHNpemUwID0gMTA7XFxubGV0IHJ1bGVzVGV4dDAgPSBge1JVTEVTfWA7XFxubGV0IHJ1bGVzVGV4dCA9IGdldEl0ZW0oXFxcInJ1bGVzXFxcIiwgcnVsZXNUZXh0MCk7XFxubGV0IHNwID0gJC5yZXF1aXJlKFxcXCJoa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h1cmwpO1xcbiAgICAgICAgLy/oh6rliqjov4fpqozor4HnoIHlkozpopHnuYHorr/pl67pmZDliLZcXG4gICAgICAgIGxldCB7XFxuICAgICAgICAgICAgY2hlY2ssIHRlc3RcXG4gICAgICAgIH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS95em1cXFwiKTtcXG4gICAgICAgIGlmIChjaGVjayh1cmwsIGh0bWwsIGQpKSB7XFxuICAgICAgICAgICAgbG9nKFxcXCLph43or5XkuoZcXFwiKTtcXG4gICAgICAgICAgICBodG1sID0gcmVxdWVzdCh1cmwsIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiB1cmxcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pOyAgICAgICAgICAgXFxuICAgICAgICB9ICAgICAgICAgXFxuICAgICAgICB0ZXN0KHVybCwgaHRtbCwgZCwgb2xkLCBrZXksIHJ1bGUpO1xcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgLy/oh6rliqjor4bliKtwb3N06K+35rGCXFxuICAgICAgICBodG1sID0gcmVxdWVzdCh1cmwpO1xcbiAgICAgICAgbGV0IGZvcm0gPSBwZGZoKGh0bWwsIFxcXCJib2R5JiZmb3JtJiZIdG1sXFxcIik7XFxuICAgICAgICBsZXQgYWN0aW9uID0gcGQoaHRtbCwgXFxcImZvcm0mJmFjdGlvblxcXCIsIHVybCk7XFxuICAgICAgICBsZXQgaW5wdXRzID0gcGRmYShodG1sLCBcXFwiYm9keSYmZm9ybSYmaW5wdXRcXFwiKTtcXG4gICAgICAgIGxldCBib2R5ID0ge307XFxuICAgICAgICBmb3IgKGxldCBpdCBvZiBpbnB1dHMpIHtcXG4gICAgICAgICAgICBsZXQgbmFtZSA9IHBkZmgoaXQsIFxcXCJpbnB1dCYmbmFtZVxcXCIpO1xcbiAgICAgICAgICAgIGlmIChuYW1lICYmIG5hbWUg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cXG4gICAgICAgIGxldCBpdCA9IGFycltpXTtcXG4gICAgICAgIGxldCB0ID0gaXQudGV4dDtcXG4gICAgICAgIGlmICghaXQuaHJlZiB8fCBpdC5ocmVmID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICB9XFxuICAgICAgICBpZiAoaXNSZXN1bHQoaXQpKSB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHQsXFxuICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9wP3U9XFxcIiArIGJhc2U2NEVuY29kZShpdC5ocmVmKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzFcXFwiLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBcXFwi4oCc4oCc4oCd4oCdPGZvbnQgY29sb3I9I2YxM2I2NmE+XFxcIiArIHJ1bGUgKyBcXFwiPC9mb250PlxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpbmhlcml0VGl0bGU6IGZhbHNlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICByZXR1cm4gZDtcXG59XFxuJC5leHBvcnRzID0gc2VhcmNoO1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5aKe5YigXCIsXCJwYXRoXCI6XCJtYW5hZ2VcIixcInJ1bGVcIjpcIiQuZXhwb3J0cyA9IGZ1bmN0aW9uKGQsIG5hbWVzKSB7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIkFJ5oqA5pyvXFxcIixcXG4gICAgICAgIHVybDogXFxcImNvbmZpcm06Ly/ln7rkuo5BSeivhueJh+iHquWKqOWIhuaekOa6kOeggeaKgOacr++8jOS7o+eggeWujOWFqOW8gOa6kO+8jO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6IFxcXCLor7fovpPlhaXnvZHnq5nlkI3np7BcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJwdXRNeVZhcignbmFtZScsIGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBcXFwiYWlhZGRcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLor7fovpPlhaXnvZHnq5nmkJzntKLlnLDlnYBcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJwdXRNeVZhcignc3VybCcsIGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBcXFwiYWlhZGRcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5o+Q5Lqk5L+d5a2YXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdXJsID0gZ2V0TXlWYXIoXFxcInN1cmxcXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBnZXRNeVZhcihcXFwibmFtZVxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3VybCA9PSBcXFwiXFxcIiB8fCBuYW1lID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/or7fovpPlhaXlrozmlbTlhoXlrrlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCByID0gZGVjb2RlVVJJQ29tcG9uZW50KHN1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHIgPSByLnJlcGxhY2UobmV3IFJlZ0V4cChcXFwiW1xcXFx1NGUwMC1cXFxcdTlmYTVdK1xcXCIsIFxcXCJnXFxcIiksIFxcXCIqKlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZFJ1bGVcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvZGF0YVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZFJ1bGUobmFtZSwgcik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey5L+d5a2YXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IFxcXCJhaWFkZFxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIF0pO1xcbiAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgIH0sIE1ZX1JVTEUudGl0bGUpLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJmbGV4X2J1dHRvblxcXCIsXFxuICAgIH0pO1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IFxcXCIgLSBcXFwiLFxcbiAgICAgICAgdXJsOiBcXFwic2VsZWN0Oi8vXFxcIiArIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICBvcHRpb25zOiBuYW1lcyxcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuivt+mAieaLqeimgeWIoOmZpOeahOermeeCuVxcXCIsXFxuICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQge1xcbiAgICAgICAgICAgICAgICAgICAgcmVtb3ZlUnVsZVxcbiAgICAgICAgICAgICAgICB9ID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvZGF0YVxcXCIpO1xcbiAgICAgICAgICAgICAgICByZW1vdmVSdWxlKGlucHV0KTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL09LXFxcIjtcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSksXFxuICAgICAgICBjb2xfdHlwZTogXFxcImZsZXhfYnV0dG9uXFxcIlxcbiAgICB9KTtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwi4oaX77iPXFxcIixcXG4gICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgY29uZmlybSh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5rip6aao5o+Q56S6XFxcIixcXG4gICAgICAgICAgICAgICAgY29udGVudDogXFxcIuehruWumuWvvOWHuuaJgOacieaVsOaNruWQl++8n++8iOWvvOWHuuWQjuWPr+S7peeCueWHu+aXgei+ueeahOWvvOWFpeaMiemSruaJuemHj+WvvOWFpe+8iVxcXCIsXFxuICAgICAgICAgICAgICAgIGNvbmZpcm06ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2FkXFxuICAgICAgICAgICAgICAgICAgICB9ID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvZGF0YVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBsb2FkKC0xKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBzID0gZGF0YS5tYXAoaXQgPT4gaXQubmFtZSArIFxcXCJAXFxcIiArIGl0LnVybCkuam9pbihcXFwiXFxcXG5cXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiY29weTovL1xcXCIgKyBzXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgfSksXFxuICAgICAgICBjb2xfdHlwZTogXFxcImZsZXhfYnV0dG9uXFxcIixcXG4gICAgfSk7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIuKGmO+4j1xcXCIsXFxuICAgICAgICB1cmw6ICQoXFxcIlxcXCIsIFxcXCLor7fovpPlhaXopoHmibnph4/lr7zlhaXnmoTmlbDmja5cXFwiKS5pbnB1dCgoKSA9PiB7XFxuICAgICAgICAgICAgbGV0IHtcXG4gICAgICAgICAgICAgICAgYWRkQWxsXFxuICAgICAgICAg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iB0ZXN0KHVybCwgaHRtbCwgZCwgb2xkLCBrZXksIHJ1bGUpIHtcXG4gICAgaWYgKC8156eSfOmikee5gS8udGVzdChodG1sKSkge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+aQnOe0oumcgOmXtOmalDXnp5LvvIzngrnlh7vph43mlrDliqDovb0nLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8xXFxcIixcXG4gICAgICAgICAgICBkZXNjOiBcXFwi4oCc4oCc4oCd4oCdPGZvbnQgY29sb3I9I2YxM2I2NmE+XFxcIiArIHJ1bGUgKyBcXFwiPC9mb250PlxcXCIsXFxuICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKHVybCwgb2xkLCBrZXksIHJ1bGUpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHNwID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2Uvc3BcXFwiKTtcXG4gICAgICAgICAgICAgICAgbGV0IGQgPSBzcChvbGQsIGtleSwgcnVsZSk7XFxuICAgICAgICAgICAgICAgIGxldCB7XFxuICAgICAgICAgICAgICAgICAgICB3cmFwXFxuICAgICAgICAgICAgICAgIH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS90b29sXFxcIik7XFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGl0IG9mIGQpIHtcXG4gICAgICAgICAgICAgICAgICAgIGl0LnRpdGxlID0gd3JhcChpdC50aXRsZSwga2V5KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIodXJsLCBkKTtcXG4gICAgICAgICAgICAgICAgZGVsZXRlSXRlbSh1cmwpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vT0tcXFwiO1xcbiAgICAgICAgICAgIH0sIHVybCwgb2xkLCBrZXksIHJ1bGUpLFxcbiAgICAgICAgICAgIGV4dHJh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