Advertisement
xiaomianao666

邀您一起看:JSON编辑器

Aug 13th, 2024
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥JSON编辑器@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcInNjcm9sbF9idXR0b25cIixcIm5hbWVcIjpcIuWGheWuuei9veWFpVwiLFwicGF0aFwiOlwiY29udGVudFwiLFwicnVsZVwiOlwianM6XFxuZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9mdW5jdGlvbnMnKSkucnVsZSlcXG5sZXQgeyBQYXRoLCBIYXNoLCBGaWxlIH0gPSBNWV9QQVJBTVMsXFxuQWxsSnNvbiA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ0pTT05fJyArIEhhc2gsIDApIHx8ICd7fScpLFxcbiAgICBKc29uID0gSlNPTlJlY3VyKEFsbEpzb24sIFBhdGgpLFxcbiAgICBUeXBlID0gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZy5jYWxsKEpzb24pLnNsaWNlKDgsIC0xKSxcXG4gICAgZXhQYXRoID0gJ2hpa2VyOi8vZmlsZXMvdG1wL0pTT05FZGl0b3JfJ1xcbmlmICghRmlsZSkge1xcbiAgICBzZXRQYWdlVGl0bGUoJ0pTT07nvJb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l8nICsgSGFzaCwgMCkgfHwgJ3t9JylcXG4gICAgICAgICAgICAgICAgICAgICAgICBKU09OUmVjdXIoQWxsSnNvbiwgUGF0aCwgKHNlbGYpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgayBpbiBzZWxmKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdiA9IHNlbGZba10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdlN0ciA9IHR5cGVDb252ZXJ0KHYsICdTdHJpbmcnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2VHlwZSA9IE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbCh2KS5zbGljZSg4LCAtMSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWFyY2hLZXkuc3RhcnRzV2l0aCgnPj4nKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghb2JqU2VhcmNoUGFyc2Uoc2VhcmNoS2V5LnNsaWNlKDIpLCBrLCB2U3RyLCB2VHlwZSkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBzZWxmW2tdXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCFrLmluY2x1ZGVzKHNlYXJjaEtleSkgJiYgIXZTdHIuaW5jbHVkZXMoc2VhcmNoS2V5KSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgc2VsZltrXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzZWxmXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBzYXZlRmlsZSgnSlNPTl8nICsgSGFzaCwgSlNPTi5zdHJpbmdpZnkoQWxsSnNvbiksIDApXFxuICAgICAgICAgICAgICAgICAgICAgICAgUGF0aCA9IFBhdGguam9pbignLicpXFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0U0tleSh1bmRlZmluZWQpXFxuICAgICAgICAgICAgICAgICAgICB9LCBQYXRoLCBIYXNoLCBzZWFyY2hLZXkpXFxuICAgICAgICAgICAgY2FzZSAn5pu05pS55p+l5om+JzpcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoc2VhcmNoS2V5LFxcbiAgICAgICAgICAgICAgICAgICAgJ+afpeaJvuWFs+mUruWtl1xcXFxu5pmu6YCa5qih5byP5LiL5Li66ZSu5ZCN5oiW6ZSu5YC855qE5LiA6YOo5YiGXFxcXG7ku6U+PuW8gOWktOWQr+eUqOmrmOe6p+aooeW8j1xcXFxu6K+m6KeB5L2/55So5biu5YqpJ1xcbiAgICAgICAgICAgICAgICApLmlucHV0KChQYXRoLCBIYXNoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdCgnaGlrZXI6Ly9wYWdlL2Z1bmN0aW9ucycpKS5ydWxlKVxcbiAgICAgICAgICAgICAgICAgICAgc2V0U0tleShpbnB1dClcXG4gICAgICAgICAgICAgICAgfSwgUGF0aC5qb2luKCcuJyksIEhhc2gpXFxuICAgICAgICAgICAgY2FzZSAn57uT5p2f5p+l5om+JzpcXG4gICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9mdW5jdGlvbnMnKSkucnVsZSlcXG4gICAgICAgICAgICAgICAgUGF0aCA9IFBhdGguam9pbignLicpXFxuICAgICAgICAgICAgICAgIHNldFNLZXkodW5kZWZpbmVkKVxcbiAgICAgICAgfVxcbiAgICB9LCBQYXRoLCBIYXNoLCBzZWFyY2hLZXkpXFxufVxcbmVsc2UgZWxbM10gPSB7XFxuICAgIHRpdGxlOiAn8J+UjeafpeaJvicsXFxuICAgIH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sbEpzb24gPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdKU09OXycgKyBIYXNoLCAwKSB8fCAne30nKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIEpTT05SZWN1cihBbGxKc29uLCBQYXRoLCAoc2VsZikgPT4gc2VsZi5maWx0ZXIoKHYsIGksIGFycikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdlN0ciA9IHR5cGVDb252ZXJ0KHYsICdTdHJpbmcnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZUeXBlID0gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZy5jYWxsKHYpLnNsaWNlKDgsIC0xKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZMYWJlbCA9ICcnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2VHlwZSA9PSAnT2JqZWN0Jykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdkxhYmVsID0gdi50aXRsZSB8fCB2Lm5hbWUgfHwgdi5rZXkgfHwgdi5pZCB8fCB2LmxhYmVsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHZMYWJlbCAhPSAnc3RyaW5nJykgdkxhYmVsID0gJydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VhcmNoS2V5LnN0YXJ0c1dpdGgoJz4+JykpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghYXJyU2VhcmNoUGFyc2Uoc2VhcmNoS2V5LnNsaWNlKDIpLCBpLCB2TGFiZWwsIHZTdHIsIHZUeXBlLCBhcnIubGVuZ3RoKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2VcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICghdlN0ci5pbmNsdWRlcyhzZWFyY2hLZXkpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ0pTT05fJyArIEhhc2gsIEpTT04uc3RyaW5naWZ5KEFsbEpzb24pLCAwKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIFBhdGggPSBQYXRoLmpvaW4oJy4nKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFNLZXkodW5kZWZpbmVkKVxcbiAgICAgICAgICAgICAgICAgICAgfSwgUGF0aCwgSGFzaCwgc2VhcmNoS2V5KVxcbiAgICAgICAgICAgIGNhc2UgJ+abtOaUueafpeaJvic6XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKHNlYXJjaEtleSxcXG4gICAgICAgICAgICAgICAgICAgICfmn6Xmib7lhbPplK7lrZdcXFxcbuaZrumAmuaooeW8j+S4i+S4uuaVsOe7hOWGheWuueeahOS4gOmDqOWIhlxcXFxu5LulPj7lvIDlpLTlkK/nlKjpq5jnuqfmqKHlvI9cXFxcbuivpuingeS9v+W4ruWKqeWtkOmhtemdoidcXG4gICAgICAgICAgICAgICAgKS5pbnB1dCgoUGF0aCwgSGFzaCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9mdW5jdGlvbnMnKSkucnVsZSlcXG4gICAgICAgICAgICAgICAgICAgIHNldFNLZXkoaW5wdXQpXFxuICAgICAgICAgICAgICAgIH0sIFBhdGguam9pbignLicpLCBIYXNoKVxcbiAgICAgICAgICAgIGNhc2UgJ+e7k+adn+afpeaJvic6XFxuICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcj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se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuWFrOWFseWHveaVsFwiLFwicGF0aFwiOlwiZnVuY3Rpb25zXCIsXCJydWxlXCI6XCJmdW5jdGlvbiBKU09OUmVjdXIoanNvbiwgcGF0aCwgdmFsdWUpIHtcXG4gICAgaWYgKHBhdGgubGVuZ3RoID09IDEpIHtcXG4gICAgICAgIGlmICh2YWx1ZSA9PT0gdW5kZWZpbmVkKSB7XFxuICAgICAgICAgICAgcmV0dXJuIGpzb25bcGF0aFswXV1cXG4gICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHZhbHVlID09ICdmdW5jdGlvbicpIHtcXG4gICAgICAgICAgICBqc29uW3BhdGhbMF1dID0gdmFsdWUoanNvbltwYXRoWzBdXSlcXG4gICAgICAgIH0gZWxzZSBqc29uW3BhdGhbMF1dID0gdmFsdWVcXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIHJldHVybiBKU09OUmVjdXIoanNvbltwYXRoWzBdXSwgcGF0aC5zbGljZSgxKSwgdmFsdWUpXFxuICAgIH1cXG59XFxuXFxuZnVuY3Rpb24gdHlwZUNvbnZlcnQodmFsdWUsIHR5cGUpIHtcXG4gICAgbGV0IHZUeXBlID0gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZy5jYWxsKHZhbHVlKS5zbGljZSg4LCAtMSlcXG4gICAgc3dpdGNoICh0eXBlKSB7XFxuICAgICAgICBjYXNlICdPYmplY3QnOlxcbiAgICAgICAgICAgIHN3aXRjaCAodlR5cGUpIHtcXG4gICAgICAgICAgICAgICAgY2FzZSAnT2JqZWN0JzpcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZVxcbiAgICAgICAgICAgICAgICBjYXNlICdBcnJheSc6XFxuICAgICAgICAgICAgICAgICAgICBsZXQgb2JqID0ge31cXG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IHYgb2YgdmFsdWUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodiAmJiBPYmplY3Qua2V5cyh2KS5sZW5ndGggPT0gMlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAna2V5JyBpbiB2ICYmICd2YWx1ZScgaW4gdiAmJlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAhT2JqZWN0Lmhhc093bihvYmosIHYua2V5KSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpbdi5rZXldID0gdi52YWx1ZVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBicmVha1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKE9iamVjdC5rZXlzKG9iaikubGVuZ3RoIDwgdmFsdWUubGVuZ3RoKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgb2JqID0gT2JqZWN0LmFzc2lnbih7fSwgdmFsdWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgayBpbiBvYmopIGlmIChvYmpba10gPT09IG51bGwpIGRlbGV0ZSBvYmpba11cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmpcXG4gICAgICAgICAgICAgICAgY2FzZSAnU3RyaW5nJzpcXG4gICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHR5cGVDb252ZXJ0KEpTT04ucGFyc2UodmFsdWUpLCB0eXBlKVxcbiAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkgeyByZXR1cm4ge30gfTtcXG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7fVxcbiAgICAgICAgICAgIH07XFxuICAgICAgICBjYXNlICdBcnJheSc6XFxuICAgICAgICAgICAgc3dpdGNoICh2VHlwZSkge1xcbiAgICAgICAgICAgICAgICBjYXNlICdPYmplY3QnOlxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGtleXMgPSBPYmplY3Qua2V5cyh2YWx1ZSksIGxlbmd0aCA9IDBcXG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGsgb2Yga2V5cylcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoL15cXFxcZCskLy50ZXN0KGspKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBOdW1iZXIoaykgKyAxXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsZW5ndGggPCBrKSBsZW5ndGggPSBrXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuZ3RoID0gMFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBsZW5ndGggPiAwXFxuICAgICAgICAgICAgICAgICAgICAgICAgPyBBcnJheS5mcm9tKE9iamVjdC5hc3NpZ24odmFsdWUsIHsgbGVuZ3RoOiBsZW5ndGggfSkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgOiBrZXlzLm1hcCgoaykgPT4gKHsga2V5OiBrLCB2YWx1ZTogdmFsdWVba10gfSkpXFxuICAgICAgICAgICAgICAgIGNhc2UgJ0FycmF5JzpcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZVxcbiAgICAgICAgICAgICAgICBjYXNlICdTdHJpbmcnOlxcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHlwZUNvbnZlcnQoSlNPTi5wYXJzZSh2YWx1ZSksIHR5cGUpXFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7IHJldHVybiBbXSB9O1xcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtdXFxuICAgICAgICAgICAgfTtcXG4gICAgICAgIGNhc2UgJ1N0cmluZyc6XFxuICAgICAgICAgICAgc3dpdGNoICh2VHlwZSkge1xcbiAgICAgICAgICAgICAgICBjYXNlICdPYmplY3QnOlxcbiAgICAgICAgICAgICAgICBjYXNlICdBcnJheSc6XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkodmFsdWUpXFxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gU3RyaW5nKHZhbHVlKVxcbiAgICAgICAgICAgIH07XFxuICAgICAgICBjYXNlICdOdW1iZXInOlxcbiAgICAgICAgICAgIHJldHVybiBOdW1iZXIodmFsdWUpIHx8IDBcXG4gICAgICAgIGNhc2UgJ0Jvb2xlYW4nOlxcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIHdoaWxlICh0eXBlb2YgdmFsdWUgPT0gJ3N0cmluZycpXFxuICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IEpTT04ucGFyc2UodmFsdWUpXFxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cXG4gICAgICAgICAgICByZXR1cm4gQm9vbGVhbih2YWx1ZSlcXG4gICAgICAgIGNhc2UgJ051bGwnOlxcbiAgICAgICAgICAgIHJldHVybiBudWxsXFxuICAgIH1cXG59XFxuXFxuZnVuY3Rpb24gb2JqSXRlbVNlbChpbnB1dCwgaykge1xcbiAgICBzd2l0Y2ggKGlucHV0LnNsaWNlKDMpKSB7XFxuICAgICAgICBjYXNlICflsZXlvIDplK7lgLwnOlxcbiAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL2NvbnRlbnQjbm9SZWZyZXNoIyNub0hpc3RvcnkjI25vUmVjb3JkSGlzdG9yeSMnXFxuICAgICAgICBjYXNlICfmm7TmlLnplK7lkI0nOlxcbiAgICAgICAgICAgIHJldHVybiAkKGssICfmm7TmlLnnmoTplK7lkI1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0aW9ucycpKS5ydWxlKVxcbiAgICAgICAgICAgICAgICBsZXQgQWxsSnNvbiA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ0pTT05fJyArIEhhc2gsIDApIHx8ICd7fScpXFxuICAgICAgICAgICAgICAgIEpTT05SZWN1cihBbGxKc29uLCBQYXRoLCAoc2VsZikgPT4gKGRlbGV0ZSBzZWxmW2tdLCBzZWxmKSlcXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ0pTT05fJyArIEhhc2gsIEpTT04uc3RyaW5naWZ5KEFsbEpzb24pLCAwKVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIGssIFBhdGgsIEhhc2gpXFxuICAgICAgICBjYXNlICflpI3liLbplK7lkI0nOlxcbiAgICAgICAgICAgIHJldHVybiAnY29weTovLycgKyBrXFxuICAgICAgICBjYXNlICflpI3liLbplK7lgLwnOlxcbiAgICAgICAgICAgIHJldHVybiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChQYXRoLCBIYXNoKSA9PiB7XFxuICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvZnVuY3Rpb25zJykpLnJ1bGUpXFxuICAgICAgICAgICAgICAgIGxldCBBbGxKc29uID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnSlNPTl8nICsgSGFzaCwgMCkgfHwgJ3t9JylcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdjb3B5Oi8vJyArIHR5cGVDb252ZXJ0KEpTT05SZWN1cihBbGxKc29uLCBQYXRoKSwgJ1N0cmluZycpXFxuICAgICAgICAgICAgfSwgUGF0aC5jb25jYXQoayksIEhhc2gpXFxuICAgIH1cXG59XFxuXFxuZnVuY3Rpb24gYXJySXRlbVNlbChpbnB1dCwgaSkge1xcbiAgICBzd2l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ClcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgfSwgaSwgUGF0aCwgSGFzaClcXG4gICAgICAgIGNhc2UgJ+WIoOmZpOmhueebric6XFxuICAgICAgICAgICAgcmV0dXJuICQoYOehruWumuimgeWIoOmZpOW6j+WPt1ske2l9XeeahOWGheWuueWQl++8n2ApLmNvbmZpcm0oKGluZGV4LCBQYXRoLCBIYXNoKSA9PiB7XFxuICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvZnVuY3Rpb25zJykpLnJ1bGUpXFxuICAgICAgICAgICAgICAgIGxldCBBbGxKc29uID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnSlNPTl8nICsgSGFzaCwgMCkgfHwgJ3t9JylcXG4gICAgICAgICAgICAgICAgSlNPTlJlY3VyKEFsbEpzb24sIFBhdGgsIChzZWxmKSA9PiAoc2VsZi5zcGxpY2UoaW5kZXgsIDEpLCBzZWxmKSlcXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ0pTT05fJyArIEhhc2gsIEpTT04uc3RyaW5naWZ5KEFsbEpzb24pLCAwKVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIGksIFBhdGgsIEhhc2gpXFxuICAgICAgICBjYXNlICflpI3liLblhoXlrrknOlxcbiAgICAgICAgICAgIHJldHVybiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChQYXRoLCBIYXNoKSA9PiB7XFxuICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvZnVuY3Rpb25zJykpLnJ1bGUpXFxuICAgICAgICAgICAgICAgIGxldCBBbGxKc29uID0gSlNPTi5wYXJzZShyZWFkRmlsZSg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lID09IGNvbnRcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9KVxcbn1cXG5mdW5jdGlvbiBhcnJTZWFyY2hQYXJzZShzZWFyY2hLZXksIGksIHZMYWJlbCwgdlN0ciwgdlR5cGUsIGxlbmd0aCkge1xcbiAgICByZXR1cm4gc2VhcmNoS2V5LnNwbGl0KCd8Jykuc29tZSgoT1IpID0+IHtcXG4gICAgICAgIHJldHVybiBPUi5zcGxpdCgnJicpLmV2ZXJ5KChBTkQpID0+IHtcXG4gICAgICAgICAgICBsZXQgW21vZGUsIGNvbnRdID0gQU5ELnNwbGl0KCdAJylcXG4gICAgICAgICAgICBzd2l0Y2ggKG1vZGUpIHtcXG4gICAgICAgICAgICAgICAgY2FzZSAncmFuZ2UnOlxcbiAgICAgICAgICAgICAgICAgICAgbGV0IFtzdCwgZWRdID0gY29udC5zcGxpdCgnficpXFxuICAgICAgICAgICAgICAgICAgICAgICAgLm1hcCgodikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2ID0gcGFyc2VJbnQodilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHYgPCAwKSB2ICs9IGxlbmd0aFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3QgPD0gaSAmJiBpIDw9IGVkXFxuICAgICAgICAgICAgICAgIGNhc2UgJ2xhYmVsJzpcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2TGFiZWwuaW5jbHVkZXMoY29udClcXG4gICAgICAgICAgICAgICAgY2FzZSAndmFsdWUnOlxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZTdHIuaW5jbHVkZXMoY29udClcXG4gICAgICAgICAgICAgICAgY2FzZSAndHlwZSc6XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdlR5cGUgPT0gY29udFxcbiAgIC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gICAgICAgICAgICAgICAgLmNvbmZpcm0oKFBhdGgsIEhhc2gsIHNlYXJjaEtleSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9mdW5jdGlvbnMnKSkucnVsZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBBbGxKc29uID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnSlNPTl8nICsgSGFzaCwgMCkgfHwgJ3t9JylcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIEpTT05SZWN1cihBbGxKc29uLCBQYXRoLCAoc2VsZikgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGsgaW4gc2VsZikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdiA9IHNlbGZba10sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2U3RyID0gdHlwZUNvbnZlcnQodiwgJ1N0cmluZycpLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdlR5cGUgPSBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwodikuc2xpY2UoOCwgLTEpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWFyY2hLZXkuc3RhcnRzV2l0aCgnPj4nKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFvYmpTZWFyY2hQYXJzZShzZWFyY2hLZXkuc2xpY2UoMiksIGssIHZTdHIsIHZUeXBlKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgc2VsZltrXVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCFrLmluY2x1ZGVzKHNlYXJjaEtleSkgJiYgIXZTdHIuaW5jbHVkZXMoc2VhcmNoS2V5KSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBzZWxmW2tdXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzZWxmXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ0pTT05fJyArIEhhc2gsIEpTT04uc3RyaW5naWZ5KEFsbEpzb24pLCAwKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgUGF0aCA9IFBhdGguam9pbignLicpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRTS2V5KHVuZGVmaW5lZClcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgUGF0aCwgSGFzaCwgc2VhcmNoS2V5KVxcXFxuICAgICAgICAgICAgY2FzZSAn5pu05pS55p+l5om+JzpcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gJChzZWFyY2hLZXksXFxcXG4gICAgICAgICAgICAgICAgICAgICfmn6Xmib7lhbPplK7lrZdcXFxcXFxcXG7mma7pgJrmqKHlvI/kuIvkuLrplK7lkI3miJbplK7lgLznmoTkuIDpg6jliIZcXFxcXFxcXG7ku6U+PuW8gOWktOWQr+eUqOmrmOe6p+aooeW8j1xcXFxcXFxcbuivpuingeS9v+eUqOW4ruWKqSdcXFxcbiAgICAgICAgICAgICAgICApLmlucHV0KChQYXRoLCBIYXNoKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvZnVuY3Rpb25zJykpLnJ1bGUpXFxcXG4gICAgICAgICAgICAgICAgICAgIHNldFNLZXkoaW5wdXQpXFxcXG4gICAgICAgICAgICAgICAgfSwgUGF0aC5qb2luKCcuJyksIEhhc2gpXFxcXG4gICAgICAgICAgICBjYXNl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leX1dYCxcXFxcbiAgICB1cmw6ICQoWyfinIIgIOW6lOeUqOi/h+a7pCcsICfinJcgIOe7k+adn+afpeaJvicsICfinI4gIOabtOaUueafpeaJviddLCAxKS5zZWxlY3QoKFBhdGgsIEhhc2gsIHNlYXJjaEtleSkgPT4ge1xcXFxuICAgICAgICBzd2l0Y2ggKGlucHV0LnNsaWNlKDMpKSB7XFxcXG4gICAgICAgICAgICBjYXNlICflupTnlKjov4fmu6QnOlxcXFxuICAgICAgICAgICAgICAgIHJldHVybiAkKCflupTnlKjov4fmu6TkvJrlsIbmn6Xmib7nu5PmnpzlhpnlhaXnvJPlrZhcXFxcXFxcXG7liKDpmaTkuI3nrKblkIjmnaHku7bnmoTpobnnm65cXFxcXFxcXG7noa7lrpropoHnu6fnu63lkJfvvJ8nKVxcXFxuICAgICAgICAgICAgICAgICAgICAuY29uZmlybSgoUGF0aCwgSGFzaCwgc2VhcmNoS2V5KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdCgnaGlrZXI6Ly9wYWdlL2Z1bmN0aW9ucycpKS5ydWxlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IEFsbEpzb24gPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdKU09OXycgKyBIYXNoLCAwKSB8fCAne30nKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgSlNPTlJlY3VyKEFsbEpzb24sIFBhdGgsIChzZWxmKSA9PiBzZWxmLmZpbHRlcigodiwgaSwgYXJyKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZTdHIgPSB0eXBlQ29udmVydCh2LCAnU3RyaW5nJyksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZUeXBlID0gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZy5jYWxsKHYpLnNsaWNlKDgsIC0xKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdkxhYmVsID0gJydcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodlR5cGUgPT0gJ09iamVjdCcpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdkxhYmVsID0gdi50aXRsZSB8fCB2Lm5hbWUgfHwgdi5rZXkgfHwgdi5pZCB8fCB2LmxhYmVsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdkxhYmVsICE9ICdzdHJpbmcnKSB2TGFiZWwgPSAnJ1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VhcmNoS2V5LnN0YXJ0c1dpdGgoJz4+JykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFhcnJTZWFyY2hQYXJzZShzZWFyY2hLZXkuc2xpY2UoMiksIGksIHZMYWJlbCwgdlN0ciwgdlR5cGUsIGFyci5sZW5ndGgpKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICghdlN0ci5pbmNsdWRlcyhzZWFyY2hLZXkpKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2VcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSkpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBzYXZlRmlsZSgnSlNPTl8nICsgSGFzaCwgSlNPTi5zdHJpbmdpZnkoQWxsSnNvbiksIDApXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBQYXRoID0gUGF0aC5qb2luKCcuJylcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFNLZXkodW5kZW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mtleXModikubGVuZ3RoID09IDJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiAna2V5JyBpbiB2ICYmICd2YWx1ZScgaW4gdiAmJlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICFPYmplY3QuaGFzT3duKG9iaiwgdi5rZXkpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqW3Yua2V5XSA9IHYudmFsdWVcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBicmVha1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmIChPYmplY3Qua2V5cyhvYmopLmxlbmd0aCA8IHZhbHVlLmxlbmd0aCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgb2JqID0gT2JqZWN0LmFzc2lnbih7fSwgdmFsdWUpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBrIGluIG9iaikgaWYgKG9ialtrXSA9PT0gbnVsbCkgZGVsZXRlIG9ialtrXVxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmpcXFxcbiAgICAgICAgICAgICAgICBjYXNlICdTdHJpbmcnOlxcXFxuICAgICAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHR5cGVDb252ZXJ0KEpTT04ucGFyc2UodmFsdWUpLCB0eXBlKVxcXFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7IHJldHVybiB7fSB9O1xcXFxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7fVxcXFxuICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgY2FzZSAnQXJyYXknOlxcXFxuICAgICAgICAgICAgc3dpdGNoICh2VHlwZSkge1xcXFxuICAgICAgICAgICAgICAgIGNhc2UgJ09iamVjdCc6XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBrZXlzID0gT2JqZWN0LmtleXModmFsdWUpLCBsZW5ndGggPSAwXFxcXG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGsgb2Yga2V5cylcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvXlxcXFxcXFxcZCskLy50ZXN0KGspKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgayA9IE51bWJlcihrKSArIDFcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobGVuZ3RoIDwgaykgbGVuZ3RoID0ga1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGggPSAwXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxlbmd0aCA+IDBcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgID8gQXJyYXkuZnJvbShPYmplY3QuYXNzaWduKHZhbHVlLCB7IGxlbmd0aDogbGVuZ3RoIH0pKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgOiBrZXlzLm1hcCgoaykgPT4gKHsga2V5OiBrLCB2YWx1ZTogdmFsdWVba10gfSkpXFxcXG4gICAgICAgICAgICAgICAgY2FzZSAnQXJyYXknOlxcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWVcXFxcbiAgICAgICAgICAgICAgICBjYXNlICdTdHJpbmcnOlxcXFxuICAgICAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHR5cGVDb252ZXJ0KEpTT04ucGFyc2UodmFsdWUpLCB0eXBlKVxcXFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7IHJldHVybiBbXSB9O1xcXFxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBbXVxcXFxuICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgY2FzZSAnU3RyaW5nJzpcXFxcbiAgICAgICAgICAgIHN3aXRjaCAodlR5cGUpIHtcXFxcbiAgICAgICAgICAgICAgICBjYXNlICdPYmplY3QnOlxcXFxuICAgICAgICAgICAgICAgIGNhc2UgJ0FycmF5JzpcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHZhbHVlKVxcXFxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBTdHJpbmcodmFsdWUpXFxcXG4gICAgICAgICAgICB9O1xcXFxuICAgICAgICBjYXNlICdOdW1iZXInOlxcXFxuICAgICAgICAgICAgcmV0dXJuIE51bWJlcih2YWx1ZSkgfHwgMFxcXFxuICAgICAgICBjYXNlICdCb29sZWFuJzpcXFxcbiAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgd2hpbGUgKHR5cGVvZiB2YWx1ZSA9PSAnc3RyaW5nJylcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBKU09OLnBhcnNlKHZhbHVlKVxcXFxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cXFxcbiAgICAgICAgICAgIHJldHVybiBCb29sZWFuKHZhbHVlKVxcXFxuICAgICAgICBjYXNlICdOdWxsJzpcXFxcbiAgICAgICAgICAgIHJldHVybiBudWxsXFxcXG4gICAgfVxcXFxufVxcXFxuXFxcXG5mdW5jdGlvbiBvYmpJdGVtU2VsKGlucHV0LCBrKSB7XFxcXG4gICAgc3dpdGNoIChpbnB1dC5zbGljZSgzKSkge1xcXFxuICAgICAgICBjYXNlICflsZXlvIDplK7lgLwnOlxcXFxuICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvY29udGVudCNub1JlZnJlc2gjI25vSGlzdG9yeSMjbm9SZWNvcmRIaXN0b3J5IydcXFxcbiAgICAgICAgY2FzZSAn5pu05pS56ZSu5ZCNJzpcXFxcbiAgICAgICAgICAgIHJldHVybiAkKGssICfmm7TmlLnnmoTplK7lkI1cXFxcXFxcXG7kuI3og73kuI7lr7nosaHkuK3lt7LmnInplK7lkI3ph43lpI0nKS5pbnB1dCgoaywgUGF0aCwgSGFzaCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvZnVuY3Rpb25zJykpLnJ1bGUpXFxcXG4gICAgICAgICAgICAgICAgbGV0IEFsbEpzb24gPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdKU09OXycgKyBIYXNoLCAwKSB8fCAne30nKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgSnNvbiA9IEpTT05SZWN1cihBbGxKc29uLCBQYXRoKVxcXFxuICAgICAgICAgICAgICAgIGlmIChPYmplY3QuaGFzT3duKEpzb24sIGlucHV0KSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGB0b2FzdDovL+aXoOazleabtOaUue+8jOWvueixoeS4reW3suaciVske2lucHV0fV3plK5gXFxcXG4gICAgICAgICAgICAgICAgSlNPTlJlY3VyKEFsbEpzb24sIFBhdGgsIChzZWxmKSA9PiAoc2VsZltpbnB1dF0gPSBzZWxmW2tdLCBkZWxldGUgc2VsZltrXSwgc2VsZikpXFxcXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ0pTT05fJyArIEhhc2gsIEpTT04uc3RyaW5naWZ5KEFsbEpzb24pLCAwKVxcXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgfSwgaywgUGF0aCwgSGFzaClcXFxcbiAgICAgICAgY2FzZSAn5Yig6Zmk6aG555uuJzpcXFxcbiAgICAgICAgICAgIHJ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ZXZlcnkoKEFORCkgPT4ge1xcXFxuICAgICAgICAgICAgbGV0IFttb2RlLCBjb250XSA9IEFORC5zcGxpdCgnQCcpXFxcXG4gICAgICAgICAgICBzd2l0Y2ggKG1vZGUpIHtcXFxcbiAgICAgICAgICAgICAgICBjYXNlICdrZXknOlxcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gay5pbmNsdWRlcyhjb250KVxcXFxuICAgICAgICAgICAgICAgIGNhc2UgJ3ZhbHVlJzpcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZTdHIuaW5jbHVkZXMoY29udClcXFxcbiAgICAgICAgICAgICAgICBjYXNlICd0eXBlJzpcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZUeXBlID09IGNvbnRcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSlcXFxcbiAgICB9KVxcXFxufVxcXFxuZnVuY3Rpb24gYXJyU2VhcmNoUGFyc2Uoc2VhcmNoS2V5LCBpLCB2TGFiZWwsIHZTdHIsIHZUeXBlLCBsZW5ndGgpIHtcXFxcbiAgICByZXR1cm4gc2VhcmNoS2V5LnNwbGl0KCd8Jykuc29tZSgoT1IpID0+IHtcXFxcbiAgICAgICAgcmV0dXJuIE9SLnNwbGl0KCcmJykuZXZlcnkoKEFORCkgPT4ge1xcXFxuICAgICAgICAgICAgbGV0IFttb2RlLCBjb250XSA9IEFORC5zcGxpdCgnQCcpXFxcXG4gICAgICAgICAgICBzd2l0Y2ggKG1vZGUpIHtcXFxcbiAgICAgICAgICAgICAgICBjYXNlICdyYW5nZSc6XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBbc3QsIGVkXSA9IGNvbnQuc3BsaXQoJ34nKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgLm1hcCgodikgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHYgPSBwYXJzZUludCh2KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlm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