diff --git a/dist/index.bundle.js b/dist/index.bundle.js index 5f238ae..2b94f67 100644 --- a/dist/index.bundle.js +++ b/dist/index.bundle.js @@ -10,8 +10,8 @@ llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!== weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(t,e){switch(e){default:case"M":case"Q":case"D":case"DDD":case"d":return t+(1===t?"er":"e");case"w":case"W":return t+(1===t?"re":"e")}},week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(t,e){switch(e){case"D":return t+(1===t?"er":"");default:case"M":case"Q":case"DDD":case"d":return t+(1===t?"er":"e");case"w":case"W":return t+(1===t?"re":"e")}},week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),n="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),r=t.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(t,r){return t?/-MMM-/.test(r)?n[t.month()]:e[t.month()]:e},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(t){return t+(1===t||8===t||t>=20?"ste":"de")},week:{dow:1,doy:4}});return r})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],n=["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],r=["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],i=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],a=["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],o=t.defineLocale("gd",{months:e,monthsShort:n,monthsParseExact:!0,weekdays:r,weekdaysShort:i,weekdaysMin:a,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(t){var e=1===t?"d":t%10===2?"na":"mh";return t+e},week:{dow:1,doy:4}});return o})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(t){return 0===t.indexOf("un")?"n"+t:"en "+t},past:"hai %s",s:"uns segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t,e,n,r){var i={s:["thodde secondanim","thodde second"],m:["eka mintan","ek minute"],mm:[t+" mintanim",t+" mintam"],h:["eka horan","ek hor"],hh:[t+" horanim",t+" hor"],d:["eka disan","ek dis"],dd:[t+" disanim",t+" dis"],M:["eka mhoinean","ek mhoino"],MM:[t+" mhoineanim",t+" mhoine"],y:["eka vorsan","ek voros"],yy:[t+" vorsanim",t+" vorsam"]};return e?i[n][0]:i[n][1]}var n=t.defineLocale("gom-latn",{months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Ieta to] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fatlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(t,e){switch(e){case"D":return t+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return t}},week:{dow:1,doy:4},meridiemParse:/rati|sokalli|donparam|sanje/,meridiemHour:function(t,e){return 12===t&&(t=0),"rati"===e?t<4?t:t+12:"sokalli"===e?t:"donparam"===e?t>12?t:t+12:"sanje"===e?t+12:void 0},meridiem:function(t,e,n){return t<4?"rati":t<12?"sokalli":t<16?"donparam":t<20?"sanje":"rati"}});return n})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(t){return 2===t?"שעתיים":t+" שעות"},d:"יום",dd:function(t){return 2===t?"יומיים":t+" ימים"},M:"חודש",MM:function(t){return 2===t?"חודשיים":t+" חודשים"},y:"שנה",yy:function(t){return 2===t?"שנתיים":t%10===0&&10!==t?t+" שנה":t+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(t){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(t)},meridiem:function(t,e,n){return t<5?"לפנות בוקר":t<10?"בבוקר":t<12?n?'לפנה"צ':"לפני הצהריים":t<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},r=t.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(t){return t.replace(/[१२३४५६७८९०]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(t,e){return 12===t&&(t=0),"रात"===e?t<4?t:t+12:"सुबह"===e?t:"दोपहर"===e?t>=10?t:t+12:"शाम"===e?t+12:void 0},meridiem:function(t,e,n){return t<4?"रात":t<10?"सुबह":t<17?"दोपहर":t<20?"शाम":"रात"},week:{dow:0,doy:6}});return r})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t,e,n){var r=t+" ";switch(n){case"m":return e?"jedna minuta":"jedne minute";case"mm":return r+=1===t?"minuta":2===t||3===t||4===t?"minute":"minuta";case"h":return e?"jedan sat":"jednog sata";case"hh":return r+=1===t?"sat":2===t||3===t||4===t?"sata":"sati";case"dd":return r+=1===t?"dan":"dana";case"MM":return r+=1===t?"mjesec":2===t||3===t||4===t?"mjeseca":"mjeseci";case"yy":return r+=1===t?"godina":2===t||3===t||4===t?"godine":"godina"}}var n=t.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:e,mm:e,h:e,hh:e,d:"dan",dd:e,M:"mjesec",MM:e,y:"godinu",yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t,e,n,r){var i=t;switch(n){case"s":return r||e?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(r||e?" perc":" perce");case"mm":return i+(r||e?" perc":" perce");case"h":return"egy"+(r||e?" óra":" órája");case"hh":return i+(r||e?" óra":" órája");case"d":return"egy"+(r||e?" nap":" napja");case"dd":return i+(r||e?" nap":" napja");case"M":return"egy"+(r||e?" hónap":" hónapja");case"MM":return i+(r||e?" hónap":" hónapja");case"y":return"egy"+(r||e?" év":" éve");case"yy":return i+(r||e?" év":" éve")}return""}function n(t){return(t?"":"[múlt] ")+"["+r[this.day()]+"] LT[-kor]"}var r="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" "),i=t.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(t){return"u"===t.charAt(1).toLowerCase()},meridiem:function(t,e,n){return t<12?n===!0?"de":"DE":n===!0?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return n.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return n.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return i})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(t){return/^(ցերեկվա|երեկոյան)$/.test(t)},meridiem:function(t){return t<4?"գիշերվա":t<12?"առավոտվա":t<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(t,e){switch(e){case"DDD":case"w":case"W":case"DDDo":return 1===t?t+"-ին":t+"-րդ";default:return t}},week:{dow:1,doy:7}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(t,e){return 12===t&&(t=0),"pagi"===e?t:"siang"===e?t>=11?t:t+12:"sore"===e||"malam"===e?t+12:void 0},meridiem:function(t,e,n){return t<11?"pagi":t<15?"siang":t<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t){return t%100===11||t%10!==1}function n(t,n,r,i){var a=t+" ";switch(r){case"s":return n||i?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return n?"mínúta":"mínútu";case"mm":return e(t)?a+(n||i?"mínútur":"mínútum"):n?a+"mínúta":a+"mínútu";case"hh":return e(t)?a+(n||i?"klukkustundir":"klukkustundum"):a+"klukkustund";case"d":return n?"dagur":i?"dag":"degi";case"dd":return e(t)?n?a+"dagar":a+(i?"daga":"dögum"):n?a+"dagur":a+(i?"dag":"degi");case"M":return n?"mánuður":i?"mánuð":"mánuði";case"MM":return e(t)?n?a+"mánuðir":a+(i?"mánuði":"mánuðum"):n?a+"mánuður":a+(i?"mánuð":"mánuði");case"y":return n||i?"ár":"ári";case"yy":return e(t)?a+(n||i?"ár":"árum"):a+(n||i?"ár":"ári")}}var r=t.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return r})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(t){return(/^[0-9].+$/.test(t)?"tra":"in")+" "+t},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 HH:mm dddd",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日 HH:mm dddd"},meridiemParse:/午前|午後/i,isPM:function(t){return"午後"===t},meridiem:function(t,e,n){return t<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";default:return t}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(t,e){return 12===t&&(t=0),"enjing"===e?t:"siyang"===e?t>=11?t:t+12:"sonten"===e||"ndalu"===e?t+12:void 0},meridiem:function(t,e,n){return t<11?"enjing":t<15?"siyang":t<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("ka",{months:{standalone:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),format:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(t){return/(წამი|წუთი|საათი|წელი)/.test(t)?t.replace(/ი$/,"ში"):t+"ში"},past:function(t){return/(წამი|წუთი|საათი|დღე|თვე)/.test(t)?t.replace(/(ი|ე)$/,"ის უკან"):/წელი/.test(t)?t.replace(/წელი$/,"წლის უკან"):void 0},s:"რამდენიმე წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(t){return 0===t?t:1===t?t+"-ლი":t<20||t<=100&&t%20===0||t%100===0?"მე-"+t:t+"-ე"},week:{dow:1,doy:7}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"},n=t.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(t){var n=t%10,r=t>=100?100:null;return t+(e[t]||e[n]||e[r])},week:{dow:1,doy:7}});return n})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysMin:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"},r=t.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬ_ಅಕ್ಟೋಬ_ನವೆಂಬ_ಡಿಸೆಂಬ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(t){return t.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(t,e){return 12===t&&(t=0),"ರಾತ್ರಿ"===e?t<4?t:t+12:"ಬೆಳಿಗ್ಗೆ"===e?t:"ಮಧ್ಯಾಹ್ನ"===e?t>=10?t:t+12:"ಸಂಜೆ"===e?t+12:void 0},meridiem:function(t,e,n){return t<4?"ರಾತ್ರಿ":t<10?"ಬೆಳಿಗ್ಗೆ":t<17?"ಮಧ್ಯಾಹ್ನ":t<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(t){return t+"ನೇ"},week:{dow:0,doy:6}});return r})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}일/,ordinal:"%d일",meridiemParse:/오전|오후/,isPM:function(t){return"오후"===t},meridiem:function(t,e,n){return t<12?"오전":"오후"}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"},n=t.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кече саат] LT",lastWeek:"[Өткен аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(t){var n=t%10,r=t>=100?100:null;return t+(e[t]||e[n]||e[r])},week:{dow:1,doy:7}});return n})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t,e,n,r){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return e?i[n][0]:i[n][1]}function n(t){var e=t.substr(0,t.indexOf(" "));return i(e)?"a "+t:"an "+t}function r(t){var e=t.substr(0,t.indexOf(" "));return i(e)?"viru "+t:"virun "+t}function i(t){if(t=parseInt(t,10),isNaN(t))return!1;if(t<0)return!0;if(t<10)return 4<=t&&t<=7;if(t<100){var e=t%10,n=t/10;return i(0===e?n:e)}if(t<1e4){for(;t>=10;)t/=10;return i(t)}return t/=1e3,i(t)}var a=t.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:n,past:r,s:"e puer Sekonnen",m:e,mm:"%d Minutten",h:e,hh:"%d Stonnen",d:e,dd:"%d Deeg",M:e,MM:"%d Méint",y:e,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"), monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(t){return"ຕອນແລງ"===t},meridiem:function(t,e,n){return t<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(t){return"ທີ່"+t}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t,e,n,r){return e?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"}function n(t,e,n,r){return e?i(n)[0]:r?i(n)[1]:i(n)[2]}function r(t){return t%10===0||t>10&&t<20}function i(t){return o[t].split("_")}function a(t,e,a,o){var s=t+" ";return 1===t?s+n(t,e,a[0],o):e?s+(r(t)?i(a)[1]:i(a)[0]):o?s+i(a)[1]:s+(r(t)?i(a)[1]:i(a)[2])}var o={m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"},s=t.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:e,m:n,mm:a,h:n,hh:a,d:n,dd:a,M:n,MM:a,y:n,yy:a},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(t){return t+"-oji"},week:{dow:1,doy:4}});return s})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t,e,n){return n?e%10===1&&e%100!==11?t[2]:t[3]:e%10===1&&e%100!==11?t[0]:t[1]}function n(t,n,r){return t+" "+e(a[r],t,n)}function r(t,n,r){return e(a[r],t,n)}function i(t,e){return e?"dažas sekundes":"dažām sekundēm"}var a={m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")},o=t.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:i,m:r,mm:n,h:r,hh:n,d:r,dd:n,M:r,MM:n,y:r,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e={words:{m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(t,e){return 1===t?e[0]:t>=2&&t<=4?e[1]:e[2]},translate:function(t,n,r){var i=e.words[r];return 1===r.length?n?i[0]:i[1]:t+" "+e.correctGrammaticalCase(t,i)}},n=t.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var t=["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return t[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",m:e.translate,mm:e.translate,h:e.translate,hh:e.translate,d:"dan",dd:e.translate,M:"mjesec",MM:e.translate,y:"godinu",yy:e.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(t){var e=t%10,n=t%100;return 0===t?t+"-ев":0===n?t+"-ен":n>10&&n<20?t+"-ти":1===e?t+"-ви":2===e?t+"-ри":7===e||8===e?t+"-ми":t+"-ти"},week:{dow:1,doy:7}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(t,e){return 12===t&&(t=0),"രാത്രി"===e&&t>=4||"ഉച്ച കഴിഞ്ഞ്"===e||"വൈകുന്നേരം"===e?t+12:t},meridiem:function(t,e,n){return t<4?"രാത്രി":t<12?"രാവിലെ":t<17?"ഉച്ച കഴിഞ്ഞ്":t<20?"വൈകുന്നേരം":"രാത്രി"}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t,e,n,r){var i="";if(e)switch(n){case"s":i="काही सेकंद";break;case"m":i="एक मिनिट";break;case"mm":i="%d मिनिटे";break;case"h":i="एक तास";break;case"hh":i="%d तास";break;case"d":i="एक दिवस";break;case"dd":i="%d दिवस";break;case"M":i="एक महिना";break;case"MM":i="%d महिने";break;case"y":i="एक वर्ष";break;case"yy":i="%d वर्षे"}else switch(n){case"s":i="काही सेकंदां";break;case"m":i="एका मिनिटा";break;case"mm":i="%d मिनिटां";break;case"h":i="एका तासा";break;case"hh":i="%d तासां";break;case"d":i="एका दिवसा";break;case"dd":i="%d दिवसां";break;case"M":i="एका महिन्या";break;case"MM":i="%d महिन्यां";break;case"y":i="एका वर्षा";break;case"yy":i="%d वर्षां"}return i.replace(/%d/i,t)}var n={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},r={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},i=t.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},preparse:function(t){return t.replace(/[१२३४५६७८९०]/g,function(t){return r[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return n[t]})},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(t,e){return 12===t&&(t=0),"रात्री"===e?t<4?t:t+12:"सकाळी"===e?t:"दुपारी"===e?t>=10?t:t+12:"सायंकाळी"===e?t+12:void 0},meridiem:function(t,e,n){return t<4?"रात्री":t<10?"सकाळी":t<17?"दुपारी":t<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}});return i})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(t,e){return 12===t&&(t=0),"pagi"===e?t:"tengahari"===e?t>=11?t:t+12:"petang"===e||"malam"===e?t+12:void 0},meridiem:function(t,e,n){return t<11?"pagi":t<15?"tengahari":t<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(t,e){return 12===t&&(t=0),"pagi"===e?t:"tengahari"===e?t>=11?t:t+12:"petang"===e||"malam"===e?t+12:void 0},meridiem:function(t,e,n){return t<11?"pagi":t<15?"tengahari":t<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"},r=t.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(t){return t.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},week:{dow:1,doy:4}});return r})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},r=t.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(t){return t.replace(/[१२३४५६७८९०]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(t,e){return 12===t&&(t=0),"राति"===e?t<4?t:t+12:"बिहान"===e?t:"दिउँसो"===e?t>=10?t:t+12:"साँझ"===e?t+12:void 0},meridiem:function(t,e,n){return t<3?"राति":t<12?"बिहान":t<16?"दिउँसो":t<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}});return r})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,a=t.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(t,r){return t?/-MMM-/.test(r)?n[t.month()]:e[t.month()]:e},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(t){return t+(1===t||8===t||t>=20?"ste":"de")},week:{dow:1,doy:4}});return a})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,a=t.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(t,r){return t?/-MMM-/.test(r)?n[t.month()]:e[t.month()]:e},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(t){return t+(1===t||8===t||t>=20?"ste":"de")},week:{dow:1,doy:4}});return a})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"},r=t.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(t){return t.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(t,e){return 12===t&&(t=0),"ਰਾਤ"===e?t<4?t:t+12:"ਸਵੇਰ"===e?t:"ਦੁਪਹਿਰ"===e?t>=10?t:t+12:"ਸ਼ਾਮ"===e?t+12:void 0},meridiem:function(t,e,n){return t<4?"ਰਾਤ":t<10?"ਸਵੇਰ":t<17?"ਦੁਪਹਿਰ":t<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}});return r})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t){return t%10<5&&t%10>1&&~~(t/10)%10!==1}function n(t,n,r){var i=t+" ";switch(r){case"m":return n?"minuta":"minutę";case"mm":return i+(e(t)?"minuty":"minut");case"h":return n?"godzina":"godzinę";case"hh":return i+(e(t)?"godziny":"godzin");case"MM":return i+(e(t)?"miesiące":"miesięcy");case"yy":return i+(e(t)?"lata":"lat")}}var r="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),i="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),a=t.defineLocale("pl",{months:function(t,e){return t?""===e?"("+i[t.month()]+"|"+r[t.month()]+")":/D MMMM/.test(e)?i[t.month()]:r[t.month()]:r},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:n,mm:n,h:n,hh:n,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:n,y:"rok",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº"});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t,e,n){var r={mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"},i=" ";return(t%100>=20||t>=100&&t%100===0)&&(i=" de "),t+i+r[n]}var n=t.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",m:"un minut",mm:e,h:"o oră",hh:e,d:"o zi",dd:e,M:"o lună",MM:e,y:"un an",yy:e},week:{dow:1,doy:7}});return n})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t,e){var n=t.split("_");return e%10===1&&e%100!==11?n[0]:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?n[1]:n[2]}function n(t,n,r){var i={mm:n?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===r?n?"минута":"минуту":t+" "+e(i[r],+t)}var r=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],i=t.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В следующее] dddd [в] LT";case 1:case 2:case 4:return"[В следующий] dddd [в] LT";case 3:case 5:case 6:return"[В следующую] dddd [в] LT"}},lastWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:n,mm:n,h:"час",hh:n,d:"день",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(t){return/^(дня|вечера)$/.test(t)},meridiem:function(t,e,n){return t<4?"ночи":t<12?"утра":t<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":return t+"-й";case"D":return t+"-го";case"w":case"W":return t+"-я";default:return t}},week:{dow:1,doy:7}});return i})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"],r=t.defineLocale("sd",{months:e,monthsShort:e,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(t){return"شام"===t},meridiem:function(t,e,n){return t<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(t){return t.replace(/،/g,",")},postformat:function(t){return t.replace(/,/g,"،")},week:{dow:1,doy:4}});return r})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(t){return t+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(t){return"ප.ව."===t||"පස් වරු"===t},meridiem:function(t,e,n){return t>11?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t){return t>1&&t<5}function n(t,n,r,i){var a=t+" ";switch(r){case"s":return n||i?"pár sekúnd":"pár sekundami";case"m":return n?"minúta":i?"minútu":"minútou";case"mm":return n||i?a+(e(t)?"minúty":"minút"):a+"minútami";case"h":return n?"hodina":i?"hodinu":"hodinou";case"hh":return n||i?a+(e(t)?"hodiny":"hodín"):a+"hodinami";case"d":return n||i?"deň":"dňom";case"dd":return n||i?a+(e(t)?"dni":"dní"):a+"dňami";case"M":return n||i?"mesiac":"mesiacom";case"MM":return n||i?a+(e(t)?"mesiace":"mesiacov"):a+"mesiacmi";case"y":return n||i?"rok":"rokom";case"yy":return n||i?a+(e(t)?"roky":"rokov"):a+"rokmi"}}var r="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),i="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_"),a=t.defineLocale("sk",{months:r,monthsShort:i,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t,e,n,r){var i=t+" ";switch(n){case"s":return e||r?"nekaj sekund":"nekaj sekundami";case"m":return e?"ena minuta":"eno minuto";case"mm":return i+=1===t?e?"minuta":"minuto":2===t?e||r?"minuti":"minutama":t<5?e||r?"minute":"minutami":e||r?"minut":"minutami";case"h":return e?"ena ura":"eno uro";case"hh":return i+=1===t?e?"ura":"uro":2===t?e||r?"uri":"urama":t<5?e||r?"ure":"urami":e||r?"ur":"urami";case"d":return e||r?"en dan":"enim dnem";case"dd":return i+=1===t?e||r?"dan":"dnem":2===t?e||r?"dni":"dnevoma":e||r?"dni":"dnevi";case"M":return e||r?"en mesec":"enim mesecem";case"MM":return i+=1===t?e||r?"mesec":"mesecem":2===t?e||r?"meseca":"mesecema":t<5?e||r?"mesece":"meseci":e||r?"mesecev":"meseci";case"y":return e||r?"eno leto":"enim letom";case"yy":return i+=1===t?e||r?"leto":"letom":2===t?e||r?"leti":"letoma":t<5?e||r?"leta":"leti":e||r?"let":"leti"}}var n=t.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(t){return"M"===t.charAt(0)},meridiem:function(t,e,n){return t<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e={words:{m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(t,e){return 1===t?e[0]:t>=2&&t<=4?e[1]:e[2]},translate:function(t,n,r){var i=e.words[r];return 1===r.length?n?i[0]:i[1]:t+" "+e.correctGrammaticalCase(t,i)}},n=t.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){var t=["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"];return t[this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",m:e.translate,mm:e.translate,h:e.translate,hh:e.translate,d:"дан",dd:e.translate,M:"месец",MM:e.translate,y:"годину",yy:e.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e={words:{m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(t,e){return 1===t?e[0]:t>=2&&t<=4?e[1]:e[2]},translate:function(t,n,r){var i=e.words[r];return 1===r.length?n?i[0]:i[1]:t+" "+e.correctGrammaticalCase(t,i)}},n=t.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var t=["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return t[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:e.translate,mm:e.translate,h:e.translate,hh:e.translate,d:"dan",dd:e.translate,M:"mesec",MM:e.translate,y:"godinu",yy:e.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(t,e,n){return t<11?"ekuseni":t<15?"emini":t<19?"entsambama":"ebusuku"},meridiemHour:function(t,e){return 12===t&&(t=0),"ekuseni"===e?t:"emini"===e?t>=11?t:t+12:"entsambama"===e||"ebusuku"===e?0===t?0:t+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(e|a)/,ordinal:function(t){var e=t%10,n=1===~~(t%100/10)?"e":1===e?"a":2===e?"a":"e";return t+n},week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"},r=t.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(t){return t+"வது"},preparse:function(t){return t.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,function(t){return n[t]})},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]})},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(t,e,n){return t<2?" யாமம்":t<6?" வைகறை":t<10?" காலை":t<14?" நண்பகல்":t<18?" எற்பாடு":t<22?" மாலை":" யாமம்"},meridiemHour:function(t,e){return 12===t&&(t=0),"யாமம்"===e?t<2?t:t+12:"வைகறை"===e||"காலை"===e?t:"நண்பகல்"===e&&t>=10?t:t+12},week:{dow:0,doy:6}});return r})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(t,e){return 12===t&&(t=0),"రాత్రి"===e?t<4?t:t+12:"ఉదయం"===e?t:"మధ్యాహ్నం"===e?t>=10?t:t+12:"సాయంత్రం"===e?t+12:void 0},meridiem:function(t,e,n){return t<4?"రాత్రి":t<10?"ఉదయం":t<17?"మధ్యాహ్నం":t<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juniu_Juliu_Augustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Aug_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sexta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sext_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Sex_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"minutu balun",m:"minutu ida",mm:"minutus %d",h:"horas ida",hh:"horas %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(t){var e=t%10,n=1===~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n},week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(t){return"หลังเที่ยง"===t},meridiem:function(t,e,n){return t<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(t){return t},week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t){var e=t;return e=t.indexOf("jaj")!==-1?e.slice(0,-3)+"leS":t.indexOf("jar")!==-1?e.slice(0,-3)+"waQ":t.indexOf("DIS")!==-1?e.slice(0,-3)+"nem":e+" pIq"}function n(t){var e=t;return e=t.indexOf("jaj")!==-1?e.slice(0,-3)+"Hu’":t.indexOf("jar")!==-1?e.slice(0,-3)+"wen":t.indexOf("DIS")!==-1?e.slice(0,-3)+"ben":e+" ret"}function r(t,e,n,r){var a=i(t);switch(n){case"mm":return a+" tup";case"hh":return a+" rep";case"dd":return a+" jaj";case"MM":return a+" jar";case"yy":return a+" DIS"}}function i(t){var e=Math.floor(t%1e3/100),n=Math.floor(t%100/10),r=t%10,i="";return e>0&&(i+=a[e]+"vatlh"),n>0&&(i+=(""!==i?" ":"")+a[n]+"maH"),r>0&&(i+=(""!==i?" ":"")+a[r]),""===i?"pagh":i}var a="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_"),o=t.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:e,past:n,s:"puS lup",m:"wa’ tup",mm:r,h:"wa’ rep",hh:r,d:"wa’ jaj",dd:r,M:"wa’ jar",MM:r,y:"wa’ DIS",yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},n=t.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},dayOfMonthOrdinalParse:/\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,ordinal:function(t){if(0===t)return t+"'ıncı";var n=t%10,r=t%100-n,i=t>=100?100:null;return t+(e[n]||e[r]||e[i])},week:{dow:1,doy:7}});return n})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t,e,n,r){var i={s:["viensas secunds","'iensas secunds"],m:["'n míut","'iens míut"],mm:[t+" míuts",""+t+" míuts"],h:["'n þora","'iensa þora"],hh:[t+" þoras",""+t+" þoras"],d:["'n ziua","'iensa ziua"],dd:[t+" ziuas",""+t+" ziuas"],M:["'n mes","'iens mes"],MM:[t+" mesen",""+t+" mesen"],y:["'n ar","'iens ar"],yy:[t+" ars",""+t+" ars"]};return r?i[n][0]:e?i[n][0]:i[n][1]}var n=t.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(t){return"d'o"===t.toLowerCase()},meridiem:function(t,e,n){return t>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:e,m:e,mm:e,h:e,hh:e,d:e,dd:e,M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";function e(t,e){var n=t.split("_");return e%10===1&&e%100!==11?n[0]:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?n[1]:n[2]}function n(t,n,r){var i={mm:n?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:n?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===r?n?"хвилина":"хвилину":"h"===r?n?"година":"годину":t+" "+e(i[r],+t)}function r(t,e){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};if(!t)return n.nominative;var r=/(\[[ВвУу]\]) ?dddd/.test(e)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(e)?"genitive":"nominative";return n[r][t.day()]}function i(t){return function(){return t+"о"+(11===this.hours()?"б":"")+"] LT"; -}}var a=t.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:r,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:i("[Сьогодні "),nextDay:i("[Завтра "),lastDay:i("[Вчора "),nextWeek:i("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return i("[Минулої] dddd [").call(this);case 1:case 2:case 4:return i("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:n,mm:n,h:"годину",hh:n,d:"день",dd:n,M:"місяць",MM:n,y:"рік",yy:n},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(t){return/^(дня|вечора)$/.test(t)},meridiem:function(t,e,n){return t<4?"ночі":t<12?"ранку":t<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":case"w":case"W":return t+"-й";case"D":return t+"-го";default:return t}},week:{dow:1,doy:7}});return a})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"],r=t.defineLocale("ur",{months:e,monthsShort:e,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(t){return"شام"===t},meridiem:function(t,e,n){return t<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(t){return t.replace(/،/g,",")},postformat:function(t){return t.replace(/,/g,"،")},week:{dow:1,doy:4}});return r})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(t){return/^ch$/i.test(t)},meridiem:function(t,e,n){return t<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(t){return t},week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n},week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah点mm分",LLLL:"YYYY年MMMD日ddddAh点mm分",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日 HH:mm",llll:"YYYY年MMMD日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(t,e){return 12===t&&(t=0),"凌晨"===e||"早上"===e||"上午"===e?t:"下午"===e||"晚上"===e?t+12:t>=11?t:t+12},meridiem:function(t,e,n){var r=100*t+e;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";case"M":return t+"月";case"w":case"W":return t+"周";default:return t}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日 HH:mm",LLLL:"YYYY年MMMD日dddd HH:mm",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日 HH:mm",llll:"YYYY年MMMD日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(t,e){return 12===t&&(t=0),"凌晨"===e||"早上"===e||"上午"===e?t:"中午"===e?t>=11?t:t+12:"下午"===e||"晚上"===e?t+12:void 0},meridiem:function(t,e,n){var r=100*t+e;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";case"M":return t+"月";case"w":case"W":return t+"週";default:return t}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日 HH:mm",LLLL:"YYYY年MMMD日dddd HH:mm",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日 HH:mm",llll:"YYYY年MMMD日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(t,e){return 12===t&&(t=0),"凌晨"===e||"早上"===e||"上午"===e?t:"中午"===e?t>=11?t:t+12:"下午"===e||"晚上"===e?t+12:void 0},meridiem:function(t,e,n){var r=100*t+e;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";case"M":return t+"月";case"w":case"W":return t+"週";default:return t}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return e})},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){t.exports=n(126)},function(t,e,n){"use strict";function r(t){var e=new o(t),n=a(o.prototype.request,e);return i.extend(n,o.prototype,e),i.extend(n,e),n}var i=n(2),a=n(7),o=n(127),s=r();s.Axios=o,s.create=function(t){return r(t)},s.all=function(t){return Promise.all(t)},s.spread=n(142),t.exports=s,t.exports.default=s},function(t,e,n){"use strict";function r(t){this.defaults=a.merge(i,t),this.interceptors={request:new o,response:new o}}var i=n(133),a=n(2),o=n(128),s=n(129),u=n(138),l=n(136);r.prototype.request=function(t){"string"==typeof t&&(t=a.merge({url:arguments[0]},arguments[1])),t=a.merge(i,this.defaults,{method:"get"},t),t.baseURL&&!u(t.url)&&(t.url=l(t.baseURL,t.url));var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},a.forEach(["delete","get","head"],function(t){r.prototype[t]=function(e,n){return this.request(a.merge(n||{},{method:t,url:e}))}}),a.forEach(["post","put","patch"],function(t){r.prototype[t]=function(e,n,r){return this.request(a.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=r},function(t,e,n){"use strict";function r(){this.handlers=[]}var i=n(2);r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){i.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=r},function(t,e,n){(function(e){"use strict";var r=n(2),i=n(132);t.exports=function(t){t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]});var a;return"function"==typeof t.adapter?a=t.adapter:"undefined"!=typeof XMLHttpRequest?a=n(5):"undefined"!=typeof e&&(a=n(5)),Promise.resolve(t).then(a).then(function(e){return e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse)),Promise.reject(e)})}}).call(e,n(4))},function(t,e){"use strict";t.exports=function(t,e,n,r){return t.config=e,n&&(t.code=n),t.response=r,t}},function(t,e,n){"use strict";var r=n(6);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n)):t(n)}},function(t,e,n){"use strict";var r=n(2);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";function r(t,e){!i.isUndefined(t)&&i.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var i=n(2),a=n(140),o=/^\)\]\}',?\n/,s={"Content-Type":"application/x-www-form-urlencoded"};t.exports={transformRequest:[function(t,e){return a(e,"Content-Type"),i.isFormData(t)||i.isArrayBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t)?t:i.isArrayBufferView(t)?t.buffer:i.isURLSearchParams(t)?(r(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):i.isObject(t)?(r(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t){t=t.replace(o,"");try{t=JSON.parse(t)}catch(t){}}return t}],headers:{common:{Accept:"application/json, text/plain, */*"},patch:i.merge(s),post:i.merge(s),put:i.merge(s)},timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}}},function(t,e){"use strict";function n(){this.message="String contains an invalid character"}function r(t){for(var e,r,a=String(t),o="",s=0,u=i;a.charAt(0|s)||(u="=",s%1);o+=u.charAt(63&e>>8-s%1*8)){if(r=a.charCodeAt(s+=.75),r>255)throw new n;e=e<<8|r}return o}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",t.exports=r},function(t,e,n){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i=n(2);t.exports=function(t,e,n){if(!e)return t;var a;if(n)a=n(e);else if(i.isURLSearchParams(e))a=e.toString();else{var o=[];i.forEach(e,function(t,e){null!==t&&"undefined"!=typeof t&&(i.isArray(t)&&(e+="[]"),i.isArray(t)||(t=[t]),i.forEach(t,function(t){i.isDate(t)?t=t.toISOString():i.isObject(t)&&(t=JSON.stringify(t)),o.push(r(e)+"="+r(t))}))}),a=o.join("&")}return a&&(t+=(t.indexOf("?")===-1?"?":"&")+a),t}},function(t,e){"use strict";t.exports=function(t,e){return t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,"")}},function(t,e,n){"use strict";var r=n(2);t.exports=r.isStandardBrowserEnv()?function(){return{write:function(t,e,n,i,a,o){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(a)&&s.push("domain="+a),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(t,e){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";var r=n(2);t.exports=r.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(i.setAttribute("href",e),e=i.href),i.setAttribute("href",e),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");return e=t(window.location.href),function(n){var i=r.isString(n)?t(n):n;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},function(t,e,n){"use strict";var r=n(2);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(2);t.exports=function(t){var e,n,i,a={};return t?(r.forEach(t.split("\n"),function(t){i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e&&(a[e]=a[e]?a[e]+", "+n:n)}),a):a}},function(t,e){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){(function(t){"use strict";t.tag2("errors",'

{opts.project}

{error.message} {error.type} {error.count} {moment(error.lastUpdated).fromNow()} {error.status} {error.status} delete
','errors .tag.is-danger,[riot-tag="errors"] .tag.is-danger,[data-is="errors"] .tag.is-danger{ background-color: #EA513C; } errors .btn-delete,[riot-tag="errors"] .btn-delete,[data-is="errors"] .btn-delete{ color: #DA5019; }',"",function(t){var e=this,n=t.project,r=t.req;e.moment=t.moment;var i=function(t,i){var a=t.item.error.message;t.item.error.isLoading=!0,e.update(),r.patch("/projects/"+encodeURIComponent(n)+"/errors/"+encodeURIComponent(a),{status:i}).then(function(e){t.item.error.status=i}).catch(function(t){throw new Error(t)}).then(function(n){t.item.error.isLoading=!1,e.update()})};e.resolve=function(t){i(t,"resolved")},e.unresolve=function(t){i(t,"unresolved")},e.delete=function(t){var i=t.item.error.message;confirm('Are you sure you want to delete "'+i+'" ?')&&(t.item.error.isLoading=!0,e.update(),r.delete("/projects/"+encodeURIComponent(n)+"/errors/"+encodeURIComponent(i)).then(function(t){alert('"'+i+'" has been deleted'),location.reload()}).catch(function(t){throw new Error(t)}))}})}).call(e,n(3))},function(t,e,n){(function(t){"use strict";t.tag2("occurrence",'

{opts.message}

type

{opts.type}

timestamp

{opts.moment(opts.timestamp).format(\'YYYY-MM-DDTHH:mm:ssZZ\')}

backtrace

{backtrace}

{k}

{JSON.stringify(v, null, 2)}
','occurrence h3,[riot-tag="occurrence"] h3,[data-is="occurrence"] h3,occurrence p.period,[riot-tag="occurrence"] p.period,[data-is="occurrence"] p.period{ margin-top: 10px; font-weight: bold; } occurrence p.period .icon,[riot-tag="occurrence"] p.period .icon,[data-is="occurrence"] p.period .icon{ margin-left: -2px; } occurrence pre code,[riot-tag="occurrence"] pre code,[data-is="occurrence"] pre code{ background-color: whitesmoke; color: #4a4a4a; display: block; overflow-x: auto; padding: 16px 20px; } occurrence .c3-axis-x .tick,[riot-tag="occurrence"] .c3-axis-x .tick,[data-is="occurrence"] .c3-axis-x .tick{ display: none; } occurrence .faultline-tooltip,[riot-tag="occurrence"] .faultline-tooltip,[data-is="occurrence"] .faultline-tooltip{ padding: 2px; border-style: solid; border-color: blue; border-width: 3px; background-color: white; font-weight: bold; } occurrence .faultline-tooltip span,[riot-tag="occurrence"] .faultline-tooltip span,[data-is="occurrence"] .faultline-tooltip span{ display: block; font-size: x-small; }',"",function(t){var e=this;this.backtrace="",t.backtrace.forEach(function(t){e.backtrace+=t.file+"("+t.line+") "+t.function+"\n"})})}).call(e,n(3))},function(t,e,n){(function(t){"use strict";t.tag2("overview",'

{opts.message}

type

{opts.type}

timestamp

{opts.moment(opts.timestamp).format(\'YYYY-MM-DDTHH:mm:ssZZ\')}

backtrace

{backtrace}

{k}

{JSON.stringify(v, null, 2)}

timeline

[ - ]

occurrences

timestamp message type browser url
{occurrence.timestamp} {occurrence.message} {occurrence.type} {occurrence.context.url}
more occurrences
','overview h3,[riot-tag="overview"] h3,[data-is="overview"] h3,overview p.period,[riot-tag="overview"] p.period,[data-is="overview"] p.period{ margin-top: 10px; font-weight: bold; } overview p.period .icon,[riot-tag="overview"] p.period .icon,[data-is="overview"] p.period .icon{ margin-left: -2px; } overview pre code,[riot-tag="overview"] pre code,[data-is="overview"] pre code{ background-color: whitesmoke; color: #4a4a4a; display: block; overflow-x: auto; padding: 16px 20px; } overview .more,[riot-tag="overview"] .more,[data-is="overview"] .more{ text-align: center; }',"",function(e){var n=this,r=this;r.backtrace="",e.backtrace.forEach(function(t){r.backtrace+=t.file+"("+t.line+") "+t.function+"\n"});var i={detectBrowserIcon:function(t){var n=e.woothee.parse(t);switch(n.name){case"Internet Explorer":return"ie";case"Edge":return"edge";case"Chrome":return"chrome";case"Safari":return"safari";case"Firefox":return"firefox";case"Opera":return"opera"}return"question-circle"}};r.occurrences=e.occurrences.map(function(t){return t.context.browser=i.detectBrowserIcon(t.context.userAgent),t.timestamp=e.moment(t.timestamp).format("YYYY-MM-DDTHH:mm:ssZZ"),t}),r.more=function(n){var i=r.occurrences[r.occurrences.length-1].reversedUnixtime;e.req.get("/projects/"+e.project+"/errors/"+e.message+"/occurrences",{params:{after:i,limit:10}}).then(function(n){e.occurrences=e.occurrences.concat(n.data.occurrences),t.mount("overview",e)}).catch(function(t){throw new Error(t)})},r.on("updated",function(){var t="x",n="error count",r=[t],i=[n],a={};a[n]="E06A3B",e.items.forEach(function(t){var n=e.moment(t.timestamp).format("YYYY-MM-DDTHH:mm:ssZZ");r.push(n),i.push(t.count)});var o=e.moment(e.start).format("YYYY-MM-DDTHH:mm:ssZZ"),s=e.moment(e.end).format("YYYY-MM-DDTHH:mm:ssZZ");e.c3.generate({bindto:"#timeseries",data:{x:"x",xFormat:"%Y-%m-%dT%H:%M:%S%Z",columns:[r,i],type:"bar",colors:a},legend:{show:!1},bar:{width:8},tooltip:{contents:function(t,n,r,i){return'
'+t[0].value+''+e.moment(t[0].x).format("YYYY-MM-DDTHH:mm:ssZZ")+"
"}},subchart:{show:!0},axis:{x:{min:o,max:s,type:"timeseries",tick:{values:[o,s],format:"%Y-%m-%d %H:%M:%S%Z"}},y:{tick:{values:function t(e){for(var t=[0,5],n=e[1],r=10;r

Projects

','projects .btn-delete,[riot-tag="projects"] .btn-delete,[data-is="projects"] .btn-delete{ color: #DA5019; }',"",function(t){var e=this,n=t.req;e.delete=function(t){var r=t.item.project.name;confirm('Are you sure you want to delete "'+r+'" ?')&&(t.item.project.isLoading=!0,e.update(),n.delete("/projects/"+encodeURIComponent(r)).then(function(t){alert('"'+r+'" has been deleted'),location.reload()}).catch(function(t){throw new Error(t)}))}})}).call(e,n(3))},function(t,e,n){var r,i;!function(a){"use strict";function o(t){this.owner=t}function s(t,e){if(Object.create)e.prototype=Object.create(t.prototype);else{var n=function(){};n.prototype=t.prototype,e.prototype=new n}return e.prototype.constructor=e,e}function u(t){var e=this.internal=new l(this);e.loadConfig(t),e.beforeInit(t),e.init(),e.afterInit(t),function t(e,n,r){Object.keys(e).forEach(function(i){n[i]=e[i].bind(r),Object.keys(e[i]).length>0&&t(e[i],n[i],r)})}(h,this,this)}function l(t){var e=this;e.d3=a.d3?a.d3:n(8),e.api=t,e.config=e.getDefaultConfig(),e.data={},e.cache={},e.axes={}}function c(t){o.call(this,t)}function d(t,e){function n(t,e){t.attr("transform",function(t){return"translate("+Math.ceil(e(t)+M)+", 0)"})}function r(t,e){t.attr("transform",function(t){return"translate(0,"+Math.ceil(e(t))+")"})}function i(t){var e=t[0],n=t[t.length-1];return e0&&r[0]>0&&r.unshift(r[0]-(r[1]-r[0])),r}function o(){var t,n=m.copy();return e.isCategory&&(t=m.domain(),n.domain([t[0],t[1]-1])),n}function s(t){var e=h?h(t):t;return"undefined"!=typeof e?e:""}function u(t){if(P)return P;var e={h:11.5,w:5.5};return t.select("text").text(s).each(function(t){var n=this.getBoundingClientRect(),r=s(t),i=n.height,a=r?n.width/r.length:void 0;i&&a&&(e.h=i,e.w=a)}).text(""),P=e,e}function l(n){return e.withoutTransition?n:t.transition(n)}function c(h){h.each(function(){function h(t,n){function r(t,e){a=void 0;for(var s=1;s0?"start":"end":"middle"}function b(t){return t?"rotate("+t+")":""}function S(t){return t?8*Math.sin(Math.PI*(t/180)):0}function T(t){return t?11.5-2.5*(t/15)*(t>0?1:-1):J}var Y,w,k,D=c.g=t.select(this),A=this.__chart__||m,P=this.__chart__=o(),O=v?v:a(P),E=D.selectAll(".tick").data(O,P),H=E.enter().insert("g",".domain").attr("class","tick").style("opacity",1e-6),j=E.exit().remove(),C=l(E).style("opacity",1),R=m.rangeExtent?m.rangeExtent():i(m.range()),V=D.selectAll(".domain").data([0]),I=(V.enter().append("path").attr("class","domain"),l(V));H.append("line"),H.append("text");var G=H.select("line"),N=C.select("line"),F=H.select("text"),W=C.select("text");e.isCategory?(M=Math.ceil((P(1)-P(0))/2),w=_?0:M,k=_?M:0):M=w=0;var z,U,B=u(D.select(".tick")),X=[],J=Math.max(g,0)+y,q="left"===p||"right"===p;z=E.select("text"),U=z.selectAll("tspan").data(function(t,n){var r=e.tickMultiline?h(t,e.tickWidth):[].concat(s(t));return X[n]=r.length,r.map(function(t){return{index:n,splitted:t}})}),U.enter().append("tspan"),U.exit().remove(),U.text(function(t){return t.splitted});var K=e.tickTextRotate;switch(p){case"bottom":Y=n,G.attr("y2",g),F.attr("y",J),N.attr("x1",w).attr("x2",w).attr("y2",x),W.attr("x",0).attr("y",T(K)).style("text-anchor",L(K)).attr("transform",b(K)),U.attr("x",0).attr("dy",f).attr("dx",S(K)),I.attr("d","M"+R[0]+","+d+"V0H"+R[1]+"V"+d);break;case"top":Y=n,G.attr("y2",-g),F.attr("y",-J),N.attr("x2",0).attr("y2",-g),W.attr("x",0).attr("y",-J),z.style("text-anchor","middle"),U.attr("x",0).attr("dy","0em"),I.attr("d","M"+R[0]+","+-d+"V0H"+R[1]+"V"+-d);break;case"left":Y=r,G.attr("x2",-g),F.attr("x",-J),N.attr("x2",-g).attr("y1",k).attr("y2",k),W.attr("x",-J).attr("y",M),z.style("text-anchor","end"),U.attr("x",-J).attr("dy",f),I.attr("d","M"+-d+","+R[0]+"H0V"+R[1]+"H"+-d);break;case"right":Y=r,G.attr("x2",g),F.attr("x",J),N.attr("x2",g).attr("y2",0),W.attr("x",J).attr("y",0),z.style("text-anchor","start"),U.attr("x",J).attr("dy",f),I.attr("d","M"+d+","+R[0]+"H0V"+R[1]+"H"+d)}if(P.rangeBand){var $=P,Z=$.rangeBand()/2;A=P=function(t){return $(t)+Z}}else A.rangeBand?A=P:j.call(Y,P);H.call(Y,A),C.call(Y,P)})}var d,h,f,_,m=t.scale.linear(),p="bottom",g=6,y=3,v=null,M=0,x=!0;return e=e||{},d=e.withOuterTick?6:0,c.scale=function(t){return arguments.length?(m=t,c):m},c.orient=function(t){return arguments.length?(p=t in{top:1,right:1,bottom:1,left:1}?t+"":"bottom",c):p},c.tickFormat=function(t){return arguments.length?(h=t,c):h},c.tickCentered=function(t){return arguments.length?(_=t,c):_},c.tickOffset=function(){return M},c.tickInterval=function(){var t,n;return e.isCategory?t=2*M:(n=c.g.select("path.domain").node().getTotalLength()-2*d,t=n/c.g.selectAll("line").size()),t===1/0?0:t},c.ticks=function(){return arguments.length?(f=arguments,c):f},c.tickCulling=function(t){return arguments.length?(x=t,c):x},c.tickValues=function(t){if("function"==typeof t)v=function(){return t(m.domain())};else{if(!arguments.length)return v;v=t}return c},c}var h,f,_,m={version:"0.4.11"};m.generate=function(t){return new u(t)},m.chart={fn:u.prototype,internal:{fn:l.prototype,axis:{fn:c.prototype}}},h=m.chart.fn,f=m.chart.internal.fn,_=m.chart.internal.axis.fn,f.beforeInit=function(){},f.afterInit=function(){},f.init=function(){var t=this,e=t.config;if(t.initParams(),e.data_url)t.convertUrlToData(e.data_url,e.data_mimeType,e.data_headers,e.data_keys,t.initWithData);else if(e.data_json)t.initWithData(t.convertJsonToData(e.data_json,e.data_keys));else if(e.data_rows)t.initWithData(t.convertRowsToData(e.data_rows));else{if(!e.data_columns)throw Error("url or json or rows or columns is required.");t.initWithData(t.convertColumnsToData(e.data_columns))}},f.initParams=function(){var t=this,e=t.d3,n=t.config;t.clipId="c3-"+ +new Date+"-clip",t.clipIdForXAxis=t.clipId+"-xaxis",t.clipIdForYAxis=t.clipId+"-yaxis",t.clipIdForGrid=t.clipId+"-grid",t.clipIdForSubchart=t.clipId+"-subchart",t.clipPath=t.getClipPath(t.clipId),t.clipPathForXAxis=t.getClipPath(t.clipIdForXAxis),t.clipPathForYAxis=t.getClipPath(t.clipIdForYAxis),t.clipPathForGrid=t.getClipPath(t.clipIdForGrid),t.clipPathForSubchart=t.getClipPath(t.clipIdForSubchart),t.dragStart=null,t.dragging=!1,t.flowing=!1,t.cancelClick=!1,t.mouseover=!1,t.transiting=!1,t.color=t.generateColor(),t.levelColor=t.generateLevelColor(),t.dataTimeFormat=n.data_xLocaltime?e.time.format:e.time.format.utc,t.axisTimeFormat=n.axis_x_localtime?e.time.format:e.time.format.utc,t.defaultAxisTimeFormat=t.axisTimeFormat.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%-m/%-d",function(t){return t.getDay()&&1!==t.getDate()}],["%-m/%-d",function(t){return 1!==t.getDate()}],["%-m/%-d",function(t){return t.getMonth()}],["%Y/%-m/%-d",function(){return!0}]]),t.hiddenTargetIds=[],t.hiddenLegendIds=[],t.focusedTargetIds=[],t.defocusedTargetIds=[],t.xOrient=n.axis_rotated?"left":"bottom",t.yOrient=n.axis_rotated?n.axis_y_inner?"top":"bottom":n.axis_y_inner?"right":"left",t.y2Orient=n.axis_rotated?n.axis_y2_inner?"bottom":"top":n.axis_y2_inner?"left":"right",t.subXOrient=n.axis_rotated?"left":"bottom",t.isLegendRight="right"===n.legend_position,t.isLegendInset="inset"===n.legend_position,t.isLegendTop="top-left"===n.legend_inset_anchor||"top-right"===n.legend_inset_anchor,t.isLegendLeft="top-left"===n.legend_inset_anchor||"bottom-left"===n.legend_inset_anchor,t.legendStep=0,t.legendItemWidth=0,t.legendItemHeight=0,t.currentMaxTickWidths={x:0,y:0,y2:0},t.rotated_padding_left=30,t.rotated_padding_right=n.axis_rotated&&!n.axis_x_show?0:30,t.rotated_padding_top=5,t.withoutFadeIn={},t.intervalForObserveInserted=void 0,t.axes.subx=e.selectAll([])},f.initChartElements=function(){this.initBar&&this.initBar(),this.initLine&&this.initLine(),this.initArc&&this.initArc(),this.initGauge&&this.initGauge(),this.initText&&this.initText()},f.initWithData=function(t){var e,n,r=this,i=r.d3,a=r.config,o=!0;r.axis=new c(r),r.initPie&&r.initPie(),r.initBrush&&r.initBrush(),r.initZoom&&r.initZoom(),a.bindto?"function"==typeof a.bindto.node?r.selectChart=a.bindto:r.selectChart=i.select(a.bindto):r.selectChart=i.selectAll([]),r.selectChart.empty()&&(r.selectChart=i.select(document.createElement("div")).style("opacity",0),r.observeInserted(r.selectChart),o=!1),r.selectChart.html("").classed("c3",!0),r.data.xs={},r.data.targets=r.convertDataToTargets(t),a.data_filter&&(r.data.targets=r.data.targets.filter(a.data_filter)),a.data_hide&&r.addHiddenTargetIds(a.data_hide===!0?r.mapToIds(r.data.targets):a.data_hide),a.legend_hide&&r.addHiddenLegendIds(a.legend_hide===!0?r.mapToIds(r.data.targets):a.legend_hide),r.hasType("gauge")&&(a.legend_show=!1),r.updateSizes(),r.updateScales(),r.x.domain(i.extent(r.getXDomain(r.data.targets))),r.y.domain(r.getYDomain(r.data.targets,"y")),r.y2.domain(r.getYDomain(r.data.targets,"y2")),r.subX.domain(r.x.domain()),r.subY.domain(r.y.domain()),r.subY2.domain(r.y2.domain()),r.orgXDomain=r.x.domain(),r.brush&&r.brush.scale(r.subX),a.zoom_enabled&&r.zoom.scale(r.x),r.svg=r.selectChart.append("svg").style("overflow","hidden").on("mouseenter",function(){return a.onmouseover.call(r)}).on("mouseleave",function(){return a.onmouseout.call(r)}),r.config.svg_classname&&r.svg.attr("class",r.config.svg_classname),e=r.svg.append("defs"),r.clipChart=r.appendClip(e,r.clipId),r.clipXAxis=r.appendClip(e,r.clipIdForXAxis),r.clipYAxis=r.appendClip(e,r.clipIdForYAxis),r.clipGrid=r.appendClip(e,r.clipIdForGrid),r.clipSubchart=r.appendClip(e,r.clipIdForSubchart),r.updateSvgSize(),n=r.main=r.svg.append("g").attr("transform",r.getTranslate("main")),r.initSubchart&&r.initSubchart(),r.initTooltip&&r.initTooltip(),r.initLegend&&r.initLegend(),r.initTitle&&r.initTitle(),n.append("text").attr("class",p.text+" "+p.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),r.initRegion(),r.initGrid(),n.append("g").attr("clip-path",r.clipPath).attr("class",p.chart),a.grid_lines_front&&r.initGridLines(),r.initEventRect(),r.initChartElements(),n.insert("rect",a.zoom_privileged?null:"g."+p.regions).attr("class",p.zoomRect).attr("width",r.width).attr("height",r.height).style("opacity",0).on("dblclick.zoom",null),a.axis_x_extent&&r.brush.extent(r.getDefaultExtent()),r.axis.init(),r.updateTargets(r.data.targets),o&&(r.updateDimension(),r.config.oninit.call(r),r.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1})),r.bindResize(),r.api.element=r.selectChart.node()},f.smoothLines=function(t,e){var n=this;"grid"===e&&t.each(function(){var t=n.d3.select(this),e=t.attr("x1"),r=t.attr("x2"),i=t.attr("y1"),a=t.attr("y2");t.attr({x1:Math.ceil(e),x2:Math.ceil(r),y1:Math.ceil(i),y2:Math.ceil(a)})})},f.updateSizes=function(){var t=this,e=t.config,n=t.legend?t.getLegendHeight():0,r=t.legend?t.getLegendWidth():0,i=t.isLegendRight||t.isLegendInset?0:n,a=t.hasArcType(),o=e.axis_rotated||a?0:t.getHorizontalAxisHeight("x"),s=e.subchart_show&&!a?e.subchart_size_height+o:0;t.currentWidth=t.getCurrentWidth(),t.currentHeight=t.getCurrentHeight(),t.margin=e.axis_rotated?{top:t.getHorizontalAxisHeight("y2")+t.getCurrentPaddingTop(),right:a?0:t.getCurrentPaddingRight(),bottom:t.getHorizontalAxisHeight("y")+i+t.getCurrentPaddingBottom(),left:s+(a?0:t.getCurrentPaddingLeft())}:{top:4+t.getCurrentPaddingTop(),right:a?0:t.getCurrentPaddingRight(),bottom:o+s+i+t.getCurrentPaddingBottom(),left:a?0:t.getCurrentPaddingLeft()},t.margin2=e.axis_rotated?{top:t.margin.top,right:NaN,bottom:20+i,left:t.rotated_padding_left}:{top:t.currentHeight-s-i,right:NaN,bottom:o+i,left:t.margin.left},t.margin3={top:0,right:NaN,bottom:0,left:0},t.updateSizeForLegend&&t.updateSizeForLegend(n,r),t.width=t.currentWidth-t.margin.left-t.margin.right,t.height=t.currentHeight-t.margin.top-t.margin.bottom,t.width<0&&(t.width=0),t.height<0&&(t.height=0),t.width2=e.axis_rotated?t.margin.left-t.rotated_padding_left-t.rotated_padding_right:t.width,t.height2=e.axis_rotated?t.height:t.currentHeight-t.margin2.top-t.margin2.bottom,t.width2<0&&(t.width2=0),t.height2<0&&(t.height2=0),t.arcWidth=t.width-(t.isLegendRight?r+10:0),t.arcHeight=t.height-(t.isLegendRight?0:10),t.hasType("gauge")&&!e.gauge_fullCircle&&(t.arcHeight+=t.height-t.getGaugeLabelHeight()),t.updateRadius&&t.updateRadius(),t.isLegendRight&&a&&(t.margin3.left=t.arcWidth/2+1.1*t.radiusExpanded)},f.updateTargets=function(t){var e=this;e.updateTargetsForText(t),e.updateTargetsForBar(t),e.updateTargetsForLine(t),e.hasArcType()&&e.updateTargetsForArc&&e.updateTargetsForArc(t),e.updateTargetsForSubchart&&e.updateTargetsForSubchart(t),e.showTargets()},f.showTargets=function(){var t=this;t.svg.selectAll("."+p.target).filter(function(e){return t.isTargetToShow(e.id)}).transition().duration(t.config.transition_duration).style("opacity",1)},f.redraw=function(t,e){var n,r,i,a,o,s,u,l,c,d,h,f,_,m,g,y,v,M,x,L,b,S,T,Y,k,D,A,P,O,E=this,H=E.main,j=E.d3,C=E.config,R=E.getShapeIndices(E.isAreaType),V=E.getShapeIndices(E.isBarType),I=E.getShapeIndices(E.isLineType),G=E.hasArcType(),N=E.filterTargetsToShow(E.data.targets),F=E.xv.bind(E);if(t=t||{},n=w(t,"withY",!0),r=w(t,"withSubchart",!0),i=w(t,"withTransition",!0),s=w(t,"withTransform",!1),u=w(t,"withUpdateXDomain",!1),l=w(t,"withUpdateOrgXDomain",!1),c=w(t,"withTrimXDomain",!0),_=w(t,"withUpdateXAxis",u),d=w(t,"withLegend",!1),h=w(t,"withEventRect",!0),f=w(t,"withDimension",!0),a=w(t,"withTransitionForExit",i),o=w(t,"withTransitionForAxis",i),x=i?C.transition_duration:0,L=a?x:0,b=o?x:0,e=e||E.axis.generateTransitions(b),d&&C.legend_show?E.updateLegend(E.mapToIds(E.data.targets),t,e):f&&E.updateDimension(!0),E.isCategorized()&&0===N.length&&E.x.domain([0,E.axes.x.selectAll(".tick").size()]),N.length?(E.updateXDomain(N,u,l,c),C.axis_x_tick_values||(Y=E.axis.updateXAxisTickValues(N))):(E.xAxis.tickValues([]),E.subXAxis.tickValues([])),C.zoom_rescale&&!t.flow&&(A=E.x.orgDomain()),E.y.domain(E.getYDomain(N,"y",A)),E.y2.domain(E.getYDomain(N,"y2",A)),!C.axis_y_tick_values&&C.axis_y_tick_count&&E.yAxis.tickValues(E.axis.generateTickValues(E.y.domain(),C.axis_y_tick_count)),!C.axis_y2_tick_values&&C.axis_y2_tick_count&&E.y2Axis.tickValues(E.axis.generateTickValues(E.y2.domain(),C.axis_y2_tick_count)),E.axis.redraw(e,G),E.axis.updateLabels(i),(u||_)&&N.length)if(C.axis_x_tick_culling&&Y){for(k=1;k=0&&j.select(this).style("display",e%D?"none":"block")})}else E.svg.selectAll("."+p.axisX+" .tick text").style("display","block");m=E.generateDrawArea?E.generateDrawArea(R,!1):void 0,g=E.generateDrawBar?E.generateDrawBar(V):void 0,y=E.generateDrawLine?E.generateDrawLine(I,!1):void 0,v=E.generateXYForText(R,V,I,!0),M=E.generateXYForText(R,V,I,!1),n&&(E.subY.domain(E.getYDomain(N,"y")),E.subY2.domain(E.getYDomain(N,"y2"))),E.updateXgridFocus(),H.select("text."+p.text+"."+p.empty).attr("x",E.width/2).attr("y",E.height/2).text(C.data_empty_label_text).transition().style("opacity",N.length?0:1),E.updateGrid(x),E.updateRegion(x),E.updateBar(L),E.updateLine(L),E.updateArea(L),E.updateCircle(),E.hasDataLabel()&&E.updateText(L),E.redrawTitle&&E.redrawTitle(),E.redrawArc&&E.redrawArc(x,L,s),E.redrawSubchart&&E.redrawSubchart(r,e,x,L,R,V,I),H.selectAll("."+p.selectedCircles).filter(E.isBarType.bind(E)).selectAll("circle").remove(),C.interaction_enabled&&!t.flow&&h&&(E.redrawEventRect(),E.updateZoom&&E.updateZoom()),E.updateCircleY(),P=(E.config.axis_rotated?E.circleY:E.circleX).bind(E),O=(E.config.axis_rotated?E.circleX:E.circleY).bind(E),t.flow&&(T=E.generateFlow({targets:N,flow:t.flow,duration:t.flow.duration,drawBar:g,drawLine:y,drawArea:m,cx:P,cy:O,xv:F,xForText:v,yForText:M})),(x||T)&&E.isTabVisible()?j.transition().duration(x).each(function(){var e=[];[E.redrawBar(g,!0),E.redrawLine(y,!0),E.redrawArea(m,!0),E.redrawCircle(P,O,!0),E.redrawText(v,M,t.flow,!0),E.redrawRegion(!0),E.redrawGrid(!0)].forEach(function(t){t.forEach(function(t){e.push(t)})}),S=E.generateWait(),e.forEach(function(t){S.add(t)})}).call(S,function(){T&&T(),C.onrendered&&C.onrendered.call(E)}):(E.redrawBar(g),E.redrawLine(y),E.redrawArea(m),E.redrawCircle(P,O),E.redrawText(v,M,t.flow),E.redrawRegion(),E.redrawGrid(),C.onrendered&&C.onrendered.call(E)),E.mapToIds(E.data.targets).forEach(function(t){E.withoutFadeIn[t]=!0})},f.updateAndRedraw=function(t){var e,n=this,r=n.config;t=t||{},t.withTransition=w(t,"withTransition",!0),t.withTransform=w(t,"withTransform",!1),t.withLegend=w(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=w(t,"withTransitionForTransform",t.withTransition),n.updateSizes(),t.withLegend&&r.legend_show||(e=n.axis.generateTransitions(t.withTransitionForAxis?r.transition_duration:0),n.updateScales(),n.updateSvgSize(),n.transformAll(t.withTransitionForTransform,e)),n.redraw(t,e)},f.redrawWithoutRescale=function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})},f.isTimeSeries=function(){return"timeseries"===this.config.axis_x_type},f.isCategorized=function(){return this.config.axis_x_type.indexOf("categor")>=0},f.isCustomX=function(){var t=this,e=t.config;return!t.isTimeSeries()&&(e.data_x||Y(e.data_xs))},f.isTimeSeriesY=function(){return"timeseries"===this.config.axis_y_type},f.getTranslate=function(t){var e,n,r=this,i=r.config;return"main"===t?(e=b(r.margin.left),n=b(r.margin.top)):"context"===t?(e=b(r.margin2.left),n=b(r.margin2.top)):"legend"===t?(e=r.margin3.left,n=r.margin3.top):"x"===t?(e=0,n=i.axis_rotated?0:r.height):"y"===t?(e=0,n=i.axis_rotated?r.height:0):"y2"===t?(e=i.axis_rotated?0:r.width,n=i.axis_rotated?1:0):"subx"===t?(e=0,n=i.axis_rotated?0:r.height2):"arc"===t&&(e=r.arcWidth/2,n=r.arcHeight/2),"translate("+e+","+n+")"},f.initialOpacity=function(t){return null!==t.value&&this.withoutFadeIn[t.id]?1:0},f.initialOpacityForCircle=function(t){return null!==t.value&&this.withoutFadeIn[t.id]?this.opacityForCircle(t):0},f.opacityForCircle=function(t){var e=this.config.point_show?1:0;return g(t.value)?this.isScatterType(t)?.5:e:0},f.opacityForText=function(){return this.hasDataLabel()?1:0},f.xx=function(t){return t?this.x(t.x):null},f.xv=function(t){var e=this,n=t.value;return e.isTimeSeries()?n=e.parseDate(t.value):e.isCategorized()&&"string"==typeof t.value&&(n=e.config.axis_x_categories.indexOf(t.value)),Math.ceil(e.x(n))},f.yv=function(t){var e=this,n=t.axis&&"y2"===t.axis?e.y2:e.y;return Math.ceil(n(t.value))},f.subxx=function(t){return t?this.subX(t.x):null},f.transformMain=function(t,e){var n,r,i,a=this;e&&e.axisX?n=e.axisX:(n=a.main.select("."+p.axisX),t&&(n=n.transition())),e&&e.axisY?r=e.axisY:(r=a.main.select("."+p.axisY),t&&(r=r.transition())),e&&e.axisY2?i=e.axisY2:(i=a.main.select("."+p.axisY2),t&&(i=i.transition())),(t?a.main.transition():a.main).attr("transform",a.getTranslate("main")),n.attr("transform",a.getTranslate("x")),r.attr("transform",a.getTranslate("y")),i.attr("transform",a.getTranslate("y2")),a.main.select("."+p.chartArcs).attr("transform",a.getTranslate("arc"))},f.transformAll=function(t,e){var n=this;n.transformMain(t,e),n.config.subchart_show&&n.transformContext(t,e),n.legend&&n.transformLegend(t)},f.updateSvgSize=function(){var t=this,e=t.svg.select(".c3-brush .background");t.svg.attr("width",t.currentWidth).attr("height",t.currentHeight),t.svg.selectAll(["#"+t.clipId,"#"+t.clipIdForGrid]).select("rect").attr("width",t.width).attr("height",t.height),t.svg.select("#"+t.clipIdForXAxis).select("rect").attr("x",t.getXAxisClipX.bind(t)).attr("y",t.getXAxisClipY.bind(t)).attr("width",t.getXAxisClipWidth.bind(t)).attr("height",t.getXAxisClipHeight.bind(t)),t.svg.select("#"+t.clipIdForYAxis).select("rect").attr("x",t.getYAxisClipX.bind(t)).attr("y",t.getYAxisClipY.bind(t)).attr("width",t.getYAxisClipWidth.bind(t)).attr("height",t.getYAxisClipHeight.bind(t)),t.svg.select("#"+t.clipIdForSubchart).select("rect").attr("width",t.width).attr("height",e.size()?e.attr("height"):0),t.svg.select("."+p.zoomRect).attr("width",t.width).attr("height",t.height),t.selectChart.style("max-height",t.currentHeight+"px")},f.updateDimension=function(t){var e=this;t||(e.config.axis_rotated?(e.axes.x.call(e.xAxis),e.axes.subx.call(e.subXAxis)):(e.axes.y.call(e.yAxis),e.axes.y2.call(e.y2Axis))),e.updateSizes(),e.updateScales(),e.updateSvgSize(),e.transformAll(!1)},f.observeInserted=function(t){var e,n=this;return"undefined"==typeof MutationObserver?void a.console.error("MutationObserver not defined."):(e=new MutationObserver(function(r){r.forEach(function(r){"childList"===r.type&&r.previousSibling&&(e.disconnect(),n.intervalForObserveInserted=a.setInterval(function(){t.node().parentNode&&(a.clearInterval(n.intervalForObserveInserted),n.updateDimension(),n.brush&&n.brush.update(),n.config.oninit.call(n),n.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),t.transition().style("opacity",1))},10))})}),void e.observe(t.node(),{attributes:!0,childList:!0,characterData:!0}))},f.bindResize=function(){var t=this,e=t.config;if(t.resizeFunction=t.generateResize(),t.resizeFunction.add(function(){e.onresize.call(t)}),e.resize_auto&&t.resizeFunction.add(function(){void 0!==t.resizeTimeout&&a.clearTimeout(t.resizeTimeout),t.resizeTimeout=a.setTimeout(function(){delete t.resizeTimeout,t.api.flush()},100)}),t.resizeFunction.add(function(){e.onresized.call(t)}),a.attachEvent)a.attachEvent("onresize",t.resizeFunction);else if(a.addEventListener)a.addEventListener("resize",t.resizeFunction,!1);else{var n=a.onresize;n?n.add&&n.remove||(n=t.generateResize(),n.add(a.onresize)):n=t.generateResize(),n.add(t.resizeFunction),a.onresize=n}},f.generateResize=function(){function t(){e.forEach(function(t){t()})}var e=[];return t.add=function(t){e.push(t)},t.remove=function(t){for(var n=0;n0)for(o=s.hasNegativeValueInTargets(t),e=0;e=0}),0!==i.length)for(r=i[0],o&&c[r]&&c[r].forEach(function(t,e){c[r][e]=t<0?t:0}),n=1;n0||(c[r][e]+=+t)});return s.d3.min(Object.keys(c).map(function(t){return s.d3.min(c[t])}))},f.getYDomainMax=function(t){var e,n,r,i,a,o,s=this,u=s.config,l=s.mapToIds(t),c=s.getValuesAsIdKeyed(t);if(u.data_groups.length>0)for(o=s.hasPositiveValueInTargets(t),e=0;e=0}),0!==i.length)for(r=i[0],o&&c[r]&&c[r].forEach(function(t,e){c[r][e]=t>0?t:0}),n=1;n=0&&L>=0,f=x<=0&&L<=0,(g(v)&&h||g(M)&&f)&&(T=!1),T&&(h&&(x=0),f&&(L=0)),i=Math.abs(L-x),a=o=s=.1*i,"undefined"!=typeof b&&(u=Math.max(Math.abs(x),Math.abs(L)),L=b+u,x=b-u),k?(l=_.getDataLabelLength(x,L,"width"),c=S(_.y.range()),d=[l[0]/c,l[1]/c],o+=i*(d[1]/(1-d[0]-d[1])),s+=i*(d[0]/(1-d[0]-d[1]))):D&&(l=_.getDataLabelLength(x,L,"height"),o+=_.axis.convertPixelsToAxisPadding(l[1],i),s+=_.axis.convertPixelsToAxisPadding(l[0],i)),"y"===e&&Y(m.axis_y_padding)&&(o=_.axis.getPadding(m.axis_y_padding,"top",o,i),s=_.axis.getPadding(m.axis_y_padding,"bottom",s,i)),"y2"===e&&Y(m.axis_y2_padding)&&(o=_.axis.getPadding(m.axis_y2_padding,"top",o,i),s=_.axis.getPadding(m.axis_y2_padding,"bottom",s,i)),T&&(h&&(s=x),f&&(o=-L)),r=[x-s,L+o],w?r.reverse():r)},f.getXDomainMin=function(t){var e=this,n=e.config;return x(n.axis_x_min)?e.isTimeSeries()?this.parseDate(n.axis_x_min):n.axis_x_min:e.d3.min(t,function(t){return e.d3.min(t.values,function(t){return t.x})})},f.getXDomainMax=function(t){var e=this,n=e.config;return x(n.axis_x_max)?e.isTimeSeries()?this.parseDate(n.axis_x_max):n.axis_x_max:e.d3.max(t,function(t){return e.d3.max(t.values,function(t){return t.x})})},f.getXDomainPadding=function(t){var e,n,r,i,a=this,o=a.config,s=t[1]-t[0];return a.isCategorized()?n=0:a.hasType("bar")?(e=a.getMaxDataCount(),n=e>1?s/(e-1)/2:.5):n=.01*s,"object"==typeof o.axis_x_padding&&Y(o.axis_x_padding)?(r=g(o.axis_x_padding.left)?o.axis_x_padding.left:n,i=g(o.axis_x_padding.right)?o.axis_x_padding.right:n):r=i="number"==typeof o.axis_x_padding?o.axis_x_padding:n,{left:r,right:i}},f.getXDomain=function(t){var e=this,n=[e.getXDomainMin(t),e.getXDomainMax(t)],r=n[0],i=n[1],a=e.getXDomainPadding(n),o=0,s=0;return r-i!==0||e.isCategorized()||(e.isTimeSeries()?(r=new Date(.5*r.getTime()),i=new Date(1.5*i.getTime())):(r=0===r?1:.5*r,i=0===i?-1:1.5*i)),(r||0===r)&&(o=e.isTimeSeries()?new Date(r.getTime()-a.left):r-a.left),(i||0===i)&&(s=e.isTimeSeries()?new Date(i.getTime()+a.right):i+a.right),[o,s]},f.updateXDomain=function(t,e,n,r,i){var a=this,o=a.config;return n&&(a.x.domain(i?i:a.d3.extent(a.getXDomain(t))),a.orgXDomain=a.x.domain(),o.zoom_enabled&&a.zoom.scale(a.x).updateScaleExtent(),a.subX.domain(a.x.domain()),a.brush&&a.brush.scale(a.subX)),e&&(a.x.domain(i?i:!a.brush||a.brush.empty()?a.orgXDomain:a.brush.extent()), +}}var a=t.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:r,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:i("[Сьогодні "),nextDay:i("[Завтра "),lastDay:i("[Вчора "),nextWeek:i("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return i("[Минулої] dddd [").call(this);case 1:case 2:case 4:return i("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:n,mm:n,h:"годину",hh:n,d:"день",dd:n,M:"місяць",MM:n,y:"рік",yy:n},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(t){return/^(дня|вечора)$/.test(t)},meridiem:function(t,e,n){return t<4?"ночі":t<12?"ранку":t<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":case"w":case"W":return t+"-й";case"D":return t+"-го";default:return t}},week:{dow:1,doy:7}});return a})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"],r=t.defineLocale("ur",{months:e,monthsShort:e,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(t){return"شام"===t},meridiem:function(t,e,n){return t<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(t){return t.replace(/،/g,",")},postformat:function(t){return t.replace(/,/g,"،")},week:{dow:1,doy:4}});return r})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(t){return/^ch$/i.test(t)},meridiem:function(t,e,n){return t<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(t){return t},week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n},week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah点mm分",LLLL:"YYYY年MMMD日ddddAh点mm分",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日 HH:mm",llll:"YYYY年MMMD日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(t,e){return 12===t&&(t=0),"凌晨"===e||"早上"===e||"上午"===e?t:"下午"===e||"晚上"===e?t+12:t>=11?t:t+12},meridiem:function(t,e,n){var r=100*t+e;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";case"M":return t+"月";case"w":case"W":return t+"周";default:return t}},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日 HH:mm",LLLL:"YYYY年MMMD日dddd HH:mm",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日 HH:mm",llll:"YYYY年MMMD日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(t,e){return 12===t&&(t=0),"凌晨"===e||"早上"===e||"上午"===e?t:"中午"===e?t>=11?t:t+12:"下午"===e||"晚上"===e?t+12:void 0},meridiem:function(t,e,n){var r=100*t+e;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";case"M":return t+"月";case"w":case"W":return t+"週";default:return t}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return e})},function(t,e,n){!function(t,e){e(n(1))}(this,function(t){"use strict";var e=t.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日 HH:mm",LLLL:"YYYY年MMMD日dddd HH:mm",l:"YYYY年MMMD日",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日 HH:mm",llll:"YYYY年MMMD日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(t,e){return 12===t&&(t=0),"凌晨"===e||"早上"===e||"上午"===e?t:"中午"===e?t>=11?t:t+12:"下午"===e||"晚上"===e?t+12:void 0},meridiem:function(t,e,n){var r=100*t+e;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(t,e){switch(e){case"d":case"D":case"DDD":return t+"日";case"M":return t+"月";case"w":case"W":return t+"週";default:return t}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return e})},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){t.exports=n(126)},function(t,e,n){"use strict";function r(t){var e=new o(t),n=a(o.prototype.request,e);return i.extend(n,o.prototype,e),i.extend(n,e),n}var i=n(2),a=n(7),o=n(127),s=r();s.Axios=o,s.create=function(t){return r(t)},s.all=function(t){return Promise.all(t)},s.spread=n(142),t.exports=s,t.exports.default=s},function(t,e,n){"use strict";function r(t){this.defaults=a.merge(i,t),this.interceptors={request:new o,response:new o}}var i=n(133),a=n(2),o=n(128),s=n(129),u=n(138),l=n(136);r.prototype.request=function(t){"string"==typeof t&&(t=a.merge({url:arguments[0]},arguments[1])),t=a.merge(i,this.defaults,{method:"get"},t),t.baseURL&&!u(t.url)&&(t.url=l(t.baseURL,t.url));var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},a.forEach(["delete","get","head"],function(t){r.prototype[t]=function(e,n){return this.request(a.merge(n||{},{method:t,url:e}))}}),a.forEach(["post","put","patch"],function(t){r.prototype[t]=function(e,n,r){return this.request(a.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=r},function(t,e,n){"use strict";function r(){this.handlers=[]}var i=n(2);r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){i.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=r},function(t,e,n){(function(e){"use strict";var r=n(2),i=n(132);t.exports=function(t){t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]});var a;return"function"==typeof t.adapter?a=t.adapter:"undefined"!=typeof XMLHttpRequest?a=n(5):"undefined"!=typeof e&&(a=n(5)),Promise.resolve(t).then(a).then(function(e){return e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse)),Promise.reject(e)})}}).call(e,n(4))},function(t,e){"use strict";t.exports=function(t,e,n,r){return t.config=e,n&&(t.code=n),t.response=r,t}},function(t,e,n){"use strict";var r=n(6);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n)):t(n)}},function(t,e,n){"use strict";var r=n(2);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";function r(t,e){!i.isUndefined(t)&&i.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var i=n(2),a=n(140),o=/^\)\]\}',?\n/,s={"Content-Type":"application/x-www-form-urlencoded"};t.exports={transformRequest:[function(t,e){return a(e,"Content-Type"),i.isFormData(t)||i.isArrayBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t)?t:i.isArrayBufferView(t)?t.buffer:i.isURLSearchParams(t)?(r(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):i.isObject(t)?(r(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t){t=t.replace(o,"");try{t=JSON.parse(t)}catch(t){}}return t}],headers:{common:{Accept:"application/json, text/plain, */*"},patch:i.merge(s),post:i.merge(s),put:i.merge(s)},timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}}},function(t,e){"use strict";function n(){this.message="String contains an invalid character"}function r(t){for(var e,r,a=String(t),o="",s=0,u=i;a.charAt(0|s)||(u="=",s%1);o+=u.charAt(63&e>>8-s%1*8)){if(r=a.charCodeAt(s+=.75),r>255)throw new n;e=e<<8|r}return o}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",t.exports=r},function(t,e,n){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i=n(2);t.exports=function(t,e,n){if(!e)return t;var a;if(n)a=n(e);else if(i.isURLSearchParams(e))a=e.toString();else{var o=[];i.forEach(e,function(t,e){null!==t&&"undefined"!=typeof t&&(i.isArray(t)&&(e+="[]"),i.isArray(t)||(t=[t]),i.forEach(t,function(t){i.isDate(t)?t=t.toISOString():i.isObject(t)&&(t=JSON.stringify(t)),o.push(r(e)+"="+r(t))}))}),a=o.join("&")}return a&&(t+=(t.indexOf("?")===-1?"?":"&")+a),t}},function(t,e){"use strict";t.exports=function(t,e){return t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,"")}},function(t,e,n){"use strict";var r=n(2);t.exports=r.isStandardBrowserEnv()?function(){return{write:function(t,e,n,i,a,o){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(a)&&s.push("domain="+a),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(t,e){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";var r=n(2);t.exports=r.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(i.setAttribute("href",e),e=i.href),i.setAttribute("href",e),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");return e=t(window.location.href),function(n){var i=r.isString(n)?t(n):n;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},function(t,e,n){"use strict";var r=n(2);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(2);t.exports=function(t){var e,n,i,a={};return t?(r.forEach(t.split("\n"),function(t){i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e&&(a[e]=a[e]?a[e]+", "+n:n)}),a):a}},function(t,e){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){(function(t){"use strict";t.tag2("errors",'

{opts.project}

{error.message} {error.type} {error.count} {moment(error.lastUpdated).fromNow()} {error.status} {error.status} delete
','errors .tag.is-danger,[riot-tag="errors"] .tag.is-danger,[data-is="errors"] .tag.is-danger{ background-color: #EA513C; } errors .btn-delete,[riot-tag="errors"] .btn-delete,[data-is="errors"] .btn-delete{ color: #DA5019; }',"",function(t){var e=this,n=t.project,r=t.req;e.moment=t.moment;var i=function(t,i){var a=t.item.error.message;t.item.error.isLoading=!0,e.update(),r.patch("/projects/"+encodeURIComponent(n)+"/errors/"+encodeURIComponent(a),{status:i}).then(function(e){t.item.error.status=i}).catch(function(t){throw new Error(t)}).then(function(n){t.item.error.isLoading=!1,e.update()})};e.resolve=function(t){i(t,"resolved")},e.unresolve=function(t){i(t,"unresolved")},e.delete=function(t){var i=t.item.error.message;confirm('Are you sure you want to delete "'+i+'" ?')&&(t.item.error.isLoading=!0,e.update(),r.delete("/projects/"+encodeURIComponent(n)+"/errors/"+encodeURIComponent(i)).then(function(t){alert('"'+i+'" has been deleted'),location.reload()}).catch(function(t){throw new Error(t)}))}})}).call(e,n(3))},function(t,e,n){(function(t){"use strict";t.tag2("occurrence",'

{opts.message}

type

{opts.type}

timestamp

{opts.moment(opts.timestamp).format(\'YYYY-MM-DDTHH:mm:ssZZ\')}

backtrace

{backtrace}

{k}

{JSON.stringify(v, null, 2)}
','occurrence h3,[riot-tag="occurrence"] h3,[data-is="occurrence"] h3,occurrence p.period,[riot-tag="occurrence"] p.period,[data-is="occurrence"] p.period{ margin-top: 10px; font-weight: bold; } occurrence p.period .icon,[riot-tag="occurrence"] p.period .icon,[data-is="occurrence"] p.period .icon{ margin-left: -2px; } occurrence pre code,[riot-tag="occurrence"] pre code,[data-is="occurrence"] pre code{ background-color: whitesmoke; color: #4a4a4a; display: block; overflow-x: auto; padding: 16px 20px; } occurrence .c3-axis-x .tick,[riot-tag="occurrence"] .c3-axis-x .tick,[data-is="occurrence"] .c3-axis-x .tick{ display: none; } occurrence .faultline-tooltip,[riot-tag="occurrence"] .faultline-tooltip,[data-is="occurrence"] .faultline-tooltip{ padding: 2px; border-style: solid; border-color: blue; border-width: 3px; background-color: white; font-weight: bold; } occurrence .faultline-tooltip span,[riot-tag="occurrence"] .faultline-tooltip span,[data-is="occurrence"] .faultline-tooltip span{ display: block; font-size: x-small; }',"",function(t){var e=this;this.backtrace="",t.backtrace.forEach(function(t){e.backtrace+=t.file+"("+t.line+") "+t.function+"\n"})})}).call(e,n(3))},function(t,e,n){(function(t){"use strict";t.tag2("overview",'

{opts.message}

type

{opts.type}

timestamp

{opts.moment(opts.timestamp).format(\'YYYY-MM-DDTHH:mm:ssZZ\')}

backtrace

{backtrace}

{k}

{JSON.stringify(v, null, 2)}

timeline

[ - ]

occurrences

timestamp message type browser url
{occurrence.timestamp} {occurrence.message} {occurrence.type} {occurrence.context.url}
more occurrences
','overview h3,[riot-tag="overview"] h3,[data-is="overview"] h3,overview p.period,[riot-tag="overview"] p.period,[data-is="overview"] p.period{ margin-top: 10px; font-weight: bold; } overview p.period .icon,[riot-tag="overview"] p.period .icon,[data-is="overview"] p.period .icon{ margin-left: -2px; } overview pre code,[riot-tag="overview"] pre code,[data-is="overview"] pre code{ background-color: whitesmoke; color: #4a4a4a; display: block; overflow-x: auto; padding: 16px 20px; } overview .more,[riot-tag="overview"] .more,[data-is="overview"] .more{ text-align: center; }',"",function(e){var n=this,r=this;r.backtrace="",e.backtrace.forEach(function(t){r.backtrace+=t.file+"("+t.line+") "+t.function+"\n"});var i={detectBrowserIcon:function(t){var n=e.woothee.parse(t);switch(n.name){case"Internet Explorer":return"internet-explorer";case"Edge":return"edge";case"Chrome":return"chrome";case"Safari":return"safari";case"Firefox":return"firefox";case"Opera":return"opera"}return"question-circle"}};r.occurrences=e.occurrences.map(function(t){return t.context.browser=i.detectBrowserIcon(t.context.userAgent),t.timestamp=e.moment(t.timestamp).format("YYYY-MM-DDTHH:mm:ssZZ"),t}),r.more=function(n){var i=r.occurrences[r.occurrences.length-1].reversedUnixtime;e.req.get("/projects/"+e.project+"/errors/"+e.message+"/occurrences",{params:{after:i,limit:10}}).then(function(n){e.occurrences=e.occurrences.concat(n.data.occurrences),t.mount("overview",e)}).catch(function(t){throw new Error(t)})},r.on("updated",function(){var t="x",n="error count",r=[t],i=[n],a={};a[n]="E06A3B",e.items.forEach(function(t){var n=e.moment(t.timestamp).format("YYYY-MM-DDTHH:mm:ssZZ");r.push(n),i.push(t.count)});var o=e.moment(e.start).format("YYYY-MM-DDTHH:mm:ssZZ"),s=e.moment(e.end).format("YYYY-MM-DDTHH:mm:ssZZ");e.c3.generate({bindto:"#timeseries",data:{x:"x",xFormat:"%Y-%m-%dT%H:%M:%S%Z",columns:[r,i],type:"bar",colors:a},legend:{show:!1},bar:{width:8},tooltip:{contents:function(t,n,r,i){return'
'+t[0].value+''+e.moment(t[0].x).format("YYYY-MM-DDTHH:mm:ssZZ")+"
"}},subchart:{show:!0},axis:{x:{min:o,max:s,type:"timeseries",tick:{values:[o,s],format:"%Y-%m-%d %H:%M:%S%Z"}},y:{tick:{values:function t(e){for(var t=[0,5],n=e[1],r=10;r

Projects

','projects .btn-delete,[riot-tag="projects"] .btn-delete,[data-is="projects"] .btn-delete{ color: #DA5019; }',"",function(t){var e=this,n=t.req;e.delete=function(t){var r=t.item.project.name;confirm('Are you sure you want to delete "'+r+'" ?')&&(t.item.project.isLoading=!0,e.update(),n.delete("/projects/"+encodeURIComponent(r)).then(function(t){alert('"'+r+'" has been deleted'),location.reload()}).catch(function(t){throw new Error(t)}))}})}).call(e,n(3))},function(t,e,n){var r,i;!function(a){"use strict";function o(t){this.owner=t}function s(t,e){if(Object.create)e.prototype=Object.create(t.prototype);else{var n=function(){};n.prototype=t.prototype,e.prototype=new n}return e.prototype.constructor=e,e}function u(t){var e=this.internal=new l(this);e.loadConfig(t),e.beforeInit(t),e.init(),e.afterInit(t),function t(e,n,r){Object.keys(e).forEach(function(i){n[i]=e[i].bind(r),Object.keys(e[i]).length>0&&t(e[i],n[i],r)})}(h,this,this)}function l(t){var e=this;e.d3=a.d3?a.d3:n(8),e.api=t,e.config=e.getDefaultConfig(),e.data={},e.cache={},e.axes={}}function c(t){o.call(this,t)}function d(t,e){function n(t,e){t.attr("transform",function(t){return"translate("+Math.ceil(e(t)+M)+", 0)"})}function r(t,e){t.attr("transform",function(t){return"translate(0,"+Math.ceil(e(t))+")"})}function i(t){var e=t[0],n=t[t.length-1];return e0&&r[0]>0&&r.unshift(r[0]-(r[1]-r[0])),r}function o(){var t,n=m.copy();return e.isCategory&&(t=m.domain(),n.domain([t[0],t[1]-1])),n}function s(t){var e=h?h(t):t;return"undefined"!=typeof e?e:""}function u(t){if(P)return P;var e={h:11.5,w:5.5};return t.select("text").text(s).each(function(t){var n=this.getBoundingClientRect(),r=s(t),i=n.height,a=r?n.width/r.length:void 0;i&&a&&(e.h=i,e.w=a)}).text(""),P=e,e}function l(n){return e.withoutTransition?n:t.transition(n)}function c(h){h.each(function(){function h(t,n){function r(t,e){a=void 0;for(var s=1;s0?"start":"end":"middle"}function b(t){return t?"rotate("+t+")":""}function S(t){return t?8*Math.sin(Math.PI*(t/180)):0}function T(t){return t?11.5-2.5*(t/15)*(t>0?1:-1):J}var Y,w,k,D=c.g=t.select(this),A=this.__chart__||m,P=this.__chart__=o(),O=v?v:a(P),E=D.selectAll(".tick").data(O,P),H=E.enter().insert("g",".domain").attr("class","tick").style("opacity",1e-6),j=E.exit().remove(),C=l(E).style("opacity",1),R=m.rangeExtent?m.rangeExtent():i(m.range()),V=D.selectAll(".domain").data([0]),I=(V.enter().append("path").attr("class","domain"),l(V));H.append("line"),H.append("text");var G=H.select("line"),N=C.select("line"),F=H.select("text"),W=C.select("text");e.isCategory?(M=Math.ceil((P(1)-P(0))/2),w=_?0:M,k=_?M:0):M=w=0;var z,U,B=u(D.select(".tick")),X=[],J=Math.max(g,0)+y,q="left"===p||"right"===p;z=E.select("text"),U=z.selectAll("tspan").data(function(t,n){var r=e.tickMultiline?h(t,e.tickWidth):[].concat(s(t));return X[n]=r.length,r.map(function(t){return{index:n,splitted:t}})}),U.enter().append("tspan"),U.exit().remove(),U.text(function(t){return t.splitted});var K=e.tickTextRotate;switch(p){case"bottom":Y=n,G.attr("y2",g),F.attr("y",J),N.attr("x1",w).attr("x2",w).attr("y2",x),W.attr("x",0).attr("y",T(K)).style("text-anchor",L(K)).attr("transform",b(K)),U.attr("x",0).attr("dy",f).attr("dx",S(K)),I.attr("d","M"+R[0]+","+d+"V0H"+R[1]+"V"+d);break;case"top":Y=n,G.attr("y2",-g),F.attr("y",-J),N.attr("x2",0).attr("y2",-g),W.attr("x",0).attr("y",-J),z.style("text-anchor","middle"),U.attr("x",0).attr("dy","0em"),I.attr("d","M"+R[0]+","+-d+"V0H"+R[1]+"V"+-d);break;case"left":Y=r,G.attr("x2",-g),F.attr("x",-J),N.attr("x2",-g).attr("y1",k).attr("y2",k),W.attr("x",-J).attr("y",M),z.style("text-anchor","end"),U.attr("x",-J).attr("dy",f),I.attr("d","M"+-d+","+R[0]+"H0V"+R[1]+"H"+-d);break;case"right":Y=r,G.attr("x2",g),F.attr("x",J),N.attr("x2",g).attr("y2",0),W.attr("x",J).attr("y",0),z.style("text-anchor","start"),U.attr("x",J).attr("dy",f),I.attr("d","M"+d+","+R[0]+"H0V"+R[1]+"H"+d)}if(P.rangeBand){var $=P,Z=$.rangeBand()/2;A=P=function(t){return $(t)+Z}}else A.rangeBand?A=P:j.call(Y,P);H.call(Y,A),C.call(Y,P)})}var d,h,f,_,m=t.scale.linear(),p="bottom",g=6,y=3,v=null,M=0,x=!0;return e=e||{},d=e.withOuterTick?6:0,c.scale=function(t){return arguments.length?(m=t,c):m},c.orient=function(t){return arguments.length?(p=t in{top:1,right:1,bottom:1,left:1}?t+"":"bottom",c):p},c.tickFormat=function(t){return arguments.length?(h=t,c):h},c.tickCentered=function(t){return arguments.length?(_=t,c):_},c.tickOffset=function(){return M},c.tickInterval=function(){var t,n;return e.isCategory?t=2*M:(n=c.g.select("path.domain").node().getTotalLength()-2*d,t=n/c.g.selectAll("line").size()),t===1/0?0:t},c.ticks=function(){return arguments.length?(f=arguments,c):f},c.tickCulling=function(t){return arguments.length?(x=t,c):x},c.tickValues=function(t){if("function"==typeof t)v=function(){return t(m.domain())};else{if(!arguments.length)return v;v=t}return c},c}var h,f,_,m={version:"0.4.11"};m.generate=function(t){return new u(t)},m.chart={fn:u.prototype,internal:{fn:l.prototype,axis:{fn:c.prototype}}},h=m.chart.fn,f=m.chart.internal.fn,_=m.chart.internal.axis.fn,f.beforeInit=function(){},f.afterInit=function(){},f.init=function(){var t=this,e=t.config;if(t.initParams(),e.data_url)t.convertUrlToData(e.data_url,e.data_mimeType,e.data_headers,e.data_keys,t.initWithData);else if(e.data_json)t.initWithData(t.convertJsonToData(e.data_json,e.data_keys));else if(e.data_rows)t.initWithData(t.convertRowsToData(e.data_rows));else{if(!e.data_columns)throw Error("url or json or rows or columns is required.");t.initWithData(t.convertColumnsToData(e.data_columns))}},f.initParams=function(){var t=this,e=t.d3,n=t.config;t.clipId="c3-"+ +new Date+"-clip",t.clipIdForXAxis=t.clipId+"-xaxis",t.clipIdForYAxis=t.clipId+"-yaxis",t.clipIdForGrid=t.clipId+"-grid",t.clipIdForSubchart=t.clipId+"-subchart",t.clipPath=t.getClipPath(t.clipId),t.clipPathForXAxis=t.getClipPath(t.clipIdForXAxis),t.clipPathForYAxis=t.getClipPath(t.clipIdForYAxis),t.clipPathForGrid=t.getClipPath(t.clipIdForGrid),t.clipPathForSubchart=t.getClipPath(t.clipIdForSubchart),t.dragStart=null,t.dragging=!1,t.flowing=!1,t.cancelClick=!1,t.mouseover=!1,t.transiting=!1,t.color=t.generateColor(),t.levelColor=t.generateLevelColor(),t.dataTimeFormat=n.data_xLocaltime?e.time.format:e.time.format.utc,t.axisTimeFormat=n.axis_x_localtime?e.time.format:e.time.format.utc,t.defaultAxisTimeFormat=t.axisTimeFormat.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%-m/%-d",function(t){return t.getDay()&&1!==t.getDate()}],["%-m/%-d",function(t){return 1!==t.getDate()}],["%-m/%-d",function(t){return t.getMonth()}],["%Y/%-m/%-d",function(){return!0}]]),t.hiddenTargetIds=[],t.hiddenLegendIds=[],t.focusedTargetIds=[],t.defocusedTargetIds=[],t.xOrient=n.axis_rotated?"left":"bottom",t.yOrient=n.axis_rotated?n.axis_y_inner?"top":"bottom":n.axis_y_inner?"right":"left",t.y2Orient=n.axis_rotated?n.axis_y2_inner?"bottom":"top":n.axis_y2_inner?"left":"right",t.subXOrient=n.axis_rotated?"left":"bottom",t.isLegendRight="right"===n.legend_position,t.isLegendInset="inset"===n.legend_position,t.isLegendTop="top-left"===n.legend_inset_anchor||"top-right"===n.legend_inset_anchor,t.isLegendLeft="top-left"===n.legend_inset_anchor||"bottom-left"===n.legend_inset_anchor,t.legendStep=0,t.legendItemWidth=0,t.legendItemHeight=0,t.currentMaxTickWidths={x:0,y:0,y2:0},t.rotated_padding_left=30,t.rotated_padding_right=n.axis_rotated&&!n.axis_x_show?0:30,t.rotated_padding_top=5,t.withoutFadeIn={},t.intervalForObserveInserted=void 0,t.axes.subx=e.selectAll([])},f.initChartElements=function(){this.initBar&&this.initBar(),this.initLine&&this.initLine(),this.initArc&&this.initArc(),this.initGauge&&this.initGauge(),this.initText&&this.initText()},f.initWithData=function(t){var e,n,r=this,i=r.d3,a=r.config,o=!0;r.axis=new c(r),r.initPie&&r.initPie(),r.initBrush&&r.initBrush(),r.initZoom&&r.initZoom(),a.bindto?"function"==typeof a.bindto.node?r.selectChart=a.bindto:r.selectChart=i.select(a.bindto):r.selectChart=i.selectAll([]),r.selectChart.empty()&&(r.selectChart=i.select(document.createElement("div")).style("opacity",0),r.observeInserted(r.selectChart),o=!1),r.selectChart.html("").classed("c3",!0),r.data.xs={},r.data.targets=r.convertDataToTargets(t),a.data_filter&&(r.data.targets=r.data.targets.filter(a.data_filter)),a.data_hide&&r.addHiddenTargetIds(a.data_hide===!0?r.mapToIds(r.data.targets):a.data_hide),a.legend_hide&&r.addHiddenLegendIds(a.legend_hide===!0?r.mapToIds(r.data.targets):a.legend_hide),r.hasType("gauge")&&(a.legend_show=!1),r.updateSizes(),r.updateScales(),r.x.domain(i.extent(r.getXDomain(r.data.targets))),r.y.domain(r.getYDomain(r.data.targets,"y")),r.y2.domain(r.getYDomain(r.data.targets,"y2")),r.subX.domain(r.x.domain()),r.subY.domain(r.y.domain()),r.subY2.domain(r.y2.domain()),r.orgXDomain=r.x.domain(),r.brush&&r.brush.scale(r.subX),a.zoom_enabled&&r.zoom.scale(r.x),r.svg=r.selectChart.append("svg").style("overflow","hidden").on("mouseenter",function(){return a.onmouseover.call(r)}).on("mouseleave",function(){return a.onmouseout.call(r)}),r.config.svg_classname&&r.svg.attr("class",r.config.svg_classname),e=r.svg.append("defs"),r.clipChart=r.appendClip(e,r.clipId),r.clipXAxis=r.appendClip(e,r.clipIdForXAxis),r.clipYAxis=r.appendClip(e,r.clipIdForYAxis),r.clipGrid=r.appendClip(e,r.clipIdForGrid),r.clipSubchart=r.appendClip(e,r.clipIdForSubchart),r.updateSvgSize(),n=r.main=r.svg.append("g").attr("transform",r.getTranslate("main")),r.initSubchart&&r.initSubchart(),r.initTooltip&&r.initTooltip(),r.initLegend&&r.initLegend(),r.initTitle&&r.initTitle(),n.append("text").attr("class",p.text+" "+p.empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),r.initRegion(),r.initGrid(),n.append("g").attr("clip-path",r.clipPath).attr("class",p.chart),a.grid_lines_front&&r.initGridLines(),r.initEventRect(),r.initChartElements(),n.insert("rect",a.zoom_privileged?null:"g."+p.regions).attr("class",p.zoomRect).attr("width",r.width).attr("height",r.height).style("opacity",0).on("dblclick.zoom",null),a.axis_x_extent&&r.brush.extent(r.getDefaultExtent()),r.axis.init(),r.updateTargets(r.data.targets),o&&(r.updateDimension(),r.config.oninit.call(r),r.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1})),r.bindResize(),r.api.element=r.selectChart.node()},f.smoothLines=function(t,e){var n=this;"grid"===e&&t.each(function(){var t=n.d3.select(this),e=t.attr("x1"),r=t.attr("x2"),i=t.attr("y1"),a=t.attr("y2");t.attr({x1:Math.ceil(e),x2:Math.ceil(r),y1:Math.ceil(i),y2:Math.ceil(a)})})},f.updateSizes=function(){var t=this,e=t.config,n=t.legend?t.getLegendHeight():0,r=t.legend?t.getLegendWidth():0,i=t.isLegendRight||t.isLegendInset?0:n,a=t.hasArcType(),o=e.axis_rotated||a?0:t.getHorizontalAxisHeight("x"),s=e.subchart_show&&!a?e.subchart_size_height+o:0;t.currentWidth=t.getCurrentWidth(),t.currentHeight=t.getCurrentHeight(),t.margin=e.axis_rotated?{top:t.getHorizontalAxisHeight("y2")+t.getCurrentPaddingTop(),right:a?0:t.getCurrentPaddingRight(),bottom:t.getHorizontalAxisHeight("y")+i+t.getCurrentPaddingBottom(),left:s+(a?0:t.getCurrentPaddingLeft())}:{top:4+t.getCurrentPaddingTop(),right:a?0:t.getCurrentPaddingRight(),bottom:o+s+i+t.getCurrentPaddingBottom(),left:a?0:t.getCurrentPaddingLeft()},t.margin2=e.axis_rotated?{top:t.margin.top,right:NaN,bottom:20+i,left:t.rotated_padding_left}:{top:t.currentHeight-s-i,right:NaN,bottom:o+i,left:t.margin.left},t.margin3={top:0,right:NaN,bottom:0,left:0},t.updateSizeForLegend&&t.updateSizeForLegend(n,r),t.width=t.currentWidth-t.margin.left-t.margin.right,t.height=t.currentHeight-t.margin.top-t.margin.bottom,t.width<0&&(t.width=0),t.height<0&&(t.height=0),t.width2=e.axis_rotated?t.margin.left-t.rotated_padding_left-t.rotated_padding_right:t.width,t.height2=e.axis_rotated?t.height:t.currentHeight-t.margin2.top-t.margin2.bottom,t.width2<0&&(t.width2=0),t.height2<0&&(t.height2=0),t.arcWidth=t.width-(t.isLegendRight?r+10:0),t.arcHeight=t.height-(t.isLegendRight?0:10),t.hasType("gauge")&&!e.gauge_fullCircle&&(t.arcHeight+=t.height-t.getGaugeLabelHeight()),t.updateRadius&&t.updateRadius(),t.isLegendRight&&a&&(t.margin3.left=t.arcWidth/2+1.1*t.radiusExpanded)},f.updateTargets=function(t){var e=this;e.updateTargetsForText(t),e.updateTargetsForBar(t),e.updateTargetsForLine(t),e.hasArcType()&&e.updateTargetsForArc&&e.updateTargetsForArc(t),e.updateTargetsForSubchart&&e.updateTargetsForSubchart(t),e.showTargets()},f.showTargets=function(){var t=this;t.svg.selectAll("."+p.target).filter(function(e){return t.isTargetToShow(e.id)}).transition().duration(t.config.transition_duration).style("opacity",1)},f.redraw=function(t,e){var n,r,i,a,o,s,u,l,c,d,h,f,_,m,g,y,v,M,x,L,b,S,T,Y,k,D,A,P,O,E=this,H=E.main,j=E.d3,C=E.config,R=E.getShapeIndices(E.isAreaType),V=E.getShapeIndices(E.isBarType),I=E.getShapeIndices(E.isLineType),G=E.hasArcType(),N=E.filterTargetsToShow(E.data.targets),F=E.xv.bind(E);if(t=t||{},n=w(t,"withY",!0),r=w(t,"withSubchart",!0),i=w(t,"withTransition",!0),s=w(t,"withTransform",!1),u=w(t,"withUpdateXDomain",!1),l=w(t,"withUpdateOrgXDomain",!1),c=w(t,"withTrimXDomain",!0),_=w(t,"withUpdateXAxis",u),d=w(t,"withLegend",!1),h=w(t,"withEventRect",!0),f=w(t,"withDimension",!0),a=w(t,"withTransitionForExit",i),o=w(t,"withTransitionForAxis",i),x=i?C.transition_duration:0,L=a?x:0,b=o?x:0,e=e||E.axis.generateTransitions(b),d&&C.legend_show?E.updateLegend(E.mapToIds(E.data.targets),t,e):f&&E.updateDimension(!0),E.isCategorized()&&0===N.length&&E.x.domain([0,E.axes.x.selectAll(".tick").size()]),N.length?(E.updateXDomain(N,u,l,c),C.axis_x_tick_values||(Y=E.axis.updateXAxisTickValues(N))):(E.xAxis.tickValues([]),E.subXAxis.tickValues([])),C.zoom_rescale&&!t.flow&&(A=E.x.orgDomain()),E.y.domain(E.getYDomain(N,"y",A)),E.y2.domain(E.getYDomain(N,"y2",A)),!C.axis_y_tick_values&&C.axis_y_tick_count&&E.yAxis.tickValues(E.axis.generateTickValues(E.y.domain(),C.axis_y_tick_count)),!C.axis_y2_tick_values&&C.axis_y2_tick_count&&E.y2Axis.tickValues(E.axis.generateTickValues(E.y2.domain(),C.axis_y2_tick_count)),E.axis.redraw(e,G),E.axis.updateLabels(i),(u||_)&&N.length)if(C.axis_x_tick_culling&&Y){for(k=1;k=0&&j.select(this).style("display",e%D?"none":"block")})}else E.svg.selectAll("."+p.axisX+" .tick text").style("display","block");m=E.generateDrawArea?E.generateDrawArea(R,!1):void 0,g=E.generateDrawBar?E.generateDrawBar(V):void 0,y=E.generateDrawLine?E.generateDrawLine(I,!1):void 0,v=E.generateXYForText(R,V,I,!0),M=E.generateXYForText(R,V,I,!1),n&&(E.subY.domain(E.getYDomain(N,"y")),E.subY2.domain(E.getYDomain(N,"y2"))),E.updateXgridFocus(),H.select("text."+p.text+"."+p.empty).attr("x",E.width/2).attr("y",E.height/2).text(C.data_empty_label_text).transition().style("opacity",N.length?0:1),E.updateGrid(x),E.updateRegion(x),E.updateBar(L),E.updateLine(L),E.updateArea(L),E.updateCircle(),E.hasDataLabel()&&E.updateText(L),E.redrawTitle&&E.redrawTitle(),E.redrawArc&&E.redrawArc(x,L,s),E.redrawSubchart&&E.redrawSubchart(r,e,x,L,R,V,I),H.selectAll("."+p.selectedCircles).filter(E.isBarType.bind(E)).selectAll("circle").remove(),C.interaction_enabled&&!t.flow&&h&&(E.redrawEventRect(),E.updateZoom&&E.updateZoom()),E.updateCircleY(),P=(E.config.axis_rotated?E.circleY:E.circleX).bind(E),O=(E.config.axis_rotated?E.circleX:E.circleY).bind(E),t.flow&&(T=E.generateFlow({targets:N,flow:t.flow,duration:t.flow.duration,drawBar:g,drawLine:y,drawArea:m,cx:P,cy:O,xv:F,xForText:v,yForText:M})),(x||T)&&E.isTabVisible()?j.transition().duration(x).each(function(){var e=[];[E.redrawBar(g,!0),E.redrawLine(y,!0),E.redrawArea(m,!0),E.redrawCircle(P,O,!0),E.redrawText(v,M,t.flow,!0),E.redrawRegion(!0),E.redrawGrid(!0)].forEach(function(t){t.forEach(function(t){e.push(t)})}),S=E.generateWait(),e.forEach(function(t){S.add(t)})}).call(S,function(){T&&T(),C.onrendered&&C.onrendered.call(E)}):(E.redrawBar(g),E.redrawLine(y),E.redrawArea(m),E.redrawCircle(P,O),E.redrawText(v,M,t.flow),E.redrawRegion(),E.redrawGrid(),C.onrendered&&C.onrendered.call(E)),E.mapToIds(E.data.targets).forEach(function(t){E.withoutFadeIn[t]=!0})},f.updateAndRedraw=function(t){var e,n=this,r=n.config;t=t||{},t.withTransition=w(t,"withTransition",!0),t.withTransform=w(t,"withTransform",!1),t.withLegend=w(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=w(t,"withTransitionForTransform",t.withTransition),n.updateSizes(),t.withLegend&&r.legend_show||(e=n.axis.generateTransitions(t.withTransitionForAxis?r.transition_duration:0),n.updateScales(),n.updateSvgSize(),n.transformAll(t.withTransitionForTransform,e)),n.redraw(t,e)},f.redrawWithoutRescale=function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})},f.isTimeSeries=function(){return"timeseries"===this.config.axis_x_type},f.isCategorized=function(){return this.config.axis_x_type.indexOf("categor")>=0},f.isCustomX=function(){var t=this,e=t.config;return!t.isTimeSeries()&&(e.data_x||Y(e.data_xs))},f.isTimeSeriesY=function(){return"timeseries"===this.config.axis_y_type},f.getTranslate=function(t){var e,n,r=this,i=r.config;return"main"===t?(e=b(r.margin.left),n=b(r.margin.top)):"context"===t?(e=b(r.margin2.left),n=b(r.margin2.top)):"legend"===t?(e=r.margin3.left,n=r.margin3.top):"x"===t?(e=0,n=i.axis_rotated?0:r.height):"y"===t?(e=0,n=i.axis_rotated?r.height:0):"y2"===t?(e=i.axis_rotated?0:r.width,n=i.axis_rotated?1:0):"subx"===t?(e=0,n=i.axis_rotated?0:r.height2):"arc"===t&&(e=r.arcWidth/2,n=r.arcHeight/2),"translate("+e+","+n+")"},f.initialOpacity=function(t){return null!==t.value&&this.withoutFadeIn[t.id]?1:0},f.initialOpacityForCircle=function(t){return null!==t.value&&this.withoutFadeIn[t.id]?this.opacityForCircle(t):0},f.opacityForCircle=function(t){var e=this.config.point_show?1:0;return g(t.value)?this.isScatterType(t)?.5:e:0},f.opacityForText=function(){return this.hasDataLabel()?1:0},f.xx=function(t){return t?this.x(t.x):null},f.xv=function(t){var e=this,n=t.value;return e.isTimeSeries()?n=e.parseDate(t.value):e.isCategorized()&&"string"==typeof t.value&&(n=e.config.axis_x_categories.indexOf(t.value)),Math.ceil(e.x(n))},f.yv=function(t){var e=this,n=t.axis&&"y2"===t.axis?e.y2:e.y;return Math.ceil(n(t.value))},f.subxx=function(t){return t?this.subX(t.x):null},f.transformMain=function(t,e){var n,r,i,a=this;e&&e.axisX?n=e.axisX:(n=a.main.select("."+p.axisX),t&&(n=n.transition())),e&&e.axisY?r=e.axisY:(r=a.main.select("."+p.axisY),t&&(r=r.transition())),e&&e.axisY2?i=e.axisY2:(i=a.main.select("."+p.axisY2),t&&(i=i.transition())),(t?a.main.transition():a.main).attr("transform",a.getTranslate("main")),n.attr("transform",a.getTranslate("x")),r.attr("transform",a.getTranslate("y")),i.attr("transform",a.getTranslate("y2")),a.main.select("."+p.chartArcs).attr("transform",a.getTranslate("arc"))},f.transformAll=function(t,e){var n=this;n.transformMain(t,e),n.config.subchart_show&&n.transformContext(t,e),n.legend&&n.transformLegend(t)},f.updateSvgSize=function(){var t=this,e=t.svg.select(".c3-brush .background");t.svg.attr("width",t.currentWidth).attr("height",t.currentHeight),t.svg.selectAll(["#"+t.clipId,"#"+t.clipIdForGrid]).select("rect").attr("width",t.width).attr("height",t.height),t.svg.select("#"+t.clipIdForXAxis).select("rect").attr("x",t.getXAxisClipX.bind(t)).attr("y",t.getXAxisClipY.bind(t)).attr("width",t.getXAxisClipWidth.bind(t)).attr("height",t.getXAxisClipHeight.bind(t)),t.svg.select("#"+t.clipIdForYAxis).select("rect").attr("x",t.getYAxisClipX.bind(t)).attr("y",t.getYAxisClipY.bind(t)).attr("width",t.getYAxisClipWidth.bind(t)).attr("height",t.getYAxisClipHeight.bind(t)),t.svg.select("#"+t.clipIdForSubchart).select("rect").attr("width",t.width).attr("height",e.size()?e.attr("height"):0),t.svg.select("."+p.zoomRect).attr("width",t.width).attr("height",t.height),t.selectChart.style("max-height",t.currentHeight+"px")},f.updateDimension=function(t){var e=this;t||(e.config.axis_rotated?(e.axes.x.call(e.xAxis),e.axes.subx.call(e.subXAxis)):(e.axes.y.call(e.yAxis),e.axes.y2.call(e.y2Axis))),e.updateSizes(),e.updateScales(),e.updateSvgSize(),e.transformAll(!1)},f.observeInserted=function(t){var e,n=this;return"undefined"==typeof MutationObserver?void a.console.error("MutationObserver not defined."):(e=new MutationObserver(function(r){r.forEach(function(r){"childList"===r.type&&r.previousSibling&&(e.disconnect(),n.intervalForObserveInserted=a.setInterval(function(){t.node().parentNode&&(a.clearInterval(n.intervalForObserveInserted),n.updateDimension(),n.brush&&n.brush.update(),n.config.oninit.call(n),n.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),t.transition().style("opacity",1))},10))})}),void e.observe(t.node(),{attributes:!0,childList:!0,characterData:!0}))},f.bindResize=function(){var t=this,e=t.config;if(t.resizeFunction=t.generateResize(),t.resizeFunction.add(function(){e.onresize.call(t)}),e.resize_auto&&t.resizeFunction.add(function(){void 0!==t.resizeTimeout&&a.clearTimeout(t.resizeTimeout),t.resizeTimeout=a.setTimeout(function(){delete t.resizeTimeout,t.api.flush()},100)}),t.resizeFunction.add(function(){e.onresized.call(t)}),a.attachEvent)a.attachEvent("onresize",t.resizeFunction);else if(a.addEventListener)a.addEventListener("resize",t.resizeFunction,!1);else{var n=a.onresize;n?n.add&&n.remove||(n=t.generateResize(),n.add(a.onresize)):n=t.generateResize(),n.add(t.resizeFunction),a.onresize=n}},f.generateResize=function(){function t(){e.forEach(function(t){t()})}var e=[];return t.add=function(t){e.push(t)},t.remove=function(t){for(var n=0;n0)for(o=s.hasNegativeValueInTargets(t),e=0;e=0}),0!==i.length)for(r=i[0],o&&c[r]&&c[r].forEach(function(t,e){c[r][e]=t<0?t:0}),n=1;n0||(c[r][e]+=+t)});return s.d3.min(Object.keys(c).map(function(t){return s.d3.min(c[t])}))},f.getYDomainMax=function(t){var e,n,r,i,a,o,s=this,u=s.config,l=s.mapToIds(t),c=s.getValuesAsIdKeyed(t);if(u.data_groups.length>0)for(o=s.hasPositiveValueInTargets(t),e=0;e=0}),0!==i.length)for(r=i[0],o&&c[r]&&c[r].forEach(function(t,e){c[r][e]=t>0?t:0}),n=1;n=0&&L>=0,f=x<=0&&L<=0,(g(v)&&h||g(M)&&f)&&(T=!1),T&&(h&&(x=0),f&&(L=0)),i=Math.abs(L-x),a=o=s=.1*i,"undefined"!=typeof b&&(u=Math.max(Math.abs(x),Math.abs(L)),L=b+u,x=b-u),k?(l=_.getDataLabelLength(x,L,"width"),c=S(_.y.range()),d=[l[0]/c,l[1]/c],o+=i*(d[1]/(1-d[0]-d[1])),s+=i*(d[0]/(1-d[0]-d[1]))):D&&(l=_.getDataLabelLength(x,L,"height"),o+=_.axis.convertPixelsToAxisPadding(l[1],i),s+=_.axis.convertPixelsToAxisPadding(l[0],i)),"y"===e&&Y(m.axis_y_padding)&&(o=_.axis.getPadding(m.axis_y_padding,"top",o,i),s=_.axis.getPadding(m.axis_y_padding,"bottom",s,i)),"y2"===e&&Y(m.axis_y2_padding)&&(o=_.axis.getPadding(m.axis_y2_padding,"top",o,i),s=_.axis.getPadding(m.axis_y2_padding,"bottom",s,i)),T&&(h&&(s=x),f&&(o=-L)),r=[x-s,L+o],w?r.reverse():r)},f.getXDomainMin=function(t){var e=this,n=e.config;return x(n.axis_x_min)?e.isTimeSeries()?this.parseDate(n.axis_x_min):n.axis_x_min:e.d3.min(t,function(t){return e.d3.min(t.values,function(t){return t.x})})},f.getXDomainMax=function(t){var e=this,n=e.config;return x(n.axis_x_max)?e.isTimeSeries()?this.parseDate(n.axis_x_max):n.axis_x_max:e.d3.max(t,function(t){return e.d3.max(t.values,function(t){return t.x})})},f.getXDomainPadding=function(t){var e,n,r,i,a=this,o=a.config,s=t[1]-t[0];return a.isCategorized()?n=0:a.hasType("bar")?(e=a.getMaxDataCount(),n=e>1?s/(e-1)/2:.5):n=.01*s,"object"==typeof o.axis_x_padding&&Y(o.axis_x_padding)?(r=g(o.axis_x_padding.left)?o.axis_x_padding.left:n,i=g(o.axis_x_padding.right)?o.axis_x_padding.right:n):r=i="number"==typeof o.axis_x_padding?o.axis_x_padding:n,{left:r,right:i}},f.getXDomain=function(t){var e=this,n=[e.getXDomainMin(t),e.getXDomainMax(t)],r=n[0],i=n[1],a=e.getXDomainPadding(n),o=0,s=0;return r-i!==0||e.isCategorized()||(e.isTimeSeries()?(r=new Date(.5*r.getTime()),i=new Date(1.5*i.getTime())):(r=0===r?1:.5*r,i=0===i?-1:1.5*i)),(r||0===r)&&(o=e.isTimeSeries()?new Date(r.getTime()-a.left):r-a.left),(i||0===i)&&(s=e.isTimeSeries()?new Date(i.getTime()+a.right):i+a.right),[o,s]},f.updateXDomain=function(t,e,n,r,i){var a=this,o=a.config;return n&&(a.x.domain(i?i:a.d3.extent(a.getXDomain(t))),a.orgXDomain=a.x.domain(),o.zoom_enabled&&a.zoom.scale(a.x).updateScaleExtent(),a.subX.domain(a.x.domain()),a.brush&&a.brush.scale(a.subX)),e&&(a.x.domain(i?i:!a.brush||a.brush.empty()?a.orgXDomain:a.brush.extent()), o.zoom_enabled&&a.zoom.scale(a.x).updateScaleExtent()),r&&a.x.domain(a.trimXDomain(a.x.orgDomain())),a.x.domain()},f.trimXDomain=function(t){var e=this.getZoomDomain(),n=e[0],r=e[1];return t[0]<=n&&(t[1]=+t[1]+(n-t[0]),t[0]=n),r<=t[1]&&(t[0]=+t[0]-(t[1]-r),t[1]=r),t},f.isX=function(t){var e=this,n=e.config;return n.data_x&&t===n.data_x||Y(n.data_xs)&&k(n.data_xs,t)},f.isNotX=function(t){return!this.isX(t)},f.getXKey=function(t){var e=this,n=e.config;return n.data_x?n.data_x:Y(n.data_xs)?n.data_xs[t]:null},f.getXValuesOfXKey=function(t,e){var n,r=this,i=e&&Y(e)?r.mapToIds(e):[];return i.forEach(function(e){r.getXKey(e)===t&&(n=r.data.xs[e])}),n},f.getIndexByX=function(t){var e=this,n=e.filterByX(e.data.targets,t);return n.length?n[0].index:null},f.getXValue=function(t,e){var n=this;return t in n.data.xs&&n.data.xs[t]&&g(n.data.xs[t][e])?n.data.xs[t][e]:e},f.getOtherTargetXs=function(){var t=this,e=Object.keys(t.data.xs);return e.length?t.data.xs[e[0]]:null},f.getOtherTargetX=function(t){var e=this.getOtherTargetXs();return e&&t1},f.isMultipleX=function(){return Y(this.config.data_xs)||!this.config.data_xSort||this.hasType("scatter")},f.addName=function(t){var e,n=this;return t&&(e=n.config.data_names[t.id],t.name=void 0!==e?e:t.id),t},f.getValueOnIndex=function(t,e){var n=t.filter(function(t){return t.index===e});return n.length?n[0]:null},f.updateTargetX=function(t,e){var n=this;t.forEach(function(t){t.values.forEach(function(r,i){r.x=n.generateTargetX(e[i],t.id,i)}),n.data.xs[t.id]=e})},f.updateTargetXs=function(t,e){var n=this;t.forEach(function(t){e[t.id]&&n.updateTargetX([t],e[t.id])})},f.generateTargetX=function(t,e,n){var r,i=this;return r=i.isTimeSeries()?t?i.parseDate(t):i.parseDate(i.getXValue(e,n)):i.isCustomX()&&!i.isCategorized()?g(t)?+t:i.getXValue(e,n):n},f.cloneTarget=function(t){return{id:t.id,id_org:t.id_org,values:t.values.map(function(t){return{x:t.x,value:t.value,id:t.id}})}},f.updateXs=function(){var t=this;t.data.targets.length&&(t.xs=[],t.data.targets[0].values.forEach(function(e){t.xs[e.index]=e.x}))},f.getPrevX=function(t){var e=this.xs[t-1];return"undefined"!=typeof e?e:null},f.getNextX=function(t){var e=this.xs[t+1];return"undefined"!=typeof e?e:null},f.getMaxDataCount=function(){var t=this;return t.d3.max(t.data.targets,function(t){return t.values.length})},f.getMaxDataCountTarget=function(t){var e,n=t.length,r=0;return n>1?t.forEach(function(t){t.values.length>r&&(e=t,r=t.values.length)}):e=n?t[0]:null,e},f.getEdgeX=function(t){var e=this;return t.length?[e.d3.min(t,function(t){return t.values[0].x}),e.d3.max(t,function(t){return t.values[t.values.length-1].x})]:[0,0]},f.mapToIds=function(t){return t.map(function(t){return t.id})},f.mapToTargetIds=function(t){var e=this;return t?[].concat(t):e.mapToIds(e.data.targets)},f.hasTarget=function(t,e){var n,r=this.mapToIds(t);for(n=0;ne?1:t>=e?0:NaN})},f.addHiddenTargetIds=function(t){this.hiddenTargetIds=this.hiddenTargetIds.concat(t)},f.removeHiddenTargetIds=function(t){this.hiddenTargetIds=this.hiddenTargetIds.filter(function(e){return t.indexOf(e)<0})},f.addHiddenLegendIds=function(t){this.hiddenLegendIds=this.hiddenLegendIds.concat(t)},f.removeHiddenLegendIds=function(t){this.hiddenLegendIds=this.hiddenLegendIds.filter(function(e){return t.indexOf(e)<0})},f.getValuesAsIdKeyed=function(t){var e={};return t.forEach(function(t){e[t.id]=[],t.values.forEach(function(n){e[t.id].push(n.value)})}),e},f.checkValueInTargets=function(t,e){var n,r,i,a=Object.keys(t);for(n=0;n0})},f.isOrderDesc=function(){var t=this.config;return"string"==typeof t.data_order&&"desc"===t.data_order.toLowerCase()},f.isOrderAsc=function(){var t=this.config;return"string"==typeof t.data_order&&"asc"===t.data_order.toLowerCase()},f.orderTargets=function(t){var e=this,n=e.config,r=e.isOrderAsc(),i=e.isOrderDesc();return r||i?t.sort(function(t,e){var n=function(t,e){return t+Math.abs(e.value)},i=t.values.reduce(n,0),a=e.values.reduce(n,0);return r?a-i:i-a}):y(n.data_order)&&t.sort(n.data_order),t},f.filterByX=function(t,e){return this.d3.merge(t.map(function(t){return t.values})).filter(function(t){return t.x-e===0})},f.filterRemoveNull=function(t){return t.filter(function(t){return g(t.value)})},f.filterByXDomain=function(t,e){return t.map(function(t){return{id:t.id,id_org:t.id_org,values:t.values.filter(function(t){return e[0]<=t.x&&t.x<=e[1]})}})},f.hasDataLabel=function(){var t=this.config;return!("boolean"!=typeof t.data_labels||!t.data_labels)||!("object"!=typeof t.data_labels||!Y(t.data_labels))},f.getDataLabelLength=function(t,e,n){var r=this,i=[0,0],a=1.3;return r.selectChart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(function(t){return r.dataLabelFormat(t.id)(t)}).each(function(t,e){i[e]=this.getBoundingClientRect()[n]*a}).remove(),i},f.isNoneArc=function(t){return this.hasTarget(this.data.targets,t.id)},f.isArc=function(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},f.findSameXOfValues=function(t,e){var n,r=t[e].x,i=[];for(n=e-1;n>=0&&r===t[n].x;n--)i.push(t[n]);for(n=e;n=0?r.data.xs[n]=(e&&r.data.xs[n]?r.data.xs[n]:[]).concat(t.map(function(t){return t[a]}).filter(g).map(function(t,e){return r.generateTargetX(t,n,e)})):i.data_x?r.data.xs[n]=r.getOtherTargetXs():Y(i.data_xs)&&(r.data.xs[n]=r.getXValuesOfXKey(a,r.data.targets)):r.data.xs[n]=t.map(function(t,e){return e})}),a.forEach(function(t){if(!r.data.xs[t])throw new Error('x is not defined for id = "'+t+'".')}),n=a.map(function(e,n){var a=i.data_idConverter(e);return{id:a,id_org:e,values:t.map(function(t,o){var s,u=r.getXKey(e),l=t[u],c=null===t[e]||isNaN(t[e])?null:+t[e];return r.isCustomX()&&r.isCategorized()&&0===n&&!M(l)?(0===n&&0===o&&(i.axis_x_categories=[]),s=i.axis_x_categories.indexOf(l),s===-1&&(s=i.axis_x_categories.length,i.axis_x_categories.push(l))):s=r.generateTargetX(l,e,o),(M(t[e])||r.data.xs[e].length<=o)&&(s=void 0),{x:s,value:c,id:a}}).filter(function(t){return x(t.x)})}}),n.forEach(function(t){var e;i.data_xSort&&(t.values=t.values.sort(function(t,e){var n=t.x||0===t.x?t.x:1/0,r=e.x||0===e.x?e.x:1/0;return n-r})),e=0,t.values.forEach(function(t){t.index=e++}),r.data.xs[t.id].sort(function(t,e){return t-e})}),r.hasNegativeValue=r.hasNegativeValueInTargets(n),r.hasPositiveValue=r.hasPositiveValueInTargets(n),i.data_type&&r.setTargetType(r.mapToIds(n).filter(function(t){return!(t in i.data_types)}),i.data_type),n.forEach(function(t){r.addCache(t.id_org,t)}),n},f.load=function(t,e){var n=this;t&&(e.filter&&(t=t.filter(e.filter)),(e.type||e.types)&&t.forEach(function(t){var r=e.types&&e.types[t.id]?e.types[t.id]:e.type;n.setTargetType(t.id,r)}),n.data.targets.forEach(function(e){for(var n=0;n0?n:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},f.getCurrentPaddingTop=function(){var t=this,e=t.config,n=g(e.padding_top)?e.padding_top:0;return t.title&&t.title.node()&&(n+=t.getTitlePadding()),n},f.getCurrentPaddingBottom=function(){var t=this.config;return g(t.padding_bottom)?t.padding_bottom:0},f.getCurrentPaddingLeft=function(t){var e=this,n=e.config;return g(n.padding_left)?n.padding_left:n.axis_rotated?n.axis_x_show?Math.max(L(e.getAxisWidthByAxisId("x",t)),40):1:!n.axis_y_show||n.axis_y_inner?e.axis.getYAxisLabelPosition().isOuter?30:1:L(e.getAxisWidthByAxisId("y",t))},f.getCurrentPaddingRight=function(){var t=this,e=t.config,n=10,r=t.isLegendRight?t.getLegendWidth()+20:0;return g(e.padding_right)?e.padding_right+1:e.axis_rotated?n+r:!e.axis_y2_show||e.axis_y2_inner?2+r+(t.axis.getY2AxisLabelPosition().isOuter?20:0):L(t.getAxisWidthByAxisId("y2"))+r},f.getParentRectValue=function(t){for(var e,n=this.selectChart.node();n&&"BODY"!==n.tagName;){try{e=n.getBoundingClientRect()[t]}catch(r){"width"===t&&(e=n.offsetWidth)}if(e)break;n=n.parentNode}return e},f.getParentWidth=function(){return this.getParentRectValue("width")},f.getParentHeight=function(){var t=this.selectChart.style("height");return t.indexOf("px")>0?+t.replace("px",""):0},f.getSvgLeft=function(t){var e=this,n=e.config,r=n.axis_rotated||!n.axis_rotated&&!n.axis_y_inner,i=n.axis_rotated?p.axisX:p.axisY,a=e.main.select("."+i).node(),o=a&&r?a.getBoundingClientRect():{right:0},s=e.selectChart.node().getBoundingClientRect(),u=e.hasArcType(),l=o.right-s.left-(u?0:e.getCurrentPaddingLeft(t));return l>0?l:0},f.getAxisWidthByAxisId=function(t,e){var n=this,r=n.axis.getLabelPositionById(t);return n.axis.getMaxTickWidth(t,e)+(r.isInner?20:40)},f.getHorizontalAxisHeight=function(t){var e=this,n=e.config,r=30;return"x"!==t||n.axis_x_show?"x"===t&&n.axis_x_height?n.axis_x_height:"y"!==t||n.axis_y_show?"y2"!==t||n.axis_y2_show?("x"===t&&!n.axis_rotated&&n.axis_x_tick_rotate&&(r=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-n.axis_x_tick_rotate)/180)),"y"===t&&n.axis_rotated&&n.axis_y_tick_rotate&&(r=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-n.axis_y_tick_rotate)/180)),r+(e.axis.getLabelPositionById(t).isInner?0:10)+("y2"===t?-10:0)):e.rotated_padding_top:!n.legend_show||e.isLegendRight||e.isLegendInset?1:10:8},f.getEventRectWidth=function(){return Math.max(0,this.xAxis.tickInterval())},f.getShapeIndices=function(t){var e,n,r=this,i=r.config,a={},o=0;return r.filterTargetsToShow(r.data.targets.filter(t,r)).forEach(function(t){for(e=0;e=0&&(l+=s(i[o].value)-u))}),l}},f.isWithinShape=function(t,e){var n,r=this,i=r.d3.select(t);return r.isTargetToShow(e.id)?"circle"===t.nodeName?n=r.isStepType(e)?r.isWithinStep(t,r.getYScale(e.id)(e.value)):r.isWithinCircle(t,1.5*r.pointSelectR(e)):"path"===t.nodeName&&(n=!i.classed(p.bar)||r.isWithinBar(t)):n=!1,n},f.getInterpolate=function(t){var e=this,n=e.isInterpolationType(e.config.spline_interpolation_type)?e.config.spline_interpolation_type:"cardinal";return e.isSplineType(t)?n:e.isStepType(t)?e.config.line_step_type:"linear"},f.initLine=function(){var t=this;t.main.select("."+p.chart).append("g").attr("class",p.chartLines)},f.updateTargetsForLine=function(t){var e,n,r=this,i=r.config,a=r.classChartLine.bind(r),o=r.classLines.bind(r),s=r.classAreas.bind(r),u=r.classCircles.bind(r),l=r.classFocus.bind(r);e=r.main.select("."+p.chartLines).selectAll("."+p.chartLine).data(t).attr("class",function(t){return a(t)+l(t)}),n=e.enter().append("g").attr("class",a).style("opacity",0).style("pointer-events","none"),n.append("g").attr("class",o),n.append("g").attr("class",s),n.append("g").attr("class",function(t){return r.generateClass(p.selectedCircles,t.id)}),n.append("g").attr("class",u).style("cursor",function(t){return i.data_selection_isselectable(t)?"pointer":null}),t.forEach(function(t){r.main.selectAll("."+p.selectedCircles+r.getTargetSelectorSuffix(t.id)).selectAll("."+p.selectedCircle).each(function(e){e.value=t.values[e.index].value})})},f.updateLine=function(t){var e=this;e.mainLine=e.main.selectAll("."+p.lines).selectAll("."+p.line).data(e.lineData.bind(e)),e.mainLine.enter().append("path").attr("class",e.classLine.bind(e)).style("stroke",e.color),e.mainLine.style("opacity",e.initialOpacity.bind(e)).style("shape-rendering",function(t){return e.isStepType(t)?"crispEdges":""}).attr("transform",null),e.mainLine.exit().transition().duration(t).style("opacity",0).remove()},f.redrawLine=function(t,e){return[(e?this.mainLine.transition(Math.random().toString()):this.mainLine).attr("d",t).style("stroke",this.color).style("opacity",1)]},f.generateDrawLine=function(t,e){var n=this,r=n.config,i=n.d3.svg.line(),a=n.generateGetLinePoints(t,e),o=e?n.getSubYScale:n.getYScale,s=function(t){return(e?n.subxx:n.xx).call(n,t)},u=function(t,e){return r.data_groups.length>0?a(t,e)[0][1]:o.call(n,t.id)(t.value)};return i=r.axis_rotated?i.x(u).y(s):i.x(s).y(u),r.line_connectNull||(i=i.defined(function(t){return null!=t.value})),function(t){var a,s=r.line_connectNull?n.filterRemoveNull(t.values):t.values,u=e?n.x:n.subX,l=o.call(n,t.id),c=0,d=0;return n.isLineType(t)?r.data_regions[t.id]?a=n.lineWithRegions(s,u,l,r.data_regions[t.id]):(n.isStepType(t)&&(s=n.convertValuesToStep(s)),a=i.interpolate(n.getInterpolate(t))(s)):(s[0]&&(c=u(s[0].x),d=l(s[0].value)),a=r.axis_rotated?"M "+d+" "+c:"M "+c+" "+d),a?a:"M 0 0"}},f.generateGetLinePoints=function(t,e){var n=this,r=n.config,i=t.__max__+1,a=n.getShapeX(0,i,t,!!e),o=n.getShapeY(!!e),s=n.getShapeOffset(n.isLineType,t,!!e),u=e?n.getSubYScale:n.getYScale;return function(t,e){var i=u.call(n,t.id)(0),l=s(t,e)||i,c=a(t),d=o(t);return r.axis_rotated&&(00?a(t,e)[0][1]:o.call(n,t.id)(n.getAreaBaseValue(t.id))},l=function(t,e){return r.data_groups.length>0?a(t,e)[1][1]:o.call(n,t.id)(t.value)};return i=r.axis_rotated?i.x0(u).x1(l).y(s):i.x(s).y0(r.area_above?0:u).y1(l),r.line_connectNull||(i=i.defined(function(t){return null!==t.value})),function(t){var e,a=r.line_connectNull?n.filterRemoveNull(t.values):t.values,o=0,s=0;return n.isAreaType(t)?(n.isStepType(t)&&(a=n.convertValuesToStep(a)),e=i.interpolate(n.getInterpolate(t))(a)):(a[0]&&(o=n.x(a[0].x),s=n.getYScale(t.id)(a[0].value)),e=r.axis_rotated?"M "+s+" "+o:"M "+o+" "+s),e?e:"M 0 0"}},f.getAreaBaseValue=function(){return 0},f.generateGetAreaPoints=function(t,e){var n=this,r=n.config,i=t.__max__+1,a=n.getShapeX(0,i,t,!!e),o=n.getShapeY(!!e),s=n.getShapeOffset(n.isAreaType,t,!!e),u=e?n.getSubYScale:n.getYScale;return function(t,e){var i=u.call(n,t.id)(0),l=s(t,e)||i,c=a(t),d=o(t);return r.axis_rotated&&(00?(t=n.getShapeIndices(n.isLineType),e=n.generateGetLinePoints(t),n.circleY=function(t,n){return e(t,n)[0][1]}):n.circleY=function(t){return n.getYScale(t.id)(t.value)}},f.getCircles=function(t,e){var n=this;return(e?n.main.selectAll("."+p.circles+n.getTargetSelectorSuffix(e)):n.main).selectAll("."+p.circle+(g(t)?"-"+t:""))},f.expandCircles=function(t,e,n){var r=this,i=r.pointExpandedR.bind(r);n&&r.unexpandCircles(),r.getCircles(t,e).classed(p.EXPANDED,!0).attr("r",i)},f.unexpandCircles=function(t){var e=this,n=e.pointR.bind(e);e.getCircles(t).filter(function(){return e.d3.select(this).classed(p.EXPANDED)}).classed(p.EXPANDED,!1).attr("r",n)},f.pointR=function(t){var e=this,n=e.config;return e.isStepType(t)?0:y(n.point_r)?n.point_r(t):n.point_r},f.pointExpandedR=function(t){var e=this,n=e.config;return n.point_focus_expand_enabled?n.point_focus_expand_r?n.point_focus_expand_r:1.75*e.pointR(t):e.pointR(t)},f.pointSelectR=function(t){var e=this,n=e.config;return y(n.point_select_r)?n.point_select_r(t):n.point_select_r?n.point_select_r:4*e.pointR(t)},f.isWithinCircle=function(t,e){var n=this.d3,r=n.mouse(t),i=n.select(t),a=+i.attr("cx"),o=+i.attr("cy");return Math.sqrt(Math.pow(a-r[0],2)+Math.pow(o-r[1],2))r.bar_width_max?r.bar_width_max:i},f.getBars=function(t,e){var n=this;return(e?n.main.selectAll("."+p.bars+n.getTargetSelectorSuffix(e)):n.main).selectAll("."+p.bar+(g(t)?"-"+t:""))},f.expandBars=function(t,e,n){var r=this;n&&r.unexpandBars(),r.getBars(t,e).classed(p.EXPANDED,!0); },f.unexpandBars=function(t){var e=this;e.getBars(t).classed(p.EXPANDED,!1)},f.generateDrawBar=function(t,e){var n=this,r=n.config,i=n.generateGetBarPoints(t,e);return function(t,e){var n=i(t,e),a=r.axis_rotated?1:0,o=r.axis_rotated?0:1,s="M "+n[0][a]+","+n[0][o]+" L"+n[1][a]+","+n[1][o]+" L"+n[2][a]+","+n[2][o]+" L"+n[3][a]+","+n[3][o]+" z";return s}},f.generateGetBarPoints=function(t,e){var n=this,r=e?n.subXAxis:n.xAxis,i=t.__max__+1,a=n.getBarW(r,i),o=n.getShapeX(a,i,t,!!e),s=n.getShapeY(!!e),u=n.getShapeOffset(n.isBarType,t,!!e),l=e?n.getSubYScale:n.getYScale;return function(t,e){var r=l.call(n,t.id)(0),i=u(t,e)||r,c=o(t),d=s(t);return n.config.axis_rotated&&(0a.width?r=a.width-o.width:r<0&&(r=4)),r},f.getYForText=function(t,e,n){var r,i=this,a=n.getBoundingClientRect();return i.config.axis_rotated?r=(t[0][0]+t[2][0]+.6*a.height)/2:(r=t[2][1],e.value<0||0===e.value&&!i.hasPositiveValue?(r+=a.height,i.isBarType(e)&&i.isSafari()?r-=3:!i.isBarType(e)&&i.isChrome()&&(r+=3)):r+=i.isBarType(e)?-3:-6),null!==e.value||i.config.axis_rotated||(rthis.height&&(r=this.height-4)),r},f.setTargetType=function(t,e){var n=this,r=n.config;n.mapToTargetIds(t).forEach(function(t){n.withoutFadeIn[t]=e===r.data_types[t],r.data_types[t]=e}),t||(r.data_type=e)},f.hasType=function(t,e){var n=this,r=n.config.data_types,i=!1;return e=e||n.data.targets,e&&e.length?e.forEach(function(e){var n=r[e.id];(n&&n.indexOf(t)>=0||!n&&"line"===t)&&(i=!0)}):Object.keys(r).length?Object.keys(r).forEach(function(e){r[e]===t&&(i=!0)}):i=n.config.data_type===t,i},f.hasArcType=function(t){return this.hasType("pie",t)||this.hasType("donut",t)||this.hasType("gauge",t)},f.isLineType=function(t){var e=this.config,n=v(t)?t:t.id;return!e.data_types[n]||["line","spline","area","area-spline","step","area-step"].indexOf(e.data_types[n])>=0},f.isStepType=function(t){var e=v(t)?t:t.id;return["step","area-step"].indexOf(this.config.data_types[e])>=0},f.isSplineType=function(t){var e=v(t)?t:t.id;return["spline","area-spline"].indexOf(this.config.data_types[e])>=0},f.isAreaType=function(t){var e=v(t)?t:t.id;return["area","area-spline","area-step"].indexOf(this.config.data_types[e])>=0},f.isBarType=function(t){var e=v(t)?t:t.id;return"bar"===this.config.data_types[e]},f.isScatterType=function(t){var e=v(t)?t:t.id;return"scatter"===this.config.data_types[e]},f.isPieType=function(t){var e=v(t)?t:t.id;return"pie"===this.config.data_types[e]},f.isGaugeType=function(t){var e=v(t)?t:t.id;return"gauge"===this.config.data_types[e]},f.isDonutType=function(t){var e=v(t)?t:t.id;return"donut"===this.config.data_types[e]},f.isArcType=function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)},f.lineData=function(t){return this.isLineType(t)?[t]:[]},f.arcData=function(t){return this.isArcType(t.data)?[t]:[]},f.barData=function(t){return this.isBarType(t)?t.values:[]},f.lineOrScatterData=function(t){return this.isLineType(t)||this.isScatterType(t)?t.values:[]},f.barOrLineData=function(t){return this.isBarType(t)||this.isLineType(t)?t.values:[]},f.isInterpolationType=function(t){return["linear","linear-closed","basis","basis-open","basis-closed","bundle","cardinal","cardinal-open","cardinal-closed","monotone"].indexOf(t)>=0},f.initGrid=function(){var t=this,e=t.config,n=t.d3;t.grid=t.main.append("g").attr("clip-path",t.clipPathForGrid).attr("class",p.grid),e.grid_x_show&&t.grid.append("g").attr("class",p.xgrids),e.grid_y_show&&t.grid.append("g").attr("class",p.ygrids),e.grid_focus_show&&t.grid.append("g").attr("class",p.xgridFocus).append("line").attr("class",p.xgridFocus),t.xgrid=n.selectAll([]),e.grid_lines_front||t.initGridLines()},f.initGridLines=function(){var t=this,e=t.d3;t.gridLines=t.main.append("g").attr("clip-path",t.clipPathForGrid).attr("class",p.grid+" "+p.gridLines),t.gridLines.append("g").attr("class",p.xgridLines),t.gridLines.append("g").attr("class",p.ygridLines),t.xgridLines=e.selectAll([])},f.updateXGrid=function(t){var e=this,n=e.config,r=e.d3,i=e.generateGridData(n.grid_x_type,e.x),a=e.isCategorized()?e.xAxis.tickOffset():0;e.xgridAttr=n.axis_rotated?{x1:0,x2:e.width,y1:function(t){return e.x(t)-a},y2:function(t){return e.x(t)-a}}:{x1:function(t){return e.x(t)+a},x2:function(t){return e.x(t)+a},y1:0,y2:e.height},e.xgrid=e.main.select("."+p.xgrids).selectAll("."+p.xgrid).data(i),e.xgrid.enter().append("line").attr("class",p.xgrid),t||e.xgrid.attr(e.xgridAttr).style("opacity",function(){return+r.select(this).attr(n.axis_rotated?"y1":"x1")===(n.axis_rotated?e.height:0)?0:1}),e.xgrid.exit().remove()},f.updateYGrid=function(){var t=this,e=t.config,n=t.yAxis.tickValues()||t.y.ticks(e.grid_y_ticks);t.ygrid=t.main.select("."+p.ygrids).selectAll("."+p.ygrid).data(n),t.ygrid.enter().append("line").attr("class",p.ygrid),t.ygrid.attr("x1",e.axis_rotated?t.y:0).attr("x2",e.axis_rotated?t.y:t.width).attr("y1",e.axis_rotated?0:t.y).attr("y2",e.axis_rotated?t.height:t.y),t.ygrid.exit().remove(),t.smoothLines(t.ygrid,"grid")},f.gridTextAnchor=function(t){return t.position?t.position:"end"},f.gridTextDx=function(t){return"start"===t.position?4:"middle"===t.position?0:-4},f.xGridTextX=function(t){return"start"===t.position?-this.height:"middle"===t.position?-this.height/2:0},f.yGridTextX=function(t){return"start"===t.position?0:"middle"===t.position?this.width/2:this.width},f.updateGrid=function(t){var e,n,r,i=this,a=i.main,o=i.config;i.grid.style("visibility",i.hasArcType()?"hidden":"visible"),a.select("line."+p.xgridFocus).style("visibility","hidden"),o.grid_x_show&&i.updateXGrid(),i.xgridLines=a.select("."+p.xgridLines).selectAll("."+p.xgridLine).data(o.grid_x_lines),e=i.xgridLines.enter().append("g").attr("class",function(t){return p.xgridLine+(t.class?" "+t.class:"")}),e.append("line").style("opacity",0),e.append("text").attr("text-anchor",i.gridTextAnchor).attr("transform",o.axis_rotated?"":"rotate(-90)").attr("dx",i.gridTextDx).attr("dy",-5).style("opacity",0),i.xgridLines.exit().transition().duration(t).style("opacity",0).remove(),o.grid_y_show&&i.updateYGrid(),i.ygridLines=a.select("."+p.ygridLines).selectAll("."+p.ygridLine).data(o.grid_y_lines),n=i.ygridLines.enter().append("g").attr("class",function(t){return p.ygridLine+(t.class?" "+t.class:"")}),n.append("line").style("opacity",0),n.append("text").attr("text-anchor",i.gridTextAnchor).attr("transform",o.axis_rotated?"rotate(-90)":"").attr("dx",i.gridTextDx).attr("dy",-5).style("opacity",0),r=i.yv.bind(i),i.ygridLines.select("line").transition().duration(t).attr("x1",o.axis_rotated?r:0).attr("x2",o.axis_rotated?r:i.width).attr("y1",o.axis_rotated?0:r).attr("y2",o.axis_rotated?i.height:r).style("opacity",1),i.ygridLines.select("text").transition().duration(t).attr("x",o.axis_rotated?i.xGridTextX.bind(i):i.yGridTextX.bind(i)).attr("y",r).text(function(t){return t.text}).style("opacity",1),i.ygridLines.exit().transition().duration(t).style("opacity",0).remove()},f.redrawGrid=function(t){var e=this,n=e.config,r=e.xv.bind(e),i=e.xgridLines.select("line"),a=e.xgridLines.select("text");return[(t?i.transition():i).attr("x1",n.axis_rotated?0:r).attr("x2",n.axis_rotated?e.width:r).attr("y1",n.axis_rotated?r:0).attr("y2",n.axis_rotated?r:e.height).style("opacity",1),(t?a.transition():a).attr("x",n.axis_rotated?e.yGridTextX.bind(e):e.xGridTextX.bind(e)).attr("y",r).text(function(t){return t.text}).style("opacity",1)]},f.showXGridFocus=function(t){var e=this,n=e.config,r=t.filter(function(t){return t&&g(t.value)}),i=e.main.selectAll("line."+p.xgridFocus),a=e.xx.bind(e);n.tooltip_show&&(e.hasType("scatter")||e.hasArcType()||(i.style("visibility","visible").data([r[0]]).attr(n.axis_rotated?"y1":"x1",a).attr(n.axis_rotated?"y2":"x2",a),e.smoothLines(i,"grid")))},f.hideXGridFocus=function(){this.main.select("line."+p.xgridFocus).style("visibility","hidden")},f.updateXgridFocus=function(){var t=this,e=t.config;t.main.select("line."+p.xgridFocus).attr("x1",e.axis_rotated?0:-10).attr("x2",e.axis_rotated?t.width:-10).attr("y1",e.axis_rotated?-10:0).attr("y2",e.axis_rotated?-10:t.height)},f.generateGridData=function(t,e){var n,r,i,a,o=this,s=[],u=o.main.select("."+p.axisX).selectAll(".tick").size();if("year"===t)for(n=o.getXDomain(),r=n[0].getFullYear(),i=n[1].getFullYear(),a=r;a<=i;a++)s.push(new Date(a+"-01-01 00:00:00"));else s=e.ticks(10),s.length>u&&(s=s.filter(function(t){return(""+t).indexOf(".")<0}));return s},f.getGridFilterToRemove=function(t){return t?function(e){var n=!1;return[].concat(t).forEach(function(t){("value"in t&&e.value===t.value||"class"in t&&e.class===t.class)&&(n=!0)}),n}:function(){return!0}},f.removeGridLines=function(t,e){var n=this,r=n.config,i=n.getGridFilterToRemove(t),a=function(t){return!i(t)},o=e?p.xgridLines:p.ygridLines,s=e?p.xgridLine:p.ygridLine;n.main.select("."+o).selectAll("."+s).filter(i).transition().duration(r.transition_duration).style("opacity",0).remove(),e?r.grid_x_lines=r.grid_x_lines.filter(a):r.grid_y_lines=r.grid_y_lines.filter(a)},f.initTooltip=function(){var t,e=this,n=e.config;if(e.tooltip=e.selectChart.style("position","relative").append("div").attr("class",p.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none"),n.tooltip_init_show){if(e.isTimeSeries()&&v(n.tooltip_init_x)){for(n.tooltip_init_x=e.parseDate(n.tooltip_init_x),t=0;t0&&r>0&&(n=t?p.indexOf(t.id):null,r=e?p.indexOf(e.id):null),m?n-r:r-n})}for(a=0;a"+(o||0===o?""+o+"":"")),s=D(_(t[a].value,t[a].ratio,t[a].id,t[a].index,t)),void 0!==s)){if(null===t[a].name)continue;u=D(f(t[a].name,t[a].ratio,t[a].id,t[a].index)),l=c.levelColor?c.levelColor(t[a].value):r(t[a].id),i+="",i+=""+u+"",i+=""+s+"",i+=""}return i+""},f.tooltipPosition=function(t,e,n,r){var i,a,o,s,u,l=this,c=l.config,d=l.d3,h=l.hasArcType(),f=d.mouse(r);return h?(a=(l.width-(l.isLegendRight?l.getLegendWidth():0))/2+f[0],s=l.height/2+f[1]+20):(i=l.getSvgLeft(!0),c.axis_rotated?(a=i+f[0]+100,o=a+e,u=l.currentWidth-l.getCurrentPaddingRight(),s=l.x(t[0].x)+20):(a=i+l.getCurrentPaddingLeft(!0)+l.x(t[0].x)+20,o=a+e,u=i+l.currentWidth-l.getCurrentPaddingRight(),s=f[1]+15),o>u&&(a-=o-u+20),s+n>l.currentHeight&&(s-=n+30)),s<0&&(s=0),{top:s,left:a}},f.showTooltip=function(t,e){var n,r,i,a=this,o=a.config,s=a.hasArcType(),u=t.filter(function(t){return t&&g(t.value)}),l=o.tooltip_position||f.tooltipPosition;0!==u.length&&o.tooltip_show&&(a.tooltip.html(o.tooltip_contents.call(a,t,a.axis.getXAxisTickFormat(),a.getYFormat(s),a.color)).style("display","block"),n=a.tooltip.property("offsetWidth"),r=a.tooltip.property("offsetHeight"),i=l.call(this,u,n,r,e),a.tooltip.style("top",i.top+"px").style("left",i.left+"px"))},f.hideTooltip=function(){this.tooltip.style("display","none")},f.initLegend=function(){var t=this;return t.legendItemTextBox={},t.legendHasRendered=!1,t.legend=t.svg.append("g").attr("transform",t.getTranslate("legend")),t.config.legend_show?void t.updateLegendWithDefaults():(t.legend.style("visibility","hidden"),void(t.hiddenLegendIds=t.mapToIds(t.data.targets)))},f.updateLegendWithDefaults=function(){var t=this;t.updateLegend(t.mapToIds(t.data.targets),{withTransform:!1,withTransitionForTransform:!1,withTransition:!1})},f.updateSizeForLegend=function(t,e){var n=this,r=n.config,i={top:n.isLegendTop?n.getCurrentPaddingTop()+r.legend_inset_y+5.5:n.currentHeight-t-n.getCurrentPaddingBottom()-r.legend_inset_y,left:n.isLegendLeft?n.getCurrentPaddingLeft()+r.legend_inset_x+.5:n.currentWidth-e-n.getCurrentPaddingRight()-r.legend_inset_x+.5};n.margin3={top:n.isLegendRight?0:n.isLegendInset?i.top:n.currentHeight-t,right:NaN,bottom:0,left:n.isLegendRight?n.currentWidth-e:n.isLegendInset?i.left:0}},f.transformLegend=function(t){var e=this;(t?e.legend.transition():e.legend).attr("transform",e.getTranslate("legend"))},f.updateLegendStep=function(t){this.legendStep=t},f.updateLegendItemWidth=function(t){this.legendItemWidth=t},f.updateLegendItemHeight=function(t){this.legendItemHeight=t},f.getLegendWidth=function(){var t=this;return t.config.legend_show?t.isLegendRight||t.isLegendInset?t.legendItemWidth*(t.legendStep+1):t.currentWidth:0},f.getLegendHeight=function(){var t=this,e=0;return t.config.legend_show&&(e=t.isLegendRight?t.currentHeight:Math.max(20,t.legendItemHeight)*(t.legendStep+1)),e},f.opacityForLegend=function(t){return t.classed(p.legendItemHidden)?null:1},f.opacityForUnfocusedLegend=function(t){return t.classed(p.legendItemHidden)?null:.3},f.toggleFocusLegend=function(t,e){var n=this;t=n.mapToTargetIds(t),n.legend.selectAll("."+p.legendItem).filter(function(e){return t.indexOf(e)>=0}).classed(p.legendItemFocused,e).transition().duration(100).style("opacity",function(){var t=e?n.opacityForLegend:n.opacityForUnfocusedLegend;return t.call(n,n.d3.select(this))})},f.revertLegend=function(){var t=this,e=t.d3;t.legend.selectAll("."+p.legendItem).classed(p.legendItemFocused,!1).transition().duration(100).style("opacity",function(){return t.opacityForLegend(e.select(this))})},f.showLegend=function(t){var e=this,n=e.config;n.legend_show||(n.legend_show=!0,e.legend.style("visibility","visible"),e.legendHasRendered||e.updateLegendWithDefaults()),e.removeHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("visibility","visible").transition().style("opacity",function(){return e.opacityForLegend(e.d3.select(this))})},f.hideLegend=function(t){var e=this,n=e.config;n.legend_show&&T(t)&&(n.legend_show=!1,e.legend.style("visibility","hidden")),e.addHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("opacity",0).style("visibility","hidden")},f.clearLegendItemTextBoxCache=function(){this.legendItemTextBox={}},f.updateLegend=function(t,e,n){function r(t,e){return b.legendItemTextBox[e]||(b.legendItemTextBox[e]=b.getTextRect(t.textContent,p.legendItem,t)),b.legendItemTextBox[e]}function i(e,n,i){function a(t,e){e||(o=(_-O-f)/2,o=k)&&(k=d),(!D||h>=D)&&(D=h),s=b.isLegendRight||b.isLegendInset?D:k,void(S.legend_equally?(Object.keys(H).forEach(function(t){H[t]=k}),Object.keys(j).forEach(function(t){j[t]=D}),o=(_-s*t.length)/2,o0&&0===L.size()&&(L=b.legend.insert("g","."+p.legendItem).attr("class",p.legendBackground).append("rect")),y=b.legend.selectAll("text").data(t).text(function(t){return x(S.data_names[t])?S.data_names[t]:t}).each(function(t,e){i(this,t,e)}),(m?y.transition():y).attr("x",o).attr("y",l),v=b.legend.selectAll("rect."+p.legendItemEvent).data(t),(m?v.transition():v).attr("width",function(t){return H[t]}).attr("height",function(t){return j[t]}).attr("x",s).attr("y",c),M=b.legend.selectAll("line."+p.legendItemTile).data(t),(m?M.transition():M).style("stroke",b.color).attr("x1",d).attr("y1",f).attr("x2",h).attr("y2",f),L&&(m?L.transition():L).attr("height",b.getLegendHeight()-12).attr("width",k*(V+1)+10),b.legend.selectAll("."+p.legendItem).classed(p.legendItemHidden,function(t){return!b.isTargetToShow(t)}),b.updateLegendItemWidth(k),b.updateLegendItemHeight(D),b.updateLegendStep(V),b.updateSizes(),b.updateScales(),b.updateSvgSize(),b.transformAll(g,n),b.legendHasRendered=!0},f.initTitle=function(){var t=this;t.title=t.svg.append("text").text(t.config.title_text).attr("class",t.CLASS.title)},f.redrawTitle=function(){var t=this;t.title.attr("x",t.xForTitle.bind(t)).attr("y",t.yForTitle.bind(t))},f.xForTitle=function(){var t,e=this,n=e.config,r=n.title_position||"left";return t=r.indexOf("right")>=0?e.currentWidth-e.getTextRect(e.title.node().textContent,e.CLASS.title,e.title.node()).width-n.title_padding.right:r.indexOf("center")>=0?(e.currentWidth-e.getTextRect(e.title.node().textContent,e.CLASS.title,e.title.node()).width)/2:n.title_padding.left},f.yForTitle=function(){var t=this;return t.config.title_padding.top+t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node()).height},f.getTitlePadding=function(){var t=this;return t.yForTitle()+t.config.title_padding.bottom},s(o,c),c.prototype.init=function(){var t=this.owner,e=t.config,n=t.main;t.axes.x=n.append("g").attr("class",p.axis+" "+p.axisX).attr("clip-path",t.clipPathForXAxis).attr("transform",t.getTranslate("x")).style("visibility",e.axis_x_show?"visible":"hidden"),t.axes.x.append("text").attr("class",p.axisXLabel).attr("transform",e.axis_rotated?"rotate(-90)":"").style("text-anchor",this.textAnchorForXAxisLabel.bind(this)),t.axes.y=n.append("g").attr("class",p.axis+" "+p.axisY).attr("clip-path",e.axis_y_inner?"":t.clipPathForYAxis).attr("transform",t.getTranslate("y")).style("visibility",e.axis_y_show?"visible":"hidden"),t.axes.y.append("text").attr("class",p.axisYLabel).attr("transform",e.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForYAxisLabel.bind(this)),t.axes.y2=n.append("g").attr("class",p.axis+" "+p.axisY2).attr("transform",t.getTranslate("y2")).style("visibility",e.axis_y2_show?"visible":"hidden"),t.axes.y2.append("text").attr("class",p.axisY2Label).attr("transform",e.axis_rotated?"":"rotate(-90)").style("text-anchor",this.textAnchorForY2AxisLabel.bind(this))},c.prototype.getXAxis=function(t,e,n,r,i,a,o){var s=this.owner,u=s.config,l={isCategory:s.isCategorized(),withOuterTick:i,tickMultiline:u.axis_x_tick_multiline,tickWidth:u.axis_x_tick_width,tickTextRotate:o?0:u.axis_x_tick_rotate,withoutTransition:a},c=d(s.d3,l).scale(t).orient(e);return s.isTimeSeries()&&r&&"function"!=typeof r&&(r=r.map(function(t){return s.parseDate(t)})),c.tickFormat(n).tickValues(r),s.isCategorized()&&(c.tickCentered(u.axis_x_tick_centered),T(u.axis_x_tick_culling)&&(u.axis_x_tick_culling=!1)),c},c.prototype.updateXAxisTickValues=function(t,e){var n,r=this.owner,i=r.config;return(i.axis_x_tick_fit||i.axis_x_tick_count)&&(n=this.generateTickValues(r.mapTargetsToUniqueXs(t),i.axis_x_tick_count,r.isTimeSeries())),e?e.tickValues(n):(r.xAxis.tickValues(n),r.subXAxis.tickValues(n)),n},c.prototype.getYAxis=function(t,e,n,r,i,a,o){var s=this.owner,u=s.config,l={withOuterTick:i,withoutTransition:a,tickTextRotate:o?0:u.axis_y_tick_rotate},c=d(s.d3,l).scale(t).orient(e).tickFormat(n);return s.isTimeSeriesY()?c.ticks(s.d3.time[u.axis_y_tick_time_value],u.axis_y_tick_time_interval):c.tickValues(r),c},c.prototype.getId=function(t){var e=this.owner.config;return t in e.data_axes?e.data_axes[t]:"y"},c.prototype.getXAxisTickFormat=function(){var t=this.owner,e=t.config,n=t.isTimeSeries()?t.defaultAxisTimeFormat:t.isCategorized()?t.categoryName:function(t){return t<0?t.toFixed(0):t};return e.axis_x_tick_format&&(y(e.axis_x_tick_format)?n=e.axis_x_tick_format:t.isTimeSeries()&&(n=function(n){return n?t.axisTimeFormat(e.axis_x_tick_format)(n):""})),y(n)?function(e){return n.call(t,e)}:n},c.prototype.getTickValues=function(t,e){return t?t:e?e.tickValues():void 0},c.prototype.getXAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_x_tick_values,this.owner.xAxis)},c.prototype.getYAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y_tick_values,this.owner.yAxis)},c.prototype.getY2AxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y2_tick_values,this.owner.y2Axis)},c.prototype.getLabelOptionByAxisId=function(t){var e,n=this.owner,r=n.config;return"y"===t?e=r.axis_y_label:"y2"===t?e=r.axis_y2_label:"x"===t&&(e=r.axis_x_label),e},c.prototype.getLabelText=function(t){var e=this.getLabelOptionByAxisId(t);return v(e)?e:e?e.text:null},c.prototype.setLabelText=function(t,e){var n=this.owner,r=n.config,i=this.getLabelOptionByAxisId(t);v(i)?"y"===t?r.axis_y_label=e:"y2"===t?r.axis_y2_label=e:"x"===t&&(r.axis_x_label=e):i&&(i.text=e)},c.prototype.getLabelPosition=function(t,e){var n=this.getLabelOptionByAxisId(t),r=n&&"object"==typeof n&&n.position?n.position:e;return{isInner:r.indexOf("inner")>=0,isOuter:r.indexOf("outer")>=0,isLeft:r.indexOf("left")>=0,isCenter:r.indexOf("center")>=0,isRight:r.indexOf("right")>=0,isTop:r.indexOf("top")>=0,isMiddle:r.indexOf("middle")>=0,isBottom:r.indexOf("bottom")>=0}},c.prototype.getXAxisLabelPosition=function(){return this.getLabelPosition("x",this.owner.config.axis_rotated?"inner-top":"inner-right")},c.prototype.getYAxisLabelPosition=function(){return this.getLabelPosition("y",this.owner.config.axis_rotated?"inner-right":"inner-top")},c.prototype.getY2AxisLabelPosition=function(){return this.getLabelPosition("y2",this.owner.config.axis_rotated?"inner-right":"inner-top")},c.prototype.getLabelPositionById=function(t){return"y2"===t?this.getY2AxisLabelPosition():"y"===t?this.getYAxisLabelPosition():this.getXAxisLabelPosition()},c.prototype.textForXAxisLabel=function(){return this.getLabelText("x")},c.prototype.textForYAxisLabel=function(){return this.getLabelText("y")},c.prototype.textForY2AxisLabel=function(){return this.getLabelText("y2")},c.prototype.xForAxisLabel=function(t,e){var n=this.owner;return t?e.isLeft?0:e.isCenter?n.width/2:n.width:e.isBottom?-n.height:e.isMiddle?-n.height/2:0},c.prototype.dxForAxisLabel=function(t,e){return t?e.isLeft?"0.5em":e.isRight?"-0.5em":"0":e.isTop?"-0.5em":e.isBottom?"0.5em":"0"},c.prototype.textAnchorForAxisLabel=function(t,e){return t?e.isLeft?"start":e.isCenter?"middle":"end":e.isBottom?"start":e.isMiddle?"middle":"end"},c.prototype.xForXAxisLabel=function(){return this.xForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},c.prototype.xForYAxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},c.prototype.xForY2AxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},c.prototype.dxForXAxisLabel=function(){return this.dxForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},c.prototype.dxForYAxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},c.prototype.dxForY2AxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},c.prototype.dyForXAxisLabel=function(){var t=this.owner,e=t.config,n=this.getXAxisLabelPosition();return e.axis_rotated?n.isInner?"1.2em":-25-this.getMaxTickWidth("x"):n.isInner?"-0.5em":e.axis_x_height?e.axis_x_height-10:"3em"},c.prototype.dyForYAxisLabel=function(){var t=this.owner,e=this.getYAxisLabelPosition();return t.config.axis_rotated?e.isInner?"-0.5em":"3em":e.isInner?"1.2em":-10-(t.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)},c.prototype.dyForY2AxisLabel=function(){var t=this.owner,e=this.getY2AxisLabelPosition();return t.config.axis_rotated?e.isInner?"1.2em":"-2.2em":e.isInner?"-0.5em":15+(t.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)},c.prototype.textAnchorForXAxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(!t.config.axis_rotated,this.getXAxisLabelPosition())},c.prototype.textAnchorForYAxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(t.config.axis_rotated,this.getYAxisLabelPosition())},c.prototype.textAnchorForY2AxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(t.config.axis_rotated,this.getY2AxisLabelPosition())},c.prototype.getMaxTickWidth=function(t,e){var n,r,i,a,o,s=this.owner,u=s.config,l=0;return e&&s.currentMaxTickWidths[t]?s.currentMaxTickWidths[t]:(s.svg&&(n=s.filterTargetsToShow(s.data.targets),"y"===t?(r=s.y.copy().domain(s.getYDomain(n,"y")),i=this.getYAxis(r,s.yOrient,u.axis_y_tick_format,s.yAxisTickValues,!1,!0,!0)):"y2"===t?(r=s.y2.copy().domain(s.getYDomain(n,"y2")),i=this.getYAxis(r,s.y2Orient,u.axis_y2_tick_format,s.y2AxisTickValues,!1,!0,!0)):(r=s.x.copy().domain(s.getXDomain(n)),i=this.getXAxis(r,s.xOrient,s.xAxisTickFormat,s.xAxisTickValues,!1,!0,!0),this.updateXAxisTickValues(n,i)),a=s.d3.select("body").append("div").classed("c3",!0),o=a.append("svg").style("visibility","hidden").style("position","fixed").style("top",0).style("left",0),o.append("g").call(i).each(function(){s.d3.select(this).selectAll("text").each(function(){var t=this.getBoundingClientRect();l2){for(o=r-2,i=t[0],a=t[t.length-1],s=(a-i)/(o+1),c=[i],u=0;u=0;return"url("+(e?"":document.URL.split("#")[0])+"#"+t+")"},f.appendClip=function(t,e){return t.append("clipPath").attr("id",e).append("rect")},f.getAxisClipX=function(t){var e=Math.max(30,this.margin.left);return t?-(1+e):-(e-1)},f.getAxisClipY=function(t){return t?-20:-this.margin.top},f.getXAxisClipX=function(){var t=this;return t.getAxisClipX(!t.config.axis_rotated)},f.getXAxisClipY=function(){var t=this;return t.getAxisClipY(!t.config.axis_rotated)},f.getYAxisClipX=function(){var t=this;return t.config.axis_y_inner?-1:t.getAxisClipX(t.config.axis_rotated)},f.getYAxisClipY=function(){var t=this;return t.getAxisClipY(t.config.axis_rotated)},f.getAxisClipWidth=function(t){var e=this,n=Math.max(30,e.margin.left),r=Math.max(30,e.margin.right);return t?e.width+2+n+r:e.margin.left+20},f.getAxisClipHeight=function(t){return(t?this.margin.bottom:this.margin.top+this.height)+20},f.getXAxisClipWidth=function(){var t=this;return t.getAxisClipWidth(!t.config.axis_rotated)},f.getXAxisClipHeight=function(){var t=this;return t.getAxisClipHeight(!t.config.axis_rotated)},f.getYAxisClipWidth=function(){var t=this;return t.getAxisClipWidth(t.config.axis_rotated)+(t.config.axis_y_inner?20:0)},f.getYAxisClipHeight=function(){var t=this;return t.getAxisClipHeight(t.config.axis_rotated)},f.initPie=function(){var t=this,e=t.d3,n=t.config;t.pie=e.layout.pie().value(function(t){return t.values.reduce(function(t,e){return t+e.value},0)}),n.data_order||t.pie.sort(null)},f.updateRadius=function(){var t=this,e=t.config,n=e.gauge_width||e.donut_width;t.radiusExpanded=Math.min(t.arcWidth,t.arcHeight)/2,t.radius=.95*t.radiusExpanded,t.innerRadiusRatio=n?(t.radius-n)/t.radius:.6,t.innerRadius=t.hasType("donut")||t.hasType("gauge")?t.radius*t.innerRadiusRatio:0},f.updateArc=function(){var t=this;t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded(),t.svgArcExpandedSub=t.getSvgArcExpanded(.98)},f.updateAngle=function(t){var e,n,r,i,a=this,o=a.config,s=!1,u=0;return o?(a.pie(a.filterTargetsToShow(a.data.targets)).forEach(function(e){s||e.data.id!==t.data.id||(s=!0,t=e,t.index=u),u++}),isNaN(t.startAngle)&&(t.startAngle=0),isNaN(t.endAngle)&&(t.endAngle=t.startAngle),a.isGaugeType(t.data)&&(e=o.gauge_min,n=o.gauge_max,r=Math.PI*(o.gauge_fullCircle?2:1)/(n-e),i=t.value.375?1.175-36/o.radius:.8)*o.radius/i:0,l="translate("+n*a+","+r*a+")"),l},f.getArcRatio=function(t){var e=this,n=e.config,r=Math.PI*(e.hasType("gauge")&&!n.gauge_fullCircle?1:2);return t?(t.endAngle-t.startAngle)/r:null},f.convertToArcData=function(t){return this.addName({id:t.data.id,value:t.value,ratio:this.getArcRatio(t),index:t.index})},f.textForArcLabel=function(t){var e,n,r,i,a,o=this;return o.shouldShowArcLabel()?(e=o.updateAngle(t),n=e?e.value:null,r=o.getArcRatio(e),i=t.data.id,o.hasType("gauge")||o.meetsArcLabelThreshold(r)?(a=o.getArcLabelFormat(),a?a(n,r,i):o.defaultArcValueFormat(n,r)):""):""},f.expandArc=function(t){var e,n=this;return n.transiting?void(e=a.setInterval(function(){n.transiting||(a.clearInterval(e),n.legend.selectAll(".c3-legend-item-focused").size()>0&&n.expandArc(t))},10)):(t=n.mapToTargetIds(t),void n.svg.selectAll(n.selectorTargets(t,"."+p.chartArc)).each(function(t){n.shouldExpand(t.data.id)&&n.d3.select(this).selectAll("path").transition().duration(n.expandDuration(t.data.id)).attr("d",n.svgArcExpanded).transition().duration(2*n.expandDuration(t.data.id)).attr("d",n.svgArcExpandedSub).each(function(t){n.isDonutType(t.data)})}))},f.unexpandArc=function(t){var e=this;e.transiting||(t=e.mapToTargetIds(t),e.svg.selectAll(e.selectorTargets(t,"."+p.chartArc)).selectAll("path").transition().duration(function(t){return e.expandDuration(t.data.id)}).attr("d",e.svgArc),e.svg.selectAll("."+p.arc).style("opacity",1))},f.expandDuration=function(t){var e=this,n=e.config;return e.isDonutType(t)?n.donut_expand_duration:e.isGaugeType(t)?n.gauge_expand_duration:e.isPieType(t)?n.pie_expand_duration:50},f.shouldExpand=function(t){var e=this,n=e.config;return e.isDonutType(t)&&n.donut_expand||e.isGaugeType(t)&&n.gauge_expand||e.isPieType(t)&&n.pie_expand},f.shouldShowArcLabel=function(){var t=this,e=t.config,n=!0;return t.hasType("donut")?n=e.donut_label_show:t.hasType("pie")&&(n=e.pie_label_show),n},f.meetsArcLabelThreshold=function(t){var e=this,n=e.config,r=e.hasType("donut")?n.donut_label_threshold:n.pie_label_threshold;return t>=r},f.getArcLabelFormat=function(){var t=this,e=t.config,n=e.pie_label_format;return t.hasType("gauge")?n=e.gauge_label_format:t.hasType("donut")&&(n=e.donut_label_format),n},f.getArcTitle=function(){var t=this;return t.hasType("donut")?t.config.donut_title:""},f.updateTargetsForArc=function(t){var e,n,r=this,i=r.main,a=r.classChartArc.bind(r),o=r.classArcs.bind(r),s=r.classFocus.bind(r);e=i.select("."+p.chartArcs).selectAll("."+p.chartArc).data(r.pie(t)).attr("class",function(t){return a(t)+s(t.data)}),n=e.enter().append("g").attr("class",a),n.append("g").attr("class",o),n.append("text").attr("dy",r.hasType("gauge")?"-.1em":".35em").style("opacity",0).style("text-anchor","middle").style("pointer-events","none")},f.initArc=function(){var t=this;t.arcs=t.main.select("."+p.chart).append("g").attr("class",p.chartArcs).attr("transform",t.getTranslate("arc")),t.arcs.append("text").attr("class",p.chartArcsTitle).style("text-anchor","middle").text(t.getArcTitle())},f.redrawArc=function(t,e,n){var r,i=this,a=i.d3,o=i.config,s=i.main;r=s.selectAll("."+p.arcs).selectAll("."+p.arc).data(i.arcData.bind(i)),r.enter().append("path").attr("class",i.classArc.bind(i)).style("fill",function(t){return i.color(t.data)}).style("cursor",function(t){return o.interaction_enabled&&o.data_selection_isselectable(t)?"pointer":null}).style("opacity",0).each(function(t){i.isGaugeType(t.data)&&(t.startAngle=t.endAngle=o.gauge_startingAngle),this._current=t}),r.attr("transform",function(t){return!i.isGaugeType(t.data)&&n?"scale(0)":""}).style("opacity",function(t){return t===this._current?0:1}).on("mouseover",o.interaction_enabled?function(t){var e,n;i.transiting||(e=i.updateAngle(t),e&&(n=i.convertToArcData(e),i.expandArc(e.data.id),i.api.focus(e.data.id),i.toggleFocusLegend(e.data.id,!0),i.config.data_onmouseover(n,this)))}:null).on("mousemove",o.interaction_enabled?function(t){var e,n,r=i.updateAngle(t);r&&(e=i.convertToArcData(r),n=[e],i.showTooltip(n,this))}:null).on("mouseout",o.interaction_enabled?function(t){var e,n;i.transiting||(e=i.updateAngle(t),e&&(n=i.convertToArcData(e),i.unexpandArc(e.data.id),i.api.revert(),i.revertLegend(),i.hideTooltip(),i.config.data_onmouseout(n,this)))}:null).on("click",o.interaction_enabled?function(t,e){var n,r=i.updateAngle(t);r&&(n=i.convertToArcData(r),i.toggleShape&&i.toggleShape(this,n,e),i.config.data_onclick.call(i.api,n,this))}:null).each(function(){i.transiting=!0}).transition().duration(t).attrTween("d",function(t){var e,n=i.updateAngle(t);return n?(isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle),e=a.interpolate(this._current,n),this._current=e(0),function(n){var r=e(n);return r.data=t.data,i.getArc(r,!0)}):function(){return"M 0 0"}}).attr("transform",n?"scale(1)":"").style("fill",function(t){return i.levelColor?i.levelColor(t.data.values[0].value):i.color(t.data.id)}).style("opacity",1).call(i.endall,function(){i.transiting=!1}),r.exit().transition().duration(e).style("opacity",0).remove(),s.selectAll("."+p.chartArc).select("text").style("opacity",0).attr("class",function(t){return i.isGaugeType(t.data)?p.gaugeValue:""}).text(i.textForArcLabel.bind(i)).attr("transform",i.transformForArcLabel.bind(i)).style("font-size",function(t){return i.isGaugeType(t.data)?Math.round(i.radius/5)+"px":""}).transition().duration(t).style("opacity",function(t){return i.isTargetToShow(t.data.id)&&i.isArcType(t.data)?1:0}),s.select("."+p.chartArcsTitle).style("opacity",i.hasType("donut")||i.hasType("gauge")?1:0),i.hasType("gauge")&&(i.arcs.select("."+p.chartArcsBackground).attr("d",function(){var t={data:[{value:o.gauge_max}],startAngle:o.gauge_startingAngle,endAngle:-1*o.gauge_startingAngle};return i.getArc(t,!0,!0)}),i.arcs.select("."+p.chartArcsGaugeUnit).attr("dy",".75em").text(o.gauge_label_show?o.gauge_units:""),i.arcs.select("."+p.chartArcsGaugeMin).attr("dx",-1*(i.innerRadius+(i.radius-i.innerRadius)/(o.gauge_fullCircle?1:2))+"px").attr("dy","1.2em").text(o.gauge_label_show?o.gauge_min:""),i.arcs.select("."+p.chartArcsGaugeMax).attr("dx",i.innerRadius+(i.radius-i.innerRadius)/(o.gauge_fullCircle?1:2)+"px").attr("dy","1.2em").text(o.gauge_label_show?o.gauge_max:""))},f.initGauge=function(){var t=this.arcs;this.hasType("gauge")&&(t.append("path").attr("class",p.chartArcsBackground),t.append("text").attr("class",p.chartArcsGaugeUnit).style("text-anchor","middle").style("pointer-events","none"),t.append("text").attr("class",p.chartArcsGaugeMin).style("text-anchor","middle").style("pointer-events","none"),t.append("text").attr("class",p.chartArcsGaugeMax).style("text-anchor","middle").style("pointer-events","none"))},f.getGaugeLabelHeight=function(){return this.config.gauge_label_show?20:0},f.initRegion=function(){var t=this;t.region=t.main.append("g").attr("clip-path",t.clipPath).attr("class",p.regions)},f.updateRegion=function(t){var e=this,n=e.config;e.region.style("visibility",e.hasArcType()?"hidden":"visible"),e.mainRegion=e.main.select("."+p.regions).selectAll("."+p.region).data(n.regions),e.mainRegion.enter().append("g").append("rect").style("fill-opacity",0),e.mainRegion.attr("class",e.classRegion.bind(e)),e.mainRegion.exit().transition().duration(t).style("opacity",0).remove()},f.redrawRegion=function(t){var e=this,n=e.mainRegion.selectAll("rect").each(function(){var t=e.d3.select(this.parentNode).datum();e.d3.select(this).datum(t)}),r=e.regionX.bind(e),i=e.regionY.bind(e),a=e.regionWidth.bind(e),o=e.regionHeight.bind(e);return[(t?n.transition():n).attr("x",r).attr("y",i).attr("width",a).attr("height",o).style("fill-opacity",function(t){return g(t.opacity)?t.opacity:.1})]},f.regionX=function(t){var e,n=this,r=n.config,i="y"===t.axis?n.y:n.y2;return e="y"===t.axis||"y2"===t.axis?r.axis_rotated&&"start"in t?i(t.start):0:r.axis_rotated?0:"start"in t?n.x(n.isTimeSeries()?n.parseDate(t.start):t.start):0},f.regionY=function(t){var e,n=this,r=n.config,i="y"===t.axis?n.y:n.y2;return e="y"===t.axis||"y2"===t.axis?r.axis_rotated?0:"end"in t?i(t.end):0:r.axis_rotated&&"start"in t?n.x(n.isTimeSeries()?n.parseDate(t.start):t.start):0},f.regionWidth=function(t){var e,n=this,r=n.config,i=n.regionX(t),a="y"===t.axis?n.y:n.y2;return e="y"===t.axis||"y2"===t.axis?r.axis_rotated&&"end"in t?a(t.end):n.width:r.axis_rotated?n.width:"end"in t?n.x(n.isTimeSeries()?n.parseDate(t.end):t.end):n.width,e=0?p.focused:"")},f.classDefocused=function(t){return" "+(this.defocusedTargetIds.indexOf(t.id)>=0?p.defocused:"")},f.classChartText=function(t){return p.chartText+this.classTarget(t.id)},f.classChartLine=function(t){return p.chartLine+this.classTarget(t.id)},f.classChartBar=function(t){return p.chartBar+this.classTarget(t.id)},f.classChartArc=function(t){return p.chartArc+this.classTarget(t.data.id)},f.getTargetSelectorSuffix=function(t){return t||0===t?("-"+t).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""},f.selectorTarget=function(t,e){return(e||"")+"."+p.target+this.getTargetSelectorSuffix(t)},f.selectorTargets=function(t,e){var n=this;return t=t||[],t.length?t.map(function(t){return n.selectorTarget(t,e)}):null},f.selectorLegend=function(t){return"."+p.legendItem+this.getTargetSelectorSuffix(t)},f.selectorLegends=function(t){var e=this;return t&&t.length?t.map(function(t){return e.selectorLegend(t)}):null};var g=f.isValue=function(t){return t||0===t},y=f.isFunction=function(t){return"function"==typeof t},v=f.isString=function(t){return"string"==typeof t},M=f.isUndefined=function(t){return"undefined"==typeof t},x=f.isDefined=function(t){return"undefined"!=typeof t},L=f.ceil10=function(t){return 10*Math.ceil(t/10)},b=f.asHalfPixel=function(t){return Math.ceil(t)+.5},S=f.diffDomain=function(t){return t[1]-t[0]},T=f.isEmpty=function(t){return"undefined"==typeof t||null===t||v(t)&&0===t.length||"object"==typeof t&&0===Object.keys(t).length},Y=f.notEmpty=function(t){return!f.isEmpty(t)},w=f.getOption=function(t,e,n){return x(t[e])?t[e]:n},k=f.hasValue=function(t,e){var n=!1;return Object.keys(t).forEach(function(r){t[r]===e&&(n=!0)}),n},D=f.sanitise=function(t){return"string"==typeof t?t.replace(//g,">"):t},A=f.getPathBox=function(t){var e=t.getBoundingClientRect(),n=[t.pathSegList.getItem(0),t.pathSegList.getItem(1)],r=n[0].x,i=Math.min(n[0].y,n[1].y);return{x:r,y:i,width:e.width,height:e.height}};h.focus=function(t){var e,n=this.internal;t=n.mapToTargetIds(t),e=n.svg.selectAll(n.selectorTargets(t.filter(n.isTargetToShow,n))),this.revert(),this.defocus(),e.classed(p.focused,!0).classed(p.defocused,!1),n.hasArcType()&&n.expandArc(t),n.toggleFocusLegend(t,!0),n.focusedTargetIds=t,n.defocusedTargetIds=n.defocusedTargetIds.filter(function(e){return t.indexOf(e)<0})},h.defocus=function(t){var e,n=this.internal;t=n.mapToTargetIds(t),e=n.svg.selectAll(n.selectorTargets(t.filter(n.isTargetToShow,n))),e.classed(p.focused,!1).classed(p.defocused,!0),n.hasArcType()&&n.unexpandArc(t),n.toggleFocusLegend(t,!1),n.focusedTargetIds=n.focusedTargetIds.filter(function(e){return t.indexOf(e)<0}),n.defocusedTargetIds=t},h.revert=function(t){var e,n=this.internal;t=n.mapToTargetIds(t),e=n.svg.selectAll(n.selectorTargets(t)),e.classed(p.focused,!1).classed(p.defocused,!1),n.hasArcType()&&n.unexpandArc(t),n.config.legend_show&&(n.showLegend(t.filter(n.isLegendToShow.bind(n))),n.legend.selectAll(n.selectorLegends(t)).filter(function(){return n.d3.select(this).classed(p.legendItemFocused)}).classed(p.legendItemFocused,!1)),n.focusedTargetIds=[],n.defocusedTargetIds=[]},h.show=function(t,e){var n,r=this.internal;t=r.mapToTargetIds(t),e=e||{},r.removeHiddenTargetIds(t),n=r.svg.selectAll(r.selectorTargets(t)),n.transition().style("opacity",1,"important").call(r.endall,function(){n.style("opacity",null).style("opacity",1)}),e.withLegend&&r.showLegend(t),r.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},h.hide=function(t,e){var n,r=this.internal;t=r.mapToTargetIds(t),e=e||{},r.addHiddenTargetIds(t),n=r.svg.selectAll(r.selectorTargets(t)),n.transition().style("opacity",0,"important").call(r.endall,function(){n.style("opacity",null).style("opacity",0)}),e.withLegend&&r.hideLegend(t),r.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},h.toggle=function(t,e){var n=this,r=this.internal;r.mapToTargetIds(t).forEach(function(t){r.isTargetToShow(t)?n.hide(t,e):n.show(t,e)})},h.zoom=function(t){var e=this.internal;return t&&(e.isTimeSeries()&&(t=t.map(function(t){return e.parseDate(t)})),e.brush.extent(t),e.redraw({withUpdateXDomain:!0,withY:e.config.zoom_rescale @@ -23,4 +23,4 @@ return!0}function eu(t,e){return Or(t,e)}function nu(t,e,n){n="function"==typeof MIT License: http://getify.mit-license.org */ !function(i,a,o){a[i]=a[i]||o(),"undefined"!=typeof t&&t.exports?t.exports=a[i]:(r=function(){return a[i]}.call(e,n,e,t),!(void 0!==r&&(t.exports=r)))}("Promise","undefined"!=typeof i?i:this,function(){"use strict";function t(t,e){f.add(t,e),h||(h=m(f.drain))}function e(t){var e,n=typeof t;return null==t||"object"!=n&&"function"!=n||(e=t.then),"function"==typeof e&&e}function n(){for(var t=0;t0&&t(n,s))}catch(t){o.call(new u(s),t)}}}function o(e){var r=this;r.triggered||(r.triggered=!0,r.def&&(r=r.def),r.msg=e,r.state=2,r.chain.length>0&&t(n,r))}function s(t,e,n,r){for(var i=0;i=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(151),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e,n){var r,i;!function(){var n={name:"woothee",version:"1.5.0",description:"User-Agent string parser (js implementation)",main:"./release/woothee",devDependencies:{mocha:">= 1.7.0",chai:">= 1.3.0","js-yaml":">= 1.0.3",should:"~1.2.2"},scripts:{test:"make test"},repository:{type:"git",url:"https://github.com/woothee/woothee-js"},author:"tagomoris",license:"Apache v2"},a={};!function(){var t,e=a,n=(e.KEY_LABEL="label",e.KEY_NAME="name",e.KEY_TYPE="type",e.KEY_CATEGORY="category",e.KEY_OS="os",e.KEY_OS_VERSION="os_version",e.KEY_VENDOR="vendor",e.KEY_VERSION="version",e.CATEGORY_PC="pc"),r=e.CATEGORY_SMARTPHONE="smartphone",i=e.CATEGORY_MOBILEPHONE="mobilephone",o=e.CATEGORY_CRAWLER="crawler",s=e.CATEGORY_APPLIANCE="appliance",u=e.CATEGORY_MISC="misc",l=e.ATTRIBUTE_NAME="name",c=e.ATTRIBUTE_CATEGORY="category",d=e.ATTRIBUTE_OS="os",h=e.ATTRIBUTE_OS_VERSION="os_version",f=e.ATTRIBUTE_VENDOR="vendor",_=e.ATTRIBUTE_VERSION="version",m=e.VALUE_UNKNOWN="UNKNOWN",p=(e.CATEGORY_LIST=[n,r,i,o,s,u,m],e.ATTRIBUTE_LIST=[l,c,d,f,_,h],{});t={label:"MSIE",name:"Internet Explorer",type:"browser"},t.vendor="Microsoft",p[t.label]=t,t={label:"Edge",name:"Edge",type:"browser"},t.vendor="Microsoft",p[t.label]=t,t={label:"Chrome",name:"Chrome",type:"browser"},t.vendor="Google",p[t.label]=t,t={label:"Safari",name:"Safari",type:"browser"},t.vendor="Apple",p[t.label]=t,t={label:"Firefox",name:"Firefox",type:"browser"},t.vendor="Mozilla",p[t.label]=t,t={label:"Opera",name:"Opera",type:"browser"},t.vendor="Opera",p[t.label]=t,t={label:"Vivaldi",name:"Vivaldi",type:"browser"},t.vendor="Vivaldi Technologies",p[t.label]=t,t={label:"Sleipnir",name:"Sleipnir",type:"browser"},t.vendor="Fenrir Inc.",p[t.label]=t,t={label:"Webview",name:"Webview",type:"browser"},t.vendor="OS vendor",p[t.label]=t,t={label:"Win",name:"Windows UNKNOWN Ver",type:"os"},t.category="pc",p[t.label]=t,t={label:"Win10",name:"Windows 10",type:"os"},t.category="pc",p[t.label]=t,t={label:"Win8.1",name:"Windows 8.1",type:"os"},t.category="pc",p[t.label]=t,t={label:"Win8",name:"Windows 8",type:"os"},t.category="pc",p[t.label]=t,t={label:"Win7",name:"Windows 7",type:"os"},t.category="pc",p[t.label]=t,t={label:"WinVista",name:"Windows Vista",type:"os"},t.category="pc",p[t.label]=t,t={label:"WinXP",name:"Windows XP",type:"os"},t.category="pc",p[t.label]=t,t={label:"Win2000",name:"Windows 2000",type:"os"},t.category="pc",p[t.label]=t,t={label:"WinNT4",name:"Windows NT 4.0",type:"os"},t.category="pc",p[t.label]=t,t={label:"WinMe",name:"Windows Me",type:"os"},t.category="pc",p[t.label]=t,t={label:"Win98",name:"Windows 98",type:"os"},t.category="pc",p[t.label]=t,t={label:"Win95",name:"Windows 95",type:"os"},t.category="pc",p[t.label]=t,t={label:"WinPhone",name:"Windows Phone OS",type:"os"},t.category="smartphone",p[t.label]=t,t={label:"WinCE",name:"Windows CE",type:"os"},t.category="smartphone",p[t.label]=t,t={label:"OSX",name:"Mac OSX",type:"os"},t.category="pc",p[t.label]=t,t={label:"MacOS",name:"Mac OS Classic",type:"os"},t.category="pc",p[t.label]=t,t={label:"Linux",name:"Linux",type:"os"},t.category="pc",p[t.label]=t,t={label:"BSD",name:"BSD",type:"os"},t.category="pc",p[t.label]=t,t={label:"ChromeOS",name:"ChromeOS",type:"os"},t.category="pc",p[t.label]=t,t={label:"Android",name:"Android",type:"os"},t.category="smartphone",p[t.label]=t,t={label:"iPhone",name:"iPhone",type:"os"},t.category="smartphone",p[t.label]=t,t={label:"iPad",name:"iPad",type:"os"},t.category="smartphone",p[t.label]=t,t={label:"iPod",name:"iPod",type:"os"},t.category="smartphone",p[t.label]=t,t={label:"iOS",name:"iOS",type:"os"},t.category="smartphone",p[t.label]=t,t={label:"FirefoxOS",name:"Firefox OS",type:"os"},t.category="smartphone",p[t.label]=t,t={label:"BlackBerry",name:"BlackBerry",type:"os"},t.category="smartphone",p[t.label]=t,t={label:"BlackBerry10",name:"BlackBerry 10",type:"os"},t.category="smartphone",p[t.label]=t,t={label:"docomo",name:"docomo",type:"full"},t.vendor="docomo",t.category="mobilephone",t.os="docomo",p[t.label]=t,t={label:"au",name:"au by KDDI",type:"full"},t.vendor="au",t.category="mobilephone",t.os="au",p[t.label]=t,t={label:"SoftBank",name:"SoftBank Mobile",type:"full"},t.vendor="SoftBank",t.category="mobilephone",t.os="SoftBank",p[t.label]=t,t={label:"willcom",name:"WILLCOM",type:"full"},t.vendor="WILLCOM",t.category="mobilephone",t.os="WILLCOM",p[t.label]=t,t={label:"jig",name:"jig browser",type:"full"},t.vendor="",t.category="mobilephone",t.os="jig",p[t.label]=t,t={label:"emobile",name:"emobile",type:"full"},t.vendor="",t.category="mobilephone",t.os="emobile",p[t.label]=t,t={label:"SymbianOS",name:"SymbianOS",type:"full"},t.vendor="",t.category="mobilephone",t.os="SymbianOS",p[t.label]=t,t={label:"MobileTranscoder",name:"Mobile Transcoder",type:"full"},t.vendor="",t.category="mobilephone",t.os="Mobile Transcoder",p[t.label]=t,t={label:"Nintendo3DS",name:"Nintendo 3DS",type:"full"},t.vendor="Nintendo",t.category="appliance",t.os="Nintendo 3DS",p[t.label]=t,t={label:"NintendoDSi",name:"Nintendo DSi",type:"full"},t.vendor="Nintendo",t.category="appliance",t.os="Nintendo DSi",p[t.label]=t,t={label:"NintendoWii",name:"Nintendo Wii",type:"full"},t.vendor="Nintendo",t.category="appliance",t.os="Nintendo Wii",p[t.label]=t,t={label:"NintendoWiiU",name:"Nintendo Wii U",type:"full"},t.vendor="Nintendo",t.category="appliance",t.os="Nintendo Wii U",p[t.label]=t,t={label:"PSP",name:"PlayStation Portable",type:"full"},t.vendor="Sony",t.category="appliance",t.os="PlayStation Portable",p[t.label]=t,t={label:"PSVita",name:"PlayStation Vita",type:"full"},t.vendor="Sony",t.category="appliance",t.os="PlayStation Vita",p[t.label]=t,t={label:"PS3",name:"PlayStation 3",type:"full"},t.vendor="Sony",t.category="appliance",t.os="PlayStation 3",p[t.label]=t,t={label:"PS4",name:"PlayStation 4",type:"full"},t.vendor="Sony",t.category="appliance",t.os="PlayStation 4",p[t.label]=t,t={label:"Xbox360",name:"Xbox 360",type:"full"},t.vendor="Microsoft",t.category="appliance",t.os="Xbox 360",p[t.label]=t,t={label:"XboxOne",name:"Xbox One",type:"full"},t.vendor="Microsoft",t.category="appliance",t.os="Xbox One",p[t.label]=t,t={label:"DigitalTV",name:"InternetTVBrowser",type:"full"},t.vendor="";t.category="appliance";t.os="DigitalTV",p[t.label]=t,t={label:"SafariRSSReader",name:"Safari RSSReader",type:"full"},t.vendor="Apple",t.category="misc",p[t.label]=t,t={label:"GoogleDesktop",name:"Google Desktop",type:"full"},t.vendor="Google",t.category="misc",p[t.label]=t,t={label:"WindowsRSSReader",name:"Windows RSSReader",type:"full"},t.vendor="Microsoft",t.category="misc",p[t.label]=t,t={label:"VariousRSSReader",name:"RSSReader",type:"full"},t.vendor="",t.category="misc",p[t.label]=t,t={label:"HTTPLibrary",name:"HTTP Library",type:"full"},t.vendor="",t.category="misc",p[t.label]=t,t={label:"GoogleBot",name:"Googlebot",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"GoogleBotMobile",name:"Googlebot Mobile",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"GoogleMediaPartners",name:"Google Mediapartners",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"GoogleFeedFetcher",name:"Google Feedfetcher",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"GoogleAppEngine",name:"Google AppEngine",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"GoogleWebPreview",name:"Google Web Preview",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"YahooSlurp",name:"Yahoo! Slurp",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"YahooJP",name:"Yahoo! Japan",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"YahooPipes",name:"Yahoo! Pipes",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"Baiduspider",name:"Baiduspider",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"msnbot",name:"msnbot",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"bingbot",name:"bingbot",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"BingPreview",name:"BingPreview",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"Yeti",name:"Naver Yeti",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"FeedBurner",name:"Google FeedBurner",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"facebook",name:"facebook",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"twitter",name:"twitter",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"mixi",name:"mixi",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"IndyLibrary",name:"Indy Library",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"ApplePubSub",name:"Apple iCloud",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"Genieo",name:"Genieo Web Filter",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"topsyButterfly",name:"topsy Butterfly",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"rogerbot",name:"SeoMoz rogerbot",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"AhrefsBot",name:"ahref AhrefsBot",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"radian6",name:"salesforce radian6",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"Hatena",name:"Hatena",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"goo",name:"goo",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"livedoorFeedFetcher",name:"livedoor FeedFetcher",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,t={label:"VariousCrawler",name:"misc crawler",type:"full"},t.vendor="",t.category="crawler",p[t.label]=t,e.get=function(t){return p[t]}}();var o={};!function(){var t=o;t.updateMap=function(t,e){for(var n in e)n!==a.KEY_LABEL&&n!==a.KEY_TYPE&&e[n]&&e[n].length>0&&(t[n]=e[n])},t.updateCategory=function(t,e){t[a.ATTRIBUTE_CATEGORY]=e},t.updateVersion=function(t,e){t[a.ATTRIBUTE_VERSION]=e},t.updateOs=function(t,e){t[a.ATTRIBUTE_OS]=e},t.updateOsVersion=function(t,e){t[a.ATTRIBUTE_OS_VERSION]=e}}();var s={};!function(){var t=s,e=/MSIE ([.0-9]+);/,n=/Trident\/[.0-9]+;/,r=/ rv:([.0-9]+)/,i=/IEMobile\/([.0-9]+);/,o=(t.challengeMSIE=function(t,o){if(t.indexOf("compatible; MSIE")<0&&t.indexOf("Trident/")<0&&t.indexOf("IEMobile/"))return!1;var s,u=e.exec(t);return u||n.exec(t)&&(u=r.exec(t)),u||(u=i.exec(t)),s=u?u[1]:a.VALUE_UNKNOWN,_(o,a.get("MSIE")),y(o,s),!0},/Edge\/([.0-9]+)/),u=/FxiOS\/([.0-9]+)/,l=/(?:Chrome|CrMo|CriOS)\/([.0-9]+)/,c=/OPR\/([.0-9]+)/,d=/Version\/([.0-9]+)/,h=(t.challengeSafariChrome=function(t,e){if(t.indexOf("Safari/")<0)return!1;var n,r=a.VALUE_UNKNOWN;if(n=o.exec(t))return r=n[1],_(e,a.get("Edge")),y(e,r),!0;if(n=u.exec(t))return r=n[1],_(e,a.get("Firefox")),y(e,r),!0;if(n=l.exec(t)){var i;return(i=c.exec(t))?(r=i[1],_(e,a.get("Opera")),y(e,r),!0):(r=n[1],_(e,a.get("Chrome")),y(e,r),!0)}return(n=d.exec(t))&&(r=n[1]),_(e,a.get("Safari")),y(e,r),!0},/Firefox\/([.0-9]+)/),f=(t.challengeFirefox=function(t,e){if(t.indexOf("Firefox/")<0)return!1;var n=a.VALUE_UNKNOWN,r=h.exec(t);return r&&(n=r[1]),_(e,a.get("Firefox")),y(e,n),!0},/Version\/([.0-9]+)/),g=/Opera[\/ ]([.0-9]+)/,v=(t.challengeOpera=function(t,e){if(t.indexOf("Opera")<0)return!1;var n=a.VALUE_UNKNOWN,r=f.exec(t);return r?n=r[1]:(r=g.exec(t),r&&(n=r[1])),_(e,a.get("Opera")),y(e,n),!0},/iP(hone;|ad;|od) .*like Mac OS X/),M=/Version\/([.0-9]+)/,x=(t.challengeWebview=function(t,e){var n=a.VALUE_UNKNOWN,r=v.exec(t);if(r){if(t.indexOf("Safari/")>-1)return!1;var i=M.exec(t);return i&&(n=i[1]),_(e,a.get("Webview")),y(e,n),!0}return!1},/Sleipnir\/([.0-9]+)/),L=(t.challengeSleipnir=function(t,e){if(t.indexOf("Sleipnir/")<0)return!1;var n=a.VALUE_UNKNOWN,r=x.exec(t);r&&(n=r[1]),_(e,a.get("Sleipnir")),y(e,n);var i=a.get("Win");return m(e,i[a.KEY_CATEGORY]),p(e,i[a.KEY_NAME]),!0},/Vivaldi\/([.0-9]+)/);t.challengeVivaldi=function(t,e){if(t.indexOf("Vivaldi/")<0)return!1;var n=a.VALUE_UNKNOWN,r=L.exec(t);return r&&(n=r[1]),_(e,a.get("Vivaldi")),y(e,n),!0}}();var u={};!function(){var t=u,e=/Windows ([ .a-zA-Z0-9]+)[;\\)]/,n=/^Phone(?: OS)? ([.0-9]+)/;t.challengeWindows=function(t,r){if(t.indexOf("Windows")<0)return!1;if(t.indexOf("Xbox")>-1){var i;return i=t.indexOf("Xbox; Xbox One)")>-1?a.get("XboxOne"):a.get("Xbox360"),_(r,i),!0}var o=a.get("Win"),s=e.exec(t);if(!s)return m(r,o[a.KEY_CATEGORY]),p(r,o[a.KEY_NAME]),!0;var u=s[1];return"NT 10.0"===u?o=a.get("Win10"):"NT 6.3"===u?o=a.get("Win8.1"):"NT 6.2"===u?o=a.get("Win8"):"NT 6.1"===u?o=a.get("Win7"):"NT 6.0"===u?o=a.get("WinVista"):"NT 5.1"===u?o=a.get("WinXP"):(s=n.exec(u))?(o=a.get("WinPhone"),u=s[1]):"NT 5.0"===u?o=a.get("Win2000"):"NT 4.0"===u?o=a.get("WinNT4"):"98"===u?o=a.get("Win98"):"95"===u?o=a.get("Win95"):"CE"===u&&(o=a.get("WinCE")),m(r,o[a.KEY_CATEGORY]),p(r,o[a.KEY_NAME]),g(r,u),!0},t.challengeOSX=function(t,e){if(t.indexOf("Mac OS X")<0)return!1;var n,r,i=a.get("OSX");return t.indexOf("like Mac OS X")>=0?(t.indexOf("iPhone;")>=0?i=a.get("iPhone"):t.indexOf("iPad;")>=0?i=a.get("iPad"):t.indexOf("iPod")>=0&&(i=a.get("iPod")),(r=/; CPU(?: iPhone)? OS (\d+_\d+(?:_\d+)?) like Mac OS X/.exec(t))&&(n=r[1].replace(/_/g,"."))):(r=/Mac OS X (10[._]\d+(?:[._]\d+)?)(?:\)|;)/.exec(t))&&(n=r[1].replace(/_/g,".")),m(e,i[a.KEY_CATEGORY]),p(e,i[a.KEY_NAME]),n&&g(e,n),!0},t.challengeLinux=function(t,e){if(t.indexOf("Linux")<0)return!1;var n,r,i=a.get("Linux");return t.indexOf("Android")>=0&&(i=a.get("Android"),(r=/Android[- ](\d+\.\d+(?:\.\d+)?)/.exec(t))&&(n=r[1])),m(e,i[a.KEY_CATEGORY]),p(e,i[a.KEY_NAME]),n&&g(e,n),!0},t.challengeSmartPhone=function(t,e){var n,r=null,i=null;return t.indexOf("iPhone")>=0?r=a.get("iPhone"):t.indexOf("iPad")>=0?r=a.get("iPad"):t.indexOf("iPod")>=0?r=a.get("iPod"):t.indexOf("Android")>=0?r=a.get("Android"):t.indexOf("CFNetwork")>=0?r=a.get("iOS"):t.indexOf("BB10")>=0?(r=a.get("BlackBerry10"),(n=/BB10(?:.+)Version\/([.0-9]+)/.exec(t))&&(i=n[1])):t.indexOf("BlackBerry")>=0&&(r=a.get("BlackBerry"),(n=/BlackBerry(?:\d+)\/([.0-9]+) /.exec(t))&&(i=n[1])),e[a.KEY_NAME]&&e[a.KEY_NAME]===a.get("Firefox")[a.KEY_NAME]&&(n=/^Mozilla\/[.0-9]+ \((?:Mobile|Tablet);(?:.*;)? rv:([.0-9]+)\) Gecko\/[.0-9]+ Firefox\/[.0-9]+$/.exec(t))&&(r=a.get("FirefoxOS"),i=n[1]),!!r&&(m(e,r[a.KEY_CATEGORY]),p(e,r[a.KEY_NAME]),i&&g(e,i),!0)},t.challengeMobilePhone=function(t,e){var n,r;if(t.indexOf("KDDI-")>=0&&(r=/KDDI-([^- \/;()"']+)/.exec(t))){var i=r[1];return n=a.get("au"),m(e,n[a.KEY_CATEGORY]),p(e,n[a.KEY_OS]),y(e,i),!0}return(t.indexOf("WILLCOM")>=0||t.indexOf("DDIPOCKET")>=0)&&(r=/(?:WILLCOM|DDIPOCKET);[^\/]+\/([^ \/;()]+)/.exec(t))?(i=r[1],n=a.get("willcom"),m(e,n[a.KEY_CATEGORY]),p(e,n[a.KEY_OS]),y(e,i),!0):t.indexOf("SymbianOS")>=0?(n=a.get("SymbianOS"),m(e,n[a.KEY_CATEGORY]),p(e,n[a.KEY_OS]),!0):t.indexOf("Google Wireless Transcoder")>=0?(_(e,a.get("MobileTranscoder")),y(e,"Google"),!0):t.indexOf("Naver Transcoder")>=0&&(_(e,a.get("MobileTranscoder")),y(e,"Naver"),!0)},t.challengeAppliance=function(t,e){var n;return t.indexOf("Nintendo DSi;")>=0?(n=a.get("NintendoDSi"),m(e,n[a.KEY_CATEGORY]),p(e,n[a.KEY_OS]),!0):t.indexOf("Nintendo Wii;")>=0&&(n=a.get("NintendoWii"),m(e,n[a.KEY_CATEGORY]),p(e,n[a.KEY_OS]),!0)},t.challengeMisc=function(t,e){var n,r,i;return t.indexOf("(Win98;")>=0?(n=a.get("Win98"),r="98"):t.indexOf("Macintosh; U; PPC;")>=0?(n=a.get("MacOS"),(i=/rv:(\d+\.\d+\.\d+)/.exec(t))&&(r=i[1])):t.indexOf("Mac_PowerPC")>=0?n=a.get("MacOS"):t.indexOf("X11; FreeBSD ")>=0?(n=a.get("BSD"),(i=/FreeBSD ([^;\)]+);/.exec(t))&&(r=i[1])):t.indexOf("X11; CrOS ")>=0&&(n=a.get("ChromeOS"),(i=/CrOS ([^\)]+)\)/.exec(t))&&(r=i[1])),!!n&&(m(e,n[a.KEY_CATEGORY]),p(e,n[a.KEY_NAME]),r&&g(e,r),!0)}}();var l={};!function(){var t=l,e=/DoCoMo\/[.0-9]+[ \/]([^- \/;()"']+)/,n=/\(([^;)]+);FOMA;/,r=(t.challengeDocomo=function(t,r){if(t.indexOf("DoCoMo")<0&&t.indexOf(";FOMA;")<0)return!1;var i,o=a.VALUE_UNKNOWN;return(i=e.exec(t))?o=i[1]:(i=n.exec(t))&&(o=i[1]),_(r,a.get("docomo")),y(r,o),!0},/KDDI-([^- \/;()"']+)/),i=(t.challengeAu=function(t,e){if(t.indexOf("KDDI-")<0)return!1;var n=a.VALUE_UNKNOWN,i=r.exec(t);return i&&(n=i[1]),_(e,a.get("au")),y(e,n),!0},/(?:SoftBank|Vodafone|J-PHONE)\/[.0-9]+\/([^ \/;()]+)/),o=(t.challengeSoftbank=function(t,e){if(t.indexOf("SoftBank")<0&&t.indexOf("Vodafone")<0&&t.indexOf("J-PHONE")<0)return!1;var n=a.VALUE_UNKNOWN,r=i.exec(t);return r&&(n=r[1]),_(e,a.get("SoftBank")),y(e,n),!0},/(?:WILLCOM|DDIPOCKET);[^\/]+\/([^ \/;()]+)/);t.challengeWillcom=function(t,e){if(t.indexOf("WILLCOM")<0&&t.indexOf("DDIPOCKET")<0)return!1;var n=a.VALUE_UNKNOWN,r=o.exec(t);return r&&(n=r[1]),_(e,a.get("willcom")),y(e,n),!0},t.challengeMisc=function(t,e){var n;return t.indexOf("jig browser")>=0?(_(e,a.get("jig")),(n=/jig browser[^;]+; ([^);]+)/.exec(t))&&y(e,n[1]),!0):t.indexOf("emobile/")>=0||t.indexOf("OpenBrowser")>=0||t.indexOf("Browser/Obigo-Browser")>=0?(_(e,a.get("emobile")),!0):t.indexOf("SymbianOS")>=0?(_(e,a.get("SymbianOS")),!0):t.indexOf("Hatena-Mobile-Gateway/")>=0?(_(e,a.get("MobileTranscoder")),y(e,"Hatena"),!0):t.indexOf("livedoor-Mobile-Gateway/")>=0&&(_(e,a.get("MobileTranscoder")),y(e,"livedoor"),!0)}}();var c={};!function(){var t=c;t.challengeGoogle=function(t,e){return!(t.indexOf("Google")<0||(t.indexOf("compatible; Googlebot")>=0?t.indexOf("compatible; Googlebot-Mobile")>=0?(_(e,a.get("GoogleBotMobile")),0):(_(e,a.get("GoogleBot")),0):t.indexOf("Googlebot-Image/")>=0?(_(e,a.get("GoogleBot")),0):t.indexOf("Mediapartners-Google")>=0&&(t.indexOf("compatible; Mediapartners-Google")>=0||"Mediapartners-Google"===t)?(_(e,a.get("GoogleMediaPartners")),0):t.indexOf("Feedfetcher-Google;")>=0?(_(e,a.get("GoogleFeedFetcher")),0):t.indexOf("AppEngine-Google")>=0?(_(e,a.get("GoogleAppEngine")),0):!(t.indexOf("Google Web Preview")>=0)||(_(e,a.get("GoogleWebPreview")),0)))},t.challengeCrawlers=function(t,e){if(t.indexOf("Yahoo")>=0||t.indexOf("help.yahoo.co.jp/help/jp/")>=0||t.indexOf("listing.yahoo.co.jp/support/faq/")>=0){if(t.indexOf("compatible; Yahoo! Slurp")>=0)return _(e,a.get("YahooSlurp")),!0;if(t.indexOf("YahooFeedSeekerJp")>=0||t.indexOf("YahooFeedSeekerBetaJp")>=0)return _(e,a.get("YahooJP")),!0;if(t.indexOf("crawler (http://listing.yahoo.co.jp/support/faq/")>=0||t.indexOf("crawler (http://help.yahoo.co.jp/help/jp/")>=0)return _(e,a.get("YahooJP")),!0;if(t.indexOf("Y!J-BRZ/YATSHA crawler")>=0||t.indexOf("Y!J-BRY/YATSH crawler")>=0)return _(e,a.get("YahooJP")),!0;if(t.indexOf("Yahoo Pipes")>=0)return _(e,a.get("YahooPipes")),!0}return t.indexOf("msnbot")>=0?(_(e,a.get("msnbot")),!0):t.indexOf("bingbot")>=0&&t.indexOf("compatible; bingbot")>=0?(_(e,a.get("bingbot")),!0):t.indexOf("BingPreview")>=0?(_(e,a.get("BingPreview")),!0):t.indexOf("Baidu")>=0&&(t.indexOf("compatible; Baiduspider")>=0||t.indexOf("Baiduspider+")>=0||t.indexOf("Baiduspider-image+")>=0)?(_(e,a.get("Baiduspider")),!0):t.indexOf("Yeti")>=0&&t.indexOf("http://help.naver.com/robots")>=0?(_(e,a.get("Yeti")),!0):t.indexOf("FeedBurner/")>=0?(_(e,a.get("FeedBurner")),!0):t.indexOf("facebookexternalhit")>=0?(_(e,a.get("facebook")),!0):t.indexOf("Twitterbot/")>=0?(_(e,a.get("twitter")),!0):t.indexOf("ichiro")>=0&&(t.indexOf("http://help.goo.ne.jp/door/crawler.html")>=0||t.indexOf("compatible; ichiro/mobile goo;")>=0)?(_(e,a.get("goo")),!0):t.indexOf("gooblogsearch/")>=0?(_(e,a.get("goo")),!0):t.indexOf("Apple-PubSub")>=0?(_(e,a.get("ApplePubSub")),!0):t.indexOf("(www.radian6.com/crawler)")>=0?(_(e,a.get("radian6")),!0):t.indexOf("Genieo/")>=0?(_(e,a.get("Genieo")),!0):t.indexOf("labs.topsy.com/butterfly/")>=0?(_(e,a.get("topsyButterfly")),!0):t.indexOf("rogerbot/1.0 (http://www.seomoz.org/dp/rogerbot")>=0?(_(e,a.get("rogerbot")),!0):t.indexOf("compatible; AhrefsBot/")>=0?(_(e,a.get("AhrefsBot")),!0):t.indexOf("livedoor FeedFetcher")>=0||t.indexOf("Fastladder FeedFetcher")>=0?(_(e,a.get("livedoorFeedFetcher")),!0):t.indexOf("Hatena ")>=0&&(t.indexOf("Hatena Antenna")>=0||t.indexOf("Hatena Pagetitle Agent")>=0||t.indexOf("Hatena Diary RSS")>=0)?(_(e,a.get("Hatena")),!0):t.indexOf("mixi-check")>=0||t.indexOf("mixi-crawler")>=0||t.indexOf("mixi-news-crawler")>=0?(_(e,a.get("mixi")),!0):t.indexOf("Indy Library")>=0&&t.indexOf("compatible; Indy Library")>=0&&(_(e,a.get("IndyLibrary")),!0)},t.challengeMaybeCrawler=function(t,e){return/(bot|crawler|spider)(?:[-_ .\/;@()]|$)/i.exec(t)?(_(e,a.get("VariousCrawler")),!0):/(?:Rome Client |UnwindFetchor\/|ia_archiver |Summify |PostRank\/)/.exec(t)||t.indexOf("ASP-Ranker Feed Crawler")>=0?(_(e,a.get("VariousCrawler")),!0):/(feed|web) ?parser/i.exec(t)?(_(e,a.get("VariousCrawler")),!0):!!/watch ?dog/i.exec(t)&&(_(e,a.get("VariousCrawler")),!0)}}();var d={};!function(){var t=d;t.challengePlaystation=function(t,e){var n,r=null,i=null;return t.indexOf("PSP (PlayStation Portable);")>=0?(r=a.get("PSP"),(n=/PSP \(PlayStation Portable\); ([.0-9]+)\)/.exec(t))&&(i=n[1])):t.indexOf("PlayStation Vita")>=0?(r=a.get("PSVita"),(n=/PlayStation Vita ([.0-9]+)\)/.exec(t))&&(i=n[1])):t.indexOf("PLAYSTATION 3 ")>=0||t.indexOf("PLAYSTATION 3;")>=0?(r=a.get("PS3"),(n=/PLAYSTATION 3;? ([.0-9]+)\)/.exec(t))&&(i=n[1])):t.indexOf("PlayStation 4 ")>=0&&(r=a.get("PS4"),(n=/PlayStation 4 ([.0-9]+)\)/.exec(t))&&(i=n[1])),!!r&&(_(e,r),i&&g(e,i),!0)},t.challengeNintendo=function(t,e){var n=null;return t.indexOf("Nintendo 3DS;")>=0?n=a.get("Nintendo3DS"):t.indexOf("Nintendo DSi;")>=0?n=a.get("NintendoDSi"):t.indexOf("Nintendo Wii;")>=0?n=a.get("NintendoWii"):t.indexOf("(Nintendo WiiU)")>=0&&(n=a.get("NintendoWiiU")),!!n&&(_(e,n),!0)},t.challengeDigitalTV=function(t,e){var n=null;return t.indexOf("InettvBrowser/")>=0&&(n=a.get("DigitalTV")),!!n&&(_(e,n),!0)}}();var h={};!function(){var t=h;t.challengeDesktopTools=function(t,e){var n=null;return t.indexOf("AppleSyndication/")>=0?n=a.get("SafariRSSReader"):t.indexOf("compatible; Google Desktop/")>=0?n=a.get("GoogleDesktop"):t.indexOf("Windows-RSS-Platform")>=0&&(n=a.get("WindowsRSSReader")),!!n&&(_(e,n),!0)},t.challengeSmartPhonePatterns=function(t,e){var n;return t.indexOf("CFNetwork/")>=0&&(n=a.get("iOS"),m(e,n[a.KEY_CATEGORY]),p(e,n[a.KEY_NAME]),!0)},t.challengeHTTPLibrary=function(t,e){var n,r;return/^(?:Apache-HttpClient\/|Jakarta Commons-HttpClient\/|Java\/)/.exec(t)||/[- ]HttpClient(\/|$)/.exec(t)?(n=a.get("HTTPLibrary"),r="Java"):t.indexOf("Java(TM) 2 Runtime Environment,")>=0?(n=a.get("HTTPLibrary"),r="Java"):/^Wget/.exec(t)?(n=a.get("HTTPLibrary"),r="wget"):/^(?:libwww-perl|WWW-Mechanize|LWP::Simple|LWP |lwp-trivial)/.exec(t)?(n=a.get("HTTPLibrary"),r="perl"):/^(?:Ruby|feedzirra|Typhoeus)/.exec(t)?(n=a.get("HTTPLibrary"),r="ruby"):/^(?:Python-urllib\/|Twisted )/.exec(t)?(n=a.get("HTTPLibrary"),r="python"):/^(:?PHP|WordPress|CakePHP|PukiWiki|PECL::HTTP)(?:\/| |$)/.exec(t)||/(?:PEAR |)HTTP_Request(?: class|2)/.exec(t)?(n=a.get("HTTPLibrary"),r="php"):t.indexOf("PEAR HTTP_Request class;")>=0&&(n=a.get("HTTPLibrary"),r="php"),!!n&&(_(e,n),y(e,r),!0)},t.challengeMaybeRSSReader=function(t,e){var n=null;return/rss(?:reader|bar|[-_ \/;()]|[ +]*\/)/i.exec(t)||/headline-reader/i.exec(t)?n=a.get("VariousRSSReader"):t.indexOf("cococ/")>=0&&(n=a.get("VariousRSSReader")),!!n&&(_(e,n),!0)}}();var f={};!function(){function t(t){var n={};return t&&"-"!==t?e(t,n)?n:r(t,n)?i(t,n)?n:n:o(t,n)?n:_(t,n)?n:m(t,n)?n:i(t,n)?n:p(t,n)?n:n:n}function e(t,e){return!!c.challengeGoogle(t,e)||!!c.challengeCrawlers(t,e)}function r(t,e){return!!(s.challengeMSIE(t,e)||s.challengeVivaldi(t,e)||s.challengeSafariChrome(t,e)||s.challengeFirefox(t,e)||s.challengeOpera(t,e)||s.challengeWebview(t,e))}function i(t,e){return!!(u.challengeWindows(t,e)||u.challengeOSX(t,e)||u.challengeLinux(t,e)||u.challengeSmartPhone(t,e)||u.challengeMobilePhone(t,e)||u.challengeAppliance(t,e)||u.challengeMisc(t,e))}function o(t,e){return!!(l.challengeDocomo(t,e)||l.challengeAu(t,e)||l.challengeSoftbank(t,e)||l.challengeWillcom(t,e)||l.challengeMisc(t,e))}function _(t,e){return!!d.challengePlaystation(t,e)||!!d.challengeNintendo(t,e)||!!d.challengeDigitalTV(t,e)}function m(t,e){return!!h.challengeDesktopTools(t,e)}function p(t,e){return!!(h.challengeSmartPhonePatterns(t,e)||s.challengeSleipnir(t,e)||h.challengeHTTPLibrary(t,e)||h.challengeMaybeRSSReader(t,e)||c.challengeMaybeCrawler(t,e))}function g(t){return t[a.ATTRIBUTE_NAME]||(t[a.ATTRIBUTE_NAME]=a.VALUE_UNKNOWN),t[a.ATTRIBUTE_CATEGORY]||(t[a.ATTRIBUTE_CATEGORY]=a.VALUE_UNKNOWN),t[a.ATTRIBUTE_OS]||(t[a.ATTRIBUTE_OS]=a.VALUE_UNKNOWN),t[a.ATTRIBUTE_OS_VERSION]||(t[a.ATTRIBUTE_OS_VERSION]=a.VALUE_UNKNOWN),t[a.ATTRIBUTE_VERSION]||(t[a.ATTRIBUTE_VERSION]=a.VALUE_UNKNOWN),t[a.ATTRIBUTE_VENDOR]||(t[a.ATTRIBUTE_VENDOR]=a.VALUE_UNKNOWN),t}var y=f,v=(y.VERSION=n.version,y.parse=function(e){return g(t(e))},y.isCrawler=function(t){return!1},{});v[a.ATTRIBUTE_NAME]=a.VALUE_UNKNOWN,v[a.ATTRIBUTE_CATEGORY]=a.VALUE_UNKNOWN,v[a.ATTRIBUTE_OS]=a.VALUE_UNKNOWN,v[a.ATTRIBUTE_OS_VERSION]=a.VALUE_UNKNOWN,v[a.ATTRIBUTE_VERSION]=a.VALUE_UNKNOWN,v[a.ATTRIBUTE_VENDOR]=a.VALUE_UNKNOWN}();var _=o.updateMap,m=o.updateCategory,p=o.updateOs,g=o.updateOsVersion,y=o.updateVersion;r=[],i=function(){return f}.apply(e,r),!(void 0!==i&&(t.exports=i))}()}]); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguYnVuZGxlLmpzIiw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XZSBuZWVkIHRvIGRlZXAgY2xvbmUgdGhpcyBvYmplY3QuXG5cdCAgICByZXR1cm4ge1xuXHQgICAgICAgIGVtcHR5ICAgICAgICAgICA6IGZhbHNlLFxuXHQgICAgICAgIHVudXNlZFRva2VucyAgICA6IFtdLFxuXHQgICAgICAgIHVudXNlZElucHV0ICAgICA6IFtdLFxuXHQgICAgICAgIG92ZXJmbG93ICAgICAgICA6IC0yLFxuXHQgICAgICAgIGNoYXJzTGVmdE92ZXIgICA6IDAsXG5cdCAgICAgICAgbnVsbElucHV0ICAgICAgIDogZmFsc2UsXG5cdCAgICAgICAgaW52YWxpZE1vbnRoICAgIDogbnVsbCxcblx0ICAgICAgICBpbnZhbGlkRm9ybWF0ICAgOiBmYWxzZSxcblx0ICAgICAgICB1c2VySW52YWxpZGF0ZWQgOiBmYWxzZSxcblx0ICAgICAgICBpc28gICAgICAgICAgICAgOiBmYWxzZSxcblx0ICAgICAgICBwYXJzZWREYXRlUGFydHMgOiBbXSxcblx0ICAgICAgICBtZXJpZGllbSAgICAgICAgOiBudWxsLFxuXHQgICAgICAgIHJmYzI4MjIgICAgICAgICA6IGZhbHNlLFxuXHQgICAgICAgIHdlZWtkYXlNaXNtYXRjaCA6IGZhbHNlXG5cdCAgICB9O1xuXHR9XG5cdFxuXHRmdW5jdGlvbiBnZXRQYXJzaW5nRmxhZ3MobSkge1xuXHQgICAgaWYgKG0uX3BmID09IG51bGwpIHtcblx0ICAgICAgICBtLl9wZiA9IGRlZmF1bHRQYXJzaW5nRmxhZ3MoKTtcblx0ICAgIH1cblx0ICAgIHJldHVybiBtLl9wZjtcblx0fVxuXHRcblx0dmFyIHNvbWU7XG5cdGlmIChBcnJheS5wcm90b3R5cGUuc29tZSkge1xuXHQgICAgc29tZSA9IEFycmF5LnByb3RvdHlwZS5zb21lO1xuXHR9IGVsc2Uge1xuXHQgICAgc29tZSA9IGZ1bmN0aW9uIChmdW4pIHtcblx0ICAgICAgICB2YXIgdCA9IE9iamVjdC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dCAgICByZXR1cm4gZXh0ZW5kKGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICBpZiAoaG9va3MuZGVwcmVjYXRpb25IYW5kbGVyICE9IG51bGwpIHtcblx0ICAgICAgICAgICAgaG9va3MuZGVwcmVjYXRpb25IYW5kbGVyKG51bGwsIG1zZyk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGlmIChmaXJzdFRpbWUpIHtcblx0ICAgICAgICAgICAgdmFyIGFyZ3MgPSBbXTtcblx0ICAgICAgICAgICAgdmFyIGFyZztcblx0ICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhcmd1bWVudHMubGVuZ3RoOyBpKyspIHtcblx0ICAgICAgICAgICAgICAgIGFyZyA9ICcnO1xuXHQgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBhcmd1bWVudHNbaV0gPT09ICdvYmplY3QnKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgYXJnICs9ICdcXG5bJyArIGkgKyAnXSAnO1xuXHQgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiBhcmd1bWVudHNbMF0pIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgYXJnICs9IGtleSArICc6ICcgKyBhcmd1bWVudHNbMF1ba2V5XSArICcsICc7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIGFyZyA9IGFyZy5zbGljZSgwLCAtMik7IC8vIFJlbW92ZSB0cmFpbGluZyBjb21tYSBhbmQgc3BhY2Vcblx0ICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICAgICAgYXJnID0gYXJndW1lbnRzW2ldO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgYXJncy5wdXNoKGFyZyk7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgd2Fybihtc2cgKyAnXFxuQXJndW1lbnRzOiAnICsgQXJyYXkucHJvdG90eXBlL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AgICAgICAgcmVzW3Byb3BdID0ge307XG5cdCAgICAgICAgICAgICAgICBleHRlbmQocmVzW3Byb3BdLCBwYXJlbnRDb25maWdbcHJvcF0pO1xuXHQgICAgICAgICAgICAgICAgZXh0ZW5kKHJlc1twcm9wXSwgY2hpbGRDb25maWdbcHJvcF0pO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKGNoaWxkQ29uZmlnW3Byb3BdICE9IG51bGwpIHtcblx0ICAgICAgICAgICAgICAgIHJlc1twcm9wXSA9IGNoaWxkQ29uZmlnW3Byb3BdO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgZGVsZXRlIHJlc1twcm9wXTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH1cblx0ICAgIH1cblx0ICAgIGZvciAocHJvcCBpbiBwYXJlbnRDb25maWcpIHtcblx0ICAgICAgICBpZiAoaGFzT3duUHJvcChwYXJlbnRDb25maWcsIHByb3ApICYmXG5cdCAgICAgICAgICAgICAgICAhaGFzT3duUHJvcChjaGlsZENvbmZpZywgcHJvcCkgJiZcblx0ICAgICAgICAgICAgICAgIGlzT2JqZWN0KHBhcmVudENvbmZpZ1twcm9wXSkpIHtcblx0ICAgICAgICAgICAgLy8gbWFrZSBzdXJlIGNoYW5nZXMgdG8gcHJvcGVydGllcyBkb24ndCBtb2RpZnkgcGFyZW50IGNvbmZpZ1xuXHQgICAgICAgICAgICByZXNbcHJvcF0gPSBleHRlbmQoe30sIHJlc1twcm9wXSk7XG5cdCAgICAgICAgfVxuXHQgICAgfVxuXHQgICAgcmV0dXJuIHJlcztcblx0fVxuXHRcblx0ZnVuY3Rpb24gTG9jYWxlKGNvbmZpZykge1xuXHQgICAgaWYgKGNvbmZpZyAhPSBudWxsKSB7XG5cdCAgICAgICAgdGhpcy5zZXQoY29uZmlnKTtcblx0ICAgIH1cblx0fVxuXHRcblx0dmFyIGtleXM7XG5cdFxuXHRpZiAoT2JqZWN0LmtleXMpIHt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IChmb3JtYXQgPT09ICdkZGQnKSB7XG5cdCAgICAgICAgICAgIGlpID0gaW5kZXhPZiQxLmNhbGwodGhpcy5fc2hvcnRXZWVrZGF5c1BhcnNlLCBsbGMpO1xuXHQgICAgICAgICAgICByZXR1cm4gaWkgIT09IC0xID8gaWkgOiBudWxsO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIGlpID0gaW5kZXhPZiQxLmNhbGwodGhpcy5fbWluV2Vla2RheXNQYXJzZSwgbGxjKTtcblx0ICAgICAgICAgICAgcmV0dXJuIGlpICE9PSAtMSA/IGlpIDogbnVsbDtcblx0ICAgICAgICB9XG5cdCAgICB9IGVsc2Uge1xuXHQgICAgICAgIGlmIChmb3JtYXQgPT09ICdkZGRkJykge1xuXHQgICAgICAgICAgICBpaSA9IGluZGV4T2YkMS5jYWxsKHRoaXMuX3dlZWtkYXlzUGFyc2UsIGxsYyk7XG5cdCAgICAgICAgICAgIGlmIChpaSAhPT0gLTEpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiBpaTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBpaSA9IGluZGV4T2YkMS5jYWxsKHRoaXMuX3Nob3J0V2Vla2RheXNQYXJzZSwgbGxjKTtcblx0ICAgICAgICAgICAgaWYgKGlpICE9PSAtMSkge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIGlpO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIGlpID0gaW5kZXhPZiQxLmNhbGwodGhpcy5fbWluV2Vla2RheXNQYXJzZSwgbGxjKTtcblx0ICAgICAgICAgICAgcmV0dXJuIGlpICE9PSAtMSA/IGlpIDogbnVsbDtcblx0ICAgICAgICB9IGVsc2UgaWYgKGZvcm1hdCA9PT0gJ2RkZCcpIHtcblx0ICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl9zaG9ydFdlZWtkYXlzUGFyc2UsIGxsYyk7XG5cdCAgICAgICAgICAgIGlmIChpaSAhPT0gLTEpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiBpaTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBpaSA9IGluZGV4T2YkMS5jYWxsKHRoaXMuX3dlZWtkYXlzUGFyc2UsIGxsYyk7XG5cdCAgICAgICAgICAgIGlmIChpaSAhPT0gLTEpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiBpaTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBpaSA9IGluZGV4T2YkMS5jYWxsKHRoaXMuX21pbldlZWtkYXlzUGFyc2UsIGxsYyk7XG5cdCAgICAgICAgICAgIHJldHVybiBpaSAhPT0gLTEgPyBpaSA6IG51bGw7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl9taW5XZWVrZGF5c1BhcnNlLCBsbGMpO1xuXHQgICAgICAgICAgICBpZiAoaWkgIT09IC0xKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gaWk7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl93ZWVrZGF5c1BhcnNlLCBsbGMpO1xuXHQgICAgICAgICAgICBpZiAoaWkgIT09IC0xKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gaWk7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl9zaG9ydFdlZWtkYXlzUGFyc2UsIGxsYyk7XG5cdCAgICAgICAgICAgIHJldHVybiBpaSAhPT0gLTEgPyBpaSA6IG51bGw7XG5cdCAgICAgICAgfVxuXHQgICAgfVxuXHR9XG5cdFxuXHRmdW5jdGlvbiBsb2NhbGVXZWVrZGF5c1BhcnNlICh3ZWVrZGF5TmFtZSwgZm9ybWF0LCBzdHJpY3QpIHtcblx0ICAgIHZhciBpLC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rZXksIHZhbHVlcyk7XG5cdCAgICAgICAgfVxuXHRcblx0ICAgICAgICBpZiAoZGF0YSkge1xuXHQgICAgICAgICAgICAvLyBtb21lbnQuZHVyYXRpb24uX2xvY2FsZSA9IG1vbWVudC5fbG9jYWxlID0gZGF0YTtcblx0ICAgICAgICAgICAgZ2xvYmFsTG9jYWxlID0gZGF0YTtcblx0ICAgICAgICB9XG5cdCAgICB9XG5cdFxuXHQgICAgcmV0dXJuIGdsb2JhbExvY2FsZS5fYWJicjtcblx0fVxuXHRcblx0ZnVuY3Rpb24gZGVmaW5lTG9jYWxlIChuYW1lLCBjb25maWcpIHtcblx0ICAgIGlmIChjb25maWcgIT09IG51bGwpIHtcblx0ICAgICAgICB2YXIgcGFyZW50Q29uZmlnID0gYmFzZUNvbmZpZztcblx0ICAgICAgICBjb25maWcuYWJiciA9IG5hbWU7XG5cdCAgICAgICAgaWYgKGxvY2FsZXNbbmFtZV0gIT0gbnVsbCkge1xuXHQgICAgICAgICAgICBkZXByZWNhdGVTaW1wbGUoJ2RlZmluZUxvY2FsZU92ZXJyaWRlJyxcblx0ICAgICAgICAgICAgICAgICAgICAndXNlIG1vbWVudC51cGRhdGVMb2NhbGUobG9jYWxlTmFtZSwgY29uZmlnKSB0byBjaGFuZ2UgJyArXG5cdCAgICAgICAgICAgICAgICAgICAgJ2FuIGV4aXN0aW5nIGxvY2FsZS4gbW9tZW50LmRlZmluZUxvY2FsZShsb2NhbGVOYW1lLCAnICtcblx0ICAgICAgICAgICAgICAgICAgICAnY29uZmlnKSBzaG91bGQgb25seSBiZSB1c2VkIGZvciBjcmVhdGluZyBhIG5ldyBsb2NhbGUgJyArXG5cdCAgICAgICAgICAgICAgICAgICAgJ1NlZSBodHRwOi8vbW9tZW50anMuY29tL2d1aWRlcy8jL3dhcm5pbmdzL2RlZmluZS1sb2NhbGUvIGZvciBtb3JlIGluZm8uJyk7XG5cdCAgICAgICAgICAgIHBhcmVudENvbmZpZyA9IGxvY2FsZXNbbmFtZV0uX2NvbmZpZztcblx0ICAgICAgICB9IGVsc2UgaWYgKGNvbmZpZy5wYXJlbnRMb2NhbGUgIT0gbnVsbCkge1xuXHQgICAgICAgICAgICBpZiAobG9jYWxlc1tjb25maWcucGFyZW50TG9jYWxlXSAhPSBudWxsKSB7XG5cdCAgICAgICAgICAgICAgICBwYXJlbnRDb25maWcgPSBsb2NhbGVzW2NvbmZpZy5wYXJlbnRMb2NhbGVdLl9jb25maWc7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICBpZiAoIWxvY2FsZUZhbWlsaWVzW2NvbmZpZy5wYXJlbnRMb2NhbGVdKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgbG9jYWxlRmFtaWxpZXNbY29uZmlnLnBhcmVudExvY2FsZV0gPSBbXTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIGxvY2FsZUZhbWlsaWVzW2NvbmZpZy5wYXJlbnRMb2NhbGVdLnB1c2goe1xuXHQgICAgICAgICAgICAgICAgICAgIG5hbWU6IG5hbWUsXG5cdCAgICAgICAgICAgICAgICAgICAgY29uZmlnOiBjb25maWdcblx0ICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgICAgbG9jYWxlc1tuYW1lXSA9IG5ldyBMb2NhbGUobWVyZ2VDb25maWdzKHBhcmVudENvbmZpZywgY29uZmlnKSk7XG5cdFxuXHQgICAgICAgIGlmIChsb2NhbGVGYW1pbGllc1tuYW1lXSkge1xuXHQgICAgICAgICAgICBsb2NhbGVGYW1pbGllc1tuYW1lXS5mb3JFYWNoKGZ1bmN0aW9uICh4KSB7XG5cdCAgICAgICAgICAgICAgICBkZWZpbmVMb2NhbGUoeC5uYW1lLCB4LmNvbmZpZyk7XG5cdCAgICAgICAgICAgIH0pO1xuXHQgICAgICAgIH1cblx0X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gICBhbGxvd1RpbWUsIGRhdGVGb3JtYXQsIHRpbWVGb3JtYXQsIHR6Rm9ybWF0O1xuXHRcblx0ICAgIGlmIChtYXRjaCkge1xuXHQgICAgICAgIGdldFBhcnNpbmdGbGFncyhjb25maWcpLmlzbyA9IHRydWU7XG5cdFxuXHQgICAgICAgIGZvciAoaSA9IDAsIGwgPSBpc29EYXRlcy5sZW5ndGg7IGkgPCBsOyBpKyspIHtcblx0ICAgICAgICAgICAgaWYgKGlzb0RhdGVzW2ldWzFdLmV4ZWMobWF0Y2hbMV0pKSB7XG5cdCAgICAgICAgICAgICAgICBkYXRlRm9ybWF0ID0gaXNvRGF0ZXNbaV1bMF07XG5cdCAgICAgICAgICAgICAgICBhbGxvd1RpbWUgPSBpc29EYXRlc1tpXVsyXSAhPT0gZmFsc2U7XG5cdCAgICAgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAoZGF0ZUZvcm1hdCA9PSBudWxsKSB7XG5cdCAgICAgICAgICAgIGNvbmZpZy5faXNWYWxpZCA9IGZhbHNlO1xuXHQgICAgICAgICAgICByZXR1cm47XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGlmIChtYXRjaFszXSkge1xuXHQgICAgICAgICAgICBmb3IgKGkgPSAwLCBsID0gaXNvVGltZXMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG5cdCAgICAgICAgICAgICAgICBpZiAoaXNvVGltZXNbaV1bMV0uZXhlYyhtYXRjaFszXSkpIHtcblx0ICAgICAgICAgICAgICAgICAgICAvLyBtYXRjaFsyXSBzaG91bGQgYmUgJ1QnIG9yIHNwYWNlXG5cdCAgICAgICAgICAgICAgICAgICAgdGltZUZvcm1hdCA9IChtYXRjaFsyXSB8fCAnICcpICsgaXNvVGltZXNbaV1bMF07XG5cdCAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH1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igwLDMpICE9PSBtb21lbnREYXkpIHtcblx0ICAgICAgICAgICAgICAgIGdldFBhcnNpbmdGbGFncyhjb25maWcpLndlZWtkYXlNaXNtYXRjaCA9IHRydWU7XG5cdCAgICAgICAgICAgICAgICBjb25maWcuX2lzVmFsaWQgPSBmYWxzZTtcblx0ICAgICAgICAgICAgICAgIHJldHVybjtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH1cblx0XG5cdCAgICAgICAgc3dpdGNoIChtYXRjaFs1XS5sZW5ndGgpIHtcblx0ICAgICAgICAgICAgY2FzZSAyOiAvLyBtaWxpdGFyeVxuXHQgICAgICAgICAgICAgICAgaWYgKHRpbWV6b25lSW5kZXggPT09IDApIHtcblx0ICAgICAgICAgICAgICAgICAgICB0aW1lem9uZSA9ICcgKzAwMDAnO1xuXHQgICAgICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgICAgICB0aW1lem9uZUluZGV4ID0gbWlsaXRhcnkuaW5kZXhPZihtYXRjaFs1XVsxXS50b1VwcGVyQ2FzZSgpKSAtIDEyO1xuXHQgICAgICAgICAgICAgICAgICAgIHRpbWV6b25lID0gKCh0aW1lem9uZUluZGV4IDwgMCkgPyAnIC0nIDogJyArJykgK1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAoKCcnICsgdGltZXpvbmVJbmRleCkucmVwbGFjZSgvXi0/LywgJzAnKSkubWF0Y2goLy4uJC8pWzBdICsgJzAwJztcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIGJyZWFrO1xuXHQgICAgICAgICAgICBjYXNlIDQ6IC8vIFpvbmVcblx0ICAgICAgICAgICAgICAgIHRpbWV6b25lID0gdGltZXpvbmVzW21hdGNoWzVdXTtcblx0ICAgICAgICAgICAgICAgIGJyZWFrO1xuXHQgICAgICAgICAgICBkZWZhdWx0OiAvLyBVVCBvciArLy05OTk5XG5cdCAgICAgICAgICAgICAgICB0aW1lem9uZSA9IHRpbWV6b25lc1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ICB9IGVsc2Uge1xuXHQgICAgICAgICAgICBkdXJhdGlvbi5taWxsaXNlY29uZHMgPSBpbnB1dDtcblx0ICAgICAgICB9XG5cdCAgICB9IGVsc2UgaWYgKCEhKG1hdGNoID0gYXNwTmV0UmVnZXguZXhlYyhpbnB1dCkpKSB7XG5cdCAgICAgICAgc2lnbiA9IChtYXRjaFsxXSA9PT0gJy0nKSA/IC0xIDogMTtcblx0ICAgICAgICBkdXJhdGlvbiA9IHtcblx0ICAgICAgICAgICAgeSAgOiAwLFxuXHQgICAgICAgICAgICBkICA6IHRvSW50KG1hdGNoW0RBVEVdKSAgICAgICAgICAgICAgICAgICAgICAgICAqIHNpZ24sXG5cdCAgICAgICAgICAgIGggIDogdG9JbnQobWF0Y2hbSE9VUl0pICAgICAgICAgICAgICAgICAgICAgICAgICogc2lnbixcblx0ICAgICAgICAgICAgbSAgOiB0b0ludChtYXRjaFtNSU5VVEVdKSAgICAgICAgICAgICAgICAgICAgICAgKiBzaWduLFxuXHQgICAgICAgICAgICBzICA6IHRvSW50KG1hdGNoW1NFQ09ORF0pICAgICAgICAgICAgICAgICAgICAgICAqIHNpZ24sXG5cdCAgICAgICAgICAgIG1zIDogdG9JbnQoYWJzUm91bmQobWF0Y2hbTUlMTElTRUNPTkRdICogMTAwMCkpICogc2lnbiAvLyB0aGUgbWlsbGlzZWNvbmQgZGVjaW1hbCBwb2ludCBpcyBpbmNsdWRlZCBpbiB0aGUgbWF0Y2hcblx0ICAgICAgICB9O1xuXHQgICAgfSBlbHNlIGlmICghIShtYXRjaCA9IGlzb1JlZ2V4LmV4ZWMoaW5wdXQpKSkge1xuXHQgICAgICAgIHNpZ24gPSAobWF0Y2hbMV0gPT09ICctJykgPyAtMSA6IDE7XG5cdCAgICAgICAgZHVyYXRpb24gPSB7XG5cdCAgICAgICAgICAgIHkgOiBwYXJzZUlzbyhtYXRjaFsyXSwgc2lnbiksXG5cdCAgICAgICAgICAgIE0gOiBwYXJzZUlzbyhtYXRjaFszXS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yQWZ0ZXIgICAgID0gaXNTYW1lT3JBZnRlcjtcblx0cHJvdG8uaXNTYW1lT3JCZWZvcmUgICAgPSBpc1NhbWVPckJlZm9yZTtcblx0cHJvdG8uaXNWYWxpZCAgICAgICAgICAgPSBpc1ZhbGlkJDI7XG5cdHByb3RvLmxhbmcgICAgICAgICAgICAgID0gbGFuZztcblx0cHJvdG8ubG9jYWxlICAgICAgICAgICAgPSBsb2NhbGU7XG5cdHByb3RvLmxvY2FsZURhdGEgICAgICAgID0gbG9jYWxlRGF0YTtcblx0cHJvdG8ubWF4ICAgICAgICAgICAgICAgPSBwcm90b3R5cGVNYXg7XG5cdHByb3RvLm1pbiAgICAgICAgICAgICAgID0gcHJvdG90eXBlTWluO1xuXHRwcm90by5wYXJzaW5nRmxhZ3MgICAgICA9IHBhcnNpbmdGbGFncztcblx0cHJvdG8uc2V0ICAgICAgICAgICAgICAgPSBzdHJpbmdTZXQ7XG5cdHByb3RvLnN0YXJ0T2YgICAgICAgICAgID0gc3RhcnRPZjtcblx0cHJvdG8uc3VidHJhY3QgICAgICAgICAgPSBzdWJ0cmFjdDtcblx0cHJvdG8udG9BcnJheSAgICAgICAgICAgPSB0b0FycmF5O1xuXHRwcm90by50b09iamVjdCAgICAgICAgICA9IHRvT2JqZWN0O1xuXHRwcm90by50b0RhdGUgICAgICAgICAgICA9IHRvRGF0ZTtcblx0cHJvdG8udG9JU09TdHJpbmcgICAgICAgPSB0b0lTT1N0cmluZztcblx0cHJvdG8uaW5zcGVjdCAgICAgICAgICAgPSBpbnNwZWN0O1xuXHRwcm90by50b0pTT04gICAgICAgICAgICA9IHRvSlNPTjtcblx0cHJvdG8udG9TdHJpbmcgICAgICAgICAgPSB0b1N0cmluZztcblx0cHJvdG8udW5peCAgICAgICAgICAgICAgPSB1bml4O1xuXHRwcm90by52YWx1ZU9mICAgICAgICAgICA9IHZhbHVlT2Y7XG5cdHByb3RvLmNyZWF0aW9uRGF0YSAgICAgID0gY3JlYXRpb25EYXRhO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1AnICtcblx0ICAgICAgICAoWSA/IFkgKyAnWScgOiAnJykgK1xuXHQgICAgICAgIChNID8gTSArICdNJyA6ICcnKSArXG5cdCAgICAgICAgKEQgPyBEICsgJ0QnIDogJycpICtcblx0ICAgICAgICAoKGggfHwgbSB8fCBzKSA/ICdUJyA6ICcnKSArXG5cdCAgICAgICAgKGggPyBoICsgJ0gnIDogJycpICtcblx0ICAgICAgICAobSA/IG0gKyAnTScgOiAnJykgK1xuXHQgICAgICAgIChzID8gcyArICdTJyA6ICcnKTtcblx0fVxuXHRcblx0dmFyIHByb3RvJDIgPSBEdXJhdGlvbi5wcm90b3R5cGU7XG5cdFxuXHRwcm90byQyLmlzVmFsaWQgICAgICAgID0gaXNWYWxpZCQxO1xuXHRwcm90byQyLmFicyAgICAgICAgICAgID0gYWJzO1xuXHRwcm90byQyLmFkZCAgICAgICAgICAgID0gYWRkJDE7XG5cdHByb3RvJDIuc3VidHJhY3QgICAgICAgPSBzdWJ0cmFjdCQxO1xuXHRwcm90byQyLmFzICAgICAgICAgICAgID0gYXM7XG5cdHByb3RvJDIuYXNNaWxsaXNlY29uZHMgPSBhc01pbGxpc2Vjb25kcztcblx0cHJvdG8kMi5hc1NlY29uZHMgICAgICA9IGFzU2Vjb25kcztcblx0cHJvdG8kMi5hc01pbnV0ZXMgICAgICA9IGFzTWludXRlcztcblx0cHJvdG8kMi5hc0hvdXJzICAgICAgICA9IGFzSG91cnM7XG5cdHByb3RvJDIuYXNEYXlzICAgICAgICAgPSBhc0RheXM7XG5cdHByb3RvJDIuYXNXZWVrcyAgICAgICAgPSBhc1dlZWtzO1xuXHRwcm90byQyLmFzTW9udGhzICAgICAgID0gYXNNb250aHM7XG5cdHByb3RvJDIuYXNZZWFycyAgICAgICAgPSBhc1llYXJzO1xuXHRwcm90byQyLnZhbHVlT2YgICAgICAgID0gdmFsdWVPZiQxO1xuXHRwcm90byQyLl9idWJibGUgICAgICAgID0gYnViYmxlO1xuXHRwcm90byQyLmdldCAgICAg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VG9rZW4oJ3gnLCAwLCAwLCAndmFsdWVPZicpO1xuXHRcblx0Ly8gUEFSU0lOR1xuXHRcblx0YWRkUmVnZXhUb2tlbigneCcsIG1hdGNoU2lnbmVkKTtcblx0YWRkUmVnZXhUb2tlbignWCcsIG1hdGNoVGltZXN0YW1wKTtcblx0YWRkUGFyc2VUb2tlbignWCcsIGZ1bmN0aW9uIChpbnB1dCwgYXJyYXksIGNvbmZpZykge1xuXHQgICAgY29uZmlnLl9kID0gbmV3IERhdGUocGFyc2VGbG9hdChpbnB1dCwgMTApICogMTAwMCk7XG5cdH0pO1xuXHRhZGRQYXJzZVRva2VuKCd4JywgZnVuY3Rpb24gKGlucHV0LCBhcnJheSwgY29uZmlnKSB7XG5cdCAgICBjb25maWcuX2QgPSBuZXcgRGF0ZSh0b0ludChpbnB1dCkpO1xuXHR9KTtcblx0XG5cdC8vIFNpZGUgZWZmZWN0IGltcG9ydHNcblx0XG5cdFxuXHRob29rcy52ZXJzaW9uID0gJzIuMTguMSc7XG5cdFxuXHRzZXRIb29rQ2FsbGJhY2soY3JlYXRlTG9jYWwpO1xuXHRcblx0aG9va3MuZm4gICAgICAgICAgICAgICAgICAgID0gcHJvdG87XG5cdGhvb2tzLm1pbiAgICAgICAgICAgICAgICAgICA9IG1pbjtcblx0aG9va3MubWF4ICAgICAgICAgICAgICAgICAgID0gbWF4O1xuXHRob29rcy5ub3cgICAgICAgICAgICAgICAgICAgPSBub3c7XG5cdGhvb2tzLnV0YyAgICAgICAgICAgICAgICAgICA9IGNyZWF0ZVVUQztcblx0aG9va3MudW5peCAgICAgICAgICAgICAgICAgID0gY3JlYXRlVW5peDtcblx0aG9va3MubW9udGhzICAgICAgICAgICAgICAgID0gbGlzdE1vbnRocztcblx0aG9va3MuaXNEYXRlICAgICAgICAgICAgICAgID0gaXNEYXRlO1xuXHRob29rcy5sb2NhbGUgICAgICAgICAgICAgICAgPSBnZXRTZXRHbG9iYWxMb2NhbGU7XG5cdGhvb2tzLmludmFs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HQgICAgaWYgKCFfYnApIF9icCA9IF9jYWNoZVxuXHRcblx0ICAgIHZhclxuXHQgICAgICBwYXJ0cyA9IFtdLFxuXHQgICAgICBtYXRjaCxcblx0ICAgICAgaXNleHByLFxuXHQgICAgICBzdGFydCxcblx0ICAgICAgcG9zLFxuXHQgICAgICByZSA9IF9icFs2XVxuXHRcblx0ICAgIGlzZXhwciA9IHN0YXJ0ID0gcmUubGFzdEluZGV4ID0gMFxuXHRcblx0ICAgIHdoaWxlICgobWF0Y2ggPSByZS5leGVjKHN0cikpKSB7XG5cdFxuXHQgICAgICBwb3MgPSBtYXRjaC5pbmRleFxuXHRcblx0ICAgICAgaWYgKGlzZXhwcikge1xuXHRcblx0ICAgICAgICBpZiAobWF0Y2hbMl0pIHtcblx0ICAgICAgICAgIHJlLmxhc3RJbmRleCA9IHNraXBCcmFjZXMoc3RyLCBtYXRjaFsyXSwgcmUubGFzdEluZGV4KVxuXHQgICAgICAgICAgY29udGludWVcblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKCFtYXRjaFszXSkge1xuXHQgICAgICAgICAgY29udGludWVcblx0ICAgICAgICB9XG5cdCAgICAgIH1cblx0XG5cdCAgICAgIGlmICghbWF0Y2hbMV0pIHtcblx0ICAgICAgICB1bmVzY2FwZVN0cihzdHIuc2xpY2Uoc3RhcnQsIHBvcykpXG5cdCAgICAgICAgc3RhcnQgPSByZS5sYXN0SW5kZXhcblx0ICAgICAgICByZSA9IF9icFs2ICsgKGlzZXhwciBePSAxKV1cblx0ICAgICAgICByZS5sYXN0SW5kZXggPSBzdGFydFxuXHQgICAgICB9XG5cdCAgICB9XG5cdFxuXHQgICAgaWYgKHN0ciAmJiBzdGFydCA8IHN0ci5sZW5ndGgpIHtcblx0ICAgICAgdW5lc2NhcGVTdHIoc3RyLnNsaWNlKHN0YXJ0KSlcblx0ICAgIH1cblx0XG5cdCAgICByZXR1cm4gcGFydHNcblx0XG5cdCAgICBmdW5jdGlvbiB1bmVzY2FwZVN0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Ht9LD9cXC46XSlcXCA/L2csICckMScpXG5cdFxuXHQgICAgaWYgKGV4cHIpIHtcblx0ICAgICAgdmFyXG5cdCAgICAgICAgbGlzdCA9IFtdLFxuXHQgICAgICAgIGNudCA9IDAsXG5cdCAgICAgICAgbWF0Y2hcblx0XG5cdCAgICAgIHdoaWxlIChleHByICYmXG5cdCAgICAgICAgICAgIChtYXRjaCA9IGV4cHIubWF0Y2goUkVfQ1NOQU1FKSkgJiZcblx0ICAgICAgICAgICAgIW1hdGNoLmluZGV4XG5cdCAgICAgICAgKSB7XG5cdCAgICAgICAgdmFyXG5cdCAgICAgICAgICBrZXksXG5cdCAgICAgICAgICBqc2IsXG5cdCAgICAgICAgICByZSA9IC8sfChbW3soXSl8JC9nXG5cdFxuXHQgICAgICAgIGV4cHIgPSBSZWdFeHAucmlnaHRDb250ZXh0XG5cdCAgICAgICAga2V5ICA9IG1hdGNoWzJdID8gcXN0clttYXRjaFsyXV0uc2xpY2UoMSwgLTEpLnRyaW0oKS5yZXBsYWNlKC9cXHMrL2csICcgJykgOiBtYXRjaFsxXVxuXHRcblx0ICAgICAgICB3aGlsZSAoanNiID0gKG1hdGNoID0gcmUuZXhlYyhleHByKSlbMV0pIHNraXBCcmFjZXMoanNiLCByZSlcblx0XG5cdCAgICAgICAganNiICA9IGV4cHIuc2xpY2UoMCwgbWF0Y2guaW5kZXgpXG5cdCAgICAgICAgZXhwciA9IFJlZ0V4cC5yaWdodENvbnRleHRcblx0XG5cdCAgICAgICAgbGlzdFtjbnQrK10gPSBfd3JhcEV4cHIoanNiLCAxLCBrZXkpXG5cdCAgICAgIH1cblx0XG5cdCAgICAgIGV4cHIgPSAhY250ID8gX3dyYXBFeHByKGV4cHIsIGFzVGV4dClcblx0ICAgICAgICAgICA6IGNudCA+IDEgPyAnWycgKyBsaXN0LmpvaW4oJywnKSArICddLmpvaW4oXCIgXCIpLnRyaW0oKScgOiBsaXN0WzBdXG5cdCAgICB9XG5cdCAgICByZXR1cm4gZXhw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aXRpb24xO1xuXHQgICAgICAgICAgZGlzcGF0Y2goe1xuXHQgICAgICAgICAgICB0eXBlOiBcImRyYWdcIixcblx0ICAgICAgICAgICAgeDogcG9zaXRpb24xWzBdICsgZHJhZ09mZnNldFswXSxcblx0ICAgICAgICAgICAgeTogcG9zaXRpb24xWzFdICsgZHJhZ09mZnNldFsxXSxcblx0ICAgICAgICAgICAgZHg6IGR4LFxuXHQgICAgICAgICAgICBkeTogZHlcblx0ICAgICAgICAgIH0pO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBmdW5jdGlvbiBlbmRlZCgpIHtcblx0ICAgICAgICAgIGlmICghcG9zaXRpb24ocGFyZW50LCBkcmFnSWQpKSByZXR1cm47XG5cdCAgICAgICAgICBkcmFnU3ViamVjdC5vbihtb3ZlICsgZHJhZ05hbWUsIG51bGwpLm9uKGVuZCArIGRyYWdOYW1lLCBudWxsKTtcblx0ICAgICAgICAgIGRyYWdSZXN0b3JlKGRyYWdnZWQpO1xuXHQgICAgICAgICAgZGlzcGF0Y2goe1xuXHQgICAgICAgICAgICB0eXBlOiBcImRyYWdlbmRcIlxuXHQgICAgICAgICAgfSk7XG5cdCAgICAgICAgfVxuXHQgICAgICB9O1xuXHQgICAgfVxuXHQgICAgZHJhZy5vcmlnaW4gPSBmdW5jdGlvbih4KSB7XG5cdCAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIG9yaWdpbjtcblx0ICAgICAgb3JpZ2luID0geDtcblx0ICAgICAgcmV0dXJuIGRyYWc7XG5cdCAgICB9O1xuXHQgICAgcmV0dXJuIGQzLnJlYmluZChkcmFnLCBldmVudCwgXCJvblwiKTtcblx0ICB9O1xuXHQgIGZ1bmN0aW9uIGQzX2JlaGF2aW9yX2RyYWdUb3VjaElkKCkge1xuXHQgICAgcmV0dXJuIGQzLmV2ZW50LmNoYW5nZWRUb3VjaGVzWzBdLmlkZW50aWZpZXI7XG5cdCAgfVxuXHQgIGQzLnRvdWNoZXMgPSB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CA9IGkodCksIGsgPSBkeCAvIGxbMl07XG5cdCAgICAgICAgICAgICAgdGhpcy5fX2NoYXJ0X18gPSB2aWV3ID0ge1xuXHQgICAgICAgICAgICAgICAgeDogY3ggLSBsWzBdICogayxcblx0ICAgICAgICAgICAgICAgIHk6IGN5IC0gbFsxXSAqIGssXG5cdCAgICAgICAgICAgICAgICBrOiBrXG5cdCAgICAgICAgICAgICAgfTtcblx0ICAgICAgICAgICAgICB6b29tZWQoZGlzcGF0Y2gpO1xuXHQgICAgICAgICAgICB9O1xuXHQgICAgICAgICAgfSkuZWFjaChcImludGVycnVwdC56b29tXCIsIGZ1bmN0aW9uKCkge1xuXHQgICAgICAgICAgICB6b29tZW5kZWQoZGlzcGF0Y2gpO1xuXHQgICAgICAgICAgfSkuZWFjaChcImVuZC56b29tXCIsIGZ1bmN0aW9uKCkge1xuXHQgICAgICAgICAgICB6b29tZW5kZWQoZGlzcGF0Y2gpO1xuXHQgICAgICAgICAgfSk7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgIHRoaXMuX19jaGFydF9fID0gdmlldztcblx0ICAgICAgICAgIHpvb21zdGFydGVkKGRpc3BhdGNoKTtcblx0ICAgICAgICAgIHpvb21lZChkaXNwYXRjaCk7XG5cdCAgICAgICAgICB6b29tZW5kZWQoZGlzcGF0Y2gpO1xuXHQgICAgICAgIH1cblx0ICAgICAgfSk7XG5cdCAgICB9O1xuXHQgICAgem9vbS50cmFuc2xhdGUgPSBmdW5jdGlvbihfKSB7XG5cdCAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIFsgdmlldy54LCB2aWV3LnkgXTtcblx0ICAgICAgdmlldyA9IHtcblx0ICAgICAgICB4OiArX1swXSxcblx0ICAgICAgICB5OiArX1sxXSxcblx0ICAgICAgICBrOiB2aWV3Lmtcblx0ICAgICAgfTtcblx0ICAgICAgcmVzY2FsZSgpO1xuXHQgICAgICByZXR1cm4gem9vbTtcblx0ICAgIH07XG5cdCAgICB6b29tLnNjYWxlID0gZnVuY3Rpb24oXykge1xuXHQgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiB2aWV3Lms7XG5cdCAgICAgIHZpZXcgPSB7XG5cdCAgICAgICAgeDogdmlldy54LFxuXHQgICAgICAgIHk6IHZpZXcueSxcblx0ICAgICAgICBrOiBudWxsXG5cdCAgICAgIH07XG5cdCAgICAgIHNjYWxlVG8oK18pO1xuXHQgICAgICByZXNjYWxlKCk7XG5cdCAgICAgIHJldHVybiB6b29tO1xuXHQgICAgfTtcblx0ICAgIHpvb20uc2NhbGVFeHRlbnQgPSBmdW5jdGlvbihfKSB7XG5cdCAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIHNjYWxlRXh0ZW50O1xuXHQgICAgICBzY2FsZUV4dGVudCA9IF8gPT0gbnVsbCA/IGQzX2JlaGF2aW9yX3pvb21JbmZpbml0eSA6IFsgK19bMF0sICtfWzFdIF07XG5cdCAgICAgIHJldHVybiB6b29tO1xuXHQgICAgfTtcblx0ICAgIHpvb20uY2VudGVyID0gZnVuY3Rpb24oXykge1xuXHQgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBjZW50ZXI7XG5cdCAgICAgIGNlbnRlciA9IF8gJiYgWyArX1swXSwgK19bMV0gXTtcblx0ICAgICAgcmV0dXJuIHpvb207XG5cdCAgICB9O1xuXHQgICAgem9vbS5zaXplID0gZnVuY3Rpb24oXykge1xuXHQgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBzaXplO1xuXHQgICAgICBzaXplID0gXyAmJiBbICtfWzBdLCArX1sxXSBdO1xuXHQgICAgICByZXR1cm4gem9vbTtcblx0ICAgIH07XG5cdCAgICB6b29tLmR1cmF0aW9uID0gZnVuY3Rpb24oXykge1xuXHQgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBkdXJhdGlvbjtcblx0ICAgICAgZHVyYXRpb24gPSArXztcblx0ICAgICAgcmV0dXJuIHpvb207XG5cdCAgICB9O1xuXHQgICAgem9vbS54ID0gZnVuY3Rpb24oeikge1xuXHQgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiB4MTtcblx0ICAgICAgeDEgPSB6O1xuXHQgICAgICB4MCA9IHouY29weSgpO1xuXHQgICAgICB2aWV3ID0ge1xuXHQgICAgICAgIHg6IDAsXG5cdCAgICAgICAgeTogMCxcblx0ICAgICAgICBrOiAxXG5cdCAgICAgIH07XG5cdCAgICAgIHJldHVybiB6b29tO1xuXHQgICAgfTtcblx0ICAgIHpvb20ueSA9IGZ1bmN0aW9uKHopIHtcblx0ICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4geTE7XG5cdCAgICAgIHkxID0gejtcblx0ICAgICAgeTAgPSB6LmNvcHkoKTtcblx0ICAgICAgdmlldyA9IHtcblx0ICAgICAgICB4OiAwLFxuXHQgICAgICAgIHk6IDAsXG5cdCAgICAgICAgazogMVxuXHQgICAgICB9O1xuXHQgICAgICByZXR1cm4gem9vbTtcblx0ICAgIH07XG5cdCAgICBmdW5jdGlvbiBsb2NhdGlvbihwKSB7XG5cdCAgICAgIHJldHVybiBbIChwWzBdIC0gdmlldy54KSAvIHZpZXcuaywgKHBbMV0gLSB2aWV3LnkpIC8gdmlldy5rIF07XG5cdCAgICB9XG5cdCAgICBmdW5jdGlvbiBwb2ludChsKSB7XG5cdCAgICAgIHJldHVybiBbIGxbMF0gKiB2aWV3LmsgKyB2aWV3LngsIGxbMV0gKiB2aWV3LmsgKyB2aWV3LnkgXTtcblx0ICAgIH1cblx0ICAgIGZ1bmN0aW9uIHNjYWxlVG8ocykge1xuXHQgICAgICB2aWV3LmsgPSBNYXRoLm1heChzY2FsZUV4dGVudFswXSwgTWF0aC5taW4oc2NhbGVFeHRlbnRbMV0sIHMpKTtcblx0ICAgIH1cblx0ICAgIGZ1bmN0aW9uIHRyYW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AgICAgICAgcDAgPSBbIChwMFswXSArIHAxWzBdKSAvIDIsIChwMFsxXSArIHAxWzFdKSAvIDIgXTtcblx0ICAgICAgICAgIGwwID0gWyAobDBbMF0gKyBsMVswXSkgLyAyLCAobDBbMV0gKyBsMVsxXSkgLyAyIF07XG5cdCAgICAgICAgICBzY2FsZVRvKHNjYWxlMSAqIHNjYWxlMCk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHRvdWNodGltZSA9IG51bGw7XG5cdCAgICAgICAgdHJhbnNsYXRlVG8ocDAsIGwwKTtcblx0ICAgICAgICB6b29tZWQoZGlzcGF0Y2gpO1xuXHQgICAgICB9XG5cdCAgICAgIGZ1bmN0aW9uIGVuZGVkKCkge1xuXHQgICAgICAgIGlmIChkMy5ldmVudC50b3VjaGVzLmxlbmd0aCkge1xuXHQgICAgICAgICAgdmFyIGNoYW5nZWQgPSBkMy5ldmVudC5jaGFuZ2VkVG91Y2hlcztcblx0ICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBuID0gY2hhbmdlZC5sZW5ndGg7IGkgPCBuOyArK2kpIHtcblx0ICAgICAgICAgICAgZGVsZXRlIGxvY2F0aW9uczBbY2hhbmdlZFtpXS5pZGVudGlmaWVyXTtcblx0ICAgICAgICAgIH1cblx0ICAgICAgICAgIGZvciAodmFyIGlkZW50aWZpZXIgaW4gbG9jYXRpb25zMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gdm9pZCByZWxvY2F0ZSgpO1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgIH1cblx0ICAgICAgICBkMy5zZWxlY3RBbGwodGFyZ2V0cykub24oem9vbU5hbWUsIG51bGwpO1xuXHQgICAgICAgIHN1YmplY3Qub24obW91c2Vkb3duLCBtb3VzZWRvd25lZCkub24odG91Y2hzdGFydCwgdG91Y2hzdGFydGVkKTtcblx0ICAgICAgICBkcmFnUmVzdG9yZSgpO1xuXHQgICAgICAgIHpvb21lbmRlZChkaXNwYXRjaCk7XG5cdCAgICAgIH1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b2tlbigpIHtcblx0ICAgICAgICBpZiAoSSA+PSBOKSByZXR1cm4gRU9GO1xuXHQgICAgICAgIGlmIChlb2wpIHJldHVybiBlb2wgPSBmYWxzZSwgRU9MO1xuXHQgICAgICAgIHZhciBqID0gSTtcblx0ICAgICAgICBpZiAodGV4dC5jaGFyQ29kZUF0KGopID09PSAzNCkge1xuXHQgICAgICAgICAgdmFyIGkgPSBqO1xuXHQgICAgICAgICAgd2hpbGUgKGkrKyA8IE4pIHtcblx0ICAgICAgICAgICAgaWYgKHRleHQuY2hhckNvZGVBdChpKSA9PT0gMzQpIHtcblx0ICAgICAgICAgICAgICBpZiAodGV4dC5jaGFyQ29kZUF0KGkgKyAxKSAhPT0gMzQpIGJyZWFrO1xuXHQgICAgICAgICAgICAgICsraTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgfVxuXHQgICAgICAgICAgSSA9IGkgKyAyO1xuXHQgICAgICAgICAgdmFyIGMgPSB0ZXh0LmNoYXJDb2RlQXQoaSArIDEpO1xuXHQgICAgICAgICAgaWYgKGMgPT09IDEzKSB7XG5cdCAgICAgICAgICAgIGVvbCA9IHRydWU7XG5cdCAgICAgICAgICAgIGlmICh0ZXh0LmNoYXJDb2RlQXQoaSArIDIpID09PSAxMCkgKytJO1xuXHQgICAgICAgICAgfSBlbHNlIGlmIChjID09PSAxMCkge1xuXHQgICAgICAgICAgICBlb2wgPSB0cnVlO1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgICAgcmV0dXJuIHRleHQuc2xpY2UoaiArIDEsIGkpLnJlcGxhY2UoL1wiXCIvZywgJ1wiJyk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHdoaWxlIChJIDwgTikge1xuXHQgICAgICAgICAgdmFyIGMgPSB0ZXh0LmNoYXJDb2RlQXQoSSsrKSwgayA9IDE7XG5cdCAgICAgICAgICBpZiAoYyA9PT0gMTApIGVvbCA9IHRydWU7IGVsc2UgaWYgKGMgPT09IDEzKSB7XG5cdCAgICAgICAgICAgIGVvbCA9IHRydWU7XG5cdCAgICAgICAgICAgIGlmICh0ZXh0LmNoYXJDb2RlQXQoSSkgPT09IDEwKSArK0ksICsraztcblx0ICAgICAgICAgIH0gZWxzZSBpZiAoYyAhPT0gZGVsaW1pdGVyQ29kZSkgY29udGludWU7XG5cdCAgICAgICAgICByZXR1cm4gdGV4dC5zbGljZShqLCBJIC0gayk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHJldHVybiB0ZXh0LnNsaWNlKGopO1xuXHQgICAgICB9XG5cdCAgICAgIHdoaWxlICgodCA9IHRva2VuKCkpICE9PSBFT0YpIHtcblx0ICAgICAgICB2YXIgYSA9IFtdO1xuXHQgICAgICAgIHdoaWxlICh0ICE9PSBFT0wgJiYgdCAhPT0gRU9GKSB7XG5cdCAgICAgICAgICBhLnB1c2godCk7XG5cdCAgICAgICAgICB0ID0gdG9rZW4oKTtcblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKGYgJiYgKGEgPSBmKGEsIG4rKykpID09IG51bGwpIGNvbnRpbnVlO1xuXHQgICAgICAgIHJvd3MucHVzaChhKTtcblx0ICAgICAgfVxuXHQgICAgICByZXR1cm4gcm93cztcblx0ICAgIH07XG5cdCAgICBkc3YuZm9ybWF0ID0gZnVuY3Rpb24ocm93cykge1xuXHQgICAgICBpZiAoQXJyYXkuaXNBcnJheShyb3dzWzBdKSkgcmV0dXJuIGRzdi5mb3JtYXRSb3dzKHJvd3MpO1xuXHQgICAgICB2YXIgZmllbGRTZXQgPSBuZXcgZDNfU2V0KCksIGZpZWxkcyA9IFtdO1xuXHQgICAgICByb3dzLmZvckVhY2goZnVuY3Rpb24ocm93KSB7XG5cdCAgICAgICAgZm9yICh2YXIgZmllbGQgaW4gcm93KSB7XG5cdCAgICAgICAgICBpZiAoIWZpZWxkU2V0LmhhcyhmaWVsZCkpIHtcblx0ICAgICAgICAgICAgZmllbGRzLnB1c2goZmllbGRTZXQuYWRkKGZpZWxkKSk7XG5cdCAgICA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gICAgICAgIGlmICgocCA9IGQzX3RpbWVfZm9ybWF0UGFkc1tjID0gdGVtcGxhdGUuY2hhckF0KCsraSldKSAhPSBudWxsKSBjID0gdGVtcGxhdGUuY2hhckF0KCsraSk7XG5cdCAgICAgICAgICAgIGlmIChmID0gZDNfdGltZV9mb3JtYXRzW2NdKSBjID0gZihkYXRlLCBwID09IG51bGwgPyBjID09PSBcImVcIiA/IFwiIFwiIDogXCIwXCIgOiBwKTtcblx0ICAgICAgICAgICAgc3RyaW5nLnB1c2goYyk7XG5cdCAgICAgICAgICAgIGogPSBpICsgMTtcblx0ICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgICAgc3RyaW5nLnB1c2godGVtcGxhdGUuc2xpY2UoaiwgaSkpO1xuXHQgICAgICAgIHJldHVybiBzdHJpbmcuam9pbihcIlwiKTtcblx0ICAgICAgfVxuXHQgICAgICBmb3JtYXQucGFyc2UgPSBmdW5jdGlvbihzdHJpbmcpIHtcblx0ICAgICAgICB2YXIgZCA9IHtcblx0ICAgICAgICAgIHk6IDE5MDAsXG5cdCAgICAgICAgICBtOiAwLFxuXHQgICAgICAgICAgZDogMSxcblx0ICAgICAgICAgIEg6IDAsXG5cdCAgICAgICAgICBNOiAwLFxuXHQgICAgICAgICAgUzogMCxcblx0ICAgICAgICAgIEw6IDAsXG5cdCAgICAgICAgICBaOiBudWxsXG5cdCAgICAgICAgfSwgaSA9IGQzX3RpbWVfcGFyc2UoZCwgdGVtcGxhdGUsIHN0cmluZywgMCk7XG5cdCAgICAgICAgaWYgKGkgIT0gc3RyaW5nLmxlbmd0aCkgcmV0dXJuIG51bGw7XG5cdCAgICAgICAgaWYgKFwicFwiIGluIGQpIGQuSCA9IGQuSCAlIDEyICsgZC5wICogMTI7XG5cdCAgICAgICAgdmFyIGxvY2FsWiA9IGQuWiAhPSBudWxsICYmIGQzX2RhdGUgIT09IGQzX2RhdGVfdXRjLCBkYXRlID0gbmV3IChsb2NhbFogPyBkM19kYXRlX3V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ID49IG0pIHJldHVybiAtMTtcblx0ICAgICAgICBjID0gdGVtcGxhdGUuY2hhckNvZGVBdChpKyspO1xuXHQgICAgICAgIGlmIChjID09PSAzNykge1xuXHQgICAgICAgICAgdCA9IHRlbXBsYXRlLmNoYXJBdChpKyspO1xuXHQgICAgICAgICAgcCA9IGQzX3RpbWVfcGFyc2Vyc1t0IGluIGQzX3RpbWVfZm9ybWF0UGFkcyA/IHRlbXBsYXRlLmNoYXJBdChpKyspIDogdF07XG5cdCAgICAgICAgICBpZiAoIXAgfHwgKGogPSBwKGRhdGUsIHN0cmluZywgaikpIDwgMCkgcmV0dXJuIC0xO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoYyAhPSBzdHJpbmcuY2hhckNvZGVBdChqKyspKSB7XG5cdCAgICAgICAgICByZXR1cm4gLTE7XG5cdCAgICAgICAgfVxuXHQgICAgICB9XG5cdCAgICAgIHJldHVybiBqO1xuXHQgICAgfVxuXHQgICAgZDNfdGltZV9mb3JtYXQudXRjID0gZnVuY3Rpb24odGVtcGxhdGUpIHtcblx0ICAgICAgdmFyIGxvY2FsID0gZDNfdGltZV9mb3JtYXQodGVtcGxhdGUpO1xuXHQgICAgICBmdW5jdGlvbiBmb3JtYXQoZGF0ZSkge1xuXHQgICAgICAgIHRyeSB7XG5cdCAgICAgICAgICBkM19kYXRlID0gZDNfZGF0ZV91dGM7XG5cdCAgICAgICAgICB2YXIgdXRjID0gbmV3IGQzX2RhdGUoKTtcblx0ICAgICAgICAgIHV0Yy5fID0gZGF0ZTtcblx0ICAgICAgICAgIHJldHVybiBsb2NhbCh1dGMpO1xuXHQgICAgICAgIH0gZmluYWxseSB7XG5cdCAgICAgICAgICBkM19kYXRlID0gRGF0ZTtcblx0ICAgICAgICB9XG5cdCAgICAgIH1cblx0ICAgICAgZm9ybWF0LnBhcnNlID0gZnVuY3Rpb24oc3RyaW5nKSB7XG5cdCAgICAgICAgdHJ5IHtcblx0ICAgICAgICAgIGQzX2RhdGUgPSBkM19k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AgICAgdzogZnVuY3Rpb24oZCkge1xuXHQgICAgICAgIHJldHVybiBkLmdldERheSgpO1xuXHQgICAgICB9LFxuXHQgICAgICBXOiBmdW5jdGlvbihkLCBwKSB7XG5cdCAgICAgICAgcmV0dXJuIGQzX3RpbWVfZm9ybWF0UGFkKGQzX3RpbWUubW9uZGF5T2ZZZWFyKGQpLCBwLCAyKTtcblx0ICAgICAgfSxcblx0ICAgICAgeDogZDNfdGltZV9mb3JtYXQobG9jYWxlX2RhdGUpLFxuXHQgICAgICBYOiBkM190aW1lX2Zvcm1hdChsb2NhbGVfdGltZSksXG5cdCAgICAgIHk6IGZ1bmN0aW9uKGQsIHApIHtcblx0ICAgICAgICByZXR1cm4gZDNfdGltZV9mb3JtYXRQYWQoZC5nZXRGdWxsWWVhcigpICUgMTAwLCBwLCAyKTtcblx0ICAgICAgfSxcblx0ICAgICAgWTogZnVuY3Rpb24oZCwgcCkge1xuXHQgICAgICAgIHJldHVybiBkM190aW1lX2Zvcm1hdFBhZChkLmdldEZ1bGxZZWFyKCkgJSAxZTQsIHAsIDQpO1xuXHQgICAgICB9LFxuXHQgICAgICBaOiBkM190aW1lX3pvbmUsXG5cdCAgICAgIFwiJVwiOiBmdW5jdGlvbigpIHtcblx0ICAgICAgICByZXR1cm4gXCIlXCI7XG5cdCAgICAgIH1cblx0ICAgIH07XG5cdCAgICB2YXIgZDNfdGltZV9wYXJzZXJzID0ge1xuXHQgICAgICBhOiBkM190aW1lX3BhcnNlV2Vla2RheUFiYnJldixcblx0ICAgICAgQTogZDNfdGltZV9wYXJzZVdlZWtkYXksXG5cdCAgICAgIGI6IGQzX3RpbWVfcGFyc2VNb250aEFiYnJldixcblx0ICAgICAgQjogZDNfdGltZV9wYXJzZU1vbnRoLFxuXHQgICAgICBjOiBkM190aW1lX3BhcnNlTG9jYWxlRnVsbCxcblx0ICAgICAgZDogZDNfdGltZV9wYXJzZURheSxcblx0ICAgICAgZTogZDNfdGltZV9wYXJzZURheSxcblx0ICAg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GluZmxlY3Rpb25bMV0gKiBkM19kZWdyZWVzO1xuXHQgICAgICAgICAgaWYgKM+GaSA+IM+GMSkgz4YxID0gz4ZpO1xuXHQgICAgICAgIH0gZWxzZSBpZiAozrtpID0gKM67aSArIDM2MCkgJSAzNjAgLSAxODAsIGFudGltZXJpZGlhbiBeIChzICogzrtfIDwgzrtpICYmIM67aSA8IHMgKiDOuykpIHtcblx0ICAgICAgICAgIHZhciDPhmkgPSAtaW5mbGVjdGlvblsxXSAqIGQzX2RlZ3JlZXM7XG5cdCAgICAgICAgICBpZiAoz4ZpIDwgz4YwKSDPhjAgPSDPhmk7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgIGlmICjPhiA8IM+GMCkgz4YwID0gz4Y7XG5cdCAgICAgICAgICBpZiAoz4YgPiDPhjEpIM+GMSA9IM+GO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAoYW50aW1lcmlkaWFuKSB7XG5cdCAgICAgICAgICBpZiAozrsgPCDOu18pIHtcblx0ICAgICAgICAgICAgaWYgKGFuZ2xlKM67MCwgzrspID4gYW5nbGUozrswLCDOuzEpKSDOuzEgPSDOuztcblx0ICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIGlmIChhbmdsZSjOuywgzrsxKSA+IGFuZ2xlKM67MCwgzrsxKSkgzrswID0gzrs7XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgIGlmICjOuzEgPj0gzrswKSB7XG5cdCAgICAgICAgICAgIGlmICjOuyA8IM67MCkgzrswID0gzrs7XG5cdCAgICAgICAgICAgIGlmICjOuyA+IM67MSkgzrsxID0gzrs7XG5cdCAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICBpZiAozrsgPiDOu18pIHtcblx0ICAgICAgICAgICAgICBpZiAoYW5nbGUozrswLCDOuykgPiBhbmdsZSjOuzAsIM67MSkpIM67MSA9IM67O1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgIGlmIChhbmdsZSjOuywgzrsxKSA+IGFuZ2xlKM67MCwgzrsxKSkgzrswID0gzrs7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgcG9pbnQozrssIM+GKTtcblx0ICAgICAgfVxuXHQgICAgICBwMCA9IHAsIM67XyA9IM67O1xuXHQgICAgfVxuXHQgICAgZnVuY3Rpb24gbGluZVN0YXJ0KCkge1xuXHQgICAgICBib3VuZC5wb2ludCA9IGxpbmVQb2ludDtcblx0ICAgIH1cblx0ICAgIGZ1bmN0aW9uIGxpbmVFbmQoKSB7XG5cdCAgICAgIHJhbmdlWzBdID0gzrswLCByYW5nZVsxXSA9IM67MTtcblx0ICAgICAgYm91bmQucG9pbnQgPSBwb2ludDtcblx0ICAgICAgcDAgPSBudWxsO1xuXHQgICAgfVxuXHQgICAgZnVuY3Rpb24gcmluZ1BvaW50KM67LCDPhikge1xuXHQgICAgICBpZiAocDApIHtcblx0ICAgICAgICB2YXIgZM67ID0gzrsgLSDOu187XG5cdCAgICAgICAgZM67U3VtICs9IGFicyhkzrspID4gMTgwID8gZM67ICsgKGTOuyA+IDAgPyAzNjAgOiAtMzYwKSA6IGTOuztcblx0ICAgICAgfSBlbHNlIM67X18gPSDOuywgz4ZfXyA9IM+GO1xuXHQgICAgICBkM19nZW9fYXJlYS5wb2ludCjOuywgz4YpO1xuXHQgICAgICBsaW5lUG9pbnQozrssIM+GKTtcblx0ICAgIH1cblx0ICAgIGZ1bmN0aW9uIHJpbmdTdGFydCgpIHtcblx0ICAgICAgZDNfZ2VvX2FyZWEubGluZVN0YXJ0KCk7XG5cdCAgICB9XG5cdCAgICBmdW5jdGlvbiByaW5nRW5kKCkge1xuXHQgICAgICByaW5nUG9pbnQozrtfXywgz4ZfXyk7XG5cdCAgICAgIGQzX2dlb19hcmVhLmxpbmVFbmQo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MCArIM+GMSkgLyAyID4gMCA/IGhhbGbPgCA6IC1oYWxmz4ApO1xuXHQgICAgICAgICAgbGlzdGVuZXIucG9pbnQoc867MCwgz4YwKTtcblx0ICAgICAgICAgIGxpc3RlbmVyLmxpbmVFbmQoKTtcblx0ICAgICAgICAgIGxpc3RlbmVyLmxpbmVTdGFydCgpO1xuXHQgICAgICAgICAgbGlzdGVuZXIucG9pbnQoc867MSwgz4YwKTtcblx0ICAgICAgICAgIGxpc3RlbmVyLnBvaW50KM67MSwgz4YwKTtcblx0ICAgICAgICAgIGNsZWFuID0gMDtcblx0ICAgICAgICB9IGVsc2UgaWYgKHPOuzAgIT09IHPOuzEgJiYgZM67ID49IM+AKSB7XG5cdCAgICAgICAgICBpZiAoYWJzKM67MCAtIHPOuzApIDwgzrUpIM67MCAtPSBzzrswICogzrU7XG5cdCAgICAgICAgICBpZiAoYWJzKM67MSAtIHPOuzEpIDwgzrUpIM67MSAtPSBzzrsxICogzrU7XG5cdCAgICAgICAgICDPhjAgPSBkM19nZW9fY2xpcEFudGltZXJpZGlhbkludGVyc2VjdCjOuzAsIM+GMCwgzrsxLCDPhjEpO1xuXHQgICAgICAgICAgbGlzdGVuZXIucG9pbnQoc867MCwgz4YwKTtcblx0ICAgICAgICAgIGxpc3RlbmVyLmxpbmVFbmQoKTtcblx0ICAgICAgICAgIGxpc3RlbmVyLmxpbmVTdGFydCgpO1xuXHQgICAgICAgICAgbGlzdGVuZXIucG9pbnQoc867MSwgz4YwKTtcblx0ICAgICAgICAgIGNsZWFuID0gMDtcblx0ICAgICAgICB9XG5cdCAgICAgICAgbGlzdGVuZXIucG9pbnQozrswID0gzrsxLCDPhjAgPSDPhjEpO1xuXHQgICAgICAgIHPOuzAgPSBzzrsxO1xuXHQgICAgICB9LFxuXHQgICAgICBsaW5lRW5kOiBmdW5jdGlvbigpIHtcblx0ICAgICAgICBsaXN0ZW5lci5saW5lRW5kKCk7XG5cdCAgICAgICAgzrswID0gz4YwID0gTmFOO1xu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ludDFbMF0sIHBvaW50MVsxXSk7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgIH1cblx0ICAgICAgICAgIGlmICh2ICE9PSB2MCkge1xuXHQgICAgICAgICAgICBjbGVhbiA9IDA7XG5cdCAgICAgICAgICAgIGlmICh2KSB7XG5cdCAgICAgICAgICAgICAgbGlzdGVuZXIubGluZVN0YXJ0KCk7XG5cdCAgICAgICAgICAgICAgcG9pbnQyID0gaW50ZXJzZWN0KHBvaW50MSwgcG9pbnQwKTtcblx0ICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludChwb2ludDJbMF0sIHBvaW50MlsxXSk7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgcG9pbnQyID0gaW50ZXJzZWN0KHBvaW50MCwgcG9pbnQxKTtcblx0ICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludChwb2ludDJbMF0sIHBvaW50MlsxXSk7XG5cdCAgICAgICAgICAgICAgbGlzdGVuZXIubGluZUVuZCgpO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHBvaW50MCA9IHBvaW50Mjtcblx0ICAgICAgICAgIH0gZWxzZSBpZiAobm90SGVtaXNwaGVyZSAmJiBwb2ludDAgJiYgc21hbGxSYWRpdXMgXiB2KSB7XG5cdCAgICAgICAgICAgIHZhciB0O1xuXHQgICAgICAgICAgICBpZiAoIShjICYgYzApICYmICh0ID0gaW50ZXJzZWN0KHBvaW50MSwgcG9pbnQwLCB0cnVlKSkpIHtcblx0ICAgICAgICAgICAgICBjbGVhbiA9IDA7XG5cdCAgICAgICAgICAgICAgaWYgKHNtYWxsUmFkaXVzKSB7XG5cdCAgICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lU3RhcnQoKTtcblx0ICAgICAgICAgICAgICAgIGxpc3RlbmVyLnBvaW50KHRbMF1bMF0sIHRbMF1bMV0pO1xuXHQgICAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQodFsxXVswXSwgdFsxXVsxXSk7XG5cdCAgICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lRW5kKCk7XG5cdCAgICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIGxpc3RlbmVyLnBvaW50KHRbMV1bMF0sIHRbMV1bMV0pO1xuXHQgICAgICAgICAgICAgICAgbGlzdGVuZXIubGluZUVuZCgpO1xuXHQgICAgICAgICAgICAgICAgbGlzdGVuZXIubGluZVN0YXJ0KCk7XG5cdCAgICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludCh0WzBdWzBdLCB0WzBdWzFdKTtcblx0ICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgIH1cblx0ICAgICAgICAgIGlmICh2ICYmICghcG9pbnQwIHx8ICFkM19nZW9fc3BoZXJpY2FsRXF1YWwocG9pbnQwLCBwb2ludDEpKSkge1xuXHQgICAgICAgICAgICBsaXN0ZW5lci5wb2ludChwb2ludDFbMF0sIHBvaW50MVsxXSk7XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgICBwb2ludDAgPSBwb2ludDEsIHYwID0gdiwgYzAgPSBjO1xuXHQgICAgICAgIH0sXG5cdCAgICAgICAgbGluZUVuZDogZnVuY3Rpb24oKSB7XG5cdCAgICAgICAgICBpZiAodjApIGxpc3RlbmVyLmxpbmVFbmQoKTtcblx0ICAgICAgICAgIHBvaW50MCA9IG51bGw7XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBjbGVhbjogZnVuY3Rpb24oKSB7XG5cdCAgICAgICAgICByZXR1cm4gY2xlYW4gfCAodjAwICYmIHYwKSA8PCAxO1xuXHQgICAgICAgIH1cblx0ICAgICAgfTtcblx0ICAgIH1cblx0ICAgIGZ1bmN0aW9uIGludGVyc2VjdChhLCBiLCB0d28pIHtcblx0ICAgICAgdmFyIHBhID0gZDNfZ2VvX2NhcnRlc2lhbihhKSwgcGIgPSBkM19nZW9fY2FydGVzaWFuKGIpO1xuXHQgIC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BkM19nZW9tX2NsaXBMaW5lKHgwLCB5MCwgeDEsIHkxKSB7XG5cdCAgICByZXR1cm4gZnVuY3Rpb24obGluZSkge1xuXHQgICAgICB2YXIgYSA9IGxpbmUuYSwgYiA9IGxpbmUuYiwgYXggPSBhLngsIGF5ID0gYS55LCBieCA9IGIueCwgYnkgPSBiLnksIHQwID0gMCwgdDEgPSAxLCBkeCA9IGJ4IC0gYXgsIGR5ID0gYnkgLSBheSwgcjtcblx0ICAgICAgciA9IHgwIC0gYXg7XG5cdCAgICAgIGlmICghZHggJiYgciA+IDApIHJldHVybjtcblx0ICAgICAgciAvPSBkeDtcblx0ICAgICAgaWYgKGR4IDwgMCkge1xuXHQgICAgICAgIGlmIChyIDwgdDApIHJldHVybjtcblx0ICAgICAgICBpZiAociA8IHQxKSB0MSA9IHI7XG5cdCAgICAgIH0gZWxzZSBpZiAoZHggPiAwKSB7XG5cdCAgICAgICAgaWYgKHIgPiB0MSkgcmV0dXJuO1xuXHQgICAgICAgIGlmIChyID4gdDApIHQwID0gcjtcblx0ICAgICAgfVxuXHQgICAgICByID0geDEgLSBheDtcblx0ICAgICAgaWYgKCFkeCAmJiByIDwgMCkgcmV0dXJuO1xuXHQgICAgICByIC89IGR4O1xuXHQgICAgICBpZiAoZHggPCAwKSB7XG5cdCAgICAgICAgaWYgKHIgPiB0MSkgcmV0dXJuO1xuXHQgICAgICAgIGlmIChyID4gdDApIHQwID0gcjtcblx0ICAgICAgfSBlbHNlIGlmIChkeCA+IDApIHtcblx0ICAgICAgICBpZiAociA8IHQwKSByZXR1cm47XG5cdCAgICAgICAgaWYgKHIgPCB0MSkgdDEgPSByO1xuXHQgICAgICB9XG5cdCAgICAgIHIgPSB5MCAtIGF5O1xuXHQgICAgICBpZiAoIWR5ICYmIHIgPiAwKSByZXR1cm47XG5cdCAgICAgIHIgLz0gZHk7XG5cdCAgICAgIGlmIChkeSA8IDApIHtcblx0ICAgICAgICBpZiAociA8IHQwKSByZXR1cm47XG5cdCAgIC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zdGVuZXIucG9seWdvbkVuZCgpO1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgICAgc2VnbWVudHMgPSBwb2x5Z29uID0gcmluZyA9IG51bGw7XG5cdCAgICAgICAgfVxuXHQgICAgICB9O1xuXHQgICAgICBmdW5jdGlvbiBpbnNpZGVQb2x5Z29uKHApIHtcblx0ICAgICAgICB2YXIgd24gPSAwLCBuID0gcG9seWdvbi5sZW5ndGgsIHkgPSBwWzFdO1xuXHQgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbjsgKytpKSB7XG5cdCAgICAgICAgICBmb3IgKHZhciBqID0gMSwgdiA9IHBvbHlnb25baV0sIG0gPSB2Lmxlbmd0aCwgYSA9IHZbMF0sIGI7IGogPCBtOyArK2opIHtcblx0ICAgICAgICAgICAgYiA9IHZbal07XG5cdCAgICAgICAgICAgIGlmIChhWzFdIDw9IHkpIHtcblx0ICAgICAgICAgICAgICBpZiAoYlsxXSA+IHkgJiYgZDNfY3Jvc3MyZChhLCBiLCBwKSA+IDApICsrd247XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgaWYgKGJbMV0gPD0geSAmJiBkM19jcm9zczJkKGEsIGIsIHApIDwgMCkgLS13bjtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBhID0gYjtcblx0ICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgICAgcmV0dXJuIHduICE9PSAwO1xuXHQgICAgICB9XG5cdCAgICAgIGZ1bmN0aW9uIGludGVycG9sYXRlKGZyb20sIHRvLCBkaXJlY3Rpb24sIGxpc3RlbmVyKSB7XG5cdCAgICAgICAgdmFyIGEgPSAwLCBhMSA9IDA7XG5cdCAgICAgICAgaWYgKGZyb20gPT0gbnVsbCB8fCAoYSA9IGNvcm5lcihmcm9tLCBkaXJlY3Rpb24pKSAhPT0gKGExID0gY29ybmVyKHRvLCBkaXJlY3Rpb24pKSB8fCBjb21wYXJlUG9pbnRzKGZy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ICAgIHk6IHlfXG5cdCAgICAgICAgICAgICAgfSxcblx0ICAgICAgICAgICAgICBiOiB7XG5cdCAgICAgICAgICAgICAgICB4OiB4LFxuXHQgICAgICAgICAgICAgICAgeTogeVxuXHQgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgfTtcblx0ICAgICAgICAgICAgaWYgKGNsaXBMaW5lKGwpKSB7XG5cdCAgICAgICAgICAgICAgaWYgKCF2Xykge1xuXHQgICAgICAgICAgICAgICAgbGlzdGVuZXIubGluZVN0YXJ0KCk7XG5cdCAgICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludChsLmEueCwgbC5hLnkpO1xuXHQgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludChsLmIueCwgbC5iLnkpO1xuXHQgICAgICAgICAgICAgIGlmICghdikgbGlzdGVuZXIubGluZUVuZCgpO1xuXHQgICAgICAgICAgICAgIGNsZWFuID0gZmFsc2U7XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAodikge1xuXHQgICAgICAgICAgICAgIGxpc3RlbmVyLmxpbmVTdGFydCgpO1xuXHQgICAgICAgICAgICAgIGxpc3RlbmVyLnBvaW50KHgsIHkpO1xuXHQgICAgICAgICAgICAgIGNsZWFuID0gZmFsc2U7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgICAgeF8gPSB4LCB5XyA9IHksIHZfID0gdjtcblx0ICAgICAgfVxuXHQgICAgICByZXR1cm4gY2xpcDtcblx0ICAgIH07XG5cdCAgICBmdW5jdGlvbiBjb3JuZXIocCwgZGlyZWN0aW9uKSB7XG5cdCAgICAgIHJldHVybiBhYnMocFswXSAtIHgwKSA8IM61ID8gZGlyZWN0aW9uID4gMCA/IDAgOiAzIDogYWJzKHBbMF0gLSB4MSkgPCDOtSA/IGRpcmVjdGlvbiA+IDAgPyAyIDogMSA6IGFicyhwWzFdIC0geTApIDwgzrUgPyBka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gICBwcm9qZWN0aW9uLnNjYWxlID0gZnVuY3Rpb24oXykge1xuXHQgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBrO1xuXHQgICAgICBrID0gK187XG5cdCAgICAgIHJldHVybiByZXNldCgpO1xuXHQgICAgfTtcblx0ICAgIHByb2plY3Rpb24udHJhbnNsYXRlID0gZnVuY3Rpb24oXykge1xuXHQgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBbIHgsIHkgXTtcblx0ICAgICAgeCA9ICtfWzBdO1xuXHQgICAgICB5ID0gK19bMV07XG5cdCAgICAgIHJldHVybiByZXNldCgpO1xuXHQgICAgfTtcblx0ICAgIHByb2plY3Rpb24uY2VudGVyID0gZnVuY3Rpb24oXykge1xuXHQgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBbIM67ICogZDNfZGVncmVlcywgz4YgKiBkM19kZWdyZWVzIF07XG5cdCAgICAgIM67ID0gX1swXSAlIDM2MCAqIGQzX3JhZGlhbnM7XG5cdCAgICAgIM+GID0gX1sxXSAlIDM2MCAqIGQzX3JhZGlhbnM7XG5cdCAgICAgIHJldHVybiByZXNldCgpO1xuXHQgICAgfTtcblx0ICAgIHByb2plY3Rpb24ucm90YXRlID0gZnVuY3Rpb24oXykge1xuXHQgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBbIM60zrsgKiBkM19kZWdyZWVzLCDOtM+GICogZDNfZGVncmVlcywgzrTOsyAqIGQzX2RlZ3JlZXMgXTtcblx0ICAgICAgzrTOuyA9IF9bMF0gJSAzNjAgKiBkM19yYWRpYW5zO1xuXHQgICAgICDOtM+GID0gX1sxXSAlIDM2MCAqIGQzX3JhZGlhbnM7XG5cdCAgICAgIM60zrMgPSBfLmxlbmd0aCA+IDIgPyBfWzJdICUgMzYwICogZDNfcmFkaWFucyA6IDA7XG5cdCAgICAgIHJldHVybiByZXNldCgpO1xuXHQgICAgfTt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eTogeTFcblx0ICAgICAgICB9O1xuXHQgICAgICB9IGVsc2Uge1xuXHQgICAgICAgIGlmICghdmEpIHZhID0ge1xuXHQgICAgICAgICAgeDogZngsXG5cdCAgICAgICAgICB5OiB5MVxuXHQgICAgICAgIH07IGVsc2UgaWYgKHZhLnkgPCB5MCkgcmV0dXJuO1xuXHQgICAgICAgIHZiID0ge1xuXHQgICAgICAgICAgeDogZngsXG5cdCAgICAgICAgICB5OiB5MFxuXHQgICAgICAgIH07XG5cdCAgICAgIH1cblx0ICAgIH0gZWxzZSB7XG5cdCAgICAgIGZtID0gKGx4IC0gcngpIC8gKHJ5IC0gbHkpO1xuXHQgICAgICBmYiA9IGZ5IC0gZm0gKiBmeDtcblx0ICAgICAgaWYgKGZtIDwgLTEgfHwgZm0gPiAxKSB7XG5cdCAgICAgICAgaWYgKGx4ID4gcngpIHtcblx0ICAgICAgICAgIGlmICghdmEpIHZhID0ge1xuXHQgICAgICAgICAgICB4OiAoeTAgLSBmYikgLyBmbSxcblx0ICAgICAgICAgICAgeTogeTBcblx0ICAgICAgICAgIH07IGVsc2UgaWYgKHZhLnkgPj0geTEpIHJldHVybjtcblx0ICAgICAgICAgIHZiID0ge1xuXHQgICAgICAgICAgICB4OiAoeTEgLSBmYikgLyBmbSxcblx0ICAgICAgICAgICAgeTogeTFcblx0ICAgICAgICAgIH07XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgIGlmICghdmEpIHZhID0ge1xuXHQgICAgICAgICAgICB4OiAoeTEgLSBmYikgLyBmbSxcblx0ICAgICAgICAgICAgeTogeTFcblx0ICAgICAgICAgIH07IGVsc2UgaWYgKHZhLnkgPCB5MCkgcmV0dXJuO1xuXHQgICAgICAgICAgdmIgPSB7XG5cdCAgICAgICAgICAgIHg6ICh5MCAtIGZiKSAvIGZtLFxuXHQgICAgICAgICAgICB5OiB5MFxuXHQgICAgICAgICAgfTtcblx0ICAgICAgICB9XG5cdCAgICAgIH0gZWxzZSB7XG5cdC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Ttcblx0ICAgICAgICAgIH1cblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgdW5jbGUgPSBncmFuZHBhLkw7XG5cdCAgICAgICAgICBpZiAodW5jbGUgJiYgdW5jbGUuQykge1xuXHQgICAgICAgICAgICBwYXJlbnQuQyA9IHVuY2xlLkMgPSBmYWxzZTtcblx0ICAgICAgICAgICAgZ3JhbmRwYS5DID0gdHJ1ZTtcblx0ICAgICAgICAgICAgYWZ0ZXIgPSBncmFuZHBhO1xuXHQgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgaWYgKGFmdGVyID09PSBwYXJlbnQuTCkge1xuXHQgICAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlUmlnaHQodGhpcywgcGFyZW50KTtcblx0ICAgICAgICAgICAgICBhZnRlciA9IHBhcmVudDtcblx0ICAgICAgICAgICAgICBwYXJlbnQgPSBhZnRlci5VO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHBhcmVudC5DID0gZmFsc2U7XG5cdCAgICAgICAgICAgIGdyYW5kcGEuQyA9IHRydWU7XG5cdCAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlTGVmdCh0aGlzLCBncmFuZHBhKTtcblx0ICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgICAgcGFyZW50ID0gYWZ0ZXIuVTtcblx0ICAgICAgfVxuXHQgICAgICB0aGlzLl8uQyA9IGZhbHNlO1xuXHQgICAgfSxcblx0ICAgIHJlbW92ZTogZnVuY3Rpb24obm9kZSkge1xuXHQgICAgICBpZiAobm9kZS5OKSBub2RlLk4uUCA9IG5vZGUuUDtcblx0ICAgICAgaWYgKG5vZGUuUCkgbm9kZS5QLk4gPSBub2RlLk47XG5cdCAgICAgIG5vZGUuTiA9IG5vZGUuUCA9IG51bGw7XG5cdCAgICAgIHZhciBwYXJlbnQgPSBub2RlLlUsIHNpYmxpbmcs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dDtcblx0ICAgICAgfVxuXHQgICAgICBpZiAobm9kZSkgbm9kZS5VID0gcGFyZW50O1xuXHQgICAgICBpZiAocmVkKSByZXR1cm47XG5cdCAgICAgIGlmIChub2RlICYmIG5vZGUuQykge1xuXHQgICAgICAgIG5vZGUuQyA9IGZhbHNlO1xuXHQgICAgICAgIHJldHVybjtcblx0ICAgICAgfVxuXHQgICAgICBkbyB7XG5cdCAgICAgICAgaWYgKG5vZGUgPT09IHRoaXMuXykgYnJlYWs7XG5cdCAgICAgICAgaWYgKG5vZGUgPT09IHBhcmVudC5MKSB7XG5cdCAgICAgICAgICBzaWJsaW5nID0gcGFyZW50LlI7XG5cdCAgICAgICAgICBpZiAoc2libGluZy5DKSB7XG5cdCAgICAgICAgICAgIHNpYmxpbmcuQyA9IGZhbHNlO1xuXHQgICAgICAgICAgICBwYXJlbnQuQyA9IHRydWU7XG5cdCAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlTGVmdCh0aGlzLCBwYXJlbnQpO1xuXHQgICAgICAgICAgICBzaWJsaW5nID0gcGFyZW50LlI7XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgICBpZiAoc2libGluZy5MICYmIHNpYmxpbmcuTC5DIHx8IHNpYmxpbmcuUiAmJiBzaWJsaW5nLlIuQykge1xuXHQgICAgICAgICAgICBpZiAoIXNpYmxpbmcuUiB8fCAhc2libGluZy5SLkMpIHtcblx0ICAgICAgICAgICAgICBzaWJsaW5nLkwuQyA9IGZhbHNlO1xuXHQgICAgICAgICAgICAgIHNpYmxpbmcuQyA9IHRydWU7XG5cdCAgICAgICAgICAgICAgZDNfZ2VvbV92b3Jvbm9pUmVkQmxhY2tSb3RhdGVSaWdodCh0aGlzLCBzaWJsaW5nKTtcblx0ICAgICAgICAgICAgICBzaWJsaW5nID0gcGFyZW50LlI7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgc2libGluZy5DID0gcGFyZW50LkM7XG5cdCAgICAgICAgICAgIHBhcmVudC5DID0gc2libGluZy5SLkMgPSBmYWxzZTtcblx0ICAgICAgICAgICAgZDNfZ2VvbV92b3Jvbm9pUmVkQmxhY2tSb3RhdGVMZWZ0KHRoaXMsIHBhcmVudCk7XG5cdCAgICAgICAgICAgIG5vZGUgPSB0aGlzLl87XG5cdCAgICAgICAgICAgIGJyZWFrO1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICBzaWJsaW5nID0gcGFyZW50Lkw7XG5cdCAgICAgICAgICBpZiAoc2libGluZy5DKSB7XG5cdCAgICAgICAgICAgIHNpYmxpbmcuQyA9IGZhbHNlO1xuXHQgICAgICAgICAgICBwYXJlbnQuQyA9IHRydWU7XG5cdCAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlUmlnaHQodGhpcywgcGFyZW50KTtcblx0ICAgICAgICAgICAgc2libGluZyA9IHBhcmVudC5MO1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgICAgaWYgKHNpYmxpbmcuTCAmJiBzaWJsaW5nLkwuQyB8fCBzaWJsaW5nLlIgJiYgc2libGluZy5SLkMpIHtcblx0ICAgICAgICAgICAgaWYgKCFzaWJsaW5nLkwgfHwgIXNpYmxpbmcuTC5DKSB7XG5cdCAgICAgICAgICAgICAgc2libGluZy5SLkMgPSBmYWxzZTtcblx0ICAgICAgICAgICAgICBzaWJsaW5nLkMgPSB0cnVlO1xuXHQgICAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlTGVmdCh0aGlzLCBzaWJsaW5nKTtcblx0ICAgICAgICAgICAgICBzaWJsaW5nID0gcGFyZW50Lkw7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgc2libGluZy5DID0gcGFyZW50LkM7XG5cdCAgICAgICAgICAgIHBhcmVudC5DID0gc2libGluZy5MLkMgPSBmYWxzZTtcblx0ICAgICAgICAgICAgZDNfZ2VvbV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uZ3RoKSB7XG5cdCAgICAgIHggPSBkM19nZW9tX3F1YWR0cmVlQ29tcGF0WDtcblx0ICAgICAgeSA9IGQzX2dlb21fcXVhZHRyZWVDb21wYXRZO1xuXHQgICAgICBpZiAoY29tcGF0ID09PSAzKSB7XG5cdCAgICAgICAgeTIgPSB5MTtcblx0ICAgICAgICB4MiA9IHgxO1xuXHQgICAgICAgIHkxID0geDEgPSAwO1xuXHQgICAgICB9XG5cdCAgICAgIHJldHVybiBxdWFkdHJlZShwb2ludHMpO1xuXHQgICAgfVxuXHQgICAgZnVuY3Rpb24gcXVhZHRyZWUoZGF0YSkge1xuXHQgICAgICB2YXIgZCwgZnggPSBkM19mdW5jdG9yKHgpLCBmeSA9IGQzX2Z1bmN0b3IoeSksIHhzLCB5cywgaSwgbiwgeDFfLCB5MV8sIHgyXywgeTJfO1xuXHQgICAgICBpZiAoeDEgIT0gbnVsbCkge1xuXHQgICAgICAgIHgxXyA9IHgxLCB5MV8gPSB5MSwgeDJfID0geDIsIHkyXyA9IHkyO1xuXHQgICAgICB9IGVsc2Uge1xuXHQgICAgICAgIHgyXyA9IHkyXyA9IC0oeDFfID0geTFfID0gSW5maW5pdHkpO1xuXHQgICAgICAgIHhzID0gW10sIHlzID0gW107XG5cdCAgICAgICAgbiA9IGRhdGEubGVuZ3RoO1xuXHQgICAgICAgIGlmIChjb21wYXQpIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHtcblx0ICAgICAgICAgIGQgPSBkYXRhW2ldO1xuXHQgICAgICAgICAgaWYgKGQueCA8IHgxXykgeDFfID0gZC54O1xuXHQgICAgICAgICAgaWYgKGQueSA8IHkxXykgeTFfID0gZC55O1xuXHQgICAgICAgICAgaWYgKGQueCA+IHgyXykgeDJfID0gZC54O1xuXHQgICAgICAgICAgaWYgKGQueSA+IHkyXykgeTJfID0gZC55O1xuXHQgICAgICAgICAgeHMucHVzaChkLngpO1xuXHQgICAgICAgICAgeXMucHVzaChkLnkpO1xuXHQgICAgICAgIH0gZWxzZSBmb3IgKGkgPSAwOyBpIDwgbjsgKytpKSB7XG5cdCAgICAgICAgICB2YXIgeF8gPSArZngoZCA9IGRhdGFbaV0sIGkpLCB5XyA9ICtmeShkLCBpKTtcblx0ICAgICAgICAgIGlmICh4XyA8IHgxXykgeDFfID0geF87XG5cdCAgICAgICAgICBpZiAoeV8gPCB5MV8pIHkxXyA9IHlfO1xuXHQgICAgICAgICAgaWYgKHhfID4geDJfKSB4Ml8gPSB4Xztcblx0ICAgICAgICAgIGlmICh5XyA+IHkyXykgeTJfID0geV87XG5cdCAgICAgICAgICB4cy5wdXNoKHhfKTtcblx0ICAgICAgICAgIHlzLnB1c2goeV8pO1xuXHQgICAgICAgIH1cblx0ICAgICAgfVxuXHQgICAgICB2YXIgZHggPSB4Ml8gLSB4MV8sIGR5ID0geTJfIC0geTFfO1xuXHQgICAgICBpZiAoZHggPiBkeSkgeTJfID0geTFfICsgZHg7IGVsc2UgeDJfID0geDFfICsgZHk7XG5cdCAgICAgIGZ1bmN0aW9uIGluc2VydChuLCBkLCB4LCB5LCB4MSwgeTEsIHgyLCB5Mikge1xuXHQgICAgICAgIGlmIChpc05hTih4KSB8fCBpc05hTih5KSkgcmV0dXJuO1xuXHQgICAgICAgIGlmIChuLmxlYWYpIHtcblx0ICAgICAgICAgIHZhciBueCA9IG4ueCwgbnkgPSBuLnk7XG5cdCAgICAgICAgICBpZiAobnggIT0gbnVsbCkge1xuXHQgICAgICAgICAgICBpZiAoYWJzKG54IC0geCkgKyBhYnMobnkgLSB5KSA8IC4wMSkge1xuXHQgICAgICAgICAgICAgIGluc2VydENoaWxkKG4sIGQsIHgsIHksIHgxLCB5MSwgeDIsIHkyKTtcblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICB2YXIgblBvaW50ID0gbi5wb2ludDtcblx0ICAgICAgICAgICAgICBuLnggPSBuLnkgPSBuLnBvaW50ID0gbnVsbDtcblx0ICAgICAgICAgICAgICBpbnNlcnR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uIHNvcnRTdWJncm91cHMobWF0cml4W2ldW2FdLCBtYXRyaXhbaV1bYl0pO1xuXHQgICAgICAgICAgfSk7XG5cdCAgICAgICAgfSk7XG5cdCAgICAgIH1cblx0ICAgICAgayA9ICjPhCAtIHBhZGRpbmcgKiBuKSAvIGs7XG5cdCAgICAgIHggPSAwLCBpID0gLTE7XG5cdCAgICAgIHdoaWxlICgrK2kgPCBuKSB7XG5cdCAgICAgICAgeDAgPSB4LCBqID0gLTE7XG5cdCAgICAgICAgd2hpbGUgKCsraiA8IG4pIHtcblx0ICAgICAgICAgIHZhciBkaSA9IGdyb3VwSW5kZXhbaV0sIGRqID0gc3ViZ3JvdXBJbmRleFtkaV1bal0sIHYgPSBtYXRyaXhbZGldW2RqXSwgYTAgPSB4LCBhMSA9IHggKz0gdiAqIGs7XG5cdCAgICAgICAgICBzdWJncm91cHNbZGkgKyBcIi1cIiArIGRqXSA9IHtcblx0ICAgICAgICAgICAgaW5kZXg6IGRpLFxuXHQgICAgICAgICAgICBzdWJpbmRleDogZGosXG5cdCAgICAgICAgICAgIHN0YXJ0QW5nbGU6IGEwLFxuXHQgICAgICAgICAgICBlbmRBbmdsZTogYTEsXG5cdCAgICAgICAgICAgIHZhbHVlOiB2XG5cdCAgICAgICAgICB9O1xuXHQgICAgICAgIH1cblx0ICAgICAgICBncm91cHNbZGldID0ge1xuXHQgICAgICAgICAgaW5kZXg6IGRpLFxuXHQgICAgICAgICAgc3RhcnRBbmdsZTogeDAsXG5cdCAgICAgICAgICBlbmRBbmdsZTogeCxcblx0ICAgICAgICAgIHZhbHVlOiBncm91cFN1bXNbZGldXG5cdCAgICAgICAgfTtcblx0ICAgICAgICB4ICs9IHBhZGRpbmc7XG5cdCAgICAgIH1cblx0ICAgICAgaSA9IC0xO1xuXHQgICAgICB3aGlsZSAoKytpIDwgbikge1xuXHQgICAgICAgIGogPSBpIC0gMTtcblx0ICAgICAgICB3aGlsZSAoKytqIDwgbikge1xuXHQgICAgICAgICAgdmFy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tcblx0ICAgICAgICAgICAgICB2YXIgayA9IHF1YWQuY2hhcmdlIC8gZG47XG5cdCAgICAgICAgICAgICAgbm9kZS5weCAtPSBkeCAqIGs7XG5cdCAgICAgICAgICAgICAgbm9kZS5weSAtPSBkeSAqIGs7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIHRydWU7XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgICBpZiAocXVhZC5wb2ludCAmJiBkbiAmJiBkbiA8IGNoYXJnZURpc3RhbmNlMikge1xuXHQgICAgICAgICAgICB2YXIgayA9IHF1YWQucG9pbnRDaGFyZ2UgLyBkbjtcblx0ICAgICAgICAgICAgbm9kZS5weCAtPSBkeCAqIGs7XG5cdCAgICAgICAgICAgIG5vZGUucHkgLT0gZHkgKiBrO1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgIH1cblx0ICAgICAgICByZXR1cm4gIXF1YWQuY2hhcmdlO1xuXHQgICAgICB9O1xuXHQgICAgfVxuXHQgICAgZm9yY2UudGljayA9IGZ1bmN0aW9uKCkge1xuXHQgICAgICBpZiAoKGFscGhhICo9IC45OSkgPCAuMDA1KSB7XG5cdCAgICAgICAgdGltZXIgPSBudWxsO1xuXHQgICAgICAgIGV2ZW50LmVuZCh7XG5cdCAgICAgICAgICB0eXBlOiBcImVuZFwiLFxuXHQgICAgICAgICAgYWxwaGE6IGFscGhhID0gMFxuXHQgICAgICAgIH0pO1xuXHQgICAgICAgIHJldHVybiB0cnVlO1xuXHQgICAgICB9XG5cdCAgICAgIHZhciBuID0gbm9kZXMubGVuZ3RoLCBtID0gbGlua3MubGVuZ3RoLCBxLCBpLCBvLCBzLCB0LCBsLCBrLCB4LCB5O1xuXHQgICAgICBmb3IgKGkgPSAwOyBpIDwgbTsgKytpKSB7XG5cdCAgICAgICAgbyA9IGxpbmtzW2ldO1xuXHQgICAgICAgIHMgPSBvLnNvdXJjZTtcblx0ICAgICAgICB0ID0gby50YXJnZXQ7XG5cdCAgICAgICAgeCA9IHQueCAtIHMueDtcblx0ICAgICAgICB5ID0gdC55IC0gcy55O1xuXHQgICAgICAgIGlmIChsID0geCAqIHggKyB5ICogeSkge1xuXHQgICAgICAgICAgbCA9IGFscGhhICogc3RyZW5ndGhzW2ldICogKChsID0gTWF0aC5zcXJ0KGwpKSAtIGRpc3RhbmNlc1tpXSkgLyBsO1xuXHQgICAgICAgICAgeCAqPSBsO1xuXHQgICAgICAgICAgeSAqPSBsO1xuXHQgICAgICAgICAgdC54IC09IHggKiAoayA9IHMud2VpZ2h0ICsgdC53ZWlnaHQgPyBzLndlaWdodCAvIChzLndlaWdodCArIHQud2VpZ2h0KSA6IC41KTtcblx0ICAgICAgICAgIHQueSAtPSB5ICogaztcblx0ICAgICAgICAgIHMueCArPSB4ICogKGsgPSAxIC0gayk7XG5cdCAgICAgICAgICBzLnkgKz0geSAqIGs7XG5cdCAgICAgICAgfVxuXHQgICAgICB9XG5cdCAgICAgIGlmIChrID0gYWxwaGEgKiBncmF2aXR5KSB7XG5cdCAgICAgICAgeCA9IHNpemVbMF0gLyAyO1xuXHQgICAgICAgIHkgPSBzaXplWzFdIC8gMjtcblx0ICAgICAgICBpID0gLTE7XG5cdCAgICAgICAgaWYgKGspIHdoaWxlICgrK2kgPCBuKSB7XG5cdCAgICAgICAgICBvID0gbm9kZXNbaV07XG5cdCAgICAgICAgICBvLnggKz0gKHggLSBvLngpICogaztcblx0ICAgICAgICAgIG8ueSArPSAoeSAtIG8ueSkgKiBrO1xuXHQgICAgICAgIH1cblx0ICAgICAgfVxuXHQgICAgICBpZiAoY2hhcmdlKSB7XG5cdCAgICAgICAgZDNfbGF5b3V0X2ZvcmNlQWNjdW11bGF0ZShxID0gZDMuZ2VvbS5xdWFkdHJlZShub2RlcyksIGFscGhhLCBjaGFyZ2VzKTtcblx0ICAgICAgICBpID0gLTE7XG5cdCAgICAgICAgd2hpbGUgKCsraSA8IG4pIHtcblx0ICAgICAgICAgIGlmICghKG8gPSBub2Rlc1tpXSkuZml4ZWQpIHtcblx0ICAgICAgICAgICAgcS52aXNpdChyZXB1bHNlKG8pKTtcblx0ICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgIH1cblx0ICAgICAgaSA9IC0xO1xuXHQgICAgICB3aGlsZSAoKytpIDwgbikge1xuXHQgICAgICAgIG8gPSBub2Rlc1tpXTtcblx0ICAgICAgICBpZiAoby5maXhlZCkge1xuXHQgICAgICAgICAgby54ID0gby5weDtcblx0ICAgICAgICAgIG8ueSA9IG8ucHk7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgIG8ueCAtPSAoby5weCAtIChvLnB4ID0gby54KSkgKiBmcmljdGlvbjtcblx0ICAgICAgICAgIG8ueSAtPSAoby5weSAtIChvLnB5ID0gby55KSkgKiBmcmljdGlvbjtcblx0ICAgICAgICB9XG5cdCAgICAgIH1cblx0ICAgICAgZXZlbnQudGljayh7XG5cdCAgICAgICAgdHlwZTogXCJ0aWNrXCIsXG5cdCAgICAgICAgYWxwaGE6IGFscGhhXG5cdCAgICAgIH0pO1xuXHQgICAgfTtcblx0ICAgIGZvcmNlLm5vZGVzID0gZnVuY3Rpb24oeCkge1xuXHQgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBub2Rlcztcblx0ICAgICAgbm9kZXMgPSB4O1xuXHQgICAgICByZXR1cm4gZm9yY2U7XG5cdCAgICB9O1xuXHQgICAgZm9yY2UubGlua3MgPSBmdW5jdGlvbih4KSB7XG5cdCAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIGxpbmtzO1xuXHQgICAgICBsaW5rcyA9IHg7XG5cdCAgICAgIHJldHVybiBmb3JjZTtcblx0ICAgIH07XG5cdCAgICBmb3JjZS5zaXplID0gZnVuY3Rpb24oeCkge1xuXHQgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBzaXplO1xuXHQgICAgICBzaXplID0geDtcblx0ICAgICAgc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tcblx0ICAgICAgYi55ID0gMDtcblx0ICAgICAgYm91bmQoYik7XG5cdCAgICAgIGlmIChuID4gMikge1xuXHQgICAgICAgIGMgPSBub2Rlc1syXTtcblx0ICAgICAgICBkM19sYXlvdXRfcGFja1BsYWNlKGEsIGIsIGMpO1xuXHQgICAgICAgIGJvdW5kKGMpO1xuXHQgICAgICAgIGQzX2xheW91dF9wYWNrSW5zZXJ0KGEsIGMpO1xuXHQgICAgICAgIGEuX3BhY2tfcHJldiA9IGM7XG5cdCAgICAgICAgZDNfbGF5b3V0X3BhY2tJbnNlcnQoYywgYik7XG5cdCAgICAgICAgYiA9IGEuX3BhY2tfbmV4dDtcblx0ICAgICAgICBmb3IgKGkgPSAzOyBpIDwgbjsgaSsrKSB7XG5cdCAgICAgICAgICBkM19sYXlvdXRfcGFja1BsYWNlKGEsIGIsIGMgPSBub2Rlc1tpXSk7XG5cdCAgICAgICAgICB2YXIgaXNlY3QgPSAwLCBzMSA9IDEsIHMyID0gMTtcblx0ICAgICAgICAgIGZvciAoaiA9IGIuX3BhY2tfbmV4dDsgaiAhPT0gYjsgaiA9IGouX3BhY2tfbmV4dCwgczErKykge1xuXHQgICAgICAgICAgICBpZiAoZDNfbGF5b3V0X3BhY2tJbnRlcnNlY3RzKGosIGMpKSB7XG5cdCAgICAgICAgICAgICAgaXNlY3QgPSAxO1xuXHQgICAgICAgICAgICAgIGJyZWFrO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgICBpZiAoaXNlY3QgPT0gMSkge1xuXHQgICAgICAgICAgICBmb3IgKGsgPSBhLl9wYWNrX3ByZXY7IGsgIT09IGouX3BhY2tfcHJldjsgayA9IGsuX3BhY2tfcHJldiwgczIrKykge1xuXHQgICAgICAgICAgICAgIGlmIChkM19sYXlvdXRfcGFja0ludGVyc2VjdHMoaywgYykpIHtcblx0ICAgICAgICAgICAgICAgIGJyZWFrO1xuXHQgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgfVxuXHQgICAgICAgICAgaWYgKGlzZWN0KSB7XG5cdCAgICAgICAgICAgIGlmIChzMSA8IHMyIHx8IHMxID09IHMyICYmIGIuciA8IGEucikgZDNfbGF5b3V0X3BhY2tTcGxpY2UoYSwgYiA9IGopOyBlbHNlIGQzX2xheW91dF9wYWNrU3BsaWNlKGEgPSBrLCBiKTtcblx0ICAgICAgICAgICAgaS0tO1xuXHQgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgZDNfbGF5b3V0X3BhY2tJbnNlcnQoYSwgYyk7XG5cdCAgICAgICAgICAgIGIgPSBjO1xuXHQgICAgICAgICAgICBib3VuZChjKTtcblx0ICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgIH1cblx0ICAgIH1cblx0ICAgIHZhciBjeCA9ICh4TWluICsgeE1heCkgLyAyLCBjeSA9ICh5TWluICsgeU1heCkgLyAyLCBjciA9IDA7XG5cdCAgICBmb3IgKGkgPSAwOyBpIDwgbjsgaSsrKSB7XG5cdCAgICAgIGMgPSBub2Rlc1tpXTtcblx0ICAgICAgYy54IC09IGN4O1xuXHQgICAgICBjLnkgLT0gY3k7XG5cdCAgICAgIGNyID0gTWF0aC5tYXgoY3IsIGMuciArIE1hdGguc3FydChjLnggKiBjLnggKyBjLnkgKiBjLnkpKTtcblx0ICAgIH1cblx0ICAgIG5vZGUuciA9IGNyO1xuXHQgICAgbm9kZXMuZm9yRWFjaChkM19sYXlvdXRfcGFja1VubGluayk7XG5cdCAgfVxuXHQgIGZ1bmN0aW9uIGQzX2xheW91dF9wYWNrTGluayhub2RlKSB7XG5cdCAgICBub2RlLl9wYWNrX25leHQgPSBub2RlLl9wYWNrX3ByZXYgPSBub2RlO1xuXHQgIH1cblx0ICBmdW5jdGlvbiBkM19sYXlvdXRfcGFja1VubGluayhub2RlKSB7XG5cdCAgICBkZWxldGUgbm9kZS5fcGFja19uZXh0O1xuXHQgICAgZGVsZXRlIG5vZ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uKSAmJiBjaGlsZC5zbGljZSgpIHx8IFtdLFxuXHQgICAgICAgICAgICBBOiBudWxsLFxuXHQgICAgICAgICAgICBhOiBudWxsLFxuXHQgICAgICAgICAgICB6OiAwLFxuXHQgICAgICAgICAgICBtOiAwLFxuXHQgICAgICAgICAgICBjOiAwLFxuXHQgICAgICAgICAgICBzOiAwLFxuXHQgICAgICAgICAgICB0OiBudWxsLFxuXHQgICAgICAgICAgICBpOiBpXG5cdCAgICAgICAgICB9KS5hID0gY2hpbGQpO1xuXHQgICAgICAgIH1cblx0ICAgICAgfVxuXHQgICAgICByZXR1cm4gcm9vdDEuY2hpbGRyZW5bMF07XG5cdCAgICB9XG5cdCAgICBmdW5jdGlvbiBmaXJzdFdhbGsodikge1xuXHQgICAgICB2YXIgY2hpbGRyZW4gPSB2LmNoaWxkcmVuLCBzaWJsaW5ncyA9IHYucGFyZW50LmNoaWxkcmVuLCB3ID0gdi5pID8gc2libGluZ3Nbdi5pIC0gMV0gOiBudWxsO1xuXHQgICAgICBpZiAoY2hpbGRyZW4ubGVuZ3RoKSB7XG5cdCAgICAgICAgZDNfbGF5b3V0X3RyZWVTaGlmdCh2KTtcblx0ICAgICAgICB2YXIgbWlkcG9pbnQgPSAoY2hpbGRyZW5bMF0ueiArIGNoaWxkcmVuW2NoaWxkcmVuLmxlbmd0aCAtIDFdLnopIC8gMjtcblx0ICAgICAgICBpZiAodykge1xuXHQgICAgICAgICAgdi56ID0gdy56ICsgc2VwYXJhdGlvbih2Ll8sIHcuXyk7XG5cdCAgICAgICAgICB2Lm0gPSB2LnogLSBtaWRwb2ludDtcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgdi56ID0gbWlkcG9pbnQ7XG5cdCAgICAgICAgfVxuXHQgICAgICB9IGVsc2UgaWYgKHcpIHtcblx0ICAgICAgICB2LnogPSB3LnogKyBzZXBhcmF0aW9uKHYuXywgdy5fKTtcblx0ICAgICAgfVxuXHQgICAgICB2LnBhcmVudC5BID0g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z0gdmltLm07XG5cdCAgICAgICAgICBzaXAgKz0gdmlwLm07XG5cdCAgICAgICAgICBzb20gKz0gdm9tLm07XG5cdCAgICAgICAgICBzb3AgKz0gdm9wLm07XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGlmICh2aW0gJiYgIWQzX2xheW91dF90cmVlUmlnaHQodm9wKSkge1xuXHQgICAgICAgICAgdm9wLnQgPSB2aW07XG5cdCAgICAgICAgICB2b3AubSArPSBzaW0gLSBzb3A7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGlmICh2aXAgJiYgIWQzX2xheW91dF90cmVlTGVmdCh2b20pKSB7XG5cdCAgICAgICAgICB2b20udCA9IHZpcDtcblx0ICAgICAgICAgIHZvbS5tICs9IHNpcCAtIHNvbTtcblx0ICAgICAgICAgIGFuY2VzdG9yID0gdjtcblx0ICAgICAgICB9XG5cdCAgICAgIH1cblx0ICAgICAgcmV0dXJuIGFuY2VzdG9yO1xuXHQgICAgfVxuXHQgICAgZnVuY3Rpb24gc2l6ZU5vZGUobm9kZSkge1xuXHQgICAgICBub2RlLnggKj0gc2l6ZVswXTtcblx0ICAgICAgbm9kZS55ID0gbm9kZS5kZXB0aCAqIHNpemVbMV07XG5cdCAgICB9XG5cdCAgICB0cmVlLnNlcGFyYXRpb24gPSBmdW5jdGlvbih4KSB7XG5cdCAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIHNlcGFyYXRpb247XG5cdCAgICAgIHNlcGFyYXRpb24gPSB4O1xuXHQgICAgICByZXR1cm4gdHJlZTtcblx0ICAgIH07XG5cdCAgICB0cmVlLnNpemUgPSBmdW5jdGlvbih4KSB7XG5cdCAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIG5vZGVTaXplID8gbnVsbCA6IHNpemU7XG5cdCAgICAgIG5vZGVTaXplID0gKHNpemUgPSB4KSA9PSBudWxsID8gc2l6ZU5vZGUgOiBudWxsO1xuXHQgICAgICByZXR1cm4gdHJ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B5ID0gcmVjdC55LCB2ID0gdSA/IHJvdW5kKHJvdy5hcmVhIC8gdSkgOiAwLCBvO1xuXHQgICAgICBpZiAodSA9PSByZWN0LmR4KSB7XG5cdCAgICAgICAgaWYgKGZsdXNoIHx8IHYgPiByZWN0LmR5KSB2ID0gcmVjdC5keTtcblx0ICAgICAgICB3aGlsZSAoKytpIDwgbikge1xuXHQgICAgICAgICAgbyA9IHJvd1tpXTtcblx0ICAgICAgICAgIG8ueCA9IHg7XG5cdCAgICAgICAgICBvLnkgPSB5O1xuXHQgICAgICAgICAgby5keSA9IHY7XG5cdCAgICAgICAgICB4ICs9IG8uZHggPSBNYXRoLm1pbihyZWN0LnggKyByZWN0LmR4IC0geCwgdiA/IHJvdW5kKG8uYXJlYSAvIHYpIDogMCk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIG8ueiA9IHRydWU7XG5cdCAgICAgICAgby5keCArPSByZWN0LnggKyByZWN0LmR4IC0geDtcblx0ICAgICAgICByZWN0LnkgKz0gdjtcblx0ICAgICAgICByZWN0LmR5IC09IHY7XG5cdCAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgaWYgKGZsdXNoIHx8IHYgPiByZWN0LmR4KSB2ID0gcmVjdC5keDtcblx0ICAgICAgICB3aGlsZSAoKytpIDwgbikge1xuXHQgICAgICAgICAgbyA9IHJvd1tpXTtcblx0ICAgICAgICAgIG8ueCA9IHg7XG5cdCAgICAgICAgICBvLnkgPSB5O1xuXHQgICAgICAgICAgby5keCA9IHY7XG5cdCAgICAgICAgICB5ICs9IG8uZHkgPSBNYXRoLm1pbihyZWN0LnkgKyByZWN0LmR5IC0geSwgdiA/IHJvdW5kKG8uYXJlYSAvIHYpIDogMCk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIG8ueiA9IGZhbHNlO1xuXHQgICAgICAgIG8uZHkgKz0gcmVjdC55ICsgcmVjdC5keSAtIHk7XG5cdCAgICAgICAgcmVjdC54ICs9IHY7XG5cdCAgICAgICAgcmVj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lbnRzKTtcblx0ICAgICAgICBpZiAoIWN3KSBwMSAqPSAtMTtcblx0ICAgICAgICBpZiAocjEpIHAxID0gZDNfYXNpbihycCAvIHIxICogTWF0aC5zaW4oYXApKTtcblx0ICAgICAgICBpZiAocjApIHAwID0gZDNfYXNpbihycCAvIHIwICogTWF0aC5zaW4oYXApKTtcblx0ICAgICAgfVxuXHQgICAgICBpZiAocjEpIHtcblx0ICAgICAgICB4MCA9IHIxICogTWF0aC5jb3MoYTAgKyBwMSk7XG5cdCAgICAgICAgeTAgPSByMSAqIE1hdGguc2luKGEwICsgcDEpO1xuXHQgICAgICAgIHgxID0gcjEgKiBNYXRoLmNvcyhhMSAtIHAxKTtcblx0ICAgICAgICB5MSA9IHIxICogTWF0aC5zaW4oYTEgLSBwMSk7XG5cdCAgICAgICAgdmFyIGwxID0gTWF0aC5hYnMoYTEgLSBhMCAtIDIgKiBwMSkgPD0gz4AgPyAwIDogMTtcblx0ICAgICAgICBpZiAocDEgJiYgZDNfc3ZnX2FyY1N3ZWVwKHgwLCB5MCwgeDEsIHkxKSA9PT0gY3cgXiBsMSkge1xuXHQgICAgICAgICAgdmFyIGgxID0gKGEwICsgYTEpIC8gMjtcblx0ICAgICAgICAgIHgwID0gcjEgKiBNYXRoLmNvcyhoMSk7XG5cdCAgICAgICAgICB5MCA9IHIxICogTWF0aC5zaW4oaDEpO1xuXHQgICAgICAgICAgeDEgPSB5MSA9IG51bGw7XG5cdCAgICAgICAgfVxuXHQgICAgICB9IGVsc2Uge1xuXHQgICAgICAgIHgwID0geTAgPSAwO1xuXHQgICAgICB9XG5cdCAgICAgIGlmIChyMCkge1xuXHQgICAgICAgIHgyID0gcjAgKiBNYXRoLmNvcyhhMSAtIHAwKTtcblx0ICAgICAgICB5MiA9IHIwICogTWF0aC5zaW4oYTEgLSBwMCk7XG5cdCAgICAgICAgeDMgPSByMCAqIE1hdGguY29zKGEwICsgcDApO1xuXHQgICAgICAgIHkzID0gcjAgKiBNYXRoLnNpbihh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HQgICAgICAgICAgICB4RXh0ZW50ID0gZXh0ZW50MC54O1xuXHQgICAgICAgICAgICB5RXh0ZW50ID0gZXh0ZW50MC55O1xuXHQgICAgICAgICAgICBldmVudF8oe1xuXHQgICAgICAgICAgICAgIHR5cGU6IFwiYnJ1c2hzdGFydFwiXG5cdCAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgfSkudHdlZW4oXCJicnVzaDpicnVzaFwiLCBmdW5jdGlvbigpIHtcblx0ICAgICAgICAgICAgdmFyIHhpID0gZDNfaW50ZXJwb2xhdGVBcnJheSh4RXh0ZW50LCBleHRlbnQxLngpLCB5aSA9IGQzX2ludGVycG9sYXRlQXJyYXkoeUV4dGVudCwgZXh0ZW50MS55KTtcblx0ICAgICAgICAgICAgeEV4dGVudERvbWFpbiA9IHlFeHRlbnREb21haW4gPSBudWxsO1xuXHQgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24odCkge1xuXHQgICAgICAgICAgICAgIHhFeHRlbnQgPSBleHRlbnQxLnggPSB4aSh0KTtcblx0ICAgICAgICAgICAgICB5RXh0ZW50ID0gZXh0ZW50MS55ID0geWkodCk7XG5cdCAgICAgICAgICAgICAgZXZlbnRfKHtcblx0ICAgICAgICAgICAgICAgIHR5cGU6IFwiYnJ1c2hcIixcblx0ICAgICAgICAgICAgICAgIG1vZGU6IFwicmVzaXplXCJcblx0ICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgfTtcblx0ICAgICAgICAgIH0pLmVhY2goXCJlbmQuYnJ1c2hcIiwgZnVuY3Rpb24oKSB7XG5cdCAgICAgICAgICAgIHhFeHRlbnREb21haW4gPSBleHRlbnQxLmk7XG5cdCAgICAgICAgICAgIHlFeHRlbnREb21haW4gPSBleHRlbnQxLmo7XG5cdCAgICAgICAgICAgIGV2ZW50Xyh7XG5cdCAgICAgICAgICAgICAgdHlwZTogXCJicnVzaFwiLFxuXHQgICAgICAgICAgICAgIG1vZGU6IFwicmVzaXplXCJcblx0ICAgICAg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k7XG5cdCAgICAgIGJydXNobW92ZSgpO1xuXHQgICAgICBmdW5jdGlvbiBrZXlkb3duKCkge1xuXHQgICAgICAgIGlmIChkMy5ldmVudC5rZXlDb2RlID09IDMyKSB7XG5cdCAgICAgICAgICBpZiAoIWRyYWdnaW5nKSB7XG5cdCAgICAgICAgICAgIGNlbnRlciA9IG51bGw7XG5cdCAgICAgICAgICAgIG9yaWdpblswXSAtPSB4RXh0ZW50WzFdO1xuXHQgICAgICAgICAgICBvcmlnaW5bMV0gLT0geUV4dGVudFsxXTtcblx0ICAgICAgICAgICAgZHJhZ2dpbmcgPSAyO1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgICAgZDNfZXZlbnRQcmV2ZW50RGVmYXVsdCgpO1xuXHQgICAgICAgIH1cblx0ICAgICAgfVxuXHQgICAgICBmdW5jdGlvbiBrZXl1cCgpIHtcblx0ICAgICAgICBpZiAoZDMuZXZlbnQua2V5Q29kZSA9PSAzMiAmJiBkcmFnZ2luZyA9PSAyKSB7XG5cdCAgICAgICAgICBvcmlnaW5bMF0gKz0geEV4dGVudFsxXTtcblx0ICAgICAgICAgIG9yaWdpblsxXSArPSB5RXh0ZW50WzFdO1xuXHQgICAgICAgICAgZHJhZ2dpbmcgPSAwO1xuXHQgICAgICAgICAgZDNfZXZlbnRQcmV2ZW50RGVmYXVsdCgpO1xuXHQgICAgICAgIH1cblx0ICAgICAgfVxuXHQgICAgICBmdW5jdGlvbiBicnVzaG1vdmUoKSB7XG5cdCAgICAgICAgdmFyIHBvaW50ID0gZDMubW91c2UodGFyZ2V0KSwgbW92ZWQgPSBmYWxzZTtcblx0ICAgICAgICBpZiAob2Zmc2V0KSB7XG5cdCAgICAgICAgICBwb2ludFswXSArPSBvZmZzZXRbMF07XG5cdCAgICAgICAgICBwb2ludFsxXSArPSBvZmZzZXRbMV07XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGlmICghZHJhZ2dpbmcpIHtcblx0ICAgICAgICAgIGlmIChkMy5ldmVudC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ddLCAnJWQg2LPYp9i52KfYqicsICclZCDYs9in2LnYqScsICclZCDYs9in2LnYqSddLFxuXHQgICAgZCA6IFsn2KPZgtmEINmF2YYg2YrZiNmFJywgJ9mK2YjZhSDZiNin2K3YrycsIFsn2YrZiNmF2KfZhicsICfZitmI2YXZitmGJ10sICclZCDYo9mK2KfZhScsICclZCDZitmI2YXZi9inJywgJyVkINmK2YjZhSddLFxuXHQgICAgTSA6IFsn2KPZgtmEINmF2YYg2LTZh9ixJywgJ9i02YfYsSDZiNin2K3YrycsIFsn2LTZh9ix2KfZhicsICfYtNmH2LHZitmGJ10sICclZCDYo9i02YfYsScsICclZCDYtNmH2LHYpycsICclZCDYtNmH2LEnXSxcblx0ICAgIHkgOiBbJ9ij2YLZhCDZhdmGINi52KfZhScsICfYudin2YUg2YjYp9it2K8nLCBbJ9i52KfZhdin2YYnLCAn2LnYp9mF2YrZhiddLCAnJWQg2KPYudmI2KfZhScsICclZCDYudin2YXZi9inJywgJyVkINi52KfZhSddXG5cdH07XG5cdHZhciBwbHVyYWxpemUgPSBmdW5jdGlvbiAodSkge1xuXHQgICAgcmV0dXJuIGZ1bmN0aW9uIChudW1iZXIsIHdpdGhvdXRTdWZmaXgsIHN0cmluZywgaXNGdXR1cmUpIHtcblx0ICAgICAgICB2YXIgZiA9IHBsdXJhbEZvcm0obnVtYmVyKSxcblx0ICAgICAgICAgICAgc3RyID0gcGx1cmFsc1t1XVtwbHVyYWxGb3JtKG51bWJlcildO1xuXHQgICAgICAgIGlmIChmID09PSAyKSB7XG5cdCAgICAgICAgICAgIHN0ciA9IHN0clt3aXRob3V0U3VmZml4ID8gMCA6IDFdO1xuXHQgICAgICAgIH1cblx0ICAgICAgICByZXR1cm4gc3RyLnJlcGxhY2UoLyVkL2ksIG51bWJlcik7XG5cdCAgICB9O1xuXHR9O1xuXHR2YXIgbW9udGhzID0gW1xuXHQgICAgJ9mK2YbYp9mK2LEnLFxuXHQgICAgJ9mB2KjYsdin2YrYsScsXG5cd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J0QgTU1NTSBZWVlZJyxcblx0ICAgICAgICBMTEwgOiAnRCBNTU1NIFlZWVkgSEg6bW0nLFxuXHQgICAgICAgIExMTEwgOiAnZGRkZCBEIE1NTU0gWVlZWSBISDptbSdcblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbVBhcnNlOiAv2LV82YUvLFxuXHQgICAgaXNQTSA6IGZ1bmN0aW9uIChpbnB1dCkge1xuXHQgICAgICAgIHJldHVybiAn2YUnID09PSBpbnB1dDtcblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcblx0ICAgICAgICBpZiAoaG91ciA8IDEyKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn2LUnO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn2YUnO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBjYWxlbmRhciA6IHtcblx0ICAgICAgICBzYW1lRGF5OiAnW9in2YTZitmI2YUg2LnZhtivINin2YTYs9in2LnYqV0gTFQnLFxuXHQgICAgICAgIG5leHREYXk6ICdb2LrYr9mL2Kcg2LnZhtivINin2YTYs9in2LnYqV0gTFQnLFxuXHQgICAgICAgIG5leHRXZWVrOiAnZGRkZCBb2LnZhtivINin2YTYs9in2LnYqV0gTFQnLFxuXHQgICAgICAgIGxhc3REYXk6ICdb2KPZhdizINi52YbYryDYp9mE2LPYp9i52KldIExUJyxcblx0ICAgICAgICBsYXN0V2VlazogJ2RkZGQgW9i52YbYryDYp9mE2LPYp9i52KldIExUJyxcblx0ICAgICAgICBzYW1lRWxzZTogJ0wnXG5cdCAgICB9LFxuXHQgICAgcmVsYXRpdmVUaW1lIDoge1xuXHQgICAgICAgIGZ1dHVyZSA6ICfYqNi52K8gJXMnLFxuXHQgICAgICAgIHBhc3QgOiAn2YXZhtiwICVzJyxcblx0ICAgICAgICBzIDogcGx1cmFsaXplKCdzJyks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OlxuXHQgICAgICAgICAgICAgICAgY2FzZSAzOlxuXHQgICAgICAgICAgICAgICAgY2FzZSA2OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CSINC40LfQvNC40L3QsNC70LDRgtCwXSBkZGRkIFvQsl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAxOlxuXHQgICAgICAgICAgICAgICAgY2FzZSAyOlxuXHQgICAgICAgICAgICAgICAgY2FzZSA0OlxuXHQgICAgICAgICAgICAgICAgY2FzZSA1OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CSINC40LfQvNC40L3QsNC70LjRj10gZGRkZCBb0LJdIExUJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgc2FtZUVsc2UgOiAnTCdcblx0ICAgIH0sXG5cdCAgICByZWxhdGl2ZVRpbWUgOiB7XG5cdCAgICAgICAgZnV0dXJlIDogJ9GB0LvQtdC0ICVzJyxcblx0ICAgICAgICBwYXN0IDogJ9C/0YDQtdC00LggJXMnLFxuXHQgICAgICAgIHMgOiAn0L3Rj9C60L7Qu9C60L4g0YHQtdC60YPQvdC00LgnLFxuXHQgICAgICAgIG0gOiAn0LzQuNC90YPRgtCwJyxcblx0ICAgICAgICBtbSA6ICclZCDQvNC40L3Rg9GC0LgnLFxuXHQgICAgICAgIGggOiAn0YfQsNGBJyxcblx0ICAgICAgICBoaCA6ICclZCDRh9Cw0YHQsCcsXG5cdCAgICAgICAgZCA6ICfQtNC10L0nLFxuXHQgICAgICAgIGRkIDogJyVkINC00L3QuCcsXG5cdCAgICAgICAgTSA6ICfQvNC10YHQtdGGJyxcblx0ICAgICAgICBNTSA6ICclZCDQvNC10YHQtdGG0LAnLFxuXHQgICAgICAgIHkgOiAn0LPQvtC00LjQvdCwJyxcblx0ICAgICAgICB5eSA6ICclZCDQs9C+0LTQuNC90LgnXG5cdCAgICB9LFxuXHQgICAgZGF5T2ZNb250aE9yZGluYWxQYXJzZTogL1xcZHsxLDJ9LSjQtdCyfNC10L180YLQuHzQstC4fNGA0Lh80LzQuCkvLFxuXHQgICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIpIHtcblx0ICAgICAgICB2YXIgbGFzdERpZ2l0ID0gbnVtYmVyICUgMTAsXG5cdCAgICAgICAgICAgIGxhc3QyRGlnaXRzID0gbnVtYmVyICUgMTAwO1xuXHQgICAgICAgIGlmIChudW1iZXIgPT09IDApIHtcblx0ICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0LXQsic7XG5cdCAgICAgICAgfSBlbHNlIGlmIChsYXN0MkRpZ2l0cyA9PT0gMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3QtdC9Jztcblx0ICAgICAgICB9IGVsc2UgaWYgKGxhc3QyRGlnaXRzID4gMTAgJiYgbGFzdDJEaWdpdHMgPCAyMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3RgtC4Jztcblx0ICAgICAgICB9IGVsc2UgaWYgKGxhc3REaWdpdCA9PT0gMSkge1xuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3QstC4Jztcblx0ICAgICAgICB9IGVsc2UgaWYgKGxhc3REaWdpdCA9PT0gMikge1xuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3RgNC4Jztcblx0ICAgICAgICB9IGVsc2UgaWYgKGxhc3REaWdpdCA9PT0gNyB8fCBsYXN0RGlnaXQgPT09IDgpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0LzQuCc7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0YLQuCc7XG5cdCAgICAgICAgfVxuXHQgICAgfSxcblx0ICAgIHdlZWsgOiB7XG5cdCAgICAgICAgZG93IDogMSwgLy8gTW9uZGF5IGlzIHRoZSBmaXJzdCBkYXkgb2YgdGhlIHdlZWsuXG5cdCA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JuIHN0cmluZy5yZXBsYWNlKC9cXGQvZywgZnVuY3Rpb24gKG1hdGNoKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBzeW1ib2xNYXBbbWF0Y2hdO1xuXHQgICAgICAgIH0pO1xuXHQgICAgfSxcblx0ICAgIG1lcmlkaWVtUGFyc2U6IC/gprDgpr7gpqR84Ka44KaV4Ka+4KayfOCmpuCngeCmquCngeCmsHzgpqzgpr/gppXgpr7gprJ84Kaw4Ka+4KakLyxcblx0ICAgIG1lcmlkaWVtSG91ciA6IGZ1bmN0aW9uIChob3VyLCBtZXJpZGllbSkge1xuXHQgICAgICAgIGlmIChob3VyID09PSAxMikge1xuXHQgICAgICAgICAgICBob3VyID0gMDtcblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKChtZXJpZGllbSA9PT0gJ+CmsOCmvuCmpCcgJiYgaG91ciA+PSA0KSB8fFxuXHQgICAgICAgICAgICAgICAgKG1lcmlkaWVtID09PSAn4Kam4KeB4Kaq4KeB4KawJyAmJiBob3VyIDwgNSkgfHxcblx0ICAgICAgICAgICAgICAgIG1lcmlkaWVtID09PSAn4Kas4Ka/4KaV4Ka+4KayJykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIHJldHVybiBob3VyO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcblx0ICAgICAgICBpZiAoaG91ciA8IDQpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfgprDgpr7gpqQnO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDEwKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn4Ka44KaV4Ka+4KayJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxNykge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+Cmpu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ICAgICAgICAgICByZXN1bHQgKz0gJ21pbnV0ZSc7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ21pbnV0YSc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcblx0ICAgICAgICBjYXNlICdoJzpcblx0ICAgICAgICAgICAgcmV0dXJuIHdpdGhvdXRTdWZmaXggPyAnamVkYW4gc2F0JyA6ICdqZWRub2cgc2F0YSc7XG5cdCAgICAgICAgY2FzZSAnaGgnOlxuXHQgICAgICAgICAgICBpZiAobnVtYmVyID09PSAxKSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ3NhdCc7XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyID09PSAyIHx8IG51bWJlciA9PT0gMyB8fCBudW1iZXIgPT09IDQpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnc2F0YSc7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ3NhdGknO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG5cdCAgICAgICAgY2FzZSAnZGQnOlxuXHQgICAgICAgICAgICBpZiAobnVtYmVyID09PSAxKSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ2Rhbic7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ2RhbmEnO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG5cdCAgICAgICAgY2FzZSAnTU0nOlxuXHQgICAgICAgICAgICBpZiAobnVtYmVyID09PSAxKSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ21qZXNlYyc7XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyID09PSAyIHx8IG51bWJlciA9PT0gMyB8fCBudW1iZXIgPT09IDQpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnbWplc2VjYSc7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ21qZXNlY2knO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG5cdCAgICAgICAgY2FzZSAneXknOlxuXHQgICAgICAgICAgICBpZiAobnVtYmVyID09PSAxKSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ2dvZGluYSc7XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyID09PSAyIHx8IG51bWJlciA9PT0gMyB8fCBudW1iZXIgPT09IDQpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnZ29kaW5lJztcblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnZ29kaW5hJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuXHQgICAgfVxuXHR9XG5cdFxuXHR2YXIgYnMgPSBtb21lbnQuZGVmaW5lTG9jYWxlKCdicycsIHtcblx0ICAgIG1vbnRocyA6ICdqYW51YXJfZmVicnVhcl9tYXJ0X2FwcmlsX21hal9qdW5pX2p1bGlfYXVndXN0X3NlcHRlbWJhcl9va3RvYmFyX25vdmVtYmFyX2RlY2VtYmFyJy5zcGxpdCgnXycpLFxuXHQgICAgbW9udGhzU2hvcnQgOiAnamFuLl9mZWIuX21hci5fYXByLl9tYWouX2p1bi5fanVsLl9hdWcuX3NlcC5fb2t0Ll9ub3YuX2RlYy4nLnNwbGl0KCdfJyksXG5cdCAgICBtb250aHNQYXJzZUV4YWN0OiB0cnVlLFxuXHQgICAgd2Vla2RheXMgOiAnbmVkamVsamFfcG9uZWRqZWxqYWt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XJuICdbdV0gW3N1Ym90dV0gW3VdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMTpcblx0ICAgICAgICAgICAgICAgIGNhc2UgMjpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNDpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNTpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBkZGRkIFt1XSBMVCc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9LFxuXHQgICAgICAgIGxhc3REYXkgIDogJ1tqdcSNZXIgdV0gTFQnLFxuXHQgICAgICAgIGxhc3RXZWVrIDogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcblx0ICAgICAgICAgICAgICAgIGNhc2UgMDpcblx0ICAgICAgICAgICAgICAgIGNhc2UgMzpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1twcm/FoWx1XSBkZGRkIFt1XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDY6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbcHJvxaFsZV0gW3N1Ym90ZV0gW3VdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMTpcblx0ICAgICAgICAgICAgICAgIGNhc2UgMjpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNDpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNTpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1twcm/FoWxpXSBkZGRkIFt1XSBMVCc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9LFxuXHQgICAgICAgIHNhbWVFbHNlIDogJ0wnXG5cdCAgICB9LFxuXHQgICAgcmVsYXRpdmVUaW1lIDoge1xuXHQgICAgICAgIGZ1dHVyZSA6ICd6YSAlcycsXG5cdCAgICAgICAgcGFzdCAgIDogJ3ByaWplICVzJyxcblx0ICAgICAgICBzICAgICAgOiAncGFyIHNla3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kgPyAnbGVzJyA6ICdsYScpICsgJ10gTFQnO1xuXHQgICAgICAgIH0sXG5cdCAgICAgICAgbmV4dFdlZWsgOiBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAnZGRkZCBbYSAnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ2xlcycgOiAnbGEnKSArICddIExUJztcblx0ICAgICAgICB9LFxuXHQgICAgICAgIGxhc3REYXkgOiBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAnW2FoaXIgYSAnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ2xlcycgOiAnbGEnKSArICddIExUJztcblx0ICAgICAgICB9LFxuXHQgICAgICAgIGxhc3RXZWVrIDogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ1tlbF0gZGRkZCBbcGFzc2F0IGEgJyArICgodGhpcy5ob3VycygpICE9PSAxKSA/ICdsZXMnIDogJ2xhJykgKyAnXSBMVCc7XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuXHQgICAgfSxcblx0ICAgIHJlbGF0aXZlVGltZSA6IHtcblx0ICAgICAgICBmdXR1cmUgOiAnZFxcJ2FxdcOtICVzJyxcblx0ICAgICAgICBwYXN0IDogJ2ZhICVzJyxcblx0ICAgICAgICBzIDogJ3VucyBzZWdvbnMnLFxuXHQgICAgICAgIG0gOiAndW4gbWludXQnLFxuXHQgICAgICAgIG1tIDogJyVkIG1pbnV0cycsXG5cdCAgICAgICAgaCA6ICd1bmEgaG9yYScsXG5cdCAgICAgICAgaGggOiAnJWQgaG9yZXMnLFxuXHQgICAgICAgIGQgOiAndW4gZGlhJyxcblx0ICAgICAgICBkZCA6ICclZCBkaWVzJyxcblx0ICAgICAgICBNIDogJ3VuIG1lcycsXG5cdCAgICAgICAgTU0gOiAnJWQgbWVzb3MnLFxuXHQgICAgICAgIHkgOiAndW4gYW55Jyxcblx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gICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ2hvZGluYW1pJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICBjYXNlICdkJzogIC8vIGEgZGF5IC8gaW4gYSBkYXkgLyBhIGRheSBhZ29cblx0ICAgICAgICAgICAgcmV0dXJuICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlKSA/ICdkZW4nIDogJ2RuZW0nO1xuXHQgICAgICAgIGNhc2UgJ2RkJzogLy8gOSBkYXlzIC8gaW4gOSBkYXlzIC8gOSBkYXlzIGFnb1xuXHQgICAgICAgICAgICBpZiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArIChwbHVyYWwobnVtYmVyKSA/ICdkbnknIDogJ2Ruw60nKTtcblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAnZG55Jztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICBjYXNlICdNJzogIC8vIGEgbW9udGggLyBpbiBhIG1vbnRoIC8gYSBtb250aCBhZ29cblx0ICAgICAgICAgICAgcmV0dXJuICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlKSA/ICdtxJtzw61jJyA6ICdtxJtzw61jZW0nO1xuXHQgICAgICAgIGNhc2UgJ01NJzogLy8gOSBtb250aHMgLyBpbiA5IG1vbnRocyAvIDkgbW9udGhzIGFnb1xuXHQgICAgICAgICAgICBpZiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArIChwbHVyYWwobnVtYmVyKSA/ICdtxJtzw61jZScgOiAnbcSbc8OtY8WvJyk7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ23Em3PDrWNpJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICBjYXNlICd5JzogIC8vIGEgeWVhciAvIGluIGEgeWVhciAvIGEgeWVhciBhZ29cblx0ICAgICAgICAgICAgcmV0dXJuICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlKSA/ICdyb2snIDogJ3Jva2VtJztcblx0ICAgICAgICBjYXNlICd5eSc6IC8vIDkgeWVhcnMgLyBpbiA5IHllYXJzIC8gOSB5ZWFycyBhZ29cblx0ICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAocGx1cmFsKG51bWJlcikgPyAncm9reScgOiAnbGV0Jyk7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ2xldHknO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIGJyZWFrO1xuXHQgICAgfVxuXHR9XG5cdFxuXHR2YXIgY3MgPSBtb21lbnQuZGVmaW5lTG9jYWxlKCdjcycsIHtcblx0ICAgIG1vbnRocyA6IG1vbnRocyxcblx0ICAgIG1vbnRoc1Nob3J0IDogbW9udGhzU2hvcnQsXG5cdCAgICBtb250aHNQYXJzZSA6IChmdW5jdGlvbiAobW9udGhzLCBtb250aHNTaG9ydCkge1xuXHQgICAgICAgIHZhciBpLCBfbW9udGhzUGFyc2UgPSBbXTtcblx0ICAgICAgICBmb3IgKGkgPSAwOyBpIDwgMTI7IGkrKykge1xuXHQgICAgICAgICAgICAvLyB1c2UgY3VzdG9tIHBhcnNlciB0byBzb2x2ZSBwcm9ibGVtIHdpdGggSnVseSAoxI1lcnZlbmVjKVxuXHQgICAgICAgICAgICBfbW9udGhzUGFyc2VbaV0gPSBuZXcgUmVnRXhwKCdeJyArIG1vbn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ZWVrZGF5c01pbiA6ICduZV9wb1/DunRfc3RfxI10X3DDoV9zbycuc3BsaXQoJ18nKSxcblx0ICAgIGxvbmdEYXRlRm9ybWF0IDoge1xuXHQgICAgICAgIExUOiAnSDptbScsXG5cdCAgICAgICAgTFRTIDogJ0g6bW06c3MnLFxuXHQgICAgICAgIEwgOiAnREQuTU0uWVlZWScsXG5cdCAgICAgICAgTEwgOiAnRC4gTU1NTSBZWVlZJyxcblx0ICAgICAgICBMTEwgOiAnRC4gTU1NTSBZWVlZIEg6bW0nLFxuXHQgICAgICAgIExMTEwgOiAnZGRkZCBELiBNTU1NIFlZWVkgSDptbScsXG5cdCAgICAgICAgbCA6ICdELiBNLiBZWVlZJ1xuXHQgICAgfSxcblx0ICAgIGNhbGVuZGFyIDoge1xuXHQgICAgICAgIHNhbWVEYXk6ICdbZG5lcyB2XSBMVCcsXG5cdCAgICAgICAgbmV4dERheTogJ1t6w610cmEgdl0gTFQnLFxuXHQgICAgICAgIG5leHRXZWVrOiBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuXHQgICAgICAgICAgICAgICAgY2FzZSAwOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3YgbmVkxJtsaSB2XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDE6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDI6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdl0gZGRkZCBbdl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAzOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ZlIHN0xZllZHUgdl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSA0OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ZlIMSNdHZydGVrIHZdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgNTpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2IHDDoXRlayB2XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDY6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdiBzb2JvdHUgdl0gTFQnO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBsYXN0RGF5OiAnW3bEjWVyYSB2XSBMVCcsXG5cdCAgICAgICAgbGFzdFdlZWs6IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDA6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbbWludWxvdSBuZWTEm2xpIHZdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMTpcblx0ICAgICAgICAgICAgICAgIGNhc2UgMjpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1ttaW51bMOpXSBkZGRkIFt2XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDM6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbbWludWxvdSBzdMWZZWR1IHZdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgNDpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNTpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1ttaW51bMO9XSBkZGRkIFt2XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDY6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbbWludWxvdSBzb2JvdHUgdl0gTFQnO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBzYW1lRWxzZTogJ0wnXG5cdCAgICB9LFxuXHQgICAgcmVsYXRpdmVUaW1lIDoge1xuXHQgICAgICAgIGZ1dHVyZSA6ICd6YSAlcycsXG5cdCAgICAgICAgcGFzdCA6ICdwxZllZCAlcycsXG5cdCAgICA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N6T3qonLFxuXHQgICAgJ96Q3qzeld6w3pPerN6J3rDehN6m3oPeqicsXG5cdCAgICAn3ofert6G3rDek96v3oTept6D3qonLFxuXHQgICAgJ96C3q7eiN6s3onesN6E3qbeg96qJyxcblx0ICAgICfekd6o3pDerN6J3rDehN6m3oPeqidcblx0XTtcblx0dmFyIHdlZWtkYXlzID0gW1xuXHQgICAgJ96H3qfei96o3ofesN6M3qYnLFxuXHQgICAgJ96A3q/eid6mJyxcblx0ICAgICfeh96m3oLesN6O3qfeg96mJyxcblx0ICAgICfehN6q3ovepicsXG5cdCAgICAn3oTeqt6D3qfekN6w3orept6M3qgnLFxuXHQgICAgJ96A3qreht6q3oPeqicsXG5cdCAgICAn3oDert6C3qjegN6o3oPeqidcblx0XTtcblx0XG5cdHZhciBkdiA9IG1vbWVudC5kZWZpbmVMb2NhbGUoJ2R2Jywge1xuXHQgICAgbW9udGhzIDogbW9udGhzLFxuXHQgICAgbW9udGhzU2hvcnQgOiBtb250aHMsXG5cdCAgICB3ZWVrZGF5cyA6IHdlZWtkYXlzLFxuXHQgICAgd2Vla2RheXNTaG9ydCA6IHdlZWtkYXlzLFxuXHQgICAgd2Vla2RheXNNaW4gOiAn3ofep96L3qhf3oDer96J3qZf3ofept6C3rBf3oTeqt6L3qZf3oTeqt6D3qdf3oDeqt6G3qpf3oDert6C3qgnLnNwbGl0KCdfJyksXG5cdCAgICBsb25nRGF0ZUZvcm1hdCA6IHtcblx0XG5cdCAgICAgICAgTFQgOiAnSEg6bW0nLFxuXHQgICAgICAgIExUUyA6ICdISDptbTpzcycsXG5cdCAgICAgICAgTCA6ICdEL00vWVlZWScsXG5cdCAgICAgICAgTEwgOiAnRCBNTU1NIFlZWVknLFxuXHQgICAgICAgIExMTCA6ICdEIE1NTU0gWVlZWSBISDptbScsXG5cdCAgICAgICAgTExMTCA6ICdkZGRkIEQgTU1NTSBZWVlZIEhIOm1tJ1xuXHQgICAgfSxcblx0ICAgIG1lcmlkaWVtUGFyc2U6IC/eid6GfN6J3oovLFxuXHQgICAgaXNQTSA6IGZ1bmN0aW9uIChpbnB1dCkge1xuXHQgICAgICAgIHJldHVybiAn3oneiicgPT09IGlucHV0O1xuXHQgICAgfSxcblx0ICAgIG1lcmlkaWVtIDogZnVuY3Rpb24gKGhvdXIsIG1pbnV0ZSwgaXNMb3dlcikge1xuXHQgICAgICAgIGlmIChob3VyIDwgMTIpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfeid6GJztcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4gJ96J3oonO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBjYWxlbmRhciA6IHtcblx0ICAgICAgICBzYW1lRGF5IDogJ1veid6o3ofept6L3qpdIExUJyxcblx0ICAgICAgICBuZXh0RGF5IDogJ1veid6n3ovept6J3qddIExUJyxcblx0ICAgICAgICBuZXh0V2VlayA6ICdkZGRkIExUJyxcblx0ICAgICAgICBsYXN0RGF5IDogJ1veh96o3ofesN6U3qxdIExUJyxcblx0ICAgICAgICBsYXN0V2VlayA6ICdb3orep96H3qjejN6q3ojeqF0gZGRkZCBMVCcsXG5cdCAgICAgICAgc2FtZUVsc2UgOiAnTCdcblx0ICAgIH0sXG5cdCAgICByZWxhdGl2ZVRpbWUgOiB7XG5cdCAgICAgICAgZnV0dXJlIDogJ96M3qzeg96t3o7ept6H3qggJXMnLFxuXHQgICAgICAgIHBhc3QgOiAn3obeqt6D3qjegt6wICVzJyxcblx0ICAgICAgICBzIDogJ96Q3qjeht6q3oLesN6M3qreht6u3oXerN6H3rAnLFxuXHQgICAgICAgIG0gOiAn3oneqN6C3qjek96s3ofesCcsXG5cdCAgICAgICAgbW0gOiAn3oneqN6C3qjek96qICVkJyxcblx0ICAgICAgICBoIDogJ96O3qbekd6o3ofeqN6D3qzeh96wJyxcblx0ICAgICAgICBoaCA6ICfejt6m3pHeqN6H3qjeg96qICVkJyxcblx0ICAgICAgICBkIDogJ96L3qreiN6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68zrXPgc6xIHt9XSBMVCcsXG5cdCAgICAgICAgbmV4dERheSA6ICdbzpHPjc+BzrnOvyB7fV0gTFQnLFxuXHQgICAgICAgIG5leHRXZWVrIDogJ2RkZGQgW3t9XSBMVCcsXG5cdCAgICAgICAgbGFzdERheSA6ICdbzqfOuM61z4Ige31dIExUJyxcblx0ICAgICAgICBsYXN0V2VlayA6IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDY6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbz4TOvyDPgM+Bzr/Ot86zzr/Pjc68zrXOvc6/XSBkZGRkIFt7fV0gTFQnO1xuXHQgICAgICAgICAgICAgICAgZGVmYXVsdDpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vPhM63zr0gz4DPgc6/zrfOs86/z43OvM61zr3Ot10gZGRkZCBbe31dIExUJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgc2FtZUVsc2UgOiAnTCdcblx0ICAgIH0sXG5cdCAgICBjYWxlbmRhciA6IGZ1bmN0aW9uIChrZXksIG1vbSkge1xuXHQgICAgICAgIHZhciBvdXRwdXQgPSB0aGlzLl9jYWxlbmRhckVsW2tleV0sXG5cdCAgICAgICAgICAgIGhvdXJzID0gbW9tICYmIG1vbS5ob3VycygpO1xuXHQgICAgICAgIGlmIChpc0Z1bmN0aW9uKG91dHB1dCkpIHtcblx0ICAgICAgICAgICAgb3V0cHV0ID0gb3V0cHV0LmFwcGx5KG1vbSk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHJldHVybiBvdXRwdXQucmVwbGFjZSgne30nLCAoaG91cnMgJSAxMiA9PT0gMSA/ICfPg8+EzrcnIDogJ8+Dz4TOuc+CJykpO1xuXHQgICAgfSxcblx0ICAgIHJlbGF0aXZlVGltZSA6IHtcblx0ICAgICAgICBmdXR1c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XG5cdCAgICAgICAgbGFzdFdlZWsgOiAnW0xhc3RdIGRkZGQgW2F0XSBMVCcsXG5cdCAgICAgICAgc2FtZUVsc2UgOiAnTCdcblx0ICAgIH0sXG5cdCAgICByZWxhdGl2ZVRpbWUgOiB7XG5cdCAgICAgICAgZnV0dXJlIDogJ2luICVzJyxcblx0ICAgICAgICBwYXN0IDogJyVzIGFnbycsXG5cdCAgICAgICAgcyA6ICdhIGZldyBzZWNvbmRzJyxcblx0ICAgICAgICBtIDogJ2EgbWludXRlJyxcblx0ICAgICAgICBtbSA6ICclZCBtaW51dGVzJyxcblx0ICAgICAgICBoIDogJ2FuIGhvdXInLFxuXHQgICAgICAgIGhoIDogJyVkIGhvdXJzJyxcblx0ICAgICAgICBkIDogJ2EgZGF5Jyxcblx0ICAgICAgICBkZCA6ICclZCBkYXlzJyxcblx0ICAgICAgICBNIDogJ2EgbW9udGgnLFxuXHQgICAgICAgIE1NIDogJyVkIG1vbnRocycsXG5cdCAgICAgICAgeSA6ICdhIHllYXInLFxuXHQgICAgICAgIHl5IDogJyVkIHllYXJzJ1xuXHQgICAgfSxcblx0ICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2U6IC9cXGR7MSwyfShzdHxuZHxyZHx0aCkvLFxuXHQgICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIpIHtcblx0ICAgICAgICB2YXIgYiA9IG51bWJlciAlIDEwLFxuXHQgICAgICAgICAgICBvdXRwdXQgPSAofn4obnVtYmVyICUgMTAwIC8gMTApID09PSAxKSA/ICd0aCcgOlxuXHQgICAgICAgICAgICAoYiA9PT0gMSkgPyAnc3QnIDpcblx0ICAgICAgICAgICAgKGIgPT09IDIpID8gJ25kJyA6XG5cdCAgICAgICAgICAgIChiID09PSAzKSA/ICdyZCcgOiAndGgnO1xuXHQgICAgICAgIHJldHVybiBudW1iZXIgKyBvdXRwdXQ7XG5cdCAgICB9LFxuXHQgICAgd2VlayA6IHtcblx0ICAgICAgICBkb3cgOi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V0YW1hbiBzZWt1bm5pbicgOiAnbXV1dGFtYSBzZWt1bnRpJztcblx0ICAgICAgICBjYXNlICdtJzpcblx0ICAgICAgICAgICAgcmV0dXJuIGlzRnV0dXJlID8gJ21pbnV1dGluJyA6ICdtaW51dXR0aSc7XG5cdCAgICAgICAgY2FzZSAnbW0nOlxuXHQgICAgICAgICAgICByZXN1bHQgPSBpc0Z1dHVyZSA/ICdtaW51dXRpbicgOiAnbWludXV0dGlhJztcblx0ICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgY2FzZSAnaCc6XG5cdCAgICAgICAgICAgIHJldHVybiBpc0Z1dHVyZSA/ICd0dW5uaW4nIDogJ3R1bnRpJztcblx0ICAgICAgICBjYXNlICdoaCc6XG5cdCAgICAgICAgICAgIHJlc3VsdCA9IGlzRnV0dXJlID8gJ3R1bm5pbicgOiAndHVudGlhJztcblx0ICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgY2FzZSAnZCc6XG5cdCAgICAgICAgICAgIHJldHVybiBpc0Z1dHVyZSA/ICdww6RpdsOkbicgOiAncMOkaXbDpCc7XG5cdCAgICAgICAgY2FzZSAnZGQnOlxuXHQgICAgICAgICAgICByZXN1bHQgPSBpc0Z1dHVyZSA/ICdww6RpdsOkbicgOiAncMOkaXbDpMOkJztcblx0ICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgY2FzZSAnTSc6XG5cdCAgICAgICAgICAgIHJldHVybiBpc0Z1dHVyZSA/ICdrdXVrYXVkZW4nIDogJ2t1dWthdXNpJztcblx0ICAgICAgICBjYXNlICdNTSc6XG5cdCAgICAgICAgICAgIHJlc3VsdCA9IGlzRnV0dXJlID8gJ2t1dWthdWRlbicgOiAna3V1a2F1dHRhJztcblx0ICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgY2FzZSAneSc6XG5cdCAgICAgICAgICAgIHJldHVybiBpc0Z1dHVyZSA/ICd2dW9kZW4nIDogJ3Z1b3NpJztcblx0ICAgICA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w6EnIDogJ2EnKSArICddIExUJztcblx0ICAgICAgICB9LFxuXHQgICAgICAgIGxhc3RXZWVrIDogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ1tvXSBkZGRkIFtwYXNhZG8gJyArICgodGhpcy5ob3VycygpICE9PSAxKSA/ICfDoXMnIDogJ2EnKSArICddIExUJztcblx0ICAgICAgICB9LFxuXHQgICAgICAgIHNhbWVFbHNlIDogJ0wnXG5cdCAgICB9LFxuXHQgICAgcmVsYXRpdmVUaW1lIDoge1xuXHQgICAgICAgIGZ1dHVyZSA6IGZ1bmN0aW9uIChzdHIpIHtcblx0ICAgICAgICAgICAgaWYgKHN0ci5pbmRleE9mKCd1bicpID09PSAwKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gJ24nICsgc3RyO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiAnZW4gJyArIHN0cjtcblx0ICAgICAgICB9LFxuXHQgICAgICAgIHBhc3QgOiAnaGFpICVzJyxcblx0ICAgICAgICBzIDogJ3VucyBzZWd1bmRvcycsXG5cdCAgICAgICAgbSA6ICd1biBtaW51dG8nLFxuXHQgICAgICAgIG1tIDogJyVkIG1pbnV0b3MnLFxuXHQgICAgICAgIGggOiAndW5oYSBob3JhJyxcblx0ICAgICAgICBoaCA6ICclZCBob3JhcycsXG5cdCAgICAgICAgZCA6ICd1biBkw61hJyxcblx0ICAgICAgICBkZCA6ICclZCBkw61hcycsXG5cdCAgICAgICAgTSA6ICd1biBtZXMnLFxuXHQgICAgICAgIE1NIDogJyVkIG1lc2VzJyxcblx0ICAgICAgICB5IDogJ3VuIGFubycsXG5cdCAgICAgICAgeXkgOiAnJWQgYW5vcydcblx0ICAgIH0sXG5cdCAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlIDogL1xcZHsxLDJ9wrovLFxuXHQgICAgb3JkaW5hbCA6ICclZMK6Jyxcblx0ICAgIHdlZWsgOiB7XG5cdCAgICAg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ZWZhdWx0OlxuXHQgICAgICAgICAgICBjYXNlICdNJzpcblx0ICAgICAgICAgICAgY2FzZSAnUSc6XG5cdCAgICAgICAgICAgIGNhc2UgJ0RERCc6XG5cdCAgICAgICAgICAgIGNhc2UgJ2QnOlxuXHQgICAgICAgICAgICBjYXNlICd3Jzpcblx0ICAgICAgICAgICAgY2FzZSAnVyc6XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICB3ZWVrIDoge1xuXHQgICAgICAgIGRvdyA6IDEsIC8vIE1vbmRheSBpcyB0aGUgZmlyc3QgZGF5IG9mIHRoZSB3ZWVrLlxuXHQgICAgICAgIGRveSA6IDQgIC8vIFRoZSB3ZWVrIHRoYXQgY29udGFpbnMgSmFuIDR0aCBpcyB0aGUgZmlyc3Qgd2VlayBvZiB0aGUgeWVhci5cblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbVBhcnNlOiAvcmF0aXxzb2thbGxpfGRvbnBhcmFtfHNhbmplLyxcblx0ICAgIG1lcmlkaWVtSG91ciA6IGZ1bmN0aW9uIChob3VyLCBtZXJpZGllbSkge1xuXHQgICAgICAgIGlmIChob3VyID09PSAxMikge1xuXHQgICAgICAgICAgICBob3VyID0gMDtcblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKG1lcmlkaWVtID09PSAncmF0aScpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGhvdXIgPCA0ID8gaG91ciA6IGhvdXIgKyAxMjtcblx0ICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAnc29rYWxsaScpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGhvdXI7XG5cdCAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ2RvbnBhcmFtJykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91ciA+IDEyID8gaG91ciA6IGhvdXIgKyAxMjtcblx0ICAgICAgICB9IGVsc2UgaWYg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JtYXQgOiB7XG5cdCAgICAgICAgTFQgOiAnSEg6bW0nLFxuXHQgICAgICAgIExUUyA6ICdISDptbTpzcycsXG5cdCAgICAgICAgTCA6ICdERC9NTS9ZWVlZJyxcblx0ICAgICAgICBMTCA6ICdEIFvXkV1NTU1NIFlZWVknLFxuXHQgICAgICAgIExMTCA6ICdEIFvXkV1NTU1NIFlZWVkgSEg6bW0nLFxuXHQgICAgICAgIExMTEwgOiAnZGRkZCwgRCBb15FdTU1NTSBZWVlZIEhIOm1tJyxcblx0ICAgICAgICBsIDogJ0QvTS9ZWVlZJyxcblx0ICAgICAgICBsbCA6ICdEIE1NTSBZWVlZJyxcblx0ICAgICAgICBsbGwgOiAnRCBNTU0gWVlZWSBISDptbScsXG5cdCAgICAgICAgbGxsbCA6ICdkZGQsIEQgTU1NIFlZWVkgSEg6bW0nXG5cdCAgICB9LFxuXHQgICAgY2FsZW5kYXIgOiB7XG5cdCAgICAgICAgc2FtZURheSA6ICdb15TXmdeV150g15HWvl1MVCcsXG5cdCAgICAgICAgbmV4dERheSA6ICdb157Xl9eoINeR1r5dTFQnLFxuXHQgICAgICAgIG5leHRXZWVrIDogJ2RkZGQgW9eR16nXoteUXSBMVCcsXG5cdCAgICAgICAgbGFzdERheSA6ICdb15DXqtee15XXnCDXkda+XUxUJyxcblx0ICAgICAgICBsYXN0V2VlayA6ICdb15HXmdeV151dIGRkZGQgW9eU15DXl9eo15XXnyDXkdep16LXlF0gTFQnLFxuXHQgICAgICAgIHNhbWVFbHNlIDogJ0wnXG5cdCAgICB9LFxuXHQgICAgcmVsYXRpdmVUaW1lIDoge1xuXHQgICAgICAgIGZ1dHVyZSA6ICfXkdei15XXkyAlcycsXG5cdCAgICAgICAgcGFzdCA6ICfXnNek16DXmSAlcycsXG5cdCAgICAgICAgcyA6ICfXnteh16TXqCDXqdeg15nXldeqJyxcblx0ICAgICAgICBtIDogJ9eT16fXlCcsXG5cdCAgICAgICAgbW0gOiAnJWQg15PXp9eV16onLFxuXHQgICAgICAgIGggOiAn16nXoteUJyxcblx0ICAgICAgICBoaCA6IGZ1bmN0aW9uIChudW1iZXIpIHtcblx0ICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMikge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuICfXqdei16rXmdeZ150nO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnINep16LXldeqJztcblx0ICAgICAgICB9LFxuXHQgICAgICAgIGQgOiAn15nXldedJyxcblx0ICAgICAgICBkZCA6IGZ1bmN0aW9uIChudW1iZXIpIHtcblx0ICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMikge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuICfXmdeV157XmdeZ150nO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnINeZ157XmdedJztcblx0ICAgICAgICB9LFxuXHQgICAgICAgIE0gOiAn15fXldeT16knLFxuXHQgICAgICAgIE1NIDogZnVuY3Rpb24gKG51bWJlcikge1xuXHQgICAgICAgICAgICBpZiAobnVtYmVyID09PSAyKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gJ9eX15XXk9ep15nXmdedJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJyDXl9eV15PXqdeZ150nO1xuXHQgICAgICAgIH0sXG5cdCAgICAgICAgeSA6ICfXqdeg15QnLFxuXHQgICAgICAgIHl5IDogZnVuY3Rpb24gKG51bWJlcikge1xuXHQgICAgICAgICAgICBpZiAobnVtYmVyID09PSAyKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gJ9ep16DXqteZ15nXnSc7XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyICUgMTAgPT09IDAgJiYgbnVtYmVyICE9PSAxMCkge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICcg16nXoNeUJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJyDXqdeg15nXnSc7XG5cdCAgICAgICAgfVxuXHQgICAgfSxcblx0ICAgIG1lcmlkaWVtUGFyc2U6IC/XkNeX15RcItemfNec16TXoNeUXCLXpnzXkNeX16jXmSDXlNem15TXqNeZ15nXnXzXnNek16DXmSDXlNem15TXqNeZ15nXnXzXnNek16DXldeqINeR15XXp9eofNeR15HXlden16h815HXoteo15EvaSxcblx0ICAgIGlzUE0gOiBmdW5jdGlvbiAoaW5wdXQpIHtcblx0ICAgICAgICByZXR1cm4gL14o15DXl9eUXCLXpnzXkNeX16jXmSDXlNem15TXqNeZ15nXnXzXkdei16jXkSkkLy50ZXN0KGlucHV0KTtcblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcblx0ICAgICAgICBpZiAoaG91ciA8IDUpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfXnNek16DXldeqINeR15XXp9eoJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ9eR15HXlden16gnO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDEyKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBpc0xvd2VyID8gJ9ec16TXoNeUXCLXpicgOiAn15zXpNeg15kg15TXpteU16jXmdeZ150nO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDE4KSB7XG5cdCAgICAgICAgICAgIHJldHVybiBpc0xvd2VyID8gJ9eQ15fXlFwi16YnIDogJ9eQ15fXqNeZINeU16bXlNeo15nXmdedJztcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4gJ9eR16LXqNeRJztcblx0ICAgICAgICB9XG5cdCAgICB9XG5cdH0pO1xuXHRcblx0cmV0dXJuIGhlO1xuXHRcblx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W9uIChtb21lbnQpIHsgJ3VzZSBzdHJpY3QnO1xuXHRcblx0XG5cdGZ1bmN0aW9uIHRyYW5zbGF0ZShudW1iZXIsIHdpdGhvdXRTdWZmaXgsIGtleSkge1xuXHQgICAgdmFyIHJlc3VsdCA9IG51bWJlciArICcgJztcblx0ICAgIHN3aXRjaCAoa2V5KSB7XG5cdCAgICAgICAgY2FzZSAnbSc6XG5cdCAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4ID8gJ2plZG5hIG1pbnV0YScgOiAnamVkbmUgbWludXRlJztcblx0ICAgICAgICBjYXNlICdtbSc6XG5cdCAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnbWludXRhJztcblx0ICAgICAgICAgICAgfSBlbHNlIGlmIChudW1iZXIgPT09IDIgfHwgbnVtYmVyID09PSAzIHx8IG51bWJlciA9PT0gNCkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtaW51dGUnO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtaW51dGEnO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG5cdCAgICAgICAgY2FzZSAnaCc6XG5cdCAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4ID8gJ2plZGFuIHNhdCcgOiAnamVkbm9nIHNhdGEnO1xuXHQgICAgICAgIGNhc2UgJ2hoJzpcblx0ICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdzYXQnO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMiB8fCBudW1iZXIgPT09IDMgfHwgbnVtYmVyID09PSA0KSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ3NhdGEnO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdzYXRpJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuXHQgICAgICAgIGNhc2UgJ2RkJzpcblx0ICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdkYW4nO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdkYW5hJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuXHQgICAgICAgIGNhc2UgJ01NJzpcblx0ICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtamVzZWMnO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMiB8fCBudW1iZXIgPT09IDMgfHwgbnVtYmVyID09PSA0KSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ21qZXNlY2EnO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtamVzZWNpJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuXHQgICAgICAgIGNhc2UgJ3l5Jzpcblx0ICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdnb2RpbmEnO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMiB8fCBudW1iZXIgPT09IDMgfHwgbnVtYmVyID09PSA0KSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ2dvZGluZSc7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgIC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0ZUZvcm1hdCA6IHtcblx0ICAgICAgICBMVCA6ICdIOm1tJyxcblx0ICAgICAgICBMVFMgOiAnSDptbTpzcycsXG5cdCAgICAgICAgTCA6ICdERC5NTS5ZWVlZJyxcblx0ICAgICAgICBMTCA6ICdELiBNTU1NIFlZWVknLFxuXHQgICAgICAgIExMTCA6ICdELiBNTU1NIFlZWVkgSDptbScsXG5cdCAgICAgICAgTExMTCA6ICdkZGRkLCBELiBNTU1NIFlZWVkgSDptbSdcblx0ICAgIH0sXG5cdCAgICBjYWxlbmRhciA6IHtcblx0ICAgICAgICBzYW1lRGF5ICA6ICdbZGFuYXMgdV0gTFQnLFxuXHQgICAgICAgIG5leHREYXkgIDogJ1tzdXRyYSB1XSBMVCcsXG5cdCAgICAgICAgbmV4dFdlZWsgOiBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuXHQgICAgICAgICAgICAgICAgY2FzZSAwOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIFtuZWRqZWxqdV0gW3VdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMzpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBbc3JpamVkdV0gW3VdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgNjpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBbc3Vib3R1XSBbdV0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAxOlxuXHQgICAgICAgICAgICAgICAgY2FzZSAyOlxuXHQgICAgICAgICAgICAgICAgY2FzZSA0OlxuXHQgICAgICAgICAgICAgICAgY2FzZSA1OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIGRkZGQgW3VdIExUJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgbGFzdERheSAgOiAnW2p1xI1lciB1XSBMVCcsXG5cdCAgICAgICAgbGFzdFdlZWsgOiBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuXHQgICAgICAgICAgICAgICAgY2FzZSAwOlxuXHQgICAgICAgICAgICAgICAgY2FzZSAzOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3Byb8WhbHVdIGRkZGQgW3VdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgNjpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1twcm/FoWxlXSBbc3Vib3RlXSBbdV0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAxOlxuXHQgICAgICAgICAgICAgICAgY2FzZSAyOlxuXHQgICAgICAgICAgICAgICAgY2FzZSA0OlxuXHQgICAgICAgICAgICAgICAgY2FzZSA1OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3Byb8WhbGldIGRkZGQgW3VdIExUJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgc2FtZUVsc2UgOiAnTCdcblx0ICAgIH0sXG5cdCAgICByZWxhdGl2ZVRpbWUgOiB7XG5cdCAgICAgICAgZnV0dXJlIDogJ3phICVzJyxcblx0ICAgICAgICBwYXN0ICAgOiAncHJpamUgJXMnLFxuXHQgICAgICAgIHMgICAgICA6ICdwYXIgc2VrdW5kaScsXG5cdCAgICAgICAgbSAgICAgIDogdHJhbnNsYXRlLFxuXHQgICAgICAgIG1tICAgICA6IHRyYW5zbGF0ZSxcblx0ICAgICAgICBoICAgICAgOiB0cmFuc2xhdGUsXG5cdCAgICAgICAgaGggICAgIDogdHJhbnNsYXRlLFxuXHQgICAgICAgIGQgICAgICA6ICdkYW4nLFxuXHQgICAgICAgIGRkICAgICA6IHRyYW5zbGF0ZSxcblx0ICAgICAgICBNICAgICAgOiAnbWplc2VjJyxcblx0ICAgICAgICBNTSAgICAgOiB0cmFuc2xhdGUsXG5cdCAgICAgICA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IHN0cmljdCc7XG5cdFxuXHRcblx0ZnVuY3Rpb24gcGx1cmFsKG4pIHtcblx0ICAgIGlmIChuICUgMTAwID09PSAxMSkge1xuXHQgICAgICAgIHJldHVybiB0cnVlO1xuXHQgICAgfSBlbHNlIGlmIChuICUgMTAgPT09IDEpIHtcblx0ICAgICAgICByZXR1cm4gZmFsc2U7XG5cdCAgICB9XG5cdCAgICByZXR1cm4gdHJ1ZTtcblx0fVxuXHRmdW5jdGlvbiB0cmFuc2xhdGUobnVtYmVyLCB3aXRob3V0U3VmZml4LCBrZXksIGlzRnV0dXJlKSB7XG5cdCAgICB2YXIgcmVzdWx0ID0gbnVtYmVyICsgJyAnO1xuXHQgICAgc3dpdGNoIChrZXkpIHtcblx0ICAgICAgICBjYXNlICdzJzpcblx0ICAgICAgICAgICAgcmV0dXJuIHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnbm9ra3JhciBzZWvDum5kdXInIDogJ25va2tydW0gc2Vrw7puZHVtJztcblx0ICAgICAgICBjYXNlICdtJzpcblx0ICAgICAgICAgICAgcmV0dXJuIHdpdGhvdXRTdWZmaXggPyAnbcOtbsO6dGEnIDogJ23DrW7DunR1Jztcblx0ICAgICAgICBjYXNlICdtbSc6XG5cdCAgICAgICAgICAgIGlmIChwbHVyYWwobnVtYmVyKSkge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ23DrW7DunR1cicgOiAnbcOtbsO6dHVtJyk7XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAod2l0aG91dFN1ZmZpeCkge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdtw61uw7p0YSc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdtw61uw7p0dSc7XG5cdCAgICAgICAgY2FzZSAnaGgnOlxuXHQgICAgICAgICAgICBpZiAocGx1cmFsKG51bWJlcikpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdrbHVra3VzdHVuZGlyJyA6ICdrbHVra3VzdHVuZHVtJyk7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdrbHVra3VzdHVuZCc7XG5cdCAgICAgICAgY2FzZSAnZCc6XG5cdCAgICAgICAgICAgIGlmICh3aXRob3V0U3VmZml4KSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gJ2RhZ3VyJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gaXNGdXR1cmUgPyAnZGFnJyA6ICdkZWdpJztcblx0ICAgICAgICBjYXNlICdkZCc6XG5cdCAgICAgICAgICAgIGlmIChwbHVyYWwobnVtYmVyKSkge1xuXHQgICAgICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXgpIHtcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ2RhZ2FyJztcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAoaXNGdXR1cmUgPyAnZGFnYScgOiAnZMO2Z3VtJyk7XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAod2l0aG91dFN1ZmZpeCkge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdkYWd1cic7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArIChpc0Z1dHVyZSA/ICdkYWcnIDogJ2RlZ2knKTtcblx0ICAgICAgICBjYXNlICdNJzpcblx0ICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXgpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiAnbcOhbnXDsHVyJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gaXNGdXR1cmUgPyAnbcOhbnXDsCcgOiAnbcOhbnXDsGknO1xuXHQgICAgICAgIGNhc2UgJ01NJzpcblx0ICAgICAgICAgICAgaWYgKHBsdXJhbChudW1iZXIpKSB7XG5cdCAgICAgICAgICAgICAgICBpZiAod2l0aG91dFN1ZmZpeCkge1xuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAnbcOhbnXDsGlyJztcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAoaXNGdXR1cmUgPyAnbcOhbnXDsGknIDogJ23DoW51w7B1bScpO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKHdpdGhvdXRTdWZmaXgpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAnbcOhbnXDsHVyJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKGlzRnV0dXJlID8gJ23DoW51w7AnIDogJ23DoW51w7BpJyk7XG5cdCAgICAgICAgY2FzZSAneSc6XG5cdCAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ8OhcicgOiAnw6FyaSc7XG5cdCAgICAgICAgY2FzZSAneXknOlxuXHQgICAgICAgICAgICBpZiAocGx1cmFsKG51bWJlcikpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICfDoXInIDogJ8OhcnVtJyk7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ8OhcicgOiAnw6FyaScpO1xuXHQgICAgfVxuXHR9XG5cdFxuXHR2YXIgaXMgPSBtb21lbnQuZGVmaW5lTG9jYWxlKCdpcycsIHtcblx0ICAgIG1vbnR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EYXkgOiAnW+S7iuaXpV0gTFQnLFxuXHQgICAgICAgIG5leHREYXkgOiAnW+aYjuaXpV0gTFQnLFxuXHQgICAgICAgIG5leHRXZWVrIDogJ1vmnaXpgLFdZGRkZCBMVCcsXG5cdCAgICAgICAgbGFzdERheSA6ICdb5pio5pelXSBMVCcsXG5cdCAgICAgICAgbGFzdFdlZWsgOiAnW+WJjemAsV1kZGRkIExUJyxcblx0ICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuXHQgICAgfSxcblx0ICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2UgOiAvXFxkezEsMn3ml6UvLFxuXHQgICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIsIHBlcmlvZCkge1xuXHQgICAgICAgIHN3aXRjaCAocGVyaW9kKSB7XG5cdCAgICAgICAgICAgIGNhc2UgJ2QnOlxuXHQgICAgICAgICAgICBjYXNlICdEJzpcblx0ICAgICAgICAgICAgY2FzZSAnREREJzpcblx0ICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAn5pelJztcblx0ICAgICAgICAgICAgZGVmYXVsdDpcblx0ICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXI7XG5cdCAgICAgICAgfVxuXHQgICAgfSxcblx0ICAgIHJlbGF0aXZlVGltZSA6IHtcblx0ICAgICAgICBmdXR1cmUgOiAnJXPlvownLFxuXHQgICAgICAgIHBhc3QgOiAnJXPliY0nLFxuXHQgICAgICAgIHMgOiAn5pWw56eSJyxcblx0ICAgICAgICBtIDogJzHliIYnLFxuXHQgICAgICAgIG1tIDogJyVk5YiGJyxcblx0ICAgICAgICBoIDogJzHmmYLplpMnLFxuXHQgICAgICAgIGhoIDogJyVk5pmC6ZaTJyxcblx0ICAgICAgICBkIDogJzHml6UnLFxuXHQgICAgICAgIGRkIDogJyVk5pelJyxcblx0ICAgICAgICBNIDogJzHjg7bmnIgnLFxuXHQgICAgICAgIE1NIDogJyVk44O25pyIJyxcblx0ICAgICAgICB5IDogJ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iAv4LKw4LK+4LKk4LON4LKw4LK/fOCyrOCzhuCys+Cyv+Cyl+CzjeCyl+Czhnzgsq7gsqfgs43gsq/gsr7gsrngs43gsqh84LK44LKC4LKc4LOGLyxcblx0ICAgIG1lcmlkaWVtSG91ciA6IGZ1bmN0aW9uIChob3VyLCBtZXJpZGllbSkge1xuXHQgICAgICAgIGlmIChob3VyID09PSAxMikge1xuXHQgICAgICAgICAgICBob3VyID0gMDtcblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKG1lcmlkaWVtID09PSAn4LKw4LK+4LKk4LON4LKw4LK/Jykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91ciA8IDQgPyBob3VyIDogaG91ciArIDEyO1xuXHQgICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfgsqzgs4bgsrPgsr/gspfgs43gspfgs4YnKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBob3VyO1xuXHQgICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfgsq7gsqfgs43gsq/gsr7gsrngs43gsqgnKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBob3VyID49IDEwID8gaG91ciA6IGhvdXIgKyAxMjtcblx0ICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4LK44LKC4LKc4LOGJykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcblx0ICAgICAgICBpZiAoaG91ciA8IDQpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfgsrDgsr7gsqTgs43gsrDgsr8nO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDEwKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn4LKs4LOG4LKz4LK/4LKX4LON4LKX4LOGJztcblx0ICAgICAgICB9IGVsc2UgaWY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ludXRhJ10sXG5cdCAgICAgICAgaDogWydqZWRhbiBzYXQnLCAnamVkbm9nIHNhdGEnXSxcblx0ICAgICAgICBoaDogWydzYXQnLCAnc2F0YScsICdzYXRpJ10sXG5cdCAgICAgICAgZGQ6IFsnZGFuJywgJ2RhbmEnLCAnZGFuYSddLFxuXHQgICAgICAgIE1NOiBbJ21qZXNlYycsICdtamVzZWNhJywgJ21qZXNlY2knXSxcblx0ICAgICAgICB5eTogWydnb2RpbmEnLCAnZ29kaW5lJywgJ2dvZGluYSddXG5cdCAgICB9LFxuXHQgICAgY29ycmVjdEdyYW1tYXRpY2FsQ2FzZTogZnVuY3Rpb24gKG51bWJlciwgd29yZEtleSkge1xuXHQgICAgICAgIHJldHVybiBudW1iZXIgPT09IDEgPyB3b3JkS2V5WzBdIDogKG51bWJlciA+PSAyICYmIG51bWJlciA8PSA0ID8gd29yZEtleVsxXSA6IHdvcmRLZXlbMl0pO1xuXHQgICAgfSxcblx0ICAgIHRyYW5zbGF0ZTogZnVuY3Rpb24gKG51bWJlciwgd2l0aG91dFN1ZmZpeCwga2V5KSB7XG5cdCAgICAgICAgdmFyIHdvcmRLZXkgPSB0cmFuc2xhdG9yLndvcmRzW2tleV07XG5cdCAgICAgICAgaWYgKGtleS5sZW5ndGggPT09IDEpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIHdpdGhvdXRTdWZmaXggPyB3b3JkS2V5WzBdIDogd29yZEtleVsxXTtcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJyAnICsgdHJhbnNsYXRvci5jb3JyZWN0R3JhbW1hdGljYWxDYXNlKG51bWJlciwgd29yZEtleSk7XG5cdCAgICAgICAgfVxuXHQgICAgfVxuXHR9O1xuXHRcblx0dmFyIG1lID0gbW9tZW50LmRlZmluZUxvY2FsZSgnbWUnLCB7XG5cdCAgICBtb250aHM6ICdqYW51YXJfZmVicnVhcl9tYXJ0X2FwcmlsX21hal9qdW5fanV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oaXMuZGF5KCkpIHtcblx0ICAgICAgICAgICAgICAgIGNhc2UgMDpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBbbmVkamVsanVdIFt1XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDM6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gW3NyaWplZHVdIFt1XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDY6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gW3N1Ym90dV0gW3VdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMTpcblx0ICAgICAgICAgICAgICAgIGNhc2UgMjpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNDpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNTpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBkZGRkIFt1XSBMVCc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9LFxuXHQgICAgICAgIGxhc3REYXkgIDogJ1tqdcSNZSB1XSBMVCcsXG5cdCAgICAgICAgbGFzdFdlZWsgOiBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHZhciBsYXN0V2Vla0RheXMgPSBbXG5cdCAgICAgICAgICAgICAgICAnW3Byb8WhbGVdIFtuZWRqZWxqZV0gW3VdIExUJyxcblx0ICAgICAgICAgICAgICAgICdbcHJvxaFsb2ddIFtwb25lZGplbGprYV0gW3VdIExUJyxcblx0ICAgICAgICAgICAgICAgICdbcHJvxaFsb2ddIFt1dG9ya2FdIFt1XSBMVCcsXG5cdCAgICAgICAgICAgICAgICAnW3Byb8WhbGVdIFtzcmlqZWRlXSBbdV0gTFQnLFxuXHQgICAgICAgICAgICAgICAgJ1twcm/FoWxvZ10gW8SNZXR2cnRrYV0gW3VdIExUJyxcblx0ICAgICAgICAgICAgICAgICdbcHJvxaFsb2ddIFtwZXRrYV0gW3VdIExUJyxcblx0ICAg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nW9CS0YfQtdGA0LAg0LLQvl0gTFQnLFxuXHQgICAgICAgIGxhc3RXZWVrIDogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcblx0ICAgICAgICAgICAgICAgIGNhc2UgMDpcblx0ICAgICAgICAgICAgICAgIGNhc2UgMzpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNjpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQmNC30LzQuNC90LDRgtCw0YLQsF0gZGRkZCBb0LLQvl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAxOlxuXHQgICAgICAgICAgICAgICAgY2FzZSAyOlxuXHQgICAgICAgICAgICAgICAgY2FzZSA0OlxuXHQgICAgICAgICAgICAgICAgY2FzZSA1OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CY0LfQvNC40L3QsNGC0LjQvtGCXSBkZGRkIFvQstC+XSBMVCc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9LFxuXHQgICAgICAgIHNhbWVFbHNlIDogJ0wnXG5cdCAgICB9LFxuXHQgICAgcmVsYXRpdmVUaW1lIDoge1xuXHQgICAgICAgIGZ1dHVyZSA6ICfQv9C+0YHQu9C1ICVzJyxcblx0ICAgICAgICBwYXN0IDogJ9C/0YDQtdC0ICVzJyxcblx0ICAgICAgICBzIDogJ9C90LXQutC+0LvQutGDINGB0LXQutGD0L3QtNC4Jyxcblx0ICAgICAgICBtIDogJ9C80LjQvdGD0YLQsCcsXG5cdCAgICAgICAgbW0gOiAnJWQg0LzQuNC90YPRgtC4Jyxcblx0ICAgICAgICBoIDogJ9GH0LDRgScsXG5cdCAgICAgICAgaGggOiAnJWQg0YfQsNGB0LAnLFxuXHQgICAgICAgIGQgOiAn0LTQtdC9Jyxcblx0ICAgICAgICBkZCA6ICclZCDQtNC10L3QsCcsXG5cdCAgICAgICAgTSA6ICfQvNC10YHQtdGGJyxcblx0ICAgICAgICBNTSA6ICclZCDQvNC10YHQtdGG0LgnLFxuXHQgICAgICAgIHkgOiAn0LPQvtC00LjQvdCwJyxcblx0ICAgICAgICB5eSA6ICclZCDQs9C+0LTQuNC90LgnXG5cdCAgICB9LFxuXHQgICAgZGF5T2ZNb250aE9yZGluYWxQYXJzZTogL1xcZHsxLDJ9LSjQtdCyfNC10L180YLQuHzQstC4fNGA0Lh80LzQuCkvLFxuXHQgICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIpIHtcblx0ICAgICAgICB2YXIgbGFzdERpZ2l0ID0gbnVtYmVyICUgMTAsXG5cdCAgICAgICAgICAgIGxhc3QyRGlnaXRzID0gbnVtYmVyICUgMTAwO1xuXHQgICAgICAgIGlmIChudW1iZXIgPT09IDApIHtcblx0ICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0LXQsic7XG5cdCAgICAgICAgfSBlbHNlIGlmIChsYXN0MkRpZ2l0cyA9PT0gMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3QtdC9Jztcblx0ICAgICAgICB9IGVsc2UgaWYgKGxhc3QyRGlnaXRzID4gMTAgJiYgbGFzdDJEaWdpdHMgPCAyMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3RgtC4Jztcblx0ICAgICAgICB9IGVsc2UgaWYgKGxhc3REaWdpdCA9PT0gMSkge1xuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3QstC4Jztcblx0ICAgICAgICB9IGVsc2UgaWYgKGxhc3REaWdpdCA9PT0gMikge1xuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3RgNC4Jztcblx0ICAgICAgICB9IGVsc2UgaWYgKGxhc3REaWdpdCA9PT0gNyB8fCBsYXN0RGlnaXQgPT09IDgpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0LzQuCc7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICA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a3VsXSBISC5tbSdcblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbVBhcnNlOiAvcGFnaXx0ZW5nYWhhcml8cGV0YW5nfG1hbGFtLyxcblx0ICAgIG1lcmlkaWVtSG91cjogZnVuY3Rpb24gKGhvdXIsIG1lcmlkaWVtKSB7XG5cdCAgICAgICAgaWYgKGhvdXIgPT09IDEyKSB7XG5cdCAgICAgICAgICAgIGhvdXIgPSAwO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAobWVyaWRpZW0gPT09ICdwYWdpJykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91cjtcblx0ICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAndGVuZ2FoYXJpJykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91ciA+PSAxMSA/IGhvdXIgOiBob3VyICsgMTI7XG5cdCAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ3BldGFuZycgfHwgbWVyaWRpZW0gPT09ICdtYWxhbScpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGhvdXIgKyAxMjtcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91cnMsIG1pbnV0ZXMsIGlzTG93ZXIpIHtcblx0ICAgICAgICBpZiAoaG91cnMgPCAxMSkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ3BhZ2knO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91cnMgPCAxNSkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ3RlbmdhaGFyaSc7XG5cdCAgICAgICAgfSBlbHNlIGlmIChob3VycyA8IDE5KSB7XG5cdCAgICAgICAgICAgIHJldHVybiAncGV0YW5nJztcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4gJ21hbGFtJztcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgY2FsZW5kYXIgOiB7XG5cdCAgICAgICAg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Bob3VyO1xuXHQgICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfgpKbgpL/gpIngpIHgpLjgpYsnKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBob3VyID49IDEwID8gaG91ciA6IGhvdXIgKyAxMjtcblx0ICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4KS44KS+4KSB4KSdJykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcblx0ICAgICAgICBpZiAoaG91ciA8IDMpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfgpLDgpL7gpKTgpL8nO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDEyKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn4KSs4KS/4KS54KS+4KSoJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxNikge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+CkpuCkv+CkieCkgeCkuOCliyc7XG5cdCAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMjApIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfgpLjgpL7gpIHgpJ0nO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn4KSw4KS+4KSk4KS/Jztcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgY2FsZW5kYXIgOiB7XG5cdCAgICAgICAgc2FtZURheSA6ICdb4KSG4KScXSBMVCcsXG5cdCAgICAgICAgbmV4dERheSA6ICdb4KSt4KWL4KSy4KS/XSBMVCcsXG5cdCAgICAgICAgbmV4dFdlZWsgOiAnW+CkhuCkieCkgeCkpuCli10gZGRkZFssXSBMVCcsXG5cdCAgICAgICAgbGFzdERheSA6ICdb4KS54KS/4KSc4KWLXSBMVCcsXG5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gIHJldHVybiBob3VyID49IDEwID8gaG91ciA6IGhvdXIgKyAxMjtcblx0ICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4Ki44Ki84Ki+4KiuJykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcblx0ICAgICAgICBpZiAoaG91ciA8IDQpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfgqLDgqL7gqKQnO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDEwKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn4Ki44Ki14KmH4KiwJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxNykge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+CopuCpgeCoquCoueCov+CosCc7XG5cdCAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMjApIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfgqLjgqLzgqL7gqK4nO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn4Kiw4Ki+4KikJztcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgd2VlayA6IHtcblx0ICAgICAgICBkb3cgOiAwLCAvLyBTdW5kYXkgaXMgdGhlIGZpcnN0IGRheSBvZiB0aGUgd2Vlay5cblx0ICAgICAgICBkb3kgOiA2ICAvLyBUaGUgd2VlayB0aGF0IGNvbnRhaW5zIEphbiAxc3QgaXMgdGhlIGZpcnN0IHdlZWsgb2YgdGhlIHllYXIuXG5cdCAgICB9XG5cdH0pO1xuXHRcblx0cmV0dXJuIHBhSW47XG5cdFxuXHR9KSkpO1xuXG5cbi8qKiovIH0pLFxuLyogODggKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19y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3VmZml4LCBrZXkpIHtcblx0ICAgIHZhciByZXN1bHQgPSBudW1iZXIgKyAnICc7XG5cdCAgICBzd2l0Y2ggKGtleSkge1xuXHQgICAgICAgIGNhc2UgJ20nOlxuXHQgICAgICAgICAgICByZXR1cm4gd2l0aG91dFN1ZmZpeCA/ICdtaW51dGEnIDogJ21pbnV0xJknO1xuXHQgICAgICAgIGNhc2UgJ21tJzpcblx0ICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArIChwbHVyYWwobnVtYmVyKSA/ICdtaW51dHknIDogJ21pbnV0Jyk7XG5cdCAgICAgICAgY2FzZSAnaCc6XG5cdCAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4ICA/ICdnb2R6aW5hJyAgOiAnZ29kemluxJknO1xuXHQgICAgICAgIGNhc2UgJ2hoJzpcblx0ICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArIChwbHVyYWwobnVtYmVyKSA/ICdnb2R6aW55JyA6ICdnb2R6aW4nKTtcblx0ICAgICAgICBjYXNlICdNTSc6XG5cdCAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAocGx1cmFsKG51bWJlcikgPyAnbWllc2nEhWNlJyA6ICdtaWVzacSZY3knKTtcblx0ICAgICAgICBjYXNlICd5eSc6XG5cdCAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAocGx1cmFsKG51bWJlcikgPyAnbGF0YScgOiAnbGF0Jyk7XG5cdCAgICB9XG5cdH1cblx0XG5cdHZhciBwbCA9IG1vbWVudC5kZWZpbmVMb2NhbGUoJ3BsJywge1xuXHQgICAgbW9udGhzIDogZnVuY3Rpb24gKG1vbWVudFRvRm9ybWF0LCBmb3JtYXQpIHtcblx0ICAgICAgICBpZiAoIW1vbWVudFRvRm9ybWF0KSB7XG5cdCAgICAgICAgICAgIHJldHVybiBtb250aHNOb21pbmF0aXZlO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoZm9ybWF0ID09PSAnJykge1xuXHQgICAgICAgICAgICAvLy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RhdGVGb3JtYXQgOiB7XG5cdCAgICAgICAgTFQgOiAnSEg6bW0nLFxuXHQgICAgICAgIExUUyA6ICdISDptbTpzcycsXG5cdCAgICAgICAgTCA6ICdERC5NTS5ZWVlZJyxcblx0ICAgICAgICBMTCA6ICdEIE1NTU0gWVlZWScsXG5cdCAgICAgICAgTExMIDogJ0QgTU1NTSBZWVlZIEhIOm1tJyxcblx0ICAgICAgICBMTExMIDogJ2RkZGQsIEQgTU1NTSBZWVlZIEhIOm1tJ1xuXHQgICAgfSxcblx0ICAgIGNhbGVuZGFyIDoge1xuXHQgICAgICAgIHNhbWVEYXk6ICdbRHppxZsgb10gTFQnLFxuXHQgICAgICAgIG5leHREYXk6ICdbSnV0cm8gb10gTFQnLFxuXHQgICAgICAgIG5leHRXZWVrOiAnW1ddIGRkZGQgW29dIExUJyxcblx0ICAgICAgICBsYXN0RGF5OiAnW1djem9yYWogb10gTFQnLFxuXHQgICAgICAgIGxhc3RXZWVrOiBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuXHQgICAgICAgICAgICAgICAgY2FzZSAwOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW1cgemVzesWCxIUgbmllZHppZWzEmSBvXSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDM6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbVyB6ZXN6xYLEhSDFm3JvZMSZIG9dIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgNjpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1tXIHplc3rFgsSFIHNvYm90xJkgb10gTFQnO1xuXHQgICAgICAgICAgICAgICAgZGVmYXVsdDpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1tXIHplc3rFgnldIGRkZGQgW29dIExUJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgc2FtZUVsc2U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sy4sIEhIOm1tJyxcblx0ICAgICAgICBMTExMIDogJ2RkZGQsIEQgTU1NTSBZWVlZINCzLiwgSEg6bW0nXG5cdCAgICB9LFxuXHQgICAgY2FsZW5kYXIgOiB7XG5cdCAgICAgICAgc2FtZURheTogJ1vQodC10LPQvtC00L3RjyDQsl0gTFQnLFxuXHQgICAgICAgIG5leHREYXk6ICdb0JfQsNCy0YLRgNCwINCyXSBMVCcsXG5cdCAgICAgICAgbGFzdERheTogJ1vQktGH0LXRgNCwINCyXSBMVCcsXG5cdCAgICAgICAgbmV4dFdlZWs6IGZ1bmN0aW9uIChub3cpIHtcblx0ICAgICAgICAgICAgaWYgKG5vdy53ZWVrKCkgIT09IHRoaXMud2VlaygpKSB7XG5cdCAgICAgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcblx0ICAgICAgICAgICAgICAgICAgICBjYXNlIDA6XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CSINGB0LvQtdC00YPRjtGJ0LXQtV0gZGRkZCBb0LJdIExUJztcblx0ICAgICAgICAgICAgICAgICAgICBjYXNlIDE6XG5cdCAgICAgICAgICAgICAgICAgICAgY2FzZSAyOlxuXHQgICAgICAgICAgICAgICAgICAgIGNhc2UgNDpcblx0ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0JIg0YHQu9C10LTRg9GO0YnQuNC5XSBkZGRkIFvQsl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgICAgIGNhc2UgMzpcblx0ICAgICAgICAgICAgICAgICAgICBjYXNlIDU6XG5cdCAgICAgICAgICAgICAgICAgICAgY2FzZSA2OlxuXHQgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQkiDRgdC70LXQtNGD0Y7RidGD0Y5dIGRkZGQgW9CyXSBMVCc7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICBpZiAodGhpcy5kYXkoKSA9PT0gMikge1xuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CS0L5dIGRkZGQgW9CyXSBMVCc7XG5cdCAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CSXSBkZGRkIFvQsl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBsYXN0V2VlazogZnVuY3Rpb24gKG5vdykge1xuXHQgICAgICAgICAgICBpZiAobm93LndlZWsoKSAhPT0gdGhpcy53ZWVrKCkpIHtcblx0ICAgICAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuXHQgICAgICAgICAgICAgICAgICAgIGNhc2UgMDpcblx0ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0JIg0L/RgNC+0YjQu9C+0LVdIGRkZGQgW9CyXSBMVCc7XG5cdCAgICAgICAgICAgICAgICAgICAgY2FzZSAxOlxuXHQgICAgICAgICAgICAgICAgICAgIGNhc2UgMjpcblx0ICAgICAgICAgICAgICAgICAgICBjYXNlIDQ6XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CSINC/0YDQvtGI0LvRi9C5XSBkZGRkIFvQsl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgICAgIGNhc2UgMzpcblx0ICAgICAgICAgICAgICAgICAgICBjYXNlIDU6XG5cdCAgICAgICAgICAgICAgICAgICAgY2FzZSA2OlxuXHQgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQkiDQv9GA0L7RiNC70YPRjl0gZGRkZCBb0LJdIExUJztcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIGlmICh0aGlzLmRheSgpID09PSAyKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0JLQvl0gZGRkZ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cdCAgICB9LFxuXHQgICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG5cdCAgICAgICAgaWYgKGhvdXIgPCA0KSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn0L3QvtGH0LgnO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDEyKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn0YPRgtGA0LAnO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDE3KSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn0LTQvdGPJztcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4gJ9Cy0LXRh9C10YDQsCc7XG5cdCAgICAgICAgfVxuXHQgICAgfSxcblx0ICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2U6IC9cXGR7MSwyfS0o0Ll80LPQvnzRjykvLFxuXHQgICAgb3JkaW5hbDogZnVuY3Rpb24gKG51bWJlciwgcGVyaW9kKSB7XG5cdCAgICAgICAgc3dpdGNoIChwZXJpb2QpIHtcblx0ICAgICAgICAgICAgY2FzZSAnTSc6XG5cdCAgICAgICAgICAgIGNhc2UgJ2QnOlxuXHQgICAgICAgICAgICBjYXNlICdEREQnOlxuXHQgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0LknO1xuXHQgICAgICAgICAgICBjYXNlICdEJzpcblx0ICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnLdCz0L4nO1xuXHQgICAgICAgICAgICBjYXNlICd3Jzpcblx0ICAgICAgICAgICAgY2FzZSAnVyc6XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3Rjyc7XG5cdCAgICAgICAgICAgIGRlZmF1bHQ6XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICB3ZWVrIDoge1xuXHQgICAg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8gaW4gYSBtb250aCAvIGEgbW9udGggYWdvXG5cdCAgICAgICAgICAgIHJldHVybiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkgPyAnbWVzaWFjJyA6ICdtZXNpYWNvbSc7XG5cdCAgICAgICAgY2FzZSAnTU0nOiAvLyA5IG1vbnRocyAvIGluIDkgbW9udGhzIC8gOSBtb250aHMgYWdvXG5cdCAgICAgICAgICAgIGlmICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHBsdXJhbChudW1iZXIpID8gJ21lc2lhY2UnIDogJ21lc2lhY292Jyk7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ21lc2lhY21pJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICBjYXNlICd5JzogIC8vIGEgeWVhciAvIGluIGEgeWVhciAvIGEgeWVhciBhZ29cblx0ICAgICAgICAgICAgcmV0dXJuICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlKSA/ICdyb2snIDogJ3Jva29tJztcblx0ICAgICAgICBjYXNlICd5eSc6IC8vIDkgeWVhcnMgLyBpbiA5IHllYXJzIC8gOSB5ZWFycyBhZ29cblx0ICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAocGx1cmFsKG51bWJlcikgPyAncm9reScgOiAncm9rb3YnKTtcblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAncm9rbWknO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIGJyZWFrO1xuXHQgICAgfVxuXHR9XG5cdFxuXHR2YXIgc2sgPSBtb21lbnQuZGVmaW5lTG9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gZGRkZCBbb10gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAzOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3Ygc3RyZWR1IG9dIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgNDpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2byDFoXR2cnRvayBvXSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDU6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdiBwaWF0b2sgb10gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSA2OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3Ygc29ib3R1IG9dIExUJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgbGFzdERheTogJ1t2xI1lcmEgb10gTFQnLFxuXHQgICAgICAgIGxhc3RXZWVrOiBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuXHQgICAgICAgICAgICAgICAgY2FzZSAwOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW21pbnVsw7ogbmVkZcS+dSBvXSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDE6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDI6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbbWludWzDvV0gZGRkZCBbb10gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAzOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW21pbnVsw7ogc3RyZWR1IG9dIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgNDpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNTpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1ttaW51bMO9XSBkZGRkIFtvXSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDY6XG5cdCAgICAg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Wx0ICs9IHdpdGhvdXRTdWZmaXggPyAnbWludXRhJyA6ICdtaW51dG8nO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMikge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnbWludXRpJyA6ICdtaW51dGFtYSc7XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyIDwgNSkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnbWludXRlJyA6ICdtaW51dGFtaSc7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdtaW51dCcgOiAnbWludXRhbWknO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG5cdCAgICAgICAgY2FzZSAnaCc6XG5cdCAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4ID8gJ2VuYSB1cmEnIDogJ2VubyB1cm8nO1xuXHQgICAgICAgIGNhc2UgJ2hoJzpcblx0ICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggPyAndXJhJyA6ICd1cm8nO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMikge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAndXJpJyA6ICd1cmFtYSc7XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyIDwgNSkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAndXJlJyA6ICd1cmFtaSc7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICd1cicgOiAndXJhbWknO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG5cdCAgICAgICAgY2FzZSAnZCc6XG5cdCAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ2VuIGRhbicgOiAnZW5pbSBkbmVtJztcblx0ICAgICAgICBjYXNlICdkZCc6XG5cdCAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ2RhbicgOiAnZG5lbSc7XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyID09PSAyKSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdkbmknIDogJ2RuZXZvbWEnO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnZG5pJyA6ICdkbmV2aSc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcblx0ICAgICAgICBjYXNlICdNJzpcblx0ICAgICAgICAgICAgcmV0dXJuIHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnZW4gbWVzZWMnIDogJ2VuaW0gbWVzZWNlbSc7XG5cdCAgICAgICAgY2FzZSAnTU0nOlxuXHQgICAgICAgICAgICBpZiAobnVtYmVyID09PSAxKSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdtZXNlYycgOiAnbWVzZWNlbSc7XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyID09PSAyKSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdtZXNlY2EnIDogJ21lc2VjZW1hJztcblx0ICAgICAgICAgICAgfSBlbHNlIGlmIChudW1iZXIgPCA1KSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdtZXNlY2UnIDogJ21lc2VjaSc7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdtZXNlY2V2JyA6ICdtZXNlY2knO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG5cdCAgICAgICAgY2FzZSAneSc6XG5cdCAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ2VubyBsZXRvJyA6ICdlbmltIGxldG9tJztcblx0ICAgICAgICBjYXNlICd5eSc6XG5cdCAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ2xldG8nIDogJ2xldG9tJztcblx0ICAgICAgICAgICAgfSBlbHNlIGlmIChudW1iZXIgPT09IDIpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ2xldGknIDogJ2xldG9tYSc7XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyIDwgNSkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpd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gICAgICAgTCA6ICdERC5NTS5ZWVlZJyxcblx0ICAgICAgICBMTCA6ICdELiBNTU1NIFlZWVknLFxuXHQgICAgICAgIExMTCA6ICdELiBNTU1NIFlZWVkgSDptbScsXG5cdCAgICAgICAgTExMTCA6ICdkZGRkLCBELiBNTU1NIFlZWVkgSDptbSdcblx0ICAgIH0sXG5cdCAgICBjYWxlbmRhciA6IHtcblx0ICAgICAgICBzYW1lRGF5ICA6ICdbZGFuZXMgb2JdIExUJyxcblx0ICAgICAgICBuZXh0RGF5ICA6ICdbanV0cmkgb2JdIExUJyxcblx0XG5cdCAgICAgICAgbmV4dFdlZWsgOiBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuXHQgICAgICAgICAgICAgICAgY2FzZSAwOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ZdIFtuZWRlbGpvXSBbb2JdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMzpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2XSBbc3JlZG9dIFtvYl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSA2OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ZdIFtzb2JvdG9dIFtvYl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAxOlxuXHQgICAgICAgICAgICAgICAgY2FzZSAyOlxuXHQgICAgICAgICAgICAgICAgY2FzZSA0OlxuXHQgICAgICAgICAgICAgICAgY2FzZSA1OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ZdIGRkZGQgW29iXSBMVCc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9LFxuXHQgICAgICAgIGxhc3REYXkgIDogJ1t2xI1lcmFqIG9iXSBMVCcsXG5cdCAgICAgICAgbGFzdFdlZWsgOiBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuXHQgICAgICAgICAgICAgICAgY2FzZSAwOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ByZWrFoW5qb10gW25lZGVsam9dIFtvYl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAzOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ByZWrFoW5qb10gW3NyZWRvXSBbb2JdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgNjpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1twcmVqxaFuam9dIFtzb2JvdG9dIFtvYl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAxOlxuXHQgICAgICAgICAgICAgICAgY2FzZSAyOlxuXHQgICAgICAgICAgICAgICAgY2FzZSA0OlxuXHQgICAgICAgICAgICAgICAgY2FzZSA1OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ByZWrFoW5qaV0gZGRkZCBbb2JdIExUJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgc2FtZUVsc2UgOiAnTCdcblx0ICAgIH0sXG5cdCAgICByZWxhdGl2ZVRpbWUgOiB7XG5cdCAgICAgICAgZnV0dXJlIDogJ8SNZXogJXMnLFxuXHQgICAgICAgIHBhc3QgICA6ICdwcmVkICVzJyxcblx0ICAgICAgICBzICAgICAgOiBwcm9jZXNzUmVsYXRpdmVUaW1lLFxuXHQgICAgICAgIG0gICAgICA6IHByb2Nlc3NSZWxhdGl2ZVRpbWUsXG5cdCAgICAgICAgbW0gICAgIDogcHJvY2Vzc1JlbGF0aXZlVGltZSxcblx0ICAgICAgICBoICAgICAgOiBwcm9jZXNzUmVsYXRpdmVUaW1lLFxuXHQgICAgICAgIGhoICAgICA6IHByb2Nlc3NSZWxhdGl2ZVRpbWUsXG5cdCAgICAgICAgZCAgICAgIDogcHJvY2Vzc1JlbGF0aXZlVGltZSxcblx0ICAgICAgICBkZCA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DXSBb0YHRgNC10LTRg10gW9GDXSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDY6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0YNdIFvRgdGD0LHQvtGC0YNdIFvRg10gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAxOlxuXHQgICAgICAgICAgICAgICAgY2FzZSAyOlxuXHQgICAgICAgICAgICAgICAgY2FzZSA0OlxuXHQgICAgICAgICAgICAgICAgY2FzZSA1OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9GDXSBkZGRkIFvRg10gTFQnO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBsYXN0RGF5ICA6ICdb0ZjRg9GH0LUg0YNdIExUJyxcblx0ICAgICAgICBsYXN0V2VlayA6IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgdmFyIGxhc3RXZWVrRGF5cyA9IFtcblx0ICAgICAgICAgICAgICAgICdb0L/RgNC+0YjQu9C1XSBb0L3QtdC00LXRmdC1XSBb0YNdIExUJyxcblx0ICAgICAgICAgICAgICAgICdb0L/RgNC+0YjQu9C+0LNdIFvQv9C+0L3QtdC00LXRmdC60LBdIFvRg10gTFQnLFxuXHQgICAgICAgICAgICAgICAgJ1vQv9GA0L7RiNC70L7Qs10gW9GD0YLQvtGA0LrQsF0gW9GDXSBMVCcsXG5cdCAgICAgICAgICAgICAgICAnW9C/0YDQvtGI0LvQtV0gW9GB0YDQtdC00LVdIFvRg10gTFQnLFxuXHQgICAgICAgICAgICAgICAgJ1vQv9GA0L7RiNC70L7Qs10gW9GH0LXRgtCy0YDRgtC60LBdIFvRg10gTFQnLFxuXHQgICAgICAgICAgICAgICAgJ1vQv9GA0L7RiNC70L7Qs10gW9C/0LXRgtC60LBdIFvRg10gTFQnLFxuXHQgICAgICAgICAgICAgICAgJ1vQv9GA0L7RiNC70LVdIFvRgdGD0LHQvtGC0LVdIFvRg10gTFQnX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ICAgICAgcmV0dXJuICdbdV0gW25lZGVsanVdIFt1XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDM6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gW3NyZWR1XSBbdV0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSA2OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIFtzdWJvdHVdIFt1XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDE6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDI6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDQ6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDU6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gZGRkZCBbdV0gTFQnO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBsYXN0RGF5ICA6ICdbanXEjWUgdV0gTFQnLFxuXHQgICAgICAgIGxhc3RXZWVrIDogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICB2YXIgbGFzdFdlZWtEYXlzID0gW1xuXHQgICAgICAgICAgICAgICAgJ1twcm/FoWxlXSBbbmVkZWxqZV0gW3VdIExUJyxcblx0ICAgICAgICAgICAgICAgICdbcHJvxaFsb2ddIFtwb25lZGVsamthXSBbdV0gTFQnLFxuXHQgICAgICAgICAgICAgICAgJ1twcm/FoWxvZ10gW3V0b3JrYV0gW3VdIExUJyxcblx0ICAgICAgICAgICAgICAgICdbcHJvxaFsZV0gW3NyZWRlXSBbdV0gTFQnLFxuXHQgICAgICAgICAgICAgICAgJ1twcm/FoWxvZ10gW8SNZXR2cnRrYV0gW3VdIExUJyxcblx0ICAgICAgICAgICAgICAgICdbcHJvxaFsb2ddIFtwZXRrYV0gW3VdIExUJyxcblx0ICAgICAgICAgICAgICAgICdbcHJvxaFsZV0gW3N1Ym90ZV0gW3VdIExUJ1xuXHQgICAgICAgICAgICBdO1xuXHQg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AgICAgICBwYXN0IDogJ3dlbnRla2EgbmdhICVzJyxcblx0ICAgICAgICBzIDogJ2VtaXp1endhbmEgbG9tY2FuZScsXG5cdCAgICAgICAgbSA6ICd1bXp1enUnLFxuXHQgICAgICAgIG1tIDogJyVkIGVtaXp1enUnLFxuXHQgICAgICAgIGggOiAnbGlob3JhJyxcblx0ICAgICAgICBoaCA6ICclZCBlbWFob3JhJyxcblx0ICAgICAgICBkIDogJ2xpbGFuZ2EnLFxuXHQgICAgICAgIGRkIDogJyVkIGVtYWxhbmdhJyxcblx0ICAgICAgICBNIDogJ2lueWFuZ2EnLFxuXHQgICAgICAgIE1NIDogJyVkIHRpbnlhbmdhJyxcblx0ICAgICAgICB5IDogJ3Vtbnlha2EnLFxuXHQgICAgICAgIHl5IDogJyVkIGltaW55YWthJ1xuXHQgICAgfSxcblx0ICAgIG1lcmlkaWVtUGFyc2U6IC9la3VzZW5pfGVtaW5pfGVudHNhbWJhbWF8ZWJ1c3VrdS8sXG5cdCAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VycywgbWludXRlcywgaXNMb3dlcikge1xuXHQgICAgICAgIGlmIChob3VycyA8IDExKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAnZWt1c2VuaSc7XG5cdCAgICAgICAgfSBlbHNlIGlmIChob3VycyA8IDE1KSB7XG5cdCAgICAgICAgICAgIHJldHVybiAnZW1pbmknO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91cnMgPCAxOSkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ2VudHNhbWJhbWEnO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIHJldHVybiAnZWJ1c3VrdSc7XG5cdCAgICAgICAgfVxuXHQgICAgfSxcblx0ICAgIG1lcmlkaWVtSG91ciA6IGZ1bmN0aW9uIChob3VyLCBtZXJpZGllbSkge1xuXHQgICAgICAgIGlmIChob3VyID09PSAxMikge1xuXHQgICAgICAgICAgICBob3VyID0gMDtcblx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grqrgrrDgr41f4K6f4K6/4K6a4K6u4K+N4K6q4K6w4K+NJy5zcGxpdCgnXycpLFxuXHQgICAgd2Vla2RheXMgOiAn4K6e4K6+4K6v4K6/4K6x4K+N4K6x4K+B4K6V4K+N4K6V4K6/4K604K6u4K+IX+CupOCuv+CumeCvjeCuleCun+CvjeCuleCuv+CutOCuruCviF/grprgr4bgrrXgr43grrXgrr7grq/gr43grpXgrr/grrTgrq7gr4hf4K6q4K+B4K6k4K6p4K+N4K6V4K6/4K604K6u4K+IX+CuteCuv+Cur+CuvuCutOCuleCvjeCuleCuv+CutOCuruCviF/grrXgr4bgrrPgr43grrPgrr/grpXgr43grpXgrr/grrTgrq7gr4hf4K6a4K6p4K6/4K6V4K+N4K6V4K6/4K604K6u4K+IJy5zcGxpdCgnXycpLFxuXHQgICAgd2Vla2RheXNTaG9ydCA6ICfgrp7grr7grq/grr/grrHgr4Ff4K6k4K6/4K6Z4K+N4K6V4K6z4K+NX+CumuCvhuCuteCvjeCuteCuvuCur+CvjV/grqrgr4HgrqTgrqngr41f4K614K6/4K6v4K6+4K604K6p4K+NX+CuteCvhuCus+CvjeCus+Cuv1/grprgrqngrr8nLnNwbGl0KCdfJyksXG5cdCAgICB3ZWVrZGF5c01pbiA6ICfgrp7grr5f4K6k4K6/X+CumuCvhl/grqrgr4Ff4K614K6/X+CuteCvhl/grponLnNwbGl0KCdfJyksXG5cdCAgICBsb25nRGF0ZUZvcm1hdCA6IHtcblx0ICAgICAgICBMVCA6ICdISDptbScsXG5cdCAgICAgICAgTFRTIDogJ0hIOm1tOnNzJyxcblx0ICAgICAgICBMIDogJ0REL01NL1lZWVknLFxuXHQgICAgICAgIExMIDogJ0QgTU1NTSBZWVlZJyxcblx0ICAgICAgICBMTEwgOiAnRCBNTU1NIFlZWVksIEhIOm1tJyxcblx0ICAgICAgICBMTExMIDogJ2RkZGQsIEQgTU1NTSBZWVlZLCBISDptbSdcblx0ICAgIH0sXG5cdCAgICBjYWxlbmRhciA6IHt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cmV0dXJuICcg4K6v4K6+4K6u4K6u4K+NJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCA2KSB7XG5cdCAgICAgICAgICAgIHJldHVybiAnIOCuteCviOCuleCuseCviCc7ICAvLyDgrrXgr4jgrpXgrrHgr4hcblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJyDgrpXgrr7grrLgr4gnOyAvLyDgrpXgrr7grrLgr4hcblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxNCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJyDgrqjgrqPgr43grqrgrpXgrrLgr40nOyAvLyDgrqjgrqPgr43grqrgrpXgrrLgr41cblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxOCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJyDgro7grrHgr43grqrgrr7grp/gr4EnOyAvLyDgro7grrHgr43grqrgrr7grp/gr4Fcblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAyMikge1xuXHQgICAgICAgICAgICByZXR1cm4gJyDgrq7grr7grrLgr4gnOyAvLyDgrq7grr7grrLgr4hcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4gJyDgrq/grr7grq7grq7gr40nO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbUhvdXIgOiBmdW5jdGlvbiAoaG91ciwgbWVyaWRpZW0pIHtcblx0ICAgICAgICBpZiAoaG91ciA9PT0gMTIpIHtcblx0ICAgICAgICAgICAgaG91ciA9IDA7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGlmIChtZXJpZGllbSA9PT0gJ+Cur+CuvuCuruCuruCvjScpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGhvdXIgPCAyID8gaG91ciA6IGhvdXIgKyAxMjtcblx0ICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSA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suC4nuC4seC4meC4mOC5jF/guKHguLXguJnguLLguITguKFf4LmA4Lih4Lip4Liy4Lii4LiZX+C4nuC4pOC4qeC4oOC4suC4hOC4oV/guKHguLTguJbguLjguJnguLLguKLguJlf4LiB4Lij4LiB4LiO4Liy4LiE4LihX+C4quC4tOC4h+C4q+C4suC4hOC4oV/guIHguLHguJnguKLguLLguKLguJlf4LiV4Li44Lil4Liy4LiE4LihX+C4nuC4pOC4qOC4iOC4tOC4geC4suC4ouC4mV/guJjguLHguJnguKfguLLguITguKEnLnNwbGl0KCdfJyksXG5cdCAgICBtb250aHNTaG9ydCA6ICfguKEu4LiELl/guIEu4LieLl/guKHguLUu4LiELl/guYDguKEu4LiiLl/guJ4u4LiELl/guKHguLQu4LiiLl/guIEu4LiELl/guKou4LiELl/guIEu4LiiLl/guJUu4LiELl/guJ4u4LiiLl/guJgu4LiELicuc3BsaXQoJ18nKSxcblx0ICAgIG1vbnRoc1BhcnNlRXhhY3Q6IHRydWUsXG5cdCAgICB3ZWVrZGF5cyA6ICfguK3guLLguJfguLTguJXguKLguYxf4LiI4Lix4LiZ4LiX4Lij4LmMX+C4reC4seC4h+C4hOC4suC4o1/guJ7guLjguJhf4Lie4Lik4Lir4Lix4Liq4Lia4LiU4Li1X+C4qOC4uOC4geC4o+C5jF/guYDguKrguLLguKPguYwnLnNwbGl0KCdfJyksXG5cdCAgICB3ZWVrZGF5c1Nob3J0IDogJ+C4reC4suC4l+C4tOC4leC4ouC5jF/guIjguLHguJnguJfguKPguYxf4Lit4Lix4LiH4LiE4Liy4LijX+C4nuC4uOC4mF/guJ7guKTguKvguLHguKpf4Lio4Li44LiB4Lij4LmMX+C5gOC4quC4suC4o+C5jCcuc3BsaXQoJ18nKSwgLy8geWVzLCB0aHJlZSBjaGFyYWN0ZXJzIGRpZmZlcmVuY2Vcblx0ICAgIHdlZWtkYXlzTWluIDogJ+C4reC4si5f4LiILl/guK0uX+C4ni5f4Lie4LikLl/guKguX+C4qi4nLnNwbGl0KCdfJyksXG5cdCAgICB3ZWVrZGF5c1BhcnNlRXhhY3QgOiB0cnVlLFxuXHQgICAgbG9uZ0RhdGVGb3JtYXQgOiB7XG5cdCAgICAgICAgTFQgOiAnSDptbScsXG5cdCAgICAgICAgTFRTIDogJ0g6bW06c3MnLFxuXHQgICAgICAgIEwgOiAnREQvTU0vWVlZWScsXG5cdCAgICAgICAgTEwgOiAnRCBNTU1NIFlZWVknLFxuXHQgICAgICAgIExMTCA6ICdEIE1NTU0gWVlZWSDguYDguKfguKXguLIgSDptbScsXG5cdCAgICAgICAgTExMTCA6ICfguKfguLHguJlkZGRk4LiX4Li14LmIIEQgTU1NTSBZWVlZIOC5gOC4p+C4peC4siBIOm1tJ1xuXHQgICAgfSxcblx0ICAgIG1lcmlkaWVtUGFyc2U6IC/guIHguYjguK3guJnguYDguJfguLXguYjguKLguId84Lir4Lil4Lix4LiH4LmA4LiX4Li14LmI4Lii4LiHLyxcblx0ICAgIGlzUE06IGZ1bmN0aW9uIChpbnB1dCkge1xuXHQgICAgICAgIHJldHVybiBpbnB1dCA9PT0gJ+C4q+C4peC4seC4h+C5gOC4l+C4teC5iOC4ouC4hyc7XG5cdCAgICB9LFxuXHQgICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG5cdCAgICAgICAgaWYgKGhvdXIgPCAxMikge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+C4geC5iOC4reC4meC5gOC4l+C4teC5iOC4ouC4hyc7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfguKvguKXguLHguIfguYDguJfguLXguYjguKLguIcnO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBjYWxlbmRhciA6IHtcblx0ICAgICAgICBzYW1lRGF5IDogJ1vguKfguLHguJnguJnguLXguYkg4LmA4Lin4Lil4LiyXSBMVCcsXG5cdCAgICAgICAgbmV4dERheSA6ICdb4Lie4Lij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TEpID9cblx0ICAgIHRpbWUuc2xpY2UoMCwgLTMpICsgJ3dlbicgOlxuXHQgICAgKG91dHB1dC5pbmRleE9mKCdESVMnKSAhPT0gLTEpID9cblx0ICAgIHRpbWUuc2xpY2UoMCwgLTMpICsgJ2JlbicgOlxuXHQgICAgdGltZSArICcgcmV0Jztcblx0ICAgIHJldHVybiB0aW1lO1xuXHR9XG5cdFxuXHRmdW5jdGlvbiB0cmFuc2xhdGUobnVtYmVyLCB3aXRob3V0U3VmZml4LCBzdHJpbmcsIGlzRnV0dXJlKSB7XG5cdCAgICB2YXIgbnVtYmVyTm91biA9IG51bWJlckFzTm91bihudW1iZXIpO1xuXHQgICAgc3dpdGNoIChzdHJpbmcpIHtcblx0ICAgICAgICBjYXNlICdtbSc6XG5cdCAgICAgICAgICAgIHJldHVybiBudW1iZXJOb3VuICsgJyB0dXAnO1xuXHQgICAgICAgIGNhc2UgJ2hoJzpcblx0ICAgICAgICAgICAgcmV0dXJuIG51bWJlck5vdW4gKyAnIHJlcCc7XG5cdCAgICAgICAgY2FzZSAnZGQnOlxuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyTm91biArICcgamFqJztcblx0ICAgICAgICBjYXNlICdNTSc6XG5cdCAgICAgICAgICAgIHJldHVybiBudW1iZXJOb3VuICsgJyBqYXInO1xuXHQgICAgICAgIGNhc2UgJ3l5Jzpcblx0ICAgICAgICAgICAgcmV0dXJuIG51bWJlck5vdW4gKyAnIERJUyc7XG5cdCAgICB9XG5cdH1cblx0XG5cdGZ1bmN0aW9uIG51bWJlckFzTm91bihudW1iZXIpIHtcblx0ICAgIHZhciBodW5kcmVkID0gTWF0aC5mbG9vcigobnVtYmVyICUgMTAwMCkgLyAxMDApLFxuXHQgICAgdGVuID0gTWF0aC5mbG9vcigobnVtYmVyICUgMTAwKSAvIDEwKSxcblx0ICAgIG9uZSA9IG51bWJlciAlIDEwLFxuXHQgICAgd29yZCA9ICcnO1xuXHQgICAgaWYgKGh1bmRyZWQgPi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1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcblx0ICAgICAgICBpZiAoaG91ciA8IDQpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfQvdC+0YfRlic7XG5cdCAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTIpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfRgNCw0L3QutGDJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxNykge1xuXHQgICAgICAgICAgICByZXR1cm4gJ9C00L3Rjyc7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfQstC10YfQvtGA0LAnO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn0tKNC5fNCz0L4pLyxcblx0ICAgIG9yZGluYWw6IGZ1bmN0aW9uIChudW1iZXIsIHBlcmlvZCkge1xuXHQgICAgICAgIHN3aXRjaCAocGVyaW9kKSB7XG5cdCAgICAgICAgICAgIGNhc2UgJ00nOlxuXHQgICAgICAgICAgICBjYXNlICdkJzpcblx0ICAgICAgICAgICAgY2FzZSAnREREJzpcblx0ICAgICAgICAgICAgY2FzZSAndyc6XG5cdCAgICAgICAgICAgIGNhc2UgJ1cnOlxuXHQgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0LknO1xuXHQgICAgICAgICAgICBjYXNlICdEJzpcblx0ICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnLdCz0L4nO1xuXHQgICAgICAgICAgICBkZWZhdWx0OlxuXHQgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlcjtcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgd2VlayA6IHtcblx0ICAgICAgICBkb3cgOiAxLCAvLyBNb25kYXkgaXMgdGhlIGZpcnN0IGRheSBvZiB0aGUgd2Vlay5cblx0ICAgICAgICBkb3kgOiA3ICAvLyBUaG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sXG5cdCAgICAgICAgbGwgOiAnWVlZWeW5tE1NTUTml6UnLFxuXHQgICAgICAgIGxsbCA6ICdZWVlZ5bm0TU1NROaXpSBISDptbScsXG5cdCAgICAgICAgbGxsbCA6ICdZWVlZ5bm0TU1NROaXpWRkZGQgSEg6bW0nXG5cdCAgICB9LFxuXHQgICAgbWVyaWRpZW1QYXJzZTogL+WHjOaZqHzml6nkuIp85LiK5Y2IfOS4reWNiHzkuIvljYh85pma5LiKLyxcblx0ICAgIG1lcmlkaWVtSG91cjogZnVuY3Rpb24gKGhvdXIsIG1lcmlkaWVtKSB7XG5cdCAgICAgICAgaWYgKGhvdXIgPT09IDEyKSB7XG5cdCAgICAgICAgICAgIGhvdXIgPSAwO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAobWVyaWRpZW0gPT09ICflh4zmmagnIHx8IG1lcmlkaWVtID09PSAn5pep5LiKJyB8fFxuXHQgICAgICAgICAgICAgICAgbWVyaWRpZW0gPT09ICfkuIrljYgnKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBob3VyO1xuXHQgICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfkuIvljYgnIHx8IG1lcmlkaWVtID09PSAn5pma5LiKJykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIC8vICfkuK3ljYgnXG5cdCAgICAgICAgICAgIHJldHVybiBob3VyID49IDExID8gaG91ciA6IGhvdXIgKyAxMjtcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG5cdCAgICAgICAgdmFyIGhtID0gaG91ciAqIDEwMCArIG1pbnV0ZTtcblx0ICAgICAgICBpZiAoaG0gPCA2MDApIHtcblx0ICAgICAgICAgICAgcmV0dXJuICflh4zmmagnO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG0gPCA5MDApIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfml6nkuIonO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG0gPCAxMTMwKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn5LiK5Y2IJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhtIDwgMTIzMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+S4reWNiCc7XG5cdCAgICAgICAgfSBlbHNlIGlmIChobSA8IDE4MDApIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfkuIvljYgnO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn5pma5LiKJztcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgY2FsZW5kYXIgOiB7XG5cdCAgICAgICAgc2FtZURheSA6ICdb5LuK5aSpXUxUJyxcblx0ICAgICAgICBuZXh0RGF5IDogJ1vmmI7lpKldTFQnLFxuXHQgICAgICAgIG5leHRXZWVrIDogJ1vkuItdZGRkZExUJyxcblx0ICAgICAgICBsYXN0RGF5IDogJ1vmmKjlpKldTFQnLFxuXHQgICAgICAgIGxhc3RXZWVrIDogJ1vkuIpdZGRkZExUJyxcblx0ICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuXHQgICAgfSxcblx0ICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2U6IC9cXGR7MSwyfSjml6V85pyIfOWRqCkvLFxuXHQgICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIsIHBlcmlvZCkge1xuXHQgICAgICAgIHN3aXRjaCAocGVyaW9kKSB7XG5cdCAgICAgICAgICAgIGNhc2UgJ2QnOlxuXHQgICAgICAgICAgICBjYXNlICdEJzpcblx0ICAgICAgICAgICAgY2FzZSAnREREJzpcblx0ICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAn5pelJztcblx0ICAgICAgICAgICAgY2FzZSAnTSc6XG5cdCAgICAgICAgICAgICAgICByZX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VyaWRpZW1Ib3VyIDogZnVuY3Rpb24gKGhvdXIsIG1lcmlkaWVtKSB7XG5cdCAgICAgICAgaWYgKGhvdXIgPT09IDEyKSB7XG5cdCAgICAgICAgICAgIGhvdXIgPSAwO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAobWVyaWRpZW0gPT09ICflh4zmmagnIHx8IG1lcmlkaWVtID09PSAn5pep5LiKJyB8fCBtZXJpZGllbSA9PT0gJ+S4iuWNiCcpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGhvdXI7XG5cdCAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+S4reWNiCcpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGhvdXIgPj0gMTEgPyBob3VyIDogaG91ciArIDEyO1xuXHQgICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfkuIvljYgnIHx8IG1lcmlkaWVtID09PSAn5pma5LiKJykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcblx0ICAgICAgICB2YXIgaG0gPSBob3VyICogMTAwICsgbWludXRlO1xuXHQgICAgICAgIGlmIChobSA8IDYwMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+WHjOaZqCc7XG5cdCAgICAgICAgfSBlbHNlIGlmIChobSA8IDkwMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+aXqeS4iic7XG5cdCAgICAgICAgfSBlbHNlIGlmIChobSA8IDExMzApIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfkuIrljYgnO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG0gPCAxMjMwKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn5Lit5Y2IJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhtIDwgMTgwMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+S4i+WNiCc7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfmmZrkuIonO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBjYWxlbmRhciA6IHtcblx0ICAgICAgICBzYW1lRGF5IDogJ1vku4rlpKldTFQnLFxuXHQgICAgICAgIG5leHREYXkgOiAnW+aYjuWkqV1MVCcsXG5cdCAgICAgICAgbmV4dFdlZWsgOiAnW+S4i11kZGRkTFQnLFxuXHQgICAgICAgIGxhc3REYXkgOiAnW+aYqOWkqV1MVCcsXG5cdCAgICAgICAgbGFzdFdlZWsgOiAnW+S4il1kZGRkTFQnLFxuXHQgICAgICAgIHNhbWVFbHNlIDogJ0wnXG5cdCAgICB9LFxuXHQgICAgZGF5T2ZNb250aE9yZGluYWxQYXJzZTogL1xcZHsxLDJ9KOaXpXzmnIh86YCxKS8sXG5cdCAgICBvcmRpbmFsIDogZnVuY3Rpb24gKG51bWJlciwgcGVyaW9kKSB7XG5cdCAgICAgICAgc3dpdGNoIChwZXJpb2QpIHtcblx0ICAgICAgICAgICAgY2FzZSAnZCcgOlxuXHQgICAgICAgICAgICBjYXNlICdEJyA6XG5cdCAgICAgICAgICAgIGNhc2UgJ0RERCcgOlxuXHQgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICfml6UnO1xuXHQgICAgICAgICAgICBjYXNlICdNJyA6XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJ+aciCc7XG5cdCAgICAgICAgICAgIGNhc2UgJ3cnIDpcblx0ICAgICAgICAgICAgY2FzZSAnVycgOlxuXHQgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICfpgLEnO1xuXHQgICAgICAgICAgICBkZWZhdWx0IDpcblx0ICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXI7XG5cdCAgICAgICAgfVxuXHQgICAgfSxcblx0ICAgIHJlbGF0aXZlVGltZSA6IHt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HQgICAgICAgICAgICByZXR1cm4gJ+WHjOaZqCc7XG5cdCAgICAgICAgfSBlbHNlIGlmIChobSA8IDkwMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+aXqeS4iic7XG5cdCAgICAgICAgfSBlbHNlIGlmIChobSA8IDExMzApIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfkuIrljYgnO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG0gPCAxMjMwKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn5Lit5Y2IJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhtIDwgMTgwMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+S4i+WNiCc7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfmmZrkuIonO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBjYWxlbmRhciA6IHtcblx0ICAgICAgICBzYW1lRGF5IDogJ1vku4rlpKldTFQnLFxuXHQgICAgICAgIG5leHREYXkgOiAnW+aYjuWkqV1MVCcsXG5cdCAgICAgICAgbmV4dFdlZWsgOiAnW+S4i11kZGRkTFQnLFxuXHQgICAgICAgIGxhc3REYXkgOiAnW+aYqOWkqV1MVCcsXG5cdCAgICAgICAgbGFzdFdlZWsgOiAnW+S4il1kZGRkTFQnLFxuXHQgICAgICAgIHNhbWVFbHNlIDogJ0wnXG5cdCAgICB9LFxuXHQgICAgZGF5T2ZNb250aE9yZGluYWxQYXJzZTogL1xcZHsxLDJ9KOaXpXzmnIh86YCxKS8sXG5cdCAgICBvcmRpbmFsIDogZnVuY3Rpb24gKG51bWJlciwgcGVyaW9kKSB7XG5cdCAgICAgICAgc3dpdGNoIChwZXJpb2QpIHtcblx0ICAgICAgICAgICAgY2FzZSAnZCcgOlxuXHQgICAgICAgICAgICBjYXNlICdEJyA6XG5cdCAgICAgICAgICAgIGNhc2UgJ0RERCcgOlxuXHQgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICfml6UnO1xuXHQgICAgICAgICAgICBjYXNlICdNJyA6XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJ+aciCc7XG5cdCAgICAgICAgICAgIGNhc2UgJ3cnIDpcblx0ICAgICAgICAgICAgY2FzZSAnVycgOlxuXHQgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICfpgLEnO1xuXHQgICAgICAgICAgICBkZWZhdWx0IDpcblx0ICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXI7XG5cdCAgICAgICAgfVxuXHQgICAgfSxcblx0ICAgIHJlbGF0aXZlVGltZSA6IHtcblx0ICAgICAgICBmdXR1cmUgOiAnJXPlhacnLFxuXHQgICAgICAgIHBhc3QgOiAnJXPliY0nLFxuXHQgICAgICAgIHMgOiAn5bm+56eSJyxcblx0ICAgICAgICBtIDogJzEg5YiG6ZCYJyxcblx0ICAgICAgICBtbSA6ICclZCDliIbpkJgnLFxuXHQgICAgICAgIGggOiAnMSDlsI/mmYInLFxuXHQgICAgICAgIGhoIDogJyVkIOWwj+aZgicsXG5cdCAgICAgICAgZCA6ICcxIOWkqScsXG5cdCAgICAgICAgZGQgOiAnJWQg5aSpJyxcblx0ICAgICAgICBNIDogJzEg5YCL5pyIJyxcblx0ICAgICAgICBNTSA6ICclZCDlgIvmnIgnLFxuXHQgICAgICAgIHkgOiAnMSDlubQnLFxuXHQgICAgICAgIHl5IDogJyVkIOW5tCdcblx0ICAgIH1cblx0fSk7XG5cdFxuXHRyZXR1cm4gemhUdztcblx0XG5cdH0pKSk7XG5cblxuLyoqKi8gfSksXG4vKiAxMjQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMpIHtcblxuXHRtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uKG1vZHVsZSkge1xyXG5cdFx0aWYoIW1vZHVsZS53ZWJwYWNrUG9seWZpbGwpIHtcclxuXHRcdFx0bW9kdWxlLmRlcHJlY2F0ZSA9IGZ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Xhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuXG5cdCd1c2Ugc3RyaWN0Jztcblx0XG5cdHZhciB1dGlscyA9IF9fd2VicGFja19yZXF1aXJlX18oMik7XG5cdFxuXHRtb2R1bGUuZXhwb3J0cyA9IChcblx0ICB1dGlscy5pc1N0YW5kYXJkQnJvd3NlckVudigpID9cblx0XG5cdCAgLy8gU3RhbmRhcmQgYnJvd3NlciBlbnZzIHN1cHBvcnQgZG9jdW1lbnQuY29va2llXG5cdCAgKGZ1bmN0aW9uIHN0YW5kYXJkQnJvd3NlckVudigpIHtcblx0ICAgIHJldHVybiB7XG5cdCAgICAgIHdyaXRlOiBmdW5jdGlvbiB3cml0ZShuYW1lLCB2YWx1ZSwgZXhwaXJlcywgcGF0aCwgZG9tYWluLCBzZWN1cmUpIHtcblx0ICAgICAgICB2YXIgY29va2llID0gW107XG5cdCAgICAgICAgY29va2llLnB1c2gobmFtZSArICc9JyArIGVuY29kZVVSSUNvbXBvbmVudCh2YWx1ZSkpO1xuXHRcblx0ICAgICAgICBpZiAodXRpbHMuaXNOdW1iZXIoZXhwaXJlcykpIHtcblx0ICAgICAgICAgIGNvb2tpZS5wdXNoKCdleHBpcmVzPScgKyBuZXcgRGF0ZShleHBpcmVzKS50b0dNVFN0cmluZygpKTtcblx0ICAgICAgICB9XG5cdFxuXHQgICAgICAgIGlmICh1dGlscy5pc1N0cmluZyhwYXRoKSkge1xuXHQgICAgICAgICAgY29va2llLnB1c2goJ3BhdGg9JyArIHBhdGgpO1xuXHQgICAgICAgIH1cblx0XG5cdCAgICAgICAgaWYgKHV0aWxzLmlzU3RyaW5nKGRvbWFpbikpIHtcblx0ICAgICAgICAgIGNvb2tpZS5wdXNoKCdkb21haW49JyArIGRvbWFpbik7XG5cdCAgICAgICAgfVxuXHRcblx0ICAgICAgICBpZiAoc2VjdXJlID09PSB0cnVlKSB7XG5cdCAgICAgICAgICBjb29raWUucHVzaCgnc2VjdXJlJyk7XG5cdCAg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4nICsgb3B0cy5tb21lbnQoZFswXS54KS5mb3JtYXQoJ1lZWVktTU0tRERUSEg6bW06c3NaWicpICsgJzwvc3Bhbj4nICsgJzwvZGl2Pic7XG5cdCAgICAgICAgfVxuXHQgICAgICB9LFxuXHQgICAgICBzdWJjaGFydDogeyBzaG93OiB0cnVlIH0sXG5cdCAgICAgIGF4aXM6IHtcblx0ICAgICAgICB4OiB7XG5cdCAgICAgICAgICBtaW46IHN0YXJ0LFxuXHQgICAgICAgICAgbWF4OiBlbmQsXG5cdCAgICAgICAgICB0eXBlOiAndGltZXNlcmllcycsXG5cdCAgICAgICAgICB0aWNrOiB7XG5cdCAgICAgICAgICAgIHZhbHVlczogW3N0YXJ0LCBlbmRdLFxuXHQgICAgICAgICAgICBmb3JtYXQ6ICclWS0lbS0lZCAlSDolTTolUyVaJ1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgeToge1xuXHQgICAgICAgICAgdGljazoge1xuXHQgICAgICAgICAgICB2YWx1ZXM6IGZ1bmN0aW9uIHZhbHVlcyh2KSB7XG5cdCAgICAgICAgICAgICAgdmFyIHZhbHVlcyA9IFswLCA1XTtcblx0ICAgICAgICAgICAgICB2YXIgbWF4ID0gdlsxXTtcblx0ICAgICAgICAgICAgICB2YXIgaSA9IDEwO1xuXHQgICAgICAgICAgICAgIHdoaWxlIChpIDwgbWF4KSB7XG5cdCAgICAgICAgICAgICAgICB2YWx1ZXMucHVzaChpKTtcblx0ICAgICAgICAgICAgICAgIGkgPSBpICogMTA7XG5cdCAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgIHJldHVybiB2YWx1ZXM7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgIH1cblx0ICAgIH0pO1xuXHQgIH0pO1xuXHRcblx0ICBzZWxmLnJlbG9hZCA9IGZ1bmN0aW9uIChlKSB7XG5cdCAgICB2YXIgc3RhcnQgPSBfdGhp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FtrZXldID0gZm5ba2V5XS5iaW5kKGFyZ1RoaXMpO1xuXHQgICAgICAgICAgICAgICAgaWYgKE9iamVjdC5rZXlzKGZuW2tleV0pLmxlbmd0aCA+IDApIHtcblx0ICAgICAgICAgICAgICAgICAgICBiaW5kVGhpcyhmbltrZXldLCB0YXJnZXRba2V5XSwgYXJnVGhpcyk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH0pO1xuXHQgICAgICAgIH0pKGMzX2NoYXJ0X2ZuLCB0aGlzLCB0aGlzKTtcblx0ICAgIH1cblx0XG5cdCAgICBmdW5jdGlvbiBDaGFydEludGVybmFsKGFwaSkge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXM7XG5cdCAgICAgICAgJCQuZDMgPSB3aW5kb3cuZDMgPyB3aW5kb3cuZDMgOiAgdHJ1ZSA/IF9fd2VicGFja19yZXF1aXJlX18oOCkgOiB1bmRlZmluZWQ7XG5cdCAgICAgICAgJCQuYXBpID0gYXBpO1xuXHQgICAgICAgICQkLmNvbmZpZyA9ICQkLmdldERlZmF1bHRDb25maWcoKTtcblx0ICAgICAgICAkJC5kYXRhID0ge307XG5cdCAgICAgICAgJCQuY2FjaGUgPSB7fTtcblx0ICAgICAgICAkJC5heGVzID0ge307XG5cdCAgICB9XG5cdFxuXHQgICAgYzMuZ2VuZXJhdGUgPSBmdW5jdGlvbiAoY29uZmlnKSB7XG5cdCAgICAgICAgcmV0dXJuIG5ldyBDaGFydChjb25maWcpO1xuXHQgICAgfTtcblx0XG5cdCAgICBjMy5jaGFydCA9IHtcblx0ICAgICAgICBmbjogQ2hhcnQucHJvdG90eXBlLFxuXHQgICAgICAgIGludGVybmFsOiB7XG5cdCAgICAgICAgICAgIGZuOiBDaGFydEludGVybmFsLnByb3RvdHlwZSxcblx0ICAgICAgICAgICAgYXhpczoge1xuXHQgICAgICAgICAgICAgICAgZm46IEF4aXMucHJvdG90eXBlXG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgIC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2h0JywgJCQuaGVpZ2h0KVxuXHQgICAgICAgICAgICAuc3R5bGUoJ29wYWNpdHknLCAwKVxuXHQgICAgICAgICAgICAub24oXCJkYmxjbGljay56b29tXCIsIG51bGwpO1xuXHRcblx0ICAgICAgICAvLyBTZXQgZGVmYXVsdCBleHRlbnQgaWYgZGVmaW5lZFxuXHQgICAgICAgIGlmIChjb25maWcuYXhpc194X2V4dGVudCkgeyAkJC5icnVzaC5leHRlbnQoJCQuZ2V0RGVmYXVsdEV4dGVudCgpKTsgfVxuXHRcblx0ICAgICAgICAvLyBBZGQgQXhpc1xuXHQgICAgICAgICQkLmF4aXMuaW5pdCgpO1xuXHRcblx0ICAgICAgICAvLyBTZXQgdGFyZ2V0c1xuXHQgICAgICAgICQkLnVwZGF0ZVRhcmdldHMoJCQuZGF0YS50YXJnZXRzKTtcblx0XG5cdCAgICAgICAgLy8gRHJhdyB3aXRoIHRhcmdldHNcblx0ICAgICAgICBpZiAoYmluZGluZykge1xuXHQgICAgICAgICAgICAkJC51cGRhdGVEaW1lbnNpb24oKTtcblx0ICAgICAgICAgICAgJCQuY29uZmlnLm9uaW5pdC5jYWxsKCQkKTtcblx0ICAgICAgICAgICAgJCQucmVkcmF3KHtcblx0ICAgICAgICAgICAgICAgIHdpdGhUcmFuc2l0aW9uOiBmYWxzZSxcblx0ICAgICAgICAgICAgICAgIHdpdGhUcmFuc2Zvcm06IHRydWUsXG5cdCAgICAgICAgICAgICAgICB3aXRoVXBkYXRlWERvbWFpbjogdHJ1ZSxcblx0ICAgICAgICAgICAgICAgIHdpdGhVcGRhdGVPcmdYRG9tYWluOiB0cnVlLFxuXHQgICAgICAgICAgICAgICAgd2l0aFRyYW5zaXRpb25Gb3JBeGlzOiBmYWxzZVxuXHQgICAgICAgICAgICB9KTtcblx0ICAgICAgICB9XG5cdFxuXHQgICAgICAgIC8vIEJpbmQgcmVzaXplIGV2ZW50XG5cdCAgICAgICAgJCQuYmluZFJlc2l6ZSgpO1xuXHRcblx0ICAgICAgICAvLyBleHBvcnQgZWxlbWVudCBvZiB0aGUgY2hhcnRcblx0ICAgICAgICAkJC5hcGkuZWxlbWVudCA9ICQkLnNlbGVjdENoYXJ0Lm5vZGUoKTtcblx0ICAgIH07XG5cdFxuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uc21vb3RoTGluZXMgPSBmdW5jdGlvbiAoZWwsIHR5cGUpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzO1xuXHQgICAgICAgIGlmICh0eXBlID09PSAnZ3JpZCcpIHtcblx0ICAgICAgICAgICAgZWwuZWFjaChmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgICAgICB2YXIgZyA9ICQkLmQzLnNlbGVjdCh0aGlzKSxcblx0ICAgICAgICAgICAgICAgICAgICB4MSA9IGcuYXR0cigneDEnKSxcblx0ICAgICAgICAgICAgICAgICAgICB4MiA9IGcuYXR0cigneDInKSxcblx0ICAgICAgICAgICAgICAgICAgICB5MSA9IGcuYXR0cigneTEnKSxcblx0ICAgICAgICAgICAgICAgICAgICB5MiA9IGcuYXR0cigneTInKTtcblx0ICAgICAgICAgICAgICAgIGcuYXR0cih7XG5cdCAgICAgICAgICAgICAgICAgICAgJ3gxJzogTWF0aC5jZWlsKHgxKSxcblx0ICAgICAgICAgICAgICAgICAgICAneDInOiBNYXRoLmNlaWwoeDIpLFxuXHQgICAgICAgICAgICAgICAgICAgICd5MSc6IE1hdGguY2VpbCh5MSksXG5cdCAgICAgICAgICAgICAgICAgICAgJ3kyJzogTWF0aC5jZWlsKHkyKVxuXHQgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgIH0pO1xuXHQgICAgICAgIH1cblx0ICAgIH07XG5cdFxuXHRcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnVwZGF0ZVNpemVzID0gZnVuY3Rpb24gKCkge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZztcblx0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sdWVzKHRhcmdldHNUb1Nob3cpO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgJCQueEF4aXMudGlja1ZhbHVlcyhbXSk7XG5cdCAgICAgICAgICAgICQkLnN1YlhBeGlzLnRpY2tWYWx1ZXMoW10pO1xuXHQgICAgICAgIH1cblx0XG5cdCAgICAgICAgaWYgKGNvbmZpZy56b29tX3Jlc2NhbGUgJiYgIW9wdGlvbnMuZmxvdykge1xuXHQgICAgICAgICAgICB4RG9tYWluRm9yWm9vbSA9ICQkLngub3JnRG9tYWluKCk7XG5cdCAgICAgICAgfVxuXHRcblx0ICAgICAgICAkJC55LmRvbWFpbigkJC5nZXRZRG9tYWluKHRhcmdldHNUb1Nob3csICd5JywgeERvbWFpbkZvclpvb20pKTtcblx0ICAgICAgICAkJC55Mi5kb21haW4oJCQuZ2V0WURvbWFpbih0YXJnZXRzVG9TaG93LCAneTInLCB4RG9tYWluRm9yWm9vbSkpO1xuXHRcblx0ICAgICAgICBpZiAoIWNvbmZpZy5heGlzX3lfdGlja192YWx1ZXMgJiYgY29uZmlnLmF4aXNfeV90aWNrX2NvdW50KSB7XG5cdCAgICAgICAgICAgICQkLnlBeGlzLnRpY2tWYWx1ZXMoJCQuYXhpcy5nZW5lcmF0ZVRpY2tWYWx1ZXMoJCQueS5kb21haW4oKSwgY29uZmlnLmF4aXNfeV90aWNrX2NvdW50KSk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGlmICghY29uZmlnLmF4aXNfeTJfdGlja192YWx1ZXMgJiYgY29uZmlnLmF4aXNfeTJfdGlja19jb3VudCkge1xuXHQgICAgICAgICAgICAkJC55MkF4aXMudGlja1ZhbHVlcygkJC5heGlzLmdlbmVyYXRlVGlja1ZhbHVlcygkJC55Mi5kb21haW4oKSwgY29uZmlnLmF4aXNfeTJfdGlja19jb3VudCkpO1xuXHQgICAgICAgIH1cblx0XG5cdCAgICAgICAgLy8gYXhlc1xuXHQgICAgICAgICQkLmF4aXMucmVkcmF3KHRyYW5zaXRpb25zLCBoaWRlQXhpcyk7XG5cdFxuXHQgICAgICAgIC8vIFVwZGF0ZSBheGlzIGxhYmVsXG5cdCAgICAgICAgJCQuYXhpcy51cGRhdGVMYWJlbHMod2l0aFRyYW5zaXRpb24pO1xuXHRcblx0ICAgICAgICAvLyBzaG93L2hpZGUgaWYgbWFudWFsIGN1bGxpbmcgbmVlZGVkXG5cdCAgICAgICAgaWYgKCh3aXRoVXBkYXRlWERvbWFpbiB8fCB3aXRoVXBkYXRlWEF4aXMpICYmIHRhcmdldHNUb1Nob3cubGVuZ3RoKSB7XG5cdCAgICAgICAgICAgIGlmIChjb25maWcuYXhpc194X3RpY2tfY3VsbGluZyAmJiB0aWNrVmFsdWVzKSB7XG5cdCAgICAgICAgICAgICAgICBmb3IgKGkgPSAxOyBpIDwgdGlja1ZhbHVlcy5sZW5ndGg7IGkrKykge1xuXHQgICAgICAgICAgICAgICAgICAgIGlmICh0aWNrVmFsdWVzLmxlbmd0aCAvIGkgPCBjb25maWcuYXhpc194X3RpY2tfY3VsbGluZ19tYXgpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJ2YWxGb3JDdWxsaW5nID0gaTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgJCQuc3ZnLnNlbGVjdEFsbCgnLicgKyBDTEFTUy5heGlzWCArICcgLnRpY2sgdGV4dCcpLmVhY2goZnVuY3Rpb24gKGUpIHtcblx0ICAgICAgICAgICAgICAgICAgICB2YXIgaW5kZXggPSB0aWNrVmFsdWVzLmluZGV4T2YoZSk7XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKGluZGV4ID49IDApIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgZDMuc2VsZWN0KHRoaXMpLnN0eWxlKCdkaXNwbGF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mUsXG5cdCAgICAgICAgICAgICAgICBkcmF3QXJlYTogZHJhd0FyZWEsXG5cdCAgICAgICAgICAgICAgICBjeDogY3gsXG5cdCAgICAgICAgICAgICAgICBjeTogY3ksXG5cdCAgICAgICAgICAgICAgICB4djogeHYsXG5cdCAgICAgICAgICAgICAgICB4Rm9yVGV4dDogeEZvclRleHQsXG5cdCAgICAgICAgICAgICAgICB5Rm9yVGV4dDogeUZvclRleHRcblx0ICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgfVxuXHRcblx0ICAgICAgICBpZiAoKGR1cmF0aW9uIHx8IGZsb3cpICYmICQkLmlzVGFiVmlzaWJsZSgpKSB7IC8vIE9ubHkgdXNlIHRyYW5zaXRpb24gaWYgdGFiIHZpc2libGUuIFNlZSAjOTM4LlxuXHQgICAgICAgICAgICAvLyB0cmFuc2l0aW9uIHNob3VsZCBiZSBkZXJpdmVkIGZyb20gb25lIHRyYW5zaXRpb25cblx0ICAgICAgICAgICAgZDMudHJhbnNpdGlvbigpLmR1cmF0aW9uKGR1cmF0aW9uKS5lYWNoKGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgICAgIHZhciB0cmFuc2l0aW9uc1RvV2FpdCA9IFtdO1xuXHRcblx0ICAgICAgICAgICAgICAgIC8vIHJlZHJhdyBhbmQgZ2F0aGVyIHRyYW5zaXRpb25zXG5cdCAgICAgICAgICAgICAgICBbXG5cdCAgICAgICAgICAgICAgICAgICAgJCQucmVkcmF3QmFyKGRyYXdCYXIsIHRydWUpLFxuXHQgICAgICAgICAgICAgICAgICAgICQkLnJlZHJhd0xpbmUoZHJhd0xpbmUsIHRydWUpLFxuXHQgICAgICAgICAgICAgICAgICAgICQkLnJlZHJhd0FyZWEoZHJhd0FyZWEsIHRydWUpLFxuXHQgICAgICAgICAgICAgICAgICAgICQkLnJlZHJhd0NpcmNsZShjeCwgY3ksIHRydWUpLFxuXHQgICAgICAgICAgICAgICAgICAgICQkLnJlZHJhd1RleHQoeEZvclRleHQsIHlGb3JUZXh0LCBvcHRpb25zLmZsb3csIHRydWUpLFxuXHQgICAgICAgICAgICAgICAgICAgICQkLnJlZHJhd1JlZ2lvbih0cnVlKSxcblx0ICAgICAgICAgICAgICAgICAgICAkJC5yZWRyYXdHcmlkKHRydWUpLFxuXHQgICAgICAgICAgICAgICAgXS5mb3JFYWNoKGZ1bmN0aW9uICh0cmFuc2l0aW9ucykge1xuXHQgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb25zLmZvckVhY2goZnVuY3Rpb24gKHRyYW5zaXRpb24pIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbnNUb1dhaXQucHVzaCh0cmFuc2l0aW9uKTtcblx0ICAgICAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgICAgIH0pO1xuXHRcblx0ICAgICAgICAgICAgICAgIC8vIFdhaXQgZm9yIGVuZCBvZiB0cmFuc2l0aW9ucyB0byBjYWxsIGZsb3cgYW5kIG9ucmVuZGVyZWQgY2FsbGJhY2tcblx0ICAgICAgICAgICAgICAgIHdhaXRGb3JEcmF3ID0gJCQuZ2VuZXJhdGVXYWl0KCk7XG5cdCAgICAgICAgICAgICAgICB0cmFuc2l0aW9uc1RvV2FpdC5mb3JFYWNoKGZ1bmN0aW9uICh0KSB7XG5cdCAgICAgICAgICAgICAgICAgICAgd2FpdEZvckRyYXcuYWRkKHQpO1xuXHQgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgIH0pXG5cdCAgICAgICAgICAgIC5jYWxsKHdhaXRGb3JEcmF3LCBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgICAgICBpZiAoZmxvdykge1xuXHQgICAgICAgICAgICAgICAgICAgIGZsb3coKTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIGlmIChjb25maWcub25yZW5kZXJlZCkge1xuXHQgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5vbnJlbmRlcmVkLmNhbGwoJCQpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9KTtcblx0ICAgICAgICB9XG5cdCAgICAgICAgZWxzZSB7XG5cdCAgICAgICAgICAgICQkLnJlZHJhd0JhcihkcmF3QmFyKTtcblx0ICAgICAgICAgICAgJCQucmVkcmF3TGluZShkcmF3TGluZSk7XG5cdCAgICAgICAgICAgICQkLnJlZHJhd0FyZWEoZHJhd0FyZWEpO1xuXHQgICAgICAgICAgICAkJC5yZWRyYXdDaXJjbGUoY3gsIGN5KTtcblx0ICAgICAgICAgICAgJCQucmVkcmF3VGV4dCh4Rm9yVGV4dCwgeUZvclRleHQsIG9wdGlvbnMuZmxvdyk7XG5cdCAgICAgICAgICAgICQkLnJlZHJhd1JlZ2lvbigpO1xuXHQgICAgICAgICAgICAkJC5yZWRyYXdHcmlkKCk7XG5cdCAgICAgICAgICAgIGlmIChjb25maWcub25yZW5kZXJlZCkge1xuXHQgICAgICAgICAgICAgICAgY29uZmlnLm9ucmVuZGVyZWQuY2FsbCgkJCk7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdFxuXHQgICAgICAgIC8vIHVwZGF0ZSBmYWRlaW4gY29uZGl0aW9uXG5cdCAgICAgICAgJCQubWFwVG9JZHMoJCQuZGF0YS50YXJnZXRzKS5mb3JFYWNoKGZ1bmN0aW9uIChpZCkge1xuXHQgICAgICAgICAgICAkJC53aXRob3V0RmFkZUluW2lkXSA9IHRydWU7XG5cdCAgICAgICAgfSk7XG5cdCAgICB9O1xuXHRcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnVwZGF0ZUFuZFJlZHJhdyA9IGZ1bmN0aW9uIChvcHRpb25zKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLCB0cmFuc2l0aW9ucztcblx0ICAgICAgICBvcHRpb25zID0gb3B0aW9ucyB8fCB7fTtcblx0ICAgICAgICAvLyBzYW1lIHdpdG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0IGNvbXBsZXRpb25cblx0ICAgICAgICAgICAgICAgICAgICAkJC5pbnRlcnZhbEZvck9ic2VydmVJbnNlcnRlZCA9IHdpbmRvdy5zZXRJbnRlcnZhbChmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIC8vIHBhcmVudE5vZGUgd2lsbCBOT1QgYmUgbnVsbCB3aGVuIGNvbXBsZXRlZFxuXHQgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZWN0aW9uLm5vZGUoKS5wYXJlbnROb2RlKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2xlYXJJbnRlcnZhbCgkJC5pbnRlcnZhbEZvck9ic2VydmVJbnNlcnRlZCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC51cGRhdGVEaW1lbnNpb24oKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkJC5icnVzaCkgeyAkJC5icnVzaC51cGRhdGUoKTsgfVxuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQuY29uZmlnLm9uaW5pdC5jYWxsKCQkKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICQkLnJlZHJhdyh7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aFRyYW5zZm9ybTogdHJ1ZSxcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoVXBkYXRlWERvbWFpbjogdHJ1ZSxcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoVXBkYXRlT3JnWERvbWFpbjogdHJ1ZSxcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoVHJhbnNpdGlvbjogZmFsc2UsXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aFRyYW5zaXRpb25Gb3JUcmFuc2Zvcm06IGZhbHNlLFxuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhMZWdlbmQ6IHRydWVcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uLnRyYW5zaXRpb24oKS5zdHlsZSgnb3BhY2l0eScsIDEpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgfSwgMTApO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9KTtcblx0ICAgICAgICB9KTtcblx0ICAgICAgICBvYnNlcnZlci5vYnNlcnZlKHNlbGVjdGlvbi5ub2RlKCksIHthdHRyaWJ1dGVzOiB0cnVlLCBjaGlsZExpc3Q6IHRydWUsIGNoYXJhY3RlckRhdGE6IHRydWV9KTtcblx0ICAgIH07XG5cdFxuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uYmluZFJlc2l6ZSA9IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWc7XG5cdFxuXHQgICAgICAgICQkLnJlc2l6ZUZ1bmN0aW9uID0gJCQuZ2VuZXJhdGVSZXNpemUoKTtcblx0XG5cdCAgICAgICAgJCQucmVzaXplRnVuY3Rpb24uYWRkKGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgY29uZmlnLm9ucmVzaXplLmNhbGwoJCQpO1xuXHQgICAgICAgIH0pO1xuXHQgICAgICAgIGlmIChjb25maWcucmVzaXplX2F1dG8pIHtcblx0ICAgICAgICAgICAgJCQucmVzaXplRnVuY3Rpb24uYWRkKGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgICAgIGlmICgkJC5yZXNpemVUaW1lb3V0ICE9PSB1bmRlZmluZWQpIHtcblx0ICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2xlYXJUaW1lb3V0KCQkLnJlc2l6ZVRpbWVvdXQpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgJCQucmVzaXplVGltZW91dCA9IHdpbmRvdy5zZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgICAgICAgICBkZWxldGUgJCQucmVzaXplVGltZW91dDtcblx0ICAgICAgICAgICAgICAgICAgICAkJC5hcGkuZmx1c2goKTtcblx0ICAgICAgICAgICAgICAgIH0sIDEwMCk7XG5cdCAgICAgICAgICAgIH0pO1xuXHQgICAgICAgIH1cblx0ICAgICAgICAkJC5yZXNpemVGdW5jdGlvbi5hZGQoZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICBjb25maWcub25yZXNpemVkLmNhbGwoJCQpO1xuXHQgICAgICAgIH0pO1xuXHRcblx0ICAgICAgICBpZiAod2luZG93LmF0dGFjaEV2ZW50KSB7XG5cdCAgICAgICAgICAgIHdpbmRvdy5hdHRhY2hFdmVudCgnb25yZXNpemUnLCAkJC5yZXNpemVGdW5jdGlvbik7XG5cdCAgICAgICAgfSBlbHNlIGlmICh3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcikge1xuXHQgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcigncmVzaXplJywgJCQucmVzaXplRnVuY3Rpb24sIGZhbHNlKTtcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAvLyBmYWxsYmFjayB0byB0aGlzLCBpZiB0aGlzIGlzIGEgdmVyeSBvbGQgYnJvd3NlclxuXHQgICAgICAgICAgICB2YXIgd3JhcHBlciA9IHdpbmRvdy5vbnJlc2l6ZTtcblx0ICAgICAgICAgICAgaWYgKCF3cmFwcGVyKSB7XG5cdCAgICAgICAgICAgICAgICAvLyBjcmVhdGUgYSB3cmFwcGVyIHRoYXQgd2lsbCBjYWxsIGFsbCBjaGFydHNcblx0ICAgICAgICAgICAgICAgIHdyYXBwZXIgPSAkJC5nZW5lcmF0ZVJlc2l6ZSgpO1xuXHQgICAgICAgICAgIC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b24gKCkge1xuXHQgICAgICAgICAgICAgICAgICAgIHZhciBkb25lID0gMDtcblx0ICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9uc1RvV2FpdC5mb3JFYWNoKGZ1bmN0aW9uICh0KSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0LmVtcHR5KCkpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUgKz0gMTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgdC50cmFuc2l0aW9uKCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUgKz0gMTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICAgICAgICAgIGlmIChkb25lID09PSB0cmFuc2l0aW9uc1RvV2FpdC5sZW5ndGgpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjYWxsYmFjaykgeyBjYWxsYmFjaygpOyB9XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgfSwgMTApO1xuXHQgICAgICAgICAgICB9O1xuXHQgICAgICAgIGYuYWRkID0gZnVuY3Rpb24gKHRyYW5zaXRpb24pIHtcblx0ICAgICAgICAgICAgdHJhbnNpdGlvbnNUb1dhaXQucHVzaCh0cmFuc2l0aW9uKTtcblx0ICAgICAgICB9O1xuXHQgICAgICAgIHJldHVybiBmO1xuXHQgICAgfTtcblx0XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5w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AgICAgICAgICAgem9vbV9lbmFibGVkOiBmYWxzZSxcblx0ICAgICAgICAgICAgem9vbV9leHRlbnQ6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgem9vbV9wcml2aWxlZ2VkOiBmYWxzZSxcblx0ICAgICAgICAgICAgem9vbV9yZXNjYWxlOiBmYWxzZSxcblx0ICAgICAgICAgICAgem9vbV9vbnpvb206IGZ1bmN0aW9uICgpIHt9LFxuXHQgICAgICAgICAgICB6b29tX29uem9vbXN0YXJ0OiBmdW5jdGlvbiAoKSB7fSxcblx0ICAgICAgICAgICAgem9vbV9vbnpvb21lbmQ6IGZ1bmN0aW9uICgpIHt9LFxuXHQgICAgICAgICAgICB6b29tX3hfbWluOiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIHpvb21feF9tYXg6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgaW50ZXJhY3Rpb25fYnJpZ2h0ZW46IHRydWUsXG5cdCAgICAgICAgICAgIGludGVyYWN0aW9uX2VuYWJsZWQ6IHRydWUsXG5cdCAgICAgICAgICAgIG9ubW91c2VvdmVyOiBmdW5jdGlvbiAoKSB7fSxcblx0ICAgICAgICAgICAgb25tb3VzZW91dDogZnVuY3Rpb24gKCkge30sXG5cdCAgICAgICAgICAgIG9ucmVzaXplOiBmdW5jdGlvbiAoKSB7fSxcblx0ICAgICAgICAgICAgb25yZXNpemVkOiBmdW5jdGlvbiAoKSB7fSxcblx0ICAgICAgICAgICAgb25pbml0OiBmdW5jdGlvbiAoKSB7fSxcblx0ICAgICAgICAgICAgb25yZW5kZXJlZDogZnVuY3Rpb24gKCkge30sXG5cdCAgICAgICAgICAgIHRyYW5zaXRpb25fZHVyYXRpb246IDM1MCxcblx0ICAgICAgICAgICAgZGF0YV94OiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIGRhdGFfeHM6IHt9LFxuXHQgICAgICAgICAgICBkYXRhX3hGb3JtYXQ6ICclWS0lbS0lZCcsXG5cdCAgICAgICAgICAg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ZXM6IFtdLFxuXHQgICAgICAgICAgICBheGlzX3hfdGlja19jZW50ZXJlZDogZmFsc2UsXG5cdCAgICAgICAgICAgIGF4aXNfeF90aWNrX2Zvcm1hdDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3hfdGlja19jdWxsaW5nOiB7fSxcblx0ICAgICAgICAgICAgYXhpc194X3RpY2tfY3VsbGluZ19tYXg6IDEwLFxuXHQgICAgICAgICAgICBheGlzX3hfdGlja19jb3VudDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3hfdGlja19maXQ6IHRydWUsXG5cdCAgICAgICAgICAgIGF4aXNfeF90aWNrX3ZhbHVlczogbnVsbCxcblx0ICAgICAgICAgICAgYXhpc194X3RpY2tfcm90YXRlOiAwLFxuXHQgICAgICAgICAgICBheGlzX3hfdGlja19vdXRlcjogdHJ1ZSxcblx0ICAgICAgICAgICAgYXhpc194X3RpY2tfbXVsdGlsaW5lOiB0cnVlLFxuXHQgICAgICAgICAgICBheGlzX3hfdGlja193aWR0aDogbnVsbCxcblx0ICAgICAgICAgICAgYXhpc194X21heDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3hfbWluOiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIGF4aXNfeF9wYWRkaW5nOiB7fSxcblx0ICAgICAgICAgICAgYXhpc194X2hlaWdodDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3hfZXh0ZW50OiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIGF4aXNfeF9sYWJlbDoge30sXG5cdCAgICAgICAgICAgIGF4aXNfeV9zaG93OiB0cnVlLFxuXHQgICAgICAgICAgICBheGlzX3lfdHlwZTogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3lfbWF4OiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIGF4aXNfeV9taW46IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc195X2ludmVydGVkOiBmYWxzZSxcblx0ICAgICAgICAgICAgYXhpc195X2NlbnRlcjogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3lfaW5uZXI6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc195X2xhYmVsOiB7fSxcblx0ICAgICAgICAgICAgYXhpc195X3RpY2tfZm9ybWF0OiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIGF4aXNfeV90aWNrX291dGVyOiB0cnVlLFxuXHQgICAgICAgICAgICBheGlzX3lfdGlja192YWx1ZXM6IG51bGwsICAgICAgICBcblx0ICAgICAgICAgICAgYXhpc195X3RpY2tfcm90YXRlOiAwLFxuXHQgICAgICAgICAgICBheGlzX3lfdGlja19jb3VudDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3lfdGlja190aW1lX3ZhbHVlOiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIGF4aXNfeV90aWNrX3RpbWVfaW50ZXJ2YWw6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc195X3BhZGRpbmc6IHt9LFxuXHQgICAgICAgICAgICBheGlzX3lfZGVmYXVsdDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3kyX3Nob3c6IGZhbHNlLFxuXHQgICAgICAgICAgICBheGlzX3kyX21heDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3kyX21pbjogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3kyX2ludmVydGVkOiBmYWxzZSxcblx0ICAgICAgICAgICAgYXhpc195Ml9jZW50ZXI6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc195Ml9pbm5lcjogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3kyX2xhYmVsOiB7fSxcblx0ICAgICAgICAgICAgYXhpc195Ml90aWNrX2Zvcm1hdDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3kyX3RpY2tfb3V0ZXI6IHRydWUsXG5cdCAgICAgICAgICAgIGF4aXNfeTJfdGlja192YWx1ZXM6IG51bGwsXG5cdCAgICAgICAgICAgIGF4aXNfeTJfdGlja19jb3VudDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3kyX3BhZGRpbmc6IHt9LFxuXHQgICAgICAgICAgICBheGlzX3kyX2RlZmF1bHQ6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgLy8gZ3JpZFxuXHQgICAgICAgICAgICBncmlkX3hfc2hvdzogZmFsc2UsXG5cdCAgICAgICAgICAgIGdyaWRfeF90eXBlOiAndGljaycsXG5cdCAgICAgICAgICAgIGdyaWRfeF9saW5lczogW10sXG5cdCAgICAgICAgICAgIGdyaWRfeV9zaG93OiBmYWxzZSxcblx0ICAgICAgICAgICAgLy8gbm90IHVzZWRcblx0ICAgICAgICAgICAgLy8gZ3JpZF95X3R5cGU6ICd0aWNrJyxcblx0ICAgICAgICAgICAgZ3JpZF95X2xpbmVzOiBbXSxcblx0ICAgICAgICAgICAgZ3JpZF95X3RpY2tzOiAxMCxcblx0ICAgICAgICAgICAgZ3JpZF9mb2N1c19zaG93OiB0cnVlLFxuXHQgICAgICAgICAgICBncmlkX2xpbmVzX2Zyb250OiB0cnVlLFxuXHQgICAgICAgICAgICAvLyBwb2ludCAtIHBvaW50IG9mIGVhY2ggZGF0YVxuXHQgICAgICAgICAgICBwb2ludF9zaG93OiB0cnVlLFxuXHQgICAgICAgICAgICBwb2ludF9yOiAyLjUsXG5cdCAgICAgICAgICAgIHBvaW50X3NlbnNpdGl2aXR5OiAxMCxcblx0ICAgICAgICAgICAgcG9pbnRfZm9jdXNfZXhwYW5kX2VuYWJsZWQ6IHRydWUsXG5cdCAgICAgICAgICAgIHBvaW50X2ZvY3VzX2V4cGFuZF9yOiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIHBvaW50X3NlbGVjdF9yOiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIC8vIGxpbmVc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5nQW5nbGU6IC0xICogTWF0aC5QSS8yLFxuXHQgICAgICAgICAgICBnYXVnZV91bml0czogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBnYXVnZV93aWR0aDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBnYXVnZV9leHBhbmQ6IHt9LFxuXHQgICAgICAgICAgICBnYXVnZV9leHBhbmRfZHVyYXRpb246IDUwLFxuXHQgICAgICAgICAgICAvLyBkb251dFxuXHQgICAgICAgICAgICBkb251dF9sYWJlbF9zaG93OiB0cnVlLFxuXHQgICAgICAgICAgICBkb251dF9sYWJlbF9mb3JtYXQ6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgZG9udXRfbGFiZWxfdGhyZXNob2xkOiAwLjA1LFxuXHQgICAgICAgICAgICBkb251dF9sYWJlbF9yYXRpbzogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBkb251dF93aWR0aDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBkb251dF90aXRsZTogXCJcIixcblx0ICAgICAgICAgICAgZG9udXRfZXhwYW5kOiB7fSxcblx0ICAgICAgICAgICAgZG9udXRfZXhwYW5kX2R1cmF0aW9uOiA1MCxcblx0ICAgICAgICAgICAgLy8gc3BsaW5lXG5cdCAgICAgICAgICAgIHNwbGluZV9pbnRlcnBvbGF0aW9uX3R5cGU6ICdjYXJkaW5hbCcsXG5cdCAgICAgICAgICAgIC8vIHJlZ2lvbiAtIHJlZ2lvbiB0byBjaGFuZ2Ugc3R5bGVcblx0ICAgICAgICAgICAgcmVnaW9uczogW10sXG5cdCAgICAgICAgICAgIC8vIHRvb2x0aXAgLSBzaG93IHdoZW4gbW91c2VvdmVyIG9uIGVhY2ggZGF0YVxuXHQgICAgICAgICAgICB0b29sdGlwX3Nob3c6IHRydWUsXG5cdCAgICAgICAgICAgIHRvb2x0aXBfZ3JvdXBlZDogdHJ1ZSxcblx0ICAgICAgICAgICAgdG9vbHRpcF9mb3JtYXRfdGl0bGU6IHVuZG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ICAgICBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgICAgT2JqZWN0LmtleXModGhpc19jb25maWcpLmZvckVhY2goZnVuY3Rpb24gKGtleSkge1xuXHQgICAgICAgICAgICB0YXJnZXQgPSBjb25maWc7XG5cdCAgICAgICAgICAgIGtleXMgPSBrZXkuc3BsaXQoJ18nKTtcblx0ICAgICAgICAgICAgcmVhZCA9IGZpbmQoKTtcblx0ICAgIC8vICAgICAgICBjb25zb2xlLmxvZyhcIkNPTkZJRyA6IFwiLCBrZXksIHJlYWQpO1xuXHQgICAgICAgICAgICBpZiAoaXNEZWZpbmVkKHJlYWQpKSB7XG5cdCAgICAgICAgICAgICAgICB0aGlzX2NvbmZpZ1trZXldID0gcmVhZDtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0pO1xuXHQgICAgfTtcblx0XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRTY2FsZSA9IGZ1bmN0aW9uIChtaW4sIG1heCwgZm9yVGltZXNlcmllcykge1xuXHQgICAgICAgIHJldHVybiAoZm9yVGltZXNlcmllcyA/IHRoaXMuZDMudGltZS5zY2FsZSgpIDogdGhpcy5kMy5zY2FsZS5saW5lYXIoKSkucmFuZ2UoW21pbiwgbWF4XSk7XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0WCA9IGZ1bmN0aW9uIChtaW4sIG1heCwgZG9tYWluLCBvZmZzZXQpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLFxuXHQgICAgICAgICAgICBzY2FsZSA9ICQkLmdldFNjYWxlKG1pbiwgbWF4LCAkJC5pc1RpbWVTZXJpZXMoKSksXG5cdCAgICAgICAgICAgIF9zY2FsZSA9IGRvbWFpbiA/IHNjYWxlLmRvbWFpbihkb21haW4pIDogc2NhbGUsIGtleTtcblx0ICAgICAgICAvLyBEZWZpbmUgY3VzdG9taXplZCBzY2FsZSBpZiBjYXRlZ29yaXplZCBheGlzXG5cdCAgICAgICAgaWYgKCQkLmlzQ2F0ZWdvcml6ZWQoKSkge1xuXHQgICAgICAgICAgICBvZmZzZXQgPSBvZmZzZXQgfHwgZnVuY3Rpb24gKCkgeyByZXR1cm4gMDsgfTtcblx0ICAgICAgICAgICAgc2NhbGUgPSBmdW5jdGlvbiAoZCwgcmF3KSB7XG5cdCAgICAgICAgICAgICAgICB2YXIgdiA9IF9zY2FsZShkKSArIG9mZnNldChkKTtcblx0ICAgICAgICAgICAgICAgIHJldHVybiByYXcgPyB2IDogTWF0aC5jZWlsKHYpO1xuXHQgICAgICAgICAgICB9O1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIHNjYWxlID0gZnVuY3Rpb24gKGQsIHJhdykge1xuXHQgICAgICAgICAgICAgICAgdmFyIHYgPSBfc2NhbGUoZCk7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmF3ID8gdiA6IE1hdGguY2VpbCh2KTtcblx0ICAgICAgICAgICAgfTtcblx0ICAgICAgICB9XG5cdCAgICAgICAgLy8gZGVmaW5lIGZ1bmN0aW9uc1xuXHQgICAgICAgIGZvciAoa2V5IGluIF9zY2FsZSkge1xuXHQgICAgICAgICAgICBzY2FsZVtrZXldID0gX3NjYWxlW2tleV07XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHNjYWxlLm9yZ0RvbWFpbiA9IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIF9zY2FsZS5kb21haW4oKTtcblx0ICAgICAgICB9O1xuXHQgICAgICAgIC8vIGRlZmluZSBjdXN0b20gZG9tYWluKCkgZm9yIGNhdGVnb3JpemVkIGF4aXNcblx0ICAgICAgICBpZiAoJCQuaXNDYXRlZ29yaXplZCgpKSB7XG5cdCAgICAgICAgICAgIHNjYWxlLmRvbWFpbiA9IGZ1bmN0aW9uIChkb21haW4pIHtcblx0ICAgICAgICAgICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkge1xuXHQgICAgICAgICAgICAgICAgICAgIGRvbWFpbiA9IHRoaXMub3JnRG9tYWluKCk7XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtkb21haW5bMF0sIGRvbWFpblsxXSArIDFdO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgX3NjYWxlLmRvbWFpbihkb21haW4pO1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIHNjYWxlO1xuXHQgICAgICAgICAgICB9O1xuXHQgICAgICAgIH1cblx0ICAgICAgICByZXR1cm4gc2NhbGU7XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0WSA9IGZ1bmN0aW9uIChtaW4sIG1heCwgZG9tYWluKSB7XG5cdCAgICAgICAgdmFyIHNjYWxlID0gdGhpcy5nZXRTY2FsZShtaW4sIG1heCwgdGhpcy5pc1RpbWVTZXJpZXNZKCkpO1xuXHQgICAgICAgIGlmIChkb21haW4pIHsgc2NhbGUuZG9tYWluKGRvbWFpbik7IH1cblx0ICAgICAgICByZXR1cm4gc2NhbGU7XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0WVNjYWxlID0gZnVuY3Rpb24gKGlkKSB7XG5cdCAgICAgICAgcmV0dXJuIHRoaXMuYXhpcy5nZXRJZChpZCkgPT09ICd5MicgPyB0aGlzLnkyIDogdGhpcy55O1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldFN1YllTY2FsZSA9IGZ1bmN0aW9uIChpZCkge1xuXHQgICAgICAgIHJldHVybiB0aGlzLmF4aXMuZ2V0SWQoaWQpID09PSAneTInID8gdGhpcy5zdWJZMiA6IHRoaXMuc3ViWTtcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi51cGRhdGVTY2FsZXMgPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLFxuXHQgICAgICAgICAgICBmb3JJbml0ID0gISQkLng7XG5cdCAgICAgICAgLy8gdXBkYXRlIGVkZ2VzXG5cdCAgICAgICAgJCQueE1pbiA9IGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAxIDogMDtcblx0ICAgICAgICAkJC54TWF4ID0gY29uZmlnLmF4aXNfcm90YXRlZCA/ICQkLmhlaWdodCA6ICQkLndpZHRoO1xuXHQgICAgICAgICQkLnlNaW4gPSBjb25maWcuYXhpc19yb3RhdGVkID8gMCA6ICQkLmhlaWdodDtcblx0ICAgICAgICAkJC55TWF4ID0gY29uZmlnLmF4aXNfcm90YXRlZCA/ICQkLndpZHRoIDogMTtcblx0ICAgICAgICAkJC5zdWJYTWluID0gJCQueE1pbjtcblx0ICAgICAgICAkJC5zdWJYTWF4ID0gJCQueE1heDtcblx0ICAgICAgICAkJC5zdWJZTWluID0gY29uZmlnLmF4aXNfcm90YXRlZCA/IDAgOiAkJC5oZWlnaHQyO1xuXHQgICAgICAgICQkLnN1YllNYXggPSBjb25maWcuYXhpc19yb3RhdGVkID8gJCQud2lkdGgyIDogMTtcblx0ICAgICAgICAvLyB1cGRhdGUgc2NhbGVzXG5cdCAgICAgICAgJCQueCA9ICQkLmdldFgoJCQueE1pbiwgJCQueE1heCwgZm9ySW5pdCA/IHVuZGVmaW5lZCA6ICQkLngub3JnRG9tYWluKCksIGZ1bmN0aW9uICgpIHsgcmV0dXJuICQkLnhBeGlzLnRpY2tPZmZzZXQoKTsgfSk7XG5cdCAgICAgICAgJCQueSA9ICQkLmdldFkoJCQueU1pbiwgJCQueU1heCwgZm9ySW5pdCA/IGNvbmZpZy5heGlzX3lfZGVmYXVsdCA6ICQkLnkuZG9tYWluKCkpO1xuXHQgICAgICAgICQkLnkyID0gJCQuZ2V0WSgkJC55TWluLCAkJC55T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AgICAgICAgICAgICAgIC8vIENvbXB1dGUgbWluXG5cdCAgICAgICAgICAgICAgICBmb3IgKGsgPSAxOyBrIDwgaWRzSW5Hcm91cC5sZW5ndGg7IGsrKykge1xuXHQgICAgICAgICAgICAgICAgICAgIGlkID0gaWRzSW5Hcm91cFtrXTtcblx0ICAgICAgICAgICAgICAgICAgICBpZiAoISB5c1tpZF0pIHsgY29udGludWU7IH1cblx0ICAgICAgICAgICAgICAgICAgICB5c1tpZF0uZm9yRWFjaChmdW5jdGlvbiAodiwgaSkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBpZiAoJCQuYXhpcy5nZXRJZChpZCkgPT09ICQkLmF4aXMuZ2V0SWQoYmFzZUlkKSAmJiB5c1tiYXNlSWRdICYmICEoaGFzTmVnYXRpdmVWYWx1ZSAmJiArdiA+IDApKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICB5c1tiYXNlSWRdW2ldICs9ICt2O1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgICAgcmV0dXJuICQkLmQzLm1pbihPYmplY3Qua2V5cyh5cykubWFwKGZ1bmN0aW9uIChrZXkpIHsgcmV0dXJuICQkLmQzLm1pbih5c1trZXldKTsgfSkpO1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldFlEb21haW5NYXggPSBmdW5jdGlvbiAodGFyZ2V0cykge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZyxcblx0ICAgICAgICAgICAgaWRzID0gJCQubWFwVG9JZHModGFyZ2V0cyksIHlzID0gJCQuZ2V0VmFsdWVzQXNJZEtleWVkKHRhcmdldHMpLFxuXHQgICAgICAgICAgICBqLCBrLCBiYXNlSWQsIGlkc0luR3JvdXAsIGlkLCBoYXNQb3NpdGl2ZVZhbHVlO1xuXHQgICAgICAgIGlmIChjb25maWcuZGF0YV9ncm91cHMubGVuZ3RoID4gMCkge1xuXHQgICAgICAgICAgICBoYXNQb3NpdGl2ZVZhbHVlID0gJCQuaGFzUG9zaXRpdmVWYWx1ZUluVGFyZ2V0cyh0YXJnZXRzKTtcblx0ICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IGNvbmZpZy5kYXRhX2dyb3Vwcy5sZW5ndGg7IGorKykge1xuXHQgICAgICAgICAgICAgICAgLy8gRGV0ZXJtaW5lIGJhc2VJZFxuXHQgICAgICAgICAgICAgICAgaWRzSW5Hcm91cCA9IGNvbmZpZy5kYXRhX2dyb3Vwc1tqXS5maWx0ZXIoZnVuY3Rpb24gKGlkKSB7IHJldHVybiBpZHMuaW5kZXhPZihpZCkgPj0gMDsgfSk7XG5cdCAgICAgICAgICAgICAgICBpZiAoaWRzSW5Hcm91cC5sZW5ndGggPT09IDApIHsgY29udGludWU7IH1cblx0ICAgICAgICAgICAgICAgIGJhc2VJZCA9IGlkc0luR3JvdXBbMF07XG5cdCAgICAgICAgICAgICAgICAvLyBDb25zaWRlciBwb3NpdGl2ZSB2YWx1ZXNcblx0ICAgICAgICAgICAgICAgIGlmIChoYXNQb3NpdGl2ZVZhbHVlICYmIHlzW2Jhc2VJZF0pIHtcblx0ICAgICAgICAgICAgICAgICAgICB5c1tiYXNlSWRdLmZvckVhY2goZnVuY3Rpb24gKHYsIGkpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgeXNbYmFzZUlkXVtpXSA9IHYgPiAwID8gdiA6IDA7XG5cdCAgICAgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAvLyBDb21wdXRlIG1heFxuXHQgICAgICAgICAgICAgICAgZm9yIChrID0gMTsgayA8IGlkc0luR3JvdXAubGVuZ3RoOyBrKyspIHtcblx0ICAgICAgICAgICAgICAgICAgICBpZCA9IGlkc0luR3JvdXBba107XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKCEgeXNbaWRdKSB7IGNvbnRpbnVlOyB9XG5cdCAgICAgICAgICAgICAgICAgICAgeXNbaWRdLmZvckVhY2goZnVuY3Rpb24gKHYsIGkpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCQkLmF4aXMuZ2V0SWQoaWQpID09PSAkJC5heGlzLmdldElkKGJhc2VJZCkgJiYgeXNbYmFzZUlkXSAmJiAhKGhhc1Bvc2l0aXZlVmFsdWUgJiYgK3YgPCAwKSkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgeXNbYmFzZUlkXVtpXSArPSArdjtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHJldHVybiAkJC5kMy5tYXgoT2JqZWN0LmtleXMoeXMpLm1hcChmdW5jdGlvbiAoa2V5KSB7IHJldHVybiAkJC5kMy5tYXgoeXNba2V5XSk7IH0pKTtcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRZRG9tYWluID0gZnVuY3Rpb24gKHRhcmdldHMsIGF4aXNJZCwgeERvbWFpbikge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZyxcblx0ICAgICAgICAgICAgdGFyZ2V0c0J5QXhpc0lkID0gdGFyZ2V0cy5maWx0ZXIoZnVuY3Rpb24gKHQpIHsgcmV0dXJuICQkLmF4aXMuZ2V0SWQodC5pZCkgPT09IGF4aXNJZDsgfSksXG5cdCAgICAgICAgICAgIHlUYXJnZXRzID0geERvbWFpbiA/ICQkLmZpbHRlckJ5WERvbWFpbih0YXJnZXRzQnlBeGlzSWQsIHhEb21haW4pIDogdGFyZ2V0c0J5QXhpc0lk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gICAgICAgICAgIHNob3dWZXJ0aWNhbERhdGFMYWJlbCA9ICQkLmhhc0RhdGFMYWJlbCgpICYmICFjb25maWcuYXhpc19yb3RhdGVkO1xuXHRcblx0ICAgICAgICAvLyBNRU1POiBhdm9pZCBpbnZlcnRpbmcgZG9tYWluIHVuZXhwZWN0ZWRseVxuXHQgICAgICAgIHlEb21haW5NaW4gPSBpc1ZhbHVlKHlNaW4pID8geU1pbiA6IGlzVmFsdWUoeU1heCkgPyAoeURvbWFpbk1pbiA8IHlNYXggPyB5RG9tYWluTWluIDogeU1heCAtIDEwKSA6IHlEb21haW5NaW47XG5cdCAgICAgICAgeURvbWFpbk1heCA9IGlzVmFsdWUoeU1heCkgPyB5TWF4IDogaXNWYWx1ZSh5TWluKSA/ICh5TWluIDwgeURvbWFpbk1heCA/IHlEb21haW5NYXggOiB5TWluICsgMTApIDogeURvbWFpbk1heDtcblx0XG5cdCAgICAgICAgaWYgKHlUYXJnZXRzLmxlbmd0aCA9PT0gMCkgeyAvLyB1c2UgY3VycmVudCBkb21haW4gaWYgdGFyZ2V0IG9mIGF4aXNJZCBpcyBub25lXG5cdCAgICAgICAgICAgIHJldHVybiBheGlzSWQgPT09ICd5MicgPyAkJC55Mi5kb21haW4oKSA6ICQkLnkuZG9tYWluKCk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGlmIChpc05hTih5RG9tYWluTWluKSkgeyAvLyBzZXQgbWluaW11bSB0byB6ZXJvIHdoZW4gbm90IG51bWJlclxuXHQgICAgICAgICAgICB5RG9tYWluTWluID0gMDtcblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKGlzTmFOKHlEb21haW5NYXgpKSB7IC8vIHNldCBtYXhpbXVtIHRvIGhhdmUgc2FtZSB2YWx1ZSBhcyB5RG9tYWluTWluXG5cdCAgICAgICAgICAgIHlEb21haW5NYXggPSB5RG9tYWluTWluO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAoeURvbWFpbk1pbiA9PT0geURvbWF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CYXNlZCkge1xuXHQgICAgICAgICAgICBpZiAoaXNBbGxQb3NpdGl2ZSkgeyBwYWRkaW5nX2JvdHRvbSA9IHlEb21haW5NaW47IH1cblx0ICAgICAgICAgICAgaWYgKGlzQWxsTmVnYXRpdmUpIHsgcGFkZGluZ190b3AgPSAteURvbWFpbk1heDsgfVxuXHQgICAgICAgIH1cblx0ICAgICAgICBkb21haW4gPSBbeURvbWFpbk1pbiAtIHBhZGRpbmdfYm90dG9tLCB5RG9tYWluTWF4ICsgcGFkZGluZ190b3BdO1xuXHQgICAgICAgIHJldHVybiBpc0ludmVydGVkID8gZG9tYWluLnJldmVyc2UoKSA6IGRvbWFpbjtcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRYRG9tYWluTWluID0gZnVuY3Rpb24gKHRhcmdldHMpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWc7XG5cdCAgICAgICAgcmV0dXJuIGlzRGVmaW5lZChjb25maWcuYXhpc194X21pbikgP1xuXHQgICAgICAgICAgICAoJCQuaXNUaW1lU2VyaWVzKCkgPyB0aGlzLnBhcnNlRGF0ZShjb25maWcuYXhpc194X21pbikgOiBjb25maWcuYXhpc194X21pbikgOlxuXHQgICAgICAgICQkLmQzLm1pbih0YXJnZXRzLCBmdW5jdGlvbiAodCkgeyByZXR1cm4gJCQuZDMubWluKHQudmFsdWVzLCBmdW5jdGlvbiAodikgeyByZXR1cm4gdi54OyB9KTsgfSk7XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0WERvbWFpbk1heCA9IGZ1bmN0aW9uICh0YXJnZXRzKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnO1xuXHQgICAgICAgIHJldHVybiBpc0RlZmluZWQoY29uZmlnLmF4aXNfeF9tYXgpID9cblx0ICAgICAgICAgICAgKCQkLmlzVGltZ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h3aXRoVHJpbSkgeyAkJC54LmRvbWFpbigkJC50cmltWERvbWFpbigkJC54Lm9yZ0RvbWFpbigpKSk7IH1cblx0XG5cdCAgICAgICAgcmV0dXJuICQkLnguZG9tYWluKCk7XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4udHJpbVhEb21haW4gPSBmdW5jdGlvbiAoZG9tYWluKSB7XG5cdCAgICAgICAgdmFyIHpvb21Eb21haW4gPSB0aGlzLmdldFpvb21Eb21haW4oKSxcblx0ICAgICAgICAgICAgbWluID0gem9vbURvbWFpblswXSwgbWF4ID0gem9vbURvbWFpblsxXTtcblx0ICAgICAgICBpZiAoZG9tYWluWzBdIDw9IG1pbikge1xuXHQgICAgICAgICAgICBkb21haW5bMV0gPSArZG9tYWluWzFdICsgKG1pbiAtIGRvbWFpblswXSk7XG5cdCAgICAgICAgICAgIGRvbWFpblswXSA9IG1pbjtcblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKG1heCA8PSBkb21haW5bMV0pIHtcblx0ICAgICAgICAgICAgZG9tYWluWzBdID0gK2RvbWFpblswXSAtIChkb21haW5bMV0gLSBtYXgpO1xuXHQgICAgICAgICAgICBkb21haW5bMV0gPSBtYXg7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHJldHVybiBkb21haW47XG5cdCAgICB9O1xuXHRcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmlzWCA9IGZ1bmN0aW9uIChrZXkpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWc7XG5cdCAgICAgICAgcmV0dXJuIChjb25maWcuZGF0YV94ICYmIGtleSA9PT0gY29uZmlnLmRhdGFfeCkgfHwgKG5vdEVtcHR5KGNvbmZpZy5kYXRhX3hzKSAmJiBoYXNWYWx1ZShjb25maWcuZGF0YV94cywga2V5KSk7XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uaXNO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7XG5cdCAgICAgICAgICAgIGlmICghZGF0YSkge1xuXHQgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGVycm9yLnJlc3BvbnNlVVJMICsgJyAnICsgZXJyb3Iuc3RhdHVzICsgJyAoJyArIGVycm9yLnN0YXR1c1RleHQgKyAnKScpO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIGlmICh0eXBlID09PSAnanNvbicpIHtcblx0ICAgICAgICAgICAgICAgIGQgPSAkJC5jb252ZXJ0SnNvblRvRGF0YShKU09OLnBhcnNlKGRhdGEucmVzcG9uc2UpLCBrZXlzKTtcblx0ICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlID09PSAndHN2Jykge1xuXHQgICAgICAgICAgICAgICAgZCA9ICQkLmNvbnZlcnRUc3ZUb0RhdGEoZGF0YS5yZXNwb25zZSk7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICBkID0gJCQuY29udmVydENzdlRvRGF0YShkYXRhLnJlc3BvbnNlKTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBkb25lLmNhbGwoJCQsIGQpO1xuXHQgICAgICAgIH0pO1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmNvbnZlcnRYc3ZUb0RhdGEgPSBmdW5jdGlvbiAoeHN2LCBwYXJzZXIpIHtcblx0ICAgICAgICB2YXIgcm93cyA9IHBhcnNlci5wYXJzZVJvd3MoeHN2KSwgZDtcblx0ICAgICAgICBpZiAocm93cy5sZW5ndGggPT09IDEpIHtcblx0ICAgICAgICAgICAgZCA9IFt7fV07XG5cdCAgICAgICAgICAgIHJvd3NbMF0uZm9yRWFjaChmdW5jdGlvbiAoaWQpIHtcblx0ICAgICAgICAgICAgICAgIGRbMF1baWRdID0gbnVsbDtcblx0ICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgZCA9IHBhc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gIGpzb24uZm9yRWFjaChmdW5jdGlvbiAobykge1xuXHQgICAgICAgICAgICAgICAgdmFyIG5ld19yb3cgPSBbXTtcblx0ICAgICAgICAgICAgICAgIHRhcmdldEtleXMuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7XG5cdCAgICAgICAgICAgICAgICAgICAgLy8gY29udmVydCB1bmRlZmluZWQgdG8gbnVsbCBiZWNhdXNlIHVuZGVmaW5lZCBkYXRhIHdpbGwgYmUgcmVtb3ZlZCBpbiBjb252ZXJ0RGF0YVRvVGFyZ2V0cygpXG5cdCAgICAgICAgICAgICAgICAgICAgdmFyIHYgPSAkJC5maW5kVmFsdWVJbkpzb24obywga2V5KTtcblx0ICAgICAgICAgICAgICAgICAgICBpZiAoaXNVbmRlZmluZWQodikpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdiA9IG51bGw7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIG5ld19yb3cucHVzaCh2KTtcblx0ICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICAgICAgbmV3X3Jvd3MucHVzaChuZXdfcm93KTtcblx0ICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgIGRhdGEgPSAkJC5jb252ZXJ0Um93c1RvRGF0YShuZXdfcm93cyk7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgT2JqZWN0LmtleXMoanNvbikuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7XG5cdCAgICAgICAgICAgICAgICBuZXdfcm93cy5wdXNoKFtrZXldLmNvbmNhdChqc29uW2tleV0pKTtcblx0ICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgIGRhdGEgPSAkJC5jb252ZXJ0Q29sdW1uc1RvRGF0YShuZXdfcm93cyk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHJldHVybiBkYXRhO1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmF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0KFxuXHQgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLm1hcChmdW5jdGlvbiAoZCkgeyByZXR1cm4gZFt4S2V5XTsgfSlcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoaXNWYWx1ZSlcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKHJhd1gsIGkpIHsgcmV0dXJuICQkLmdlbmVyYXRlVGFyZ2V0WChyYXdYLCBpZCwgaSk7IH0pXG5cdCAgICAgICAgICAgICAgICAgICAgKTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIC8vIGlmIG5vdCBpbmNsdWRlZCBpbiBpbnB1dCBkYXRhLCBmaW5kIGZyb20gcHJlbG9hZGVkIGRhdGEgb2Ygb3RoZXIgaWQncyB4XG5cdCAgICAgICAgICAgICAgICBlbHNlIGlmIChjb25maWcuZGF0YV94KSB7XG5cdCAgICAgICAgICAgICAgICAgICAgJCQuZGF0YS54c1tpZF0gPSAkJC5nZXRPdGhlclRhcmdldFhzKCk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAvLyBpZiBub3QgaW5jbHVkZWQgaW4gaW5wdXQgZGF0YSwgZmluZCBmcm9tIHByZWxvYWRlZCBkYXRhXG5cdCAgICAgICAgICAgICAgICBlbHNlIGlmIChub3RFbXB0eShjb25maWcuZGF0YV94cykpIHtcblx0ICAgICAgICAgICAgICAgICAgICAkJC5kYXRhLnhzW2lkXSA9ICQkLmdldFhWYWx1ZXNPZlhLZXkoeEtleSwgJCQuZGF0YS50YXJnZXRzKTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIC8vIE1FTU86IGlmIG5vIHggaW5jbHVkZWQsIHVzZSBzYW1lIHggb2YgY3VycmVudCB3aWxsIGJlIHVzZWRcblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgICQkLmRhdGEueHNbaWRdID0gZGF0YS5tYXAoZnVuY3Rpb24gKGQsIGkpIHsgcmV0dXJuIGk7IH0pO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfSk7XG5cdFxuXHRcblx0ICAgICAgICAvLyBjaGVjayB4IGlzIGRlZmluZWRcblx0ICAgICAgICBpZHMuZm9yRWFjaChmdW5jdGlvbiAoaWQpIHtcblx0ICAgICAgICAgICAgaWYgKCEkJC5kYXRhLnhzW2lkXSkge1xuXHQgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCd4IGlzIG5vdCBkZWZpbmVkIGZvciBpZCA9IFwiJyArIGlkICsgJ1wiLicpO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfSk7XG5cdFxuXHQgICAgICAgIC8vIGNvbnZlcnQgdG8gdGFyZ2V0XG5cdCAgICAgICAgdGFyZ2V0cyA9IGlkcy5tYXAoZnVuY3Rpb24gKGlkLCBpbmRleCkge1xuXHQgICAgICAgICAgICB2YXIgY29udmVydGVkSWQgPSBjb25maWcuZGF0YV9pZENvbnZlcnRlcihpZCk7XG5cdCAgICAgICAgICAgIHJldHVybiB7XG5cdCAgICAgICAgICAgICAgICBpZDogY29udmVydGVkSWQsXG5cdCAgICAgICAgICAgICAgICBpZF9vcmc6IGlkLFxuXHQgICAgICAgICAgICAgICAgdmFsdWVzOiBkYXRhLm1hcChmdW5jdGlvbiAoZCwgaSkge1xuXHQgICAgICAgICAgICAgICAgICAgIHZhciB4S2V5ID0gJCQuZ2V0WEtleShpZCksIHJhd1ggPSBkW3hLZXldLFxuXHQgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IGRbaWRdICE9PSBudWxsICYmICFpc05hTihkW2lkXSkgPyArZFtpZF0gOiBudWxsLCB4O1xuXHQgICAgICAgICAgICAgICAgICAgIC8vIHVzZSB4IGFzIGNhdGVnb3JpZXMgaWYgY3VzdG9tIHggYW5kIGNhdGVnb3JpemVkXG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKCQkLmlzQ3VzdG9tWCgpICYmICQkLmlzQ2F0ZWdvcml6ZWQoKSAmJiBpbmRleCA9PT0gMCAmJiAhaXNVbmRlZmluZWQocmF3WCkpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGluZGV4ID09PSAwICYmIGkgPT09IDApIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5heGlzX3hfY2F0ZWdvcmllcyA9IFtdO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHggPSBjb25maWcuYXhpc194X2NhdGVnb3JpZXMuaW5kZXhPZihyYXdYKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHggPT09IC0xKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ID0gY29uZmlnLmF4aXNfeF9jYXRlZ29yaWVzLmxlbmd0aDtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5heGlzX3hfY2F0ZWdvcmllcy5wdXNoKHJhd1gpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgeCAgPSAkJC5nZW5lcmF0ZVRhcmdldFgocmF3WCwgaWQsIGkpO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICAvLyBtYXJrIGFzIHggPSB1bmRlZmluZWQgaWYgdmFsdWUgaXMgdW5kZWZpbmVkIGFuZCBmaWx0ZXIgdG8gcmVtb3ZlIGFmdGVyIG1hcHBlZFxuXHQgICAgICAgICAgICAgICAgICAgIGlmIChpc1VuZGVmaW5lZChkW2lkXSkgfHwgJCQuZGF0YS54c1tpZF0ubGVuZ3RoIDw9IGkpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgeCA9IHVuZGVmaW5lZDtcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHt4OiB4LCB2YWx1ZTogdmFsdWUsIGlkOiBjb252ZXJ0ZWRJZH07XG5cdCAgICAgICAgICAgICAgICB9KS5maWx0ZXIoZnVuY3Rpb24gKHYpIHsgcmV0dXJuIGlzRGVmaW5lZCh2LngpOyB9KVxuXHQgICAgICAgICAgICB9O1xuXHQgICAgICAgIH0pO1xuXHRcblx0ICAgICAgICAvLyBmaW5pc2ggdGFyZ2V0c1xuXHQgICAgICAgIHRhcmdldHMuZm9yRWFjaChmdW5jdGlvbiAodCkge1xuXHQgICAgICAgICAgICB2YXIgaTtcblx0ICAgICAgICAgICAgLy8gc29ydCB2YWx1ZXMgYnkgaXRzIHhcblx0ICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhX3hTb3J0KSB7XG5cdCAgICAgICAgICAgICAgICB0LnZhbHVlcyA9IHQudmFsdWVzLnNvcnQoZnVuY3Rpb24gKHYxLCB2Mikge1xuXHQgICAgICAgICAgICAgICAgICAgIHZhciB4MSA9IHYxLnggfHwgdjEueCA9PT0gMCA/IHYxLnggOiBJbmZpbml0eSxcblx0ICAgICAgICAgICAgICAgICAgICAgICAgeDIgPSB2Mi54IHx8IHYyLnggPT09IDAgPyB2Mi54IDogSW5maW5pdHk7XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHgxIC0geDI7XG5cdCAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAvLyBpbmRleGluZyBlYWNoIHZhbHVlXG5cdCAgICAgICAgICAgIGkgPSAwO1xuXHQgICAgICAgICAgICB0LnZhbHVlcy5mb3JFYWNoKGZ1bmN0aW9uICh2KSB7XG5cdCAgICAgICAgICAgICAgICB2LmluZGV4ID0gaSsrO1xuXHQgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgLy8gdGhpcyBuZWVkcyB0byBiZSBzb3J0ZWQgYmVj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RoIChvciBoZWlnaHQpXG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZYID09PSBudWxsICYmIG5leHRYID09PSBudWxsKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjb25maWcuYXhpc19yb3RhdGVkID8gJCQuaGVpZ2h0IDogJCQud2lkdGg7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgICAgICAgICBpZiAocHJldlggPT09IG51bGwpIHsgcHJldlggPSAkJC54LmRvbWFpbigpWzBdOyB9XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKG5leHRYID09PSBudWxsKSB7IG5leHRYID0gJCQueC5kb21haW4oKVsxXTsgfVxuXHRcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gTWF0aC5tYXgoMCwgKCQkLngobmV4dFgpIC0gJCQueChwcmV2WCkpIC8gMik7XG5cdCAgICAgICAgICAgICAgICB9O1xuXHQgICAgICAgICAgICAgICAgcmVjdFggPSBmdW5jdGlvbiAoZCkge1xuXHQgICAgICAgICAgICAgICAgICAgIHZhciBwcmV2WCA9ICQkLmdldFByZXZYKGQuaW5kZXgpLCBuZXh0WCA9ICQkLmdldE5leHRYKGQuaW5kZXgpLFxuXHQgICAgICAgICAgICAgICAgICAgICAgICB0aGlzWCA9ICQkLmRhdGEueHNbZC5pZF1bZC5pbmRleF07XG5cdFxuXHQgICAgICAgICAgICAgICAgICAgIC8vIGlmIHRoZXJlIHRoaXMgaXMgYSBzaW5nbGUgZGF0YSBwb2ludCBwb3NpdGlvbiB0aGUgZXZlbnRSZWN0IGF0IDBcblx0ICAgICAgICAgICAgICAgICAgICBpZiAocHJldlggPT09IG51bGwgJiYgbmV4dFggPT09IG51bGwpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgICAgICAgICBpZiAocHJldlggPT09IG51bGwpIHsgcHJldlggPSAkJC54LmRvbWFpbigpWzBdOyB9XG5cdFxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAoJCQueCh0aGlzWCkgKyAkJC54KHByZXZYKSkgLyAyO1xuXHQgICAgICAgICAgICAgICAgfTtcblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIHJlY3RXID0gJCQuZ2V0RXZlbnRSZWN0V2lkdGgoKTtcblx0ICAgICAgICAgICAgICAgIHJlY3RYID0gZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCQueChkLngpIC0gKHJlY3RXIC8gMik7XG5cdCAgICAgICAgICAgICAgICB9O1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHggPSBjb25maWcuYXhpc19yb3RhdGVkID8gMCA6IHJlY3RYO1xuXHQgICAgICAgICAgICB5ID0gY29uZmlnLmF4aXNfcm90YXRlZCA/IHJlY3RYIDogMDtcblx0ICAgICAgICAgICAgdyA9IGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAkJC53aWR0aCA6IHJlY3RXO1xuXHQgICAgICAgICAgICBoID0gY29uZmlnLmF4aXNfcm90YXRlZCA/IHJlY3RXIDogJCQuaGVpZ2h0O1xuXHQgICAgICAgIH1cblx0XG5cdCAgICAgICAgZXZlbnRSZWN0VXBkYXRlXG5cdCAgICAgICAgICAgIC5hdHRyKCdjbGFzcycsICQkLmNsYXNzRXZlbnQuYmluZCgkJCkpXG5cdCAgICAgICAgICAgIC5hdHRyKFwieFwiLCB4KVxuXHQgICAgICAgICAgICAuYXR0cihcInlcIiwgeSlcblx0ICAgICAgICAgICAgLmF0dHIoXCJ3aWR0aFwiLCB3KVxuXHQgICAgICAgICAgICAuYXR0cihcImhlaWdodFwiLCBoKTtcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZW5lcmF0ZUV2ZW50UmVjdHNGb3JTaW5nbGVYID0gZnVu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ICsgQ0xBU1Muc2hhcGUgKyAnLScgKyBpbmRleCkuZWFjaChmdW5jdGlvbiAoZCkge1xuXHQgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhX29ubW91c2VvdmVyLmNhbGwoJCQuYXBpLCBkKTtcblx0ICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICB9KVxuXHQgICAgICAgICAgICAub24oJ21vdXNlb3V0JywgZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgIHZhciBpbmRleCA9IGQuaW5kZXg7XG5cdCAgICAgICAgICAgICAgICBpZiAoISQkLmNvbmZpZykgeyByZXR1cm47IH0gLy8gY2hhcnQgaXMgZGVzdHJveWVkXG5cdCAgICAgICAgICAgICAgICBpZiAoJCQuaGFzQXJjVHlwZSgpKSB7IHJldHVybjsgfVxuXHQgICAgICAgICAgICAgICAgJCQuaGlkZVhHcmlkRm9jdXMoKTtcblx0ICAgICAgICAgICAgICAgICQkLmhpZGVUb29sdGlwKCk7XG5cdCAgICAgICAgICAgICAgICAvLyBVbmRvIGV4cGFuZGVkIHNoYXBlc1xuXHQgICAgICAgICAgICAgICAgJCQudW5leHBhbmRDaXJjbGVzKCk7XG5cdCAgICAgICAgICAgICAgICAkJC51bmV4cGFuZEJhcnMoKTtcblx0ICAgICAgICAgICAgICAgIC8vIENhbGwgZXZlbnQgaGFuZGxlclxuXHQgICAgICAgICAgICAgICAgJCQubWFpbi5zZWxlY3RBbGwoJy4nICsgQ0xBU1Muc2hhcGUgKyAnLScgKyBpbmRleCkuZWFjaChmdW5jdGlvbiAoZCkge1xuXHQgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhX29ubW91c2VvdXQuY2FsbCgkJC5hcGksIGQpO1xuXHQgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgIH0pXG5cdCAgICAgICAgICAgIC5vbignbW91c2Vtb3ZlJywgZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgIHZhciBzZWxlY3RlZERhdGEsIGluZGV4ID0gZC5pbmRleCxcblx0ICAgICAgICAgICAgICAgICAgICBldmVudFJlY3QgPSAkJC5zdmcuc2VsZWN0KCcuJyArIENMQVNTLmV2ZW50UmVjdCArICctJyArIGluZGV4KTtcblx0XG5cdCAgICAgICAgICAgICAgICBpZiAoJCQuZHJhZ2dpbmcgfHwgJCQuZmxvd2luZykgeyByZXR1cm47IH0gLy8gZG8gbm90aGluZyB3aGlsZSBkcmFnZ2luZy9mbG93aW5nXG5cdCAgICAgICAgICAgICAgICBpZiAoJCQuaGFzQXJjVHlwZSgpKSB7IHJldHVybjsgfVxuXHRcblx0ICAgICAgICAgICAgICAgIGlmICgkJC5pc1N0ZXBUeXBlKGQpICYmICQkLmNvbmZpZy5saW5lX3N0ZXBfdHlwZSA9PT0gJ3N0ZXAtYWZ0ZXInICYmIGQzLm1vdXNlKHRoaXMpWzBdIDwgJCQueCgkJC5nZXRYVmFsdWUoZC5pZCwgaW5kZXgpKSkge1xuXHQgICAgICAgICAgICAgICAgICAgIGluZGV4IC09IDE7XG5cdCAgICAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgICAgLy8gU2hvdyB0b29sdGlwXG5cdCAgICAgICAgICAgICAgICBzZWxlY3RlZERhdGEgPSAkJC5maWx0ZXJUYXJnZXRzVG9TaG93KCQkLmRhdGEudGFyZ2V0cykubWFwKGZ1bmN0aW9uICh0KSB7XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQkLmFkZE5hbWUoJCQuZ2V0VmFsdWVPbkluZGV4KHQudmFsdWVzLCBpbmRleCkpO1xuXHQgICAgICAgICAgICAgICAgfSk7XG5cdFxuXHQgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy50b29sdGlwX2dyb3VwZWQpIHtcblx0ICAgICAgICAgICAgICAgICAgICAkJC5zaG93VG9vbHRpcChzZWxlY3RlZERhdGEsIHRoaXMpO1xuXHQgICAgICAgICAgICAgICAgICAgICQkLnNob3dYR3JpZEZvY3VzKHNlbGVjdGVkRGF0YSk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy50b29sdGlwX2dyb3VwZWQgJiYgKCFjb25maWcuZGF0YV9zZWxlY3Rpb25fZW5hYmxlZCB8fCBjb25maWcuZGF0YV9zZWxlY3Rpb25fZ3JvdXBlZCkpIHtcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm47XG5cdCAgICAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgICAgJCQubWFpbi5zZWxlY3RBbGwoJy4nICsgQ0xBU1Muc2hhcGUgKyAnLScgKyBpbmRleClcblx0ICAgICAgICAgICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGQzLnNlbGVjdCh0aGlzKS5jbGFzc2VkKENMQVNTLkVYUEFOREVELCB0cnVlKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9lbmFibGVkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmVudFJlY3Quc3R5bGUoJ2N1cnNvcicsIGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9ncm91cGVkID8gJ3BvaW50ZXInIDogbnVsbCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFjb25maWcudG9vbHRpcF9ncm91cGVkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC5oaWRlWEdyaWRGb2N1cygpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQuaGlkZVRvb2x0aXAoKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghY29uZmlnLmRhdGFfc2VsZWN0aW9uX2dyb3VwZWQpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC51bmV4cGFuZENpcmNsZXMoaW5kZXgpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQkLnVuZXhwYW5kQmFycyhpbmRleCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICB9KVxuXHQgICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQkLmlzV2l0aGluU2hhcGUodGhpcywgZCk7XG5cdCAgICAgICAgICAgICAgICAgICAgfSlcblx0ICAgICAgICAgICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAoZCkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFfc2VsZWN0aW9uX2VuYWJsZWQgJiYgKGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9ncm91cGVkIHx8IGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9pc3NlbGVjdGFibGUoZCkpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmVudFJlY3Quc3R5bGUoJ2N1cnNvcicsICdwb2ludGVyJyk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFjb25maWcudG9vbHRpcF9ncm91cGVkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC5zaG93VG9vbHRpcChbZF0sIHRoaXMpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQuc2hvd1hHcmlkRm9jdXMoW2RdKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcucG9pbnRfZm9jdXNfZXhwYW5kX2VuYWJsZWQpIHsgJCQuZXhwYW5kQ2lyY2xlcyhpbmRleCwgZC5pZCwgdHJ1ZSk7IH1cblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICQkLmV4cGFuZEJhcnMoaW5kZXgsIGQuaWQsIHRydWUpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgIH0pXG5cdCAgICAgICAgICAgIC5vbignY2xpY2snLCBmdW5jdGlvbiAoZCkge1xuXHQgICAgICAgICAgICAgICAgdmFyIGluZGV4ID0gZC5pbmRleDtcblx0ICAgICAgICAgICAgICAgIGlmICgkJC5oYXNBcmNUeXBlKCkgfHwgISQkLnRvZ2dsZVNoYXBlKSB7IHJldHVybjsgfVxuXHQgICAgICAgICAgICAgICAgaWYgKCQkLmNhbmNlbENsaWNrKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgJCQuY2FuY2VsQ2xpY2sgPSBmYWxzZTtcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm47XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBpZiAoJCQuaXNTdGVwVHlwZShkKSAmJiBjb25maWcubGluZV9zdGVwX3R5cGUgPT09ICdzdGVwLWFmdGVyJyAmJiBkMy5tb3VzZSh0aGlzKVswXSA8ICQkLngoJCQuZ2V0WFZhbHVlKGQuaWQsIGluZGV4KSkpIHtcblx0ICAgICAgICAgICAgICAgICAgICBpbmRleCAtPSAxO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgJCQubWFpbi5zZWxlY3RBbGwoJy4nICsgQ0xBU1Muc2hhcGUgKyAnLScgKyBpbmRleCkuZWFjaChmdW5jdGlvbiAoZCkge1xuXHQgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YV9zZWxlY3Rpb25fZ3JvdXBlZCB8fCAkJC5pc1dpdGhpblNoYXBlKHRoaXMsIGQpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICQkLnRvZ2dsZVNoYXBlKHRoaXMsIGQsIGluZGV4KTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgJCQuY29uZmlnLmRhdGFfb25jbGljay5jYWxsKCQkLmFwaSwgZCwgdGhpcyk7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgIH0pXG5cdCAgICAgICAgICAgIC5jYWxsKFxuXHQgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFfc2VsZWN0aW9uX2RyYWdnYWJsZSAmJiAkJC5kcmFnID8gKFxuXHQgICAgICAgICAgICAgICAgICAgIGQzLmJlaGF2aW9yLmRyYWcoKS5vcmlnaW4oT2JqZWN0KVxuXHQgICAgICAgICAgICAgICAgICAgICAgICAub24oJ2RyYWcnLCBmdW5jdGlvbiAoKSB7ICQkLmRyYWcoZDMubW91c2UodGhpcykpOyB9KVxuXHQgICAgICAgICAgICAgICAgICAgICAgICAub24oJ2RyYWdzdGFydCcsIGZ1bmN0aW9uICgpIHsgJCQuZHJhZ3N0YXJ0KGQzLm1vdXNlKHRoaXMpKTsgfSlcblx0ICAgICAgICAgICAgICAgICAgICAgICAgLm9uKCdkcmFnZW5kJywgZnVuY3Rpb24gKCkgeyAkJC5kcmFnZW5kKCk7IH0pXG5cdCAgICAgICAgICAgICAgICApIDogZnVuY3Rpb24gKCkge31cblx0ICAgICAgICAgICAgKTtcblx0ICAgIH07XG5cdFxuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2VuZXJhdGVFdmVudFJlY3RzRm9yTXVsdGlwbGVYcyA9IGZ1bmN0aW9uIChldmVudFJlY3RFbnRlcikge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsIGQzID0gJCQuZDMsIGNvbmZpZyA9ICQkLmNvbmZpZztcblx0XG5cdCAgICAgICAgZnVuY3Rpb24gbW91c2VvdXQoKSB7XG5cdCAgICAgICAgICAgICQkLnN2Zy5zZWxlY3QoJy4nICsgQ0xBU1MuZXZlbnRSZWN0KS5zdHlsZSgnY3Vyc29yJywgbnVsbCk7XG5cdCAgICAgICAgICAgICQkLmhpZGVYR3JpZEZvY3VzKCk7XG5cdCAgICAgICAgICAgICQkLmhpZGVUb29sdGlwKCk7XG5cdCAgICAgICAgICAgICQkLnVuZXhwYW5kQ2lyY2xlcygpO1xuXHQgICAgICAgICAgICAkJC51bmV4cGFuZEJhcnMoKTtcblx0ICAgICAgICB9XG5cdFxuXHQgICAgICAgIGV2ZW50UmVjdEVudGVyLmFwcGVuZCgncmVjdCcpXG5cdCAgICAgICAgICAgIC5hdHRyKCd4JywgMClcblx0ICAgICAgICAgICAgLmF0dHIoJ3knLCAwKVxuXHQgICAgICAgICAgICAuYXR0cignd2lkdGgnLCAkJC53aWR0aClcblx0ICAgICAgICAgICAgLmF0dHIoJ2hlaWdodCcsICQkLmhlaWdodClcblx0ICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgQ0xBU1MuZXZlbnRSZWN0KVxuXHQgICAgICAgICAgICAub24oJ21vdXNlb3V0JywgZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICAgICAgaWYgKCEkJC5jb25maWcpIHsgcmV0dXJuOyB9IC8vIGNoYXJ0IGlzIGRlc3Ryb3llZFxuXHQgICAgICAgICAgICAgICAgaWYgKCQkLmhhc0FyY1R5cGUoKSkgeyByZXR1cm47IH1cblx0ICAgICAgICAgICAgICAgIG1vdXNlb3V0KCk7XG5cdCAgICAgICAgICAgIH0pXG5cdCAgICAgICAgICAgIC5vbignbW91c2Vtb3ZlJywgZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICAgICAgdmFyIHRhcmdldHNUb1Nob3cgPSAkJC5maWx0ZXJUYXJnZXRzVG9TaG93KCQkLmRhdGEudGFyZ2V0cyk7XG5cdCAgICAgICAgICAgICAgICB2YXIgbW91c2UsIGNsb3Nlc3QsIHNhbWVYRGF0YSwgc2VsZWN0ZWREYXRhO1xuXHRcblx0ICAgICAgICAgICAgICAgIGlmICgkJC5kcmFnZ2luZykgeyByZXR1cm47IH0gLy8gZG8gbm90aGluZyB3aGVuIGRyYWdnaW5nXG5cdCAgICAgICAgICAgICAgICBpZiAoJCQuaGFzQXJjVHlwZSh0YXJnZXRzVG9TaG93KSkgeyByZXR1cm47IH1cblx0XG5cdCAgICAgICAgICAgICAgICBtb3VzZSA9IGQzLm1vdXNlKHRoaXMpO1xuXHQgICAgICAgICAgICAgICAgY2xvc2VzdCA9ICQkLmZpbmRDbG9zZXN0RnJvbVRhcmdldHModGFyZ2V0c1RvU2hvdywgbW91c2UpO1xuXHRcblx0ICAgICAgICAgICAgICAgIGlmICgkJC5tb3VzZW92ZXIgJiYgKCFjbG9zZXN0IHx8IGNsb3Nlc3QuaWQgIT09ICQkLm1vdXNlb3Zlci5pZCkpIHtcblx0ICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YV9vbm1vdXNlb3V0LmNhbGwoJCQuYXBpLCAkJC5tb3VzZW92ZXIpO1xuXHQgICAgICAgICAgICAgICAgICAgICQkLm1vdXNlb3ZlciA9IHVuZGVmaW5lZDtcblx0ICAgICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICAgICBpZiAoISBjbG9zZXN0KSB7XG5cdCAgICAgICAgICAgICAgICAgICAgbW91c2VvdXQoKTtcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm47XG5cdCAgICAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgICAgaWYgKCQkLmlzU2NhdHRlclR5cGUoY2xvc2VzdCkgfHwgIWNvbmZpZy50b29sdGlwX2dyb3VwZWQpIHtcblx0ICAgICAgICAgICAgICAgICAgICBzYW1lWERhdGEgPSBbY2xvc2VzdF07XG5cdCAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgICAgIHNhbWVYRGF0YSA9ICQkLmZpbHRlckJ5WCh0YXJnZXRzVG9TaG93LCBjbG9zZXN0LngpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICA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y5ldmVudFJlY3QpLnN0eWxlKCdjdXJzb3InLCAncG9pbnRlcicpO1xuXHQgICAgICAgICAgICAgICAgICAgIGlmICghJCQubW91c2VvdmVyKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhX29ubW91c2VvdmVyLmNhbGwoJCQuYXBpLCBjbG9zZXN0KTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgJCQubW91c2VvdmVyID0gY2xvc2VzdDtcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH0pXG5cdCAgICAgICAgICAgIC5vbignY2xpY2snLCBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgICAgICB2YXIgdGFyZ2V0c1RvU2hvdyA9ICQkLmZpbHRlclRhcmdldHNUb1Nob3coJCQuZGF0YS50YXJnZXRzKTtcblx0ICAgICAgICAgICAgICAgIHZhciBtb3VzZSwgY2xvc2VzdDtcblx0ICAgICAgICAgICAgICAgIGlmICgkJC5oYXNBcmNUeXBlKHRhcmdldHNUb1Nob3cpKSB7IHJldHVybjsgfVxuXHRcblx0ICAgICAgICAgICAgICAgIG1vdXNlID0gZDMubW91c2UodGhpcyk7XG5cdCAgICAgICAgICAgICAgICBjbG9zZXN0ID0gJCQuZmluZENsb3Nlc3RGcm9tVGFyZ2V0cyh0YXJnZXRzVG9TaG93LCBtb3VzZSk7XG5cdCAgICAgICAgICAgICAgICBpZiAoISBjbG9zZXN0KSB7IHJldHVybjsgfVxuXHQgICAgICAgICAgICAgICAgLy8gc2VsZWN0IGlmIHNlbGVjdGlvbiBlbmFibGVkXG5cdCAgICAgICAgICAgICAgICBpZiAoJCQuaXNCYXJUeXBlKGNsb3Nlc3QuaWQpIHx8ICQkLmRpc3QoY2xvc2VzdCwgbW91c2UpIDwgY29uZmlnLnBvaW50X3NlbnNpdGl2aXR5KSB7XG5cdCAgICAgICAgICAgICAgICAgICAgJCQubWFpbi5zZWxlY3RBbGwoJy4nICsgQ0xBU1Muc2hhcGVzICsgJCQuZ2V0VGFyZ2V0U2VsZWN0b3JTdWZmaXgoY2xvc2VzdC5pZCkpLnNlbGVjdEFsbCgnLicgKyBDTEFTUy5zaGFwZSArICctJyArIGNsb3Nlc3QuaW5kZXgpLmVhY2goZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFfc2VsZWN0aW9uX2dyb3VwZWQgfHwgJCQuaXNXaXRoaW5TaGFwZSh0aGlzLCBjbG9zZXN0KSkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQudG9nZ2xlU2hhcGUodGhpcywgY2xvc2VzdCwgY2xvc2VzdC5pbmRleCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC5jb25maWcuZGF0YV9vbmNsaWNrLmNhbGwoJCQuYXBpLCBjbG9zZXN0LCB0aGlzKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9KVxuXHQgICAgICAgICAgICAuY2FsbChcblx0ICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9kcmFnZ2FibGUgJiYgJCQuZHJhZyA/IChcblx0ICAgICAgICAgICAgICAgICAgICBkMy5iZWhhdmlvci5kcmFnKCkub3JpZ2luKE9iamVjdClcblx0ICAgICAgICAgICAgICAgICAgICAgICAgLm9uKCdkcmFnJywgZnVuY3Rpb24gKCkgeyAkJC5kcmFnKGQzLm1vdXNlKHRoaXMpKTsgfSlcblx0ICAgICAgICAgICAgICAgICAgICAgICAgLm9uKCdkcmFnc3RhcnQnLCBmdW5jdGlvbiAoKSB7ICQkLmRyYWdzdGFydChkMy5tb3VzZSh0aGlzKSk7IH0pXG5cdCAgICAgICAgICAgICAgICAgICAgICAgIC5vbignZHJhZ2VuZCcs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GRvZXMgbGluZSB1cFxuXHQgICAgICAgICAgICAgICAgICAgICAgICBpID0gLTE7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlcy5mb3JFYWNoKGZ1bmN0aW9uICh2LCBqKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodi54ID09PSBkLngpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gajtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIGlmIChpIGluIHZhbHVlcyAmJiB2YWx1ZXNbaV0udmFsdWUgKiBkLnZhbHVlID49IDApIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgb2Zmc2V0ICs9IHNjYWxlKHZhbHVlc1tpXS52YWx1ZSkgLSB5MDtcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICByZXR1cm4gb2Zmc2V0O1xuXHQgICAgICAgIH07XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uaXNXaXRoaW5TaGFwZSA9IGZ1bmN0aW9uICh0aGF0LCBkKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcyxcblx0ICAgICAgICAgICAgc2hhcGUgPSAkJC5kMy5zZWxlY3QodGhhdCksIGlzV2l0aGluO1xuXHQgICAgICAgIGlmICghJCQuaXNUYXJnZXRUb1Nob3coZC5pZCkpIHtcblx0ICAgICAgICAgICAgaXNXaXRoaW4gPSBmYWxzZTtcblx0ICAgICAgICB9XG5cdCAgICAgICAgZWxzZSBpZiAodGhhdC5ub2RlTmFtZSA9PT0gJ2NpcmNsZScpIHtcblx0ICAgICAgICAgICAgaXNXaXRoaW4gPSAkJC5pc1N0ZXBUeX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AgICAgICAgICAgIHBvaW50cztcblx0ICAgICAgICAgICAgICAgIGlmIChjb25maWcuYXhpc19yb3RhdGVkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgcG9pbnRzID0gW1t5KHlwKGopKSwgeCh4djApXSwgW3koeXAoaiArIGRpZmYpKSwgeCh4djEpXV07XG5cdCAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgICAgIHBvaW50cyA9IFtbeCh4djApLCB5KHlwKGopKV0sIFt4KHh2MSksIHkoeXAoaiArIGRpZmYpKV1dO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgcmV0dXJuIGdlbmVyYXRlTShwb2ludHMpO1xuXHQgICAgICAgICAgICB9O1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIHNXaXRoUmVnaW9uID0gZnVuY3Rpb24gKGQwLCBkMSwgaiwgZGlmZikge1xuXHQgICAgICAgICAgICAgICAgdmFyIHBvaW50cztcblx0ICAgICAgICAgICAgICAgIGlmIChjb25maWcuYXhpc19yb3RhdGVkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgcG9pbnRzID0gW1t5KHlwKGopLCB0cnVlKSwgeCh4cChqKSldLCBbeSh5cChqICsgZGlmZiksIHRydWUpLCB4KHhwKGogKyBkaWZmKSldXTtcblx0ICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICAgICAgcG9pbnRzID0gW1t4KHhwKGopLCB0cnVlKSwgeSh5cChqKSldLCBbeCh4cChqICsgZGlmZiksIHRydWUpLCB5KHlwKGogKyBkaWZmKSldXTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIHJldHVybiBnZW5lcmF0ZU0ocG9pbnRzKTtcblx0ICAgICAgICAgICAgfTtcblx0ICAgICAgICB9XG5cdFxuXHQgICAgICAgIC8vIEdlbmVyYXRlXG5cdCAgICAgICAgZm9yIChpID0gMDsg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JyArIHBvaW50c1sxXVtpbmRleFldICsgJyAnICtcblx0ICAgICAgICAgICAgICAgICAgICAnTCcgKyBwb2ludHNbMl1baW5kZXhYXSArICcsJyArIHBvaW50c1syXVtpbmRleFldICsgJyAnICtcblx0ICAgICAgICAgICAgICAgICAgICAnTCcgKyBwb2ludHNbM11baW5kZXhYXSArICcsJyArIHBvaW50c1szXVtpbmRleFldICsgJyAnICtcblx0ICAgICAgICAgICAgICAgICAgICAneic7XG5cdFxuXHQgICAgICAgICAgICByZXR1cm4gcGF0aDtcblx0ICAgICAgICB9O1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdlbmVyYXRlR2V0QmFyUG9pbnRzID0gZnVuY3Rpb24gKGJhckluZGljZXMsIGlzU3ViKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcyxcblx0ICAgICAgICAgICAgYXhpcyA9IGlzU3ViID8gJCQuc3ViWEF4aXMgOiAkJC54QXhpcyxcblx0ICAgICAgICAgICAgYmFyVGFyZ2V0c051bSA9IGJhckluZGljZXMuX19tYXhfXyArIDEsXG5cdCAgICAgICAgICAgIGJhclcgPSAkJC5nZXRCYXJXKGF4aXMsIGJhclRhcmdldHNOdW0pLFxuXHQgICAgICAgICAgICBiYXJYID0gJCQuZ2V0U2hhcGVYKGJhclcsIGJhclRhcmdldHNOdW0sIGJhckluZGljZXMsICEhaXNTdWIpLFxuXHQgICAgICAgICAgICBiYXJZID0gJCQuZ2V0U2hhcGVZKCEhaXNTdWIpLFxuXHQgICAgICAgICAgICBiYXJPZmZzZXQgPSAkJC5nZXRTaGFwZU9mZnNldCgkJC5pc0JhclR5cGUsIGJhckluZGljZXMsICEhaXNTdWIpLFxuXHQgICAgICAgICAgICB5U2NhbGUgPSBpc1N1YiA/ICQkLmdldFN1YllTY2FsZSA6ICQkLmdldFlTY2FsZTtcblx0ICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGkpIHtcblx0ICAgICAgICAgICAg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9zID0gNDtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH1cblx0ICAgICAgICByZXR1cm4geFBvcztcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRZRm9yVGV4dCA9IGZ1bmN0aW9uIChwb2ludHMsIGQsIHRleHRFbGVtZW50KSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcyxcblx0ICAgICAgICAgICAgYm94ID0gdGV4dEVsZW1lbnQuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCksXG5cdCAgICAgICAgICAgIHlQb3M7XG5cdCAgICAgICAgaWYgKCQkLmNvbmZpZy5heGlzX3JvdGF0ZWQpIHtcblx0ICAgICAgICAgICAgeVBvcyA9IChwb2ludHNbMF1bMF0gKyBwb2ludHNbMl1bMF0gKyBib3guaGVpZ2h0ICogMC42KSAvIDI7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgeVBvcyA9IHBvaW50c1syXVsxXTtcblx0ICAgICAgICAgICAgaWYgKGQudmFsdWUgPCAwICB8fCAoZC52YWx1ZSA9PT0gMCAmJiAhJCQuaGFzUG9zaXRpdmVWYWx1ZSkpIHtcblx0ICAgICAgICAgICAgICAgIHlQb3MgKz0gYm94LmhlaWdodDtcblx0ICAgICAgICAgICAgICAgIGlmICgkJC5pc0JhclR5cGUoZCkgJiYgJCQuaXNTYWZhcmkoKSkge1xuXHQgICAgICAgICAgICAgICAgICAgIHlQb3MgLT0gMztcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIGVsc2UgaWYgKCEkJC5pc0JhclR5cGUoZCkgJiYgJCQuaXNDaHJvbWUoKSkge1xuXHQgICAgICAgICAgICAgICAgICAgIHlQb3MgKz0gMztcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIHlQb3MgKz0gJCQuaXNCYXJUeXBlKGQpID8gLTMgOiAtN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LnlncmlkTGluZXMuc2VsZWN0KCdsaW5lJylcblx0ICAgICAgICAgIC50cmFuc2l0aW9uKCkuZHVyYXRpb24oZHVyYXRpb24pXG5cdCAgICAgICAgICAgIC5hdHRyKFwieDFcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/IHl2IDogMClcblx0ICAgICAgICAgICAgLmF0dHIoXCJ4MlwiLCBjb25maWcuYXhpc19yb3RhdGVkID8geXYgOiAkJC53aWR0aClcblx0ICAgICAgICAgICAgLmF0dHIoXCJ5MVwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gMCA6IHl2KVxuXHQgICAgICAgICAgICAuYXR0cihcInkyXCIsIGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAkJC5oZWlnaHQgOiB5dilcblx0ICAgICAgICAgICAgLnN0eWxlKFwib3BhY2l0eVwiLCAxKTtcblx0ICAgICAgICAkJC55Z3JpZExpbmVzLnNlbGVjdCgndGV4dCcpXG5cdCAgICAgICAgICAudHJhbnNpdGlvbigpLmR1cmF0aW9uKGR1cmF0aW9uKVxuXHQgICAgICAgICAgICAuYXR0cihcInhcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/ICQkLnhHcmlkVGV4dFguYmluZCgkJCkgOiAkJC55R3JpZFRleHRYLmJpbmQoJCQpKVxuXHQgICAgICAgICAgICAuYXR0cihcInlcIiwgeXYpXG5cdCAgICAgICAgICAgIC50ZXh0KGZ1bmN0aW9uIChkKSB7IHJldHVybiBkLnRleHQ7IH0pXG5cdCAgICAgICAgICAgIC5zdHlsZShcIm9wYWNpdHlcIiwgMSk7XG5cdCAgICAgICAgLy8gZXhpdFxuXHQgICAgICAgICQkLnlncmlkTGluZXMuZXhpdCgpLnRyYW5zaXRpb24oKS5kdXJhdGlvbihkdXJhdGlvbilcblx0ICAgICAgICAgICAgLnN0eWxlKFwib3BhY2l0eVwiLCAwKVxuXHQgICAgICAgICAgICAucmVtb3ZlKCk7XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4ucmVkcmF3R3JpZCA9IGZ1bmN0aW9uICh3aXRoVHJhbnNpdGlvbikge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZywgeHYgPSAkJC54di5iaW5kKCQkKSxcblx0ICAgICAgICAgICAgbGluZXMgPSAkJC54Z3JpZExpbmVzLnNlbGVjdCgnbGluZScpLFxuXHQgICAgICAgICAgICB0ZXh0cyA9ICQkLnhncmlkTGluZXMuc2VsZWN0KCd0ZXh0Jyk7XG5cdCAgICAgICAgcmV0dXJuIFtcblx0ICAgICAgICAgICAgKHdpdGhUcmFuc2l0aW9uID8gbGluZXMudHJhbnNpdGlvbigpIDogbGluZXMpXG5cdCAgICAgICAgICAgICAgICAuYXR0cihcIngxXCIsIGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAwIDogeHYpXG5cdCAgICAgICAgICAgICAgICAuYXR0cihcIngyXCIsIGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAkJC53aWR0aCA6IHh2KVxuXHQgICAgICAgICAgICAgICAgLmF0dHIoXCJ5MVwiLCBjb25maWcuYXhpc19yb3RhdGVkID8geHYgOiAwKVxuXHQgICAgICAgICAgICAgICAgLmF0dHIoXCJ5MlwiLCBjb25maWcuYXhpc19yb3RhdGVkID8geHYgOiAkJC5oZWlnaHQpXG5cdCAgICAgICAgICAgICAgICAuc3R5bGUoXCJvcGFjaXR5XCIsIDEpLFxuXHQgICAgICAgICAgICAod2l0aFRyYW5zaXRpb24gPyB0ZXh0cy50cmFuc2l0aW9uKCkgOiB0ZXh0cylcblx0ICAgICAgICAgICAgICAgIC5hdHRyKFwieFwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gJCQueUdyaWRUZXh0WC5iaW5kKCQkKSA6ICQkLnhHcmlkVGV4dFguYmluZCgkJCkpXG5cdCAgICAgICAgICAgICAgICAuYXR0cihcInlcIiwgeHYpXG5cdCAgICAgICAgICAgICAgICAudGV4dChmdW5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iICsgQ0xBU1MuYXhpc1gpLnNlbGVjdEFsbCgnLnRpY2snKS5zaXplKCk7XG5cdCAgICAgICAgaWYgKHR5cGUgPT09ICd5ZWFyJykge1xuXHQgICAgICAgICAgICB4RG9tYWluID0gJCQuZ2V0WERvbWFpbigpO1xuXHQgICAgICAgICAgICBmaXJzdFllYXIgPSB4RG9tYWluWzBdLmdldEZ1bGxZZWFyKCk7XG5cdCAgICAgICAgICAgIGxhc3RZZWFyID0geERvbWFpblsxXS5nZXRGdWxsWWVhcigpO1xuXHQgICAgICAgICAgICBmb3IgKGkgPSBmaXJzdFllYXI7IGkgPD0gbGFzdFllYXI7IGkrKykge1xuXHQgICAgICAgICAgICAgICAgZ3JpZERhdGEucHVzaChuZXcgRGF0ZShpICsgJy0wMS0wMSAwMDowMDowMCcpKTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIGdyaWREYXRhID0gc2NhbGUudGlja3MoMTApO1xuXHQgICAgICAgICAgICBpZiAoZ3JpZERhdGEubGVuZ3RoID4gdGlja051bSkgeyAvLyB1c2Ugb25seSBpbnRcblx0ICAgICAgICAgICAgICAgIGdyaWREYXRhID0gZ3JpZERhdGEuZmlsdGVyKGZ1bmN0aW9uIChkKSB7IHJldHVybiAoXCJcIiArIGQpLmluZGV4T2YoJy4nKSA8IDA7IH0pO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHJldHVybiBncmlkRGF0YTtcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRHcmlkRmlsdGVyVG9SZW1vdmUgPSBmdW5jdGlvbiAocGFyYW1zKSB7XG5cdCAgICAgICAgcmV0dXJuIHBhcmFtcyA/IGZ1bmN0aW9uIChsaW5lKSB7XG5cdCAgICAgICAgICAgIHZhciBmb3VuZCA9IGZhbHNlO1xuXHQgICAgICAgICAgICBbXS5jb25jYXQocGFyYW1zKS5mb3J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RyaW5nKGNvbmZpZy50b29sdGlwX2luaXRfeCkpIHtcblx0ICAgICAgICAgICAgICAgIGNvbmZpZy50b29sdGlwX2luaXRfeCA9ICQkLnBhcnNlRGF0ZShjb25maWcudG9vbHRpcF9pbml0X3gpO1xuXHQgICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8ICQkLmRhdGEudGFyZ2V0c1swXS52YWx1ZXMubGVuZ3RoOyBpKyspIHtcblx0ICAgICAgICAgICAgICAgICAgICBpZiAoKCQkLmRhdGEudGFyZ2V0c1swXS52YWx1ZXNbaV0ueCAtIGNvbmZpZy50b29sdGlwX2luaXRfeCkgPT09IDApIHsgYnJlYWs7IH1cblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIGNvbmZpZy50b29sdGlwX2luaXRfeCA9IGk7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgJCQudG9vbHRpcC5odG1sKGNvbmZpZy50b29sdGlwX2NvbnRlbnRzLmNhbGwoJCQsICQkLmRhdGEudGFyZ2V0cy5tYXAoZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiAkJC5hZGROYW1lKGQudmFsdWVzW2NvbmZpZy50b29sdGlwX2luaXRfeF0pO1xuXHQgICAgICAgICAgICB9KSwgJCQuYXhpcy5nZXRYQXhpc1RpY2tGb3JtYXQoKSwgJCQuZ2V0WUZvcm1hdCgkJC5oYXNBcmNUeXBlKCkpLCAkJC5jb2xvcikpO1xuXHQgICAgICAgICAgICAkJC50b29sdGlwLnN0eWxlKFwidG9wXCIsIGNvbmZpZy50b29sdGlwX2luaXRfcG9zaXRpb24udG9wKVxuXHQgICAgICAgICAgICAgICAgLnN0eWxlKFwibGVmdFwiLCBjb25maWcudG9vbHRpcF9pbml0X3Bvc2l0aW9uLmxlZnQpXG5cdCAgICAgICAgICAgICAgICAuc3R5bGUoXCJkaXNwbGF5XCIsIFwiYmxvY2tcIik7XG5cdCAgICAgICAgfVxuX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oXG5cdCAgICAgICAgICAgIGZ1bmN0aW9uIHVwZGF0ZVZhbHVlcyhpZCwgd2l0aG91dFN0ZXApIHtcblx0ICAgICAgICAgICAgICAgIGlmICghd2l0aG91dFN0ZXApIHtcblx0ICAgICAgICAgICAgICAgICAgICBtYXJnaW4gPSAoYXJlYUxlbmd0aCAtIHRvdGFsTGVuZ3RoIC0gaXRlbUxlbmd0aCkgLyAyO1xuXHQgICAgICAgICAgICAgICAgICAgIGlmIChtYXJnaW4gPCBwb3NNaW4pIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luID0gKGFyZWFMZW5ndGggLSBpdGVtTGVuZ3RoKSAvIDI7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHRvdGFsTGVuZ3RoID0gMDtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgc3RlcCsrO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIHN0ZXBzW2lkXSA9IHN0ZXA7XG5cdCAgICAgICAgICAgICAgICBtYXJnaW5zW3N0ZXBdID0gJCQuaXNMZWdlbmRJbnNldCA/IDEwIDogbWFyZ2luO1xuXHQgICAgICAgICAgICAgICAgb2Zmc2V0c1tpZF0gPSB0b3RhbExlbmd0aDtcblx0ICAgICAgICAgICAgICAgIHRvdGFsTGVuZ3RoICs9IGl0ZW1MZW5ndGg7XG5cdCAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgIGlmIChyZXNldCkge1xuXHQgICAgICAgICAgICAgICAgdG90YWxMZW5ndGggPSAwO1xuXHQgICAgICAgICAgICAgICAgc3RlcCA9IDA7XG5cdCAgICAgICAgICAgICAgICBtYXhXaWR0aCA9IDA7XG5cdCAgICAgICAgICAgICAgICBtYXhIZWlnaHQgPSAwO1xuXHQgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICBpZiAoY29uZmlnLmxlZ2VuZF9zaG93ICYmICEkJC5pc0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aS5oaWRlKCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICQkLmFwaS5zaG93KGlkKTtcblx0ICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAkJC5hcGkudG9nZ2xlKGlkKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgJCQuaXNUYXJnZXRUb1Nob3coaWQpID8gJCQuYXBpLmZvY3VzKGlkKSA6ICQkLmFwaS5yZXZlcnQoKTtcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH0pXG5cdCAgICAgICAgICAgIC5vbignbW91c2VvdmVyJywgZnVuY3Rpb24gKGlkKSB7XG5cdCAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmxlZ2VuZF9pdGVtX29ubW91c2VvdmVyKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgY29uZmlnLmxlZ2VuZF9pdGVtX29ubW91c2VvdmVyLmNhbGwoJCQsIGlkKTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgICAgICQkLmQzLnNlbGVjdCh0aGlzKS5jbGFzc2VkKENMQVNTLmxlZ2VuZEl0ZW1Gb2N1c2VkLCB0cnVlKTtcblx0ICAgICAgICAgICAgICAgICAgICBpZiAoISQkLnRyYW5zaXRpbmcgJiYgJCQuaXNUYXJnZXRUb1Nob3coaWQpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICQkLmFwaS5mb2N1cyhpZCk7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9KVxuXHQgICAgICAgICAgICAub24oJ21vdXNlb3V0JywgZnVuY3Rpb24gKGlkKSB7XG5cdCAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmxlZ2VuZF9pdGVtX29ubW91c2VvdXQpIHtc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cHRpb25CeUF4aXNJZChheGlzSWQpO1xuXHQgICAgICAgIHJldHVybiBpc1N0cmluZyhvcHRpb24pID8gb3B0aW9uIDogb3B0aW9uID8gb3B0aW9uLnRleHQgOiBudWxsO1xuXHQgICAgfTtcblx0ICAgIEF4aXMucHJvdG90eXBlLnNldExhYmVsVGV4dCA9IGZ1bmN0aW9uIHNldExhYmVsVGV4dChheGlzSWQsIHRleHQpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLm93bmVyLCBjb25maWcgPSAkJC5jb25maWcsXG5cdCAgICAgICAgICAgIG9wdGlvbiA9IHRoaXMuZ2V0TGFiZWxPcHRpb25CeUF4aXNJZChheGlzSWQpO1xuXHQgICAgICAgIGlmIChpc1N0cmluZyhvcHRpb24pKSB7XG5cdCAgICAgICAgICAgIGlmIChheGlzSWQgPT09ICd5Jykge1xuXHQgICAgICAgICAgICAgICAgY29uZmlnLmF4aXNfeV9sYWJlbCA9IHRleHQ7XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAoYXhpc0lkID09PSAneTInKSB7XG5cdCAgICAgICAgICAgICAgICBjb25maWcuYXhpc195Ml9sYWJlbCA9IHRleHQ7XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAoYXhpc0lkID09PSAneCcpIHtcblx0ICAgICAgICAgICAgICAgIGNvbmZpZy5heGlzX3hfbGFiZWwgPSB0ZXh0O1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfSBlbHNlIGlmIChvcHRpb24pIHtcblx0ICAgICAgICAgICAgb3B0aW9uLnRleHQgPSB0ZXh0O1xuXHQgICAgICAgIH1cblx0ICAgIH07XG5cdCAgICBBeGlzLnByb3RvdHlwZS5nZXRMYWJlbFBvc2l0aW9uID0gZnVuY3Rpb24gZ2V0TGFiZWxQb3NpdGlvbihheGlzSWQsIGRlZmF1bHRQb3NpdGlvbikge1xuXHQgICAgICAgIHZhciBvcHRpb24gPSB0aGlzLmdldExhYmVsT3B0aW9uQnlBeGlzSWQoYXhpc0lkKSxcblx0ICAgICAgICAgICAgcG9zaXRpb24gPSAob3B0aW9uICYmIHR5cGVvZiBvcHRpb24gPT09ICdvYmplY3QnICYmIG9wdGlvbi5wb3NpdGlvbikgPyBvcHRpb24ucG9zaXRpb24gOiBkZWZhdWx0UG9zaXRpb247XG5cdCAgICAgICAgcmV0dXJuIHtcblx0ICAgICAgICAgICAgaXNJbm5lcjogcG9zaXRpb24uaW5kZXhPZignaW5uZXInKSA+PSAwLFxuXHQgICAgICAgICAgICBpc091dGVyOiBwb3NpdGlvbi5pbmRleE9mKCdvdXRlcicpID49IDAsXG5cdCAgICAgICAgICAgIGlzTGVmdDogcG9zaXRpb24uaW5kZXhPZignbGVmdCcpID49IDAsXG5cdCAgICAgICAgICAgIGlzQ2VudGVyOiBwb3NpdGlvbi5pbmRleE9mKCdjZW50ZXInKSA+PSAwLFxuXHQgICAgICAgICAgICBpc1JpZ2h0OiBwb3NpdGlvbi5pbmRleE9mKCdyaWdodCcpID49IDAsXG5cdCAgICAgICAgICAgIGlzVG9wOiBwb3NpdGlvbi5pbmRleE9mKCd0b3AnKSA+PSAwLFxuXHQgICAgICAgICAgICBpc01pZGRsZTogcG9zaXRpb24uaW5kZXhPZignbWlkZGxlJykgPj0gMCxcblx0ICAgICAgICAgICAgaXNCb3R0b206IHBvc2l0aW9uLmluZGV4T2YoJ2JvdHRvbScpID49IDBcblx0ICAgICAgICB9O1xuXHQgICAgfTtcblx0ICAgIEF4aXMucHJvdG90eXBlLmdldFhBeGlzTGFiZWxQb3NpdGlvbiA9IGZ1bmN0aW9uIGdldFhBeGlzTGFiZWxQb3NpdGlvbigpIHtcblx0ICAgICAgICByZXR1cm4gdGhpcy5nZXRMYWJlbFBvc2l0aW9uKCd4JywgdGhpcy5vd25lci5jb25maWcuYXhpc19yb3RhdGVkID8gJ2lubmVyLXRvcCcgOiAnaW5uZXItcmlnaHQnKTtcblx0ICAgIH07XG5cdCAgICBBeGlzLnByb3RvdHlwZS5nZXR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k7XG5cdCAgICAgICAgICAgIHJldHVybjtcblx0ICAgICAgICB9XG5cdFxuXHQgICAgICAgIHRhcmdldElkcyA9ICQkLm1hcFRvVGFyZ2V0SWRzKHRhcmdldElkcyk7XG5cdFxuXHQgICAgICAgICQkLnN2Zy5zZWxlY3RBbGwoJCQuc2VsZWN0b3JUYXJnZXRzKHRhcmdldElkcywgJy4nICsgQ0xBU1MuY2hhcnRBcmMpKS5lYWNoKGZ1bmN0aW9uIChkKSB7XG5cdCAgICAgICAgICAgIGlmICghICQkLnNob3VsZEV4cGFuZChkLmRhdGEuaWQpKSB7IHJldHVybjsgfVxuXHQgICAgICAgICAgICAkJC5kMy5zZWxlY3QodGhpcykuc2VsZWN0QWxsKCdwYXRoJylcblx0ICAgICAgICAgICAgICAgIC50cmFuc2l0aW9uKCkuZHVyYXRpb24oJCQuZXhwYW5kRHVyYXRpb24oZC5kYXRhLmlkKSlcblx0ICAgICAgICAgICAgICAgIC5hdHRyKFwiZFwiLCAkJC5zdmdBcmNFeHBhbmRlZClcblx0ICAgICAgICAgICAgICAgIC50cmFuc2l0aW9uKCkuZHVyYXRpb24oJCQuZXhwYW5kRHVyYXRpb24oZC5kYXRhLmlkKSAqIDIpXG5cdCAgICAgICAgICAgICAgICAuYXR0cihcImRcIiwgJCQuc3ZnQXJjRXhwYW5kZWRTdWIpXG5cdCAgICAgICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAoZCkge1xuXHQgICAgICAgICAgICAgICAgICAgIGlmICgkJC5pc0RvbnV0VHlwZShkLmRhdGEpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNhbGxiYWNrIGhlcmVcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICB9KTtcblx0ICAgIH07XG5cdFxuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4udW5leHBhbmRBcmMgPSBmdW5jdGlvbiAodGFyZ2V0SWRzKSB7XG5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CAgICAgICAgICAgIHJldHVybiBjb25maWcucGllX2V4cGFuZF9kdXJhdGlvbjtcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4gNTA7XG5cdCAgICAgICAgfVxuXHRcblx0ICAgIH07XG5cdFxuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uc2hvdWxkRXhwYW5kID0gZnVuY3Rpb24gKGlkKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnO1xuXHQgICAgICAgIHJldHVybiAoJCQuaXNEb251dFR5cGUoaWQpICYmIGNvbmZpZy5kb251dF9leHBhbmQpIHx8XG5cdCAgICAgICAgICAgICAgICgkJC5pc0dhdWdlVHlwZShpZCkgJiYgY29uZmlnLmdhdWdlX2V4cGFuZCkgfHxcblx0ICAgICAgICAgICAgICAgKCQkLmlzUGllVHlwZShpZCkgJiYgY29uZmlnLnBpZV9leHBhbmQpO1xuXHQgICAgfTtcblx0XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5zaG91bGRTaG93QXJjTGFiZWwgPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLCBzaG91bGRTaG93ID0gdHJ1ZTtcblx0ICAgICAgICBpZiAoJCQuaGFzVHlwZSgnZG9udXQnKSkge1xuXHQgICAgICAgICAgICBzaG91bGRTaG93ID0gY29uZmlnLmRvbnV0X2xhYmVsX3Nob3c7XG5cdCAgICAgICAgfSBlbHNlIGlmICgkJC5oYXNUeXBlKCdwaWUnKSkge1xuXHQgICAgICAgICAgICBzaG91bGRTaG93ID0gY29uZmlnLnBpZV9sYWJlbF9zaG93O1xuXHQgICAgICAgIH1cblx0ICAgICAgICAvLyB3aGVuIGdhdWdlLCBhbHdheXMgdHJ1ZVxuXHQgICAgICAgIHJldHVybiBzaG91bGRTaG93O1xuXHQgICAgfTtcblx0XG5cdCAgICBjM19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0ZWQuZGF0YS5pZCwgdHJ1ZSk7XG5cdCAgICAgICAgICAgICAgICAgICAgJCQuY29uZmlnLmRhdGFfb25tb3VzZW92ZXIoYXJjRGF0YSwgdGhpcyk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH0gOiBudWxsKVxuXHQgICAgICAgICAgICAub24oJ21vdXNlbW92ZScsIGNvbmZpZy5pbnRlcmFjdGlvbl9lbmFibGVkID8gZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgIHZhciB1cGRhdGVkID0gJCQudXBkYXRlQW5nbGUoZCksIGFyY0RhdGEsIHNlbGVjdGVkRGF0YTtcblx0ICAgICAgICAgICAgICAgIGlmICh1cGRhdGVkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgYXJjRGF0YSA9ICQkLmNvbnZlcnRUb0FyY0RhdGEodXBkYXRlZCksXG5cdCAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWREYXRhID0gW2FyY0RhdGFdO1xuXHQgICAgICAgICAgICAgICAgICAgICQkLnNob3dUb29sdGlwKHNlbGVjdGVkRGF0YSwgdGhpcyk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH0gOiBudWxsKVxuXHQgICAgICAgICAgICAub24oJ21vdXNlb3V0JywgY29uZmlnLmludGVyYWN0aW9uX2VuYWJsZWQgPyBmdW5jdGlvbiAoZCkge1xuXHQgICAgICAgICAgICAgICAgdmFyIHVwZGF0ZWQsIGFyY0RhdGE7XG5cdCAgICAgICAgICAgICAgICBpZiAoJCQudHJhbnNpdGluZykgeyAvLyBza2lwIHdoaWxlIHRyYW5zaXRpbmdcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm47XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICB1cGRhdGVkID0gJCQudXBkYXRlQW5nbGUoZCk7XG5cdCAgICAgICAgICAgICAgICBpZiAodXBkYXRlZCkge1xuXHQgICAgICAgICAgICAgICAgICAgIGFyY0RhdGEgPSAkJC5jb252ZXJ0VG9BcmNEYXRhKHVwZGF0ZWQpO1xuXHQgICAgICAgICAgICAgICAgICAgIC8vIHRyYW5zaXRpb25zXG5cdCAgICAgICAgICAgICAgICAgICAgJCQudW5leHBhbmRBcmModXBkYXRlZC5kYXRhLmlkKTtcblx0ICAgICAgICAgICAgICAgICAgICAkJC5hcGkucmV2ZXJ0KCk7XG5cdCAgICAgICAgICAgICAgICAgICAgJCQucmV2ZXJ0TGVnZW5kKCk7XG5cdCAgICAgICAgICAgICAgICAgICAgJCQuaGlkZVRvb2x0aXAoKTtcblx0ICAgICAgICAgICAgICAgICAgICAkJC5jb25maWcuZGF0YV9vbm1vdXNlb3V0KGFyY0RhdGEsIHRoaXMpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9IDogbnVsbClcblx0ICAgICAgICAgICAgLm9uKCdjbGljaycsIGNvbmZpZy5pbnRlcmFjdGlvbl9lbmFibGVkID8gZnVuY3Rpb24gKGQsIGkpIHtcblx0ICAgICAgICAgICAgICAgIHZhciB1cGRhdGVkID0gJCQudXBkYXRlQW5nbGUoZCksIGFyY0RhdGE7XG5cdCAgICAgICAgICAgICAgICBpZiAodXBkYXRlZCkge1xuXHQgICAgICAgICAgICAgICAgICAgIGFyY0RhdGEgPSAkJC5jb252ZXJ0VG9BcmNEYXRhKHVwZGF0ZWQpO1xuXHQgICAgICAgICAgICAgICAgICAgIGlmICgkJC50b2dnbGVTaGFwZSkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAkJC50b2dnbGVTaGFwZSh0aGlzLCBhcmNEYXRhLCBpKTtcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgJCQuY29uZmlnLmRhdGFfb25jbGljay5jYWxsKCQkLmFwaSwgYXJjRGF0YSwgdGhpcyk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH0gOiBudWxsKVxuXHQgICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAoKSB7ICQkLnRyYW5zaXRpbmcgPSB0cnVlOyB9KVxuXHQgICAgICAgICAgICAudHJhbnNpdGlvbigpLmR1cmF0aW9uKGR1cmF0aW9uKVxuXHQgICAgICAgICAgICAuYXR0clR3ZWVuKFwiZFwiLCBmdW5jdGlvbiAoZCkge1xuXHQgICAgICAgICAgICAgICAgdmFyIHVwZGF0ZWQgPSAkJC51cGRhdGVBbmdsZShkKSwgaW50ZXJwb2xhdGU7XG5cdCAgICAgICAgICAgICAgICBpZiAoISB1cGRhdGVkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uICgpIHsgcmV0dXJuIFwiTSAwIDBcIjsgfTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50ID09PSBkKSB7XG5cdCAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudCA9IHtcblx0ICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRBbmdsZTogTWF0aC5QSSoyLFxuXHQgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICAgICBlbmRBbmdsZTogTWF0aC5QSSoyLFxuXHQgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgIH07XG5cdCAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBpZiAoaXNOYU4odGhpcy5fY3VycmVudC5zdGFydEFuZ2xlKSkge1xuXHQgICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnQuc3RhcnRBbmdsZSA9IDA7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBpZiAoaXNOYU4odGhpcy5fY3VycmVudC5lbmRBbmdsZSkpIHtcblx0ICAgICA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SAmJiAkJC5pc0FyY1R5cGUoZC5kYXRhKSA/IDEgOiAwOyB9KTtcblx0ICAgICAgICBtYWluLnNlbGVjdCgnLicgKyBDTEFTUy5jaGFydEFyY3NUaXRsZSlcblx0ICAgICAgICAgICAgLnN0eWxlKFwib3BhY2l0eVwiLCAkJC5oYXNUeXBlKCdkb251dCcpIHx8ICQkLmhhc1R5cGUoJ2dhdWdlJykgPyAxIDogMCk7XG5cdFxuXHQgICAgICAgIGlmICgkJC5oYXNUeXBlKCdnYXVnZScpKSB7XG5cdCAgICAgICAgICAgICQkLmFyY3Muc2VsZWN0KCcuJyArIENMQVNTLmNoYXJ0QXJjc0JhY2tncm91bmQpXG5cdCAgICAgICAgICAgICAgICAuYXR0cihcImRcIiwgZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICAgICAgICAgIHZhciBkID0ge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiBbe3ZhbHVlOiBjb25maWcuZ2F1Z2VfbWF4fV0sXG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0QW5nbGU6IGNvbmZpZy5nYXVnZV9zdGFydGluZ0FuZ2xlLFxuXHQgICAgICAgICAgICAgICAgICAgICAgICBlbmRBbmdsZTogLTEgKiBjb25maWcuZ2F1Z2Vfc3RhcnRpbmdBbmdsZVxuXHQgICAgICAgICAgICAgICAgICAgIH07XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQkLmdldEFyYyhkLCB0cnVlLCB0cnVlKTtcblx0ICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICAkJC5hcmNzLnNlbGVjdCgnLicgKyBDTEFTUy5jaGFydEFyY3NHYXVnZVVuaXQpXG5cdCAgICAgICAgICAgICAgICAuYXR0cihcImR5XCIsIFwiLjc1ZW1cIilcblx0ICAgICAgICAgICAgICAgIC50ZXh0KGNvbmZpZy5nYXVnZV9sYWJlbF9zaG93ID8gY29uZmlnLmdhdWdlX3VuaXRzIDogJycpO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jbHVkZWQgPSBzaGFwZS5jbGFzc2VkKENMQVNTLklOQ0xVREVEKSxcblx0ICAgICAgICAgICAgICAgICAgICBfeCwgX3ksIF93LCBfaCwgdG9nZ2xlLCBpc1dpdGhpbiA9IGZhbHNlLCBib3g7XG5cdCAgICAgICAgICAgICAgICBpZiAoc2hhcGUuY2xhc3NlZChDTEFTUy5jaXJjbGUpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgX3ggPSBzaGFwZS5hdHRyKFwiY3hcIikgKiAxO1xuXHQgICAgICAgICAgICAgICAgICAgIF95ID0gc2hhcGUuYXR0cihcImN5XCIpICogMTtcblx0ICAgICAgICAgICAgICAgICAgICB0b2dnbGUgPSAkJC50b2dnbGVQb2ludDtcblx0ICAgICAgICAgICAgICAgICAgICBpc1dpdGhpbiA9IG1pblggPCBfeCAmJiBfeCA8IG1heFggJiYgbWluWSA8IF95ICYmIF95IDwgbWF4WTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIGVsc2UgaWYgKHNoYXBlLmNsYXNzZWQoQ0xBU1MuYmFyKSkge1xuXHQgICAgICAgICAgICAgICAgICAgIGJveCA9IGdldFBhdGhCb3godGhpcyk7XG5cdCAgICAgICAgICAgICAgICAgICAgX3ggPSBib3gueDtcblx0ICAgICAgICAgICAgICAgICAgICBfeSA9IGJveC55O1xuXHQgICAgICAgICAgICAgICAgICAgIF93ID0gYm94LndpZHRoO1xuXHQgICAgICAgICAgICAgICAgICAgIF9oID0gYm94LmhlaWdodDtcblx0ICAgICAgICAgICAgICAgICAgICB0b2dnbGUgPSAkJC50b2dnbGVQYXRoO1xuXHQgICAgICAgICAgICAgICAgICAgIGlzV2l0aGluID0gIShtYXhYIDwgX3ggfHwgX3ggKyBfdyA8IG1pblgpICYmICEobWF4WSA8IF95IHx8IF95ICsgX2ggPCBtaW5ZKTtcblx0ICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICAgICAgLy8gbGluZ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QmFyKTtcblx0ICAgICAgICAgICAgY29udGV4dEJhckVudGVyID0gY29udGV4dEJhclVwZGF0ZS5lbnRlcigpLmFwcGVuZCgnZycpXG5cdCAgICAgICAgICAgICAgICAuc3R5bGUoJ29wYWNpdHknLCAwKVxuXHQgICAgICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgY2xhc3NDaGFydEJhcik7XG5cdCAgICAgICAgICAgIC8vIEJhcnMgZm9yIGVhY2ggZGF0YVxuXHQgICAgICAgICAgICBjb250ZXh0QmFyRW50ZXIuYXBwZW5kKCdnJylcblx0ICAgICAgICAgICAgICAgIC5hdHRyKFwiY2xhc3NcIiwgY2xhc3NCYXJzKTtcblx0XG5cdCAgICAgICAgICAgIC8vLS0gTGluZSAtLS8vXG5cdCAgICAgICAgICAgIGNvbnRleHRMaW5lVXBkYXRlID0gY29udGV4dC5zZWxlY3QoJy4nICsgQ0xBU1MuY2hhcnRMaW5lcykuc2VsZWN0QWxsKCcuJyArIENMQVNTLmNoYXJ0TGluZSlcblx0ICAgICAgICAgICAgICAgIC5kYXRhKHRhcmdldHMpXG5cdCAgICAgICAgICAgICAgICAuYXR0cignY2xhc3MnLCBjbGFzc0NoYXJ0TGluZSk7XG5cdCAgICAgICAgICAgIGNvbnRleHRMaW5lRW50ZXIgPSBjb250ZXh0TGluZVVwZGF0ZS5lbnRlcigpLmFwcGVuZCgnZycpXG5cdCAgICAgICAgICAgICAgICAuc3R5bGUoJ29wYWNpdHknLCAwKVxuXHQgICAgICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgY2xhc3NDaGFydExpbmUpO1xuXHQgICAgICAgICAgICAvLyBMaW5lcyBmb3IgZWFjaCBkYXRhXG5cdCAgICAgICAgICAgIGNvbnRleHRMaW5lRW50ZXIuYXBwZW5kKFwiZ1wiKVxuXHQgICAgICAgICAgICAgICAgLmF0dHIoXCJjbGFzc1wiLCBjbGFzc0xpbmVzKTtcblx0ICAgICAgICAgICAgLy8gQXJlYVxuXHQgICAgIC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cblx0ICAgICAgICAgICAgICAgICAgICAkJC5icnVzaC5leHRlbnQoJCQueC5vcmdEb21haW4oKSkudXBkYXRlKCk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAvLyBzZXR1cCBkcmF3ZXIgLSBNRU1POiB0aGlzIG11c3QgYmUgY2FsbGVkIGFmdGVyIGF4aXMgdXBkYXRlZFxuXHQgICAgICAgICAgICAgICAgZHJhd0FyZWFPblN1YiA9ICQkLmdlbmVyYXRlRHJhd0FyZWEoYXJlYUluZGljZXMsIHRydWUpO1xuXHQgICAgICAgICAgICAgICAgZHJhd0Jhck9uU3ViID0gJCQuZ2VuZXJhdGVEcmF3QmFyKGJhckluZGljZXMsIHRydWUpO1xuXHQgICAgICAgICAgICAgICAgZHJhd0xpbmVPblN1YiA9ICQkLmdlbmVyYXRlRHJhd0xpbmUobGluZUluZGljZXMsIHRydWUpO1xuXHRcblx0ICAgICAgICAgICAgICAgICQkLnVwZGF0ZUJhckZvclN1YmNoYXJ0KGR1cmF0aW9uKTtcblx0ICAgICAgICAgICAgICAgICQkLnVwZGF0ZUxpbmVGb3JTdWJjaGFydChkdXJhdGlvbik7XG5cdCAgICAgICAgICAgICAgICAkJC51cGRhdGVBcmVhRm9yU3ViY2hhcnQoZHVyYXRpb24pO1xuXHRcblx0ICAgICAgICAgICAgICAgICQkLnJlZHJhd0JhckZvclN1YmNoYXJ0KGRyYXdCYXJPblN1YiwgZHVyYXRpb24sIGR1cmF0aW9uKTtcblx0ICAgICAgICAgICAgICAgICQkLnJlZHJhd0xpbmVGb3JTdWJjaGFydChkcmF3TGluZU9uU3ViLCBkdXJhdGlvbiwgZHVyYXRpb24pO1xuXHQgICAgICAgICAgICAgICAgJCQucmVkcmF3QXJlYUZvclN1YmNoYXJ0KGRyYXdBcmVhT25TdWIsIGR1cmF0aW9uLCBkdXJhdGlvbik7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICB9O1xuXHQgICAg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My5ldmVudC5zb3VyY2VFdmVudC5hbHRLZXkgPyAkJC54Lm9yZ0RvbWFpbigpIDogbnVsbDtcblx0ICAgICAgICAgICAgICAgIGNvbmZpZy56b29tX29uem9vbXN0YXJ0LmNhbGwoJCQuYXBpLCBkMy5ldmVudC5zb3VyY2VFdmVudCk7XG5cdCAgICAgICAgICAgIH0pXG5cdCAgICAgICAgICAgIC5vbihcInpvb21cIiwgZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICAgICAgJCQucmVkcmF3Rm9yWm9vbS5jYWxsKCQkKTtcblx0ICAgICAgICAgICAgfSlcblx0ICAgICAgICAgICAgLm9uKCd6b29tZW5kJywgZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICAgICAgdmFyIGV2ZW50ID0gZDMuZXZlbnQuc291cmNlRXZlbnQ7XG5cdCAgICAgICAgICAgICAgICAvLyBpZiBjbGljaywgZG8gbm90aGluZy4gb3RoZXJ3aXNlLCBjbGljayBpbnRlcmFjdGlvbiB3aWxsIGJlIGNhbmNlbGVkLlxuXHQgICAgICAgICAgICAgICAgaWYgKGV2ZW50ICYmIHN0YXJ0RXZlbnQuY2xpZW50WCA9PT0gZXZlbnQuY2xpZW50WCAmJiBzdGFydEV2ZW50LmNsaWVudFkgPT09IGV2ZW50LmNsaWVudFkpIHtcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm47XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAkJC5yZWRyYXdFdmVudFJlY3QoKTtcblx0ICAgICAgICAgICAgICAgICQkLnVwZGF0ZVpvb20oKTtcblx0ICAgICAgICAgICAgICAgIGNvbmZpZy56b29tX29uem9vbWVuZC5jYWxsKCQkLmFwaSwgJCQueC5vcmdEb21haW4oKSk7XG5cdCAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICQkLnpvb20uc2NhbGUgPSBmdW5jdGlvbiAoc2NhbGUpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGNvbmZpZy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Bjb25maWcuem9vbV94X21heF0pO1xuXHQgICAgICAgIHJldHVybiBbbWluLCBtYXhdO1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnVwZGF0ZVpvb20gPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcywgeiA9ICQkLmNvbmZpZy56b29tX2VuYWJsZWQgPyAkJC56b29tIDogZnVuY3Rpb24gKCkge307XG5cdCAgICAgICAgJCQubWFpbi5zZWxlY3QoJy4nICsgQ0xBU1Muem9vbVJlY3QpLmNhbGwoeikub24oXCJkYmxjbGljay56b29tXCIsIG51bGwpO1xuXHQgICAgICAgICQkLm1haW4uc2VsZWN0QWxsKCcuJyArIENMQVNTLmV2ZW50UmVjdCkuY2FsbCh6KS5vbihcImRibGNsaWNrLnpvb21cIiwgbnVsbCk7XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4ucmVkcmF3Rm9yWm9vbSA9IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLCBkMyA9ICQkLmQzLCBjb25maWcgPSAkJC5jb25maWcsIHpvb20gPSAkJC56b29tLCB4ID0gJCQueDtcblx0ICAgICAgICBpZiAoIWNvbmZpZy56b29tX2VuYWJsZWQpIHtcblx0ICAgICAgICAgICAgcmV0dXJuO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAoJCQuZmlsdGVyVGFyZ2V0c1RvU2hvdygkJC5kYXRhLnRhcmdldHMpLmxlbmd0aCA9PT0gMCkge1xuXHQgICAgICAgICAgICByZXR1cm47XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGlmIChkMy5ldmVudC5zb3VyY2VFdmVudC50eXBlID09PSAnbW91c2Vtb3ZlJyAmJiB6b29tLmFsdERvbWFpbikge1xuXHQgICAgICAgICAgICB4LmRvbWFpbih6b29tLmFsdERvbWFpbik7XG5cdCAgICAgICAgICAgIHpvb20uc2NhbGUoeCkudXBkYXRlU2NhbGVFeHRlbnQoKTtcblx0ICAgICAgICAgICAgcmV0dXJuO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAoJCQuaXNDYXRlZ29yaXplZCgpICYmIHgub3JnRG9tYWluKClbMF0gPT09ICQkLm9yZ1hEb21haW5bMF0pIHtcblx0ICAgICAgICAgICAgeC5kb21haW4oWyQkLm9yZ1hEb21haW5bMF0gLSAxZS0xMCwgeC5vcmdEb21haW4oKVsxXV0pO1xuXHQgICAgICAgIH1cblx0ICAgICAgICAkJC5yZWRyYXcoe1xuXHQgICAgICAgICAgICB3aXRoVHJhbnNpdGlvbjogZmFsc2UsXG5cdCAgICAgICAgICAgIHdpdGhZOiBjb25maWcuem9vbV9yZXNjYWxlLFxuXHQgICAgICAgICAgICB3aXRoU3ViY2hhcnQ6IGZhbHNlLFxuXHQgICAgICAgICAgICB3aXRoRXZlbnRSZWN0OiBmYWxzZSxcblx0ICAgICAgICAgICAgd2l0aERpbWVuc2lvbjogZmFsc2Vcblx0ICAgICAgICB9KTtcblx0ICAgICAgICBpZiAoZDMuZXZlbnQuc291cmNlRXZlbnQudHlwZSA9PT0gJ21vdXNlbW92ZScpIHtcblx0ICAgICAgICAgICAgJCQuY2FuY2VsQ2xpY2sgPSB0cnVlO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBjb25maWcuem9vbV9vbnpvb20uY2FsbCgkJC5hcGksIHgub3JnRG9tYWluKCkpO1xuXHQgICAgfTtcblx0XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZW5lcmF0ZUNvbG9yID0gZnVuY3Rpb24gKCkge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZywgZDMgPSAkJC5kMyxcblx0ICAgICAgICAgICAgY29sb3JzID0gY29uZmlnLmRhdGFfY29sb3JzLFxuXHQgICAgICAgICAgICBwYXR0ZXJuID0gbm90RW1wdHkoY29uZmlnLmNvbG9yX3BhdHRlcm4pID8gY29uZmlnLmNvbG9yX3BhdHRlcm4gOiBkMy5zY2FsZS5jYXRlZ29yeTEwKCkucmFuZ2UoKSxcblx0ICAgICAgICAgICAgY2FsbGJhY2sgPSBjb25maWcuZGF0YV9jb2xvcixcblx0ICAgICAgICAgICAgaWRzID0gW107XG5cdFxuXHQgICAgICAgIHJldHVybiBmdW5jdGlvbiAoZCkge1xuXHQgICAgICAgICAgICB2YXIgaWQgPSBkLmlkIHx8IChkLmRhdGEgJiYgZC5kYXRhLmlkKSB8fCBkLCBjb2xvcjtcblx0XG5cdCAgICAgICAgICAgIC8vIGlmIGNhbGxiYWNrIGZ1bmN0aW9uIGlzIHByb3ZpZGVkXG5cdCAgICAgICAgICAgIGlmIChjb2xvcnNbaWRdIGluc3RhbmNlb2YgRnVuY3Rpb24pIHtcblx0ICAgICAgICAgICAgICAgIGNvbG9yID0gY29sb3JzW2lkXShkKTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAvLyBpZiBzcGVjaWZpZWQsIGNob29zZSB0aGF0IGNvbG9yXG5cdCAgICAgICAgICAgIGVsc2UgaWYgKGNvbG9yc1tpZF0pIHtcblx0ICAgICAgICAgICAgICAgIGNvbG9yID0gY29sb3JzW2lkXTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAvLyBpZiBub3Qgc3BlY2lmaWVkLCBjaG9vc2UgZnJvbSBwYXR0ZXJuXG5cdCAgICAgICAgICAgIGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgaWYgKGlkcy5pbmRleE9mKGlkKSA8IDApIHsgaWRzLnB1c2goaWQpOyB9XG5cdCAgICAgICAgICAgICAgICBjb2xvciA9IHBhdHRlcm5baWRzLmluZGV4T2YoaWQpICUgcGF0dGVybi5sZW5ndGhdO1xuXHQgICAgICAgICAgICAgICAgY29sb3JzW2lkXSA9IGNvbG9yO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayBpbnN0YW5jZW9mIEZ1bmN0aW9uID8gY2FsbGJhY2soY29sb3IsIGQpIDogY29sb3I7XG5cdCAgICAgICAgfTtcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZW5lcmF0ZUxldmVsQ29sb3IgPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLFxuXHQgICAgICAgICAgICBjb2xvcnMgPSBjb25maWcuY29sb3JfcGF0dGVybixcblx0ICAgICAgICAgICAgdGhyZXNob2xkID0gY29uZmlnLmNvbG9yX3RocmVzaG9sZCxcblx0ICAgICAgICAgICAgYXNWYWx1ZSA9IHRocmVzaG9sZC51bml0ID09PSAndmFsdWUnLFxuXHQgICAgICAgICAgICB2YWx1ZXMgPSB0aHJlc2hvbGQudmFsdWVzICYmIHRocmVzaG9sZC52YWx1ZXMubGVuZ3RoID8gdGhyZXNob2xkLnZhbHVlcyA6IFtdLFxuXHQgICAgICAgICAgICBtYXggPSB0aHJlc2hvbGQubWF4IHx8IDEwMDtcblx0ICAgICAgICByZXR1cm4gbm90RW1wdHkoY29uZmlnLmNvbG9yX3RocmVzaG9sZCkgPyBmdW5jdGlvbiAodmFsdWUpIHtcblx0ICAgICAgICAgICAgdmFyIGksIHYsIGNvbG9yID0gY29sb3JzW2NvbG9ycy5sZW5ndGggLSAxXTtcblx0ICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IHZhbHVlcy5sZW5ndGg7IGkrKykge1xuXHQgICAgICAgICAgICAgICAgdiA9IGFzVmFsdWUgPyB2YWx1ZSA6ICh2YWx1ZSAqIDEwMCAvIG1heCk7XG5cdCAgICAgICAgICAgICAgICBpZiAodiA8IHZhbHVlc1tpXSkge1xuXHQgICAgICAgICAgICAgICAgICAgIGNvbG9yID0gY29sb3JzW2ldO1xuXHQgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICA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lcm5hbDtcblx0ICAgICAgICBpZiAoZG9tYWluKSB7XG5cdCAgICAgICAgICAgIGlmICgkJC5pc1RpbWVTZXJpZXMoKSkge1xuXHQgICAgICAgICAgICAgICAgZG9tYWluID0gZG9tYWluLm1hcChmdW5jdGlvbiAoeCkgeyByZXR1cm4gJCQucGFyc2VEYXRlKHgpOyB9KTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAkJC5icnVzaC5leHRlbnQoZG9tYWluKTtcblx0ICAgICAgICAgICAgJCQucmVkcmF3KHt3aXRoVXBkYXRlWERvbWFpbjogdHJ1ZSwgd2l0aFk6ICQkLmNvbmZpZy56b29tX3Jlc2NhbGV9KTtcblx0ICAgICAgICAgICAgJCQuY29uZmlnLnpvb21fb256b29tLmNhbGwodGhpcywgJCQueC5vcmdEb21haW4oKSk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHJldHVybiAkJC5icnVzaC5leHRlbnQoKTtcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9mbi56b29tLmVuYWJsZSA9IGZ1bmN0aW9uIChlbmFibGVkKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcy5pbnRlcm5hbDtcblx0ICAgICAgICAkJC5jb25maWcuem9vbV9lbmFibGVkID0gZW5hYmxlZDtcblx0ICAgICAgICAkJC51cGRhdGVBbmRSZWRyYXcoKTtcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9mbi51bnpvb20gPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcy5pbnRlcm5hbDtcblx0ICAgICAgICAkJC5icnVzaC5jbGVhcigpLnVwZGF0ZSgpO1xuXHQgICAgICAgICQkLnJlZHJhdyh7d2l0aFVwZGF0ZVhEb21haW46IHRydWV9KTtcblx0ICAgIH07XG5cdFxuXHQgICAgYzNfY2hhcnRfZm4uem9vbS5tYXggPSBmdW5jdGlvbiAobWF4KSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcy5pbnRlcm5hbCwgY29uZmlnID0gJCQuY29uZmlnLCBkMyA9ICQkLmQzO1xuXHQgICAgICAgIGlmIChtYXggPT09IDAgfHwgbWF4KSB7XG5cdCAgICAgICAgICAgIGNvbmZpZy56b29tX3hfbWF4ID0gZDMubWF4KFskJC5vcmdYRG9tYWluWzFdLCBtYXhdKTtcblx0ICAgICAgICB9XG5cdCAgICAgICAgZWxzZSB7XG5cdCAgICAgICAgICAgIHJldHVybiBjb25maWcuem9vbV94X21heDtcblx0ICAgICAgICB9XG5cdCAgICB9O1xuXHRcblx0ICAgIGMzX2NoYXJ0X2ZuLnpvb20ubWluID0gZnVuY3Rpb24gKG1pbikge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMuaW50ZXJuYWwsIGNvbmZpZyA9ICQkLmNvbmZpZywgZDMgPSAkJC5kMztcblx0ICAgICAgICBpZiAobWluID09PSAwIHx8IG1pbikge1xuXHQgICAgICAgICAgICBjb25maWcuem9vbV94X21pbiA9IGQzLm1pbihbJCQub3JnWERvbWFpblswXSwgbWluXSk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4gY29uZmlnLnpvb21feF9taW47XG5cdCAgICAgICAgfVxuXHQgICAgfTtcblx0XG5cdCAgICBjM19jaGFydF9mbi56b29tLnJhbmdlID0gZnVuY3Rpb24gKHJhbmdlKSB7XG5cdCAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGgpIHtcblx0ICAgICAgICAgICAgaWYgKGlzRGVmaW5lZChyYW5nZS5tYXgpKSB7IHRoaXMuZG9tYWluLm1heChyYW5nZS5tYXgpOyB9XG5cdCAgICAgICAgICAgIGlmIChpc0RlZmluZWQocmFuZ2UubWluKSkgeyB0aGlzLmRvbWFpbi5taW4ocmFuZ2UubWluKTsgfVxuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIHJldHVybiB7XG5cdCAgICAgICAgICAgICAgICBtYXg6IHRoaXMuZ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gICAgICAgICAgICAgIGlmICh0LmlkID09PSB0YXJnZXRzW2ldLmlkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgZm91bmQgPSB0cnVlO1xuXHRcblx0ICAgICAgICAgICAgICAgICAgICBpZiAodC52YWx1ZXNbdC52YWx1ZXMubGVuZ3RoIC0gMV0pIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdGFpbCA9IHQudmFsdWVzW3QudmFsdWVzLmxlbmd0aCAtIDFdLmluZGV4ICsgMTtcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgbGVuZ3RoID0gdGFyZ2V0c1tpXS52YWx1ZXMubGVuZ3RoO1xuXHRcblx0ICAgICAgICAgICAgICAgICAgICBmb3IgKGogPSAwOyBqIDwgbGVuZ3RoOyBqKyspIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0c1tpXS52YWx1ZXNbal0uaW5kZXggPSB0YWlsICsgajtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEkJC5pc1RpbWVTZXJpZXMoKSkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0c1tpXS52YWx1ZXNbal0ueCA9IHRhaWwgKyBqO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIHQudmFsdWVzID0gdC52YWx1ZXMuY29uY2F0KHRhcmdldHNbaV0udmFsdWVzKTtcblx0XG5cdCAgICAgICAgICAgICAgICAgICAgdGFyZ2V0cy5zcGxpY2UoaSwgMSk7XG5cdCAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgaWYgKCFmb3VuZCkgeyBub3Rmb3VuZElkcy5wdXNoKHQuaWQpOyB9XG5cdCAgICAgICAgfSk7XG5cdFxuXHQgICAgICAgIC8vIEFwcGVuZCBudWxsIGZvciBub3QgZm91bmQgdGFyZ2V0c1xuXHQgICAgICAgICQkLmRhdGEudGFyZ2V0cy5mb3JFYWNoKGZ1bmN0aW9uICh0KSB7XG5cdCAgICAgICAgICAgIHZhciBpLCBqO1xuXHQgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbm90Zm91bmRJZHMubGVuZ3RoOyBpKyspIHtcblx0ICAgICAgICAgICAgICAgIGlmICh0LmlkID09PSBub3Rmb3VuZElkc1tpXSkge1xuXHQgICAgICAgICAgICAgICAgICAgIHRhaWwgPSB0LnZhbHVlc1t0LnZhbHVlcy5sZW5ndGggLSAxXS5pbmRleCArIDE7XG5cdCAgICAgICAgICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IGxlbmd0aDsgaisrKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHQudmFsdWVzLnB1c2goe1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHQuaWQsXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogdGFpbCArIGosXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICB4OiAkJC5pc1RpbWVTZXJpZXMoKSA/ICQkLmdldE90aGVyVGFyZ2V0WCh0YWlsICsgaikgOiB0YWlsICsgaixcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBudWxsXG5cdCAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0pO1xuXHRcblx0ICAgICAgICAvLyBHZW5lcmF0ZSBudWxsIHZhbHVlcyBmb3IgbmV3IHRhcmdldFxuXHQgICAgICAgIGlmICgkJC5kYXRhLnRhcmdldHMubGVuZ3RoKSB7XG5cdCAgICAgICAgICAgIHRhcmdldHMuZm9yRWFjaChmdW5jdGlvbiAodCkge1xuXHQgICAgICAgICAgICAgICAgdmFyIGksIG1pc3NpbmcgPSBbXTtcblx0ICAgICAgICAgICAgICAgIGZvciAoaSA9ICQkLmRhdGEudGFyZ2V0c1swXS52YWx1ZXNbMF0uaW5kZXg7IGkgPCB0YWlsOyBpKyspIHtcblx0ICAgICAgICAgICAgICAgICAgICBtaXNzaW5nLnB1c2goe1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBpZDogdC5pZCxcblx0ICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGksXG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHg6ICQkLmlzVGltZVNlcmllcygpID8gJCQuZ2V0T3RoZXJUYXJnZXRYKGkpIDogaSxcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IG51bGxcblx0ICAgICAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIHQudmFsdWVzLmZvckVhY2goZnVuY3Rpb24gKHYpIHtcblx0ICAgICAgICAgICAgICAgICAgICB2LmluZGV4ICs9IHRhaWw7XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKCEkJC5pc1RpbWVTZXJpZXMoKSkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB2LnggKz0gdGFpbDtcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgICAgIHQudmFsdWVzID0gbWlzc2luZy5jb25jYXQodC52YWx1ZXMpO1xuXHQgICAgICAgICAgICB9KTtcblx0ICAgICAgICB9XG5cdCAgICAgICAgJCQuZGF0YS50YXJnZXRzID0gJCQuZGF0YS50YXJnZXRzLmNvbmNhdCh0YXJnZXRzKTsgLy8gYWRkIHJlbWFpbmVkXG5cdFxuXHQgICAgICAgIC8vIGNoZWNrIGRhdGEgY291bnQgYmVjYXVzZSBiZWhhdmlvciBuZWVkcyB0byBjaGFuZ2Ugd2hlbiBpdCdzIG9ubHkgb25lXG5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IGJhc2VWYWx1ZS54O1xuXHQgICAgICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgICAgICBkaWZmID0gYmFzZVZhbHVlLnggLSAkJC5nZXRYRG9tYWluKCQkLmRhdGEudGFyZ2V0cylbMF07XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICBkaWZmID0gMTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBkb21haW4gPSBbYmFzZVZhbHVlLnggLSBkaWZmLCBiYXNlVmFsdWUueF07XG5cdCAgICAgICAgICAgICQkLnVwZGF0ZVhEb21haW4obnVsbCwgdHJ1ZSwgdHJ1ZSwgZmFsc2UsIGRvbWFpbik7XG5cdCAgICAgICAgfSBlbHNlIGlmIChvcmdEYXRhQ291bnQgPT09IDEpIHtcblx0ICAgICAgICAgICAgaWYgKCQkLmlzVGltZVNlcmllcygpKSB7XG5cdCAgICAgICAgICAgICAgICBkaWZmID0gKGJhc2VUYXJnZXQudmFsdWVzW2Jhc2VUYXJnZXQudmFsdWVzLmxlbmd0aCAtIDFdLnggLSBiYXNlVmFsdWUueCkgLyAyO1xuXHQgICAgICAgICAgICAgICAgZG9tYWluID0gW25ldyBEYXRlKCtiYXNlVmFsdWUueCAtIGRpZmYpLCBuZXcgRGF0ZSgrYmFzZVZhbHVlLnggKyBkaWZmKV07XG5cdCAgICAgICAgICAgICAgICAkJC51cGRhdGVYRG9tYWluKG51bGwsIHRydWUsIHRydWUsIGZhbHNlLCBkb21haW4pO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfVxuXHRcblx0ICAgICAgICAvLyBTZXQgdGFyZ2V0c1xuXHQgICAgICAgICQkLnVwZGF0ZVRhcmdldHMoJCQuZGF0YS50YXJnZXRzKTtcblx0XG5cdCAgICAgICAgLy8gUmVkcmF3IHdpdGggbmV3IHRhcmdldHNcblx0ICAgICAgICAkJC5yZWRyYXcoe1xuXHQgICAgICAgICAgICBmbG93OiB7XG5cdCAgICAgICAgICAgICAgICBpbmRleDogYmFzZVZhbHVlLmluZGV4LFxuXHQgICAgICAgICAgICAgICAgbGVuZ3RoOiBsZW5ndGgsXG5cdCAgICAgICAgICAgICAgICBkdXJhdGlvbjogaXNWYWx1ZShhcmdzLmR1cmF0aW9uKSA/IGFyZ3MuZHVyYXRpb24gOiAkJC5jb25maWcudHJhbnNpdGlvbl9kdXJhdGlvbixcblx0ICAgICAgICAgICAgICAgIGRvbmU6IGFyZ3MuZG9uZSxcblx0ICAgICAgICAgICAgICAgIG9yZ0RhdGFDb3VudDogb3JnRGF0YUNvdW50LFxuXHQgICAgICAgICAgICB9LFxuXHQgICAgICAgICAgICB3aXRoTGVnZW5kOiB0cnVlLFxuXHQgICAgICAgICAgICB3aXRoVHJhbnNpdGlvbjogb3JnRGF0YUNvdW50ID4gMSxcblx0ICAgICAgICAgICAgd2l0aFRyaW1YRG9tYWluOiBmYWxzZSxcblx0ICAgICAgICAgICAgd2l0aFVwZGF0ZVhBeGlzOiB0cnVlLFxuXHQgICAgICAgIH0pO1xuXHQgICAgfTtcblx0XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZW5lcmF0ZUZsb3cgPSBmdW5jdGlvbiAoYXJncykge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZywgZDMgPSAkJC5kMztcblx0XG5cdCAgICAgICAgcmV0dXJuIGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgdmFyIHRhcmdldHMgPSBhcmdzLnRhcmdldHMsXG5cdCAgICAgICAgICAgICAgICBmbG93ID0gYXJncy5mbG93LFxuXHQgICAgICAgICAgICAgICAgZHJhd0JhciA9IGFyZ3MuZHJhd0Jhcixcblx0ICAgICAgICAgICAgICAgIGRyYXdMaW5lID0gYXJncy5kcmF3TGluZSxcblx0ICAgICAgICAgICAgICAgIGRyYXdBcmVhID0gYXJncy5kcmF3QXJlYSxcblx0ICAgICAgICAgICAgICAgIGN4ID0gYXJncy5jeCxcblx0ICAgICAgICAgICAgICAgIGN5ID0gYXJncy5jeSxcblx0ICAgICAgICAgICAgICAgIHh2ID0gYXJncy54dixcblx0ICAgICAgICAgICAgICAgIHhGb3JUZXh0ID0gYXJncy54Rm9yVGV4dCxcblx0ICAgICAgICAgICAgICAgIHlGb3JUZXh0ID0gYXJncy55Rm9yVGV4dCxcblx0ICAgICAgICAgICAgICAgIGR1cmF0aW9uID0gYXJncy5kdXJhdGlvbjtcblx0XG5cdCAgICAgICAgICAgIHZhciB0cmFuc2xhdGVYLCBzY2FsZVggPSAxLCB0cmFuc2Zvcm0sXG5cdCAgICAgICAgICAgICAgICBmbG93SW5kZXggPSBmbG93LmluZGV4LFxuXHQgICAgICAgICAgICAgICAgZmxvd0xlbmd0aCA9IGZsb3cubGVuZ3RoLFxuXHQgICAgICAgICAgICAgICAgZmxvd1N0YXJ0ID0gJCQuZ2V0VmFsdWVPbkluZGV4KCQkLmRhdGEudGFyZ2V0c1swXS52YWx1ZXMsIGZsb3dJbmRleCksXG5cdCAgICAgICAgICAgICAgICBmbG93RW5kID0gJCQuZ2V0VmFsdWVPbkluZGV4KCQkLmRhdGEudGFyZ2V0c1swXS52YWx1ZXMsIGZsb3dJbmRleCArIGZsb3dMZW5ndGgpLFxuXHQgICAgICAgICAgICAgICAgb3JnRG9tYWluID0gJCQueC5kb21haW4oKSwgZG9tYWluLFxuXHQgICAgICAgICAgICAgICAgZHVyYXRpb25Gb3JGbG93ID0gZmxvdy5kdXJhdGlvbiB8fCBkdXJhdGlvbixcblx0ICAgICAgICAgICAgICAgIGRvbmUgPSBmbG93LmRvbmUgfHwgZnVuY3Rpb24gKCkge30sXG5cdCAgICAgICAgICAgICAgICB3YWl0ID0gJCQuZ2VuZXJhdGVXYWl0KCk7XG5cdFxuXHQgICAgICAgICAgICB2YXIgeGdyaWQgPSAkJC54Z3JpZCB8fCBkMy5zZWxlY3RBbG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CAgICAgICAgICAgIC8vIHVwZGF0ZSBlbGVtZW50cyByZWxhdGVkIHRvIHggc2NhbGVcblx0ICAgICAgICAgICAgaWYgKCQkLnVwZGF0ZVhHcmlkKSB7ICQkLnVwZGF0ZVhHcmlkKHRydWUpOyB9XG5cdFxuXHQgICAgICAgICAgICAvLyBnZW5lcmF0ZSB0cmFuc2Zvcm0gdG8gZmxvd1xuXHQgICAgICAgICAgICBpZiAoIWZsb3cub3JnRGF0YUNvdW50KSB7IC8vIGlmIGVtcHR5XG5cdCAgICAgICAgICAgICAgICBpZiAoJCQuZGF0YS50YXJnZXRzWzBdLnZhbHVlcy5sZW5ndGggIT09IDEpIHtcblx0ICAgICAgICAgICAgICAgICAgICB0cmFuc2xhdGVYID0gJCQueChvcmdEb21haW5bMF0pIC0gJCQueChkb21haW5bMF0pO1xuXHQgICAgICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgICAgICBpZiAoJCQuaXNUaW1lU2VyaWVzKCkpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgZmxvd1N0YXJ0ID0gJCQuZ2V0VmFsdWVPbkluZGV4KCQkLmRhdGEudGFyZ2V0c1swXS52YWx1ZXMsIDApO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBmbG93RW5kID0gJCQuZ2V0VmFsdWVPbkluZGV4KCQkLmRhdGEudGFyZ2V0c1swXS52YWx1ZXMsICQkLmRhdGEudGFyZ2V0c1swXS52YWx1ZXMubGVuZ3RoIC0gMSk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zbGF0ZVggPSAkJC54KGZsb3dTdGFydC54KSAtICQkLngoZmxvd0VuZC54KTtcblx0ICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2xhdGVYID0gZGlmZkRvbWFpbihkb21haW4pIC8gMjtcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAoZmxvdy5vcmdEYXRhQ291bnQgPT09IDEgfHwgKGZsb3dTdGFydCAmJiBmbG93U3RhcnQueCkgPT09IChmbG93RW5kICYmIGZsb3dFbmQueCkpIHtcblx0ICAgICAgICAgICAgICAgIHRyYW5zbGF0ZVggPSAkJC54KG9yZ0RvbWFpblswXSkgLSAkJC54KGRvbWFpblswXSk7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICBpZiAoJCQuaXNUaW1lU2VyaWVzKCkpIHtcblx0ICAgICAgICAgICAgICAgICAgICB0cmFuc2xhdGVYID0gKCQkLngob3JnRG9tYWluWzBdKSAtICQkLngoZG9tYWluWzBdKSk7XG5cdCAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgICAgIHRyYW5zbGF0ZVggPSAoJCQueChmbG93U3RhcnQueCkgLSAkJC54KGZsb3dFbmQueCkpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHNjYWxlWCA9IChkaWZmRG9tYWluKG9yZ0RvbWFpbikgLyBkaWZmRG9tYWluKGRvbWFpbikpO1xuXHQgICAgICAgICAgICB0cmFuc2Zvcm0gPSAndHJhbnNsYXRlKCcgKyB0cmFuc2xhdGVYICsgJywwKSBzY2FsZSgnICsgc2NhbGVYICsgJywxKSc7XG5cdFxuXHQgICAgICAgICAgICAkJC5oaWRlWEdyaWRGb2N1cygpO1xuXHRcblx0ICAgICAgICAgICAgZDMudHJhbnNpdGlvbigpLmVhc2UoJ2xpbmVhcicpLmR1cmF0aW9uKGR1cmF0aW9uRm9yRmxvdykuZWFjaChmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgICAgICB3YWl0LmFkZCgkJC5heGVzLngudHJhbnNpdGlvbigpLmNhbGwoJCQueEF4aXMpKTtcblx0ICAgICAgICAgICAgICAgIHdhaXQuYWRkKG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ICAgICAgIGlmIChmbG93TGVuZ3RoKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGZsb3dMZW5ndGg7IGkrKykge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBzaGFwZXMucHVzaCgnLicgKyBDTEFTUy5zaGFwZSArICctJyArIChmbG93SW5kZXggKyBpKSk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHRleHRzLnB1c2goJy4nICsgQ0xBU1MudGV4dCArICctJyArIChmbG93SW5kZXggKyBpKSk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50UmVjdHMucHVzaCgnLicgKyBDTEFTUy5ldmVudFJlY3QgKyAnLScgKyAoZmxvd0luZGV4ICsgaSkpO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICAkJC5zdmcuc2VsZWN0QWxsKCcuJyArIENMQVNTLnNoYXBlcykuc2VsZWN0QWxsKHNoYXBlcykucmVtb3ZlKCk7XG5cdCAgICAgICAgICAgICAgICAgICAgJCQuc3ZnLnNlbGVjdEFsbCgnLicgKyBDTEFTUy50ZXh0cykuc2VsZWN0QWxsKHRleHRzKS5yZW1vdmUoKTtcblx0ICAgICAgICAgICAgICAgICAgICAkJC5zdmcuc2VsZWN0QWxsKCcuJyArIENMQVNTLmV2ZW50UmVjdHMpLnNlbGVjdEFsbChldmVudFJlY3RzKS5yZW1vdmUoKTtcblx0ICAgICAgICAgICAgICAgICAgICAkJC5zdmcuc2VsZWN0KCcuJyArIENMQVNTLnhncmlkKS5yZW1vdmUoKTtcblx0ICAgICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICAgICAvLyBkcmF3IGFnYWluIGZvciByZW1vdmluZyBmbG93ZWQgZWxlbWVudHMgYW5kIHJldmVydGluZyBhdHRyXG5cdCAgICAgICAgICAgICAgICB4Z3JpZFxuXHQgICAgICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCBudWxsKVxuXHQgICAgICAgICAgICAgICAgICAgIC5hdHRyKCQkLnhncmlkQXR0cik7XG5cdCAgICAgICAgICAgICAgICB4Z3JpZExpbmVzXG5cdCAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIG51bGwpO1xuXHQgICAgICAgICAgICAgICAgeGdyaWRMaW5lcy5zZWxlY3QoJ2xpbmUnKVxuXHQgICAgICAgICAgICAgICAgICAgIC5hdHRyKFwieDFcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/IDAgOiB4dilcblx0ICAgICAgICAgICAgICAgICAgICAuYXR0cihcIngyXCIsIGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAkJC53aWR0aCA6IHh2KTtcblx0ICAgICAgICAgICAgICAgIHhncmlkTGluZXMuc2VsZWN0KCd0ZXh0Jylcblx0ICAgICAgICAgICAgICAgICAgICAuYXR0cihcInhcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/ICQkLndpZHRoIDogMClcblx0ICAgICAgICAgICAgICAgICAgICAuYXR0cihcInlcIiwgeHYpO1xuXHQgICAgICAgICAgICAgICAgbWFpbkJhclxuXHQgICAgICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCBudWxsKVxuXHQgICAgICAgICAgICAgICAgICAgIC5hdHRyKFwiZFwiLCBkcmF3QmFyKTtcblx0ICAgICAgICAgICAgICAgIG1haW5MaW5lXG5cdCAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIG51bGwpXG5cdCAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJkXCIsIGRyYXdMaW5lKTtcblx0ICAgICAgICAgICAgICAgIG1haW5BcmVhXG5cdCAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIG51bGwpXG5cdCAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJkXCIsIGRyYXdBcmVhKTtcblx0ICAgICAgICAgICAgICAgIG1haW5DaXJjbGVcblx0ICAgICAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgbnVsbClcblx0ICAgICAgICAgICAgICAgICAgICAuYXR0cihcImN4XCIsIGN4KVxuXHQgICAgICAgICAgICAgICAgICAgIC5hdHRyKFwiY3lcIiwgY3kpO1xuXHQgICAgICAgICAgICAgICAgbWFpblRleHRcblx0ICAgICAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgbnVsbClcblx0ICAgICAgICAgICAgICAgICAgICAuYXR0cigneCcsIHhGb3JUZXh0KVxuXHQgICAgICAgICAgICAgICAgICAgIC5hdHRyKCd5JywgeUZvclRleHQpXG5cdCAgICAgICAgICAgICAgICAgICAgLnN0eWxlKCdmaWxsLW9wYWNpdHknLCAkJC5vcGFjaXR5Rm9yVGV4dC5iaW5kKCQkKSk7XG5cdCAgICAgICAgICAgICAgICBtYWluUmVnaW9uXG5cdCAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIG51bGwpO1xuXHQgICAgICAgICAgICAgICAgbWFpblJlZ2lvbi5zZWxlY3QoJ3JlY3QnKS5maWx0ZXIoJCQuaXNSZWdpb25PblgpXG5cdCAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJ4XCIsICQkLnJlZ2lvblguYmluZCgkJCkpXG5cdCAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJ3aWR0aFwiLCAkJC5yZWdpb25XaWR0aC5iaW5kKCQkKSk7XG5cdFxuXHQgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5pbnRlcmFjdGlvbl9lbmFibGVkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgJCQucmVkcmF3RXZlbnRSZWN0KCk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgICAgLy8gY2FsbGJhY2sgZm9yIGVuZCBvZiBmbG93XG5cdCAgICAgICAgICAgICAgICBkb25lKCk7XG5cdFxuXHQgICAgICAgICAgICAgICAgJC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pO1xuXHQgICAgICAgIH1cblx0ICAgICAgICAvLyBUT0RPOiByZXR1cm4gc29tZSB2YWx1ZXM/XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfZm4uYXhpcy5tYXggPSBmdW5jdGlvbiAobWF4KSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcy5pbnRlcm5hbCwgY29uZmlnID0gJCQuY29uZmlnO1xuXHQgICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoKSB7XG5cdCAgICAgICAgICAgIGlmICh0eXBlb2YgbWF4ID09PSAnb2JqZWN0Jykge1xuXHQgICAgICAgICAgICAgICAgaWYgKGlzVmFsdWUobWF4LngpKSB7IGNvbmZpZy5heGlzX3hfbWF4ID0gbWF4Lng7IH1cblx0ICAgICAgICAgICAgICAgIGlmIChpc1ZhbHVlKG1heC55KSkgeyBjb25maWcuYXhpc195X21heCA9IG1heC55OyB9XG5cdCAgICAgICAgICAgICAgICBpZiAoaXNWYWx1ZShtYXgueTIpKSB7IGNvbmZpZy5heGlzX3kyX21heCA9IG1heC55MjsgfVxuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgY29uZmlnLmF4aXNfeV9tYXggPSBjb25maWcuYXhpc195Ml9tYXggPSBtYXg7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgJCQucmVkcmF3KHt3aXRoVXBkYXRlT3JnWERvbWFpbjogdHJ1ZSwgd2l0aFVwZGF0ZVhEb21haW46IHRydWV9KTtcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4ge1xuXHQgICAgICAgICAgICAgICAgeDogY29uZmlnLmF4aXNfeF9tYXgsXG5cdCAgICAgICAgICAgICAgICB5OiBjb25maWcuYXhpc195X21heCxcblx0ICAgICAgICAgICAgICAgIHkyOiBjb25maWcuYXhpc195Ml9tYXhcblx0ICAgICAgICAgICAgfTtcblx0ICAgICAgICB9XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfZm4uYXhpcy5taW4gPSBmdW5jdGlvbiAobWluKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcy5pbnRlcm5hbCwgY29uZmlnID0gJCQuY29uZmlnO1xuXHQgICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoKSB7XG5cdCAgICAgICAgICAgIGlmICh0eXBlb2YgbWluID09PSAnb2JqZWN0Jykge1xuXHQgICAgICAgICAgICAgICAgaWYgKGlzVmFsdWUobWluLngpKSB7IGNvbmZpZy5heGlzX3hfbWluID0gbWluLng7IH1cblx0ICAgICAgICAgICAgICAgIGlmIChpc1ZhbHVlKG1pbi55KSkgeyBjb25maWcuYXhpc195X21pbiA9IG1pbi55OyB9XG5cdCAgICAgICAgICAgICAgICBpZiAoaXNWYWx1ZShtaW4ueTIpKSB7IGNvbmZpZy5heGlzX3kyX21pbiA9IG1pbi55MjsgfVxuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgY29uZmlnLmF4aXNfeV9taW4gPSBjb25maWcuYXhpc195Ml9taW4gPSBtaW47XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgJCQucmVkcmF3KHt3aXRoVXBkYXRlT3JnWERvbWFpbjogdHJ1ZSwgd2l0aFVwZGF0ZVhEb21haW46IHRydWV9KTtcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4ge1xuXHQgICAgICAgICAgICAgICAgeDogY29uZmlnLmF4aXNfeF9taW4sXG5cdCAgICAgICAgICAgICAgICB5OiBjb25maWcuYXhpc195X21pbixcblx0ICAgICAgICAgICAgICAgIHkyOiBjb25maWcuYXhpc195Ml9taW5cblx0ICAgICAgICAgICAgfTtcblx0ICAgICAgICB9XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfZm4uYXhpcy5yYW5nZSA9IGZ1bmN0aW9uIChyYW5nZSkge1xuXHQgICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoK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AgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gbmV3U2NhbGU7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGZ1bmN0aW9uIHRleHRGb3JtYXR0ZWQodikge1xuXHQgICAgICAgICAgICB2YXIgZm9ybWF0dGVkID0gdGlja0Zvcm1hdCA/IHRpY2tGb3JtYXQodikgOiB2O1xuXHQgICAgICAgICAgICByZXR1cm4gdHlwZW9mIGZvcm1hdHRlZCAhPT0gJ3VuZGVmaW5lZCcgPyBmb3JtYXR0ZWQgOiAnJztcblx0ICAgICAgICB9XG5cdCAgICAgICAgZnVuY3Rpb24gZ2V0U2l6ZUZvcjFDaGFyKHRpY2spIHtcblx0ICAgICAgICAgICAgaWYgKHRpY2tUZXh0Q2hhclNpemUpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiB0aWNrVGV4dENoYXJTaXplO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHZhciBzaXplID0ge1xuXHQgICAgICAgICAgICAgICAgaDogMTEuNSxcblx0ICAgICAgICAgICAgICAgIHc6IDUuNVxuXHQgICAgICAgICAgICB9O1xuXHQgICAgICAgICAgICB0aWNrLnNlbGVjdCgndGV4dCcpLnRleHQodGV4dEZvcm1hdHRlZCkuZWFjaChmdW5jdGlvbiAoZCkge1xuXHQgICAgICAgICAgICAgICAgdmFyIGJveCA9IHRoaXMuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCksXG5cdCAgICAgICAgICAgICAgICAgICAgdGV4dCA9IHRleHRGb3JtYXR0ZWQoZCksXG5cdCAgICAgICAgICAgICAgICAgICAgaCA9IGJveC5oZWlnaHQsXG5cdCAgICAgICAgICAgICAgICAgICAgdyA9IHRleHQgPyAoYm94LndpZHRoIC8gdGV4dC5sZW5ndGgpIDogdW5kZWZpbmVkO1xuXHQgICAgICAgICAgICAgICAgaWYgKGggJiYgdykge1xuXHQgICAgICAgICAgICAgICAgICAgIHNpemUuaCA9IGg7XG5cdCAgICAgICA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XaWR0aCkge1xuXHQgICAgICAgICAgICAgICAgICAgIHZhciB0aWNrVGV4dCA9IHRleHRGb3JtYXR0ZWQoZCksXG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHN1YnRleHQsIHNwYWNlSW5kZXgsIHRleHRXaWR0aCwgc3BsaXR0ZWQgPSBbXTtcblx0XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbCh0aWNrVGV4dCkgPT09IFwiW29iamVjdCBBcnJheV1cIikge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGlja1RleHQ7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgICAgICAgICBpZiAoIW1heFdpZHRoIHx8IG1heFdpZHRoIDw9IDApIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgbWF4V2lkdGggPSBpc1ZlcnRpY2FsID8gOTUgOiBwYXJhbXMuaXNDYXRlZ29yeSA/IChNYXRoLmNlaWwoc2NhbGUxKHRpY2tzWzFdKSAtIHNjYWxlMSh0aWNrc1swXSkpIC0gMTIpIDogMTEwO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gc3BsaXQoc3BsaXR0ZWQsIHRleHQpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgc3BhY2VJbmRleCA9IHVuZGVmaW5lZDtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDE7IGkgPCB0ZXh0Lmxlbmd0aDsgaSsrKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGV4dC5jaGFyQXQoaSkgPT09ICcgJykge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNwYWNlSW5kZXggPSBpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VidGV4dCA9IHRleHQuc3Vic3RyKDAsIGkgKyAxKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRXaWR0aCA9IHNpemVGb3IxQ2hhci53ICogc3VidGV4dC5sZW5ndGg7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpZiB0ZXh0IHdpZHRoIGdldHMgb3ZlciB0aWNrIHdpZHRoLCBzcGxpdCBieSBzcGFjZSBpbmRleCBvciBjcnJlbnQgaW5kZXhcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtYXhXaWR0aCA8IHRleHRXaWR0aCkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzcGxpdChcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3BsaXR0ZWQuY29uY2F0KHRleHQuc3Vic3RyKDAsIHNwYWNlSW5kZXggPyBzcGFjZUluZGV4IDogaSkpLFxuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0LnNsaWNlKHNwYWNlSW5kZXggPyBzcGFjZUluZGV4ICsgMSA6IGkpXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3BsaXR0ZWQuY29uY2F0KHRleHQpO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNwbGl0KHNwbGl0dGVkLCB0aWNrVGV4dCArIFwiXCIpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHRzcGFuRHkoZCwgaSkge1xuXHQgICAgICAgICAgICAgICAgICAgIHZhciBkeSA9IHNpemVGb3IxQ2hhci5oO1xuXHQgICAgICAgICAgICAgICAgICAgIGlmIChpID09PSAwKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcmllbnQgPT09ICdsZWZ0JyB8fCBvcmllbnQgPT09ICdyaWdodCcpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGR5ID0gLSgoY291bnRzW2QuaW5kZXhdIC0gMSkgKiAoc2l6ZUZvcjFDaGFyLmggLyAyKSAtIDMpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgZHkgPSBcIi43MWVtXCI7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGR5O1xuXHQgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHRpY2tTaXplKGQpIHtcblx0ICAgICAgICAgICAgICAgICAgICB2YXIgdGlja1Bvc2l0aW9uID0gc2NhbGUoZCkgKyAodGlja0NlbnRlcmVkID8gMCA6IHRpY2tPZmZzZXQpO1xuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiByYW5nZVswXSA8IHRpY2tQb3NpdGlvbiAmJiB0aWNrUG9zaXRpb24gPCByYW5nZVsxXSA/IGlubmVyVGlja1NpemUgOiAwO1xuXHQgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgICAgIHRleHQgPSB0aWNrLnNlbGVjdChcInRleHRcIik7XG5cdCAgICAgICAgICAgICAgICB0c3BhbiA9IHRleHQuc2VsZWN0QWxsKCd0c3BhbicpXG5cdCAgICAgICAgICAgICAgICAgICAgLmRhdGEoZnVuY3Rpb24gKGQsIGkpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHNwbGl0dGVkID0gcGFyYW1zLnRpY2tNdWx0aWxpbmUgPyBzcGxpdFRpY2tUZXh0KGQsIHBhcmFtcy50aWNrV2lkdGgpIDogW10uY29uY2F0KHRleHRGb3JtYXR0ZWQoZCkpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBjb3VudHNbaV0gPSBzcGxpdHRlZC5sZW5ndGg7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzcGxpdHRlZC5tYXAoZnVuY3Rpb24gKHMpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7IGluZGV4OiBpLCBzcGxpdHRlZDogcyB9O1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgICAgIHRzcGFuLmVudGVyKCkuYXBwZW5kKCd0c3BhbicpO1xuXHQgICAgICAgICAgICAgICAgdHNwYW4uZXhpdCgpLnJlbW92ZSgpO1xuXHQgICAgICAgICAgICAgICAgdHNwYW4udGV4dChmdW5jdGlvbiAoZCkgeyByZXR1cm4gZC5zcGxpdHRlZDsgfSk7XG5cdFxuXHQgICAgICAgICAgICAgICAgdmFyIHJvdGF0ZSA9IHBhcmFtcy50aWNrVGV4dFJvdGF0ZTtcblx0XG5cdCAgICAgICAgICAgICAgICBmdW5jdGlvbiB0ZXh0QW5jaG9yRm9yVGV4dChyb3RhdGUpIHtcblx0ICAgICAgICAgICAgICAgICAgICBpZiAoIXJvdGF0ZSkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ21pZGRsZSc7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiByb3RhdGUgPiAwID8gXCJzdGFydFwiIDogXCJlbmRcIjtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHRleHRUcmFuc2Zvcm0ocm90YXRlKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKCFyb3RhdGUpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICcnO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJyb3RhdGUoXCIgKyByb3RhdGUgKyBcIilcIjtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGR4Rm9yVGV4dChyb3RhdGUpIHtcblx0ICAgICAgICAgICAgICAgICAgICBpZiAoIXJvdGF0ZSkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDggKiBNYXRoLnNpbihNYXRoLlBJICogKHJvdGF0ZSAvIDE4MCkpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgZnVuY3Rpb24geUZvclRleHQocm90YXRlKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKCFyb3RhdGUpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRpY2tMZW5ndGg7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAxMS41IC0gMi41ICogKHJvdGF0ZSAvIDE1KSAqIChyb3RhdGUgPiAwID8gMSA6IC0xKTtcblx0ICAgICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICAgICBzd2l0Y2ggKG9yaWVudCkge1xuXHQgICAgICAgICAgICAgICAgY2FzZSBcImJvdHRvbVwiOlxuXHQgICAgICAgICAgICAgICAgICAgIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdGlja1RyYW5zZm9ybSA9IGF4aXNYO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBsaW5lRW50ZXIuYXR0cihcInkyXCIsIGlubmVyVGlja1NpemUpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0RW50ZXIuYXR0cihcInlcIiwgdGlja0xlbmd0aCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVVcGRhdGUuYXR0cihcIngxXCIsIHRpY2tYKS5hdHRyKFwieDJcIiwgdGlja1gpLmF0dHIoXCJ5MlwiLCB0aWNrU2l6ZSk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHRleHRVcGRhdGUuYXR0cihcInhcIiwgMCkuYXR0cihcInlcIiwgeUZvclRleHQocm90YXRlKSlcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zdHlsZShcInRleHQtYW5jaG9yXCIsIHRleHRBbmNob3JGb3JUZXh0KHJvdGF0ZSkpXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAuYXR0cihcInRyYW5zZm9ybVwiLCB0ZXh0VHJhbnNmb3JtKHJvdGF0ZSkpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0c3Bhbi5hdHRyKCd4JywgMCkuYXR0cihcImR5XCIsIHRzcGFuRHkpLmF0dHIoJ2R4JywgZHhGb3JUZXh0KHJvdGF0ZSkpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBwYXRoVXBkYXRlLmF0dHIoXCJkXCIsIFwiTVwiICsgcmFuZ2VbMF0gKyBcIixcIiArIG91dGVyVGlja1NpemUgKyBcIlYwSFwiICsgcmFuZ2VbMV0gKyBcIlZcIiArIG91dGVyVGlja1NpemUpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBjYXNlIFwidG9wXCI6XG5cdCAgICAgICAgICAgICAgICAgICAge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAvLyBUT0RPOiByb3RhdGVkIHRpY2sgdGV4dFxuXHQgICAgICAgICAgICAgICAgICAgICAgICB0aWNrVHJhbnNmb3JtID0gYXhpc1g7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVFbnRlci5hdHRyKFwieTJcIiwgLWlubmVyVGlja1NpemUpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0RW50ZXIuYXR0cihcInlcIiwgLXRpY2tMZW5ndGgpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBsaW5lVXBkYXRlLmF0dHIoXCJ4MlwiLCAwKS5hdHRyKFwieTJcIiwgLWlubmVyVGlja1NpemUpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0VXBkYXRlLmF0dHIoXCJ4XCIsIDApLmF0dHIoXCJ5XCIsIC10aWNrTGVuZ3RoKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdGV4dC5zdHlsZShcInRleHQtYW5jaG9yXCIsIFwibWlkZGxlXCIpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0c3Bhbi5hdHRyKCd4JywgMCkuYXR0cihcImR5XCIsIFwiMGVtXCIpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBwYXRoVXBkYXRlLmF0dHIoXCJkXCIsIFwiTVwiICsgcmFuZ2VbMF0gKyBcIixcIiArIC1vdXRlclRpY2tTaXplICsgXCJWMEhcIiArIHJhbmdlWzFdICsgXCJWXCIgKyAtb3V0ZXJUaWNrU2l6ZSk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIGNhc2UgXCJsZWZ0XCI6XG5cdCAgICAgICAgICAgICAgICAgICAge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0aWNrVHJhbnNmb3JtID0gYXhpc1k7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVFbnRlci5hdHRyKFwieDJcIiwgLWlubmVyVGlja1NpemUpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0RW50ZXIuYXR0cihcInhcIiwgLXRpY2tMZW5ndGgpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBsaW5lVXBkYXRlLmF0dHIoXCJ4MlwiLCAtaW5uZXJUaWNrU2l6ZSkuYXR0cihcInkxXCIsIHRpY2tZKS5hdHRyKFwieTJcIiwgdGlja1kpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0VXBkYXRlLmF0dHIoXCJ4XCIsIC10aWNrTGVuZ3RoKS5hdHRyKFwieVwiLCB0aWNrT2Zmc2V0KTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdGV4dC5zdHlsZShcInRleHQtYW5jaG9yXCIsIFwiZW5kXCIpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0c3Bhbi5hdHRyKCd4JywgLXRpY2tMZW5ndGgpLmF0dHIoXCJkeVwiLCB0c3BhbkR5KTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgcGF0aFVwZGF0ZS5hdHRyKFwiZFwiLCBcIk1cIiArIC1vdXRlclRpY2tTaXplICsgXCIsXCIgKyByYW5nZVswXSArIFwiSDBWXCIgKyByYW5nZVsxXSArIFwiSFwiICsgLW91dGVyVGlja1NpemUpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBjYXNlIFwicmlnaHRcIjpcblx0ICAgICAgICAgICAgICAgICAgICB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHRpY2tUcmFuc2Zvcm0gPSBheGlzWTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgbGluZUVudGVyLmF0dHIoXCJ4MlwiLCBpbm5lclRpY2tTaXplKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdGV4dEVudGVyLmF0dHIoXCJ4XCIsIHRpY2tMZW5ndGgpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBsaW5lVXBkYXRlLmF0dHIoXCJ4MlwiLCBpbm5lclRpY2tTaXplKS5hdHRyKFwieTJcIiwgMCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHRleHRVcGRhdGUuYXR0cihcInhcIiwgdGlja0xlbmd0aCkuYXR0cihcInlcIiwgMCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHRleHQuc3R5bGUoXCJ0ZXh0LWFuY2hvclwiLCBcInN0YXJ0XCIpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0c3Bhbi5hdHRyKCd4JywgdGlja0xlbmd0aCkuYXR0cihcImR5XCIsIHRzcGFuRHkpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBwYXRoVXBkYXRlLmF0dHIoXCJkXCIsIFwiTVwiICsgb3V0ZXJUaWNrU2l6ZSArIFwiLFwiICsgcmFuZ2VbMF0gKyBcIkgwVlwiICsgcmFuZ2VbMV0gKyBcIkhcIiArIG91dGVyVGlja1NpemUpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBpZiAoc2NhbGUxLnJhbmdlQmFuZCkge1xuXHQgICAgICAgICAgICAgICAgICAgIHZhciB4ID0gc2NhbGUxLCBkeCA9IHgucmFuZ2VCYW5kKCkgLyAyO1xuXHQgICAgICAgICAgICAgICAgICAgIHNjYWxlMCA9IHNjYWxlMSA9IGZ1bmN0aW9uIChkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB4KGQpICsgZHg7XG5cdCAgICAgICAgICAgICAgICAgICAgfTtcblx0ICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc2NhbGUwLnJhbmdlQmFuZCkge1xuXHQgICAgICAgICAgICAgICAgICAgIHNjYWxlMCA9IHNjYWxlMTtcblx0ICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICAgICAgdGlja0V4aXQuY2FsbCh0aWNrVHJhbnNmb3JtLCBzY2FsZTEpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgdGlja0VudGVyLmNhbGwodGlja1RyYW5zZm9ybSwgc2NhbGUwKTtcblx0ICAgICAgICAgICAgICAgIHRpY2tVcGRhdGUuY2FsbCh0aWNrVHJhbnNmb3JtLCBzY2FsZTEpO1xuXHQgICAgICAgICAgICB9KTtcblx0ICAgICAgICB9XG5cdCAgICAgICAgYXhpcy5zY2FsZSA9IGZ1bmN0aW9uICh4KSB7XG5cdCAgICAgICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgeyByZXR1cm4gc2NhbGU7IH1cblx0ICAgICAgICAgICAgc2NhbGUgPSB4O1xuXHQgICAgICAgICAgICByZXR1cm4gYXhpcztcblx0ICAgICAgICB9O1xuXHQgICAgICAgIGF4aXMub3JpZW50ID0gZnVuY3Rpb24gKHgpIHtcblx0ICAgICAgICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSB7IHJldHVybiBvcmllbnQ7IH1cblx0ICAgICAgICAgICAgb3JpZW50ID0geCBpbiB7dG9wOiAxLCByaWdodDogMSwgYm90dG9tOiAxLCBsZWZ0OiAxfSA/IHggKyBcIlwiIDogXCJib3R0b21cIjtcblx0ICAgICAgICAgICAgcmV0dXJuIGF4aXM7XG5cdCAgICAgICAgfTtcblx0ICAgICAgICBheGlzLnRpY2tGb3JtYXQgPSBmdW5jdGlvbiAoZm9ybWF0KSB7XG5cdCAgICAgICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgeyByZXR1cm4gdGlja0Zvcm1hdDsgfVxuXHQgICAgICAgICAgICB0aWNrRm9ybWF0ID0gZm9ybWF0O1xuXHQgICAgICAgICAgICByZXR1cm4gYXhpcztcblx0ICAgICAgICB9O1xuXHQgICAgICAgIGF4aXMudGlja0NlbnRlcmVkID0gZnVuY3Rpb24gKGlzQ2VudGVyZWQpIHtcblx0ICAgICAgICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSB7IHJldHVybiB0aWNrQ2VudGVyZWQ7IH1cblx0ICAgICAgICAgICAgdGlja0NlbnRlcmVkID0gaXNDZW50ZXJlZDtcblx0ICAgICAgICAgICAgcmV0dXJuIGF4aXM7XG5cdCAgICAgICAgfTtcblx0ICAgICAgICBheGlzLnRpY2tPZmZzZXQgPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHJldHVybiB0aWNrT2Zmc2V0O1xuXHQgICAgICAgIH07XG5cdCAgICAgICAgYXhpcy50aWNrSW50ZXJ2YWwgPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHZhciBpbnRlcnZhbCwgbGVuZ3RoO1xuXHQgICAgICAgICAgICBpZiAocGFyYW1zLmlzQ2F0ZWdvcnkpIHtcblx0ICAgICAgICAgICAgICAgIGludGVydmFsID0gdGlja09mZnNldCAqIDI7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgZWxzZSB7XG5cdCAgICAgICAgICAgICAgICBsZW5ndGggPSBheGlzLmcuc2VsZWN0KCdwYXRoLmRvbWFpbicpLm5vZGUoKS5nZXRUb3RhbExlbmd0aCgpIC0gb3V0ZXJUaWNrU2l6ZSAqIDI7XG5cdCAgICAgICAgICAgICAgICBpbnRlcnZhbCA9IGxlbmd0aCAvIGF4aXMuZy5zZWxlY3RBbGwoJ2xpbmUnKS5zaXplKCk7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIGludGVydmFsID09PSBJbmZpbml0eSA/IDAgOiBpbnRlcnZhbDtcblx0ICAgICAgICB9O1xuXHQgICAgICAgIGF4aXMudGlja3MgPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgeyByZXR1cm4gdGlja0FyZ3VtZW50czsgfVxuXHQgICAgICAgICAgICB0aWNrQXJndW1lbnRzID0gYXJndW1lbnRzO1xuXHQgICAgICAgICAgICByZXR1cm4gYXhpcztcblx0ICAgICAgICB9O1xuXHQgICAgICAgIGF4aXMudGlja0N1bGxpbmcgPSBmdW5jdGlvbiAoY3VsbGluZykge1xuXHQgICAgICAgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHsgcmV0dXJuIHRpY2tDdWxsaW5nOyB9XG5cdCAgICAgICAgICAgIHRpY2tDdWxsaW5nID0gY3VsbGluZztcblx0ICAgICAgICAgICAgcmV0dXJuIGF4aXM7XG5cdCAgICAgICAgfTtcblx0ICAgICAgICBheGlzLnRpY2tWYWx1ZXMgPSBmdW5jdGlvbiAoeCkge1xuXHQgICAgICAgICAgICBpZiAodHlwZW9mIHggPT09ICdmdW5jdGlvbicpIHtcblx0ICAgICAgICAgICAgICAgIHRpY2tWYWx1ZXMgPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHgoc2NhbGUuZG9tYWluKCkpO1xuXHQgICAgICAgICAgICAgICAgfTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgeyByZXR1cm4gdGlja1ZhbHVlczsgfVxuXHQgICAgICAgICAgICAgICAgdGlja1ZhbHVlcyA9IHg7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIGF4aXM7XG5cdCAgICAgICAgfTtcblx0ICAgICAgICByZXR1cm4gYXhpcztcblx0ICAgIH1cblx0XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5pc1NhZmFyaSA9IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICB2YXIgdWEgPSB3aW5kb3cubmF2aWdhdG9yLnVzZXJBZ2VudDtcblx0ICAgICAgICByZXR1cm4gdWEuaW5kZXhPZignU2FmYXJpJykgPj0gMCAmJiB1YS5pbmRleE9mKCdDaHJvbWUnKSA8IDA7XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uaXNDaHJvbWUgPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgdmFy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0aGUgbGlzdC5cblx0ICAgICAgICAgICAgIGlmIChpbmRleCA+IHRoaXMubnVtYmVyT2ZJdGVtcylcblx0ICAgICAgICAgICAgICAgICBpbmRleCA9IHRoaXMubnVtYmVyT2ZJdGVtcztcblx0ICAgICAgICAgICAgIGlmIChuZXdJdGVtLl9vd25pbmdQYXRoU2VnTGlzdCkge1xuXHQgICAgICAgICAgICAgICAgIC8vIFNWRzIgc3BlYyBzYXlzIHRvIG1ha2UgYSBjb3B5LlxuXHQgICAgICAgICAgICAgICAgIG5ld0l0ZW0gPSBuZXdJdGVtLmNsb25lKCk7XG5cdCAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICB0aGlzLl9saXN0LnNwbGljZShpbmRleCwgMCwgbmV3SXRlbSk7XG5cdCAgICAgICAgICAgICBuZXdJdGVtLl9vd25pbmdQYXRoU2VnTGlzdCA9IHRoaXM7XG5cdCAgICAgICAgICAgICB0aGlzLl93cml0ZUxpc3RUb1BhdGgoKTtcblx0ICAgICAgICAgICAgIHJldHVybiBuZXdJdGVtO1xuXHQgICAgICAgICB9XG5cdFxuXHQgICAgICAgICBTVkdQYXRoU2VnTGlzdC5wcm90b3R5cGUucmVwbGFjZUl0ZW0gPSBmdW5jdGlvbihuZXdJdGVtLCBpbmRleCkge1xuXHQgICAgICAgICAgICAgdGhpcy5fY2hlY2tQYXRoU3luY2hyb25pemVkVG9MaXN0KCk7XG5cdFxuXHQgICAgICAgICAgICAgaWYgKG5ld0l0ZW0uX293bmluZ1BhdGhTZWdMaXN0KSB7XG5cdCAgICAgICAgICAgICAgICAgLy8gU1ZHMiBzcGVjIHNheXMgdG8gbWFrZSBhIGNvcHkuXG5cdCAgICAgICAgICAgICAgICAgbmV3SXRlbSA9IG5ld0l0ZW0uY2xvbmUoKTtcblx0ICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgIHRoaXMuX2NoZWNrVmFsaWRJbmRleChpbmRleCk7XG5cdCAgICAgICAgICAgICB0aGlzLl9saXN0W2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hcnNlci5jcHAuXG5cdCAgICAgICAgIFNWR1BhdGhTZWdMaXN0LnByb3RvdHlwZS5fcGFyc2VQYXRoID0gZnVuY3Rpb24oc3RyaW5nKSB7XG5cdCAgICAgICAgICAgICBpZiAoIXN0cmluZyB8fCBzdHJpbmcubGVuZ3RoID09IDApXG5cdCAgICAgICAgICAgICAgICAgcmV0dXJuIFtdO1xuXHRcblx0ICAgICAgICAgICAgIHZhciBvd25pbmdQYXRoU2VnTGlzdCA9IHRoaXM7XG5cdFxuXHQgICAgICAgICAgICAgdmFyIEJ1aWxkZXIgPSBmdW5jdGlvbigpIHtcblx0ICAgICAgICAgICAgICAgICB0aGlzLnBhdGhTZWdMaXN0ID0gW107XG5cdCAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgQnVpbGRlci5wcm90b3R5cGUuYXBwZW5kU2VnbWVudCA9IGZ1bmN0aW9uKHBhdGhTZWcpIHtcblx0ICAgICAgICAgICAgICAgICB0aGlzLnBhdGhTZWdMaXN0LnB1c2gocGF0aFNlZyk7XG5cdCAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgdmFyIFNvdXJjZSA9IGZ1bmN0aW9uKHN0cmluZykge1xuXHQgICAgICAgICAgICAgICAgIHRoaXMuX3N0cmluZyA9IHN0cmluZztcblx0ICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50SW5kZXggPSAwO1xuXHQgICAgICAgICAgICAgICAgIHRoaXMuX2VuZEluZGV4ID0gdGhpcy5fc3RyaW5nLmxlbmd0aDtcblx0ICAgICAgICAgICAgICAgICB0aGlzLl9wcmV2aW91c0NvbW1hbmQgPSBTVkdQYXRoU2VnLlBBVEhTRUdfVU5LTk9XTjtcblx0XG5cdCAgICAgICAgICAgICAgICAgdGhpcy5fc2tpcE9wdGlvbmFsU3BhY2VzKCk7XG5cdCAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgU291cmNlLnByb3RvdHlwZS5faXNDdXJyZW50U3BhY2UgPSBmdW5jdGlvbigpIHtcblx0ICAgICAgICAgICAgICAgICB2YXIgY2hhcmFjdGVyID0gdGhpcy5fc3RyaW5nW3RoaXMuX2N1cnJlbnRJbmRleF07XG5cdCAgICAgICAgICAgICAgICAgcmV0dXJuIGNoYXJhY3RlciA8PSBcIiBcIiAmJiAoY2hhcmFjdGVyID09IFwiIFwiIHx8IGNoYXJhY3RlciA9PSBcIlxcblwiIHx8IGNoYXJhY3RlciA9PSBcIlxcdFwiIHx8IGNoYXJhY3RlciA9PSBcIlxcclwiIHx8IGNoYXJhY3RlciA9PSBcIlxcZlwiKTtcblx0ICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICBTb3VyY2UucHJvdG90eXBlLl9za2lwT3B0aW9uYWxTcGFjZXMgPSBmdW5jdGlvbigpIHtcblx0ICAgICAgICAgICAgICAgICB3aGlsZSAodGhpcy5fY3VycmVudEluZGV4IDwgdGhpcy5fZW5kSW5kZXggJiYgdGhpcy5faXNDdXJyZW50U3BhY2UoKSlcblx0ICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEluZGV4Kys7XG5cdCAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2N1cnJlbnRJbmRleCA8IHRoaXMuX2VuZEluZGV4O1xuXHQgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUuX3NraXBPcHRpb25hbFNwYWNlc09yRGVsaW1pdGVyID0gZnVuY3Rpb24oKSB7XG5cdCAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRJbmRleCA8IHRoaXMuX2VuZEluZGV4ICYmICF0aGlzLl9pc0N1cnJlbnRTcGFjZSgpICYmIHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSAhPSBcIixcIilcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuXHQgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9za2lwT3B0aW9uYWxTcGFjZXMoKSkge1xuXHQgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fY3VycmVudEluZGV4IDwgdGhpcy5fZW5kSW5kZXggJiYgdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpID09IFwiLFwiKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50SW5kZXgrKztcblx0ICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NraXBPcHRpb25hbFNwYWNlcygpO1xuXHQgICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9jdXJyZW50SW5kZXggPCB0aGlzLl9lbmRJbmRleDtcblx0ICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICBTb3VyY2UucHJvdG90eXBlLmhhc01vcmVEYXRhID0gZnVuY3Rpb24oKSB7XG5cdCAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2N1cnJlbnRJbmRleCA8IHRoaXMuX2VuZEluZGV4O1xuXHQgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUucGVla1NlZ21lbnRUeXBlID0gZnVuY3Rpb24oKSB7XG5cdCAgICAgICAgICAgICAgICAgdmFyIGxvb2thaGVhZCA9IHRoaXMuX3N0cmluZ1t0aGlzLl9jdXJyZW50SW5kZXhdO1xuXHQgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9wYXRoU2VnVHlwZUZyb21DaGFyKGxvb2thaGVhZCk7XG5cdCAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgU291cmNlLnByb3RvdHlwZS5fcGF0aFNlZ1R5cGVGcm9tQ2hhciA9IGZ1bmN0aW9uKGxvb2thaGVhZCkge1xuXHQgICAgICAgICAgICAgICAgIHN3aXRjaCAobG9va2FoZWFkKSB7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBcIlpcIjpcblx0ICAgICAgICAgICAgICAgICBjYXNlIFwielwiOlxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0NMT1NFUEFUSDtcblx0ICAgICAgICAgICAgICAgICBjYXNlIFwiTVwiOlxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX01PVkVUT19BQlM7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBcIm1cIjpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19NT1ZFVE9fUkVMO1xuXHQgICAgICAgICAgICAgICAgIGNhc2UgXCJMXCI6XG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfTElORVRPX0FCUztcblx0ICAgICAgICAgICAgICAgICBjYXNlIFwibFwiOlxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0xJTkVUT19SRUw7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBcIkNcIjpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19DVVJWRVRPX0NVQklDX0FCUztcblx0ICAgICAgICAgICAgICAgICBjYXNlIFwiY1wiOlxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0NVUlZFVE9fQ1VCSUNfUkVMO1xuXHQgICAgICAgICAgICAgICAgIGNhc2UgXCJRXCI6XG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfQ1VSVkVUT19RVUFEUkFUSUNfQUJTO1xuXHQgICAgICAgICAgICAgICAgIGNhc2UgXCJxXCI6XG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfQ1VSVkVUT19RVUFEUkFUSUNfUkVMO1xuXHQgICAgICAgICAgICAgICAgIGNhc2UgXCJBXCI6XG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfQVJDX0FCUztcblx0ICAgICAgICAgICAgICAgICBjYXNlIFwiYVwiOlxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0FSQ19SRUw7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBcIkhcIjpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19MSU5FVE9fSE9SSVpPTlRBTF9BQlM7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBcImhcIjpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19MSU5FVE9fSE9SSVpPTlRBTF9SRUw7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBcIlZcIjpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19MSU5FVE9fVkVSVElDQUxfQUJTO1xuXHQgICAgICAgICAgICAgICAgIGNhc2UgXCJ2XCI6XG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfTElORVRPX1ZFUlRJQ0FMX1JFTDtcblx0ICAgICAgICAgICAgICAgICBjYXNlIFwiU1wiOlxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0NVUlZFVE9fQ1VCSUNfU01PT1RIX0FCUztcblx0ICAgICAgICAgICAgICAgICBjYXNlIFwic1wiOlxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0NVUlZFVE9fQ1VCSUNfU01PT1RIX1JFTDtcblx0ICAgICAgICAgICAgICAgICBjYXNlIFwiVFwiOlxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0NVUlZFVE9fUVVBRFJBVElDX1NNT09USF9BQlM7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBcInRcIjpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19DVVJWRVRPX1FVQURSQVRJQ19TTU9PVEhfUkVMO1xuXHQgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfVU5LTk9XTjtcblx0ICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgU291cmNlLnByb3RvdHlwZS5fbmV4dENvbW1hbmRIZWxwZXIgPSBmdW5jdGlvbihsb29rYWhlYWQsIHByZXZpb3VzQ29tbWFuZCkge1xuXHQgICAgICAgICAgICAgICAgIC8vIENoZWNrIGZvciByZW1haW5pbmcgY29vcmRpbmF0ZXMgaW4gdGhlIGN1cnJlbnQgY29tbWFuZC5cblx0ICAgICAgICAgICAgICAgICBpZiAoKGxvb2thaGVhZCA9PSBcIitcIiB8fCBsb29rYWhlYWQgPT0gXCItXCIgfHwgbG9va2FoZWFkID09IFwiLlwiIHx8IChsb29rYWhlYWQgPj0gXCIwXCIgJiYgbG9va2FoZWFkIDw9IFwiOVwiKSkgJiYgcHJldmlvdXNDb21tYW5kICE9IFNWR1BhdGhTZWcuUEFUSFNFR19DTE9TRVBBVEgpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZpb3VzQ29tbWFuZCA9PSBTVkdQYXRoU2VnLlBBVEhTRUdfTU9WRVRPX0FCUylcblx0ICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfTElORVRPX0FCUztcblx0ICAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZpb3VzQ29tbWFuZCA9PSBTVkdQYXRoU2VnLlBBVEhTRUdfTU9WRVRPX1JFTClcblx0ICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfTElORVRPX1JFTDtcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHByZXZpb3VzQ29tbWFuZDtcblx0ICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19VTktOT1dOO1xuXHQgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUuaW5pdGlhbENvbW1hbmRJc01vdmVUbyA9IGZ1bmN0aW9uKCkge1xuXHQgICAgICAgICAgICAgICAgIC8vIElmIHRoZSBwYXRoIGlzIGVtcHR5IGl0IGlzIHN0aWxsIHZhbGlkLCBzbyByZXR1cm4gdHJ1ZS5cblx0ICAgICAgICAgICAgICAgICBpZiAoIXRoaXMuaGFzTW9yZURhdGEoKSlcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG5cdCAgICAgICAgICAgICAgICAgdmFyIGNvbW1hbmQgPSB0aGlzLnBlZWtTZWdtZW50VHlwZSgpO1xuXHQgICAgICAgICAgICAgICAgIC8vIFBhdGggbXVzdCBzdGFydCB3aXRoIG1vdmVUby5cblx0ICAgICAgICAgICAgICAgICByZXR1cm4gY29tbWFuZCA9PSBTVkdQYXRoU2VnLlBBVEhTRUdfTU9WRVRPX0FCUyB8fCBjb21tYW5kID09IFNWR1BhdGhTZWcuUEFUSFNFR19NT1ZFVE9fUkVMO1xuXHQgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgIC8vIFBhcnNlIGEgbnVtYmVyIGZyb20gYW4gU1ZHIHBhdGguIFRoaXMgdmVyeSBjbG9zZWx5IGZvbGxvd3MgZ2VuZXJpY1BhcnNlTnVtYmVyKC4uLikgZnJvbSBTb3VyY2UvY29yZS9zdmcvU1ZHUGFyc2VyVXRpbGl0aWVzLmNwcC5cblx0ICAgICAgICAgICAgIC8vIFNwZWM6IGh0dHA6Ly93d3cudzMub3JnL1RSL1NWRzExL3NpbmdsZS1wYWdlLmh0bWwjcGF0aHMtUGF0aERhdGFCTkZcblx0ICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUuX3BhcnNlTnVtYmVyID0gZnVuY3Rpb24oKSB7XG5cdCAgICAgICAgICAgICAgICAgdmFyIGV4cG9uZW50ID0gMDtcblx0ICAgICAgICAgICAgICAgICB2YXIgaW50ZWdlciA9IDA7XG5cdCAgICAgICAgICAgICAgICAgdmFyIGZyYWMgPSAxO1xuXHQgICAgICAgICAgICAgICAgIHZhciBkZWNpbWFsID0gMDtcblx0ICAgICAgICAgICAgICAgICB2YXIgc2lnbiA9IDE7XG5cdCAgICAgICAgICAgICAgICAgdmFyIGV4cHNpZ24gPSAxO1xuXHRcblx0ICAgICAgICAgICAgICAgICB2YXIgc3RhcnRJbmRleCA9IHRoaXMuX2N1cnJlbnRJbmRleDtcblx0XG5cdCAgICAgICAgICAgICAgICAgdGhpcy5fc2tpcE9wdGlvbmFsU3BhY2VzKCk7XG5cdFxuXHQgICAgICAgICAgICAgICAgIC8vIFJlYWQgdGhlIHNpZ24uXG5cdCAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRJbmRleCA8IHRoaXMuX2VuZEluZGV4ICYmIHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSA9PSBcIitcIilcblx0ICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEluZGV4Kys7XG5cdCAgICAgICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5fY3VycmVudEluZGV4IDwgdGhpcy5fZW5kSW5kZXggJiYgdGh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bnRJbmRleCsrOyAvLyBBZHZhbmNlIHRvIGZpcnN0IG5vbi1kaWdpdC5cblx0XG5cdCAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRJbmRleCAhPSBzdGFydEludFBhcnRJbmRleCkge1xuXHQgICAgICAgICAgICAgICAgICAgICB2YXIgc2NhbkludFBhcnRJbmRleCA9IHRoaXMuX2N1cnJlbnRJbmRleCAtIDE7XG5cdCAgICAgICAgICAgICAgICAgICAgIHZhciBtdWx0aXBsaWVyID0gMTtcblx0ICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHNjYW5JbnRQYXJ0SW5kZXggPj0gc3RhcnRJbnRQYXJ0SW5kZXgpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgIGludGVnZXIgKz0gbXVsdGlwbGllciAqICh0aGlzLl9zdHJpbmcuY2hhckF0KHNjYW5JbnRQYXJ0SW5kZXgtLSkgLSBcIjBcIik7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICBtdWx0aXBsaWVyICo9IDEwO1xuXHQgICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgICAgICAvLyBSZWFkIHRoZSBkZWNpbWFscy5cblx0ICAgICAgICAgICAgICAgICBpZiAodGhpcy5fY3VycmVudEluZGV4IDwgdGhpcy5fZW5kSW5kZXggJiYgdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpID09IFwiLlwiKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJbmRleCsrO1xuXHRcblx0ICAgICAgICAgICAgICAgICAgICAgLy8gVGhlcmUgbXVzdCBiZSBhIGxlYXN0IG9uZSBkaWdpdCBmb2xsb3dpbmcgdGhlIC5cblx0ICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRJbmRleCA+PSB0aGlzLl9lbmRJbmRleCB8fCB0aGlzL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AgICAgICB0aGlzLl9jdXJyZW50SW5kZXgrKztcblx0XG5cdCAgICAgICAgICAgICAgICAgICAgIC8vIFJlYWQgdGhlIHNpZ24gb2YgdGhlIGV4cG9uZW50LlxuXHQgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpID09IFwiK1wiKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50SW5kZXgrKztcblx0ICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPT0gXCItXCIpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJbmRleCsrO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgZXhwc2lnbiA9IC0xO1xuXHQgICAgICAgICAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgICAgICAgICAvLyBUaGVyZSBtdXN0IGJlIGFuIGV4cG9uZW50LlxuXHQgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fY3VycmVudEluZGV4ID49IHRoaXMuX2VuZEluZGV4IHx8IHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSA8IFwiMFwiIHx8IHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSA+IFwiOVwiKVxuXHQgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcblx0XG5cdCAgICAgICAgICAgICAgICAgICAgIHdoaWxlICh0aGlzLl9jdXJyZW50SW5kZXggPCB0aGlzLl9lbmRJbmRleCAmJiB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPj0gXCIwXCIgJiYgdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpIDw9IFwiOVwiKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICBleHBvbmVudCAqPSAxMDtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgIGV4cG9uZW50ICs9ICh0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgLSBcIjBcIik7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50SW5kZXgrKztcblx0ICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICAgICAgdmFyIG51bWJlciA9IGludGVnZXIgKyBkZWNpbWFsO1xuXHQgICAgICAgICAgICAgICAgIG51bWJlciAqPSBzaWduO1xuXHRcblx0ICAgICAgICAgICAgICAgICBpZiAoZXhwb25lbnQpXG5cdCAgICAgICAgICAgICAgICAgICAgIG51bWJlciAqPSBNYXRoLnBvdygxMCwgZXhwc2lnbiAqIGV4cG9uZW50KTtcblx0XG5cdCAgICAgICAgICAgICAgICAgaWYgKHN0YXJ0SW5kZXggPT0gdGhpcy5fY3VycmVudEluZGV4KVxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuXHRcblx0ICAgICAgICAgICAgICAgICB0aGlzLl9za2lwT3B0aW9uYWxTcGFjZXNPckRlbGltaXRlcigpO1xuXHRcblx0ICAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyO1xuXHQgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUuX3BhcnNlQXJjRmxhZyA9IGZ1bmN0aW9uKCkge1xuXHQgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50SW5kZXggPj0gdGhpcy5fZW5kSW5kZXgpXG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG5cdCAgICAgICAgICAgICAgICAgdmFyIGZsYWcgPSBmYWxzZTtcblx0ICAgICAgICAgICAgICAgICB2YXIgZmxhZ0NoYXIgPSB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCsrKTtcblx0ICAgICAgICAgICAgICAgICBpZiAoZmxhZ0NoYXIgPT0gXCIwXCIpXG5cdCAgICAgICAgICAgICAgICAgICAgIGZsYWcgPSBmYWxzZTtcblx0ICAgICAgICAgICAgICAgICBlbHNlIGlmIChmbGFnQ2hhciA9PSBcIjFcIilcblx0ICAgICAgICAgICAgICAgICAgICAgZmxhZyA9IHRydWU7XG5cdCAgICAgICAgICAgICAgICAgZWxzZVxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuXHRcblx0ICAgICAgICAgICAgICAgICB0aGlzLl9za2lwT3B0aW9uYWxTcGFjZXNPckRlbGltaXRlcigpO1xuXHQgICAgICAgICAgICAgICAgIHJldHVybiBmbGFnO1xuXHQgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUucGFyc2VTZWdtZW50ID0gZnVuY3Rpb24oKSB7XG5cdCAgICAgICAgICAgICAgICAgdmFyIGxvb2thaGVhZCA9IHRoaXMuX3N0cmluZ1t0aGlzLl9jdXJyZW50SW5kZXhdO1xuXHQgICAgICAgICAgICAgICAgIHZhciBjb21tYW5kID0gdGhpcy5fcGF0aFNlZ1R5cGVGcm9tQ2hhcihsb29rYWhlYWQpO1xuXHQgICAgICAgICAgICAgICAgIGlmIChjb21tYW5kID09IFNWR1BhdGhTZWcuUEFUSFNFR19VTktOT1dOKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgIC8vIFBvc3NpYmx5IGFuIGltcGxpY2l0IGNvbW1hbmQuIE5vdCBhbGxvd2VkIGlmIHRoaXMgaXMgdGhlIGZpcnN0IGNvbW1hbmQuXG5cdCAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9wcmV2aW91c0NvbW1hbmQgPT0gU1ZHUGF0aFNlZy5QQVRIU0VHX1VOS05PV04pXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcblx0ICAgICAgICAgICAgICAgICAgICAgY29tbWFuZCA9IHRoaXMuX25leHRDb21tYW5kSGVscGVyKGxvb2thaGVhZCwgdGhpcy5fcHJldmlvdXNDb21tYW5kKTtcblx0ICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbW1hbmQgPT0gU1ZHUGF0aFNlZy5QQVRIU0VHX1VOS05PV04pXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcblx0ICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50SW5kZXgrKztcblx0ICAgICAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgICAgIHRoaXMuX3ByZXZpb3VzQ29tbWFuZCA9IGNvbW1hbmQ7XG5cdFxuXHQgICAgICAgICAgICAgICAgIHN3aXRjaCAoY29tbWFuZCkge1xuXHQgICAgICAgICAgICAgICAgIGNhc2UgU1ZHUGF0aFNlZy5QQVRIU0VHX01PVkVUT19SRUw6XG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgU1ZHUGF0aFNlZ01vdmV0b1JlbChvd25pbmdQYXRoU2VnTGlzdCwgdGhpcy5fcGFyc2VOdW1iZXIoKSwgdGhpcy5fcGFyc2VOdW1iZXIoKSk7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBTVkdQYXRoU2VnLlBBVEhTRUdfTU9WRVRPX0FCUzpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBTVkdQYXRoU2VnTW92ZXRvQWJzKG93bmluZ1BhdGhTZWdMaXN0LCB0aGlzLl9wYXJzZU51bWJlcigpLCB0aGlzLl9wYXJzZU51bWJlcigpKTtcblx0ICAgICAgICAgICAgICAgICBjYXNlIFNWR1BhdGhTZWcuUEFUSF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bnRzLmFyY1N3ZWVwKTtcblx0ICAgICAgICAgICAgICAgICBjYXNlIFNWR1BhdGhTZWcuUEFUSFNFR19BUkNfQUJTOlxuXHQgICAgICAgICAgICAgICAgICAgICB2YXIgcG9pbnRzID0ge3gxOiB0aGlzLl9wYXJzZU51bWJlcigpLCB5MTogdGhpcy5fcGFyc2VOdW1iZXIoKSwgYXJjQW5nbGU6IHRoaXMuX3BhcnNlTnVtYmVyKCksIGFyY0xhcmdlOiB0aGlzLl9wYXJzZUFyY0ZsYWcoKSwgYXJjU3dlZXA6IHRoaXMuX3BhcnNlQXJjRmxhZygpLCB4OiB0aGlzLl9wYXJzZU51bWJlcigpLCB5OiB0aGlzLl9wYXJzZU51bWJlcigpfTtcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBTVkdQYXRoU2VnQXJjQWJzKG93bmluZ1BhdGhTZWdMaXN0LCBwb2ludHMueCwgcG9pbnRzLnksIHBvaW50cy54MSwgcG9pbnRzLnkxLCBwb2ludHMuYXJjQW5nbGUsIHBvaW50cy5hcmNMYXJnZSwgcG9pbnRzLmFyY1N3ZWVwKTtcblx0ICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuXHQgICAgICAgICAgICAgICAgICAgICB0aHJvdyBcIlVua25vd24gcGF0aCBzZWcgdHlwZS5cIlxuXHQgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICB2YXIgYnVpbGRlciA9IG5ldyBCdWlsZGVyKCk7XG5cdCAgICAgICAgICAgICB2YXIgc291cmNlID0gbmV3IFNvdXJjZShzdHJpbmcpO1xuXHRcblx0ICAgICAgICAgICAgIGlmICghc291cmNlLmluaXRpYWxDb21tYW5kSXNNb3ZlVG8oKSlcblx0ICAgICAgICAgICAgICAgICByZXR1cm4gW107XG5cdCAgICAgICAgICAgICB3aGlsZSAoc291cmNlLmhhc01vcmVEYXRhKCkpIHtcblx0ICAgICAgICAgICAgICAgICB2YX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B1bmRlZmluZWQ7XG5cdCAgICAgIH1cblx0ICAgICAgYXJyYXkgPSBhcnJheXNbMF07XG5cdFxuXHQgICAgICB2YXIgaW5kZXggPSAtMSxcblx0ICAgICAgICAgIHNlZW4gPSBjYWNoZXNbMF07XG5cdFxuXHQgICAgICBvdXRlcjpcblx0ICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGggJiYgcmVzdWx0Lmxlbmd0aCA8IG1heExlbmd0aCkge1xuXHQgICAgICAgIHZhciB2YWx1ZSA9IGFycmF5W2luZGV4XSxcblx0ICAgICAgICAgICAgY29tcHV0ZWQgPSBpdGVyYXRlZSA/IGl0ZXJhdGVlKHZhbHVlKSA6IHZhbHVlO1xuXHRcblx0ICAgICAgICB2YWx1ZSA9IChjb21wYXJhdG9yIHx8IHZhbHVlICE9PSAwKSA/IHZhbHVlIDogMDtcblx0ICAgICAgICBpZiAoIShzZWVuXG5cdCAgICAgICAgICAgICAgPyBjYWNoZUhhcyhzZWVuLCBjb21wdXRlZClcblx0ICAgICAgICAgICAgICA6IGluY2x1ZGVzKHJlc3VsdCwgY29tcHV0ZWQsIGNvbXBhcmF0b3IpXG5cdCAgICAgICAgICAgICkpIHtcblx0ICAgICAgICAgIG90aEluZGV4ID0gb3RoTGVuZ3RoO1xuXHQgICAgICAgICAgd2hpbGUgKC0tb3RoSW5kZXgpIHtcblx0ICAgICAgICAgICAgdmFyIGNhY2hlID0gY2FjaGVzW290aEluZGV4XTtcblx0ICAgICAgICAgICAgaWYgKCEoY2FjaGVcblx0ICAgICAgICAgICAgICAgICAgPyBjYWNoZUhhcyhjYWNoZSwgY29tcHV0ZWQpXG5cdCAgICAgICAgICAgICAgICAgIDogaW5jbHVkZXMoYXJyYXlzW290aEluZGV4XSwgY29tcHV0ZWQsIGNvbXBhcmF0b3IpKVxuXHQgICAgICAgICAgICAgICAgKSB7XG5cdCAgICAgICAgICAgICAgY29udGludWUgb3V0ZXI7XG5cdCAgICAgICAgICAgIH1cblx0ICAgIC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dGlvbiBiYXNlSXNNYXRjaChvYmplY3QsIHNvdXJjZSwgbWF0Y2hEYXRhLCBjdXN0b21pemVyKSB7XG5cdCAgICAgIHZhciBpbmRleCA9IG1hdGNoRGF0YS5sZW5ndGgsXG5cdCAgICAgICAgICBsZW5ndGggPSBpbmRleCxcblx0ICAgICAgICAgIG5vQ3VzdG9taXplciA9ICFjdXN0b21pemVyO1xuXHRcblx0ICAgICAgaWYgKG9iamVjdCA9PSBudWxsKSB7XG5cdCAgICAgICAgcmV0dXJuICFsZW5ndGg7XG5cdCAgICAgIH1cblx0ICAgICAgb2JqZWN0ID0gT2JqZWN0KG9iamVjdCk7XG5cdCAgICAgIHdoaWxlIChpbmRleC0tKSB7XG5cdCAgICAgICAgdmFyIGRhdGEgPSBtYXRjaERhdGFbaW5kZXhdO1xuXHQgICAgICAgIGlmICgobm9DdXN0b21pemVyICYmIGRhdGFbMl0pXG5cdCAgICAgICAgICAgICAgPyBkYXRhWzFdICE9PSBvYmplY3RbZGF0YVswXV1cblx0ICAgICAgICAgICAgICA6ICEoZGF0YVswXSBpbiBvYmplY3QpXG5cdCAgICAgICAgICAgICkge1xuXHQgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuXHQgICAgICAgIH1cblx0ICAgICAgfVxuXHQgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkge1xuXHQgICAgICAgIGRhdGEgPSBtYXRjaERhdGFbaW5kZXhdO1xuXHQgICAgICAgIHZhciBrZXkgPSBkYXRhWzBdLFxuXHQgICAgICAgICAgICBvYmpWYWx1ZSA9IG9iamVjdFtrZXldLFxuXHQgICAgICAgICAgICBzcmNWYWx1ZSA9IGRhdGFbMV07XG5cdFxuXHQgICAgICAgIGlmIChub0N1c3RvbWl6ZXIgJiYgZGF0YVsyXSkge1xuXHQgICAgICAgICAgaWYgKG9ialZhbHVlID09PSB1bmRlZmluZWQgJiYgIShrZXkgaW4gb2JqZWN0KSkge1xuXHQgICAgICAgICAgICByZXR1cm4gZm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MQUcgfCBXUkFQX1BBUlRJQUxfRkxBRyB8IFdSQVBfUkVBUkdfRkxBRykgJiZcblx0ICAgICAgICAgICAgICAgICFkYXRhWzRdLmxlbmd0aCAmJiBkYXRhWzldID09IDFcblx0ICAgICAgICAgICAgICApIHtcblx0ICAgICAgICAgICAgd3JhcHBlciA9IHdyYXBwZXJbZ2V0RnVuY05hbWUoZGF0YVswXSldLmFwcGx5KHdyYXBwZXIsIGRhdGFbM10pO1xuXHQgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgd3JhcHBlciA9IChmdW5jLmxlbmd0aCA9PSAxICYmIGlzTGF6aWFibGUoZnVuYykpXG5cdCAgICAgICAgICAgICAgPyB3cmFwcGVyW2Z1bmNOYW1lXSgpXG5cdCAgICAgICAgICAgICAgOiB3cmFwcGVyLnRocnUoZnVuYyk7XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHJldHVybiBmdW5jdGlvbigpIHtcblx0ICAgICAgICAgIHZhciBhcmdzID0gYXJndW1lbnRzLFxuXHQgICAgICAgICAgICAgIHZhbHVlID0gYXJnc1swXTtcblx0XG5cdCAgICAgICAgICBpZiAod3JhcHBlciAmJiBhcmdzLmxlbmd0aCA9PSAxICYmIGlzQXJyYXkodmFsdWUpKSB7XG5cdCAgICAgICAgICAgIHJldHVybiB3cmFwcGVyLnBsYW50KHZhbHVlKS52YWx1ZSgpO1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgICAgdmFyIGluZGV4ID0gMCxcblx0ICAgICAgICAgICAgICByZXN1bHQgPSBsZW5ndGggPyBmdW5jc1tpbmRleF0uYXBwbHkodGhpcywgYXJncykgOiB2YWx1ZTtcblx0XG5cdCAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkge1xuXHQgICAgICAgICAgICByZXN1bHQgPSBmdW5jc1tpbmRleF0uY2FsbCh0aGlzLCByZXN1bHQpO1xuXHQgICAgICAgICAgfVxuXHQgICAgICAg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gfVxuXHRcblx0ICAgIC8qKlxuXHQgICAgICogQ29udmVydHMgYHZhbHVlYCB0byBhIGZpbml0ZSBudW1iZXIuXG5cdCAgICAgKlxuXHQgICAgICogQHN0YXRpY1xuXHQgICAgICogQG1lbWJlck9mIF9cblx0ICAgICAqIEBzaW5jZSA0LjEyLjBcblx0ICAgICAqIEBjYXRlZ29yeSBMYW5nXG5cdCAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjb252ZXJ0LlxuXHQgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgY29udmVydGVkIG51bWJlci5cblx0ICAgICAqIEBleGFtcGxlXG5cdCAgICAgKlxuXHQgICAgICogXy50b0Zpbml0ZSgzLjIpO1xuXHQgICAgICogLy8gPT4gMy4yXG5cdCAgICAgKlxuXHQgICAgICogXy50b0Zpbml0ZShOdW1iZXIuTUlOX1ZBTFVFKTtcblx0ICAgICAqIC8vID0+IDVlLTMyNFxuXHQgICAgICpcblx0ICAgICAqIF8udG9GaW5pdGUoSW5maW5pdHkpO1xuXHQgICAgICogLy8gPT4gMS43OTc2OTMxMzQ4NjIzMTU3ZSszMDhcblx0ICAgICAqXG5cdCAgICAgKiBfLnRvRmluaXRlKCczLjInKTtcblx0ICAgICAqIC8vID0+IDMuMlxuXHQgICAgICovXG5cdCAgICBmdW5jdGlvbiB0b0Zpbml0ZSh2YWx1ZSkge1xuXHQgICAgICBpZiAoIXZhbHVlKSB7XG5cdCAgICAgICAgcmV0dXJuIHZhbHVlID09PSAwID8gdmFsdWUgOiAwO1xuXHQgICAgICB9XG5cdCAgICAgIHZhbHVlID0gdG9OdW1iZXIodmFsdWUpO1xuXHQgICAgICBpZiAodmFsdWUgPT09IElORklOSVRZIHx8IHZhbHVlID09PSAtSU5GSU5JVFkpIHtcblx0ICAgICAgICB2YXIgc2lnbiA9ICh2YWx1ZSA8IDAgPyAtMSA6IDEpO1xuXHQgICAgICAgIHJldHVybiBzaWduICogTUF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dCAgICAgIGlmIChmbG9hdGluZyA9PT0gdW5kZWZpbmVkKSB7XG5cdCAgICAgICAgaWYgKHR5cGVvZiB1cHBlciA9PSAnYm9vbGVhbicpIHtcblx0ICAgICAgICAgIGZsb2F0aW5nID0gdXBwZXI7XG5cdCAgICAgICAgICB1cHBlciA9IHVuZGVmaW5lZDtcblx0ICAgICAgICB9XG5cdCAgICAgICAgZWxzZSBpZiAodHlwZW9mIGxvd2VyID09ICdib29sZWFuJykge1xuXHQgICAgICAgICAgZmxvYXRpbmcgPSBsb3dlcjtcblx0ICAgICAgICAgIGxvd2VyID0gdW5kZWZpbmVkO1xuXHQgICAgICAgIH1cblx0ICAgICAgfVxuXHQgICAgICBpZiAobG93ZXIgPT09IHVuZGVmaW5lZCAmJiB1cHBlciA9PT0gdW5kZWZpbmVkKSB7XG5cdCAgICAgICAgbG93ZXIgPSAwO1xuXHQgICAgICAgIHVwcGVyID0gMTtcblx0ICAgICAgfVxuXHQgICAgICBlbHNlIHtcblx0ICAgICAgICBsb3dlciA9IHRvRmluaXRlKGxvd2VyKTtcblx0ICAgICAgICBpZiAodXBwZXIgPT09IHVuZGVmaW5lZCkge1xuXHQgICAgICAgICAgdXBwZXIgPSBsb3dlcjtcblx0ICAgICAgICAgIGxvd2VyID0gMDtcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgdXBwZXIgPSB0b0Zpbml0ZSh1cHBlcik7XG5cdCAgICAgICAgfVxuXHQgICAgICB9XG5cdCAgICAgIGlmIChsb3dlciA+IHVwcGVyKSB7XG5cdCAgICAgICAgdmFyIHRlbXAgPSBsb3dlcjtcblx0ICAgICAgICBsb3dlciA9IHVwcGVyO1xuXHQgICAgICAgIHVwcGVyID0gdGVtcDtcblx0ICAgICAgfVxuXHQgICAgICBpZiAoZmxvYXRpbmcgfHwgbG93ZXIgJSAxIHx8IHVwcGVyICUgMSkge1xuXHQgICAgICAgIHZhciByYW5kID0gbmF0aXZlUmFuZG9tKCk7XG5cdCA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CAgICAgIH1cblx0ICAgICAgLy8gQ2xlYW51cCBjb2RlIGJ5IHN0cmlwcGluZyBlbXB0eSBzdHJpbmdzLlxuXHQgICAgICBzb3VyY2UgPSAoaXNFdmFsdWF0aW5nID8gc291cmNlLnJlcGxhY2UocmVFbXB0eVN0cmluZ0xlYWRpbmcsICcnKSA6IHNvdXJjZSlcblx0ICAgICAgICAucmVwbGFjZShyZUVtcHR5U3RyaW5nTWlkZGxlLCAnJDEnKVxuXHQgICAgICAgIC5yZXBsYWNlKHJlRW1wdHlTdHJpbmdUcmFpbGluZywgJyQxOycpO1xuXHRcblx0ICAgICAgLy8gRnJhbWUgY29kZSBhcyB0aGUgZnVuY3Rpb24gYm9keS5cblx0ICAgICAgc291cmNlID0gJ2Z1bmN0aW9uKCcgKyAodmFyaWFibGUgfHwgJ29iaicpICsgJykge1xcbicgK1xuXHQgICAgICAgICh2YXJpYWJsZVxuXHQgICAgICAgICAgPyAnJ1xuXHQgICAgICAgICAgOiAnb2JqIHx8IChvYmogPSB7fSk7XFxuJ1xuXHQgICAgICAgICkgK1xuXHQgICAgICAgIFwidmFyIF9fdCwgX19wID0gJydcIiArXG5cdCAgICAgICAgKGlzRXNjYXBpbmdcblx0ICAgICAgICAgICA/ICcsIF9fZSA9IF8uZXNjYXBlJ1xuXHQgICAgICAgICAgIDogJydcblx0ICAgICAgICApICtcblx0ICAgICAgICAoaXNFdmFsdWF0aW5nXG5cdCAgICAgICAgICA/ICcsIF9faiA9IEFycmF5LnByb3RvdHlwZS5qb2luO1xcbicgK1xuXHQgICAgICAgICAgICBcImZ1bmN0aW9uIHByaW50KCkgeyBfX3AgKz0gX19qLmNhbGwoYXJndW1lbnRzLCAnJykgfVxcblwiXG5cdCAgICAgICAgICA6ICc7XFxuJ1xuXHQgICAgICAgICkgK1xuXHQgICAgICAgIHNvdXJjZSArXG5cdCAgICAgICAgJ3JldHVybiBfX3BcXG59Jztcblx0XG5cdCAgICAgIHZhciByZXN1bHQgPSBhdHRlbX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ICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIGZ1bmMuYXBwbHkob2JqZWN0LCBhcnJheVB1c2goW3RoaXMudmFsdWUoKV0sIGFyZ3VtZW50cykpO1xuXHQgICAgICAgICAgfTtcblx0ICAgICAgICB9XG5cdCAgICAgIH0pO1xuXHRcblx0ICAgICAgcmV0dXJuIG9iamVjdDtcblx0ICAgIH1cblx0XG5cdCAgICAvKipcblx0ICAgICAqIFJldmVydHMgdGhlIGBfYCB2YXJpYWJsZSB0byBpdHMgcHJldmlvdXMgdmFsdWUgYW5kIHJldHVybnMgYSByZWZlcmVuY2UgdG9cblx0ICAgICAqIHRoZSBgbG9kYXNoYCBmdW5jdGlvbi5cblx0ICAgICAqXG5cdCAgICAgKiBAc3RhdGljXG5cdCAgICAgKiBAc2luY2UgMC4xLjBcblx0ICAgICAqIEBtZW1iZXJPZiBfXG5cdCAgICAgKiBAY2F0ZWdvcnkgVXRpbFxuXHQgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBgbG9kYXNoYCBmdW5jdGlvbi5cblx0ICAgICAqIEBleGFtcGxlXG5cdCAgICAgKlxuXHQgICAgICogdmFyIGxvZGFzaCA9IF8ubm9Db25mbGljdCgpO1xuXHQgICAgICovXG5cdCAgICBmdW5jdGlvbiBub0NvbmZsaWN0KCkge1xuXHQgICAgICBpZiAocm9vdC5fID09PSB0aGlzKSB7XG5cdCAgICAgICAgcm9vdC5fID0gb2xkRGFzaDtcblx0ICAgICAgfVxuXHQgICAgICByZXR1cm4gdGhpcztcblx0ICAgIH1cblx0XG5cdCAgICAvKipcblx0ICAgICAqIFRoaXMgbWV0aG9kIHJldHVybnMgYHVuZGVmaW5lZGAuXG5cdCAgICAgKlxuXHQgICAgICogQHN0YXRpY1xuXHQgICAgICogQG1lbWJlck9mIF9cblx0ICAgICAqIEBzaW5jZSAyLjMuMFxuXHQgICA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XHQgICAgICAgICAgICByZXR1cm4gcG9zdE1lc3NhZ2VJc0FzeW5jaHJvbm91cztcblx0ICAgICAgICB9XG5cdCAgICB9XG5cdFxuXHQgICAgZnVuY3Rpb24gaW5zdGFsbFBvc3RNZXNzYWdlSW1wbGVtZW50YXRpb24oKSB7XG5cdCAgICAgICAgLy8gSW5zdGFsbHMgYW4gZXZlbnQgaGFuZGxlciBvbiBgZ2xvYmFsYCBmb3IgdGhlIGBtZXNzYWdlYCBldmVudDogc2VlXG5cdCAgICAgICAgLy8gKiBodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi9ET00vd2luZG93LnBvc3RNZXNzYWdlXG5cdCAgICAgICAgLy8gKiBodHRwOi8vd3d3LndoYXR3Zy5vcmcvc3BlY3Mvd2ViLWFwcHMvY3VycmVudC13b3JrL211bHRpcGFnZS9jb21tcy5odG1sI2Nyb3NzRG9jdW1lbnRNZXNzYWdlc1xuXHRcblx0ICAgICAgICB2YXIgbWVzc2FnZVByZWZpeCA9IFwic2V0SW1tZWRpYXRlJFwiICsgTWF0aC5yYW5kb20oKSArIFwiJFwiO1xuXHQgICAgICAgIHZhciBvbkdsb2JhbE1lc3NhZ2UgPSBmdW5jdGlvbihldmVudCkge1xuXHQgICAgICAgICAgICBpZiAoZXZlbnQuc291cmNlID09PSBnbG9iYWwgJiZcblx0ICAgICAgICAgICAgICAgIHR5cGVvZiBldmVudC5kYXRhID09PSBcInN0cmluZ1wiICYmXG5cdCAgICAgICAgICAgICAgICBldmVudC5kYXRhLmluZGV4T2YobWVzc2FnZVByZWZpeCkgPT09IDApIHtcblx0ICAgICAgICAgICAgICAgIHJ1bklmUHJlc2VudCgrZXZlbnQuZGF0YS5zbGljZShtZXNzYWdlUHJlZml4Lmxlbmd0aCkpO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfTtcblx0XG5cdCAgICAgICAgaWYgKGdsb2JhbC5hZGRFdmVudExpc3RlbmVyKSB7XG5cdCAgICAgICAgICA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ERFRISDptbTpzcycpLmZvcm1hdCgpO1xuICAgICAgICBlbmQgPSBtb21lbnQocS5lbmQucmVwbGFjZSgvIy4rJC8sJycpLCAnWVlZWS1NTS1ERFRISDptbTpzcycpLmZvcm1hdCgpO1xuICAgIH1cblxuICAgIFByb21pc2UuYWxsKFtcbiAgICAgICAgcmVxLmdldCgnL3Byb2plY3RzLycgKyBwcm9qZWN0ICsgJy9lcnJvcnMvJyArIG1lc3NhZ2UsIHtcbiAgICAgICAgICAgIHBhcmFtczoge1xuICAgICAgICAgICAgICAgIHN0YXJ0OiBzdGFydCxcbiAgICAgICAgICAgICAgICBlbmQ6IGVuZFxuICAgICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICAgICAgcmVxLmdldCgnL3Byb2plY3RzLycgKyBwcm9qZWN0ICsgJy9lcnJvcnMvJyArIG1lc3NhZ2UgKyAnL29jY3VycmVuY2VzJywge1xuICAgICAgICAgICAgcGFyYW1zOiB7XG4gICAgICAgICAgICAgICAgYWZ0ZXI6IG51bGwsXG4gICAgICAgICAgICAgICAgbGltaXQ6IDEwXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pXG4gICAgXSlcbiAgICAgICAgLnRoZW4oKHJlcykgPT4ge1xuICAgICAgICAgICAgY29uc3QgZXJyb3IgPSByZXNbMF07XG4gICAgICAgICAgICBjb25zdCBvY2N1cnJlbmNlcyA9IHJlc1sxXS5kYXRhLm9jY3VycmVuY2VzO1xuICAgICAgICAgICAgY29uc3Qgb21pdHRlZCA9IF8ub21pdChlcnJvci5kYXRhLm1ldGEsIFtcbiAgICAgICAgICAgICAgICAncHJvamVjdCcsXG4gICAgICAgICAgICAgICAgJ21lc3NhZ2UnLFxuICAgICAgICAgICAgICAgICd0eXBlJyxcbiAgICAgICAgICAgICAgICAnYmFja3RyYWNlJyxcbiAgICAgICAgICAgICAgICAndGltZXN0YW1wJyxcbiAgICAgICAgICAgICAgICAnZXZlbnQnLFxuICAgICAgICAgICAgICAgICdub3RpZmljYXRpb25zJyxcbiAgICAgICAgICAgICAgICAncmV2ZXJzZWRVbml4dGltZSdcbiAgICAgICAgICAgIF0pO1xuXG4gICAgICAgICAgICByaW90Lm1vdW50KCdhcHAnLCAnb3ZlcnZpZXcnLCB7XG4gICAgICAgICAgICAgICAgcmVxOiByZXEsXG4gICAgICAgICAgICAgICAgcHJvamVjdDogZXJyb3IuZGF0YS5tZXRhLnByb2plY3QsXG4gICAgICAgICAgICAgICAgbWVzc2FnZTogZXJyb3IuZGF0YS5tZXRhLm1lc3NhZ2UsXG4gICAgICAgICAgICAgICAgdHlwZTogZXJyb3IuZGF0YS5tZXRhLnR5cGUsXG4gICAgICAgICAgICAgICAgbWV0YTogb21pdHRlZCxcbiAgICAgICAgICAgICAgICBiYWNrdHJhY2U6IGVycm9yLmRhdGEubWV0YS5iYWNrdHJhY2UsXG4gICAgICAgICAgICAgICAgdGltZXN0YW1wOiBlcnJvci5kYXRhLm1ldGEudGltZXN0YW1wLFxuICAgICAgICAgICAgICAgIG9jY3VycmVuY2VzOiBvY2N1cnJlbmNlcyxcbiAgICAgICAgICAgICAgICB3b290aGVlOiB3b290aGVlLFxuICAgICAgICAgICAgICAgIGl0ZW1zOiBlcnJvci5kYXRhLnRpbWVsaW5lLmVycm9ycyxcbiAgICAgICAgICAgICAgICBjMzogYzMsXG4gICAgICAgICAgICAgICAgXzogXyxcbiAgICAgICAgICAgICAgICBtb21lbnQ6IG1vbWVudCxcbiAgICAgICAgICAgICAgICBzdGFydDogc3RhcnQsXG4gICAgICAgICAgICAgICAgZW5kOiBlbmRcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goKGVycikgPT4ge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGVycik7XG4gICAgICAgIH0pO1xufSk7XG5cbnJpb3Qucm91dGUoJy9wcm9qZWN0cy8qL2Vycm9ycy8qL29jY3VycmVuY2VzLyonLCAocHJvamVjdCwgbWVzc2FnZSwgcmV2ZXJzZWRVbml4dGltZSkgPT4ge1xuICAgIHJlcS5nZXQoJy9wcm9qZWN0cy8nICsgcHJvamVjdCArICcvZXJyb3JzLycgKyBtZXNzYWdlICsgJy9vY2N1cnJlbmNlcy8nICsgcmV2ZXJzZWRVbml4dGltZSwge1xuICAgIH0pXG4gICAgICAgIC50aGVuKChyZXMpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGVycm9yID0gcmVzO1xuICAgICAgICAgICAgY29uc3Qgb21pdHRlZCA9IF8ub21pdChlcnJvci5kYXRhLm1ldGEsIFtcbiAgICAgICAgICAgICAgICAncHJvamVjdCcsXG4gICAgICAgICAgICAgICAgJ21lc3NhZ2UnLFxuICAgICAgICAgICAgICAgICd0eXBlJyxcbiAgICAgICAgICAgICAgICAnYmFja3RyYWNlJyxcbiAgICAgICAgICAgICAgICAndGltZXN0YW1wJyxcbiAgICAgICAgICAgICAgICAnZXZlbnQnLFxuICAgICAgICAgICAgICAgICdub3RpZmljYXRpb25zJyxcbiAgICAgICAgICAgICAgICAncmV2ZXJzZWRVbml4dGltZSdcbiAgICAgICAgICAgIF0pO1xuXG4gICAgICAgICAgICByaW90Lm1vdW50KCdhcHAnLCAnb2NjdXJyZW5jZScsIHtcbiAgICAgICAgICAgICAgICBwcm9qZWN0OiBlcnJvci5kYXRhLm1ldGEucHJvamVjdCxcbiAgICAgICAgICAgICAgICBtZXNzYWdlOiBlcnJvci5kYXRhLm1ldGEubWVzc2FnZSxcbiAgICAgICAgICAgICAgICB0eXBlOiBlcnJvci5kYXRhLm1ldGEudHlwZSxcbiAgICAgICAgICAgICAgICBtZXRhOiBvbWl0dGVkLFxuICAgICAgICAgICAgICAgIGJhY2t0cmFjZTogZXJyb3IuZGF0YS5tZXRhLmJhY2t0cmFjZSxcbiAgICAgICAgICAgICAgICBfOiBfLFxuICAgICAgICAgICAgICAgIG1vbWVudDogbW9tZW50XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKChlc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gICBmb3IgKHZhciBpID0gMDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICAgICAgICBpZiAoaSBpbiB0ICYmIGZ1bi5jYWxsKHRoaXMsIHRbaV0sIGksIHQpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfTtcbn1cblxudmFyIHNvbWUkMSA9IHNvbWU7XG5cbmZ1bmN0aW9uIGlzVmFsaWQobSkge1xuICAgIGlmIChtLl9pc1ZhbGlkID09IG51bGwpIHtcbiAgICAgICAgdmFyIGZsYWdzID0gZ2V0UGFyc2luZ0ZsYWdzKG0pO1xuICAgICAgICB2YXIgcGFyc2VkUGFydHMgPSBzb21lJDEuY2FsbChmbGFncy5wYXJzZWREYXRlUGFydHMsIGZ1bmN0aW9uIChpKSB7XG4gICAgICAgICAgICByZXR1cm4gaSAhPSBudWxsO1xuICAgICAgICB9KTtcbiAgICAgICAgdmFyIGlzTm93VmFsaWQgPSAhaXNOYU4obS5fZC5nZXRUaW1lKCkpICYmXG4gICAgICAgICAgICBmbGFncy5vdmVyZmxvdyA8IDAgJiZcbiAgICAgICAgICAgICFmbGFncy5lbXB0eSAmJlxuICAgICAgICAgICAgIWZsYWdzLmludmFsaWRNb250aCAmJlxuICAgICAgICAgICAgIWZsYWdzLmludmFsaWRXZWVrZGF5ICYmXG4gICAgICAgICAgICAhZmxhZ3MubnVsbElucHV0ICYmXG4gICAgICAgICAgICAhZmxhZ3MuaW52YWxpZEZvcm1hdCAmJlxuICAgICAgICAgICAgIWZsYWdzLnVzZXJJbnZhbGlkYXRlZCAmJlxuICAgICAgICAgICAgKCFmbGFncy5tZXJpZGllbSB8fCAoZmxhZ3MubWVyaWRpZW0gJiYgcGFyc2VkUGFydHMpKTtcblxuICAgICAgICBpZiAobS5fc3RyaWN0KSB7XG4gICAgICAgICAgICBpc05vd1ZhbGlkID0gaXNOb3dWYW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dG9JbnQoYXJyYXkxW2ldKSAhPT0gdG9JbnQoYXJyYXkyW2ldKSkpIHtcbiAgICAgICAgICAgIGRpZmZzKys7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGRpZmZzICsgbGVuZ3RoRGlmZjtcbn1cblxuZnVuY3Rpb24gd2Fybihtc2cpIHtcbiAgICBpZiAoaG9va3Muc3VwcHJlc3NEZXByZWNhdGlvbldhcm5pbmdzID09PSBmYWxzZSAmJlxuICAgICAgICAgICAgKHR5cGVvZiBjb25zb2xlICE9PSAgJ3VuZGVmaW5lZCcpICYmIGNvbnNvbGUud2Fybikge1xuICAgICAgICBjb25zb2xlLndhcm4oJ0RlcHJlY2F0aW9uIHdhcm5pbmc6ICcgKyBtc2cpO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gZGVwcmVjYXRlKG1zZywgZm4pIHtcbiAgICB2YXIgZmlyc3RUaW1lID0gdHJ1ZTtcblxuICAgIHJldHVybiBleHRlbmQoZnVuY3Rpb24gKCkge1xuICAgICAgICBpZiAoaG9va3MuZGVwcmVjYXRpb25IYW5kbGVyICE9IG51bGwpIHtcbiAgICAgICAgICAgIGhvb2tzLmRlcHJlY2F0aW9uSGFuZGxlcihudWxsLCBtc2cpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChmaXJzdFRpbWUpIHtcbiAgICAgICAgICAgIHZhciBhcmdzID0gW107XG4gICAgICAgICAgICB2YXIgYXJnO1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhcmd1bWVudHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBhcmcgPSAnJztcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGFyZ3VtZW50c1tpXSA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICAgICAgYXJnICs9ICdcXG5bJyArIGkgKyAnXSAnO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gYXJndW1lbnRzWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcmcgKz0ga2V5ICsgJzogJyArIGFyZ3VtZW50c1swXVtrZXldICsgJywgJztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBhcmcgPSBhcmcuc2xpY2UoMCwgLTIpOyAvLyBSZW1vdmUgdHJhaWxpbmcgY29tbWEgYW5kIHNwYWNlXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYXJnID0gYXJndW1lbnRzW2ldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBhcmdzLnB1c2goYXJnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHdhcm4obXNnICsgJ1xcbkFyZ3VtZW50czogJyArIEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MpLmpvaW4oJycpICsgJ1xcbicgKyAobmV3IEVycm9yKCkpLnN0YWNrKTtcbiAgICAgICAgICAgIGZpcnN0VGltZSA9IGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgIH0sIGZuKTtcbn1cblxudmFyIGRlcHJlY2F0aW9ucyA9IHt9O1xuXG5mdW5jdGlvbiBkZXByZWNhdGVTaW1wbGUobmFtZSwgbXNnKSB7XG4gICAgaWYgKGhvb2tzLmRlcHJlY2F0aW9uSGFuZGxlciAhPSBudWxsKSB7XG4gICAgICAgIGhvb2tzLmRlcHJlY2F0aW9uSGFuZGxlcihuYW1lLCBtc2cpO1xuICAgIH1cbiAgICBpZiAoIWRlcHJlY2F0aW9uc1tuYW1lXSkge1xuICAgICAgICB3YXJuKG1zZyk7XG4gICAgICAgIGRlcHJlY2F0aW9uc1tuYW1lXSA9IHRydWU7XG4gICAgfVxufVxuXG5ob29rcy5zdXBwcmVzc0RlcHJlY2F0aW9uV2FybmluZ3MgPSBmYWxzZTtcbmhvb2tzLm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mZpZ3MocGFyZW50Q29uZmlnLCBjaGlsZENvbmZpZykge1xuICAgIHZhciByZXMgPSBleHRlbmQoe30sIHBhcmVudENvbmZpZyksIHByb3A7XG4gICAgZm9yIChwcm9wIGluIGNoaWxkQ29uZmlnKSB7XG4gICAgICAgIGlmIChoYXNPd25Qcm9wKGNoaWxkQ29uZmlnLCBwcm9wKSkge1xuICAgICAgICAgICAgaWYgKGlzT2JqZWN0KHBhcmVudENvbmZpZ1twcm9wXSkgJiYgaXNPYmplY3QoY2hpbGRDb25maWdbcHJvcF0pKSB7XG4gICAgICAgICAgICAgICAgcmVzW3Byb3BdID0ge307XG4gICAgICAgICAgICAgICAgZXh0ZW5kKHJlc1twcm9wXSwgcGFyZW50Q29uZmlnW3Byb3BdKTtcbiAgICAgICAgICAgICAgICBleHRlbmQocmVzW3Byb3BdLCBjaGlsZENvbmZpZ1twcm9wXSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNoaWxkQ29uZmlnW3Byb3BdICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICByZXNbcHJvcF0gPSBjaGlsZENvbmZpZ1twcm9wXTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZGVsZXRlIHJlc1twcm9wXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBmb3IgKHByb3AgaW4gcGFyZW50Q29uZmlnKSB7XG4gICAgICAgIGlmIChoYXNPd25Qcm9wKHBhcmVudENvbmZpZywgcHJvcCkgJiZcbiAgICAgICAgICAgICAgICAhaGFzT3duUHJvcChjaGlsZENvbmZpZywgcHJvcCkgJiZcbiAgICAgICAgICAgICAgICBpc09iamVjdChwYXJlbnRDb25maWdbcHJvcF0pKSB7XG4gICAgICAgICAgICAvLyBtYWtlIHN1cmUgY2hhbmdlcyB0byBwcm9wZXJ0aWVzIGRvbid0IG1vZGlmeSBwYXJlbnQgY29uZmlnXG4gICAgICAgICAgICByZXNbcHJvcF0gPSB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b20uX2RbJ3NldCcgKyAobW9tLl9pc1VUQyA/ICdVVEMnIDogJycpICsgdW5pdF0odmFsdWUpO1xuICAgIH1cbn1cblxuLy8gTU9NRU5UU1xuXG5mdW5jdGlvbiBzdHJpbmdHZXQgKHVuaXRzKSB7XG4gICAgdW5pdHMgPSBub3JtYWxpemVVbml0cyh1bml0cyk7XG4gICAgaWYgKGlzRnVuY3Rpb24odGhpc1t1bml0c10pKSB7XG4gICAgICAgIHJldHVybiB0aGlzW3VuaXRzXSgpO1xuICAgIH1cbiAgICByZXR1cm4gdGhpcztcbn1cblxuXG5mdW5jdGlvbiBzdHJpbmdTZXQgKHVuaXRzLCB2YWx1ZSkge1xuICAgIGlmICh0eXBlb2YgdW5pdHMgPT09ICdvYmplY3QnKSB7XG4gICAgICAgIHVuaXRzID0gbm9ybWFsaXplT2JqZWN0VW5pdHModW5pdHMpO1xuICAgICAgICB2YXIgcHJpb3JpdGl6ZWQgPSBnZXRQcmlvcml0aXplZFVuaXRzKHVuaXRzKTtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBwcmlvcml0aXplZC5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdGhpc1twcmlvcml0aXplZFtpXS51bml0XSh1bml0c1twcmlvcml0aXplZFtpXS51bml0XSk7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICB1bml0cyA9IG5vcm1hbGl6ZVVuaXRzKHVuaXRzKTtcbiAgICAgICAgaWYgKGlzRnVuY3Rpb24odGhpc1t1bml0c10pKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpc1t1bml0c10odmFsdWUpO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiB0aGlzO1xufVxuXG5mdW5jdGlvbiB6ZXJvRmlsbChudW1iZXIsIHRhcmdldExlbmd0aCwgZm9yY2VTaWduKSB7XG4gICAgdmFyIGFic051bWJlciA9ICcnICsgTWF0aC5hYnMobnVtYmVyKSxcbiAgICAgICAgemVyb3N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lbiwgaW5wdXQsIGNvbmZpZykge1xuICAgIGlmIChpbnB1dCAhPSBudWxsICYmIGhhc093blByb3AodG9rZW5zLCB0b2tlbikpIHtcbiAgICAgICAgdG9rZW5zW3Rva2VuXShpbnB1dCwgY29uZmlnLl9hLCBjb25maWcsIHRva2VuKTtcbiAgICB9XG59XG5cbnZhciBZRUFSID0gMDtcbnZhciBNT05USCA9IDE7XG52YXIgREFURSA9IDI7XG52YXIgSE9VUiA9IDM7XG52YXIgTUlOVVRFID0gNDtcbnZhciBTRUNPTkQgPSA1O1xudmFyIE1JTExJU0VDT05EID0gNjtcbnZhciBXRUVLID0gNztcbnZhciBXRUVLREFZID0gODtcblxudmFyIGluZGV4T2Y7XG5cbmlmIChBcnJheS5wcm90b3R5cGUuaW5kZXhPZikge1xuICAgIGluZGV4T2YgPSBBcnJheS5wcm90b3R5cGUuaW5kZXhPZjtcbn0gZWxzZSB7XG4gICAgaW5kZXhPZiA9IGZ1bmN0aW9uIChvKSB7XG4gICAgICAgIC8vIEkga25vd1xuICAgICAgICB2YXIgaTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IHRoaXMubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgIGlmICh0aGlzW2ldID09PSBvKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIC0xO1xuICAgIH07XG59XG5cbnZhciBpbmRleE9mJDEgPSBpbmRleE9mO1xuXG5mdW5jdGlvbiBkYXlzSW5Nb250aCh5ZWFyLCBtb250aCkge1xuICAgIHJldHVybiBuZXcgRGF0ZShEYXRlLlVUQyh5ZWFyLCBtb250aCArIDEsIDApKS5nZXRVVENEYXRlKCk7XG59XG5cbi8vIEZPUk1BVFRJTkdcblxuYWRkRm9ybWF0VG9rZW4oJ00nLCBbJ01NJywgMl0sICdNbycsIGZ1bmN0aW9uICgpIHtcbiAgICByZXR1cm4gdGhpcy5tb250aCg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bSwgJycpLnRvTG9jYWxlTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICB0aGlzLl9sb25nTW9udGhzUGFyc2VbaV0gPSB0aGlzLm1vbnRocyhtb20sICcnKS50b0xvY2FsZUxvd2VyQ2FzZSgpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgaWYgKHN0cmljdCkge1xuICAgICAgICBpZiAoZm9ybWF0ID09PSAnTU1NJykge1xuICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl9zaG9ydE1vbnRoc1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgcmV0dXJuIGlpICE9PSAtMSA/IGlpIDogbnVsbDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlpID0gaW5kZXhPZiQxLmNhbGwodGhpcy5fbG9uZ01vbnRoc1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgcmV0dXJuIGlpICE9PSAtMSA/IGlpIDogbnVsbDtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICAgIGlmIChmb3JtYXQgPT09ICdNTU0nKSB7XG4gICAgICAgICAgICBpaSA9IGluZGV4T2YkMS5jYWxsKHRoaXMuX3Nob3J0TW9udGhzUGFyc2UsIGxsYyk7XG4gICAgICAgICAgICBpZiAoaWkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGlpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl9sb25nTW9udGhzUGFyc2UsIGxsYyk7XG4gICAgICAgICAgICByZXR1cm4gaWkgIT09IC0xID8gaWkgOiBudWxsO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl9sb25nTW9udGhzUGFyc2UsIGxsYyk7XG4gICAgICAgICAgICBpZiAoaWkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGlpO1xuIC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hbHVlKSB7XG4gICAgdmFyIGRheU9mTW9udGg7XG5cbiAgICBpZiAoIW1vbS5pc1ZhbGlkKCkpIHtcbiAgICAgICAgLy8gTm8gb3BcbiAgICAgICAgcmV0dXJuIG1vbTtcbiAgICB9XG5cbiAgICBpZiAodHlwZW9mIHZhbHVlID09PSAnc3RyaW5nJykge1xuICAgICAgICBpZiAoL15cXGQrJC8udGVzdCh2YWx1ZSkpIHtcbiAgICAgICAgICAgIHZhbHVlID0gdG9JbnQodmFsdWUpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFsdWUgPSBtb20ubG9jYWxlRGF0YSgpLm1vbnRoc1BhcnNlKHZhbHVlKTtcbiAgICAgICAgICAgIC8vIFRPRE86IEFub3RoZXIgc2lsZW50IGZhaWx1cmU/XG4gICAgICAgICAgICBpZiAoIWlzTnVtYmVyKHZhbHVlKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBtb207XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBkYXlPZk1vbnRoID0gTWF0aC5taW4obW9tLmRhdGUoKSwgZGF5c0luTW9udGgobW9tLnllYXIoKSwgdmFsdWUpKTtcbiAgICBtb20uX2RbJ3NldCcgKyAobW9tLl9pc1VUQyA/ICdVVEMnIDogJycpICsgJ01vbnRoJ10odmFsdWUsIGRheU9mTW9udGgpO1xuICAgIHJldHVybiBtb207XG59XG5cbmZ1bmN0aW9uIGdldFNldE1vbnRoICh2YWx1ZSkge1xuICAgIGlmICh2YWx1ZSAhPSBudWxsKSB7XG4gICAgICAgIHNldE1vbnRoKHRoaXMsIHZhbHVlKTtcbiAgICAgICAgaG9va3MudXBkYXRlT2Zmc2V0KHRoaXMsIHRydWUpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gZ2V0KHRoaXMsICdNb250aCcpO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gZ2V0RGF5c0luTW9udGggKCkge1xuICAgIHJldHVybiBkYXlzSW5Nb250aCh0aGlzLnllYXIoKSwgdGhpcy5tb250aCgpKTtcbn1cblxudmFyIGRlZmF1bHRNb250aHNTaG9ydFJlZ2V4ID0gbWF0Y2hXb3JkO1xuZnVuY3Rpb24gbW9udGhzU2hvcnRSZWdleCAoaXNTdHJpY3QpIHtcbiAgICBpZiAodGhpcy5fbW9udGhzUGFyc2VFeGFjdCkge1xuICAgICAgICBpZiAoIWhhc093blByb3AodGhpcywgJ19tb250aHNSZWdleCcpKSB7XG4gICAgICAgICAgICBjb21wdXRlTW9udGhzUGFyc2UuY2FsbCh0aGlzKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoaXNTdHJpY3QpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9tb250aHNTaG9ydFN0cmljdFJlZ2V4O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX21vbnRoc1Nob3J0UmVnZXg7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoIWhhc093blByb3AodGhpcywgJ19tb250aHNTaG9ydFJlZ2V4JykpIHtcbiAgICAgICAgICAgIHRoaXMuX21vbnRoc1Nob3J0UmVnZXggPSBkZWZhdWx0TW9udGhzU2hvcnRSZWdleDtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcy5fbW9udGhzU2hvcnRTdHJpY3RSZWdleCAmJiBpc1N0cmljdCA/XG4gICAgICAgICAgICB0aGlzLl9tb250aHNTaG9ydFN0cmljdFJlZ2V4IDogdGhpcy5fbW9udGhzU2hvcnRSZWdleDtcbiAgICB9XG59XG5cbnZhciBkZWZhdWx0TW9udGhzUmVnZXggPSBtYXRjaFdvcmQ7XG5mdW5jdGlvbiBtb250aHNSZWdleCAoaXNTdHJpY3QpIHtcbiAgICBpZiAodGhpcy5fbW9udGhzUGFyc2VFeGFjdCkge1xuICAgICAgICBpZiAoIWhhc093blByb3AodGhpcywg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IHJlc0RheU9mWWVhciA9IGRheU9mWWVhciAtIGRheXNJblllYXIoeWVhcik7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgcmVzWWVhciA9IHllYXI7XG4gICAgICAgIHJlc0RheU9mWWVhciA9IGRheU9mWWVhcjtcbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgICB5ZWFyOiByZXNZZWFyLFxuICAgICAgICBkYXlPZlllYXI6IHJlc0RheU9mWWVhclxuICAgIH07XG59XG5cbmZ1bmN0aW9uIHdlZWtPZlllYXIobW9tLCBkb3csIGRveSkge1xuICAgIHZhciB3ZWVrT2Zmc2V0ID0gZmlyc3RXZWVrT2Zmc2V0KG1vbS55ZWFyKCksIGRvdywgZG95KSxcbiAgICAgICAgd2VlayA9IE1hdGguZmxvb3IoKG1vbS5kYXlPZlllYXIoKSAtIHdlZWtPZmZzZXQgLSAxKSAvIDcpICsgMSxcbiAgICAgICAgcmVzV2VlaywgcmVzWWVhcjtcblxuICAgIGlmICh3ZWVrIDwgMSkge1xuICAgICAgICByZXNZZWFyID0gbW9tLnllYXIoKSAtIDE7XG4gICAgICAgIHJlc1dlZWsgPSB3ZWVrICsgd2Vla3NJblllYXIocmVzWWVhciwgZG93LCBkb3kpO1xuICAgIH0gZWxzZSBpZiAod2VlayA+IHdlZWtzSW5ZZWFyKG1vbS55ZWFyKCksIGRvdywgZG95KSkge1xuICAgICAgICByZXNXZWVrID0gd2VlayAtIHdlZWtzSW5ZZWFyKG1vbS55ZWFyKCksIGRvdywgZG95KTtcbiAgICAgICAgcmVzWWVhciA9IG1vbS55ZWFyKCkgKyAxO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHJlc1llYXIgPSBtb20ueWVhcigpO1xuICAgICAgICByZXNXZWVrID0gd2VlaztcbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgICB3ZWVrOiByZXNXZWVrLFxuICAgICAgICB5ZWFyOiByZXNZZWFyXG4gICAgfTtcbn1cblxuZnVuY3Rpb24g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kgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGlpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl9zaG9ydFdlZWtkYXlzUGFyc2UsIGxsYyk7XG4gICAgICAgICAgICBpZiAoaWkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGlpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl9taW5XZWVrZGF5c1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgcmV0dXJuIGlpICE9PSAtMSA/IGlpIDogbnVsbDtcbiAgICAgICAgfSBlbHNlIGlmIChmb3JtYXQgPT09ICdkZGQnKSB7XG4gICAgICAgICAgICBpaSA9IGluZGV4T2YkMS5jYWxsKHRoaXMuX3Nob3J0V2Vla2RheXNQYXJzZSwgbGxjKTtcbiAgICAgICAgICAgIGlmIChpaSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaWk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpaSA9IGluZGV4T2YkMS5jYWxsKHRoaXMuX3dlZWtkYXlzUGFyc2UsIGxsYyk7XG4gICAgICAgICAgICBpZiAoaWkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGlpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl9taW5XZWVrZGF5c1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgcmV0dXJuIGlpICE9PSAtMSA/IGlpIDogbnVsbDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlpID0gaW5kZXhPZiQxLmNhbGwodGhpcy5fbWluV2Vla2RheXNQYXJzZSwgbGxjKTtcbiAgICAgICAgICAgIGlmIChpaSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaWk7X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nRzIGFyZSBwYXNzZWQgaW4sIGl0IHdpbGwgc2ltcGx5IHJldHVybiB0aGUgY3VycmVudCBnbG9iYWxcbi8vIGxvY2FsZSBrZXkuXG5mdW5jdGlvbiBnZXRTZXRHbG9iYWxMb2NhbGUgKGtleSwgdmFsdWVzKSB7XG4gICAgdmFyIGRhdGE7XG4gICAgaWYgKGtleSkge1xuICAgICAgICBpZiAoaXNVbmRlZmluZWQodmFsdWVzKSkge1xuICAgICAgICAgICAgZGF0YSA9IGdldExvY2FsZShrZXkpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgZGF0YSA9IGRlZmluZUxvY2FsZShrZXksIHZhbHVlcyk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZGF0YSkge1xuICAgICAgICAgICAgLy8gbW9tZW50LmR1cmF0aW9uLl9sb2NhbGUgPSBtb21lbnQuX2xvY2FsZSA9IGRhdGE7XG4gICAgICAgICAgICBnbG9iYWxMb2NhbGUgPSBkYXRhO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIGdsb2JhbExvY2FsZS5fYWJicjtcbn1cblxuZnVuY3Rpb24gZGVmaW5lTG9jYWxlIChuYW1lLCBjb25maWcpIHtcbiAgICBpZiAoY29uZmlnICE9PSBudWxsKSB7XG4gICAgICAgIHZhciBwYXJlbnRDb25maWcgPSBiYXNlQ29uZmlnO1xuICAgICAgICBjb25maWcuYWJiciA9IG5hbWU7XG4gICAgICAgIGlmIChsb2NhbGVzW25hbWVdICE9IG51bGwpIHtcbiAgICAgICAgICAgIGRlcHJlY2F0ZVNpbXBsZSgnZGVmaW5lTG9jYWxlT3ZlcnJpZGUnLFxuICAgICAgICAgICAgICAgICAgICAndXNlIG1vbWVudC51cGRhdGVMb2NhbGUobG9jYWxlTmFtZSwgY29uZmlnKSB0byBjaGFuZ2UgJyArXG4gICAgICAgICAgICAgICAgICAgICdhbiBleGlzdGluZyBsb2NhbGUuIG1vbWVudC5kZWZpbmVMb2NhbGUobG9jYWxlTmFtZSwgJyArXG4gICAgICAgICAgICAgICAgICAgICdjb25maWcpIHNob3VsZCBvbmx5IGJlIHVzZWQgZm9yIGNyZWF0aW5nIGEgbmV3IGxvY2FsZSAnICtcbiAgICAgICAgICAgICAgICAgICAgJ1NlZSBodHRwOi8vbW9tZW50anMuY29tL2d1aWRlcy8jL3dhcm5pbmdzL2RlZmluZS1sb2NhbGUvIGZvciBtb3JlIGluZm8uJyk7XG4gICAgICAgICAgICBwYXJlbnRDb25maWcgPSBsb2NhbGVzW25hbWVdLl9jb25maWc7XG4gICAgICAgIH0gZWxzZSBpZiAoY29uZmlnLnBhcmVudExvY2FsZSAhPSBudWxsKSB7XG4gICAgICAgICAgICBpZiAobG9jYWxlc1tjb25maWcucGFyZW50TG9jYWxlXSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgcGFyZW50Q29uZmlnID0gbG9jYWxlc1tjb25maWcucGFyZW50TG9jYWxlXS5fY29uZmlnO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoIWxvY2FsZUZhbWlsaWVzW2NvbmZpZy5wYXJlbnRMb2NhbGVdKSB7XG4gICAgICAgICAgICAgICAgICAgIGxvY2FsZUZhbWlsaWVzW2NvbmZpZy5wYXJlbnRMb2NhbGVdID0gW107XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxvY2FsZUZhbWlsaWVzW2NvbmZpZy5wYXJlbnRMb2NhbGVdLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBuYW1lOiBuYW1lLFxuICAgICAgICAgICAgICAgICAgICBjb25maWc6IGNvbmZpZ1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGxvY2FsZXNbbmFtZV0gPSBuZXcgTG9jYWxlKG1lcmdlQ29uZmlncyhwYXJlbnRDb25maWcsIGN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aWYgKCFpc0FycmF5KGtleSkpIHtcbiAgICAgICAgLy9zaG9ydC1jaXJjdWl0IGV2ZXJ5dGhpbmcgZWxzZVxuICAgICAgICBsb2NhbGUgPSBsb2FkTG9jYWxlKGtleSk7XG4gICAgICAgIGlmIChsb2NhbGUpIHtcbiAgICAgICAgICAgIHJldHVybiBsb2NhbGU7XG4gICAgICAgIH1cbiAgICAgICAga2V5ID0gW2tleV07XG4gICAgfVxuXG4gICAgcmV0dXJuIGNob29zZUxvY2FsZShrZXkpO1xufVxuXG5mdW5jdGlvbiBsaXN0TG9jYWxlcygpIHtcbiAgICByZXR1cm4ga2V5cyQxKGxvY2FsZXMpO1xufVxuXG5mdW5jdGlvbiBjaGVja092ZXJmbG93IChtKSB7XG4gICAgdmFyIG92ZXJmbG93O1xuICAgIHZhciBhID0gbS5fYTtcblxuICAgIGlmIChhICYmIGdldFBhcnNpbmdGbGFncyhtKS5vdmVyZmxvdyA9PT0gLTIpIHtcbiAgICAgICAgb3ZlcmZsb3cgPVxuICAgICAgICAgICAgYVtNT05USF0gICAgICAgPCAwIHx8IGFbTU9OVEhdICAgICAgID4gMTEgID8gTU9OVEggOlxuICAgICAgICAgICAgYVtEQVRFXSAgICAgICAgPCAxIHx8IGFbREFURV0gICAgICAgID4gZGF5c0luTW9udGgoYVtZRUFSXSwgYVtNT05USF0pID8gREFURSA6XG4gICAgICAgICAgICBhW0hPVVJdICAgICAgICA8IDAgfHwgYVtIT1VSXSAgICAgICAgPiAyNCB8fCAoYVtIT1VSXSA9PT0gMjQgJiYgKGFbTUlOVVRFXSAhPT0gMCB8fCBhW1NFQ09ORF0gIT09IDAgfHwgYVtNSUxMSVNFQ09ORF0gIT09IDApKSA/IEhPVVIgOlxuICAgICAgICAgICAgYVtNSU5VVEVdICAgICAgPCAwIHx8IGFbTUlOVVRFXSAgICAgID4gNTkgID8gTUlOVVRFIDpcbiAgICAgICAgICAgIGFbU0VDT05EXSAgICAgIDwgMCB8fCBhW1NFQ09ORF0g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CA9IGlzb0RhdGVzLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgICAgaWYgKGlzb0RhdGVzW2ldWzFdLmV4ZWMobWF0Y2hbMV0pKSB7XG4gICAgICAgICAgICAgICAgZGF0ZUZvcm1hdCA9IGlzb0RhdGVzW2ldWzBdO1xuICAgICAgICAgICAgICAgIGFsbG93VGltZSA9IGlzb0RhdGVzW2ldWzJdICE9PSBmYWxzZTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoZGF0ZUZvcm1hdCA9PSBudWxsKSB7XG4gICAgICAgICAgICBjb25maWcuX2lzVmFsaWQgPSBmYWxzZTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWF0Y2hbM10pIHtcbiAgICAgICAgICAgIGZvciAoaSA9IDAsIGwgPSBpc29UaW1lcy5sZW5ndGg7IGkgPCBsOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoaXNvVGltZXNbaV1bMV0uZXhlYyhtYXRjaFszXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gbWF0Y2hbMl0gc2hvdWxkIGJlICdUJyBvciBzcGFjZVxuICAgICAgICAgICAgICAgICAgICB0aW1lRm9ybWF0ID0gKG1hdGNoWzJdIHx8ICcgJykgKyBpc29UaW1lc1tpXVswXTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHRpbWVGb3JtYXQgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIGNvbmZpZy5faXNWYWxpZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoIWFsbG93VGltZSAmJiB0aW1lRm9ybWF0ICE9IG51bGwpIHtcbiAgICAgICAgICAgIGN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7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGltZXpvbmVJbmRleCA9IG1pbGl0YXJ5LmluZGV4T2YobWF0Y2hbNV1bMV0udG9VcHBlckNhc2UoKSkgLSAxMjtcbiAgICAgICAgICAgICAgICAgICAgdGltZXpvbmUgPSAoKHRpbWV6b25lSW5kZXggPCAwKSA/ICcgLScgOiAnICsnKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAoKCcnICsgdGltZXpvbmVJbmRleCkucmVwbGFjZSgvXi0/LywgJzAnKSkubWF0Y2goLy4uJC8pWzBdICsgJzAwJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIDQ6IC8vIFpvbmVcbiAgICAgICAgICAgICAgICB0aW1lem9uZSA9IHRpbWV6b25lc1ttYXRjaFs1XV07XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBkZWZhdWx0OiAvLyBVVCBvciArLy05OTk5XG4gICAgICAgICAgICAgICAgdGltZXpvbmUgPSB0aW1lem9uZXNbJyBHTVQnXTtcbiAgICAgICAgfVxuICAgICAgICBtYXRjaFs1XSA9IHRpbWV6b25lO1xuICAgICAgICBjb25maWcuX2kgPSBtYXRjaC5zcGxpY2UoMSkuam9pbignJyk7XG4gICAgICAgIHR6Rm9ybWF0ID0gJyBaWic7XG4gICAgICAgIGNvbmZpZy5fZiA9IGRheUZvcm1hdCArIGRhdGVGb3JtYXQgKyB0aW1lRm9ybWF0ICsgdHpGb3JtYXQ7XG4gICAgICAgIGNvbmZpZ0Zyb21TdHJpbmdBbmRGb3JtYXQoY29uZmlnKTtcbiAgICAgICAgZ2V0UGFyc2luZ0ZsYWdzKGNvbmZpZykucmZjMjgyMiA9IHRydWU7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgY29uZmlnLl9pc1ZhbGlkID0gZmFsc2U7XG4gICAgfVxufVxuXG4vLyBkYXRl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UuaXNQTSAhPSBudWxsKSB7XG4gICAgICAgIC8vIEZhbGxiYWNrXG4gICAgICAgIGlzUG0gPSBsb2NhbGUuaXNQTShtZXJpZGllbSk7XG4gICAgICAgIGlmIChpc1BtICYmIGhvdXIgPCAxMikge1xuICAgICAgICAgICAgaG91ciArPSAxMjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIWlzUG0gJiYgaG91ciA9PT0gMTIpIHtcbiAgICAgICAgICAgIGhvdXIgPSAwO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBob3VyO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIHRoaXMgaXMgbm90IHN1cHBvc2VkIHRvIGhhcHBlblxuICAgICAgICByZXR1cm4gaG91cjtcbiAgICB9XG59XG5cbi8vIGRhdGUgZnJvbSBzdHJpbmcgYW5kIGFycmF5IG9mIGZvcm1hdCBzdHJpbmdzXG5mdW5jdGlvbiBjb25maWdGcm9tU3RyaW5nQW5kQXJyYXkoY29uZmlnKSB7XG4gICAgdmFyIHRlbXBDb25maWcsXG4gICAgICAgIGJlc3RNb21lbnQsXG5cbiAgICAgICAgc2NvcmVUb0JlYXQsXG4gICAgICAgIGksXG4gICAgICAgIGN1cnJlbnRTY29yZTtcblxuICAgIGlmIChjb25maWcuX2YubGVuZ3RoID09PSAwKSB7XG4gICAgICAgIGdldFBhcnNpbmdGbGFncyhjb25maWcpLmludmFsaWRGb3JtYXQgPSB0cnVlO1xuICAgICAgICBjb25maWcuX2QgPSBuZXcgRGF0ZShOYU4pO1xuICAgICAgICByZXR1cm47XG4gICAgfVxuXG4gICAgZm9yIChpID0gMDsgaSA8IGNvbmZpZy5fZi5sZW5ndGg7IGkrKykge1xuICAgICAgICBjdXJyZW50U2NvcmUgPSAwO1xuICAgICAgICB0ZW1wQ29uZmlnID0gY29weUNvbmZpZyh7fSwgY29uZmlnKTtcbiAgICAgICAgaWYgKGNvbmZpZy5fdXNlVVRDICE9IG51bGwpIHtcbiAgICAgICAgICAgIHRl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zO1xuXG4gICAgaWYgKGlzRHVyYXRpb24oaW5wdXQpKSB7XG4gICAgICAgIGR1cmF0aW9uID0ge1xuICAgICAgICAgICAgbXMgOiBpbnB1dC5fbWlsbGlzZWNvbmRzLFxuICAgICAgICAgICAgZCAgOiBpbnB1dC5fZGF5cyxcbiAgICAgICAgICAgIE0gIDogaW5wdXQuX21vbnRoc1xuICAgICAgICB9O1xuICAgIH0gZWxzZSBpZiAoaXNOdW1iZXIoaW5wdXQpKSB7XG4gICAgICAgIGR1cmF0aW9uID0ge307XG4gICAgICAgIGlmIChrZXkpIHtcbiAgICAgICAgICAgIGR1cmF0aW9uW2tleV0gPSBpbnB1dDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGR1cmF0aW9uLm1pbGxpc2Vjb25kcyA9IGlucHV0O1xuICAgICAgICB9XG4gICAgfSBlbHNlIGlmICghIShtYXRjaCA9IGFzcE5ldFJlZ2V4LmV4ZWMoaW5wdXQpKSkge1xuICAgICAgICBzaWduID0gKG1hdGNoWzFdID09PSAnLScpID8gLTEgOiAxO1xuICAgICAgICBkdXJhdGlvbiA9IHtcbiAgICAgICAgICAgIHkgIDogMCxcbiAgICAgICAgICAgIGQgIDogdG9JbnQobWF0Y2hbREFURV0pICAgICAgICAgICAgICAgICAgICAgICAgICogc2lnbixcbiAgICAgICAgICAgIGggIDogdG9JbnQobWF0Y2hbSE9VUl0pICAgICAgICAgICAgICAgICAgICAgICAgICogc2lnbixcbiAgICAgICAgICAgIG0gIDogdG9JbnQobWF0Y2hbTUlOVVRFXSkgICAgICAgICAgICAgICAgICAgICAgICogc2lnbixcbiAgICAgICAgICAgIHMgIDogdG9JbnQobWF0Y2hbU0VDT05EXSkgICAgICAgICAgICAgICAgICAgICAgICogc2lnbixcbiAgICAgICAgICAgIG1zIDogdG9JbnQoYWJzUm91bmQobWF0Y2hbTUlMTElTRUNPTkRdICogMTAwMCkpICogc2lnbiAvLyB0aGUgbWlsbGlzZWNvbmQgZGVja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W9udGgoMCk7XG4gICAgICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovXG4gICAgICAgIGNhc2UgJ3F1YXJ0ZXInOlxuICAgICAgICBjYXNlICdtb250aCc6XG4gICAgICAgICAgICB0aGlzLmRhdGUoMSk7XG4gICAgICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovXG4gICAgICAgIGNhc2UgJ3dlZWsnOlxuICAgICAgICBjYXNlICdpc29XZWVrJzpcbiAgICAgICAgY2FzZSAnZGF5JzpcbiAgICAgICAgY2FzZSAnZGF0ZSc6XG4gICAgICAgICAgICB0aGlzLmhvdXJzKDApO1xuICAgICAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqL1xuICAgICAgICBjYXNlICdob3VyJzpcbiAgICAgICAgICAgIHRoaXMubWludXRlcygwKTtcbiAgICAgICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi9cbiAgICAgICAgY2FzZSAnbWludXRlJzpcbiAgICAgICAgICAgIHRoaXMuc2Vjb25kcygwKTtcbiAgICAgICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi9cbiAgICAgICAgY2FzZSAnc2Vjb25kJzpcbiAgICAgICAgICAgIHRoaXMubWlsbGlzZWNvbmRzKDApO1xuICAgIH1cblxuICAgIC8vIHdlZWtzIGFyZSBhIHNwZWNpYWwgY2FzZVxuICAgIGlmICh1bml0cyA9PT0gJ3dlZWsnKSB7XG4gICAgICAgIHRoaXMud2Vla2RheSgwKTtcbiAgICB9XG4gICAgaWYgKHVuaXRzID09PSAnaXNvV2VlaycpIHtcbiAgICAgICAgdGhpcy5pc29XZWVrZGF5KDEpO1xuICAgIH1cblxuICAgIC8vIHF1YXJ0ZXJzIGFyZSBhbHNvIHNwZWNpYWxcbiAgICBpZiAodW5pdHMgPT09ICdxdWFydGVyJykge1xuICAgICAgICB0aGlzLm1vbnRoKE1hdGguZmxvb3IodGhpcy5tb250aCgpIC8gMykgKiAzKTtcbiAgICB9XG5cbiAgICByZXR1cm4gdGhpcztc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2VuICs9ICdTJykge1xuICAgIGFkZFBhcnNlVG9rZW4odG9rZW4sIHBhcnNlTXMpO1xufVxuLy8gTU9NRU5UU1xuXG52YXIgZ2V0U2V0TWlsbGlzZWNvbmQgPSBtYWtlR2V0U2V0KCdNaWxsaXNlY29uZHMnLCBmYWxzZSk7XG5cbi8vIEZPUk1BVFRJTkdcblxuYWRkRm9ybWF0VG9rZW4oJ3onLCAgMCwgMCwgJ3pvbmVBYmJyJyk7XG5hZGRGb3JtYXRUb2tlbignenonLCAwLCAwLCAnem9uZU5hbWUnKTtcblxuLy8gTU9NRU5UU1xuXG5mdW5jdGlvbiBnZXRab25lQWJiciAoKSB7XG4gICAgcmV0dXJuIHRoaXMuX2lzVVRDID8gJ1VUQycgOiAnJztcbn1cblxuZnVuY3Rpb24gZ2V0Wm9uZU5hbWUgKCkge1xuICAgIHJldHVybiB0aGlzLl9pc1VUQyA/ICdDb29yZGluYXRlZCBVbml2ZXJzYWwgVGltZScgOiAnJztcbn1cblxudmFyIHByb3RvID0gTW9tZW50LnByb3RvdHlwZTtcblxucHJvdG8uYWRkICAgICAgICAgICAgICAgPSBhZGQ7XG5wcm90by5jYWxlbmRhciAgICAgICAgICA9IGNhbGVuZGFyJDE7XG5wcm90by5jbG9uZSAgICAgICAgICAgICA9IGNsb25lO1xucHJvdG8uZGlmZiAgICAgICAgICAgICAgPSBkaWZmO1xucHJvdG8uZW5kT2YgICAgICAgICAgICAgPSBlbmRPZjtcbnByb3RvLmZvcm1hdCAgICAgICAgICAgID0gZm9ybWF0O1xucHJvdG8uZnJvbSAgICAgICAgICAgICAgPSBmcm9tO1xucHJvdG8uZnJvbU5vdyAgICAgICAgICAgPSBmcm9tTm93O1xucHJvdG8udG8gICAgICAgICAgICAgICAgPSB0bztcbnByb3RvLnRvTm93ICAgICAgICAgICAgID0gdG9Ob3c7XG5wcm90by5nZXQgICAgICAgICAgICAgICA9IHN0cmluZ0dldDtcbnByb3RvLmludmFsaWRBdCAgICAgICAgID0gaW52YWxpZEF0O1xucHJvdG8uaXNBZnRlciAgICAgICAgICAgPSBpc0FmdGVyO1xucHJvdG8uaXNCZWZvcmUgICAgICAgICAgPSBpc0JlZm9yZTtcbnByb3RvLmlzQmV0d2VlbiAgICAgICAgID0gaXNCZXR3ZWVuO1xucHJvdG8uaXNTYW1lICAgICAgICAgICAgPSBpc1NhbWU7XG5wcm90by5pc1NhbWVPckFmdGVyICAgICA9IGlzU2FtZU9yQWZ0ZXI7XG5wcm90by5pc1NhbWVPckJlZm9yZSAgICA9IGlzU2FtZU9yQmVmb3JlO1xucHJvdG8uaXNWYWxpZCAgICAgICAgICAgPSBpc1ZhbGlkJDI7XG5wcm90by5sYW5nICAgICAgICAgICAgICA9IGxhbmc7XG5wcm90by5sb2NhbGUgICAgICAgICAgICA9IGxvY2FsZTtcbnByb3RvLmxvY2FsZURhdGEgICAgICAgID0gbG9jYWxlRGF0YTtcbnByb3RvLm1heCAgICAgICAgICAgICAgID0gcHJvdG90eXBlTWF4O1xucHJvdG8ubWluICAgICAgICAgICAgICAgPSBwcm90b3R5cGVNaW47XG5wcm90by5wYXJzaW5nRmxhZ3MgICAgICA9IHBhcnNpbmdGbGFncztcbnByb3RvLnNldCAgICAgICAgICAgICAgID0gc3RyaW5nU2V0O1xucHJvdG8uc3RhcnRPZiAgICAgICAgICAgPSBzdGFydE9mO1xucHJvdG8uc3VidHJhY3QgICAgICAgICAgPSBzdWJ0cmFjdDtcbnByb3RvLnRvQXJyYXkgICAgICAgICAgID0gdG9BcnJheTtcbnByb3RvLnRvT2JqZWN0ICAgICAgICAgID0gdG9PYmplY3Q7XG5wcm90by50b0RhdGUgICAgICAgICAgICA9IHRvRGF0ZTtcbnByb3RvLnRvSVNPU3RyaW5nICAgICAgID0gdG9JU09TdHJpbmc7XG5wcm90by5pbnNwZWN0ICAgICAgICAgICA9IGluc3BlY3Q7XG5wcm90by50b0pTT04gICAgICAgICAgICA9IHRvSlNPTjtcbnByb3RvLnRvU3RyaW5nICAgICAgICAgID0gdG9TdHJpbmc7XG5wcm90by51bml4ICAgICAgICAgICAgICA9IHVuaXg7XG5wcm90by52YWx1ZU9mICAgICAgICAgICA9IHZhbHVlT2Y7XG5wcm90by5jcmVhdGlvbkRhdGEgICAgICA9IGNyZWF0aW9uRGF0YTtcblxuLy8gWWVhclxucHJvdG8ueWVhciAgICAgICA9IGdldFNldFllYXI7XG5wcm90by5pc0xlYXBZZWFyID0gZ2V0SXNMZWFwWWVhcjtcblxuLy8gV2VlayBZZWFyXG5wcm90by53ZWVrWWVhciAgICA9IGdldFNldFdlZWtZZWFyO1xucHJvdG8uaXNvV2Vla1llYXIgPSBnZXRTZXRJU09XZWVrWWVhcjtcblxuLy8gUXVhcnRlclxucHJvdG8ucXVhcnRlciA9IHByb3RvLnF1YXJ0ZXJzID0gZ2V0U2V0UXVhcnRlcjtcblxuLy8gTW9udGhcbnByb3RvLm1vbnRoICAgICAgID0gZ2V0U2V0TW9udGg7XG5wcm90by5kYXlzSW5Nb250aCA9IGdldERheXNJbk1vbnRoO1xuXG4vLyBXZWVrXG5wcm90by53ZWVrICAgICAgICAgICA9IHByb3RvLndlZWtzICAgICAgICA9IGdldFNldFdlZWs7XG5wcm90by5pc29XZWVrICAgICAgICA9IHByb3RvLmlzb1dlZWtzICAgICA9IGdldFNldElTT1dlZWs7XG5wcm90by53ZWVrc0luWWVhciAgICA9IGdldFdlZWtzSW5ZZWFyO1xucHJvdG8uaXNvV2Vla3NJblllYXIgPSBnZXRJU09XZWVrc0luWWVhcjtcblxuLy8gRGF5XG5wcm90by5kYXRlICAgICAgID0gZ2V0U2V0RGF5T2ZNb250aDtcbnByb3RvLmRheSAgICAgICAgPSBwcm90by5kYXlzICAgICAgICAgICAgID0gZ2V0U2V0RGF5T2ZXZWVrO1xucHJvdG8ud2Vla2RheSAgICA9IGdldFNldExvY2FsZURheU9mV2VlaztcbnByb3RvLmlzb1dlZWtkYXkgPSBnZXRTZXRJU09EYXlPZldlZWs7XG5wcm90by5kYX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vcm1hdCAoc3RyaW5nKSB7XG4gICAgcmV0dXJuIHN0cmluZztcbn1cblxudmFyIHByb3RvJDEgPSBMb2NhbGUucHJvdG90eXBlO1xuXG5wcm90byQxLmNhbGVuZGFyICAgICAgICA9IGNhbGVuZGFyO1xucHJvdG8kMS5sb25nRGF0ZUZvcm1hdCAgPSBsb25nRGF0ZUZvcm1hdDtcbnByb3RvJDEuaW52YWxpZERhdGUgICAgID0gaW52YWxpZERhdGU7XG5wcm90byQxLm9yZGluYWwgICAgICAgICA9IG9yZGluYWw7XG5wcm90byQxLnByZXBhcnNlICAgICAgICA9IHByZVBhcnNlUG9zdEZvcm1hdDtcbnByb3RvJDEucG9zdGZvcm1hdCAgICAgID0gcHJlUGFyc2VQb3N0Rm9ybWF0O1xucHJvdG8kMS5yZWxhdGl2ZVRpbWUgICAgPSByZWxhdGl2ZVRpbWU7XG5wcm90byQxLnBhc3RGdXR1cmUgICAgICA9IHBhc3RGdXR1cmU7XG5wcm90byQxLnNldCAgICAgICAgICAgICA9IHNldDtcblxuLy8gTW9udGhcbnByb3RvJDEubW9udGhzICAgICAgICAgICAgPSAgICAgICAgbG9jYWxlTW9udGhzO1xucHJvdG8kMS5tb250aHNTaG9ydCAgICAgICA9ICAgICAgICBsb2NhbGVNb250aHNTaG9ydDtcbnByb3RvJDEubW9udGhzUGFyc2UgICAgICAgPSAgICAgICAgbG9jYWxlTW9udGhzUGFyc2U7XG5wcm90byQxLm1vbnRoc1JlZ2V4ICAgICAgID0gbW9udGhzUmVnZXg7XG5wcm90byQxLm1vbnRoc1Nob3J0UmVnZXggID0gbW9udGhzU2hvcnRSZWdleDtcblxuLy8gV2Vla1xucHJvdG8kMS53ZWVrID0gbG9jYWxlV2VlaztcbnByb3RvJDEuZmlyc3REYXlPZlllYXIgPSBsb2NhbGVGaXJzdERheU9mWWVhcjtcbnByb3RvJDEuZmlyc3REYXlPZldlZWsgPSBsb2NhbGVGaXJzdERheU9mV2VlaztcblxuLy8gRGF5IG9mI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l0dXRlVGltZUFnbyhzdHJpbmcsIG51bWJlciwgd2l0aG91dFN1ZmZpeCwgaXNGdXR1cmUsIGxvY2FsZSkge1xuICAgIHJldHVybiBsb2NhbGUucmVsYXRpdmVUaW1lKG51bWJlciB8fCAxLCAhIXdpdGhvdXRTdWZmaXgsIHN0cmluZywgaXNGdXR1cmUpO1xufVxuXG5mdW5jdGlvbiByZWxhdGl2ZVRpbWUkMSAocG9zTmVnRHVyYXRpb24sIHdpdGhvdXRTdWZmaXgsIGxvY2FsZSkge1xuICAgIHZhciBkdXJhdGlvbiA9IGNyZWF0ZUR1cmF0aW9uKHBvc05lZ0R1cmF0aW9uKS5hYnMoKTtcbiAgICB2YXIgc2Vjb25kcyAgPSByb3VuZChkdXJhdGlvbi5hcygncycpKTtcbiAgICB2YXIgbWludXRlcyAgPSByb3VuZChkdXJhdGlvbi5hcygnbScpKTtcbiAgICB2YXIgaG91cnMgICAgPSByb3VuZChkdXJhdGlvbi5hcygnaCcpKTtcbiAgICB2YXIgZGF5cyAgICAgPSByb3VuZChkdXJhdGlvbi5hcygnZCcpKTtcbiAgICB2YXIgbW9udGhzICAgPSByb3VuZChkdXJhdGlvbi5hcygnTScpKTtcbiAgICB2YXIgeWVhcnMgICAgPSByb3VuZChkdXJhdGlvbi5hcygneScpKTtcblxuICAgIHZhciBhID0gc2Vjb25kcyA8PSB0aHJlc2hvbGRzLnNzICYmIFsncycsIHNlY29uZHNdICB8fFxuICAgICAgICAgICAgc2Vjb25kcyA8IHRocmVzaG9sZHMucyAgICYmIFsnc3MnLCBzZWNvbmRzXSB8fFxuICAgICAgICAgICAgbWludXRlcyA8PSAxICAgICAgICAgICAgICYmIFsnbSddICAgICAgICAgICB8fFxuICAgICAgICAgICAgbWludXRlcyA8IHRocmVzaG9sZHMubSAgICYmIFsnbW0nLCBtaW51dGVzXSB8fFxuICAgICAgICAgICAgaG91cnMgICA8PSAxICAgICAgICAgICAgICYmIFsnaCddICAgICAgICAgICB8fFxuICAgICAgICAgICAgaG91cnMgICA8IHRocmVzaG9sZHMuaCAgICYmIFsnaGgnLCBob3Vyc10gICB8fFxuICAgICAgICAgICAgZGF5cyAgICA8PSAxICAgICAgICAgICAgICYmIFsnZCddICAgICAgICAgICB8fFxuICAgICAgICAgICAgZGF5cyAgICA8IHRocmVzaG9sZHMuZCAgICYmIFsnZGQnLCBkYXlzXSAgICB8fFxuICAgICAgICAgICAgbW9udGhzICA8PSAxICAgICAgICAgICAgICYmIFsnTSddICAgICAgICAgICB8fFxuICAgICAgICAgICAgbW9udGhzICA8IHRocmVzaG9sZHMuTSAgICYmIFsnTU0nLCBtb250aHNdICB8fFxuICAgICAgICAgICAgeWVhcnMgICA8PSAxICAgICAgICAgICAgICYmIFsneSddICAgICAgICAgICB8fCBbJ3l5JywgeWVhcnNdO1xuXG4gICAgYVsyXSA9IHdpdGhvdXRTdWZmaXg7XG4gICAgYVszXSA9ICtwb3NOZWdEdXJhdGlvbiA+IDA7XG4gICAgYVs0XSA9IGxvY2FsZTtcbiAgICByZXR1cm4gc3Vic3RpdHV0ZVRpbWVBZ28uYXBwbHkobnVsbCwgYSk7XG59XG5cbi8vIFRoaXMgZnVuY3Rpb24gYWxsb3dzIHlvdSB0byBzZXQgdGhlIHJvdW5kaW5nIGZ1bmN0aW9uIGZvciByZWxhdGl2ZSB0aW1lIHN0cmluZ3NcbmZ1bmN0aW9uIGdldFNldFJlbGF0aXZlVGltZVJvdW5kaW5nIChyb3VuZGluZ0Z1bmN0aW9uKSB7XG4gICAgaWYgKHJvdW5kaW5nRnVuY3Rpb24gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICByZXR1cm4gcm91bmQ7XG4gICAgfVxuICAgIGlmICh0eXBlb2Yocm91bmRpbmdGdW5jdGlvbikgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgcm91bmQgPSByb3VuZGluZ0Z1bmN0aW9uO1xuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG4gICAgcmV0dXJuIGZhbH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IG1pbnV0ZXMgJT0gNjA7XG5cbiAgICAvLyAxMiBtb250aHMgLT4gMSB5ZWFyXG4gICAgeWVhcnMgID0gYWJzRmxvb3IobW9udGhzIC8gMTIpO1xuICAgIG1vbnRocyAlPSAxMjtcblxuXG4gICAgLy8gaW5zcGlyZWQgYnkgaHR0cHM6Ly9naXRodWIuY29tL2RvcmRpbGxlL21vbWVudC1pc29kdXJhdGlvbi9ibG9iL21hc3Rlci9tb21lbnQuaXNvZHVyYXRpb24uanNcbiAgICB2YXIgWSA9IHllYXJzO1xuICAgIHZhciBNID0gbW9udGhzO1xuICAgIHZhciBEID0gZGF5cztcbiAgICB2YXIgaCA9IGhvdXJzO1xuICAgIHZhciBtID0gbWludXRlcztcbiAgICB2YXIgcyA9IHNlY29uZHM7XG4gICAgdmFyIHRvdGFsID0gdGhpcy5hc1NlY29uZHMoKTtcblxuICAgIGlmICghdG90YWwpIHtcbiAgICAgICAgLy8gdGhpcyBpcyB0aGUgc2FtZSBhcyBDIydzIChOb2RhKSBhbmQgcHl0aG9uIChpc29kYXRlKS4uLlxuICAgICAgICAvLyBidXQgbm90IG90aGVyIEpTIChnb29nLmRhdGUpXG4gICAgICAgIHJldHVybiAnUDBEJztcbiAgICB9XG5cbiAgICByZXR1cm4gKHRvdGFsIDwgMCA/ICctJyA6ICcnKSArXG4gICAgICAgICdQJyArXG4gICAgICAgIChZID8gWSArICdZJyA6ICcnKSArXG4gICAgICAgIChNID8gTSArICdNJyA6ICcnKSArXG4gICAgICAgIChEID8gRCArICdEJyA6ICcnKSArXG4gICAgICAgICgoaCB8fCBtIHx8IHMpID8gJ1QnIDogJycpICtcbiAgICAgICAgKGggPyBoICsgJ0gnIDogJycpICtcbiAgICAgICAgKG0gPyBtICsgJ00nIDogJycpICtcbiAgICAgICAgKHMgPyBzICsgJ1MnIDogJycpO1xufVxuXG52YXIgcHJvdG8kMiA9IER1cmF0aW9uLnByb3RvdHlwZTtcblxucHJvdG8kMi5pc1ZhbGlkICAgICAgICA9IGlzVmFsaWQkMTtcbnByb3RvJDIuYWJzICAgICAgICAgICAgPSBhYnM7XG5wcm90byQyLmFkZCAgICAgICAgICAgID0gYWRkJDE7XG5wcm90byQyLnN1YnRyYWN0ICAgICAgID0gc3VidHJhY3QkMTtcbnByb3RvJDIuYXMgICAgICAgICAgICAgPSBhcztcbnByb3RvJDIuYXNNaWxsaXNlY29uZHMgPSBhc01pbGxpc2Vjb25kcztcbnByb3RvJDIuYXNTZWNvbmRzICAgICAgPSBhc1NlY29uZHM7XG5wcm90byQyLmFzTWludXRlcyAgICAgID0gYXNNaW51dGVzO1xucHJvdG8kMi5hc0hvdXJzICAgICAgICA9IGFzSG91cnM7XG5wcm90byQyLmFzRGF5cyAgICAgICAgID0gYXNEYXlzO1xucHJvdG8kMi5hc1dlZWtzICAgICAgICA9IGFzV2Vla3M7XG5wcm90byQyLmFzTW9udGhzICAgICAgID0gYXNNb250aHM7XG5wcm90byQyLmFzWWVhcnMgICAgICAgID0gYXNZZWFycztcbnByb3RvJDIudmFsdWVPZiAgICAgICAgPSB2YWx1ZU9mJDE7XG5wcm90byQyLl9idWJibGUgICAgICAgID0gYnViYmxlO1xucHJvdG8kMi5nZXQgICAgICAgICAgICA9IGdldCQyO1xucHJvdG8kMi5taWxsaXNlY29uZHMgICA9IG1pbGxpc2Vjb25kcztcbnByb3RvJDIuc2Vjb25kcyAgICAgICAgPSBzZWNvbmRzO1xucHJvdG8kMi5taW51dGVzICAgICAgICA9IG1pbnV0ZXM7XG5wcm90byQyLmhvdXJzICAgICAgICAgID0gaG91cnM7XG5wcm90byQyLmRheXMgICAgICAgICAgID0gZGF5cztcbnByb3RvJDIud2Vla3MgICAgICAgICAgPSB3ZWVrcztcbnByb3RvJDIubW9udGhzICAgICAgICAgPSBtb250aHM7XG5wcm90byQyLnllYXJzICAgICAgICAgID0geWVhcnM7XG5wcm90byQyLmh1bWFuaXplICAgICAgID0gaHVtYW5pemU7XG5wcm90byQyLnRvSVNPU3RyaW5nIC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zIuMTguMSc7XG5cbnNldEhvb2tDYWxsYmFjayhjcmVhdGVMb2NhbCk7XG5cbmhvb2tzLmZuICAgICAgICAgICAgICAgICAgICA9IHByb3RvO1xuaG9va3MubWluICAgICAgICAgICAgICAgICAgID0gbWluO1xuaG9va3MubWF4ICAgICAgICAgICAgICAgICAgID0gbWF4O1xuaG9va3Mubm93ICAgICAgICAgICAgICAgICAgID0gbm93O1xuaG9va3MudXRjICAgICAgICAgICAgICAgICAgID0gY3JlYXRlVVRDO1xuaG9va3MudW5peCAgICAgICAgICAgICAgICAgID0gY3JlYXRlVW5peDtcbmhvb2tzLm1vbnRocyAgICAgICAgICAgICAgICA9IGxpc3RNb250aHM7XG5ob29rcy5pc0RhdGUgICAgICAgICAgICAgICAgPSBpc0RhdGU7XG5ob29rcy5sb2NhbGUgICAgICAgICAgICAgICAgPSBnZXRTZXRHbG9iYWxMb2NhbGU7XG5ob29rcy5pbnZhbGlkICAgICAgICAgICAgICAgPSBjcmVhdGVJbnZhbGlkO1xuaG9va3MuZHVyYXRpb24gICAgICAgICAgICAgID0gY3JlYXRlRHVyYXRpb247XG5ob29rcy5pc01vbWVudCAgICAgICAgICAgICAgPSBpc01vbWVudDtcbmhvb2tzLndlZWtkYXlzICAgICAgICAgICAgICA9IGxpc3RXZWVrZGF5cztcbmhvb2tzLnBhcnNlWm9uZSAgICAgICAgICAgICA9IGNyZWF0ZUluWm9uZTtcbmhvb2tzLmxvY2FsZURhdGEgICAgICAgICAgICA9IGdldExvY2FsZTtcbmhvb2tzLmlzRHVyYXRpb24gICAgICAgICAgICA9IGlzRHVyYXRpb247XG5ob29rcy5tb250aHNTaG9ydCAgICAgICAgICAgPSBsaXN0TW9udGhzU2hvcnQ7XG5ob29rcy53ZWVrZGF5c01pbiAgICAgICAgICAgPSBsaXN0V2Vla2RheXNNaW47XG5ob29rcy5kZWZpbmVMb2NhbGUgICAgICAgICAgPSBkZWZpbmVMb2NhbGU7XG5ob29rcy51cGRhdGVMb2NhbGU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IHt9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgIG9uRWFjaEV2ZW50KGV2ZW50cywgZnVuY3Rpb24obmFtZSwgcG9zKSB7XG4gICAgICAgICAgICBpZiAoZm4pIHtcbiAgICAgICAgICAgICAgdmFyIGFyciA9IGNhbGxiYWNrc1tuYW1lXVxuICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgY2I7IGNiID0gYXJyICYmIGFycltpXTsgKytpKSB7XG4gICAgICAgICAgICAgICAgaWYgKGNiID09IGZuKSBhcnIuc3BsaWNlKGktLSwgMSlcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGRlbGV0ZSBjYWxsYmFja3NbbmFtZV1cbiAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBlbFxuICAgICAgfSxcbiAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgd3JpdGFibGU6IGZhbHNlLFxuICAgICAgY29uZmlndXJhYmxlOiBmYWxzZVxuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBMaXN0ZW4gdG8gdGhlIGdpdmVuIHNwYWNlIHNlcGFyYXRlZCBsaXN0IG9mIGBldmVudHNgIGFuZFxuICAgICAqIGV4ZWN1dGUgdGhlIGBjYWxsYmFja2AgYXQgbW9zdCBvbmNlXG4gICAgICogQHBhcmFtICAgeyBTdHJpbmcgfSBldmVudHMgLSBldmVudHMgaWRzXG4gICAgICogQHBhcmFtICAgeyBGdW5jdGlvbiB9IGZuIC0gY2FsbGJhY2sgZnVuY3Rpb25cbiAgICAgKiBAcmV0dXJucyB7IE9iamVjdCB9IGVsXG4gICAgICovXG4gICAgb25lOiB7XG4gICAgICB2YWx1ZTogZnVuY3Rpb24oZXZlbnRzLCBmbikge1xuICAgICAgICBmdW5jdGlvbiBvbigpIHtcbiAgICAgICAgICBlbC5vZmYoZXZlbnRzLCBvbilcbiAgICAgICAgICBmbi5hcHBseShlbCwgYXJndW1lbnRzKVxuICAg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ICAgICBzdGFydCxcbiAgICAgIHBvcyxcbiAgICAgIHJlID0gX2JwWzZdXG5cbiAgICBpc2V4cHIgPSBzdGFydCA9IHJlLmxhc3RJbmRleCA9IDBcblxuICAgIHdoaWxlICgobWF0Y2ggPSByZS5leGVjKHN0cikpKSB7XG5cbiAgICAgIHBvcyA9IG1hdGNoLmluZGV4XG5cbiAgICAgIGlmIChpc2V4cHIpIHtcblxuICAgICAgICBpZiAobWF0Y2hbMl0pIHtcbiAgICAgICAgICByZS5sYXN0SW5kZXggPSBza2lwQnJhY2VzKHN0ciwgbWF0Y2hbMl0sIHJlLmxhc3RJbmRleClcbiAgICAgICAgICBjb250aW51ZVxuICAgICAgICB9XG4gICAgICAgIGlmICghbWF0Y2hbM10pIHtcbiAgICAgICAgICBjb250aW51ZVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmICghbWF0Y2hbMV0pIHtcbiAgICAgICAgdW5lc2NhcGVTdHIoc3RyLnNsaWNlKHN0YXJ0LCBwb3MpKVxuICAgICAgICBzdGFydCA9IHJlLmxhc3RJbmRleFxuICAgICAgICByZSA9IF9icFs2ICsgKGlzZXhwciBePSAxKV1cbiAgICAgICAgcmUubGFzdEluZGV4ID0gc3RhcnRcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoc3RyICYmIHN0YXJ0IDwgc3RyLmxlbmd0aCkge1xuICAgICAgdW5lc2NhcGVTdHIoc3RyLnNsaWNlKHN0YXJ0KSlcbiAgICB9XG5cbiAgICByZXR1cm4gcGFydHNcblxuICAgIGZ1bmN0aW9uIHVuZXNjYXBlU3RyIChzKSB7XG4gICAgICBpZiAodG1wbCB8fCBpc2V4cHIpIHtcbiAgICAgICAgcGFydHMucHVzaChzICYmIHMucmVwbGFjZShfYnBbNV0sICckMScpKVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcGFydHMucHVzaChzKVxuICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIHNraXBCcmFjZXMgKHMs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pID0gaiA9IDA7IGkgPCBwYXJ0cy5sZW5ndGg7ICsraSkge1xuXG4gICAgICAgIGV4cHIgPSBwYXJ0c1tpXVxuXG4gICAgICAgIGlmIChleHByICYmIChleHByID0gaSAmIDFcblxuICAgICAgICAgICAgPyBfcGFyc2VFeHByKGV4cHIsIDEsIHFzdHIpXG5cbiAgICAgICAgICAgIDogJ1wiJyArIGV4cHJcbiAgICAgICAgICAgICAgICAucmVwbGFjZSgvXFxcXC9nLCAnXFxcXFxcXFwnKVxuICAgICAgICAgICAgICAgIC5yZXBsYWNlKC9cXHJcXG4/fFxcbi9nLCAnXFxcXG4nKVxuICAgICAgICAgICAgICAgIC5yZXBsYWNlKC9cIi9nLCAnXFxcXFwiJykgK1xuICAgICAgICAgICAgICAnXCInXG5cbiAgICAgICAgICApKSBsaXN0W2orK10gPSBleHByXG5cbiAgICAgIH1cblxuICAgICAgZXhwciA9IGogPCAyID8gbGlzdFswXVxuICAgICAgICAgICA6ICdbJyArIGxpc3Quam9pbignLCcpICsgJ10uam9pbihcIlwiKSdcblxuICAgIH0gZWxzZSB7XG5cbiAgICAgIGV4cHIgPSBfcGFyc2VFeHByKHBhcnRzWzFdLCAwLCBxc3RyKVxuICAgIH1cblxuICAgIGlmIChxc3RyWzBdKSB7XG4gICAgICBleHByID0gZXhwci5yZXBsYWNlKFJFX1FCTUFSSywgZnVuY3Rpb24gKF8sIHBvcykge1xuICAgICAgICByZXR1cm4gcXN0cltwb3NdXG4gICAgICAgICAgLnJlcGxhY2UoL1xcci9nLCAnXFxcXHInKVxuICAgICAgICAgIC5yZXBsYWNlKC9cXG4vZywgJ1xcXFxuJylcbiAgICAgIH0pXG4gICAgfVxuICAgIHJldHVybiBleHByXG4gIH1cblxuICB2YXJcbiAgICBSRV9CUkVORCA9IHtcbiAgICAgICcoJzogL1soKV0vZyxcbiAgICAgICdbJzogL1tbXFxdXS9nLFxuICAgICAgJ3snOiAvW3t9XS9nXG4gICAgfVxuXG4gIGZ1bmN0aW9uIF9wYXJzZUV4cHIgKGV4cHIsIGFzVGV4dCwgcXN0cikge1xuXG4gICAgZXhwciA9IGV4cHJcbiAgICAgICAgICAucmVwbGFjZShSRV9RQkxPQ0ssIGZ1bmN0aW9uIChzLCBkaXYpIHtcbiAgICAgICAgICAgIHJldHVybiBzLmxlbmd0aCA+IDIgJiYgIWRpdiA/IENIX0lERVhQUiArIChxc3RyLnB1c2gocykgLSAxKSArICd+JyA6IHNcbiAgICAgICAgICB9KVxuICAgICAgICAgIC5yZXBsYWNlKC9cXHMrL2csICcgJykudHJpbSgpXG4gICAgICAgICAgLnJlcGxhY2UoL1xcID8oW1tcXCh7fSw/XFwuOl0pXFwgPy9nLCAnJDEnKVxuXG4gICAgaWYgKGV4cHIpIHtcbiAgICAgIHZhclxuICAgICAgICBsaXN0ID0gW10sXG4gICAgICAgIGNudCA9IDAsXG4gICAgICAgIG1hdGNoXG5cbiAgICAgIHdoaWxlIChleHByICYmXG4gICAgICAgICAgICAobWF0Y2ggPSBleHByLm1hdGNoKFJFX0NTTkFNRSkpICYmXG4gICAgICAgICAgICAhbWF0Y2guaW5kZXhcbiAgICAgICAgKSB7XG4gICAgICAgIHZhclxuICAgICAgICAgIGtleSxcbiAgICAgICAgICBqc2IsXG4gICAgICAgICAgcmUgPSAvLHwoW1t7KF0pfCQvZ1xuXG4gICAgICAgIGV4cHIgPSBSZWdFeHAucmlnaHRDb250ZXh0XG4gICAgICAgIGtleSAgPSBtYXRjaFsyXSA/IHFzdHJbbWF0Y2hbMl1dLnNsaWNlKDEsIC0xKS50cmltKCkucmVwbGFjZSgvXFxzKy9nLCAnICcpIDogbWF0Y2hbMV1cblxuICAgICAgICB3aGlsZSAoanNiID0gKG1hdGNoID0gcmUuZXhlYyhleHByKSlbMV0pIHNraXBCcmFjZXMoanNiLCByZSlcblxuICAgICAgICBqc2IgID0gZXhwci5zbGljZSgwLCBtYXRjaC5pbmRleClcbiAgICAgICAgZXhwciA9IFJlZ0V4cC5yaWdodENvbnR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5ld3xEYXRlfFJlZ0V4cHxNYXRoKSg/IVskXFx3XSkpKFskX0EtWmEtel1bJFxcd10qKS9nLFxuICAgIEpTX05PUFJPUFMgPSAvXig/PShcXC5bJFxcd10rKSlcXDEoPzpbXi5bKF18JCkvXG5cbiAgZnVuY3Rpb24gX3dyYXBFeHByIChleHByLCBhc1RleHQsIGtleSkge1xuICAgIHZhciB0YlxuXG4gICAgZXhwciA9IGV4cHIucmVwbGFjZShKU19WQVJOQU1FLCBmdW5jdGlvbiAobWF0Y2gsIHAsIG12YXIsIHBvcywgcykge1xuICAgICAgaWYgKG12YXIpIHtcbiAgICAgICAgcG9zID0gdGIgPyAwIDogcG9zICsgbWF0Y2gubGVuZ3RoXG5cbiAgICAgICAgaWYgKG12YXIgIT09ICd0aGlzJyAmJiBtdmFyICE9PSAnZ2xvYmFsJyAmJiBtdmFyICE9PSAnd2luZG93Jykge1xuICAgICAgICAgIG1hdGNoID0gcCArICcoXCInICsgbXZhciArIEpTX0NPTlRFWFQgKyBtdmFyXG4gICAgICAgICAgaWYgKHBvcykgdGIgPSAocyA9IHNbcG9zXSkgPT09ICcuJyB8fCBzID09PSAnKCcgfHwgcyA9PT0gJ1snXG4gICAgICAgIH0gZWxzZSBpZiAocG9zKSB7XG4gICAgICAgICAgdGIgPSAhSlNfTk9QUk9QUy50ZXN0KHMuc2xpY2UocG9zKSlcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgcmV0dXJuIG1hdGNoXG4gICAgfSlcblxuICAgIGlmICh0Yikge1xuICAgICAgZXhwciA9ICd0cnl7cmV0dXJuICcgKyBleHByICsgJ31jYXRjaChlKXtFKGUsdGhpcyl9J1xuICAgIH1cblxuICAgIGlmIChrZXkpIHtcblxuICAgICAgZXhwciA9ICh0YlxuICAgICAgICAgID8gJ2Z1bmN0aW9uKCl7JyArIGV4cHIgKyAnfS5jYWxsKHRoaXMpJyA6ICcoJyArIGV4cHIgKyAnKSdcbiAgICAgICAgKSArICc/XCInICsga2V5ICs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hhID0gZDNfbnVtYmVyKGYuY2FsbChhcnJheSwgYXJyYXlbaV0sIGkpKSkpIG51bWJlcnMucHVzaChhKTtcbiAgICB9XG4gICAgaWYgKG51bWJlcnMubGVuZ3RoKSByZXR1cm4gZDMucXVhbnRpbGUobnVtYmVycy5zb3J0KGQzX2FzY2VuZGluZyksIC41KTtcbiAgfTtcbiAgZDMudmFyaWFuY2UgPSBmdW5jdGlvbihhcnJheSwgZikge1xuICAgIHZhciBuID0gYXJyYXkubGVuZ3RoLCBtID0gMCwgYSwgZCwgcyA9IDAsIGkgPSAtMSwgaiA9IDA7XG4gICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPT09IDEpIHtcbiAgICAgIHdoaWxlICgrK2kgPCBuKSB7XG4gICAgICAgIGlmIChkM19udW1lcmljKGEgPSBkM19udW1iZXIoYXJyYXlbaV0pKSkge1xuICAgICAgICAgIGQgPSBhIC0gbTtcbiAgICAgICAgICBtICs9IGQgLyArK2o7XG4gICAgICAgICAgcyArPSBkICogKGEgLSBtKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICBpZiAoZDNfbnVtZXJpYyhhID0gZDNfbnVtYmVyKGYuY2FsbChhcnJheSwgYXJyYXlbaV0sIGkpKSkpIHtcbiAgICAgICAgICBkID0gYSAtIG07XG4gICAgICAgICAgbSArPSBkIC8gKytqO1xuICAgICAgICAgIHMgKz0gZCAqIChhIC0gbSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gICAgaWYgKGogPiAxKSByZXR1cm4gcyAvIChqIC0gMSk7XG4gIH07XG4gIGQzLmRldmlhdGlvbiA9IGZ1bmN0aW9uKCkge1xuICAgIHZhciB2ID0gZDMudmFyaWFuY2UuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICByZXR1cm4gdiA/IE1hdGguc3FydCh2KSA6IHY7XG4gIH07XG4gIGZ1bmN0aW9uI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NlID0gZnVuY3Rpb24obWF0cml4KSB7XG4gICAgaWYgKCEobiA9IG1hdHJpeC5sZW5ndGgpKSByZXR1cm4gW107XG4gICAgZm9yICh2YXIgaSA9IC0xLCBtID0gZDMubWluKG1hdHJpeCwgZDNfdHJhbnNwb3NlTGVuZ3RoKSwgdHJhbnNwb3NlID0gbmV3IEFycmF5KG0pOyArK2kgPCBtOyApIHtcbiAgICAgIGZvciAodmFyIGogPSAtMSwgbiwgcm93ID0gdHJhbnNwb3NlW2ldID0gbmV3IEFycmF5KG4pOyArK2ogPCBuOyApIHtcbiAgICAgICAgcm93W2pdID0gbWF0cml4W2pdW2ldO1xuICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gdHJhbnNwb3NlO1xuICB9O1xuICBmdW5jdGlvbiBkM190cmFuc3Bvc2VMZW5ndGgoZCkge1xuICAgIHJldHVybiBkLmxlbmd0aDtcbiAgfVxuICBkMy56aXAgPSBmdW5jdGlvbigpIHtcbiAgICByZXR1cm4gZDMudHJhbnNwb3NlKGFyZ3VtZW50cyk7XG4gIH07XG4gIGQzLmtleXMgPSBmdW5jdGlvbihtYXApIHtcbiAgICB2YXIga2V5cyA9IFtdO1xuICAgIGZvciAodmFyIGtleSBpbiBtYXApIGtleXMucHVzaChrZXkpO1xuICAgIHJldHVybiBrZXlzO1xuICB9O1xuICBkMy52YWx1ZXMgPSBmdW5jdGlvbihtYXApIHtcbiAgICB2YXIgdmFsdWVzID0gW107XG4gICAgZm9yICh2YXIga2V5IGluIG1hcCkgdmFsdWVzLnB1c2gobWFwW2tleV0pO1xuICAgIHJldHVybiB2YWx1ZXM7XG4gIH07XG4gIGQzLmVudHJpZXMgPSBmdW5jdGlvbihtYXApIHtcbiAgICB2YXIgZW50cmllcyA9IFtdO1xuICAgIGZvciAodmFyIGtleSBpbiBtYXApIGVudHJpZXMucHVzaCh7XG4gICAgICBrZXk6IGtleSxcbiAgICAgIHZhbHVlOiBtYXBba2V5XVxuICAgIH0pO1xuICAgIHJld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Quc2V0KGtleVZhbHVlLCBtYXAobWFwVHlwZSwgdmFsdWVzLCBkZXB0aCkpO1xuICAgICAgICB9O1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgb2JqZWN0ID0ge307XG4gICAgICAgIHNldHRlciA9IGZ1bmN0aW9uKGtleVZhbHVlLCB2YWx1ZXMpIHtcbiAgICAgICAgICBvYmplY3Rba2V5VmFsdWVdID0gbWFwKG1hcFR5cGUsIHZhbHVlcywgZGVwdGgpO1xuICAgICAgICB9O1xuICAgICAgfVxuICAgICAgdmFsdWVzQnlLZXkuZm9yRWFjaChzZXR0ZXIpO1xuICAgICAgcmV0dXJuIG9iamVjdDtcbiAgICB9XG4gICAgZnVuY3Rpb24gZW50cmllcyhtYXAsIGRlcHRoKSB7XG4gICAgICBpZiAoZGVwdGggPj0ga2V5cy5sZW5ndGgpIHJldHVybiBtYXA7XG4gICAgICB2YXIgYXJyYXkgPSBbXSwgc29ydEtleSA9IHNvcnRLZXlzW2RlcHRoKytdO1xuICAgICAgbWFwLmZvckVhY2goZnVuY3Rpb24oa2V5LCBrZXlNYXApIHtcbiAgICAgICAgYXJyYXkucHVzaCh7XG4gICAgICAgICAga2V5OiBrZXksXG4gICAgICAgICAgdmFsdWVzOiBlbnRyaWVzKGtleU1hcCwgZGVwdGgpXG4gICAgICAgIH0pO1xuICAgICAgfSk7XG4gICAgICByZXR1cm4gc29ydEtleSA/IGFycmF5LnNvcnQoZnVuY3Rpb24oYSwgYikge1xuICAgICAgICByZXR1cm4gc29ydEtleShhLmtleSwgYi5rZXkpO1xuICAgICAgfSkgOiBhcnJheTtcbiAgICB9XG4gICAgbmVzdC5tYXAgPSBmdW5jdGlvbihhcnJheSwgbWFwVHlwZSkge1xuICAgICAgcmV0dXJuIG1hcChtYXBUeXBlLCBhcnJheSwgMCk7XG4gICAgfTtcbiAgICBuZXN0LmVudHJpZXMgPSBmdW5jdGlvbihhcnJheSkge1xuICAgICAgcmV0dXJuIGVudHJpZXMobWFwKGQzL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O1xuICAgICAgICAgICAgICB0aGlzLl9fY2hhcnRfXyA9IHZpZXcgPSB7XG4gICAgICAgICAgICAgICAgeDogY3ggLSBsWzBdICogayxcbiAgICAgICAgICAgICAgICB5OiBjeSAtIGxbMV0gKiBrLFxuICAgICAgICAgICAgICAgIGs6IGtcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgem9vbWVkKGRpc3BhdGNoKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgfSkuZWFjaChcImludGVycnVwdC56b29tXCIsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgem9vbWVuZGVkKGRpc3BhdGNoKTtcbiAgICAgICAgICB9KS5lYWNoKFwiZW5kLnpvb21cIiwgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICB6b29tZW5kZWQoZGlzcGF0Y2gpO1xuICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRoaXMuX19jaGFydF9fID0gdmlldztcbiAgICAgICAgICB6b29tc3RhcnRlZChkaXNwYXRjaCk7XG4gICAgICAgICAgem9vbWVkKGRpc3BhdGNoKTtcbiAgICAgICAgICB6b29tZW5kZWQoZGlzcGF0Y2gpO1xuICAgICAgICB9XG4gICAgICB9KTtcbiAgICB9O1xuICAgIHpvb20udHJhbnNsYXRlID0gZnVuY3Rpb24oXykge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gWyB2aWV3LngsIHZpZXcueSBdO1xuICAgICAgdmlldyA9IHtcbiAgICAgICAgeDogK19bMF0sXG4gICAgICAgIHk6ICtfWzFdLFxuICAgICAgICBrOiB2aWV3LmtcbiAgICAgIH07XG4gICAgICByZXNjYWxlKCk7XG4gICAgICByZXR1cm4gem9vbTtcbiAgICB9O1xuICAgIHpvb20uc2NhbGUgPSBmdW5jdGlvbihfKSB7XG4gICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiB2aWV3Lms7XG4gICAgICB2aWV3ID0ge1xuICAgICAgICB4OiB2aWV3LngsXG4gICAgICAgIHk6IHZpZXcueSxcbiAgICAgICAgazogbnVsbFxuICAgICAgfTtcbiAgICAgIHNjYWxlVG8oK18pO1xuICAgICAgcmVzY2FsZSgpO1xuICAgICAgcmV0dXJuIHpvb207XG4gICAgfTtcbiAgICB6b29tLnNjYWxlRXh0ZW50ID0gZnVuY3Rpb24oXykge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gc2NhbGVFeHRlbnQ7XG4gICAgICBzY2FsZUV4dGVudCA9IF8gPT0gbnVsbCA/IGQzX2JlaGF2aW9yX3pvb21JbmZpbml0eSA6IFsgK19bMF0sICtfWzFdIF07XG4gICAgICByZXR1cm4gem9vbTtcbiAgICB9O1xuICAgIHpvb20uY2VudGVyID0gZnVuY3Rpb24oXykge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gY2VudGVyO1xuICAgICAgY2VudGVyID0gXyAmJiBbICtfWzBdLCArX1sxXSBdO1xuICAgICAgcmV0dXJuIHpvb207XG4gICAgfTtcbiAgICB6b29tLnNpemUgPSBmdW5jdGlvbihfKSB7XG4gICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBzaXplO1xuICAgICAgc2l6ZSA9IF8gJiYgWyArX1swXSwgK19bMV0gXTtcbiAgICAgIHJldHVybiB6b29tO1xuICAgIH07XG4gICAgem9vbS5kdXJhdGlvbiA9IGZ1bmN0aW9uKF8pIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIGR1cmF0aW9uO1xuICAgICAgZHVyYXRpb24gPSArXztcbiAgICAgIHJldHVybiB6b29tO1xuICAgIH07XG4gICAgem9vbS54ID0gZnVuY3Rpb24oeikge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4geDE7XG4gICAgICB4MSA9IHo7XG4gICAgICB4MCA9IHouY29weSgpO1xuICAgICAgdmlldyA9IHtcbiAgICAgICAgeDogMCxcbiAgICAgICAgeTogMCxcbiAgICAgICAgazogMVxuICAgICAgfTtcbiAgICAgIHJldHVybiB6b29tO1xuICAgIH07XG4gICAgem9vbS55ID0gZnVuY3Rpb24oeikge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4geTE7XG4gICAgICB5MSA9IHo7XG4gICAgICB5MCA9IHouY29weSgpO1xuICAgICAgdmlldyA9IHtcbiAgICAgICAgeDogMCxcbiAgICAgICAgeTogMCxcbiAgICAgICAgazogMVxuICAgICAgfTtcbiAgICAgIHJldHVybiB6b29tO1xuICAgIH07XG4gICAgZnVuY3Rpb24gbG9jYXRpb24ocCkge1xuICAgICAgcmV0dXJuIFsgKHBbMF0gLSB2aWV3LngpIC8gdmlldy5rLCAocFsxXSAtIHZpZXcueSkgLyB2aWV3LmsgXTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcG9pbnQobCkge1xuICAgICAgcmV0dXJuIFsgbFswXSAqIHZpZXcuayArIHZpZXcueCwgbFsxXSAqIHZpZXcuayArIHZpZXcueSBdO1xuICAgIH1cbiAgICBmdW5jdGlvbiBzY2FsZVRvKHMpIHtcbiAgICAgIHZpZXcuayA9IE1hdGgubWF4KHNjYWxlRXh0ZW50WzBdLCBNYXRoLm1pbihzY2FsZUV4dGVudFsxXSwgcykpO1xuICAgIH1cbiAgICBmdW5jdGlvbiB0cmFuc2xhdGVUbyhwLCBsKSB7XG4gICAgICBsID0gcG9pbnQobCk7XG4gICAgICB2aWV3LnggKz0gcFswXSAtIGxbMF07XG4gICAgICB2aWV3LnkgKz0gcFsxXSAtIGxbMV07XG4gICAgfVxuICAgIGZ1bmN0aW9uIHpvb21Ubyh0aGF0LCBwLCBsLCBrKSB7XG4gICAgICB0aGF0Ll9fY2hhcnRfXyA9IHtcbiAgICAgICAgeDogdmlldy54LFxuICAgICAgICB5OiB2aWV3LnksXG4gICAgICAgIGs6IHZpZXcua1xu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2hhckNvZGVBdChJKyspLCBrID0gMTtcbiAgICAgICAgICBpZiAoYyA9PT0gMTApIGVvbCA9IHRydWU7IGVsc2UgaWYgKGMgPT09IDEzKSB7XG4gICAgICAgICAgICBlb2wgPSB0cnVlO1xuICAgICAgICAgICAgaWYgKHRleHQuY2hhckNvZGVBdChJKSA9PT0gMTApICsrSSwgKytrO1xuICAgICAgICAgIH0gZWxzZSBpZiAoYyAhPT0gZGVsaW1pdGVyQ29kZSkgY29udGludWU7XG4gICAgICAgICAgcmV0dXJuIHRleHQuc2xpY2UoaiwgSSAtIGspO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0ZXh0LnNsaWNlKGopO1xuICAgICAgfVxuICAgICAgd2hpbGUgKCh0ID0gdG9rZW4oKSkgIT09IEVPRikge1xuICAgICAgICB2YXIgYSA9IFtdO1xuICAgICAgICB3aGlsZSAodCAhPT0gRU9MICYmIHQgIT09IEVPRikge1xuICAgICAgICAgIGEucHVzaCh0KTtcbiAgICAgICAgICB0ID0gdG9rZW4oKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoZiAmJiAoYSA9IGYoYSwgbisrKSkgPT0gbnVsbCkgY29udGludWU7XG4gICAgICAgIHJvd3MucHVzaChhKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiByb3dzO1xuICAgIH07XG4gICAgZHN2LmZvcm1hdCA9IGZ1bmN0aW9uKHJvd3MpIHtcbiAgICAgIGlmIChBcnJheS5pc0FycmF5KHJvd3NbMF0pKSByZXR1cm4gZHN2LmZvcm1hdFJvd3Mocm93cyk7XG4gICAgICB2YXIgZmllbGRTZXQgPSBuZXcgZDNfU2V0KCksIGZpZWxkcyA9IFtdO1xuICAgICAgcm93cy5mb3JFYWNoKGZ1bmN0aW9uKHJvdykge1xuICAgICAgICBmb3IgKHZhciBmaWVsZCBpbiByb3cpIHtcbiAgICAgICAgICBpZiAoIWZpZWxkU2V0LmhhcyhmaWVsZCkpIHtcbiAgICAgICAgICAgIGZpZWxkcy5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wiOlxuICAgICAgICBjb21tYSA9IHRydWU7XG4gICAgICAgIHR5cGUgPSBcImdcIjtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgICBjYXNlIFwiJVwiOlxuICAgICAgICBzY2FsZSA9IDEwMDtcbiAgICAgICAgc3VmZml4ID0gXCIlXCI7XG4gICAgICAgIHR5cGUgPSBcImZcIjtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgICBjYXNlIFwicFwiOlxuICAgICAgICBzY2FsZSA9IDEwMDtcbiAgICAgICAgc3VmZml4ID0gXCIlXCI7XG4gICAgICAgIHR5cGUgPSBcInJcIjtcbiAgICAgICAgYnJlYWs7XG5cbiAgICAgICBjYXNlIFwiYlwiOlxuICAgICAgIGNhc2UgXCJvXCI6XG4gICAgICAgY2FzZSBcInhcIjpcbiAgICAgICBjYXNlIFwiWFwiOlxuICAgICAgICBpZiAoc3ltYm9sID09PSBcIiNcIikgcHJlZml4ID0gXCIwXCIgKyB0eXBlLnRvTG93ZXJDYXNlKCk7XG5cbiAgICAgICBjYXNlIFwiY1wiOlxuICAgICAgICBleHBvbmVudCA9IGZhbHNlO1xuXG4gICAgICAgY2FzZSBcImRcIjpcbiAgICAgICAgaW50ZWdlciA9IHRydWU7XG4gICAgICAgIHByZWNpc2lvbiA9IDA7XG4gICAgICAgIGJyZWFrO1xuXG4gICAgICAgY2FzZSBcInNcIjpcbiAgICAgICAgc2NhbGUgPSAtMTtcbiAgICAgICAgdHlwZSA9IFwiclwiO1xuICAgICAgICBicmVhaztcbiAgICAgIH1cbiAgICAgIGlmIChzeW1ib2wgPT09IFwiJFwiKSBwcmVmaXggPSBsb2NhbGVfY3VycmVuY3lbMF0sIHN1ZmZpeCA9IGxvY2FsZV9jdXJyZW5jeVsxXTtcbiAgICAgIGlmICh0eXBlID09IFwiclwiICYmICFwcmVjaXNpb24pIHR5cGUgPSBcImdcIjtcbiAgICAgIGlmIChwcmVjaXNpb24gIT0gbnVsbCkge1xuICAgICAgICBpZiAodHlwZ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gICAgIGlmIChmID0gZDNfdGltZV9mb3JtYXRzW2NdKSBjID0gZihkYXRlLCBwID09IG51bGwgPyBjID09PSBcImVcIiA/IFwiIFwiIDogXCIwXCIgOiBwKTtcbiAgICAgICAgICAgIHN0cmluZy5wdXNoKGMpO1xuICAgICAgICAgICAgaiA9IGkgKyAxO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzdHJpbmcucHVzaCh0ZW1wbGF0ZS5zbGljZShqLCBpKSk7XG4gICAgICAgIHJldHVybiBzdHJpbmcuam9pbihcIlwiKTtcbiAgICAgIH1cbiAgICAgIGZvcm1hdC5wYXJzZSA9IGZ1bmN0aW9uKHN0cmluZykge1xuICAgICAgICB2YXIgZCA9IHtcbiAgICAgICAgICB5OiAxOTAwLFxuICAgICAgICAgIG06IDAsXG4gICAgICAgICAgZDogMSxcbiAgICAgICAgICBIOiAwLFxuICAgICAgICAgIE06IDAsXG4gICAgICAgICAgUzogMCxcbiAgICAgICAgICBMOiAwLFxuICAgICAgICAgIFo6IG51bGxcbiAgICAgICAgfSwgaSA9IGQzX3RpbWVfcGFyc2UoZCwgdGVtcGxhdGUsIHN0cmluZywgMCk7XG4gICAgICAgIGlmIChpICE9IHN0cmluZy5sZW5ndGgpIHJldHVybiBudWxsO1xuICAgICAgICBpZiAoXCJwXCIgaW4gZCkgZC5IID0gZC5IICUgMTIgKyBkLnAgKiAxMjtcbiAgICAgICAgdmFyIGxvY2FsWiA9IGQuWiAhPSBudWxsICYmIGQzX2RhdGUgIT09IGQzX2RhdGVfdXRjLCBkYXRlID0gbmV3IChsb2NhbFogPyBkM19kYXRlX3V0YyA6IGQzX2RhdGUpKCk7XG4gICAgICAgIGlmIChcImpcIiBpbiBkKSBkYXRlLnNldEZ1bGxZZWFyKGQueSwgMCwgZC5qKTsgZWxzZSBpZiAoXCJXXCIgaW4gZCB8fCBcIlVcIiBpbiBkKSB7XG4gICAgICAgICAgaWYgKCEoXCJ3XCIgaW4gZCkpIGQudyA9I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KyspIDogdF07XG4gICAgICAgICAgaWYgKCFwIHx8IChqID0gcChkYXRlLCBzdHJpbmcsIGopKSA8IDApIHJldHVybiAtMTtcbiAgICAgICAgfSBlbHNlIGlmIChjICE9IHN0cmluZy5jaGFyQ29kZUF0KGorKykpIHtcbiAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHJldHVybiBqO1xuICAgIH1cbiAgICBkM190aW1lX2Zvcm1hdC51dGMgPSBmdW5jdGlvbih0ZW1wbGF0ZSkge1xuICAgICAgdmFyIGxvY2FsID0gZDNfdGltZV9mb3JtYXQodGVtcGxhdGUpO1xuICAgICAgZnVuY3Rpb24gZm9ybWF0KGRhdGUpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBkM19kYXRlID0gZDNfZGF0ZV91dGM7XG4gICAgICAgICAgdmFyIHV0YyA9IG5ldyBkM19kYXRlKCk7XG4gICAgICAgICAgdXRjLl8gPSBkYXRlO1xuICAgICAgICAgIHJldHVybiBsb2NhbCh1dGMpO1xuICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgIGQzX2RhdGUgPSBEYXRlO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmb3JtYXQucGFyc2UgPSBmdW5jdGlvbihzdHJpbmcpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBkM19kYXRlID0gZDNfZGF0ZV91dGM7XG4gICAgICAgICAgdmFyIGRhdGUgPSBsb2NhbC5wYXJzZShzdHJpbmcpO1xuICAgICAgICAgIHJldHVybiBkYXRlICYmIGRhdGUuXztcbiAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICBkM19kYXRlID0gRGF0ZTtcbiAgICAgICAgfVxuICAgICAgfTtcbiAgICAgIGZvcm1hdC50b1N0cmluZyA9IGxvY2FsLnRvU3RyaW5nO1xuICAgICAgcmV0dXJuIGZvcm1hdDtcbiAgICB9O1xuICAgIGQzX3RpbWVfZm9ybWF0Lm11b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pZiAozrsgPCDOu18pIHtcbiAgICAgICAgICAgIGlmIChhbmdsZSjOuzAsIM67KSA+IGFuZ2xlKM67MCwgzrsxKSkgzrsxID0gzrs7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChhbmdsZSjOuywgzrsxKSA+IGFuZ2xlKM67MCwgzrsxKSkgzrswID0gzrs7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmICjOuzEgPj0gzrswKSB7XG4gICAgICAgICAgICBpZiAozrsgPCDOuzApIM67MCA9IM67O1xuICAgICAgICAgICAgaWYgKM67ID4gzrsxKSDOuzEgPSDOuztcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKM67ID4gzrtfKSB7XG4gICAgICAgICAgICAgIGlmIChhbmdsZSjOuzAsIM67KSA+IGFuZ2xlKM67MCwgzrsxKSkgzrsxID0gzrs7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBpZiAoYW5nbGUozrssIM67MSkgPiBhbmdsZSjOuzAsIM67MSkpIM67MCA9IM67O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcG9pbnQozrssIM+GKTtcbiAgICAgIH1cbiAgICAgIHAwID0gcCwgzrtfID0gzrs7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGxpbmVTdGFydCgpIHtcbiAgICAgIGJvdW5kLnBvaW50ID0gbGluZVBvaW50O1xuICAgIH1cbiAgICBmdW5jdGlvbiBsaW5lRW5kKCkge1xuICAgICAgcmFuZ2VbMF0gPSDOuzAsIHJhbmdlWzFdID0gzrsxO1xuICAgICAgYm91bmQucG9pbnQgPSBwb2ludDtcbiAgICAgIHAwID0gbnVsbDtcbiAgICB9XG4gICAgZnVuY3Rpb24gcmluZ1BvaW50KM67LCDPhikge1xuICAgICAgaWYgKHAwKSB7XG4gICAgICAgIHZhciBk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AgICB2YXIgc3RhcnQgPSBzdWJqZWN0WzBdLCBwb2ludHMsIHBvaW50O1xuICAgIHdoaWxlICgxKSB7XG4gICAgICB2YXIgY3VycmVudCA9IHN0YXJ0LCBpc1N1YmplY3QgPSB0cnVlO1xuICAgICAgd2hpbGUgKGN1cnJlbnQudikgaWYgKChjdXJyZW50ID0gY3VycmVudC5uKSA9PT0gc3RhcnQpIHJldHVybjtcbiAgICAgIHBvaW50cyA9IGN1cnJlbnQuejtcbiAgICAgIGxpc3RlbmVyLmxpbmVTdGFydCgpO1xuICAgICAgZG8ge1xuICAgICAgICBjdXJyZW50LnYgPSBjdXJyZW50Lm8udiA9IHRydWU7XG4gICAgICAgIGlmIChjdXJyZW50LmUpIHtcbiAgICAgICAgICBpZiAoaXNTdWJqZWN0KSB7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgbiA9IHBvaW50cy5sZW5ndGg7IGkgPCBuOyArK2kpIGxpc3RlbmVyLnBvaW50KChwb2ludCA9IHBvaW50c1tpXSlbMF0sIHBvaW50WzFdKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaW50ZXJwb2xhdGUoY3VycmVudC54LCBjdXJyZW50Lm4ueCwgMSwgbGlzdGVuZXIpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBjdXJyZW50ID0gY3VycmVudC5uO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmIChpc1N1YmplY3QpIHtcbiAgICAgICAgICAgIHBvaW50cyA9IGN1cnJlbnQucC56O1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IHBvaW50cy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkgbGlzdGVuZXIucG9pbnQoKHBvaW50ID0gcG9pbnRzW2ldKVswXSwgcG9pbnRbMV0pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpbnRlcnBvbGF0ZShjdXJyZW50LngsIGN1cnJlbnQucC54LCAtMSwgbGlzdGVuZXIpO1x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DAsIHBvaW50MikgfHwgZDNfZ2VvX3NwaGVyaWNhbEVxdWFsKHBvaW50MSwgcG9pbnQyKSkge1xuICAgICAgICAgICAgICBwb2ludDFbMF0gKz0gzrU7XG4gICAgICAgICAgICAgIHBvaW50MVsxXSArPSDOtTtcbiAgICAgICAgICAgICAgdiA9IHZpc2libGUocG9pbnQxWzBdLCBwb2ludDFbMV0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAodiAhPT0gdjApIHtcbiAgICAgICAgICAgIGNsZWFuID0gMDtcbiAgICAgICAgICAgIGlmICh2KSB7XG4gICAgICAgICAgICAgIGxpc3RlbmVyLmxpbmVTdGFydCgpO1xuICAgICAgICAgICAgICBwb2ludDIgPSBpbnRlcnNlY3QocG9pbnQxLCBwb2ludDApO1xuICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludChwb2ludDJbMF0sIHBvaW50MlsxXSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBwb2ludDIgPSBpbnRlcnNlY3QocG9pbnQwLCBwb2ludDEpO1xuICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludChwb2ludDJbMF0sIHBvaW50MlsxXSk7XG4gICAgICAgICAgICAgIGxpc3RlbmVyLmxpbmVFbmQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHBvaW50MCA9IHBvaW50MjtcbiAgICAgICAgICB9IGVsc2UgaWYgKG5vdEhlbWlzcGhlcmUgJiYgcG9pbnQwICYmIHNtYWxsUmFkaXVzIF4gdikge1xuICAgICAgICAgICAgdmFyIHQ7XG4gICAgICAgICAgICBpZiAoIShjICYgYzApICYmICh0ID0gaW50ZXJzZWN0KHBvaW50MSwgcG9pbnQwLCB0cnVlKSkpIHtcbiAgICAgICAgICAgICAgY2xlYW4gPSAwO1xuICAgICAgICAgICAgICBpZiAoc21hbGxSYWRpdXMpIHtcbiAgICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lU3RhcnQoKTtcbiAgICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludCh0WzBdWzBdLCB0WzBdWzFdKTtcbiAgICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludCh0WzFdWzBdLCB0WzFdWzFdKTtcbiAgICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lRW5kKCk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQodFsxXVswXSwgdFsxXVsxXSk7XG4gICAgICAgICAgICAgICAgbGlzdGVuZXIubGluZUVuZCgpO1xuICAgICAgICAgICAgICAgIGxpc3RlbmVyLmxpbmVTdGFydCgpO1xuICAgICAgICAgICAgICAgIGxpc3RlbmVyLnBvaW50KHRbMF1bMF0sIHRbMF1bMV0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICh2ICYmICghcG9pbnQwIHx8ICFkM19nZW9fc3BoZXJpY2FsRXF1YWwocG9pbnQwLCBwb2ludDEpKSkge1xuICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQocG9pbnQxWzBdLCBwb2ludDFbMV0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICBwb2ludDAgPSBwb2ludDEsIHYwID0gdiwgYzAgPSBjO1xuICAgICAgICB9LFxuICAgICAgICBsaW5lRW5kOiBmdW5jdGlvbigpIHtcbiAgICAgICAgICBpZiAodjApIGxpc3RlbmVyLmxpbmVFbmQoKTtcbiAgICAgICAgICBwb2ludDAgPSBudWxsO1xuICAgICAgICB9LFxuICAgICAgICBjbGVhbjogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgcmV0dXJuIGNsZWFuIHwgKHYwMCAmJiB2MCkgPDwgMTtcbiAgICAgICAgfVxuICAgICAgfTtcbiAgICB9XG4gICAgZnVuY3Rpb24gaW50ZXJzZWN0KGEsIGIsIHR3bykge1xuICAgICAgdmFyIHBhID0gZDNfZ2VvX2NhcnR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eTAsIHgxLCB5MSkge1xuICAgIHJldHVybiBmdW5jdGlvbihsaW5lKSB7XG4gICAgICB2YXIgYSA9IGxpbmUuYSwgYiA9IGxpbmUuYiwgYXggPSBhLngsIGF5ID0gYS55LCBieCA9IGIueCwgYnkgPSBiLnksIHQwID0gMCwgdDEgPSAxLCBkeCA9IGJ4IC0gYXgsIGR5ID0gYnkgLSBheSwgcjtcbiAgICAgIHIgPSB4MCAtIGF4O1xuICAgICAgaWYgKCFkeCAmJiByID4gMCkgcmV0dXJuO1xuICAgICAgciAvPSBkeDtcbiAgICAgIGlmIChkeCA8IDApIHtcbiAgICAgICAgaWYgKHIgPCB0MCkgcmV0dXJuO1xuICAgICAgICBpZiAociA8IHQxKSB0MSA9IHI7XG4gICAgICB9IGVsc2UgaWYgKGR4ID4gMCkge1xuICAgICAgICBpZiAociA+IHQxKSByZXR1cm47XG4gICAgICAgIGlmIChyID4gdDApIHQwID0gcjtcbiAgICAgIH1cbiAgICAgIHIgPSB4MSAtIGF4O1xuICAgICAgaWYgKCFkeCAmJiByIDwgMCkgcmV0dXJuO1xuICAgICAgciAvPSBkeDtcbiAgICAgIGlmIChkeCA8IDApIHtcbiAgICAgICAgaWYgKHIgPiB0MSkgcmV0dXJuO1xuICAgICAgICBpZiAociA+IHQwKSB0MCA9IHI7XG4gICAgICB9IGVsc2UgaWYgKGR4ID4gMCkge1xuICAgICAgICBpZiAociA8IHQwKSByZXR1cm47XG4gICAgICAgIGlmIChyIDwgdDEpIHQxID0gcjtcbiAgICAgIH1cbiAgICAgIHIgPSB5MCAtIGF5O1xuICAgICAgaWYgKCFkeSAmJiByID4gMCkgcmV0dXJuO1xuICAgICAgciAvPSBkeTtcbiAgICAgIGlmIChkeSA8IDApIHtcbiAgICAgICAgaWYgKHIgPCB0MCkgcmV0dXJuO1xuICAgICAgICBpZiAociA8IHQxKSB0MSA9IHI7XG4gICAgICB9IGVsc2UgaWYgKGR5ID4gMCkge1xuICAgICAgICBpZiAociA+IHQxKSBy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DogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgbGlzdGVuZXIgPSBsaXN0ZW5lcl87XG4gICAgICAgICAgc2VnbWVudHMgPSBkMy5tZXJnZShzZWdtZW50cyk7XG4gICAgICAgICAgdmFyIGNsaXBTdGFydEluc2lkZSA9IGluc2lkZVBvbHlnb24oWyB4MCwgeTEgXSksIGluc2lkZSA9IGNsZWFuICYmIGNsaXBTdGFydEluc2lkZSwgdmlzaWJsZSA9IHNlZ21lbnRzLmxlbmd0aDtcbiAgICAgICAgICBpZiAoaW5zaWRlIHx8IHZpc2libGUpIHtcbiAgICAgICAgICAgIGxpc3RlbmVyLnBvbHlnb25TdGFydCgpO1xuICAgICAgICAgICAgaWYgKGluc2lkZSkge1xuICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lU3RhcnQoKTtcbiAgICAgICAgICAgICAgaW50ZXJwb2xhdGUobnVsbCwgbnVsbCwgMSwgbGlzdGVuZXIpO1xuICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lRW5kKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodmlzaWJsZSkge1xuICAgICAgICAgICAgICBkM19nZW9fY2xpcFBvbHlnb24oc2VnbWVudHMsIGNvbXBhcmUsIGNsaXBTdGFydEluc2lkZSwgaW50ZXJwb2xhdGUsIGxpc3RlbmVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxpc3RlbmVyLnBvbHlnb25FbmQoKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgc2VnbWVudHMgPSBwb2x5Z29uID0gcmluZyA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgICBmdW5jdGlvbiBpbnNpZGVQb2x5Z29uKHApIHtcbiAgICAgICAgdmFyIHduID0gMCwgbiA9IHBvbHlnb24ubGVuZ3RoLCB5ID0gcFsxXTtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBuOyArK2kpIHtcbiAgICAgICAgICBmb3IgKHZhciBqID0gMSwgdiA9IHBvbHlnb25baV0sIG0gPSB2Lmxlbmd0aCwgYSA9IHZbMF0sIGI7IGogPCBtOyArK2opIHtcbiAgICAgICAgICAgIGIgPSB2W2pdO1xuICAgICAgICAgICAgaWYgKGFbMV0gPD0geSkge1xuICAgICAgICAgICAgICBpZiAoYlsxXSA+IHkgJiYgZDNfY3Jvc3MyZChhLCBiLCBwKSA+IDApICsrd247XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBpZiAoYlsxXSA8PSB5ICYmIGQzX2Nyb3NzMmQoYSwgYiwgcCkgPCAwKSAtLXduO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYSA9IGI7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3biAhPT0gMDtcbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIGludGVycG9sYXRlKGZyb20sIHRvLCBkaXJlY3Rpb24sIGxpc3RlbmVyKSB7XG4gICAgICAgIHZhciBhID0gMCwgYTEgPSAwO1xuICAgICAgICBpZiAoZnJvbSA9PSBudWxsIHx8IChhID0gY29ybmVyKGZyb20sIGRpcmVjdGlvbikpICE9PSAoYTEgPSBjb3JuZXIodG8sIGRpcmVjdGlvbikpIHx8IGNvbXBhcmVQb2ludHMoZnJvbSwgdG8pIDwgMCBeIGRpcmVjdGlvbiA+IDApIHtcbiAgICAgICAgICBkbyB7XG4gICAgICAgICAgICBsaXN0ZW5lci5wb2ludChhID09PSAwIHx8IGEgPT09IDMgPyB4MCA6IHgxLCBhID4gMSA/IHkxIDogeTApO1xuICAgICAgICAgIH0gd2hpbGUgKChhID0gKGEgKyBkaXJlY3Rpb24gKyA0KSAlIDQpICE9PSBhMSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgbGlzdGVuZXIucG9pbnQodG9bMF0sIHRvWzFdKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZnVuY3Rpb24gcG9pbnRWaXNpYmxlKHgs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NYXRoLm1pbihkM19nZW9fY2xpcEV4dGVudE1BWCwgeSkpO1xuICAgICAgICB2YXIgdiA9IHBvaW50VmlzaWJsZSh4LCB5KTtcbiAgICAgICAgaWYgKHBvbHlnb24pIHJpbmcucHVzaChbIHgsIHkgXSk7XG4gICAgICAgIGlmIChmaXJzdCkge1xuICAgICAgICAgIHhfXyA9IHgsIHlfXyA9IHksIHZfXyA9IHY7XG4gICAgICAgICAgZmlyc3QgPSBmYWxzZTtcbiAgICAgICAgICBpZiAodikge1xuICAgICAgICAgICAgbGlzdGVuZXIubGluZVN0YXJ0KCk7XG4gICAgICAgICAgICBsaXN0ZW5lci5wb2ludCh4LCB5KTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKHYgJiYgdl8pIGxpc3RlbmVyLnBvaW50KHgsIHkpOyBlbHNlIHtcbiAgICAgICAgICAgIHZhciBsID0ge1xuICAgICAgICAgICAgICBhOiB7XG4gICAgICAgICAgICAgICAgeDogeF8sXG4gICAgICAgICAgICAgICAgeTogeV9cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgYjoge1xuICAgICAgICAgICAgICAgIHg6IHgsXG4gICAgICAgICAgICAgICAgeTogeVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgaWYgKGNsaXBMaW5lKGwpKSB7XG4gICAgICAgICAgICAgIGlmICghdl8pIHtcbiAgICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lU3RhcnQoKTtcbiAgICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludChsLmEueCwgbC5hLnkpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGxpc3RlbmVyLnBvaW50KGwuYi54LCBsLmIueSk7XG4gICAgICAgICAgICAgIGlmICghdikgbGlzdGVuZXIubGluZUVuZCgpO1xuICAgICAgICAgICAgICBjbGVhbiA9IGZhbHNlO1xuICAgICAgICAgICAgfSBlbHNlIGlm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G4gICAgICAgICAgeDogZngsXG4gICAgICAgICAgeTogeTBcbiAgICAgICAgfTsgZWxzZSBpZiAodmEueSA+PSB5MSkgcmV0dXJuO1xuICAgICAgICB2YiA9IHtcbiAgICAgICAgICB4OiBmeCxcbiAgICAgICAgICB5OiB5MVxuICAgICAgICB9O1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKCF2YSkgdmEgPSB7XG4gICAgICAgICAgeDogZngsXG4gICAgICAgICAgeTogeTFcbiAgICAgICAgfTsgZWxzZSBpZiAodmEueSA8IHkwKSByZXR1cm47XG4gICAgICAgIHZiID0ge1xuICAgICAgICAgIHg6IGZ4LFxuICAgICAgICAgIHk6IHkwXG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgIGZtID0gKGx4IC0gcngpIC8gKHJ5IC0gbHkpO1xuICAgICAgZmIgPSBmeSAtIGZtICogZng7XG4gICAgICBpZiAoZm0gPCAtMSB8fCBmbSA+IDEpIHtcbiAgICAgICAgaWYgKGx4ID4gcngpIHtcbiAgICAgICAgICBpZiAoIXZhKSB2YSA9IHtcbiAgICAgICAgICAgIHg6ICh5MCAtIGZiKSAvIGZtLFxuICAgICAgICAgICAgeTogeTBcbiAgICAgICAgICB9OyBlbHNlIGlmICh2YS55ID49IHkxKSByZXR1cm47XG4gICAgICAgICAgdmIgPSB7XG4gICAgICAgICAgICB4OiAoeTEgLSBmYikgLyBmbSxcbiAgICAgICAgICAgIHk6IHkxXG4gICAgICAgICAgfTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpZiAoIXZhKSB2YSA9IHtcbiAgICAgICAgICAgIHg6ICh5MSAtIGZiKSAvIGZtLFxuICAgICAgICAgICAgeTogeTFcbiAgICAgICAgICB9OyBlbHNlIGlmICh2YS55IDwgeTApIHJldHVybjtcbiAgICAgICAgICB2YiA9IHtcbiAgICAgICAgICAgIHg6ICh5MCAtIGZiKSAvIGZtLFxuICAgICAgICAgICAgeTogeTBcbiAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAobHkgPCByeSkge1xuICAgICAgICAgIGlmICghdmEpIHZhID0ge1xuICAgICAgICAgICAgeDogeDAsXG4gICAgICAgICAgICB5OiBmbSAqIHgwICsgZmJcbiAgICAgICAgICB9OyBlbHNlIGlmICh2YS54ID49IHgxKSByZXR1cm47XG4gICAgICAgICAgdmIgPSB7XG4gICAgICAgICAgICB4OiB4MSxcbiAgICAgICAgICAgIHk6IGZtICogeDEgKyBmYlxuICAgICAgICAgIH07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKCF2YSkgdmEgPSB7XG4gICAgICAgICAgICB4OiB4MSxcbiAgICAgICAgICAgIHk6IGZtICogeDEgKyBmYlxuICAgICAgICAgIH07IGVsc2UgaWYgKHZhLnggPCB4MCkgcmV0dXJuO1xuICAgICAgICAgIHZiID0ge1xuICAgICAgICAgICAgeDogeDAsXG4gICAgICAgICAgICB5OiBmbSAqIHgwICsgZmJcbiAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICAgIGVkZ2UuYSA9IHZhO1xuICAgIGVkZ2UuYiA9IHZiO1xuICAgIHJldHVybiB0cnVlO1xuICB9XG4gIGZ1bmN0aW9uIGQzX2dlb21fdm9yb25vaUVkZ2UobFNpdGUsIHJTaXRlKSB7XG4gICAgdGhpcy5sID0gbFNpdGU7XG4gICAgdGhpcy5yID0gclNpdGU7XG4gICAgdGhpcy5hID0gdGhpcy5iID0gbnVsbDtcbiAgfVxuICBmdW5jdGlvbiBkM19nZW9tX3Zvcm9ub2lDcmVhdGVFZGdlKGxTaXRlLCByU2l0ZSwgdmEsIHZiKSB7XG4gICAgdmFyIGVkZ2UgPSBuZXcgZDNfZ2VvbV92b3Jvbm9pRWRnZShsU2l0ZSwgclNpdGUpO1xuICAgIGQzX2dlb21fdm9yb25vaUVkZ2VzLnB1c2goZWRnZSk7XG4gICAgaW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FmdGVyID0gbm9kZTtcbiAgICAgIHdoaWxlIChwYXJlbnQgJiYgcGFyZW50LkMpIHtcbiAgICAgICAgZ3JhbmRwYSA9IHBhcmVudC5VO1xuICAgICAgICBpZiAocGFyZW50ID09PSBncmFuZHBhLkwpIHtcbiAgICAgICAgICB1bmNsZSA9IGdyYW5kcGEuUjtcbiAgICAgICAgICBpZiAodW5jbGUgJiYgdW5jbGUuQykge1xuICAgICAgICAgICAgcGFyZW50LkMgPSB1bmNsZS5DID0gZmFsc2U7XG4gICAgICAgICAgICBncmFuZHBhLkMgPSB0cnVlO1xuICAgICAgICAgICAgYWZ0ZXIgPSBncmFuZHBhO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoYWZ0ZXIgPT09IHBhcmVudC5SKSB7XG4gICAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlTGVmdCh0aGlzLCBwYXJlbnQpO1xuICAgICAgICAgICAgICBhZnRlciA9IHBhcmVudDtcbiAgICAgICAgICAgICAgcGFyZW50ID0gYWZ0ZXIuVTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHBhcmVudC5DID0gZmFsc2U7XG4gICAgICAgICAgICBncmFuZHBhLkMgPSB0cnVlO1xuICAgICAgICAgICAgZDNfZ2VvbV92b3Jvbm9pUmVkQmxhY2tSb3RhdGVSaWdodCh0aGlzLCBncmFuZHBhKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdW5jbGUgPSBncmFuZHBhLkw7XG4gICAgICAgICAgaWYgKHVuY2xlICYmIHVuY2xlLkMpIHtcbiAgICAgICAgICAgIHBhcmVudC5DID0gdW5jbGUuQyA9IGZhbHNlO1xuICAgICAgICAgICAgZ3JhbmRwYS5DID0gdHJ1ZTtcbiAgICAgICAgICAgIGFmdGVyID0gZ3JhbmRwYTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKGFmdG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5leHQ7XG4gICAgICB9XG4gICAgICBpZiAobGVmdCAmJiByaWdodCkge1xuICAgICAgICByZWQgPSBuZXh0LkM7XG4gICAgICAgIG5leHQuQyA9IG5vZGUuQztcbiAgICAgICAgbmV4dC5MID0gbGVmdDtcbiAgICAgICAgbGVmdC5VID0gbmV4dDtcbiAgICAgICAgaWYgKG5leHQgIT09IHJpZ2h0KSB7XG4gICAgICAgICAgcGFyZW50ID0gbmV4dC5VO1xuICAgICAgICAgIG5leHQuVSA9IG5vZGUuVTtcbiAgICAgICAgICBub2RlID0gbmV4dC5SO1xuICAgICAgICAgIHBhcmVudC5MID0gbm9kZTtcbiAgICAgICAgICBuZXh0LlIgPSByaWdodDtcbiAgICAgICAgICByaWdodC5VID0gbmV4dDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBuZXh0LlUgPSBwYXJlbnQ7XG4gICAgICAgICAgcGFyZW50ID0gbmV4dDtcbiAgICAgICAgICBub2RlID0gbmV4dC5SO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZWQgPSBub2RlLkM7XG4gICAgICAgIG5vZGUgPSBuZXh0O1xuICAgICAgfVxuICAgICAgaWYgKG5vZGUpIG5vZGUuVSA9IHBhcmVudDtcbiAgICAgIGlmIChyZWQpIHJldHVybjtcbiAgICAgIGlmIChub2RlICYmIG5vZGUuQykge1xuICAgICAgICBub2RlLkMgPSBmYWxzZTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuICAgICAgZG8ge1xuICAgICAgICBpZiAobm9kZSA9PT0gdGhpcy5fKSBicmVhaztcbiAgICAgICAgaWYgKG5vZGUgPT09IHBhcmVudC5MKSB7XG4gICAgICAgICAgc2libGluZyA9IHBhcmVudC5SO1xuICAgICAgICAgIGlmIChzaWJsaW5nLkMpIHtcbiAgICAgICAgICAgIHNpYmxpbmcuQyA9IGZhbHNlO1xuICAgICAgICAgICAgcGFyZW50LkMgPSB0cnVlO1xuICAgICAgICAgICAgZDNfZ2VvbV92b3Jvbm9pUmVkQmxhY2tSb3RhdGVMZWZ0KHRoaXMsIHBhcmVudCk7XG4gICAgICAgICAgICBzaWJsaW5nID0gcGFyZW50LlI7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChzaWJsaW5nLkwgJiYgc2libGluZy5MLkMgfHwgc2libGluZy5SICYmIHNpYmxpbmcuUi5DKSB7XG4gICAgICAgICAgICBpZiAoIXNpYmxpbmcuUiB8fCAhc2libGluZy5SLkMpIHtcbiAgICAgICAgICAgICAgc2libGluZy5MLkMgPSBmYWxzZTtcbiAgICAgICAgICAgICAgc2libGluZy5DID0gdHJ1ZTtcbiAgICAgICAgICAgICAgZDNfZ2VvbV92b3Jvbm9pUmVkQmxhY2tSb3RhdGVSaWdodCh0aGlzLCBzaWJsaW5nKTtcbiAgICAgICAgICAgICAgc2libGluZyA9IHBhcmVudC5SO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc2libGluZy5DID0gcGFyZW50LkM7XG4gICAgICAgICAgICBwYXJlbnQuQyA9IHNpYmxpbmcuUi5DID0gZmFsc2U7XG4gICAgICAgICAgICBkM19nZW9tX3Zvcm9ub2lSZWRCbGFja1JvdGF0ZUxlZnQodGhpcywgcGFyZW50KTtcbiAgICAgICAgICAgIG5vZGUgPSB0aGlzLl87XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc2libGluZyA9IHBhcmVudC5MO1xuICAgICAgICAgIGlmIChzaWJsaW5nLkMpIHtcbiAgICAgICAgICAgIHNpYmxpbmcuQyA9IGZhbHNlO1xuICAgICAgICAgICAgcGFyZW50LkMgPSB0cnVlO1xuICAgICAgICAgICAgZDNfZ2VvbV92b3Jvbm9pUmVkQmxhY2tSb3RhdGVSaWdodCh0aGlzLCBwYXJlbnQpO1xuICAgICAgICAgICAgc2libGluZyA9IHBhcmVudC5MO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc2lib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gICB5cy5wdXNoKGQueSk7XG4gICAgICAgIH0gZWxzZSBmb3IgKGkgPSAwOyBpIDwgbjsgKytpKSB7XG4gICAgICAgICAgdmFyIHhfID0gK2Z4KGQgPSBkYXRhW2ldLCBpKSwgeV8gPSArZnkoZCwgaSk7XG4gICAgICAgICAgaWYgKHhfIDwgeDFfKSB4MV8gPSB4XztcbiAgICAgICAgICBpZiAoeV8gPCB5MV8pIHkxXyA9IHlfO1xuICAgICAgICAgIGlmICh4XyA+IHgyXykgeDJfID0geF87XG4gICAgICAgICAgaWYgKHlfID4geTJfKSB5Ml8gPSB5XztcbiAgICAgICAgICB4cy5wdXNoKHhfKTtcbiAgICAgICAgICB5cy5wdXNoKHlfKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgdmFyIGR4ID0geDJfIC0geDFfLCBkeSA9IHkyXyAtIHkxXztcbiAgICAgIGlmIChkeCA+IGR5KSB5Ml8gPSB5MV8gKyBkeDsgZWxzZSB4Ml8gPSB4MV8gKyBkeTtcbiAgICAgIGZ1bmN0aW9uIGluc2VydChuLCBkLCB4LCB5LCB4MSwgeTEsIHgyLCB5Mikge1xuICAgICAgICBpZiAoaXNOYU4oeCkgfHwgaXNOYU4oeSkpIHJldHVybjtcbiAgICAgICAgaWYgKG4ubGVhZikge1xuICAgICAgICAgIHZhciBueCA9IG4ueCwgbnkgPSBuLnk7XG4gICAgICAgICAgaWYgKG54ICE9IG51bGwpIHtcbiAgICAgICAgICAgIGlmIChhYnMobnggLSB4KSArIGFicyhueSAtIHkpIDwgLjAxKSB7XG4gICAgICAgICAgICAgIGluc2VydENoaWxkKG4sIGQsIHgsIHksIHgxLCB5MSwgeDIsIHkyKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHZhciBuUG9pbnQgPSBuLnBvaW50O1xuICAgICAgICAgICAgICBuLnggPSBuLnkgPSBuLnBvaW50ID0gbnVsbDtcbiAgICAgICAgICAgICAgaW5zZXJ0Q2hpbGQobi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ICAgICBpbmRleDogZGksXG4gICAgICAgICAgICBzdWJpbmRleDogZGosXG4gICAgICAgICAgICBzdGFydEFuZ2xlOiBhMCxcbiAgICAgICAgICAgIGVuZEFuZ2xlOiBhMSxcbiAgICAgICAgICAgIHZhbHVlOiB2XG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBncm91cHNbZGldID0ge1xuICAgICAgICAgIGluZGV4OiBkaSxcbiAgICAgICAgICBzdGFydEFuZ2xlOiB4MCxcbiAgICAgICAgICBlbmRBbmdsZTogeCxcbiAgICAgICAgICB2YWx1ZTogZ3JvdXBTdW1zW2RpXVxuICAgICAgICB9O1xuICAgICAgICB4ICs9IHBhZGRpbmc7XG4gICAgICB9XG4gICAgICBpID0gLTE7XG4gICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICBqID0gaSAtIDE7XG4gICAgICAgIHdoaWxlICgrK2ogPCBuKSB7XG4gICAgICAgICAgdmFyIHNvdXJjZSA9IHN1Ymdyb3Vwc1tpICsgXCItXCIgKyBqXSwgdGFyZ2V0ID0gc3ViZ3JvdXBzW2ogKyBcIi1cIiArIGldO1xuICAgICAgICAgIGlmIChzb3VyY2UudmFsdWUgfHwgdGFyZ2V0LnZhbHVlKSB7XG4gICAgICAgICAgICBjaG9yZHMucHVzaChzb3VyY2UudmFsdWUgPCB0YXJnZXQudmFsdWUgPyB7XG4gICAgICAgICAgICAgIHNvdXJjZTogdGFyZ2V0LFxuICAgICAgICAgICAgICB0YXJnZXQ6IHNvdXJjZVxuICAgICAgICAgICAgfSA6IHtcbiAgICAgICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgICAgIHRhcmdldDogdGFyZ2V0XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGlmIChzb3J0Q2hvcmRzKSByZXNvcnQoKTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVzb3J0KCkge1xuICAgICAgY2hv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5jdGlvbihxdWFkLCB4MSwgXywgeDIpIHtcbiAgICAgICAgaWYgKHF1YWQucG9pbnQgIT09IG5vZGUpIHtcbiAgICAgICAgICB2YXIgZHggPSBxdWFkLmN4IC0gbm9kZS54LCBkeSA9IHF1YWQuY3kgLSBub2RlLnksIGR3ID0geDIgLSB4MSwgZG4gPSBkeCAqIGR4ICsgZHkgKiBkeTtcbiAgICAgICAgICBpZiAoZHcgKiBkdyAvIHRoZXRhMiA8IGRuKSB7XG4gICAgICAgICAgICBpZiAoZG4gPCBjaGFyZ2VEaXN0YW5jZTIpIHtcbiAgICAgICAgICAgICAgdmFyIGsgPSBxdWFkLmNoYXJnZSAvIGRuO1xuICAgICAgICAgICAgICBub2RlLnB4IC09IGR4ICogaztcbiAgICAgICAgICAgICAgbm9kZS5weSAtPSBkeSAqIGs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKHF1YWQucG9pbnQgJiYgZG4gJiYgZG4gPCBjaGFyZ2VEaXN0YW5jZTIpIHtcbiAgICAgICAgICAgIHZhciBrID0gcXVhZC5wb2ludENoYXJnZSAvIGRuO1xuICAgICAgICAgICAgbm9kZS5weCAtPSBkeCAqIGs7XG4gICAgICAgICAgICBub2RlLnB5IC09IGR5ICogaztcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuICFxdWFkLmNoYXJnZTtcbiAgICAgIH07XG4gICAgfVxuICAgIGZvcmNlLnRpY2sgPSBmdW5jdGlvbigpIHtcbiAgICAgIGlmICgoYWxwaGEgKj0gLjk5KSA8IC4wMDUpIHtcbiAgICAgICAgdGltZXIgPSBudWxsO1xuICAgICAgICBldmVudC5lbmQoe1xuICAgICAgICAgIHR5cGU6IFwiZW5kXCIsXG4gICAgICAgICAgYWxwaGE6IGFscGhhID0gMFxuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICB9XG4gICAgICB2YXIgbiA9IG5vZGVzLmxlbmd0aCwgbSA9IGxpbmtzLmxlbmd0aCwgcSwgaSwgbywgcywgdCwgbCwgaywgeCwgeTtcbiAgICAgIGZvciAoaSA9IDA7IGkgPCBtOyArK2kpIHtcbiAgICAgICAgbyA9IGxpbmtzW2ldO1xuICAgICAgICBzID0gby5zb3VyY2U7XG4gICAgICAgIHQgPSBvLnRhcmdldDtcbiAgICAgICAgeCA9IHQueCAtIHMueDtcbiAgICAgICAgeSA9IHQueSAtIHMueTtcbiAgICAgICAgaWYgKGwgPSB4ICogeCArIHkgKiB5KSB7XG4gICAgICAgICAgbCA9IGFscGhhICogc3RyZW5ndGhzW2ldICogKChsID0gTWF0aC5zcXJ0KGwpKSAtIGRpc3RhbmNlc1tpXSkgLyBsO1xuICAgICAgICAgIHggKj0gbDtcbiAgICAgICAgICB5ICo9IGw7XG4gICAgICAgICAgdC54IC09IHggKiAoayA9IHMud2VpZ2h0ICsgdC53ZWlnaHQgPyBzLndlaWdodCAvIChzLndlaWdodCArIHQud2VpZ2h0KSA6IC41KTtcbiAgICAgICAgICB0LnkgLT0geSAqIGs7XG4gICAgICAgICAgcy54ICs9IHggKiAoayA9IDEgLSBrKTtcbiAgICAgICAgICBzLnkgKz0geSAqIGs7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGlmIChrID0gYWxwaGEgKiBncmF2aXR5KSB7XG4gICAgICAgIHggPSBzaXplWzBdIC8gMjtcbiAgICAgICAgeSA9IHNpemVbMV0gLyAyO1xuICAgICAgICBpID0gLTE7XG4gICAgICAgIGlmIChrKSB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICAgIG8gPSBub2Rlc1tpXTtcbiAgICAgICAgICBvLnggKz0gKHggLSBvLngpICogaztcbiAgICAgICAgICBvLnkgKz0gKHkgLSBvLnkpICogaztcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgaWYgKGNoYXJnZSkge1xuICAgICAgICBkM19sYXlvdXRfZm9yY2VBY2N1bXVsYXRlKHEgPSBkMy5nZW9tLnF1YWR0cmVlKG5vZGVzKSwgYWxwaGEsIGNoYXJnZXMpO1xuICAgICAgICBpID0gLTE7XG4gICAgICAgIHdoaWxlICgrK2kgPCBuKSB7XG4gICAgICAgICAgaWYgKCEobyA9IG5vZGVzW2ldKS5maXhlZCkge1xuICAgICAgICAgICAgcS52aXNpdChyZXB1bHNlKG8pKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGkgPSAtMTtcbiAgICAgIHdoaWxlICgrK2kgPCBuKSB7XG4gICAgICAgIG8gPSBub2Rlc1tpXTtcbiAgICAgICAgaWYgKG8uZml4ZWQpIHtcbiAgICAgICAgICBvLnggPSBvLnB4O1xuICAgICAgICAgIG8ueSA9IG8ucHk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgby54IC09IChvLnB4IC0gKG8ucHggPSBvLngpKSAqIGZyaWN0aW9uO1xuICAgICAgICAgIG8ueSAtPSAoby5weSAtIChvLnB5ID0gby55KSkgKiBmcmljdGlvbjtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZXZlbnQudGljayh7XG4gICAgICAgIHR5cGU6IFwidGlja1wiLFxuICAgICAgICBhbHBoYTogYWxwaGFcbiAgICAgIH0pO1xuICAgIH07XG4gICAgZm9yY2Uubm9kZXMgPSBmdW5jdGlvbih4KSB7XG4gICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBub2RlcztcbiAgICAgIG5vZGVzID0geDtcbiAgICAgIHJldHVybiBmb3JjZTtcbiAgICB9O1xuICAgIGZvcmNlLmxpbmtzID0gZnVuY3Rpb24oeCkge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gbGlua3M7XG4gICAgICBsaW5rcyA9IHg7XG4gICAgICByZXR1cm4gZm9yY2U7XG4gICAgfTtcbiAgICBmb3JjZS5zaXplID0gZnVuY3Rpb24oeCkge1xuICAgIC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SB4XG4gICAgICAgIH0pO1xuICAgICAgICB0aW1lciA9IGQzX3RpbWVyKGZvcmNlLnRpY2spO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGZvcmNlO1xuICAgIH07XG4gICAgZm9yY2Uuc3RhcnQgPSBmdW5jdGlvbigpIHtcbiAgICAgIHZhciBpLCBuID0gbm9kZXMubGVuZ3RoLCBtID0gbGlua3MubGVuZ3RoLCB3ID0gc2l6ZVswXSwgaCA9IHNpemVbMV0sIG5laWdoYm9ycywgbztcbiAgICAgIGZvciAoaSA9IDA7IGkgPCBuOyArK2kpIHtcbiAgICAgICAgKG8gPSBub2Rlc1tpXSkuaW5kZXggPSBpO1xuICAgICAgICBvLndlaWdodCA9IDA7XG4gICAgICB9XG4gICAgICBmb3IgKGkgPSAwOyBpIDwgbTsgKytpKSB7XG4gICAgICAgIG8gPSBsaW5rc1tpXTtcbiAgICAgICAgaWYgKHR5cGVvZiBvLnNvdXJjZSA9PSBcIm51bWJlclwiKSBvLnNvdXJjZSA9IG5vZGVzW28uc291cmNlXTtcbiAgICAgICAgaWYgKHR5cGVvZiBvLnRhcmdldCA9PSBcIm51bWJlclwiKSBvLnRhcmdldCA9IG5vZGVzW28udGFyZ2V0XTtcbiAgICAgICAgKytvLnNvdXJjZS53ZWlnaHQ7XG4gICAgICAgICsrby50YXJnZXQud2VpZ2h0O1xuICAgICAgfVxuICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkge1xuICAgICAgICBvID0gbm9kZXNbaV07XG4gICAgICAgIGlmIChpc05hTihvLngpKSBvLnggPSBwb3NpdGlvbihcInhcIiwgdyk7XG4gICAgICAgIGlmIChpc05hTihvLnkpKSBvLnkgPSBwb3NpdGlvbihcInlcIiwgaCk7XG4gICAgICAgIGlmIChpc05hTihvLnB4KSkgby5weCA9IG8ueDtcbiAgICAgICAgaWYgKGlzTmFOKG8ucHkpKSBvLnB5ID0gby55O1xuICAgICAgfVxuICAgICAgZGlzdGFuY2VzID0gW107XG4gICAg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vZGUueCAtIG5vZGUuciwgeE1pbik7XG4gICAgICB4TWF4ID0gTWF0aC5tYXgobm9kZS54ICsgbm9kZS5yLCB4TWF4KTtcbiAgICAgIHlNaW4gPSBNYXRoLm1pbihub2RlLnkgLSBub2RlLnIsIHlNaW4pO1xuICAgICAgeU1heCA9IE1hdGgubWF4KG5vZGUueSArIG5vZGUuciwgeU1heCk7XG4gICAgfVxuICAgIG5vZGVzLmZvckVhY2goZDNfbGF5b3V0X3BhY2tMaW5rKTtcbiAgICBhID0gbm9kZXNbMF07XG4gICAgYS54ID0gLWEucjtcbiAgICBhLnkgPSAwO1xuICAgIGJvdW5kKGEpO1xuICAgIGlmIChuID4gMSkge1xuICAgICAgYiA9IG5vZGVzWzFdO1xuICAgICAgYi54ID0gYi5yO1xuICAgICAgYi55ID0gMDtcbiAgICAgIGJvdW5kKGIpO1xuICAgICAgaWYgKG4gPiAyKSB7XG4gICAgICAgIGMgPSBub2Rlc1syXTtcbiAgICAgICAgZDNfbGF5b3V0X3BhY2tQbGFjZShhLCBiLCBjKTtcbiAgICAgICAgYm91bmQoYyk7XG4gICAgICAgIGQzX2xheW91dF9wYWNrSW5zZXJ0KGEsIGMpO1xuICAgICAgICBhLl9wYWNrX3ByZXYgPSBjO1xuICAgICAgICBkM19sYXlvdXRfcGFja0luc2VydChjLCBiKTtcbiAgICAgICAgYiA9IGEuX3BhY2tfbmV4dDtcbiAgICAgICAgZm9yIChpID0gMzsgaSA8IG47IGkrKykge1xuICAgICAgICAgIGQzX2xheW91dF9wYWNrUGxhY2UoYSwgYiwgYyA9IG5vZGVzW2ldKTtcbiAgICAgICAgICB2YXIgaXNlY3QgPSAwLCBzMSA9IDEsIHMyID0gMTtcbiAgICAgICAgICBmb3IgKGogPSBiLl9wYWNrX25leHQ7IGogIT09IGI7IGogPSBqLl9wYWNrX25leHQsIHMxKyspIHtcbiAgICAgICAgICAgIGlmIChkM19sYXlvdXRfcGFja0ludGVyc2VjdHMoaiwgYykpIHtcbiAgICAgICAgICAgICAgaXNlY3QgPSAxO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGlzZWN0ID09IDEpIHtcbiAgICAgICAgICAgIGZvciAoayA9IGEuX3BhY2tfcHJldjsgayAhPT0gai5fcGFja19wcmV2OyBrID0gay5fcGFja19wcmV2LCBzMisrKSB7XG4gICAgICAgICAgICAgIGlmIChkM19sYXlvdXRfcGFja0ludGVyc2VjdHMoaywgYykpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoaXNlY3QpIHtcbiAgICAgICAgICAgIGlmIChzMSA8IHMyIHx8IHMxID09IHMyICYmIGIuciA8IGEucikgZDNfbGF5b3V0X3BhY2tTcGxpY2UoYSwgYiA9IGopOyBlbHNlIGQzX2xheW91dF9wYWNrU3BsaWNlKGEgPSBrLCBiKTtcbiAgICAgICAgICAgIGktLTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZDNfbGF5b3V0X3BhY2tJbnNlcnQoYSwgYyk7XG4gICAgICAgICAgICBiID0gYztcbiAgICAgICAgICAgIGJvdW5kKGMpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgICB2YXIgY3ggPSAoeE1pbiArIHhNYXgpIC8gMiwgY3kgPSAoeU1pbiArIHlNYXgpIC8gMiwgY3IgPSAwO1xuICAgIGZvciAoaSA9IDA7IGkgPCBuOyBpKyspIHtcbiAgICAgIGMgPSBub2Rlc1tpXTtcbiAgICAgIGMueCAtPSBjeDtcbiAgICAgIGMueSAtPSBjeTtcbiAgICAgIGNyID0gTWF0aC5tYXgoY3IsIGMuciArIE1hdGguc3FydChjLnggKiBjLnggKyBjLnkgKiBjLnkpKTtcbiAgICB9XG4gICAgbm9kZS5yID0gY3I7XG4gICAgbm9kZXMuZ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AgIF86IGNoaWxkcmVuW2ldLFxuICAgICAgICAgICAgcGFyZW50OiBub2RlMSxcbiAgICAgICAgICAgIGNoaWxkcmVuOiAoY2hpbGQgPSBjaGlsZHJlbltpXS5jaGlsZHJlbikgJiYgY2hpbGQuc2xpY2UoKSB8fCBbXSxcbiAgICAgICAgICAgIEE6IG51bGwsXG4gICAgICAgICAgICBhOiBudWxsLFxuICAgICAgICAgICAgejogMCxcbiAgICAgICAgICAgIG06IDAsXG4gICAgICAgICAgICBjOiAwLFxuICAgICAgICAgICAgczogMCxcbiAgICAgICAgICAgIHQ6IG51bGwsXG4gICAgICAgICAgICBpOiBpXG4gICAgICAgICAgfSkuYSA9IGNoaWxkKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgcmV0dXJuIHJvb3QxLmNoaWxkcmVuWzBdO1xuICAgIH1cbiAgICBmdW5jdGlvbiBmaXJzdFdhbGsodikge1xuICAgICAgdmFyIGNoaWxkcmVuID0gdi5jaGlsZHJlbiwgc2libGluZ3MgPSB2LnBhcmVudC5jaGlsZHJlbiwgdyA9IHYuaSA/IHNpYmxpbmdzW3YuaSAtIDFdIDogbnVsbDtcbiAgICAgIGlmIChjaGlsZHJlbi5sZW5ndGgpIHtcbiAgICAgICAgZDNfbGF5b3V0X3RyZWVTaGlmdCh2KTtcbiAgICAgICAgdmFyIG1pZHBvaW50ID0gKGNoaWxkcmVuWzBdLnogKyBjaGlsZHJlbltjaGlsZHJlbi5sZW5ndGggLSAxXS56KSAvIDI7XG4gICAgICAgIGlmICh3KSB7XG4gICAgICAgICAgdi56ID0gdy56ICsgc2VwYXJhdGlvbih2Ll8sIHcuXyk7XG4gICAgICAgICAgdi5tID0gdi56IC0gbWlkcG9pbnQ7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdi56ID0gbWlkcG9pbnQ7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAodykge1xuICAgICAgICB2LnogPSB3LnogKyBzZXBhcmF0aW9uKH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dSkge1xuICAgICAgdmFyIHMgPSByb3cuYXJlYSwgciwgcm1heCA9IDAsIHJtaW4gPSBJbmZpbml0eSwgaSA9IC0xLCBuID0gcm93Lmxlbmd0aDtcbiAgICAgIHdoaWxlICgrK2kgPCBuKSB7XG4gICAgICAgIGlmICghKHIgPSByb3dbaV0uYXJlYSkpIGNvbnRpbnVlO1xuICAgICAgICBpZiAociA8IHJtaW4pIHJtaW4gPSByO1xuICAgICAgICBpZiAociA+IHJtYXgpIHJtYXggPSByO1xuICAgICAgfVxuICAgICAgcyAqPSBzO1xuICAgICAgdSAqPSB1O1xuICAgICAgcmV0dXJuIHMgPyBNYXRoLm1heCh1ICogcm1heCAqIHJhdGlvIC8gcywgcyAvICh1ICogcm1pbiAqIHJhdGlvKSkgOiBJbmZpbml0eTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcG9zaXRpb24ocm93LCB1LCByZWN0LCBmbHVzaCkge1xuICAgICAgdmFyIGkgPSAtMSwgbiA9IHJvdy5sZW5ndGgsIHggPSByZWN0LngsIHkgPSByZWN0LnksIHYgPSB1ID8gcm91bmQocm93LmFyZWEgLyB1KSA6IDAsIG87XG4gICAgICBpZiAodSA9PSByZWN0LmR4KSB7XG4gICAgICAgIGlmIChmbHVzaCB8fCB2ID4gcmVjdC5keSkgdiA9IHJlY3QuZHk7XG4gICAgICAgIHdoaWxlICgrK2kgPCBuKSB7XG4gICAgICAgICAgbyA9IHJvd1tpXTtcbiAgICAgICAgICBvLnggPSB4O1xuICAgICAgICAgIG8ueSA9IHk7XG4gICAgICAgICAgby5keSA9IHY7XG4gICAgICAgICAgeCArPSBvLmR4ID0gTWF0aC5taW4ocmVjdC54ICsgcmVjdC5keCAtIHgsIHYgPyByb3VuZChvLmFyZWEgLyB2KSA6IDApO1xuICAgICAgICB9XG4gICAgICAgIG8ueiA9IHRydWU7XG4gICAgICAgIG8uZHggKz0gcmVjdC54ICsgcmVjdC5keCAtIHg7XG4gICAgICAgIHJlY3QueSArPSB2O1xuICAgICAgICByZWN0LmR5IC09IHY7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoZmx1c2ggfHwgdiA+IHJlY3QuZHgpIHYgPSByZWN0LmR4O1xuICAgICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICAgIG8gPSByb3dbaV07XG4gICAgICAgICAgby54ID0geDtcbiAgICAgICAgICBvLnkgPSB5O1xuICAgICAgICAgIG8uZHggPSB2O1xuICAgICAgICAgIHkgKz0gby5keSA9IE1hdGgubWluKHJlY3QueSArIHJlY3QuZHkgLSB5LCB2ID8gcm91bmQoby5hcmVhIC8gdikgOiAwKTtcbiAgICAgICAgfVxuICAgICAgICBvLnogPSBmYWxzZTtcbiAgICAgICAgby5keSArPSByZWN0LnkgKyByZWN0LmR5IC0geTtcbiAgICAgICAgcmVjdC54ICs9IHY7XG4gICAgICAgIHJlY3QuZHggLT0gdjtcbiAgICAgIH1cbiAgICB9XG4gICAgZnVuY3Rpb24gdHJlZW1hcChkKSB7XG4gICAgICB2YXIgbm9kZXMgPSBzdGlja2llcyB8fCBoaWVyYXJjaHkoZCksIHJvb3QgPSBub2Rlc1swXTtcbiAgICAgIHJvb3QueCA9IHJvb3QueSA9IDA7XG4gICAgICBpZiAocm9vdC52YWx1ZSkgcm9vdC5keCA9IHNpemVbMF0sIHJvb3QuZHkgPSBzaXplWzFdOyBlbHNlIHJvb3QuZHggPSByb290LmR5ID0gMDtcbiAgICAgIGlmIChzdGlja2llcykgaGllcmFyY2h5LnJldmFsdWUocm9vdCk7XG4gICAgICBzY2FsZShbIHJvb3QgXSwgcm9vdC5keCAqIHJvb3QuZHkgLyByb290LnZhbHVlKTtcbiAgICAgIChzdGlja2llcyA/IHN0aWNraWZ5IDogc3F1YXJpZnkpKHJvb3QpO1xuICAgICAgaWYgKHN0aWNreSkgc3RpY2tpZXMgPSBub2RlcztcbiAgICAgIHJldHVybiBub2RlcztcbiAgICB9XG4gICAgdHJlZW1hcC5zaXplID0gZnVuY3Rpb24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SAtIHBhZGRpbmdbM10sIGR5ID0gbm9kZS5keSAtIHBhZGRpbmdbMF0gLSBwYWRkaW5nWzJdO1xuICAgIGlmIChkeCA8IDApIHtcbiAgICAgIHggKz0gZHggLyAyO1xuICAgICAgZHggPSAwO1xuICAgIH1cbiAgICBpZiAoZHkgPCAwKSB7XG4gICAgICB5ICs9IGR5IC8gMjtcbiAgICAgIGR5ID0gMDtcbiAgICB9XG4gICAgcmV0dXJuIHtcbiAgICAgIHg6IHgsXG4gICAgICB5OiB5LFxuICAgICAgZHg6IGR4LFxuICAgICAgZHk6IGR5XG4gICAgfTtcbiAgfVxuICBkMy5yYW5kb20gPSB7XG4gICAgbm9ybWFsOiBmdW5jdGlvbijCtSwgz4MpIHtcbiAgICAgIHZhciBuID0gYXJndW1lbnRzLmxlbmd0aDtcbiAgICAgIGlmIChuIDwgMikgz4MgPSAxO1xuICAgICAgaWYgKG4gPCAxKSDCtSA9IDA7XG4gICAgICByZXR1cm4gZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciB4LCB5LCByO1xuICAgICAgICBkbyB7XG4gICAgICAgICAgeCA9IE1hdGgucmFuZG9tKCkgKiAyIC0gMTtcbiAgICAgICAgICB5ID0gTWF0aC5yYW5kb20oKSAqIDIgLSAxO1xuICAgICAgICAgIHIgPSB4ICogeCArIHkgKiB5O1xuICAgICAgICB9IHdoaWxlICghciB8fCByID4gMSk7XG4gICAgICAgIHJldHVybiDCtSArIM+DICogeCAqIE1hdGguc3FydCgtMiAqIE1hdGgubG9nKHIpIC8gcik7XG4gICAgICB9O1xuICAgIH0sXG4gICAgbG9nTm9ybWFsOiBmdW5jdGlvbigpIHtcbiAgICAgIHZhciByYW5kb20gPSBkMy5yYW5kb20ubm9ybWFsLmFwcGx5KGQzLCBhcmd1bWVudHMpO1xuICAgICAgcmV0dXJuIGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR1cm4gTWF0aC5leHAocmFuZG9tKCkpO1xuICAgICAgfTtcbiAgICB9LFxu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0aC5jb3MoYTAgKyBwMSk7XG4gICAgICAgIHkwID0gcjEgKiBNYXRoLnNpbihhMCArIHAxKTtcbiAgICAgICAgeDEgPSByMSAqIE1hdGguY29zKGExIC0gcDEpO1xuICAgICAgICB5MSA9IHIxICogTWF0aC5zaW4oYTEgLSBwMSk7XG4gICAgICAgIHZhciBsMSA9IE1hdGguYWJzKGExIC0gYTAgLSAyICogcDEpIDw9IM+AID8gMCA6IDE7XG4gICAgICAgIGlmIChwMSAmJiBkM19zdmdfYXJjU3dlZXAoeDAsIHkwLCB4MSwgeTEpID09PSBjdyBeIGwxKSB7XG4gICAgICAgICAgdmFyIGgxID0gKGEwICsgYTEpIC8gMjtcbiAgICAgICAgICB4MCA9IHIxICogTWF0aC5jb3MoaDEpO1xuICAgICAgICAgIHkwID0gcjEgKiBNYXRoLnNpbihoMSk7XG4gICAgICAgICAgeDEgPSB5MSA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHgwID0geTAgPSAwO1xuICAgICAgfVxuICAgICAgaWYgKHIwKSB7XG4gICAgICAgIHgyID0gcjAgKiBNYXRoLmNvcyhhMSAtIHAwKTtcbiAgICAgICAgeTIgPSByMCAqIE1hdGguc2luKGExIC0gcDApO1xuICAgICAgICB4MyA9IHIwICogTWF0aC5jb3MoYTAgKyBwMCk7XG4gICAgICAgIHkzID0gcjAgKiBNYXRoLnNpbihhMCArIHAwKTtcbiAgICAgICAgdmFyIGwwID0gTWF0aC5hYnMoYTAgLSBhMSArIDIgKiBwMCkgPD0gz4AgPyAwIDogMTtcbiAgICAgICAgaWYgKHAwICYmIGQzX3N2Z19hcmNTd2VlcCh4MiwgeTIsIHgzLCB5MykgPT09IDEgLSBjdyBeIGwwKSB7XG4gICAgICAgICAgdmFyIGgwID0gKGEwICsgYTEpIC8gMjtcbiAgICAgICAgICB4MiA9IHIwICogTWF0aC5jb3MoaDApO1xuICAgICAgICAgIHkyID0gcjAgKiBNYXRoLnNpbihoM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VuY3Rvcih4KSwgZnkgPSBkM19mdW5jdG9yKHkpO1xuICAgICAgZnVuY3Rpb24gc2VnbWVudCgpIHtcbiAgICAgICAgc2VnbWVudHMucHVzaChcIk1cIiwgaW50ZXJwb2xhdGUocHJvamVjdGlvbihwb2ludHMpLCB0ZW5zaW9uKSk7XG4gICAgICB9XG4gICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICBpZiAoZGVmaW5lZC5jYWxsKHRoaXMsIGQgPSBkYXRhW2ldLCBpKSkge1xuICAgICAgICAgIHBvaW50cy5wdXNoKFsgK2Z4LmNhbGwodGhpcywgZCwgaSksICtmeS5jYWxsKHRoaXMsIGQsIGkpIF0pO1xuICAgICAgICB9IGVsc2UgaWYgKHBvaW50cy5sZW5ndGgpIHtcbiAgICAgICAgICBzZWdtZW50KCk7XG4gICAgICAgICAgcG9pbnRzID0gW107XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGlmIChwb2ludHMubGVuZ3RoKSBzZWdtZW50KCk7XG4gICAgICByZXR1cm4gc2VnbWVudHMubGVuZ3RoID8gc2VnbWVudHMuam9pbihcIlwiKSA6IG51bGw7XG4gICAgfVxuICAgIGxpbmUueCA9IGZ1bmN0aW9uKF8pIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIHg7XG4gICAgICB4ID0gXztcbiAgICAgIHJldHVybiBsaW5lO1xuICAgIH07XG4gICAgbGluZS55ID0gZnVuY3Rpb24oXykge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4geTtcbiAgICAgIHkgPSBfO1xuICAgICAgcmV0dXJuIGxpbmU7XG4gICAgfTtcbiAgICBsaW5lLmRlZmluZWQgPSBmdW5jdGlvbihfKSB7XG4gICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBkZWZpbmVkO1xuICAgICAgZGVmaW5lZCA9IF87XG4gICAgICByZXR1cm4gbGluZTtcbiAgICB9O1xuIC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IlpcIik7XG4gICAgICB9XG4gICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICBpZiAoZGVmaW5lZC5jYWxsKHRoaXMsIGQgPSBkYXRhW2ldLCBpKSkge1xuICAgICAgICAgIHBvaW50czAucHVzaChbIHggPSArZngwLmNhbGwodGhpcywgZCwgaSksIHkgPSArZnkwLmNhbGwodGhpcywgZCwgaSkgXSk7XG4gICAgICAgICAgcG9pbnRzMS5wdXNoKFsgK2Z4MS5jYWxsKHRoaXMsIGQsIGkpLCArZnkxLmNhbGwodGhpcywgZCwgaSkgXSk7XG4gICAgICAgIH0gZWxzZSBpZiAocG9pbnRzMC5sZW5ndGgpIHtcbiAgICAgICAgICBzZWdtZW50KCk7XG4gICAgICAgICAgcG9pbnRzMCA9IFtdO1xuICAgICAgICAgIHBvaW50czEgPSBbXTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgaWYgKHBvaW50czAubGVuZ3RoKSBzZWdtZW50KCk7XG4gICAgICByZXR1cm4gc2VnbWVudHMubGVuZ3RoID8gc2VnbWVudHMuam9pbihcIlwiKSA6IG51bGw7XG4gICAgfVxuICAgIGFyZWEueCA9IGZ1bmN0aW9uKF8pIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIHgxO1xuICAgICAgeDAgPSB4MSA9IF87XG4gICAgICByZXR1cm4gYXJlYTtcbiAgICB9O1xuICAgIGFyZWEueDAgPSBmdW5jdGlvbihfKSB7XG4gICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiB4MDtcbiAgICAgIHgwID0gXztcbiAgICAgIHJldHVybiBhcmVhO1xuICAgIH07XG4gICAgYXJlYS54MSA9IGZ1bmN0aW9uKF8pIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIHgxO1xuICAgICAgeDEgPSBfO1xuICAgICAgcmV0dXJuIGFyZWE7XG4gICAgfTtcbiAgICBhcmVhLnkgPSBmdW5jd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0cihcImhlaWdodFwiLCByYW5nZVsxXSAtIHJhbmdlWzBdKTtcbiAgICAgICAgICByZWRyYXdZKGdVcGRhdGUpO1xuICAgICAgICB9XG4gICAgICAgIHJlZHJhdyhnVXBkYXRlKTtcbiAgICAgIH0pO1xuICAgIH1cbiAgICBicnVzaC5ldmVudCA9IGZ1bmN0aW9uKGcpIHtcbiAgICAgIGcuZWFjaChmdW5jdGlvbigpIHtcbiAgICAgICAgdmFyIGV2ZW50XyA9IGV2ZW50Lm9mKHRoaXMsIGFyZ3VtZW50cyksIGV4dGVudDEgPSB7XG4gICAgICAgICAgeDogeEV4dGVudCxcbiAgICAgICAgICB5OiB5RXh0ZW50LFxuICAgICAgICAgIGk6IHhFeHRlbnREb21haW4sXG4gICAgICAgICAgajogeUV4dGVudERvbWFpblxuICAgICAgICB9LCBleHRlbnQwID0gdGhpcy5fX2NoYXJ0X18gfHwgZXh0ZW50MTtcbiAgICAgICAgdGhpcy5fX2NoYXJ0X18gPSBleHRlbnQxO1xuICAgICAgICBpZiAoZDNfdHJhbnNpdGlvbkluaGVyaXRJZCkge1xuICAgICAgICAgIGQzLnNlbGVjdCh0aGlzKS50cmFuc2l0aW9uKCkuZWFjaChcInN0YXJ0LmJydXNoXCIsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgeEV4dGVudERvbWFpbiA9IGV4dGVudDAuaTtcbiAgICAgICAgICAgIHlFeHRlbnREb21haW4gPSBleHRlbnQwLmo7XG4gICAgICAgICAgICB4RXh0ZW50ID0gZXh0ZW50MC54O1xuICAgICAgICAgICAgeUV4dGVudCA9IGV4dGVudDAueTtcbiAgICAgICAgICAgIGV2ZW50Xyh7XG4gICAgICAgICAgICAgIHR5cGU6IFwiYnJ1c2hzdGFydFwiXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KS50d2VlbihcImJydXNoOmJydXNoXCIsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgdmFyIHhpID0gZDNfaW50ZXJwb2xhdGVBcnJheSh4RXh0ZW50LCBleHRlbnQxLngpLCB5aSA9IGQzX2ludGVycG9sYXRlQXJyYXkoeUV4dGVudCwgZXh0ZW50MS55KTtcbiAgICAgICAgICAgIHhFeHRlbnREb21haW4gPSB5RXh0ZW50RG9tYWluID0gbnVsbDtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7XG4gICAgICAgICAgICAgIHhFeHRlbnQgPSBleHRlbnQxLnggPSB4aSh0KTtcbiAgICAgICAgICAgICAgeUV4dGVudCA9IGV4dGVudDEueSA9IHlpKHQpO1xuICAgICAgICAgICAgICBldmVudF8oe1xuICAgICAgICAgICAgICAgIHR5cGU6IFwiYnJ1c2hcIixcbiAgICAgICAgICAgICAgICBtb2RlOiBcInJlc2l6ZVwiXG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICB9KS5lYWNoKFwiZW5kLmJydXNoXCIsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgeEV4dGVudERvbWFpbiA9IGV4dGVudDEuaTtcbiAgICAgICAgICAgIHlFeHRlbnREb21haW4gPSBleHRlbnQxLmo7XG4gICAgICAgICAgICBldmVudF8oe1xuICAgICAgICAgICAgICB0eXBlOiBcImJydXNoXCIsXG4gICAgICAgICAgICAgIG1vZGU6IFwicmVzaXplXCJcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgZXZlbnRfKHtcbiAgICAgICAgICAgICAgdHlwZTogXCJicnVzaGVuZFwiXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBldmVudF8oe1xuICAgICAgICAgICAgdHlwZTogXCJicnVzaHN0YXJ0XCJcbiAgICAgICAgICB9KTtcbiAgICAgICAgICBldmVudF8oe1xuICAgICAgICAgICAgdHlwZTogXCJicnVzaFwiLFxuICAgICAgICAgICAgbW9kZTogXCJyZXNpemVcIlxuICAgICAgICAgIH0pO1xuICAgICAgICAgIG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AgaWYgKHguaW52ZXJ0KSB4MCA9IHguaW52ZXJ0KHgwKSwgeDEgPSB4LmludmVydCh4MSk7XG4gICAgICAgICAgICBpZiAoeDEgPCB4MCkgdCA9IHgwLCB4MCA9IHgxLCB4MSA9IHQ7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICh5KSB7XG4gICAgICAgICAgaWYgKHlFeHRlbnREb21haW4pIHtcbiAgICAgICAgICAgIHkwID0geUV4dGVudERvbWFpblswXSwgeTEgPSB5RXh0ZW50RG9tYWluWzFdO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB5MCA9IHlFeHRlbnRbMF0sIHkxID0geUV4dGVudFsxXTtcbiAgICAgICAgICAgIGlmICh5LmludmVydCkgeTAgPSB5LmludmVydCh5MCksIHkxID0geS5pbnZlcnQoeTEpO1xuICAgICAgICAgICAgaWYgKHkxIDwgeTApIHQgPSB5MCwgeTAgPSB5MSwgeTEgPSB0O1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4geCAmJiB5ID8gWyBbIHgwLCB5MCBdLCBbIHgxLCB5MSBdIF0gOiB4ID8gWyB4MCwgeDEgXSA6IHkgJiYgWyB5MCwgeTEgXTtcbiAgICAgIH1cbiAgICAgIGlmICh4KSB7XG4gICAgICAgIHgwID0gelswXSwgeDEgPSB6WzFdO1xuICAgICAgICBpZiAoeSkgeDAgPSB4MFswXSwgeDEgPSB4MVswXTtcbiAgICAgICAgeEV4dGVudERvbWFpbiA9IFsgeDAsIHgxIF07XG4gICAgICAgIGlmICh4LmludmVydCkgeDAgPSB4KHgwKSwgeDEgPSB4KHgxKTtcbiAgICAgICAgaWYgKHgxIDwgeDApIHQgPSB4MCwgeDAgPSB4MSwgeDEgPSB0O1xuICAgICAgICBpZiAoeDAgIT0geEV4dGVudFswXSB8fCB4MSAhPSB4RXh0ZW50WzFdKSB4RXh0ZW50ID0gWyB4MCwgeDEgXTtcbiAgICAgIH1cbiAgIC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clZCDYq9in2YbZitipJ10sXG4gICAgbSA6IFsn2KPZgtmEINmF2YYg2K/ZgtmK2YLYqScsICfYr9mC2YrZgtipINmI2KfYrdiv2KknLCBbJ9iv2YLZitmC2KrYp9mGJywgJ9iv2YLZitmC2KrZitmGJ10sICclZCDYr9mC2KfYptmCJywgJyVkINiv2YLZitmC2KknLCAnJWQg2K/ZgtmK2YLYqSddLFxuICAgIGggOiBbJ9ij2YLZhCDZhdmGINiz2KfYudipJywgJ9iz2KfYudipINmI2KfYrdiv2KknLCBbJ9iz2KfYudiq2KfZhicsICfYs9in2LnYqtmK2YYnXSwgJyVkINiz2KfYudin2KonLCAnJWQg2LPYp9i52KknLCAnJWQg2LPYp9i52KknXSxcbiAgICBkIDogWyfYo9mC2YQg2YXZhiDZitmI2YUnLCAn2YrZiNmFINmI2KfYrdivJywgWyfZitmI2YXYp9mGJywgJ9mK2YjZhdmK2YYnXSwgJyVkINij2YrYp9mFJywgJyVkINmK2YjZhdmL2KcnLCAnJWQg2YrZiNmFJ10sXG4gICAgTSA6IFsn2KPZgtmEINmF2YYg2LTZh9ixJywgJ9i02YfYsSDZiNin2K3YrycsIFsn2LTZh9ix2KfZhicsICfYtNmH2LHZitmGJ10sICclZCDYo9i02YfYsScsICclZCDYtNmH2LHYpycsICclZCDYtNmH2LEnXSxcbiAgICB5IDogWyfYo9mC2YQg2YXZhiDYudin2YUnLCAn2LnYp9mFINmI2KfYrdivJywgWyfYudin2YXYp9mGJywgJ9i52KfZhdmK2YYnXSwgJyVkINij2LnZiNin2YUnLCAnJWQg2LnYp9mF2YvYpycsICclZCDYudin2YUnXVxufTtcbnZhciBwbHVyYWxpemUgPSBmdW5jdGlvbiAodSkge1xuICAgIHJldHVybiBmdW5jdGlvbiAobnVtYmVyLCB3aXRob3V0U3VmZml4LCBzdHJpbmcsIGlzRnV0dXJlKSB7XG4gICAgICAgIHZhciBmID0gcGx1cmFsRm9ybShudW1iZXIpLFxuICAgICAgICAgICAgc3RyID0gcGx1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ZhNiz2KfYudipXSBMVCcsXG4gICAgICAgIG5leHREYXk6ICdb2LrYr9inINi52YTZiSDYp9mE2LPYp9i52KldIExUJyxcbiAgICAgICAgbmV4dFdlZWs6ICdkZGRkIFvYudmE2Ykg2KfZhNiz2KfYudipXSBMVCcsXG4gICAgICAgIGxhc3REYXk6ICdb2KPZhdizINi52YTZiSDYp9mE2LPYp9i52KldIExUJyxcbiAgICAgICAgbGFzdFdlZWs6ICdkZGRkIFvYudmE2Ykg2KfZhNiz2KfYudipXSBMVCcsXG4gICAgICAgIHNhbWVFbHNlOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJ9mB2YogJXMnLFxuICAgICAgICBwYXN0IDogJ9mF2YbYsCAlcycsXG4gICAgICAgIHMgOiAn2KvZiNin2YYnLFxuICAgICAgICBtIDogJ9iv2YLZitmC2KknLFxuICAgICAgICBtbSA6ICclZCDYr9mC2KfYptmCJyxcbiAgICAgICAgaCA6ICfYs9in2LnYqScsXG4gICAgICAgIGhoIDogJyVkINiz2KfYudin2KonLFxuICAgICAgICBkIDogJ9mK2YjZhScsXG4gICAgICAgIGRkIDogJyVkINij2YrYp9mFJyxcbiAgICAgICAgTSA6ICfYtNmH2LEnLFxuICAgICAgICBNTSA6ICclZCDYo9i02YfYsScsXG4gICAgICAgIHkgOiAn2LPZhtipJyxcbiAgICAgICAgeXkgOiAnJWQg2LPZhtmI2KfYqidcbiAgICB9LFxuICAgIHdlZWsgOiB7XG4gICAgICAgIGRvdyA6IDYsIC8vIFNhdHVyZGF5IGlzIHRoZSBmaXJzdCBkYXkgb2YgdGhlIHdlZWsuXG4gICAgICAgIGRveSA6IDEyICAvLyBUaGUgd2VlayB0aGF0IGNvbnRhaW5zIEphbiAxc3QgaXMgdGhlIGZpcnN0IHdlZWsgb2YgdGhlIHllYXIuXG4gICAgfVxufSk7XG5cbnJldHVybiBhck1hO1xuXG59KSkpO1xuXG5cblxuLy8vL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YXk6ICdb2LrYr9inINi52YTZiSDYp9mE2LPYp9i52KldIExUJyxcbiAgICAgICAgbmV4dFdlZWs6ICdkZGRkIFvYudmE2Ykg2KfZhNiz2KfYudipXSBMVCcsXG4gICAgICAgIGxhc3REYXk6ICdb2KPZhdizINi52YTZiSDYp9mE2LPYp9i52KldIExUJyxcbiAgICAgICAgbGFzdFdlZWs6ICdkZGRkIFvYudmE2Ykg2KfZhNiz2KfYudipXSBMVCcsXG4gICAgICAgIHNhbWVFbHNlOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZToge1xuICAgICAgICBmdXR1cmU6ICfZgdmKICVzJyxcbiAgICAgICAgcGFzdDogJ9mF2YbYsCAlcycsXG4gICAgICAgIHM6ICfYq9mI2KfZhicsXG4gICAgICAgIG06ICfYr9mC2YrZgtipJyxcbiAgICAgICAgbW06ICclZCDYr9mC2KfYptmCJyxcbiAgICAgICAgaDogJ9iz2KfYudipJyxcbiAgICAgICAgaGg6ICclZCDYs9in2LnYp9iqJyxcbiAgICAgICAgZDogJ9mK2YjZhScsXG4gICAgICAgIGRkOiAnJWQg2KPZitin2YUnLFxuICAgICAgICBNOiAn2LTZh9ixJyxcbiAgICAgICAgTU06ICclZCDYo9i02YfYsScsXG4gICAgICAgIHk6ICfYs9mG2KknLFxuICAgICAgICB5eTogJyVkINiz2YbZiNin2KonXG4gICAgfSxcbiAgICB3ZWVrOiB7XG4gICAgICAgIGRvdzogMSwgLy8gTW9uZGF5IGlzIHRoZSBmaXJzdCBkYXkgb2YgdGhlIHdlZWsuXG4gICAgICAgIGRveTogNCAvLyBUaGUgd2VlayB0aGF0IGNvbnRhaW5zIEphbiA0dGggaXMgdGhlIGZpcnN0IHdlZWsgb2YgdGhlIHllYXIuXG4gICAgfVxufSk7XG5cbnJldHVybiBhclRuO1xuXG59KSkpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9+L21vbWVudC9s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dmL2KcnLCAnJWQg2YrZiNmFJ10sXG4gICAgTSA6IFsn2KPZgtmEINmF2YYg2LTZh9ixJywgJ9i02YfYsSDZiNin2K3YrycsIFsn2LTZh9ix2KfZhicsICfYtNmH2LHZitmGJ10sICclZCDYo9i02YfYsScsICclZCDYtNmH2LHYpycsICclZCDYtNmH2LEnXSxcbiAgICB5IDogWyfYo9mC2YQg2YXZhiDYudin2YUnLCAn2LnYp9mFINmI2KfYrdivJywgWyfYudin2YXYp9mGJywgJ9i52KfZhdmK2YYnXSwgJyVkINij2LnZiNin2YUnLCAnJWQg2LnYp9mF2YvYpycsICclZCDYudin2YUnXVxufTtcbnZhciBwbHVyYWxpemUgPSBmdW5jdGlvbiAodSkge1xuICAgIHJldHVybiBmdW5jdGlvbiAobnVtYmVyLCB3aXRob3V0U3VmZml4LCBzdHJpbmcsIGlzRnV0dXJlKSB7XG4gICAgICAgIHZhciBmID0gcGx1cmFsRm9ybShudW1iZXIpLFxuICAgICAgICAgICAgc3RyID0gcGx1cmFsc1t1XVtwbHVyYWxGb3JtKG51bWJlcildO1xuICAgICAgICBpZiAoZiA9PT0gMikge1xuICAgICAgICAgICAgc3RyID0gc3RyW3dpdGhvdXRTdWZmaXggPyAwIDogMV07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHN0ci5yZXBsYWNlKC8lZC9pLCBudW1iZXIpO1xuICAgIH07XG59O1xudmFyIG1vbnRocyA9IFtcbiAgICAn2YPYp9mG2YjZhiDYp9mE2KvYp9mG2Yog2YrZhtin2YrYsScsXG4gICAgJ9i02KjYp9i3INmB2KjYsdin2YrYsScsXG4gICAgJ9ii2LDYp9ixINmF2KfYsdizJyxcbiAgICAn2YbZitiz2KfZhiDYo9io2LHZitmEJyxcbiAgICAn2KPZitin2LEg2YXYp9mK2YgnLFxuICAgICfYrdiy2YrYsdin2YYg2YrZiNmG2YrZiCcsXG4gICAgJ9iq2YXZiNiyINmK2YjZhNmK2YgnLFxuICAgICfYotioINij2LrYs9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NlOiAv2LV82YUvLFxuICAgIGlzUE0gOiBmdW5jdGlvbiAoaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuICfZhScgPT09IGlucHV0O1xuICAgIH0sXG4gICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG4gICAgICAgIGlmIChob3VyIDwgMTIpIHtcbiAgICAgICAgICAgIHJldHVybiAn2LUnO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICfZhSc7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIGNhbGVuZGFyIDoge1xuICAgICAgICBzYW1lRGF5OiAnW9in2YTZitmI2YUg2LnZhtivINin2YTYs9in2LnYqV0gTFQnLFxuICAgICAgICBuZXh0RGF5OiAnW9i62K/Zi9inINi52YbYryDYp9mE2LPYp9i52KldIExUJyxcbiAgICAgICAgbmV4dFdlZWs6ICdkZGRkIFvYudmG2K8g2KfZhNiz2KfYudipXSBMVCcsXG4gICAgICAgIGxhc3REYXk6ICdb2KPZhdizINi52YbYryDYp9mE2LPYp9i52KldIExUJyxcbiAgICAgICAgbGFzdFdlZWs6ICdkZGRkIFvYudmG2K8g2KfZhNiz2KfYudipXSBMVCcsXG4gICAgICAgIHNhbWVFbHNlOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJ9io2LnYryAlcycsXG4gICAgICAgIHBhc3QgOiAn2YXZhtiwICVzJyxcbiAgICAgICAgcyA6IHBsdXJhbGl6ZSgncycpLFxuICAgICAgICBtIDogcGx1cmFsaXplKCdtJyksXG4gICAgICAgIG1tIDogcGx1cmFsaXplKCdtJyksXG4gICAgICAgIGggOiBwbHVyYWxpemUoJ2gnKSxcbiAgICAgICAgaGggOiBwbHVyYWxpemUoJ2gnKSxcbiAgICAgICAgZCA6IHBsdXJhbGl6ZSgnZCcpLFxuICAgICAgICBkZCA6IHBsdXJhbGl6ZSgn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aXRjaCAodGhpcy5kYXkoKSkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0KMg0LzRltC90YPQu9GD0Y5dIGRkZGQgW9GeXSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CjINC80ZbQvdGD0LvRi10gZGRkZCBb0Z5dIExUJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2FtZUVsc2U6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAn0L/RgNCw0LcgJXMnLFxuICAgICAgICBwYXN0IDogJyVzINGC0LDQvNGDJyxcbiAgICAgICAgcyA6ICfQvdC10LrQsNC70YzQutGWINGB0LXQutGD0L3QtCcsXG4gICAgICAgIG0gOiByZWxhdGl2ZVRpbWVXaXRoUGx1cmFsLFxuICAgICAgICBtbSA6IHJlbGF0aXZlVGltZVdpdGhQbHVyYWwsXG4gICAgICAgIGggOiByZWxhdGl2ZVRpbWVXaXRoUGx1cmFsLFxuICAgICAgICBoaCA6IHJlbGF0aXZlVGltZVdpdGhQbHVyYWwsXG4gICAgICAgIGQgOiAn0LTQt9C10L3RjCcsXG4gICAgICAgIGRkIDogcmVsYXRpdmVUaW1lV2l0aFBsdXJhbCxcbiAgICAgICAgTSA6ICfQvNC10YHRj9GGJyxcbiAgICAgICAgTU0gOiByZWxhdGl2ZVRpbWVXaXRoUGx1cmFsLFxuICAgICAgICB5IDogJ9Cz0L7QtCcsXG4gICAgICAgIHl5IDogcmVsYXRpdmVUaW1lV2l0aFBsdXJh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nLFxuICAgICAgICBMIDogJ0QuTU0uWVlZWScsXG4gICAgICAgIExMIDogJ0QgTU1NTSBZWVlZJyxcbiAgICAgICAgTExMIDogJ0QgTU1NTSBZWVlZIEg6bW0nLFxuICAgICAgICBMTExMIDogJ2RkZGQsIEQgTU1NTSBZWVlZIEg6bW0nXG4gICAgfSxcbiAgICBjYWxlbmRhciA6IHtcbiAgICAgICAgc2FtZURheSA6ICdb0JTQvdC10YEg0LJdIExUJyxcbiAgICAgICAgbmV4dERheSA6ICdb0KPRgtGA0LUg0LJdIExUJyxcbiAgICAgICAgbmV4dFdlZWsgOiAnZGRkZCBb0LJdIExUJyxcbiAgICAgICAgbGFzdERheSA6ICdb0JLRh9C10YDQsCDQsl0gTFQnLFxuICAgICAgICBsYXN0V2VlayA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQkiDQuNC30LzQuNC90LDQu9Cw0YLQsF0gZGRkZCBb0LJdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CSINC40LfQvNC40L3QsNC70LjRj10gZGRkZCBb0LJdIExUJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2FtZUVsc2UgOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJ9GB0LvQtdC0ICVzJyxcbiAgICAgICAgcGFzdCA6ICfQv9GA0LXQtNC4ICVzJyxcbiAgICAgICAgcyA6ICfQ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DMgfHwgbnVtYmVyID09PSA0KSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtaW51dGUnO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ21pbnV0YSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICBjYXNlICdoJzpcbiAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4ID8gJ2plZGFuIHNhdCcgOiAnamVkbm9nIHNhdGEnO1xuICAgICAgICBjYXNlICdoaCc6XG4gICAgICAgICAgICBpZiAobnVtYmVyID09PSAxKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdzYXQnO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChudW1iZXIgPT09IDIgfHwgbnVtYmVyID09PSAzIHx8IG51bWJlciA9PT0gNCkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnc2F0YSc7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnc2F0aSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICBjYXNlICdkZCc6XG4gICAgICAgICAgICBpZiAobnVtYmVyID09PSAxKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdkYW4nO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ2RhbmEnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgY2FzZSAnTU0nOlxuICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnbWplc2VjJztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyID09PSAyIHx8IG51bWJlciA9PT0gMyB8fCBudW1iZXIgPT09IDQpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ21qZXNlY2EnO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ21qZXNlY2knO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgY2FzZSAneXknOlxuICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnZ29kaW5hJztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyID09PSAyIHx8IG51bWJlciA9PT0gMyB8fCBudW1iZXIgPT09IDQpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ2dvZGluZSc7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnZ29kaW5hJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfVxufVxuXG52YXIgYnMgPSBtb21lbnQuZGVmaW5lTG9jYWxlKCdicycsIHtcbiAgICBtb250aHMgOiAnamFudWFyX2ZlYnJ1YXJfbWFydF9hcHJpbF9tYWpfanVuaV9qdWxpX2F1Z3VzdF9zZXB0ZW1iYXJfb2t0b2Jhcl9ub3ZlbWJhcl9kZWNlbWJhcicuc3BsaXQoJ18nKSxcbiAgICBtb250aHNTaG9ydCA6ICdqYW4uX2ZlYi5fbWFyLl9hcHIuX21hai5fanVuLl9qdWwuX2F1Zy5fc2VwLl9va3QuX25vdi5fZGVjLicuc3BsaXQoJ18nKSxcbiAgICBtb250aHNQYXJzZUV4YWN0OiB0cnVlLFxuICAgIHdlZWtkYXlzIDogJ25lZGplbGphX3BvbmVkamVsamFrX3V0b3Jha19zcmlqZWRhX8SNZXR2cnRha19wZXRha19zdWJvdGEnLnNwbGl0KCdfJyksXG4gICAgd2Vla2RheXNTaG9ydCA6ICduZWQuX3Bvbi5fdXRvLl9zcmkuX8SNZXQuX3BldC5fc3ViLicuc3BsaXQoJ18nKSxcbiAgICB3ZWVrZGF5c01pbiA6ICduZV9wb191dF9zcl/EjWVfcGVfc3UnLnNwbGl0KCdfJyksXG4gICAgd2Vla2RheXNQYXJzZUV4YWN0IDogdHJ1ZSxcbiAgICBsb25nRGF0ZUZvcm1hdCA6IHtcbiAgICAgICAgTFQgOiAnSDptbScsXG4gICAgICAgIExUUyA6ICdIOm1tOnNzJyxcbiAgICAgICAgTCA6ICdERC5NTS5ZWVlZJyxcbiAgICAgICAgTEwgOiAnRC4gTU1NTSBZWVlZJyxcbiAgICAgICAgTExMIDogJ0QuIE1NTU0gWVlZWSBIOm1tJyxcbiAgICAgICAgTExMTCA6ICdkZGRkLCBELiBNTU1NIFlZWVkgSDptbSdcbiAgICB9LFxuICAgIGNhbGVuZGFyIDoge1xuICAgICAgICBzYW1lRGF5ICA6ICdbZGFuYXMgdV0gTFQnLFxuICAgICAgICBuZXh0RGF5ICA6ICdbc3V0cmEgdV0gTFQnLFxuICAgICAgICBuZXh0V2VlayA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gW25lZGplbGp1XSBbdV0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gW3NyaWplZHVdIFt1XSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBbc3Vib3R1XSBbdV0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gZGRkZCBbdV0gTFQnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBsYXN0RGF5ICA6ICdbanXEjWVyIHVdIExUJyxcbiAgICAgICAgbGFzdFdlZWsgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1twcm/FoWx1XSBkZGRkIFt1XSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1twcm/FoWxlXSBbc3Vib3RlXSBbdV0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbcHJvxaFsaV0gZGRkZCBbdV0gTFQnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAnemEgJXMnLFxuICAgICAgICBwYXN0ICAgOiAncHJpamUgJXMnLFxuICAgICAgICBzICAgICAgOiAncGFyIHNla3VuZGknLFxuICAgICAgICBtICAgICAgOiB0cmFuc2xhdGUsXG4gICAgICAgIG1tICAgICA6IHRyYW5zbGF0ZSxcbiAgICAgICAgaCAgICAgIDogdHJhbnNsYXRlLFxuICAgICAgICBoaCAgICAgOiB0cmFuc2xhdGUsXG4gICAgICAgIGQgICAgICA6ICdkYW4nLFxuICAgICAgICBkZCAgICAgOiB0cmFuc2xhdGUsXG4gICAgICAgIE0gICAgICA6ICdtamVzZWMnLFxu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AgICByZXR1cm4gJ1thaGlyIGEgJyArICgodGhpcy5ob3VycygpICE9PSAxKSA/ICdsZXMnIDogJ2xhJykgKyAnXSBMVCc7XG4gICAgICAgIH0sXG4gICAgICAgIGxhc3RXZWVrIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuICdbZWxdIGRkZGQgW3Bhc3NhdCBhICcgKyAoKHRoaXMuaG91cnMoKSAhPT0gMSkgPyAnbGVzJyA6ICdsYScpICsgJ10gTFQnO1xuICAgICAgICB9LFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAnZFxcJ2FxdcOtICVzJyxcbiAgICAgICAgcGFzdCA6ICdmYSAlcycsXG4gICAgICAgIHMgOiAndW5zIHNlZ29ucycsXG4gICAgICAgIG0gOiAndW4gbWludXQnLFxuICAgICAgICBtbSA6ICclZCBtaW51dHMnLFxuICAgICAgICBoIDogJ3VuYSBob3JhJyxcbiAgICAgICAgaGggOiAnJWQgaG9yZXMnLFxuICAgICAgICBkIDogJ3VuIGRpYScsXG4gICAgICAgIGRkIDogJyVkIGRpZXMnLFxuICAgICAgICBNIDogJ3VuIG1lcycsXG4gICAgICAgIE1NIDogJyVkIG1lc29zJyxcbiAgICAgICAgeSA6ICd1biBhbnknLFxuICAgICAgICB5eSA6ICclZCBhbnlzJ1xuICAgIH0sXG4gICAgZGF5T2ZNb250aE9yZGluYWxQYXJzZTogL1xcZHsxLDJ9KHJ8bnx0fMOofGEpLyxcbiAgICBvcmRpbmFsIDogZnVuY3Rpb24gKG51bWJlciwgcGVyaW9kKSB7XG4gICAgICAgIHZhciBvdXRwdXQgPSAobnVtYmVyID09PSAxKSA/ICdyJyA6XG4gICAgICAgICAgICAobnVtYmVyID09PSAyKSA/ICduJyA6XG4gICAgICAgICAgICAobnVtYmVyID09PSAzKSA/ICdyJyA6XG4gICAgICAgICAgICAobnVtYmVyID09PS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IDkgbWludXRlcyAvIDkgbWludXRlcyBhZ29cbiAgICAgICAgICAgIGlmICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArIChwbHVyYWwobnVtYmVyKSA/ICdtaW51dHknIDogJ21pbnV0Jyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAnbWludXRhbWknO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgJ2gnOiAgLy8gYW4gaG91ciAvIGluIGFuIGhvdXIgLyBhbiBob3VyIGFnb1xuICAgICAgICAgICAgcmV0dXJuIHdpdGhvdXRTdWZmaXggPyAnaG9kaW5hJyA6IChpc0Z1dHVyZSA/ICdob2RpbnUnIDogJ2hvZGlub3UnKTtcbiAgICAgICAgY2FzZSAnaGgnOiAvLyA5IGhvdXJzIC8gaW4gOSBob3VycyAvIDkgaG91cnMgYWdvXG4gICAgICAgICAgICBpZiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAocGx1cmFsKG51bWJlcikgPyAnaG9kaW55JyA6ICdob2RpbicpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ2hvZGluYW1pJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICdkJzogIC8vIGEgZGF5IC8gaW4gYSBkYXkgLyBhIGRheSBhZ29cbiAgICAgICAgICAgIHJldHVybiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkgPyAnZGVuJyA6ICdkbmVtJztcbiAgICAgICAgY2FzZSAnZGQnOiAvLyA5IGRheXMgLyBpbiA5IGRheXMgLyA5IGRheXMgYWdvXG4gICAgICAgICAgICBpZiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAocGx1cmFsKG51bWJlcikgPyAnZG55JyA6ICdkbsOtJyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAnZG55JztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICdNJzogIC8vIGEgbW9udGggLyBpbiBhIG1vbnRoIC8gYSBtb250aCBhZ29cbiAgICAgICAgICAgIHJldHVybiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkgPyAnbcSbc8OtYycgOiAnbcSbc8OtY2VtJztcbiAgICAgICAgY2FzZSAnTU0nOiAvLyA5IG1vbnRocyAvIGluIDkgbW9udGhzIC8gOSBtb250aHMgYWdvXG4gICAgICAgICAgICBpZiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAocGx1cmFsKG51bWJlcikgPyAnbcSbc8OtY2UnIDogJ23Em3PDrWPFrycpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ23Em3PDrWNpJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICd5JzogIC8vIGEgeWVhciAvIGluIGEgeWVhciAvIGEgeWVhciBhZ29cbiAgICAgICAgICAgIHJldHVybiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkgPyAncm9rJyA6ICdyb2tlbSc7XG4gICAgICAgIGNhc2UgJ3l5JzogLy8gOSB5ZWFycyAvIGluIDkgeWVhcnMgLyA5IHllYXJzIGFnb1xuICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHBsdXJhbChudW1iZXIpID8gJ3Jva3knIDogJ2xldCcpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ2xldHknO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgfVxufVxuXG52YXIgY3MgPSBtb21lbnQuZGVmaW5lTG9jYWxlKCdjcycsIHtcbiAgICBtb250aHMgOiBtb250aHMsXG4gICAgbW9udGhzU2hvcnQgOiBtb250aHNTaG9ydCxcbiAgICBtb250aHNQYXJzZSA6IChmdW5jdGlvbiAobW9udGhzLCBtb250aHNTaG9ydCkge1xuICAgICAgICB2YXIgaSwgX21vbnRoc1BhcnNlID0gW107XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCAxMjsgaSsrKSB7XG4gICAgICAgICAgICAvLyB1c2UgY3VzdG9tIHBhcnNlciB0byBzb2x2ZSBwcm9ibGVtIHdpdGggSnVseSAoxI1lcnZlbmVjKVxuICAgICAgICAgICAgX21vbnRoc1BhcnNlW2ldID0gbmV3IFJlZ0V4cCgnXicgKyBtb250aHNbaV0gKyAnJHxeJyArIG1vbnRoc1Nob3J0W2ldICsgJyQnLCAnaScpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBfbW9udGhzUGFyc2U7XG4gICAgfShtb250aHMsIG1vbnRoc1Nob3J0KSksXG4gICAgc2hvcnRNb250aHNQYXJzZSA6IChmdW5jdGlvbiAobW9udGhzU2hvcnQpIHtcbiAgICAgICAgdmFyIGksIF9zaG9ydE1vbnRoc1BhcnNlID0gW107XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCAxMjsgaSsrKSB7XG4gICAgICAgICAgICBfc2hvcnRNb250aHNQYXJzZVtpXSA9IG5ldyBSZWdFeHAoJ14nICsgbW9udGhzU2hvcnRbaV0gKyAnJCcsICdpJyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIF9zaG9ydE1vbnRoc1BhcnNlO1xuICAgIH0obW9udGhzU2hvcnQpKSxcbiAgICBsb25nTW9udGhzUGFyc2UgOiAoZnVuY3Rpb24gKG1vbnRocykge1xuICAgICAgICB2YXIgaSwgX2xvbmdNb250aHNQYXJzZSA9IFtdO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgMTI7IGkrKykge1xuICAgICAgICAgICAgX2xvbmdNb250aHNQYXJzZVtpXSA9IG5ldyBSZWdFeHAoJ14nICsgbW9udGhzW2ldICsgJyQnLCAnaScpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBfbG9uZ01vbnRoc1BhcnNlO1xuICAgIH0obW9udGhzKSksXG4gICAgd2Vla2RheXMgOiAnbmVkxJtsZV9wb25kxJtsw61fw7p0ZXLDvV9zdMWZZWRhX8SNdHZydGVrX3DDoXRla19zb2JvdGEnLnNwbGl0KCdfJyksXG4gICAgd2Vla2RheXNTaG9ydCA6ICduZV9wb1/DunRfc3RfxI10X3DDoV9zbycuc3BsaXQoJ18nKSxcbiAgICB3ZWVrZGF5c01pbiA6ICduZV9wb1/DunRfc3RfxI10X3DDoV9zbycuc3BsaXQoJ18nKSxcbiAgICBsb25nRGF0ZUZvcm1hdCA6IHtcbiAgICAgICAgTFQ6ICdIOm1tJyxcbiAgICAgICAgTFRTIDogJ0g6bW06c3MnLFxuICAgICAgICBMIDogJ0RELk1NLllZWVknLFxuICAgICAgICBMTCA6ICdELiBNTU1NIFlZWVknLFxuICAgICAgICBMTEwgOiAnRC4gTU1NTSBZWVlZIEg6bW0nLFxuICAgICAgICBMTExMIDogJ2RkZGQgRC4gTU1NTSBZWVlZIEg6bW0nLFxuICAgICAgICBsIDogJ0QuIE0uIFlZWVknXG4gICAgfSxcbiAgICBjYWxlbmRhciA6IHtcbiAgICAgICAgc2FtZURheTogJ1tkbmVzIHZdIExUJyxcbiAgICAgICAgbmV4dERheTogJ1t6w610cmEgdl0gTFQnLFxuICAgICAgICBuZXh0V2VlazogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2IG5lZMSbbGkgdl0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ZdIGRkZGQgW3ZdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ZlIHN0xZllZHUgdl0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdmUgxI10dnJ0ZWsgdl0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdiBww6F0ZWsgdl0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdiBzb2JvdHUgdl0gTFQnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBsYXN0RGF5OiAnW3bEjWVyYSB2XSBMVCcsXG4gICAgICAgIGxhc3RXZWVrOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW21pbnVsb3UgbmVkxJtsaSB2XSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbbWludWzDqV0gZGRkZCBbdl0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbbWludWx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250aHMgPSBbXG4gICAgJ96W3qzegt6q3ofept6D3qknLFxuICAgICfeit6s3oTesN6D3qreh96m3oPeqScsXG4gICAgJ96J3qfeg96o3pfeqicsXG4gICAgJ96H3q3eld6w3oPeqd6N3qonLFxuICAgICfeid6tJyxcbiAgICAn3pbeq96C3rAnLFxuICAgICfelt6q3o3ept6H3qgnLFxuICAgICfeh96v3o7ept6Q3rDek96qJyxcbiAgICAn3pDerN6V3rDek96s3onesN6E3qbeg96qJyxcbiAgICAn3ofert6G3rDek96v3oTept6D3qonLFxuICAgICfegt6u3ojerN6J3rDehN6m3oPeqicsXG4gICAgJ96R3qjekN6s3onesN6E3qbeg96qJ1xuXTtcbnZhciB3ZWVrZGF5cyA9IFtcbiAgICAn3ofep96L3qjeh96w3ozepicsXG4gICAgJ96A3q/eid6mJyxcbiAgICAn3ofept6C3rDejt6n3oPepicsXG4gICAgJ96E3qrei96mJyxcbiAgICAn3oTeqt6D3qfekN6w3orept6M3qgnLFxuICAgICfegN6q3obeqt6D3qonLFxuICAgICfegN6u3oLeqN6A3qjeg96qJ1xuXTtcblxudmFyIGR2ID0gbW9tZW50LmRlZmluZUxvY2FsZSgnZHYnLCB7XG4gICAgbW9udGhzIDogbW9udGhzLFxuICAgIG1vbnRoc1Nob3J0IDogbW9udGhzLFxuICAgIHdlZWtkYXlzIDogd2Vla2RheXMsXG4gICAgd2Vla2RheXNTaG9ydCA6IHdlZWtkYXlzLFxuICAgIHdlZWtkYXlzTWluIDogJ96H3qfei96oX96A3q/eid6mX96H3qbegt6wX96E3qrei96mX96E3qreg96nX96A3qreht6qX96A3q7egt6oJy5zcGxpdCgnXycpLFxuICAgIGxvbmdEYXRlRm9ybWF0IDoge1xuXG4gICAgICAgIExUIDogJ0hIOm1tJyxcbiAgICAgICAgTFRTIDogJ0hIOm1tOnNzJyxcbiAgICAgICAgTCA6ICdEL00vWVlZWScsXG4gICAgICAgIExMIDogJ0QgTU1NTSBZWVlZJyxcbiAgICAgICAgTExMIDogJ0QgTU1NTSBZWVlZIEhIOm1tJyxcbiAgICAgICAgTExMTCA6ICdkZGRkIEQgTU1NTSBZWVlZIEhIOm1tJ1xuICAgIH0sXG4gICAgbWVyaWRpZW1QYXJzZTogL96J3oZ83oneii8sXG4gICAgaXNQTSA6IGZ1bmN0aW9uIChpbnB1dCkge1xuICAgICAgICByZXR1cm4gJ96J3oonID09PSBpbnB1dDtcbiAgICB9LFxuICAgIG1lcmlkaWVtIDogZnVuY3Rpb24gKGhvdXIsIG1pbnV0ZSwgaXNMb3dlcikge1xuICAgICAgICBpZiAoaG91ciA8IDEyKSB7XG4gICAgICAgICAgICByZXR1cm4gJ96J3oYnO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICfeid6KJztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXkgOiAnW96J3qjeh96m3oveql0gTFQnLFxuICAgICAgICBuZXh0RGF5IDogJ1veid6n3ovept6J3qddIExUJyxcbiAgICAgICAgbmV4dFdlZWsgOiAnZGRkZCBMVCcsXG4gICAgICAgIGxhc3REYXkgOiAnW96H3qjeh96w3pTerF0gTFQnLFxuICAgICAgICBsYXN0V2VlayA6ICdb3orep96H3qjejN6q3ojeqF0gZGRkZCBMVCcsXG4gICAgICAgIHNhbWVFbHNlIDogJ0wnXG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6ICfejN6s3oPerd6O3qbeh96oICVzJyxcbiAgICAgICAgcGFzdCA6ICfeht6q3oPeqN6C3rAgJXMnLFxuICAgICAgICBzIDogJ96Q3qjeht6q3oLesN6M3qreht6u3oXerN6H3rAnLFxuICAgICAgICBtIDogJ96J3qjegt6o3pPerN6H3rAnLFxuICAgICAgICBtbSA6ICfeid6o3oLeqN6T3qogJWQnLFxuICAgICAgICBoIDogJ96O3qbekd6o3ofeqN6D3qzeh96wJyxcbiAgICAgICAgaG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yb3cgYXRdIExUJyxcbiAgICAgICAgbmV4dFdlZWsgOiAnZGRkZCBbYXRdIExUJyxcbiAgICAgICAgbGFzdERheSA6ICdbWWVzdGVyZGF5IGF0XSBMVCcsXG4gICAgICAgIGxhc3RXZWVrIDogJ1tMYXN0XSBkZGRkIFthdF0gTFQnLFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAnaW4gJXMnLFxuICAgICAgICBwYXN0IDogJyVzIGFnbycsXG4gICAgICAgIHMgOiAnYSBmZXcgc2Vjb25kcycsXG4gICAgICAgIG0gOiAnYSBtaW51dGUnLFxuICAgICAgICBtbSA6ICclZCBtaW51dGVzJyxcbiAgICAgICAgaCA6ICdhbiBob3VyJyxcbiAgICAgICAgaGggOiAnJWQgaG91cnMnLFxuICAgICAgICBkIDogJ2EgZGF5JyxcbiAgICAgICAgZGQgOiAnJWQgZGF5cycsXG4gICAgICAgIE0gOiAnYSBtb250aCcsXG4gICAgICAgIE1NIDogJyVkIG1vbnRocycsXG4gICAgICAgIHkgOiAnYSB5ZWFyJyxcbiAgICAgICAgeXkgOiAnJWQgeWVhcnMnXG4gICAgfSxcbiAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn0oc3R8bmR8cmR8dGgpLyxcbiAgICBvcmRpbmFsIDogZnVuY3Rpb24gKG51bWJlcikge1xuICAgICAgICB2YXIgYiA9IG51bWJlciAlIDEwLFxuICAgICAgICAgICAgb3V0cHV0ID0gKH5+KG51bWJlciAlIDEwMCAvIDEwKSA9PT0gMSkgPyAndGgnIDpcbiAgICAgICAgICAgIChiID09PSAxKSA/ICdzdCcgOlxuICAgICAgICAgICAgKGIgPT09IDIpID8gJ25kJyA6XG4gICAgICAgICAgICAoYiA9PT0gMykgPyAncmQnIDogJ3RoJztcbiAgICAgICAgcmV0dXJuIG51bWJlciArIG91dHB1dDtcbiAgICB9L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ICAgICAgICBmdXR1cmUgOiAnaW4gJXMnLFxuICAgICAgICBwYXN0IDogJyVzIGFnbycsXG4gICAgICAgIHMgOiAnYSBmZXcgc2Vjb25kcycsXG4gICAgICAgIG0gOiAnYSBtaW51dGUnLFxuICAgICAgICBtbSA6ICclZCBtaW51dGVzJyxcbiAgICAgICAgaCA6ICdhbiBob3VyJyxcbiAgICAgICAgaGggOiAnJWQgaG91cnMnLFxuICAgICAgICBkIDogJ2EgZGF5JyxcbiAgICAgICAgZGQgOiAnJWQgZGF5cycsXG4gICAgICAgIE0gOiAnYSBtb250aCcsXG4gICAgICAgIE1NIDogJyVkIG1vbnRocycsXG4gICAgICAgIHkgOiAnYSB5ZWFyJyxcbiAgICAgICAgeXkgOiAnJWQgeWVhcnMnXG4gICAgfSxcbiAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn0oc3R8bmR8cmR8dGgpLyxcbiAgICBvcmRpbmFsIDogZnVuY3Rpb24gKG51bWJlcikge1xuICAgICAgICB2YXIgYiA9IG51bWJlciAlIDEwLFxuICAgICAgICAgICAgb3V0cHV0ID0gKH5+KG51bWJlciAlIDEwMCAvIDEwKSA9PT0gMSkgPyAndGgnIDpcbiAgICAgICAgICAgIChiID09PSAxKSA/ICdzdCcgOlxuICAgICAgICAgICAgKGIgPT09IDIpID8gJ25kJyA6XG4gICAgICAgICAgICAoYiA9PT0gMykgPyAncmQnIDogJ3RoJztcbiAgICAgICAgcmV0dXJuIG51bWJlciArIG91dHB1dDtcbiAgICB9LFxuICAgIHdlZWsgOiB7XG4gICAgICAgIGRvdyA6IDEsIC8vIE1vbmRheSBpcyB0aGUgZmlyc3QgZGF5IG9mIHRoZSB3ZWVrLlxuICAgICAgICBkb3kgOiA0ICAvLyBUaGUgd2VlayB0aGF0IGNvbnRhaW5zIEphbiA0dGggaXMgdGhlIGZpcnN0IHdlZWsgb2YgdGhlIHllYXIuXG4gICAgfVxufSk7XG5cbnJldHVybiBlbk56O1xuX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OiAnJykgKyAnXSBMVCc7XG4gICAgICAgIH0sXG4gICAgICAgIG5leHREYXkgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gJ1ttYcOxYW5hIGEgbGEnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ3MnIDogJycpICsgJ10gTFQnO1xuICAgICAgICB9LFxuICAgICAgICBuZXh0V2VlayA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiAnZGRkZCBbYSBsYScgKyAoKHRoaXMuaG91cnMoKSAhPT0gMSkgPyAncycgOiAnJykgKyAnXSBMVCc7XG4gICAgICAgIH0sXG4gICAgICAgIGxhc3REYXkgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gJ1theWVyIGEgbGEnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ3MnIDogJycpICsgJ10gTFQnO1xuICAgICAgICB9LFxuICAgICAgICBsYXN0V2VlayA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiAnW2VsXSBkZGRkIFtwYXNhZG8gYSBsYScgKyAoKHRoaXMuaG91cnMoKSAhPT0gMSkgPyAncycgOiAnJykgKyAnXSBMVCc7XG4gICAgICAgIH0sXG4gICAgICAgIHNhbWVFbHNlIDogJ0wnXG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6ICdlbiAlcycsXG4gICAgICAgIHBhc3QgOiAnaGFjZSAlcycsXG4gICAgICAgIHMgOiAndW5vcyBzZWd1bmRvcycsXG4gICAgICAgIG0gOiAndW4gbWludXRvJyxcbiAgICAgICAgbW0gOiAnJWQgbWludXRvcycsXG4gICAgICAgIGggOiAndW5hIGhvcmEnLFxuICAgICAgICBoaCA6ICclZCBob3JhcycsXG4gICAgICAgIGQgOiAndW4gZMOtYScsXG4gICAgICAgIGRkIDogJyVkIGTDrWFzJyxcbiAgICAgICAgTSA6ICd1biB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biAgICAgICAgbGFzdERheSA6ICdb2K/bjNix2YjYsiDYs9in2LnYql0gTFQnLFxuICAgICAgICBsYXN0V2VlayA6ICdkZGRkIFvZvtuM2LRdIFvYs9in2LnYql0gTFQnLFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAn2K/YsSAlcycsXG4gICAgICAgIHBhc3QgOiAnJXMg2b7bjNi0JyxcbiAgICAgICAgcyA6ICfahtmG2K8g2KvYp9mG24zZhycsXG4gICAgICAgIG0gOiAn24zaqSDYr9mC24zZgtmHJyxcbiAgICAgICAgbW0gOiAnJWQg2K/ZgtuM2YLZhycsXG4gICAgICAgIGggOiAn24zaqSDYs9in2LnYqicsXG4gICAgICAgIGhoIDogJyVkINiz2KfYudiqJyxcbiAgICAgICAgZCA6ICfbjNqpINix2YjYsicsXG4gICAgICAgIGRkIDogJyVkINix2YjYsicsXG4gICAgICAgIE0gOiAn24zaqSDZhdin2YcnLFxuICAgICAgICBNTSA6ICclZCDZhdin2YcnLFxuICAgICAgICB5IDogJ9uM2qkg2LPYp9mEJyxcbiAgICAgICAgeXkgOiAnJWQg2LPYp9mEJ1xuICAgIH0sXG4gICAgcHJlcGFyc2U6IGZ1bmN0aW9uIChzdHJpbmcpIHtcbiAgICAgICAgcmV0dXJuIHN0cmluZy5yZXBsYWNlKC9b27At27ldL2csIGZ1bmN0aW9uIChtYXRjaCkge1xuICAgICAgICAgICAgcmV0dXJuIG51bWJlck1hcFttYXRjaF07XG4gICAgICAgIH0pLnJlcGxhY2UoL9iML2csICcsJyk7XG4gICAgfSxcbiAgICBwb3N0Zm9ybWF0OiBmdW5jdGlvbiAoc3RyaW5nKSB7XG4gICAgICAgIHJldHVybiBzdHJpbmcucmVwbGFjZSgvXFxkL2csIGZ1bmN0aW9uIChtYXRjaCkge1xuICAgICAgICAgICAgcmV0dXJuIHN5bWJvbE1hcFttYXRjaF07XG4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XMnLFxuICAgICAgICBNTSA6ICclZCBtb2lzJyxcbiAgICAgICAgeSA6ICd1biBhbicsXG4gICAgICAgIHl5IDogJyVkIGFucydcbiAgICB9LFxuICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2U6IC9cXGR7MSwyfShlcnxlKS8sXG4gICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIsIHBlcmlvZCkge1xuICAgICAgICBzd2l0Y2ggKHBlcmlvZCkge1xuICAgICAgICAgICAgLy8gV29yZHMgd2l0aCBtYXNjdWxpbmUgZ3JhbW1hdGljYWwgZ2VuZGVyOiBtb2lzLCB0cmltZXN0cmUsIGpvdXJcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICBjYXNlICdNJzpcbiAgICAgICAgICAgIGNhc2UgJ1EnOlxuICAgICAgICAgICAgY2FzZSAnRCc6XG4gICAgICAgICAgICBjYXNlICdEREQnOlxuICAgICAgICAgICAgY2FzZSAnZCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArIChudW1iZXIgPT09IDEgPyAnZXInIDogJ2UnKTtcblxuICAgICAgICAgICAgLy8gV29yZHMgd2l0aCBmZW1pbmluZSBncmFtbWF0aWNhbCBnZW5kZXI6IHNlbWFpbmVcbiAgICAgICAgICAgIGNhc2UgJ3cnOlxuICAgICAgICAgICAgY2FzZSAnVyc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArIChudW1iZXIgPT09IDEgPyAncmUnIDogJ2UnKTtcbiAgICAgICAgfVxuICAgIH0sXG4gICAgd2VlayA6IHtcbiAgICAgICAgZG93IDogMSwgLy8gTW9uZGF5IGlzIHRoZSBmaXJzdCBkYXkgb2YgdGhlIHdlZWsuXG4gICAgICAgIGRveSA6IDQgIC8vIFRoZSB3ZWVrIHRoYXQgY29udGFpbnMgSmFuIDR0aCBpcyB0aGUgZmlyc3Qgd2VlayBvZiB0aGUgeWVhci5cbiAgICB9XG59KTtcblxucmV0dXJuI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iAnaWwgeSBhICVzJyxcbiAgICAgICAgcyA6ICdxdWVscXVlcyBzZWNvbmRlcycsXG4gICAgICAgIG0gOiAndW5lIG1pbnV0ZScsXG4gICAgICAgIG1tIDogJyVkIG1pbnV0ZXMnLFxuICAgICAgICBoIDogJ3VuZSBoZXVyZScsXG4gICAgICAgIGhoIDogJyVkIGhldXJlcycsXG4gICAgICAgIGQgOiAndW4gam91cicsXG4gICAgICAgIGRkIDogJyVkIGpvdXJzJyxcbiAgICAgICAgTSA6ICd1biBtb2lzJyxcbiAgICAgICAgTU0gOiAnJWQgbW9pcycsXG4gICAgICAgIHkgOiAndW4gYW4nLFxuICAgICAgICB5eSA6ICclZCBhbnMnXG4gICAgfSxcbiAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn0oZXJ8KS8sXG4gICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIsIHBlcmlvZCkge1xuICAgICAgICBzd2l0Y2ggKHBlcmlvZCkge1xuICAgICAgICAgICAgLy8gVE9ETzogUmV0dXJuICdlJyB3aGVuIGRheSBvZiBtb250aCA+IDEuIE1vdmUgdGhpcyBjYXNlIGluc2lkZVxuICAgICAgICAgICAgLy8gYmxvY2sgZm9yIG1hc2N1bGluZSB3b3JkcyBiZWxvdy5cbiAgICAgICAgICAgIC8vIFNlZSBodHRwczovL2dpdGh1Yi5jb20vbW9tZW50L21vbWVudC9pc3N1ZXMvMzM3NVxuICAgICAgICAgICAgY2FzZSAnRCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArIChudW1iZXIgPT09IDEgPyAnZXInIDogJycpO1xuXG4gICAgICAgICAgICAvLyBXb3JkcyB3aXRoIG1hc2N1bGluZSBncmFtbWF0aWNhbCBnZW5kZXI6IG1vaXMsIHRyaW1lc3RyZSwgam91clxuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIGNhc2UgJ00nOlxuICAgICAgICAgICAgY2FzZSAnUSc6XG4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VrIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuICdkZGRkIFsnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ8OhcycgOiAnYScpICsgJ10gTFQnO1xuICAgICAgICB9LFxuICAgICAgICBsYXN0RGF5IDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuICdbb250ZSAnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ8OhJyA6ICdhJykgKyAnXSBMVCc7XG4gICAgICAgIH0sXG4gICAgICAgIGxhc3RXZWVrIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuICdbb10gZGRkZCBbcGFzYWRvICcgKyAoKHRoaXMuaG91cnMoKSAhPT0gMSkgPyAnw6FzJyA6ICdhJykgKyAnXSBMVCc7XG4gICAgICAgIH0sXG4gICAgICAgIHNhbWVFbHNlIDogJ0wnXG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6IGZ1bmN0aW9uIChzdHIpIHtcbiAgICAgICAgICAgIGlmIChzdHIuaW5kZXhPZigndW4nKSA9PT0gMCkge1xuICAgICAgICAgICAgICAgIHJldHVybiAnbicgKyBzdHI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gJ2VuICcgKyBzdHI7XG4gICAgICAgIH0sXG4gICAgICAgIHBhc3QgOiAnaGFpICVzJyxcbiAgICAgICAgcyA6ICd1bnMgc2VndW5kb3MnLFxuICAgICAgICBtIDogJ3VuIG1pbnV0bycsXG4gICAgICAgIG1tIDogJyVkIG1pbnV0b3MnLFxuICAgICAgICBoIDogJ3VuaGEgaG9yYScsXG4gICAgICAgIGhoIDogJyVkIGhvcmFzJyxcbiAgICAgICAgZCA6ICd1biBkw61hJyxcbiAgICAgICAgZGQgOiAnJWQgZMOtYXMnLFxuICAgICAgICBNIDogJ3VuIG1lcycsXG4gICAgICAgIE1NIDogJyVkIG1lc2Vz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21lbnQnXSwgZmFjdG9yeSkgOlxuICAgZmFjdG9yeShnbG9iYWwubW9tZW50KVxufSh0aGlzLCAoZnVuY3Rpb24gKG1vbWVudCkgeyAndXNlIHN0cmljdCc7XG5cblxuZnVuY3Rpb24gcHJvY2Vzc1JlbGF0aXZlVGltZShudW1iZXIsIHdpdGhvdXRTdWZmaXgsIGtleSwgaXNGdXR1cmUpIHtcbiAgICB2YXIgZm9ybWF0ID0ge1xuICAgICAgICAncyc6IFsndGhvZGRlIHNlY29uZGFuaW0nLCAndGhvZGRlIHNlY29uZCddLFxuICAgICAgICAnbSc6IFsnZWthIG1pbnRhbicsICdlayBtaW51dGUnXSxcbiAgICAgICAgJ21tJzogW251bWJlciArICcgbWludGFuaW0nLCBudW1iZXIgKyAnIG1pbnRhbSddLFxuICAgICAgICAnaCc6IFsnZWthIGhvcmFuJywgJ2VrIGhvciddLFxuICAgICAgICAnaGgnOiBbbnVtYmVyICsgJyBob3JhbmltJywgbnVtYmVyICsgJyBob3InXSxcbiAgICAgICAgJ2QnOiBbJ2VrYSBkaXNhbicsICdlayBkaXMnXSxcbiAgICAgICAgJ2RkJzogW251bWJlciArICcgZGlzYW5pbScsIG51bWJlciArICcgZGlzJ10sXG4gICAgICAgICdNJzogWydla2EgbWhvaW5lYW4nLCAnZWsgbWhvaW5vJ10sXG4gICAgICAgICdNTSc6IFtudW1iZXIgKyAnIG1ob2luZWFuaW0nLCBudW1iZXIgKyAnIG1ob2luZSddLFxuICAgICAgICAneSc6IFsnZWthIHZvcnNhbicsICdlayB2b3JvcyddLFxuICAgICAgICAneXknOiBbbnVtYmVyICsgJyB2b3JzYW5pbScsIG51bWJlciArICcgdm9yc2FtJ11cbiAgICB9O1xuICAgIHJldHVybiB3aXRob3V0U3VmZml4ID8gZm9ybWF0W2tleV1bMF0gOiBmb3JtYXRba2V5XVsxXTtcbn1cblxudmFyIGdvbUxhdG4gPSBtb21lbnQuZGVmaW5lTG9jYWxlKCdnb20tbGF0bicsIHtcbi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gbW9udGhcbiAgICAgICAgICAgIGNhc2UgJ0QnOlxuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnZXInO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIGNhc2UgJ00nOlxuICAgICAgICAgICAgY2FzZSAnUSc6XG4gICAgICAgICAgICBjYXNlICdEREQnOlxuICAgICAgICAgICAgY2FzZSAnZCc6XG4gICAgICAgICAgICBjYXNlICd3JzpcbiAgICAgICAgICAgIGNhc2UgJ1cnOlxuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXI7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIHdlZWsgOiB7XG4gICAgICAgIGRvdyA6IDEsIC8vIE1vbmRheSBpcyB0aGUgZmlyc3QgZGF5IG9mIHRoZSB3ZWVrLlxuICAgICAgICBkb3kgOiA0ICAvLyBUaGUgd2VlayB0aGF0IGNvbnRhaW5zIEphbiA0dGggaXMgdGhlIGZpcnN0IHdlZWsgb2YgdGhlIHllYXIuXG4gICAgfSxcbiAgICBtZXJpZGllbVBhcnNlOiAvcmF0aXxzb2thbGxpfGRvbnBhcmFtfHNhbmplLyxcbiAgICBtZXJpZGllbUhvdXIgOiBmdW5jdGlvbiAoaG91ciwgbWVyaWRpZW0pIHtcbiAgICAgICAgaWYgKGhvdXIgPT09IDEyKSB7XG4gICAgICAgICAgICBob3VyID0gMDtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVyaWRpZW0gPT09ICdyYXRpJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXIgPCA0ID8gaG91ciA6IGhvdXIgKyAxMjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ3Nva2FsbGknKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91cjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ2RvbnBhcmFtJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXIgPiAxMiA/IGhvdXIgOiBob3V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gICAgIG1tIDogJyVkINeT16fXldeqJyxcbiAgICAgICAgaCA6ICfXqdei15QnLFxuICAgICAgICBoaCA6IGZ1bmN0aW9uIChudW1iZXIpIHtcbiAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gJ9ep16LXqteZ15nXnSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJyDXqdei15XXqic7XG4gICAgICAgIH0sXG4gICAgICAgIGQgOiAn15nXldedJyxcbiAgICAgICAgZGQgOiBmdW5jdGlvbiAobnVtYmVyKSB7XG4gICAgICAgICAgICBpZiAobnVtYmVyID09PSAyKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICfXmdeV157XmdeZ150nO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICcg15nXnteZ150nO1xuICAgICAgICB9LFxuICAgICAgICBNIDogJ9eX15XXk9epJyxcbiAgICAgICAgTU0gOiBmdW5jdGlvbiAobnVtYmVyKSB7XG4gICAgICAgICAgICBpZiAobnVtYmVyID09PSAyKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICfXl9eV15PXqdeZ15nXnSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJyDXl9eV15PXqdeZ150nO1xuICAgICAgICB9LFxuICAgICAgICB5IDogJ9ep16DXlCcsXG4gICAgICAgIHl5IDogZnVuY3Rpb24gKG51bWJlcikge1xuICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMikge1xuICAgICAgICAgICAgICAgIHJldHVybiAn16nXoNeq15nXmdedJztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyICUgMTAgPT09IDAgJiYgbnVtYmVyICE9PSAxMCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnINep16DXlCc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJyDXqdeg15nXnSc7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIG1lcmlkaWVtUGFyc2U6IC/XkNeX15RcItemfNec16TXoNeUXCLXpnzXkNeX16jXmSDXlNem15TXqNeZ15nXnXzXnNek16DXmSDXlNem15TXqNeZ15nXnXzXnNek16DXldeqINeR15XXp9eofNeR15HXlden16h815HXoteo15EvaSxcbiAgICBpc1BNIDogZnVuY3Rpb24gKGlucHV0KSB7XG4gICAgICAgIHJldHVybiAvXijXkNeX15RcItemfNeQ15fXqNeZINeU16bXlNeo15nXmdedfNeR16LXqNeRKSQvLnRlc3QoaW5wdXQpO1xuICAgIH0sXG4gICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG4gICAgICAgIGlmIChob3VyIDwgNSkge1xuICAgICAgICAgICAgcmV0dXJuICfXnNek16DXldeqINeR15XXp9eoJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTApIHtcbiAgICAgICAgICAgIHJldHVybiAn15HXkdeV16fXqCc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDEyKSB7XG4gICAgICAgICAgICByZXR1cm4gaXNMb3dlciA/ICfXnNek16DXlFwi16YnIDogJ9ec16TXoNeZINeU16bXlNeo15nXmdedJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTgpIHtcbiAgICAgICAgICAgIHJldHVybiBpc0xvd2VyID8gJ9eQ15fXlFwi16YnIDogJ9eQ15fXqNeZINeU16bXlNeo15nXmdedJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAn15HXoteo15EnO1xuICAgICAgICB9XG4gICAgfVxufSk7XG5cbnJldHVybiBoZTtcblxufSkpKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vfi9tb21lbnQvbG9jYWxlL2hlLmpzXG4vLyBtb2R1b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gKGhvdXIgPT09IDEyKSB7XG4gICAgICAgICAgICBob3VyID0gMDtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVyaWRpZW0gPT09ICfgpLDgpL7gpKQnKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciA8IDQgPyBob3VyIDogaG91ciArIDEyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4KS44KWB4KSs4KS5Jykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfgpKbgpYvgpKrgpLngpLAnKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciA+PSAxMCA/IGhvdXIgOiBob3VyICsgMTI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfgpLbgpL7gpK4nKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcbiAgICAgICAgaWYgKGhvdXIgPCA0KSB7XG4gICAgICAgICAgICByZXR1cm4gJ+CksOCkvuCkpCc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDEwKSB7XG4gICAgICAgICAgICByZXR1cm4gJ+CkuOClgeCkrOCkuSc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDE3KSB7XG4gICAgICAgICAgICByZXR1cm4gJ+CkpuCli+CkquCkueCksCc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDIwKSB7XG4gICAgICAgICAgICByZXR1cm4gJ+CktuCkvuCkric7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gJ+CksOCkvuCkpCc7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIHdlZWsgOiB7XG4gICAgICAgIGRvdyA6IDAsIC8vIFN1bmRheSBpcyB0aGUg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aCAoa2V5KSB7XG4gICAgICAgIGNhc2UgJ20nOlxuICAgICAgICAgICAgcmV0dXJuIHdpdGhvdXRTdWZmaXggPyAnamVkbmEgbWludXRhJyA6ICdqZWRuZSBtaW51dGUnO1xuICAgICAgICBjYXNlICdtbSc6XG4gICAgICAgICAgICBpZiAobnVtYmVyID09PSAxKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtaW51dGEnO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChudW1iZXIgPT09IDIgfHwgbnVtYmVyID09PSAzIHx8IG51bWJlciA9PT0gNCkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnbWludXRlJztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtaW51dGEnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgY2FzZSAnaCc6XG4gICAgICAgICAgICByZXR1cm4gd2l0aG91dFN1ZmZpeCA/ICdqZWRhbiBzYXQnIDogJ2plZG5vZyBzYXRhJztcbiAgICAgICAgY2FzZSAnaGgnOlxuICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnc2F0JztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyID09PSAyIHx8IG51bWJlciA9PT0gMyB8fCBudW1iZXIgPT09IDQpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ3NhdGEnO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ3NhdGknO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgY2FzZSAnZGQnOlxuICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnZGFuJztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdkYW5hJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIGNhc2UgJ01NJzpcbiAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ21qZXNlYyc7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMiB8fCBudW1iZXIgPT09IDMgfHwgbnVtYmVyID09PSA0KSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtamVzZWNhJztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtamVzZWNpJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIGNhc2UgJ3l5JzpcbiAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ2dvZGluYSc7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMiB8fCBudW1iZXIgPT09IDMgfHwgbnVtYmVyID09PSA0KSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdnb2RpbmUnO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ2dvZGluYSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cbn1cblxudmFyIGhyID0gbW9tZW50LmRlZmluZUxvY2FsZSgnaHInLCB7XG4gICAgbW9udGhzIDoge1xuICAgICAgICBmb3JtYXQ6ICdzaWplxI1uamFfdmVsamHEjWVfb8W+dWprYV90cmF2bmphX3N2aWJuamFfbGlwbmphX3NycG5qYV9rb2xvdm96YV9ydWpuYV9saXN0b3BhZGFfc3R1ZGVub2dh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ogJ1tzdXRyYSB1XSBMVCcsXG4gICAgICAgIG5leHRXZWVrIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBbbmVkamVsanVdIFt1XSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBbc3JpamVkdV0gW3VdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIFtzdWJvdHVdIFt1XSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBkZGRkIFt1XSBMVCc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGxhc3REYXkgIDogJ1tqdcSNZXIgdV0gTFQnLFxuICAgICAgICBsYXN0V2VlayA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3Byb8WhbHVdIGRkZGQgW3VdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3Byb8WhbGVdIFtzdWJvdGVdIFt1XSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgY2FzZSA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aB1aXWgNWl1a/VvtWhfNWl1oDVpdWv1bjVtdWh1bYpJC8udGVzdChpbnB1dCk7XG4gICAgfSxcbiAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyKSB7XG4gICAgICAgIGlmIChob3VyIDwgNCkge1xuICAgICAgICAgICAgcmV0dXJuICfVo9Wr1bfVpdaA1b7VoSc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDEyKSB7XG4gICAgICAgICAgICByZXR1cm4gJ9Wh1bzVodW+1bjVv9W+1aEnO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxNykge1xuICAgICAgICAgICAgcmV0dXJuICfWgdWl1oDVpdWv1b7VoSc7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gJ9Wl1oDVpdWv1bjVtdWh1bYnO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn18XFxkezEsMn0tKNWr1bZ81oDVpCkvLFxuICAgIG9yZGluYWw6IGZ1bmN0aW9uIChudW1iZXIsIHBlcmlvZCkge1xuICAgICAgICBzd2l0Y2ggKHBlcmlvZCkge1xuICAgICAgICAgICAgY2FzZSAnREREJzpcbiAgICAgICAgICAgIGNhc2UgJ3cnOlxuICAgICAgICAgICAgY2FzZSAnVyc6XG4gICAgICAgICAgICBjYXNlICdERERvJzpcbiAgICAgICAgICAgICAgICBpZiAobnVtYmVyID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnLdWr1bYnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3WgNWkJztcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlcjtcbiAgICAgICAgfVxuICAgIH0sXG4gICAgd2VlayA6IHtcbiAgICAgICAgZG93IDogMSwgLy8gTW9u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ob3VyID0gMDtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVyaWRpZW0gPT09ICdwYWdpJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICdzaWFuZycpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyID49IDExID8gaG91ciA6IGhvdXIgKyAxMjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ3NvcmUnIHx8IG1lcmlkaWVtID09PSAnbWFsYW0nKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VycywgbWludXRlcywgaXNMb3dlcikge1xuICAgICAgICBpZiAoaG91cnMgPCAxMSkge1xuICAgICAgICAgICAgcmV0dXJuICdwYWdpJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VycyA8IDE1KSB7XG4gICAgICAgICAgICByZXR1cm4gJ3NpYW5nJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VycyA8IDE5KSB7XG4gICAgICAgICAgICByZXR1cm4gJ3NvcmUnO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICdtYWxhbSc7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIGNhbGVuZGFyIDoge1xuICAgICAgICBzYW1lRGF5IDogJ1tIYXJpIGluaSBwdWt1bF0gTFQnLFxuICAgICAgICBuZXh0RGF5IDogJ1tCZXNvayBwdWt1bF0gTFQnLFxuICAgICAgICBuZXh0V2VlayA6ICdkZGRkIFtwdWt1bF0gTFQnLFxuICAgICAgICBsYXN0RGF5IDogJ1tLZW1hcmluIHB1a3VsXSBMVCcsXG4gICAgICAgIGxhc3RXZWVrIDogJ2RkZGQgW2xhbHUgcHVrdWxdIExUJyxcbiAgICAgICAgc2FtZUVsc2UgOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aX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1bHQgKyAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdtw61uw7p0dXInIDogJ23DrW7DunR1bScpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh3aXRob3V0U3VmZml4KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdtw61uw7p0YSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ23DrW7DunR1JztcbiAgICAgICAgY2FzZSAnaGgnOlxuICAgICAgICAgICAgaWYgKHBsdXJhbChudW1iZXIpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ2tsdWtrdXN0dW5kaXInIDogJ2tsdWtrdXN0dW5kdW0nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAna2x1a2t1c3R1bmQnO1xuICAgICAgICBjYXNlICdkJzpcbiAgICAgICAgICAgIGlmICh3aXRob3V0U3VmZml4KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICdkYWd1cic7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gaXNGdXR1cmUgPyAnZGFnJyA6ICdkZWdpJztcbiAgICAgICAgY2FzZSAnZGQnOlxuICAgICAgICAgICAgaWYgKHBsdXJhbChudW1iZXIpKSB7XG4gICAgICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdkYWdhcic7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAoaXNGdXR1cmUgPyAnZGFnYScgOiAnZMO2Z3VtJyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHdpdGhvdXRTdWZmaXgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ2RhZ3VyJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAoaXNGdXR1cmUgPyAnZGFnJyA6ICdkZWdpJyk7XG4gICAgICAgIGNhc2UgJ00nOlxuICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gJ23DoW51w7B1cic7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gaXNGdXR1cmUgPyAnbcOhbnXDsCcgOiAnbcOhbnXDsGknO1xuICAgICAgICBjYXNlICdNTSc6XG4gICAgICAgICAgICBpZiAocGx1cmFsKG51bWJlcikpIHtcbiAgICAgICAgICAgICAgICBpZiAod2l0aG91dFN1ZmZpeCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ23DoW51w7Bpcic7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAoaXNGdXR1cmUgPyAnbcOhbnXDsGknIDogJ23DoW51w7B1bScpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh3aXRob3V0U3VmZml4KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdtw6FudcOwdXInO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArIChpc0Z1dHVyZSA/ICdtw6FudcOwJyA6ICdtw6FudcOwaScpO1xuICAgICAgICBjYXNlICd5JzpcbiAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ8OhcicgOiAnw6FyaSc7XG4gICAgICAgIGNhc2UgJ3l5JzpcbiAgICAgICAgICAgIGlmIChwbHVyYWwobnVtYmVyKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICfDoXInIDogJ8OhcnVtJyk7XG4gICAgICAgICAgIC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b6MJztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXkgOiAnW+S7iuaXpV0gTFQnLFxuICAgICAgICBuZXh0RGF5IDogJ1vmmI7ml6VdIExUJyxcbiAgICAgICAgbmV4dFdlZWsgOiAnW+adpemAsV1kZGRkIExUJyxcbiAgICAgICAgbGFzdERheSA6ICdb5pio5pelXSBMVCcsXG4gICAgICAgIGxhc3RXZWVrIDogJ1vliY3pgLFdZGRkZCBMVCcsXG4gICAgICAgIHNhbWVFbHNlIDogJ0wnXG4gICAgfSxcbiAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlIDogL1xcZHsxLDJ95pelLyxcbiAgICBvcmRpbmFsIDogZnVuY3Rpb24gKG51bWJlciwgcGVyaW9kKSB7XG4gICAgICAgIHN3aXRjaCAocGVyaW9kKSB7XG4gICAgICAgICAgICBjYXNlICdkJzpcbiAgICAgICAgICAgIGNhc2UgJ0QnOlxuICAgICAgICAgICAgY2FzZSAnREREJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJ+aXpSc7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXI7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJyVz5b6MJyxcbiAgICAgICAgcGFzdCA6ICclc+WJjScsXG4gICAgICAgIHMgOiAn5pWw56eSJyxcbiAgICAgICAgbSA6ICcx5YiGJyxcbiAgICAgICAgbW0gOiAnJWTliIYnLFxuICAgICAgICBoIDogJzHmmYLplpMnLFxuICAgICAgICBoaCA6ICclZOaZgumWkycsXG4gICAgICAgIGQgOiAnMeaXpScsXG4gICAgICAgIGRkIDogJyVk5pelJyxcbiAgICAgICAgTSA6ICcx44O25pyIJyxcbiAgICAgICAgTU0gOiAnJWTjg7bmnIgnLFxuICAgICAgICB5IDogJzHlubQ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DExID8gaG91ciA6IGhvdXIgKyAxMjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ3NvbnRlbicgfHwgbWVyaWRpZW0gPT09ICduZGFsdScpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyICsgMTI7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIG1lcmlkaWVtIDogZnVuY3Rpb24gKGhvdXJzLCBtaW51dGVzLCBpc0xvd2VyKSB7XG4gICAgICAgIGlmIChob3VycyA8IDExKSB7XG4gICAgICAgICAgICByZXR1cm4gJ2VuamluZyc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG91cnMgPCAxNSkge1xuICAgICAgICAgICAgcmV0dXJuICdzaXlhbmcnO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXJzIDwgMTkpIHtcbiAgICAgICAgICAgIHJldHVybiAnc29udGVuJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAnbmRhbHUnO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBjYWxlbmRhciA6IHtcbiAgICAgICAgc2FtZURheSA6ICdbRGludGVuIHB1bmlrbyBwdWt1bF0gTFQnLFxuICAgICAgICBuZXh0RGF5IDogJ1tNYmVuamFuZyBwdWt1bF0gTFQnLFxuICAgICAgICBuZXh0V2VlayA6ICdkZGRkIFtwdWt1bF0gTFQnLFxuICAgICAgICBsYXN0RGF5IDogJ1tLYWxhIHdpbmdpIHB1a3VsXSBMVCcsXG4gICAgICAgIGxhc3RXZWVrIDogJ2RkZGQgW2tlcGVuZ2tlciBwdWt1bF0gTFQnLFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAnd29udGVuIGluZyAlcycsXG4gICAgICAgIHBhc3QgOiAnJXMgaW5na2FuZyBrZXBlbmdrZXInLFxuICAgICAgICBzIDogJ3Nhd2V0YXdpcyBkZXRpaycsXG4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ICAgICB5IDogJ+GDrOGDlOGDmuGDmCcsXG4gICAgICAgIHl5IDogJyVkIOGDrOGDlOGDmuGDmCdcbiAgICB9LFxuICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2U6IC8wfDEt4YOa4YOYfOGDm+GDlC1cXGR7MSwyfXxcXGR7MSwyfS3hg5QvLFxuICAgIG9yZGluYWwgOiBmdW5jdGlvbiAobnVtYmVyKSB7XG4gICAgICAgIGlmIChudW1iZXIgPT09IDApIHtcbiAgICAgICAgICAgIHJldHVybiBudW1iZXI7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct4YOa4YOYJztcbiAgICAgICAgfVxuICAgICAgICBpZiAoKG51bWJlciA8IDIwKSB8fCAobnVtYmVyIDw9IDEwMCAmJiAobnVtYmVyICUgMjAgPT09IDApKSB8fCAobnVtYmVyICUgMTAwID09PSAwKSkge1xuICAgICAgICAgICAgcmV0dXJuICfhg5vhg5QtJyArIG51bWJlcjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3hg5QnO1xuICAgIH0sXG4gICAgd2VlayA6IHtcbiAgICAgICAgZG93IDogMSxcbiAgICAgICAgZG95IDogN1xuICAgIH1cbn0pO1xuXG5yZXR1cm4ga2E7XG5cbn0pKSk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL34vbW9tZW50L2xvY2FsZS9rYS5qc1xuLy8gbW9kdWxlIGlkID0gNjRcbi8vIG1vZHVsZSBjaHVua3MgPSAwIiwiLy8hIG1vbWVudC5qcyBsb2NhbGUgY29uZmlndXJhdGlvblxuLy8hIGxvY2FsZSA6IEthemFraCBba2tdXG4vLyEgYXV0aG9ycyA6IE51cmxhbiBSYWtoaW16aGFub3YgOiBodHRwczovL2dpdGh1Yi5jb20vbnVybGFuXG5cbjsoZnVuY3Rpb24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Km4LOBIOCyl+CyguCyn+CzhicsXG4gICAgICAgIGhoIDogJyVkIOCyl+CyguCyn+CzhicsXG4gICAgICAgIGQgOiAn4LKS4LKC4LKm4LOBIOCypuCyv+CyqCcsXG4gICAgICAgIGRkIDogJyVkIOCypuCyv+CyqCcsXG4gICAgICAgIE0gOiAn4LKS4LKC4LKm4LOBIOCypOCyv+CyguCyl+Cys+CzgScsXG4gICAgICAgIE1NIDogJyVkIOCypOCyv+CyguCyl+Cys+CzgScsXG4gICAgICAgIHkgOiAn4LKS4LKC4LKm4LOBIOCyteCysOCzjeCytycsXG4gICAgICAgIHl5IDogJyVkIOCyteCysOCzjeCytydcbiAgICB9LFxuICAgIHByZXBhcnNlOiBmdW5jdGlvbiAoc3RyaW5nKSB7XG4gICAgICAgIHJldHVybiBzdHJpbmcucmVwbGFjZSgvW+Czp+CzqOCzqeCzquCzq+CzrOCzreCzruCzr+Czpl0vZywgZnVuY3Rpb24gKG1hdGNoKSB7XG4gICAgICAgICAgICByZXR1cm4gbnVtYmVyTWFwW21hdGNoXTtcbiAgICAgICAgfSk7XG4gICAgfSxcbiAgICBwb3N0Zm9ybWF0OiBmdW5jdGlvbiAoc3RyaW5nKSB7XG4gICAgICAgIHJldHVybiBzdHJpbmcucmVwbGFjZSgvXFxkL2csIGZ1bmN0aW9uIChtYXRjaCkge1xuICAgICAgICAgICAgcmV0dXJuIHN5bWJvbE1hcFttYXRjaF07XG4gICAgICAgIH0pO1xuICAgIH0sXG4gICAgbWVyaWRpZW1QYXJzZTogL+CysOCyvuCypOCzjeCysOCyv3zgsqzgs4bgsrPgsr/gspfgs43gspfgs4Z84LKu4LKn4LON4LKv4LK+4LK54LON4LKofOCyuOCyguCynOCzhi8sXG4gICAgbWVyaWRpZW1Ib3VyIDogZnVuY3Rpb24gKGhvdXIsIG1lcmlkaWVtKSB7XG4gICAgICAgIGlmIChob3VyID09PSAxMikge1xuICAgICAgICAgICAgaG91ciA9IDA7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lcmlkaWVtID09PSAn4LKw4LK+4LKk4LON4LKw4LK/Jykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXIgPCA0ID8gaG91ciA6IGhvdXIgKyAxMjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+CyrOCzhuCys+Cyv+Cyl+CzjeCyl+CzhicpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4LKu4LKn4LON4LKv4LK+4LK54LON4LKoJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXIgPj0gMTAgPyBob3VyIDogaG91ciArIDEyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4LK44LKC4LKc4LOGJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXIgKyAxMjtcbiAgICAgICAgfVxuICAgIH0sXG4gICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG4gICAgICAgIGlmIChob3VyIDwgNCkge1xuICAgICAgICAgICAgcmV0dXJuICfgsrDgsr7gsqTgs43gsrDgsr8nO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxMCkge1xuICAgICAgICAgICAgcmV0dXJuICfgsqzgs4bgsrPgsr/gspfgs43gspfgs4YnO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxNykge1xuICAgICAgICAgICAgcmV0dXJuICfgsq7gsqfgs43gsq/gsr7gsrngs43gsqgnO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAyMCkge1xuICAgICAgICAgICAgcmV0dXJuICfgsrjgsoLgspzgs4YnO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICfgsrDgsr7gsqTgs43gsrDgsr8nO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAv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AgIGNhbGVuZGFyOiB7XG4gICAgICAgIHNhbWVEYXk6ICdbZGFuYXMgdV0gTFQnLFxuICAgICAgICBuZXh0RGF5OiAnW3NqdXRyYSB1XSBMVCcsXG5cbiAgICAgICAgbmV4dFdlZWs6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gW25lZGplbGp1XSBbdV0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gW3NyaWplZHVdIFt1XSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBbc3Vib3R1XSBbdV0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gZGRkZCBbdV0gTFQnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBsYXN0RGF5ICA6ICdbanXEjWUgdV0gTFQnLFxuICAgICAgICBsYXN0V2VlayA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBsYXN0V2Vla0RheXMgPSBbXG4gICAgICAgICAgICAgICAgJ1twcm/FoWxlXSBbbmVkamVsamVdIFt1XSBMVCcsXG4gICAgICAgICAgICAgICAgJ1twcm/FoWxvZ10gW3BvbmVkamVsamthXSBbdV0gTFQnLFxuICAgICAgICAgICAgICAgICdbcHJvxaFsb2ddIFt1dG9ya2FdIFt1XSBMVCcsXG4gICAgICAgICAgICAgICAgJ1twcm/FoWxlXSBbc3JpamVkZV0gW3VdIExUJyxcbiAgICAgICAgICAgICAgICAnW3Byb8WhbG9nXSBbxI1ldHZydGthXSBbdV0gTFQnLFxuICAgICAgICAgICAgICAgICdbcHJvxaFsb2ddIFtwZXRrYV0gW3VdIExUJyxcbiAgICAgICAgICAgICAgICAnW3Byb8WhbGVdIFtzdWJvdGVdIFt1XSBMVCdcbiAgICAgICAgICAgIF07XG4gICAgICAgICAgICByZXR1cm4gbGFzdFdlZWtEYXlzW3RoaXMuZGF5KCldO1xuICAgICAgICB9LFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAnemEgJXMnLFxuICAgICAgICBwYXN0ICAgOiAncHJpamUgJXMnLFxuICAgICAgICBzICAgICAgOiAnbmVrb2xpa28gc2VrdW5kaScsXG4gICAgICAgIG0gICAgICA6IHRyYW5zbGF0b3IudHJhbnNsYXRlLFxuICAgICAgICBtbSAgICAgOiB0cmFuc2xhdG9yLnRyYW5zbGF0ZSxcbiAgICAgICAgaCAgICAgIDogdHJhbnNsYXRvci50cmFuc2xhdGUsXG4gICAgICAgIGhoICAgICA6IHRyYW5zbGF0b3IudHJhbnNsYXRlLFxuICAgICAgICBkICAgICAgOiAnZGFuJyxcbiAgICAgICAgZGQgICAgIDogdHJhbnNsYXRvci50cmFuc2xhdGUsXG4gICAgICAgIE0gICAgICA6ICdtamVzZWMnLFxuICAgICAgICBNTSAgICAgOiB0cmFuc2xhdG9yLnRyYW5zbGF0ZSxcbiAgICAgICAgeSAgICAgIDogJ2dvZGludScsXG4gICAgICAgIHl5ICAgICA6IHRyYW5zbGF0b3IudHJhbnNsYXRlXG4gICAgfSxcbiAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn1cXC4vLFxuICAgIG9yZGluYWwgOiAnJWQuJyxcbiAgICB3ZWVrIDoge1xuICAgICAgICBkb3cgOiAxLCAvLyBNb25kYXkgaXMgdGhlIGZpcnN0IGRheSBv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SDQstC+XSBMVCcsXG4gICAgICAgIG5leHRXZWVrIDogJ1vQktC+XSBkZGRkIFvQstC+XSBMVCcsXG4gICAgICAgIGxhc3REYXkgOiAnW9CS0YfQtdGA0LAg0LLQvl0gTFQnLFxuICAgICAgICBsYXN0V2VlayA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQmNC30LzQuNC90LDRgtCw0YLQsF0gZGRkZCBb0LLQvl0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0JjQt9C80LjQvdCw0YLQuNC+0YJdIGRkZGQgW9Cy0L5dIExUJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2FtZUVsc2UgOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJ9C/0L7RgdC70LUgJXMnLFxuICAgICAgICBwYXN0IDogJ9C/0YDQtdC0ICVzJyxcbiAgICAgICAgcyA6ICfQvdC10LrQvtC70LrRgyDRgdC10LrRg9C90LTQuCcsXG4gICAgICAgIG0gOiAn0LzQuNC90YPRgtCwJyxcbiAgICAgICAgbW0gOiAnJWQg0LzQuNC90YPRgtC4JyxcbiAgICAgICAgaCA6ICfRh9Cw0YEnLFxuICAgICAgICBoaCA6ICclZCDRh9Cw0YHQsCcsXG4gICAgICAgIGQgOiAn0LTQtdC9JyxcbiAgICAgICAgZGQgOiAnJWQg0LTQtdC90LAnLFxuICAgICAgICBNIDogJ9C80LXRgdC10YYnLFxuICAgICAgICBNTSA6ICclZCDQvNC10YHQtdGG0LgnLFxuICAgICAgICB5IDogJ9Cz0L7QtNC40L3QsCcsXG4gICAgICAgIHl5IDogJyVkINCz0L7QtNC40L3QuCdcbiAgICB9LFxuICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2U6IC9cXGR7MSwyfS0o0LXQsnzQtdC9fNGC0Lh80LLQuHzRgNC4fNC80LgpLyxcbiAgICBvcmRpbmFsIDogZnVuY3Rpb24gKG51bWJlcikge1xuICAgICAgICB2YXIgbGFzdERpZ2l0ID0gbnVtYmVyICUgMTAsXG4gICAgICAgICAgICBsYXN0MkRpZ2l0cyA9IG51bWJlciAlIDEwMDtcbiAgICAgICAgaWYgKG51bWJlciA9PT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0LXQsic7XG4gICAgICAgIH0gZWxzZSBpZiAobGFzdDJEaWdpdHMgPT09IDApIHtcbiAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnLdC10L0nO1xuICAgICAgICB9IGVsc2UgaWYgKGxhc3QyRGlnaXRzID4gMTAgJiYgbGFzdDJEaWdpdHMgPCAyMCkge1xuICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0YLQuCc7XG4gICAgICAgIH0gZWxzZSBpZiAobGFzdERpZ2l0ID09PSAxKSB7XG4gICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3QstC4JztcbiAgICAgICAgfSBlbHNlIGlmIChsYXN0RGlnaXQgPT09IDIpIHtcbiAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnLdGA0LgnO1xuICAgICAgICB9IGVsc2UgaWYgKGxhc3REaWdpdCA9PT0gNyB8fCBsYXN0RGlnaXQgPT09IDgpIHtcbiAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnLdC80LgnO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0YLQuCc7XG4gIC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obWVyaWRpZW0gPT09ICfgpLDgpL7gpKTgpY3gpLDgpYAnKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciA8IDQgPyBob3VyIDogaG91ciArIDEyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4KS44KSV4KS+4KSz4KWAJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfgpKbgpYHgpKrgpL7gpLDgpYAnKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciA+PSAxMCA/IGhvdXIgOiBob3VyICsgMTI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfgpLjgpL7gpK/gpILgpJXgpL7gpLPgpYAnKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBtZXJpZGllbTogZnVuY3Rpb24gKGhvdXIsIG1pbnV0ZSwgaXNMb3dlcikge1xuICAgICAgICBpZiAoaG91ciA8IDQpIHtcbiAgICAgICAgICAgIHJldHVybiAn4KSw4KS+4KSk4KWN4KSw4KWAJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTApIHtcbiAgICAgICAgICAgIHJldHVybiAn4KS44KSV4KS+4KSz4KWAJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTcpIHtcbiAgICAgICAgICAgIHJldHVybiAn4KSm4KWB4KSq4KS+4KSw4KWAJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMjApIHtcbiAgICAgICAgICAgIHJldHVybiAn4KS44KS+4KSv4KSC4KSV4KS+4KSz4KWAJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAn4KSw4KS+4KSk4KWN4KSw4KWAJztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgd2VlayA6IHtcbiAgICAgICAgZG93IDogMCwgLy8gU3VuZGF5IGlz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cm4gaG91cjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ3RlbmdhaGFyaScpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyID49IDExID8gaG91ciA6IGhvdXIgKyAxMjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ3BldGFuZycgfHwgbWVyaWRpZW0gPT09ICdtYWxhbScpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyICsgMTI7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIG1lcmlkaWVtIDogZnVuY3Rpb24gKGhvdXJzLCBtaW51dGVzLCBpc0xvd2VyKSB7XG4gICAgICAgIGlmIChob3VycyA8IDExKSB7XG4gICAgICAgICAgICByZXR1cm4gJ3BhZ2knO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXJzIDwgMTUpIHtcbiAgICAgICAgICAgIHJldHVybiAndGVuZ2FoYXJpJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VycyA8IDE5KSB7XG4gICAgICAgICAgICByZXR1cm4gJ3BldGFuZyc7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gJ21hbGFtJztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXkgOiAnW0hhcmkgaW5pIHB1a3VsXSBMVCcsXG4gICAgICAgIG5leHREYXkgOiAnW0Vzb2sgcHVrdWxdIExUJyxcbiAgICAgICAgbmV4dFdlZWsgOiAnZGRkZCBbcHVrdWxdIExUJyxcbiAgICAgICAgbGFzdERheSA6ICdbS2VsbWFyaW4gcHVrdWxdIExUJyxcbiAgICAgICAgbGFzdFdlZWsgOiAnZGRkZCBbbGVwYXMgcHVrdWxdIExUJyxcbiAgICAgICAgc2FtZUVsc2UgOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJ2RhbGFtICVzJyxcbiAgICA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ExMTCA6ICdEIE1NTU0gWVlZWSBbcHVrdWxdIEhILm1tJyxcbiAgICAgICAgTExMTCA6ICdkZGRkLCBEIE1NTU0gWVlZWSBbcHVrdWxdIEhILm1tJ1xuICAgIH0sXG4gICAgbWVyaWRpZW1QYXJzZTogL3BhZ2l8dGVuZ2FoYXJpfHBldGFuZ3xtYWxhbS8sXG4gICAgbWVyaWRpZW1Ib3VyOiBmdW5jdGlvbiAoaG91ciwgbWVyaWRpZW0pIHtcbiAgICAgICAgaWYgKGhvdXIgPT09IDEyKSB7XG4gICAgICAgICAgICBob3VyID0gMDtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVyaWRpZW0gPT09ICdwYWdpJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICd0ZW5nYWhhcmknKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciA+PSAxMSA/IGhvdXIgOiBob3VyICsgMTI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICdwZXRhbmcnIHx8IG1lcmlkaWVtID09PSAnbWFsYW0nKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VycywgbWludXRlcywgaXNMb3dlcikge1xuICAgICAgICBpZiAoaG91cnMgPCAxMSkge1xuICAgICAgICAgICAgcmV0dXJuICdwYWdpJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VycyA8IDE1KSB7XG4gICAgICAgICAgICByZXR1cm4gJ3RlbmdhaGFyaSc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG91cnMgPCAxOSkge1xuICAgICAgICAgICAgcmV0dXJuICdwZXRhbmcnO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICdtYWxhbSc7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIGNhbGVuZG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ICAgIH0sXG4gICAgbWVyaWRpZW1QYXJzZTogL+CksOCkvuCkpOCkv3zgpKzgpL/gpLngpL7gpKh84KSm4KS/4KSJ4KSB4KS44KWLfOCkuOCkvuCkgeCknS8sXG4gICAgbWVyaWRpZW1Ib3VyIDogZnVuY3Rpb24gKGhvdXIsIG1lcmlkaWVtKSB7XG4gICAgICAgIGlmIChob3VyID09PSAxMikge1xuICAgICAgICAgICAgaG91ciA9IDA7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lcmlkaWVtID09PSAn4KSw4KS+4KSk4KS/Jykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXIgPCA0ID8gaG91ciA6IGhvdXIgKyAxMjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+CkrOCkv+CkueCkvuCkqCcpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4KSm4KS/4KSJ4KSB4KS44KWLJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXIgPj0gMTAgPyBob3VyIDogaG91ciArIDEyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4KS44KS+4KSB4KSdJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXIgKyAxMjtcbiAgICAgICAgfVxuICAgIH0sXG4gICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG4gICAgICAgIGlmIChob3VyIDwgMykge1xuICAgICAgICAgICAgcmV0dXJuICfgpLDgpL7gpKTgpL8nO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxMikge1xuICAgICAgICAgICAgcmV0dXJuICfgpKzgpL/gpLngpL7gpKgnO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxNikge1xuICAgICAgICAgICAgcmV0dXJuICfgpKbgpL/gpIngpIHgpLjgpYsnO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAyMCkge1xuICAgICAgICAgICAgcmV0dXJuICfgpLjgpL7gpIHgpJ0nO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICfgpLDgpL7gpKTgpL8nO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBjYWxlbmRhciA6IHtcbiAgICAgICAgc2FtZURheSA6ICdb4KSG4KScXSBMVCcsXG4gICAgICAgIG5leHREYXkgOiAnW+CkreCli+CksuCkv10gTFQnLFxuICAgICAgICBuZXh0V2VlayA6ICdb4KSG4KSJ4KSB4KSm4KWLXSBkZGRkWyxdIExUJyxcbiAgICAgICAgbGFzdERheSA6ICdb4KS54KS/4KSc4KWLXSBMVCcsXG4gICAgICAgIGxhc3RXZWVrIDogJ1vgpJfgpI/gpJXgpYtdIGRkZGRbLF0gTFQnLFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAnJXPgpK7gpL4nLFxuICAgICAgICBwYXN0IDogJyVzIOCkheCkl+CkvuCkoeCkvycsXG4gICAgICAgIHMgOiAn4KSV4KWH4KS54KWAIOCkleCljeCkt+CkoycsXG4gICAgICAgIG0gOiAn4KSP4KSVIOCkruCkv+CkqOClh+CknycsXG4gICAgICAgIG1tIDogJyVkIOCkruCkv+CkqOClh+CknycsXG4gICAgICAgIGggOiAn4KSP4KSVIOCkmOCko+CljeCkn+CkvicsXG4gICAgICAgIGhoIDogJyVkIOCkmOCko+CljeCkn+CkvicsXG4gICAgICAgIGQgOiAn4KSP4KSVIOCkpuCkv+CkqCcsXG4gICAgICAgIGRkIDogJyVkIOCkpuCkv+CkqCcsXG4gICAgICAgIE0gOiAn4KSP4KSVIOCkruCkueCkv+CkqOCkvicsXG4gICAgICAgIE1NIDogJyVkIOCkruCkueCkv+CkqOCkvicsXG4gICAgICAgIHkgOiAn4KSP4KSVIOCkrOCksOCljeCktyc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0gWVlZWSwgQSBoOm1tIOCoteConOCphycsXG4gICAgICAgIExMTEwgOiAnZGRkZCwgRCBNTU1NIFlZWVksIEEgaDptbSDgqLXgqJzgqYcnXG4gICAgfSxcbiAgICBjYWxlbmRhciA6IHtcbiAgICAgICAgc2FtZURheSA6ICdb4KiF4KicXSBMVCcsXG4gICAgICAgIG5leHREYXkgOiAnW+ColeCosl0gTFQnLFxuICAgICAgICBuZXh0V2VlayA6ICdkZGRkLCBMVCcsXG4gICAgICAgIGxhc3REYXkgOiAnW+ColeCosl0gTFQnLFxuICAgICAgICBsYXN0V2VlayA6ICdb4Kiq4Ki/4Kib4Kiy4KmHXSBkZGRkLCBMVCcsXG4gICAgICAgIHNhbWVFbHNlIDogJ0wnXG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6ICclcyDgqLXgqL/gqbHgqJonLFxuICAgICAgICBwYXN0IDogJyVzIOCoquCov+Com+CosuCphycsXG4gICAgICAgIHMgOiAn4KiV4KmB4KidIOCouOColeCov+CpsOConycsXG4gICAgICAgIG0gOiAn4KiH4KiVIOCoruCov+CpsOConycsXG4gICAgICAgIG1tIDogJyVkIOCoruCov+CpsOConycsXG4gICAgICAgIGggOiAn4KiH4Kmx4KiVIOComOCpsOCon+CovicsXG4gICAgICAgIGhoIDogJyVkIOComOCpsOCon+CphycsXG4gICAgICAgIGQgOiAn4KiH4Kmx4KiVIOCopuCov+CoqCcsXG4gICAgICAgIGRkIDogJyVkIOCopuCov+CoqCcsXG4gICAgICAgIE0gOiAn4KiH4Kmx4KiVIOCoruCoueCpgOCoqOCovicsXG4gICAgICAgIE1NIDogJyVkIOCoruCoueCpgOCoqOCphycsXG4gICAgICAgIHkgOiAn4KiH4Kmx4KiVIOCouOCovuCosicsXG4gICAgICAgIHl5IDogJyVkIOCouOCovuCosidcbiAgICB9LFxuICAgIHByZXBhcnNlOiBmdW5jdGlvbiAoc3RyaW5nKSB7XG4gICAgICAgIH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TAgPCA1KSAmJiAobiAlIDEwID4gMSkgJiYgKCh+fihuIC8gMTApICUgMTApICE9PSAxKTtcbn1cbmZ1bmN0aW9uIHRyYW5zbGF0ZShudW1iZXIsIHdpdGhvdXRTdWZmaXgsIGtleSkge1xuICAgIHZhciByZXN1bHQgPSBudW1iZXIgKyAnICc7XG4gICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgY2FzZSAnbSc6XG4gICAgICAgICAgICByZXR1cm4gd2l0aG91dFN1ZmZpeCA/ICdtaW51dGEnIDogJ21pbnV0xJknO1xuICAgICAgICBjYXNlICdtbSc6XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHBsdXJhbChudW1iZXIpID8gJ21pbnV0eScgOiAnbWludXQnKTtcbiAgICAgICAgY2FzZSAnaCc6XG4gICAgICAgICAgICByZXR1cm4gd2l0aG91dFN1ZmZpeCAgPyAnZ29kemluYScgIDogJ2dvZHppbsSZJztcbiAgICAgICAgY2FzZSAnaGgnOlxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArIChwbHVyYWwobnVtYmVyKSA/ICdnb2R6aW55JyA6ICdnb2R6aW4nKTtcbiAgICAgICAgY2FzZSAnTU0nOlxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArIChwbHVyYWwobnVtYmVyKSA/ICdtaWVzacSFY2UnIDogJ21pZXNpxJljeScpO1xuICAgICAgICBjYXNlICd5eSc6XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHBsdXJhbChudW1iZXIpID8gJ2xhdGEnIDogJ2xhdCcpO1xuICAgIH1cbn1cblxudmFyIHBsID0gbW9tZW50LmRlZmluZUxvY2FsZSgncGwnLCB7XG4gICAgbW9udGhzIDogZnVuY3Rpb24gKG1vbWVudFRvRm9ybWF0LCBmb3JtYXQpIHtcbiAgICAgICAgaWYgKCFtb21lbnRUb0Zvcm1hdCkge1xuICAgICAgICAgICAgcmV0dXJuIG1vbnRoc05vbWluYXRpdmU7XG4gICAgIC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Gl0KCdfJyksXG4gICAgbG9uZ0RhdGVGb3JtYXQgOiB7XG4gICAgICAgIExUIDogJ0hIOm1tJyxcbiAgICAgICAgTFRTIDogJ0hIOm1tOnNzJyxcbiAgICAgICAgTCA6ICdERC5NTS5ZWVlZJyxcbiAgICAgICAgTEwgOiAnRCBNTU1NIFlZWVknLFxuICAgICAgICBMTEwgOiAnRCBNTU1NIFlZWVkgSEg6bW0nLFxuICAgICAgICBMTExMIDogJ2RkZGQsIEQgTU1NTSBZWVlZIEhIOm1tJ1xuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXk6ICdbRHppxZsgb10gTFQnLFxuICAgICAgICBuZXh0RGF5OiAnW0p1dHJvIG9dIExUJyxcbiAgICAgICAgbmV4dFdlZWs6ICdbV10gZGRkZCBbb10gTFQnLFxuICAgICAgICBsYXN0RGF5OiAnW1djem9yYWogb10gTFQnLFxuICAgICAgICBsYXN0V2VlazogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1tXIHplc3rFgsSFIG5pZWR6aWVsxJkgb10gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbVyB6ZXN6xYLEhSDFm3JvZMSZIG9dIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW1cgemVzesWCxIUgc29ib3TEmSBvXSBMVCc7XG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbVyB6ZXN6xYJ5XSBkZGRkIFtvXSBMVCc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHNhbWVFbHNlOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aX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LJdIExUJyxcbiAgICAgICAgbGFzdERheTogJ1vQktGH0LXRgNCwINCyXSBMVCcsXG4gICAgICAgIG5leHRXZWVrOiBmdW5jdGlvbiAobm93KSB7XG4gICAgICAgICAgICBpZiAobm93LndlZWsoKSAhPT0gdGhpcy53ZWVrKCkpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0JIg0YHQu9C10LTRg9GO0YnQtdC1XSBkZGRkIFvQsl0gTFQnO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0JIg0YHQu9C10LTRg9GO0YnQuNC5XSBkZGRkIFvQsl0gTFQnO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0JIg0YHQu9C10LTRg9GO0YnRg9GOXSBkZGRkIFvQsl0gTFQnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuZGF5KCkgPT09IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0JLQvl0gZGRkZCBb0LJdIExUJztcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQkl0gZGRkZCBb0LJdIExUJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGxhc3RXZWVrOiBmdW5jdGlvbiAobm93KSB7XG4gICAgICAgICAgICBpZiAobm93LndlZWsoKSAhPT0gdGhpcy53ZWVrKCkpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0JIg0L/RgNC+0YjQu9C+0LVdIGRkZGQgW9CyXSBMVCc7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQkiDQv9GA0L7RiNC70YvQuV0gZGRkZCBb0LJdIExUJztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CSINC/0YDQvtGI0LvRg9GOXSBkZGRkIFvQsl0gTFQnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuZGF5KCkgPT09IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0JLQvl0gZGRkZCBb0LJdIExUJztcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQkl0gZGRkZCBb0LJdIExUJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHNhbWVFbHNlOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJ9GH0LXRgNC10LcgJXMnLFxuICAgICAgICBwYXN0IDogJyVzINC90LDQt9Cw0LQnLFxuICAgICAgICBzID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XRlIC8gYSBtaW51dGUgYWdvXG4gICAgICAgICAgICByZXR1cm4gd2l0aG91dFN1ZmZpeCA/ICdtaW7DunRhJyA6IChpc0Z1dHVyZSA/ICdtaW7DunR1JyA6ICdtaW7DunRvdScpO1xuICAgICAgICBjYXNlICdtbSc6IC8vIDkgbWludXRlcyAvIGluIDkgbWludXRlcyAvIDkgbWludXRlcyBhZ29cbiAgICAgICAgICAgIGlmICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArIChwbHVyYWwobnVtYmVyKSA/ICdtaW7DunR5JyA6ICdtaW7DunQnKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdtaW7DunRhbWknO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgJ2gnOiAgLy8gYW4gaG91ciAvIGluIGFuIGhvdXIgLyBhbiBob3VyIGFnb1xuICAgICAgICAgICAgcmV0dXJuIHdpdGhvdXRTdWZmaXggPyAnaG9kaW5hJyA6IChpc0Z1dHVyZSA/ICdob2RpbnUnIDogJ2hvZGlub3UnKTtcbiAgICAgICAgY2FzZSAnaGgnOiAvLyA5IGhvdXJzIC8gaW4gOSBob3VycyAvIDkgaG91cnMgYWdvXG4gICAgICAgICAgICBpZiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAocGx1cmFsKG51bWJlcikgPyAnaG9kaW55JyA6ICdob2TDrW4nKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdob2RpbmFtaSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAnZCc6ICAvLyBhIGRheSAvIGluIGEgZGF5IC8gYSBkYXkgYWdvXG4gICAgICAgICAgICByZXR1cm4gKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpID8gJ2RlxYgnIDogJ2TFiG9tJztcbiAgICAgICAgY2FzZSAnZGQnOiAvLyA5IGRheXMgLyBpbiA5IGRheXMgLyA5IGRheXMgYWdvXG4gICAgICAgICAgICBpZiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAocGx1cmFsKG51bWJlcikgPyAnZG5pJyA6ICdkbsOtJyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAnZMWIYW1pJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICdNJzogIC8vIGEgbW9udGggLyBpbiBhIG1vbnRoIC8gYSBtb250aCBhZ29cbiAgICAgICAgICAgIHJldHVybiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkgPyAnbWVzaWFjJyA6ICdtZXNpYWNvbSc7XG4gICAgICAgIGNhc2UgJ01NJzogLy8gOSBtb250aHMgLyBpbiA5IG1vbnRocyAvIDkgbW9udGhzIGFnb1xuICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHBsdXJhbChudW1iZXIpID8gJ21lc2lhY2UnIDogJ21lc2lhY292Jyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAnbWVzaWFjbWknO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgJ3knOiAgLy8gYSB5ZWFyIC8gaW4gYSB5ZWFyIC8gYSB5ZWFyIGFnb1xuICAgICAgICAgICAgcmV0dXJuICh3aXRob3V0U3VmZml4IHx8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FtZURheTogJ1tkbmVzIG9dIExUJyxcbiAgICAgICAgbmV4dERheTogJ1t6YWp0cmEgb10gTFQnLFxuICAgICAgICBuZXh0V2VlazogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2IG5lZGXEvnUgb10gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ZdIGRkZGQgW29dIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3Ygc3RyZWR1IG9dIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ZvIMWhdHZydG9rIG9dIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3YgcGlhdG9rIG9dIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3Ygc29ib3R1IG9dIExUJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgbGFzdERheTogJ1t2xI1lcmEgb10gTFQnLFxuICAgICAgICBsYXN0V2VlazogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1ttaW51bMO6IG5lZGXEvnUgb10gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW21pbnVsw71dIGRkZGQgW29dIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW21pbnVsw7ogc3RyZWR1IG9dIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1ttaW51bMO9XSBkZGRkIFtvXSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1ttaW51bMO6IHNvYm90dSBvXSBMVCc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHNhbWVFbHNlOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJ3phICVzJyxcbiAgICAgICAgcGFzdCA6ICdwcmVkICVzJyxcbiAgICAgICAgcyA6IHRyYW5zbGF0ZSxcbiAgICAgICAgbSA6IHRyYW5zbGF0ZSxcbiAgICAgICAgbW0gOiB0cmFuc2xhdGUsXG4gICAgICAgIGggOiB0cmFuc2xhdGUsXG4gICAgICAgIGhoIDogdHJhbnNsYXRlLFxuICAgICAgICBkIDogdHJhbnNsYXRlLFxuICAgICAgICBkZCA6IHRyYW5zbGF0ZSxcbiAgICAgICAgTSA6IHRyYW5zbGF0ZSxcbiAgICAgICAgTU0gOiB0cmFuc2xhdGUsXG4gICAgICAgIHkgOiB0cmFuc2xhdGUsXG4gICAgICAgIHl5IDogdHJhbnNsYXRlXG4gICAgfSxcbiAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn1cXC4vLFxuICAgIG9yZGluYWwgOiAnJWQuJyxcbiAgICB3ZWVrIDoge1xuICAgICAgICBkb3cgOiAxLCAvLyBNb25kYXkgaXMgdGhlIGZpcnN0IGRheSBvZiB0aGUgd2Vlay5cbiAgICAgICAgZG95IDogNCAgLy8gVGhlIHdlZWsgdGhhdCBj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AgIHJldHVybiB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ25la2FqIHNla3VuZCcgOiAnbmVrYWogc2VrdW5kYW1pJztcbiAgICAgICAgY2FzZSAnbSc6XG4gICAgICAgICAgICByZXR1cm4gd2l0aG91dFN1ZmZpeCA/ICdlbmEgbWludXRhJyA6ICdlbm8gbWludXRvJztcbiAgICAgICAgY2FzZSAnbW0nOlxuICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4ID8gJ21pbnV0YScgOiAnbWludXRvJztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyID09PSAyKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnbWludXRpJyA6ICdtaW51dGFtYSc7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA8IDUpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdtaW51dGUnIDogJ21pbnV0YW1pJztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnbWludXQnIDogJ21pbnV0YW1pJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIGNhc2UgJ2gnOlxuICAgICAgICAgICAgcmV0dXJuIHdpdGhvdXRTdWZmaXggPyAnZW5hIHVyYScgOiAnZW5vIHVybyc7XG4gICAgICAgIGNhc2UgJ2hoJzpcbiAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gd2l0aG91dFN1ZmZpeCA/ICd1cmEnIDogJ3Vybyc7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMikge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ3VyaScgOiAndXJhbWEnO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChudW1iZXIgPCA1KSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAndXJlJyA6ICd1cmFtaSc7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ3VyJyA6ICd1cmFtaSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICBjYXNlICdkJzpcbiAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ2VuIGRhbicgOiAnZW5pbSBkbmVtJztcbiAgICAgICAgY2FzZSAnZGQnOlxuICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ2RhbicgOiAnZG5lbSc7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMikge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ2RuaScgOiAnZG5ldm9tYSc7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ2RuaScgOiAnZG5ldmknO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgY2FzZSAnTSc6XG4gICAgICAgICAgICByZXR1cm4gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdlbiBtZXNlYycgOiAnZW5pbSBtZXNlY2VtJztcbiAgICAgICAgY2FzZSAnTU0nOlxuICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ21lc2VjJyA6ICdtZXNlY2VtJztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyID09PSAyKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnbWVzZWNhJyA6ICdtZXNlY2VtYSc7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA8IDUpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdtZXNlY2UnIDogJ21lc2VjaSc7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ21lc2VjZXYnIDogJ21lc2VjaSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICBjYXNlICd5JzpcbiAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ2VubyBsZXRvJyA6ICdlbmltIGxldG9tJztcbiAgICAgICAgY2FzZSAneXknOlxuICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ2xldG8nIDogJ2xldG9tJztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyID09PSAyKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1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AgICBMVCA6ICdIOm1tJyxcbiAgICAgICAgTFRTIDogJ0g6bW06c3MnLFxuICAgICAgICBMIDogJ0RELk1NLllZWVknLFxuICAgICAgICBMTCA6ICdELiBNTU1NIFlZWVknLFxuICAgICAgICBMTEwgOiAnRC4gTU1NTSBZWVlZIEg6bW0nLFxuICAgICAgICBMTExMIDogJ2RkZGQsIEQuIE1NTU0gWVlZWSBIOm1tJ1xuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXkgIDogJ1tkYW5lcyBvYl0gTFQnLFxuICAgICAgICBuZXh0RGF5ICA6ICdbanV0cmkgb2JdIExUJyxcblxuICAgICAgICBuZXh0V2VlayA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdl0gW25lZGVsam9dIFtvYl0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdl0gW3NyZWRvXSBbb2JdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ZdIFtzb2JvdG9dIFtvYl0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdl0gZGRkZCBbb2JdIExUJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgbGFzdERheSAgOiAnW3bEjWVyYWogb2JdIExUJyxcbiAgICAgICAgbGFzdFdlZWsgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ByZWrFoW5qb10gW25lZGVsam9dIFtvYl0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbcHJlasWhbmpvXSBbc3JlZG9dIFtvYl0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbcHJlasWhbmpvXSBbc29ib3RvXSBbb2JdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ByZWrFoW5qaV0gZGRkZCBbb2JdIExUJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2FtZUVsc2UgOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJ8SNZXogJXMnLFxuICAgICAgICBwYXN0ICAgOiAncHJlZCAlcycsXG4gICAgICAgIHMgICAgICA6IHByb2Nlc3NSZWxhdGl2ZVRpbWUsXG4gICAgICAgIG0gICAgICA6IHByb2Nlc3NSZWxhdGl2ZVRpbWUsXG4gICAgICAgIG1tICAgICA6IHByb2Nlc3NSZWxhdGl2ZVRpbWUsXG4gICAgICAgIGggICAgICA6IHByb2Nlc3NSZWxhdGl2ZVRpbWUsXG4gICAgICAgIGhoICAgICA6IHByb2Nlc3NSZWxhdGl2ZVRpbWUsXG4gICAgICAgIGQgICAgICA6IHByb2Nlc3NSZWxhdGl2ZVRpbWUsXG4gICAgICAgIGRkICAgICA6IHByb2Nlc3NSZWxhdGl2ZVRpbWUsXG4gICAgICAgIE0gICAgICA6IHByb2Nlc3NSZWxhdGl2Z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3Jha19zcmVkYV/EjWV0dnJ0YWtfcGV0YWtfc3Vib3RhJy5zcGxpdCgnXycpLFxuICAgIHdlZWtkYXlzU2hvcnQ6ICduZWQuX3Bvbi5fdXRvLl9zcmUuX8SNZXQuX3BldC5fc3ViLicuc3BsaXQoJ18nKSxcbiAgICB3ZWVrZGF5c01pbjogJ25lX3BvX3V0X3NyX8SNZV9wZV9zdScuc3BsaXQoJ18nKSxcbiAgICB3ZWVrZGF5c1BhcnNlRXhhY3QgOiB0cnVlLFxuICAgIGxvbmdEYXRlRm9ybWF0OiB7XG4gICAgICAgIExUOiAnSDptbScsXG4gICAgICAgIExUUyA6ICdIOm1tOnNzJyxcbiAgICAgICAgTDogJ0RELk1NLllZWVknLFxuICAgICAgICBMTDogJ0QuIE1NTU0gWVlZWScsXG4gICAgICAgIExMTDogJ0QuIE1NTU0gWVlZWSBIOm1tJyxcbiAgICAgICAgTExMTDogJ2RkZGQsIEQuIE1NTU0gWVlZWSBIOm1tJ1xuICAgIH0sXG4gICAgY2FsZW5kYXI6IHtcbiAgICAgICAgc2FtZURheTogJ1tkYW5hcyB1XSBMVCcsXG4gICAgICAgIG5leHREYXk6ICdbc3V0cmEgdV0gTFQnLFxuICAgICAgICBuZXh0V2VlazogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBbbmVkZWxqdV0gW3VdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIFtzcmVkdV0gW3VdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIFtzdWJvdHVdIFt1XSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBkZGRkIFt1XSBMVCc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGxhc3REYXkgIDogJ1tqdcSNZSB1XSBMVCcsXG4gICAgICAgIGxhc3RXZWVrIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGxhc3RXZWVrRGF5cyA9IFtcbiAgICAgICAgICAgICAgICAnW3Byb8WhbGVdIFtuZWRlbGplXSBbdV0gTFQnLFxuICAgICAgICAgICAgICAgICdbcHJvxaFsb2ddIFtwb25lZGVsamthXSBbdV0gTFQnLFxuICAgICAgICAgICAgICAgICdbcHJvxaFsb2ddIFt1dG9ya2FdIFt1XSBMVCcsXG4gICAgICAgICAgICAgICAgJ1twcm/FoWxlXSBbc3JlZGVdIFt1XSBMVCcsXG4gICAgICAgICAgICAgICAgJ1twcm/FoWxvZ10gW8SNZXR2cnRrYV0gW3VdIExUJyxcbiAgICAgICAgICAgICAgICAnW3Byb8WhbG9nXSBbcGV0a2FdIFt1XSBMVCcsXG4gICAgICAgICAgICAgICAgJ1twcm/FoWxlXSBbc3Vib3RlXSBbdV0gTFQnXG4gICAgICAgICAgICBdO1xuICAgICAgICAgICAgcmV0dXJuIGxhc3RXZWVrRGF5c1t0aGlzLmRheSgpXTtcbiAgICAgICAgfSxcbiAgICAgICAgc2FtZUVsc2UgOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJ3phICVzJyxcbiAgICAgICAgcGFzdCAgIDogJ3ByZSAlcycsXG4gICAgICAgIHMgICAgICA6ICduZWtvbGlrbyBzZWt1bmRpJyxcbiAgICAgICAgbSAgICAgIDogdHJhbnNsYXRvci50cmFuc2xhdGUsXG4gICAgICAgIG1tICAgICA6IHRyYW5zbGF0b3IudHJhbnNsYX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YScsXG4gICAgICAgIHl5IDogJyVkIGltaW55YWthJ1xuICAgIH0sXG4gICAgbWVyaWRpZW1QYXJzZTogL2VrdXNlbml8ZW1pbml8ZW50c2FtYmFtYXxlYnVzdWt1LyxcbiAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VycywgbWludXRlcywgaXNMb3dlcikge1xuICAgICAgICBpZiAoaG91cnMgPCAxMSkge1xuICAgICAgICAgICAgcmV0dXJuICdla3VzZW5pJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VycyA8IDE1KSB7XG4gICAgICAgICAgICByZXR1cm4gJ2VtaW5pJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VycyA8IDE5KSB7XG4gICAgICAgICAgICByZXR1cm4gJ2VudHNhbWJhbWEnO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICdlYnVzdWt1JztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgbWVyaWRpZW1Ib3VyIDogZnVuY3Rpb24gKGhvdXIsIG1lcmlkaWVtKSB7XG4gICAgICAgIGlmIChob3VyID09PSAxMikge1xuICAgICAgICAgICAgaG91ciA9IDA7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lcmlkaWVtID09PSAnZWt1c2VuaScpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAnZW1pbmknKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciA+PSAxMSA/IGhvdXIgOiBob3VyICsgMTI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICdlbnRzYW1iYW1hJyB8fCBtZXJpZGllbSA9PT0gJ2VidXN1a3UnKSB7XG4gICAgICAgICAgICBpZiAoaG91ciA9PT0gMCkge1xuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGhvdXIgKyAxMjtcbiAgICAgICAgfVxuIC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luZUxvY2FsZSgndGEnLCB7XG4gICAgbW9udGhzIDogJ+CunOCuqeCuteCusOCuv1/grqrgrr/grqrgr43grrDgrrXgrrDgrr9f4K6u4K6+4K6w4K+N4K6a4K+NX+Cuj+CuquCvjeCusOCusuCvjV/grq7gr4df4K6c4K+C4K6p4K+NX+CunOCvguCusuCviF/grobgrpXgrrjgr43grp/gr41f4K6a4K+G4K6q4K+N4K6f4K+G4K6u4K+N4K6q4K6w4K+NX+CuheCuleCvjeCun+Cvh+CuvuCuquCusOCvjV/grqjgrrXgrq7gr43grqrgrrDgr41f4K6f4K6/4K6a4K6u4K+N4K6q4K6w4K+NJy5zcGxpdCgnXycpLFxuICAgIG1vbnRoc1Nob3J0IDogJ+CunOCuqeCuteCusOCuv1/grqrgrr/grqrgr43grrDgrrXgrrDgrr9f4K6u4K6+4K6w4K+N4K6a4K+NX+Cuj+CuquCvjeCusOCusuCvjV/grq7gr4df4K6c4K+C4K6p4K+NX+CunOCvguCusuCviF/grobgrpXgrrjgr43grp/gr41f4K6a4K+G4K6q4K+N4K6f4K+G4K6u4K+N4K6q4K6w4K+NX+CuheCuleCvjeCun+Cvh+CuvuCuquCusOCvjV/grqjgrrXgrq7gr43grqrgrrDgr41f4K6f4K6/4K6a4K6u4K+N4K6q4K6w4K+NJy5zcGxpdCgnXycpLFxuICAgIHdlZWtkYXlzIDogJ+CunuCuvuCur+Cuv+CuseCvjeCuseCvgeCuleCvjeCuleCuv+CutOCuruCviF/grqTgrr/grpngr43grpXgrp/gr43grpXgrr/grrTgrq7gr4hf4K6a4K+G4K614K+N4K614K6+4K6v4K+N4K6V4K6/4K604K6u4K+IX+CuquCvgeCupOCuqeCvjeCuleCuv+CutOCuruCviF/grrXgrr/grq/grr7grrTgrpXgr43grpXgrr/grrTgrq7gr4hf4K614K+G4K6z4K+N4K6z4K6/4K6V4K+N4K6V4K6/4K604K6u4K+IX+CumuCuqeCuv+CuleCvjeCuleCuv+CutOCuruCviCcuc3BsaXQoJ18nKSx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91ciA8IDIyKSB7XG4gICAgICAgICAgICByZXR1cm4gJyDgrq7grr7grrLgr4gnOyAvLyDgrq7grr7grrLgr4hcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAnIOCur+CuvuCuruCuruCvjSc7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIG1lcmlkaWVtSG91ciA6IGZ1bmN0aW9uIChob3VyLCBtZXJpZGllbSkge1xuICAgICAgICBpZiAoaG91ciA9PT0gMTIpIHtcbiAgICAgICAgICAgIGhvdXIgPSAwO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXJpZGllbSA9PT0gJ+Cur+CuvuCuruCuruCvjScpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyIDwgMiA/IGhvdXIgOiBob3VyICsgMTI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfgrrXgr4jgrpXgrrHgr4gnIHx8IG1lcmlkaWVtID09PSAn4K6V4K6+4K6y4K+IJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfgrqjgrqPgr43grqrgrpXgrrLgr40nKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciA+PSAxMCA/IGhvdXIgOiBob3VyICsgMTI7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuICAgICAgICB9XG4gICAgfSxcbiAgICB3ZWVrIDoge1xuICAgICAgICBkb3cgOiAwLCAvLyBTdW5kYXkgaXMgdGhlIGZpcnN0IGRheSBvZiB0aGUgd2Vlay5cbiAgICAgICAgZG95IDogNiAgLy8gVGhlIHdlZWsgdGhhdCBjb250YWlucyBKYW4gMXN0IGlzIHRoZSBmaXJzdCB3ZWVrIG9mIHRoZSB5ZWFyLlxuICAgIH1cbn0pO1xuXG5yZXR1cm4gdGE7XG5cbn0pKSk7XG5cblxuXG4vLy8vLy8vLy8vLy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AgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcbiAgICAgICAgaWYgKGhvdXIgPCAxMikge1xuICAgICAgICAgICAgcmV0dXJuICfguIHguYjguK3guJnguYDguJfguLXguYjguKLguIcnO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICfguKvguKXguLHguIfguYDguJfguLXguYjguKLguIcnO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBjYWxlbmRhciA6IHtcbiAgICAgICAgc2FtZURheSA6ICdb4Lin4Lix4LiZ4LiZ4Li14LmJIOC5gOC4p+C4peC4sl0gTFQnLFxuICAgICAgICBuZXh0RGF5IDogJ1vguJ7guKPguLjguYjguIfguJnguLXguYkg4LmA4Lin4Lil4LiyXSBMVCcsXG4gICAgICAgIG5leHRXZWVrIDogJ2RkZGRb4Lir4LiZ4LmJ4LiyIOC5gOC4p+C4peC4sl0gTFQnLFxuICAgICAgICBsYXN0RGF5IDogJ1vguYDguKHguLfguYjguK3guKfguLLguJnguJnguLXguYkg4LmA4Lin4Lil4LiyXSBMVCcsXG4gICAgICAgIGxhc3RXZWVrIDogJ1vguKfguLHguJldZGRkZFvguJfguLXguYjguYHguKXguYnguKcg4LmA4Lin4Lil4LiyXSBMVCcsXG4gICAgICAgIHNhbWVFbHNlIDogJ0wnXG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6ICfguK3guLXguIEgJXMnLFxuICAgICAgICBwYXN0IDogJyVz4LiX4Li14LmI4LmB4Lil4LmJ4LinJyxcbiAgICAgICAgcyA6ICfguYTguKHguYjguIHguLXguYjguKfguLTguJnguLLguJfguLUnLFxuICAgICAgICBtIDogJzEg4LiZ4Liy4LiX4Li1JyxcbiAgICAgICAgbW0gOiAnJWQg4LiZ4Liy4LiX4Li1JyxcbiAgICAgICAgaCA6ICcxIOC4iuC4seC5iOC4p+C5guC4oeC4hycsXG4g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W1lLnNsaWNlKDAsIC0zKSArICd3YVEnIDpcbiAgICAob3V0cHV0LmluZGV4T2YoJ0RJUycpICE9PSAtMSkgP1xuICAgIHRpbWUuc2xpY2UoMCwgLTMpICsgJ25lbScgOlxuICAgIHRpbWUgKyAnIHBJcSc7XG4gICAgcmV0dXJuIHRpbWU7XG59XG5cbmZ1bmN0aW9uIHRyYW5zbGF0ZVBhc3Qob3V0cHV0KSB7XG4gICAgdmFyIHRpbWUgPSBvdXRwdXQ7XG4gICAgdGltZSA9IChvdXRwdXQuaW5kZXhPZignamFqJykgIT09IC0xKSA/XG4gICAgdGltZS5zbGljZSgwLCAtMykgKyAnSHXigJknIDpcbiAgICAob3V0cHV0LmluZGV4T2YoJ2phcicpICE9PSAtMSkgP1xuICAgIHRpbWUuc2xpY2UoMCwgLTMpICsgJ3dlbicgOlxuICAgIChvdXRwdXQuaW5kZXhPZignRElTJykgIT09IC0xKSA/XG4gICAgdGltZS5zbGljZSgwLCAtMykgKyAnYmVuJyA6XG4gICAgdGltZSArICcgcmV0JztcbiAgICByZXR1cm4gdGltZTtcbn1cblxuZnVuY3Rpb24gdHJhbnNsYXRlKG51bWJlciwgd2l0aG91dFN1ZmZpeCwgc3RyaW5nLCBpc0Z1dHVyZSkge1xuICAgIHZhciBudW1iZXJOb3VuID0gbnVtYmVyQXNOb3VuKG51bWJlcik7XG4gICAgc3dpdGNoIChzdHJpbmcpIHtcbiAgICAgICAgY2FzZSAnbW0nOlxuICAgICAgICAgICAgcmV0dXJuIG51bWJlck5vdW4gKyAnIHR1cCc7XG4gICAgICAgIGNhc2UgJ2hoJzpcbiAgICAgICAgICAgIHJldHVybiBudW1iZXJOb3VuICsgJyByZXAnO1xuICAgICAgICBjYXNlICdkZCc6XG4gICAgICAgICAgICByZXR1cm4gbnVtYmVyTm91biArICcgamFqJztcbiAgICAgICAgY2FzZSAnTU0nOlxuICAgICAgICAgICAgcmV0dXJuIG51bWJlck5vdW4gKyAnIGphcic7XG4gICAgICAgIGNhc2UgJ3l5JzpcbiAgICAgICAgICAgIHJldHVybiBudW1iZXJOb3VuICsgJyBESVMnO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gbnVtYmVyQXNOb3VuKG51bWJlcikge1xuICAgIHZhciBodW5kcmVkID0gTWF0aC5mbG9vcigobnVtYmVyICUgMTAwMCkgLyAxMDApLFxuICAgIHRlbiA9IE1hdGguZmxvb3IoKG51bWJlciAlIDEwMCkgLyAxMCksXG4gICAgb25lID0gbnVtYmVyICUgMTAsXG4gICAgd29yZCA9ICcnO1xuICAgIGlmIChodW5kcmVkID4gMCkge1xuICAgICAgICB3b3JkICs9IG51bWJlcnNOb3Vuc1todW5kcmVkXSArICd2YXRsaCc7XG4gICAgfVxuICAgIGlmICh0ZW4gPiAwKSB7XG4gICAgICAgIHdvcmQgKz0gKCh3b3JkICE9PSAnJykgPyAnICcgOiAnJykgKyBudW1iZXJzTm91bnNbdGVuXSArICdtYUgnO1xuICAgIH1cbiAgICBpZiAob25lID4gMCkge1xuICAgICAgICB3b3JkICs9ICgod29yZCAhPT0gJycpID8gJyAnIDogJycpICsgbnVtYmVyc05vdW5zW29uZV07XG4gICAgfVxuICAgIHJldHVybiAod29yZCA9PT0gJycpID8gJ3BhZ2gnIDogd29yZDtcbn1cblxudmFyIHRsaCA9IG1vbWVudC5kZWZpbmVMb2NhbGUoJ3RsaCcsIHtcbiAgICBtb250aHMgOiAndGVyYeKAmSBqYXIgd2HigJlfdGVyYeKAmSBqYXIgY2hh4oCZX3RlcmHigJkgamFyIHdlal90ZXJh4oCZIGphciBsb1NfdGVyYeKAmSBqYXIgdmFnaF90ZXJh4oCZIGphciBqYXZfdGVyYeKAmSBqYXIgU29jaF90ZXJh4oCZIGphciBjaG9yZ2hfdGVyYeKAmSBqYXIgSHV0X3RlcmHigJkgamFyIHdh4oCZbWFIX3RlcmHigJkgamFyIHdh4oCZbWFIIHdh4oCZX3RlcmHigJkgamFyIHdh4oCZbWFIIGNoYeKAmScuc3BsaXQoJ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XG4gICAgICAgICdtJzogWydcXCduIG3DrXV0JywgJ1xcJ2llbnMgbcOtdXQnXSxcbiAgICAgICAgJ21tJzogW251bWJlciArICcgbcOtdXRzJywgJycgKyBudW1iZXIgKyAnIG3DrXV0cyddLFxuICAgICAgICAnaCc6IFsnXFwnbiDDvm9yYScsICdcXCdpZW5zYSDDvm9yYSddLFxuICAgICAgICAnaGgnOiBbbnVtYmVyICsgJyDDvm9yYXMnLCAnJyArIG51bWJlciArICcgw75vcmFzJ10sXG4gICAgICAgICdkJzogWydcXCduIHppdWEnLCAnXFwnaWVuc2Egeml1YSddLFxuICAgICAgICAnZGQnOiBbbnVtYmVyICsgJyB6aXVhcycsICcnICsgbnVtYmVyICsgJyB6aXVhcyddLFxuICAgICAgICAnTSc6IFsnXFwnbiBtZXMnLCAnXFwnaWVucyBtZXMnXSxcbiAgICAgICAgJ01NJzogW251bWJlciArICcgbWVzZW4nLCAnJyArIG51bWJlciArICcgbWVzZW4nXSxcbiAgICAgICAgJ3knOiBbJ1xcJ24gYXInLCAnXFwnaWVucyBhciddLFxuICAgICAgICAneXknOiBbbnVtYmVyICsgJyBhcnMnLCAnJyArIG51bWJlciArICcgYXJzJ11cbiAgICB9O1xuICAgIHJldHVybiBpc0Z1dHVyZSA/IGZvcm1hdFtrZXldWzBdIDogKHdpdGhvdXRTdWZmaXggPyBmb3JtYXRba2V5XVswXSA6IGZvcm1hdFtrZXldWzFdKTtcbn1cblxucmV0dXJuIHR6bDtcblxufSkpKTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vfi9tb21lbnQvbG9jYWxlL3R6bC5qc1xuLy8gbW9kdWxlIGlkID0gMTExXG4vLyBtb2R1bGUgY2h1bmtzID0gMCIsIi8vISBtb21lbnQuanMgbG9jYWxlIGNvbmZpZ3VyYXRpb25cbi8vISBsb2NhbGUgOiBDZW50cmFsIEF0bGFzIFRhbWF6aWdodCBMYXRpbiBbdHpt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K0sOK0veK1lOK0sOK1mV/itLDitL3itaHitLDitZlf4rSw4rWZ4rWJ4rWO4rWh4rSw4rWZX+K0sOK1meK1ieK0ueK1ouK0sOK1mScuc3BsaXQoJ18nKSxcbiAgICB3ZWVrZGF5c01pbiA6ICfitLDitZnitLDitY7itLDitZlf4rSw4rWi4rWP4rSw4rWZX+K0sOK1meK1ieK1j+K0sOK1mV/itLDitL3itZTitLDitZlf4rSw4rS94rWh4rSw4rWZX+K0sOK1meK1ieK1juK1oeK0sOK1mV/itLDitZnitYnitLnitaLitLDitZknLnNwbGl0KCdfJyksXG4gICAgbG9uZ0RhdGVGb3JtYXQgOiB7XG4gICAgICAgIExUIDogJ0hIOm1tJyxcbiAgICAgICAgTFRTOiAnSEg6bW06c3MnLFxuICAgICAgICBMIDogJ0REL01NL1lZWVknLFxuICAgICAgICBMTCA6ICdEIE1NTU0gWVlZWScsXG4gICAgICAgIExMTCA6ICdEIE1NTU0gWVlZWSBISDptbScsXG4gICAgICAgIExMTEwgOiAnZGRkZCBEIE1NTU0gWVlZWSBISDptbSdcbiAgICB9LFxuICAgIGNhbGVuZGFyIDoge1xuICAgICAgICBzYW1lRGF5OiAnW+K0sOK1meK0t+K1hSDitLRdIExUJyxcbiAgICAgICAgbmV4dERheTogJ1vitLDitZnitL3itLAg4rS0XSBMVCcsXG4gICAgICAgIG5leHRXZWVrOiAnZGRkZCBb4rS0XSBMVCcsXG4gICAgICAgIGxhc3REYXk6ICdb4rSw4rWa4rSw4rWP4rWcIOK0tF0gTFQnLFxuICAgICAgICBsYXN0V2VlazogJ2RkZGQgW+K0tF0gTFQnLFxuICAgICAgICBzYW1lRWxzZTogJ0wnXG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6ICfitLfitLDitLfitYUg4rWZIOK1ouK0sOK1jyAlcycsXG4gICAgICAgIHBhc3QgOiAn4rWi4rSw4rWPICVzJyxcbiAgICAgICAgcyA6ICfitYnitY7itY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GF5cyA9IFtcbiAgICAn2KfYqtmI2KfYsScsXG4gICAgJ9m+24zYsScsXG4gICAgJ9mF2Ybar9mEJyxcbiAgICAn2KjYr9q+JyxcbiAgICAn2KzZhdi52LHYp9iqJyxcbiAgICAn2KzZhdi524EnLFxuICAgICfbgdmB2KrbgSdcbl07XG5cbnZhciB1ciA9IG1vbWVudC5kZWZpbmVMb2NhbGUoJ3VyJywge1xuICAgIG1vbnRocyA6IG1vbnRocyxcbiAgICBtb250aHNTaG9ydCA6IG1vbnRocyxcbiAgICB3ZWVrZGF5cyA6IGRheXMsXG4gICAgd2Vla2RheXNTaG9ydCA6IGRheXMsXG4gICAgd2Vla2RheXNNaW4gOiBkYXlzLFxuICAgIGxvbmdEYXRlRm9ybWF0IDoge1xuICAgICAgICBMVCA6ICdISDptbScsXG4gICAgICAgIExUUyA6ICdISDptbTpzcycsXG4gICAgICAgIEwgOiAnREQvTU0vWVlZWScsXG4gICAgICAgIExMIDogJ0QgTU1NTSBZWVlZJyxcbiAgICAgICAgTExMIDogJ0QgTU1NTSBZWVlZIEhIOm1tJyxcbiAgICAgICAgTExMTCA6ICdkZGRk2IwgRCBNTU1NIFlZWVkgSEg6bW0nXG4gICAgfSxcbiAgICBtZXJpZGllbVBhcnNlOiAv2LXYqNitfNi02KfZhS8sXG4gICAgaXNQTSA6IGZ1bmN0aW9uIChpbnB1dCkge1xuICAgICAgICByZXR1cm4gJ9i02KfZhScgPT09IGlucHV0O1xuICAgIH0sXG4gICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG4gICAgICAgIGlmIChob3VyIDwgMTIpIHtcbiAgICAgICAgICAgIHJldHVybiAn2LXYqNitJztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gJ9i02KfZhSc7XG4gICAgfSxcbiAgICBjYWxlbmRhciA6IHtcbiAgICAgICAgc2FtZURheSA6ICdb2KLYrCDYqNmI2YLYql0gTFQnLFxuICAgICAgICBu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XN0V2VlayA6ICdbTH7DoXN0XSBkZGRkIFvDoXRdIExUJyxcbiAgICAgICAgc2FtZUVsc2UgOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJ8OtfsOxICVzJyxcbiAgICAgICAgcGFzdCA6ICclcyDDoX5nw7MnLFxuICAgICAgICBzIDogJ8OhIH5mw6l3IH5zw6ljw7N+w7FkcycsXG4gICAgICAgIG0gOiAnw6Egfm3DrcOxfsO6dMOpJyxcbiAgICAgICAgbW0gOiAnJWQgbX7DrcOxw7p+dMOpcycsXG4gICAgICAgIGggOiAnw6F+w7EgaMOzfsO6cicsXG4gICAgICAgIGhoIDogJyVkIGh+w7PDunJzJyxcbiAgICAgICAgZCA6ICfDoSB+ZMOhw70nLFxuICAgICAgICBkZCA6ICclZCBkfsOhw71zJyxcbiAgICAgICAgTSA6ICfDoSB+bcOzw7F+dGgnLFxuICAgICAgICBNTSA6ICclZCBtfsOzw7F0fmhzJyxcbiAgICAgICAgeSA6ICfDoSB+w73DqcOhcicsXG4gICAgICAgIHl5IDogJyVkIMO9fsOpw6FycydcbiAgICB9LFxuICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2U6IC9cXGR7MSwyfSh0aHxzdHxuZHxyZCkvLFxuICAgIG9yZGluYWwgOiBmdW5jdGlvbiAobnVtYmVyKSB7XG4gICAgICAgIHZhciBiID0gbnVtYmVyICUgMTAsXG4gICAgICAgICAgICBvdXRwdXQgPSAofn4obnVtYmVyICUgMTAwIC8gMTApID09PSAxKSA/ICd0aCcgOlxuICAgICAgICAgICAgKGIgPT09IDEpID8gJ3N0JyA6XG4gICAgICAgICAgICAoYiA9PT0gMikgPyAnbmQnIDpcbiAgICAgICAgICAgIChiID09PSAzKSA/ICdyZCcgOiAndGgnO1xuICAgICAgICByZXR1cm4gbnVtYmVyICsgb3V0cHV0O1xuICAgIH0sXG4gICAgd2VlayA6IHtcbiAgICAgICAgZG93IDogMSwg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i+WNiHzmmZrkuIovLFxuICAgIG1lcmlkaWVtSG91cjogZnVuY3Rpb24gKGhvdXIsIG1lcmlkaWVtKSB7XG4gICAgICAgIGlmIChob3VyID09PSAxMikge1xuICAgICAgICAgICAgaG91ciA9IDA7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lcmlkaWVtID09PSAn5YeM5pmoJyB8fCBtZXJpZGllbSA9PT0gJ+aXqeS4iicgfHxcbiAgICAgICAgICAgICAgICBtZXJpZGllbSA9PT0gJ+S4iuWNiCcpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn5LiL5Y2IJyB8fCBtZXJpZGllbSA9PT0gJ+aZmuS4iicpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyICsgMTI7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvLyAn5Lit5Y2IJ1xuICAgICAgICAgICAgcmV0dXJuIGhvdXIgPj0gMTEgPyBob3VyIDogaG91ciArIDEyO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcbiAgICAgICAgdmFyIGhtID0gaG91ciAqIDEwMCArIG1pbnV0ZTtcbiAgICAgICAgaWYgKGhtIDwgNjAwKSB7XG4gICAgICAgICAgICByZXR1cm4gJ+WHjOaZqCc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG0gPCA5MDApIHtcbiAgICAgICAgICAgIHJldHVybiAn5pep5LiKJztcbiAgICAgICAgfSBlbHNlIGlmIChobSA8IDExMzApIHtcbiAgICAgICAgICAgIHJldHVybiAn5LiK5Y2IJztcbiAgICAgICAgfSBlbHNlIGlmIChobSA8IDEyMzApIHtcbiAgICAgICAgICAgIHJldHVybiAn5Lit5Y2IJztcbiAgICAgICAgfSBlbHNlIGlmIChobSA8IDE4MDApIHtcbiAgICAgICAgICAgIHJldHVybiAn5LiL5Y2IJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAn5pma5LiKJztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXkgOiAnW+S7iuWkqV1MVCcsXG4gICAgICAgIG5leHREYXkgOiAnW+aYjuWkqV1MVCcsXG4gICAgICAgIG5leHRXZWVrIDogJ1vkuItdZGRkZExUJyxcbiAgICAgICAgbGFzdERheSA6ICdb5pio5aSpXUxUJyxcbiAgICAgICAgbGFzdFdlZWsgOiAnW+S4il1kZGRkTFQnLFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgZGF5T2ZNb250aE9yZGluYWxQYXJzZTogL1xcZHsxLDJ9KOaXpXzmnIh85ZGoKS8sXG4gICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIsIHBlcmlvZCkge1xuICAgICAgICBzd2l0Y2ggKHBlcmlvZCkge1xuICAgICAgICAgICAgY2FzZSAnZCc6XG4gICAgICAgICAgICBjYXNlICdEJzpcbiAgICAgICAgICAgIGNhc2UgJ0RERCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICfml6UnO1xuICAgICAgICAgICAgY2FzZSAnTSc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICfmnIgnO1xuICAgICAgICAgICAgY2FzZSAndyc6XG4gICAgICAgICAgICBjYXNlICdXJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJ+WRqCc7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXI7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJyVz5YaFJyxcbiAgICAgICAgcGFzdCA6ICclc+WJjScsXG4gICAgICAgIHMgOiAn5Yeg56eSJyxcbiAgICAgICAgbSA6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uICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn5LiL5Y2IJyB8fCBtZXJpZGllbSA9PT0gJ+aZmuS4iicpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyICsgMTI7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIG1lcmlkaWVtIDogZnVuY3Rpb24gKGhvdXIsIG1pbnV0ZSwgaXNMb3dlcikge1xuICAgICAgICB2YXIgaG0gPSBob3VyICogMTAwICsgbWludXRlO1xuICAgICAgICBpZiAoaG0gPCA2MDApIHtcbiAgICAgICAgICAgIHJldHVybiAn5YeM5pmoJztcbiAgICAgICAgfSBlbHNlIGlmIChobSA8IDkwMCkge1xuICAgICAgICAgICAgcmV0dXJuICfml6nkuIonO1xuICAgICAgICB9IGVsc2UgaWYgKGhtIDwgMTEzMCkge1xuICAgICAgICAgICAgcmV0dXJuICfkuIrljYgnO1xuICAgICAgICB9IGVsc2UgaWYgKGhtIDwgMTIzMCkge1xuICAgICAgICAgICAgcmV0dXJuICfkuK3ljYgnO1xuICAgICAgICB9IGVsc2UgaWYgKGhtIDwgMTgwMCkge1xuICAgICAgICAgICAgcmV0dXJuICfkuIvljYgnO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICfmmZrkuIonO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBjYWxlbmRhciA6IHtcbiAgICAgICAgc2FtZURheSA6ICdb5LuK5aSpXUxUJyxcbiAgICAgICAgbmV4dERheSA6ICdb5piO5aSpXUxUJyxcbiAgICAgICAgbmV4dFdlZWsgOiAnW+S4i11kZGRkTFQnLFxuICAgICAgICBsYXN0RGF5IDogJ1vmmKjlpKldTFQnLFxuICAgICAgICBsYXN0V2VlayA6ICdb5LiKXWRkZGRMVCcsXG4gICAgICAgIHNhbWVFbHNlIDogJ0wnXG4gICAgfSxcbiAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn0o5pelfOaciHzpgLEpLyxcbiAgICBvcmRpbmFsIDogZnVuY3Rpb24gKG51bWJlciwgcGVyaW9kKSB7XG4gICAgICAgIHN3aXRjaCAocGVyaW9kKSB7XG4gICAgICAgICAgICBjYXNlICdkJyA6XG4gICAgICAgICAgICBjYXNlICdEJyA6XG4gICAgICAgICAgICBjYXNlICdEREQnIDpcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJ+aXpSc7XG4gICAgICAgICAgICBjYXNlICdNJyA6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICfmnIgnO1xuICAgICAgICAgICAgY2FzZSAndycgOlxuICAgICAgICAgICAgY2FzZSAnVycgOlxuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAn6YCxJztcbiAgICAgICAgICAgIGRlZmF1bHQgOlxuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXI7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJyVz5YWnJyxcbiAgICAgICAgcGFzdCA6ICclc+WJjScsXG4gICAgICAgIHMgOiAn5bm+56eSJyxcbiAgICAgICAgbSA6ICcxIOWIhumQmCcsXG4gICAgICAgIG1tIDogJyVkIOWIhumQmCcsXG4gICAgICAgIGggOiAnMSDlsI/mmYInLFxuICAgICAgICBoaCA6ICclZCDlsI/mmYInLFxuICAgICAgICBkIDogJzEg5aSpJyxcbiAgICAgICAgZGQgOiAnJWQg5aSpJyxcbiAgICAgICAgTSA6ICcxIOWAi+aciCcsXG4gICAgICAgIE1NIDogJyVkIOWAi+aciCcsXG4gICAgICAgIHkgOiAnMSDlubQnLFxuICAgICAgICB5eSA6ICclZCDlubQnXG4gICAgfVxufSk7XG5cbnJldHVybiB6aEhrO1xuXG59KSkpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9+L21vbWVudC9sb2NhbGUvemgtaGsuanNcbi8vIG1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JyB8fCBtZXJpZGllbSA9PT0gJ+S4iuWNiCcpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn5Lit5Y2IJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXIgPj0gMTEgPyBob3VyIDogaG91ciArIDEyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn5LiL5Y2IJyB8fCBtZXJpZGllbSA9PT0gJ+aZmuS4iicpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyICsgMTI7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIG1lcmlkaWVtIDogZnVuY3Rpb24gKGhvdXIsIG1pbnV0ZSwgaXNMb3dlcikge1xuICAgICAgICB2YXIgaG0gPSBob3VyICogMTAwICsgbWludXRlO1xuICAgICAgICBpZiAoaG0gPCA2MDApIHtcbiAgICAgICAgICAgIHJldHVybiAn5YeM5pmoJztcbiAgICAgICAgfSBlbHNlIGlmIChobSA8IDkwMCkge1xuICAgICAgICAgICAgcmV0dXJuICfml6nkuIonO1xuICAgICAgICB9IGVsc2UgaWYgKGhtIDwgMTEzMCkge1xuICAgICAgICAgICAgcmV0dXJuICfkuIrljYgnO1xuICAgICAgICB9IGVsc2UgaWYgKGhtIDwgMTIzMCkge1xuICAgICAgICAgICAgcmV0dXJuICfkuK3ljYgnO1xuICAgICAgICB9IGVsc2UgaWYgKGhtIDwgMTgwMCkge1xuICAgICAgICAgICAgcmV0dXJuICfkuIvljYgnO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICfmmZrkuIonO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBjYWxlbmRhciA6IHtcbiAgICAgICAgc2FtZURheSA6ICdb5LuK5aSpXUxUJyxcbiAgICAgICAgbmV4dERheSA6ICdb5piO5aSpXUxUJyxcbiAgICAgICAgbmV4dFdlZWsgOiAnW+S4i11kZGRkTFQnLFxuICAgICAgICBsYXN0RGF5IDogJ1vmmKjlpKldTFQnLFxuICAgICAgICBsYXN0V2VlayA6ICdb5LiKXWRkZGRMVCcsXG4gICAgICAgIHNhbWVFbHNlIDogJ0wnXG4gICAgfSxcbiAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn0o5pelfOaciHzpgLEpLyxcbiAgICBvcmRpbmFsIDogZnVuY3Rpb24gKG51bWJlciwgcGVyaW9kKSB7XG4gICAgICAgIHN3aXRjaCAocGVyaW9kKSB7XG4gICAgICAgICAgICBjYXNlICdkJyA6XG4gICAgICAgICAgICBjYXNlICdEJyA6XG4gICAgICAgICAgICBjYXNlICdEREQnIDpcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJ+aXpSc7XG4gICAgICAgICAgICBjYXNlICdNJyA6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICfmnIgnO1xuICAgICAgICAgICAgY2FzZSAndycgOlxuICAgICAgICAgICAgY2FzZSAnVycgOlxuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAn6YCxJztcbiAgICAgICAgICAgIGRlZmF1bHQgOlxuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXI7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJyVz5YWnJyxcbiAgICAgICAgcGFzdCA6ICclc+WJjScsXG4gICAgICAgIHMgOiAn5bm+56eSJyxcbiAgICAgICAgbSA6ICcxIOWIhumQmCcsXG4gICAgICAgIG1tIDogJyVkIOWIhumQmCcsXG4gICAgICAgIGggOiAnMSDlsI/mmYInLFxuICAgICAgICBoaCA6ICclZCDlsI/mmYInLFxuICAgICAgICBkIDogJzEg5aSpJyxcbiAgICAgICAgZGQgOiAnJWQg5aSpJyxcbiAgICAgICAgTSA6ICcxIOWAi+aciCcsXG4gICAgICAgIE1NIDogJyVkIOWAi+aciCcsXG4gICAgICAgIHkgOiAn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hbWUsIHZhbHVlLCBleHBpcmVzLCBwYXRoLCBkb21haW4sIHNlY3VyZSkge1xuICAgICAgICB2YXIgY29va2llID0gW107XG4gICAgICAgIGNvb2tpZS5wdXNoKG5hbWUgKyAnPScgKyBlbmNvZGVVUklDb21wb25lbnQodmFsdWUpKTtcblxuICAgICAgICBpZiAodXRpbHMuaXNOdW1iZXIoZXhwaXJlcykpIHtcbiAgICAgICAgICBjb29raWUucHVzaCgnZXhwaXJlcz0nICsgbmV3IERhdGUoZXhwaXJlcykudG9HTVRTdHJpbmcoKSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodXRpbHMuaXNTdHJpbmcocGF0aCkpIHtcbiAgICAgICAgICBjb29raWUucHVzaCgncGF0aD0nICsgcGF0aCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodXRpbHMuaXNTdHJpbmcoZG9tYWluKSkge1xuICAgICAgICAgIGNvb2tpZS5wdXNoKCdkb21haW49JyArIGRvbWFpbik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc2VjdXJlID09PSB0cnVlKSB7XG4gICAgICAgICAgY29va2llLnB1c2goJ3NlY3VyZScpO1xuICAgICAgICB9XG5cbiAgICAgICAgZG9jdW1lbnQuY29va2llID0gY29va2llLmpvaW4oJzsgJyk7XG4gICAgICB9LFxuXG4gICAgICByZWFkOiBmdW5jdGlvbiByZWFkKG5hbWUpIHtcbiAgICAgICAgdmFyIG1hdGNoID0gZG9jdW1lbnQuY29va2llLm1hdGNoKG5ldyBSZWdFeHAoJyhefDtcXFxccyopKCcgKyBuYW1lICsgJyk9KFteO10qKScpKTtcbiAgICAgICAgcmV0dXJuIChtYXRjaCA/IGRlY29kZVVSSUNvbXBvbmVudChtYXRjaFszXSkgOiBudWxsKTtcbiAgICAgIH0sXG5cbiAgICAgIHJlbW92ZTogZnVuY3Rpb24gcmVtb3ZlKG5hbWUpIHtcbiAgICAgICAgdGhpcy53cml0ZShuYW1lLCAnJywgRGF0ZS5ub3coKSAtI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gICAgICAgICAgZGVyaXZlZC5wcm90b3R5cGUgPSBuZXcgZigpO1xuICAgICAgICB9XG5cbiAgICAgICAgZGVyaXZlZC5wcm90b3R5cGUuY29uc3RydWN0b3IgPSBkZXJpdmVkO1xuXG4gICAgICAgIHJldHVybiBkZXJpdmVkO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIENoYXJ0KGNvbmZpZykge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLmludGVybmFsID0gbmV3IENoYXJ0SW50ZXJuYWwodGhpcyk7XG4gICAgICAgICQkLmxvYWRDb25maWcoY29uZmlnKTtcblxuICAgICAgICAkJC5iZWZvcmVJbml0KGNvbmZpZyk7XG4gICAgICAgICQkLmluaXQoKTtcbiAgICAgICAgJCQuYWZ0ZXJJbml0KGNvbmZpZyk7XG5cbiAgICAgICAgLy8gYmluZCBcInRoaXNcIiB0byBuZXN0ZWQgQVBJXG4gICAgICAgIChmdW5jdGlvbiBiaW5kVGhpcyhmbiwgdGFyZ2V0LCBhcmdUaGlzKSB7XG4gICAgICAgICAgICBPYmplY3Qua2V5cyhmbikuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgICAgICAgICAgdGFyZ2V0W2tleV0gPSBmbltrZXldLmJpbmQoYXJnVGhpcyk7XG4gICAgICAgICAgICAgICAgaWYgKE9iamVjdC5rZXlzKGZuW2tleV0pLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgYmluZFRoaXMoZm5ba2V5XSwgdGFyZ2V0W2tleV0sIGFyZ1RoaXMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KShjM19jaGFydF9mbiwgdGhpcywgdGhpcyk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gQ2hhcnRJbnRlcm5hbChhcGkpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcztcbiAgICAgICAgJCQuZDMgPSB3aW5kb3cuZDMgPyB3aW5kb3cuZDMgOi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0ZXh0IGF0IHkgcG9zaXRpb24gaW4gYWxsIGJyb3dzZXJzLCBleGNlcHQgSUUuXG5cbiAgICAgICAgLy8gUmVnaW9uc1xuICAgICAgICAkJC5pbml0UmVnaW9uKCk7XG5cbiAgICAgICAgLy8gR3JpZHNcbiAgICAgICAgJCQuaW5pdEdyaWQoKTtcblxuICAgICAgICAvLyBEZWZpbmUgZyBmb3IgY2hhcnQgYXJlYVxuICAgICAgICBtYWluLmFwcGVuZCgnZycpXG4gICAgICAgICAgICAuYXR0cihcImNsaXAtcGF0aFwiLCAkJC5jbGlwUGF0aClcbiAgICAgICAgICAgIC5hdHRyKCdjbGFzcycsIENMQVNTLmNoYXJ0KTtcblxuICAgICAgICAvLyBHcmlkIGxpbmVzXG4gICAgICAgIGlmIChjb25maWcuZ3JpZF9saW5lc19mcm9udCkgeyAkJC5pbml0R3JpZExpbmVzKCk7IH1cblxuICAgICAgICAvLyBDb3ZlciB3aG9sZSB3aXRoIHJlY3RzIGZvciBldmVudHNcbiAgICAgICAgJCQuaW5pdEV2ZW50UmVjdCgpO1xuXG4gICAgICAgIC8vIERlZmluZSBnIGZvciBjaGFydFxuICAgICAgICAkJC5pbml0Q2hhcnRFbGVtZW50cygpO1xuXG4gICAgICAgIC8vIGlmIHpvb20gcHJpdmlsZWdlZCwgaW5zZXJ0IHJlY3QgdG8gZm9yZWZyb250XG4gICAgICAgIC8vIFRPRE86IGlzIHRoaXMgbmVlZGVkP1xuICAgICAgICBtYWluLmluc2VydCgncmVjdCcsIGNvbmZpZy56b29tX3ByaXZpbGVnZWQgPyBudWxsIDogJ2cuJyArIENMQVNTLnJlZ2lvbnMpXG4gICAgICAgICAgICAuYXR0cignY2xhc3MnLCBDTEFTUy56b29tUmVjdClcbiAgICAgICAgICAgIC5hdHRyKCd3aWR0aCcsICQkLndpZHRoKVxuICAgICAgICAgICAgLmF0dHIoJ2hlaWdodCcsICQkLmhlaWdodClcbiAgICAgICAgICAgIC5zdHlsZSgnb3BhY2l0eScsIDApXG4gICAgICAgICAgICAub24oXCJkYmxjbGljay56b29tXCIsIG51bGwpO1xuXG4gICAgICAgIC8vIFNldCBkZWZhdWx0IGV4dGVudCBpZiBkZWZpbmVkXG4gICAgICAgIGlmIChjb25maWcuYXhpc194X2V4dGVudCkgeyAkJC5icnVzaC5leHRlbnQoJCQuZ2V0RGVmYXVsdEV4dGVudCgpKTsgfVxuXG4gICAgICAgIC8vIEFkZCBBeGlzXG4gICAgICAgICQkLmF4aXMuaW5pdCgpO1xuXG4gICAgICAgIC8vIFNldCB0YXJnZXRzXG4gICAgICAgICQkLnVwZGF0ZVRhcmdldHMoJCQuZGF0YS50YXJnZXRzKTtcblxuICAgICAgICAvLyBEcmF3IHdpdGggdGFyZ2V0c1xuICAgICAgICBpZiAoYmluZGluZykge1xuICAgICAgICAgICAgJCQudXBkYXRlRGltZW5zaW9uKCk7XG4gICAgICAgICAgICAkJC5jb25maWcub25pbml0LmNhbGwoJCQpO1xuICAgICAgICAgICAgJCQucmVkcmF3KHtcbiAgICAgICAgICAgICAgICB3aXRoVHJhbnNpdGlvbjogZmFsc2UsXG4gICAgICAgICAgICAgICAgd2l0aFRyYW5zZm9ybTogdHJ1ZSxcbiAgICAgICAgICAgICAgICB3aXRoVXBkYXRlWERvbWFpbjogdHJ1ZSxcbiAgICAgICAgICAgICAgICB3aXRoVXBkYXRlT3JnWERvbWFpbjogdHJ1ZSxcbiAgICAgICAgICAgICAgICB3aXRoVHJhbnNpdGlvbkZvckF4aXM6IGZhbHNlXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEJpbmQgcmVzaXplIGV2ZW50XG4gICAgICAgICQkLmJpbmRSZXNpemUoKTtcblxuICAgICAgICAvLyBleHBvcnQgZWxlbWVudCBvZiB0aGUgY2hhcnRcbiAgICAgICAgJCQuYXBpLmVsZW1lbnQgPSAkJC5zZWxlY3RDaGFydC5ub2RlKCk7XG4gICAgfTtcblxuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnNtb290aExpbmVzID0gZnVuY3Rpb24gKGVsLCB0eXBlKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXM7XG4gICAgICAgIGlmICh0eXBlID09PSAnZ3JpZCcpIHtcbiAgICAgICAgICAgIGVsLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHZhciBnID0gJCQuZDMuc2VsZWN0KHRoaXMpLFxuICAgICAgICAgICAgICAgICAgICB4MSA9IGcuYXR0cigneDEnKSxcbiAgICAgICAgICAgICAgICAgICAgeDIgPSBnLmF0dHIoJ3gyJyksXG4gICAgICAgICAgICAgICAgICAgIHkxID0gZy5hdHRyKCd5MScpLFxuICAgICAgICAgICAgICAgICAgICB5MiA9IGcuYXR0cigneTInKTtcbiAgICAgICAgICAgICAgICBnLmF0dHIoe1xuICAgICAgICAgICAgICAgICAgICAneDEnOiBNYXRoLmNlaWwoeDEpLFxuICAgICAgICAgICAgICAgICAgICAneDInOiBNYXRoLmNlaWwoeDIpLFxuICAgICAgICAgICAgICAgICAgICAneTEnOiBNYXRoLmNlaWwoeTEpLFxuICAgICAgICAgICAgICAgICAgICAneTInOiBNYXRoLmNlaWwoeTIpXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH07XG5cblxuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnVwZGF0ZVNpemVzID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWc7XG4gICAgICAgIHZhciBsZWdlbmRIZWlnaHQgPSAkJC5sZWdlbmQgPyAkJC5nZXRMZWdlbmRIZWlnaHQoKSA6IDAsXG4gICAgICAgICAgICBsZWdlbmRXaWR0aCA9ICQkLmxlZ2VuZCA/ICQkLmdldExlZ2VuZFdpZHRoKCkgOiAwLFxuICAgICAgICAgICAgbGVnZW5kSGVpZ2h0Rm9yQm90dG9tID0gJCQu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ICAgfSA6IHtcbiAgICAgICAgICAgIHRvcDogNCArICQkLmdldEN1cnJlbnRQYWRkaW5nVG9wKCksIC8vIGZvciB0b3AgdGljayB0ZXh0XG4gICAgICAgICAgICByaWdodDogaGFzQXJjID8gMCA6ICQkLmdldEN1cnJlbnRQYWRkaW5nUmlnaHQoKSxcbiAgICAgICAgICAgIGJvdHRvbTogeEF4aXNIZWlnaHQgKyBzdWJjaGFydEhlaWdodCArIGxlZ2VuZEhlaWdodEZvckJvdHRvbSArICQkLmdldEN1cnJlbnRQYWRkaW5nQm90dG9tKCksXG4gICAgICAgICAgICBsZWZ0OiBoYXNBcmMgPyAwIDogJCQuZ2V0Q3VycmVudFBhZGRpbmdMZWZ0KClcbiAgICAgICAgfTtcblxuICAgICAgICAvLyBmb3Igc3ViY2hhcnRcbiAgICAgICAgJCQubWFyZ2luMiA9IGNvbmZpZy5heGlzX3JvdGF0ZWQgPyB7XG4gICAgICAgICAgICB0b3A6ICQkLm1hcmdpbi50b3AsXG4gICAgICAgICAgICByaWdodDogTmFOLFxuICAgICAgICAgICAgYm90dG9tOiAyMCArIGxlZ2VuZEhlaWdodEZvckJvdHRvbSxcbiAgICAgICAgICAgIGxlZnQ6ICQkLnJvdGF0ZWRfcGFkZGluZ19sZWZ0XG4gICAgICAgIH0gOiB7XG4gICAgICAgICAgICB0b3A6ICQkLmN1cnJlbnRIZWlnaHQgLSBzdWJjaGFydEhlaWdodCAtIGxlZ2VuZEhlaWdodEZvckJvdHRvbSxcbiAgICAgICAgICAgIHJpZ2h0OiBOYU4sXG4gICAgICAgICAgICBib3R0b206IHhBeGlzSGVpZ2h0ICsgbGVnZW5kSGVpZ2h0Rm9yQm90dG9tLFxuICAgICAgICAgICAgbGVmdDogJCQubWFyZ2luLmxlZnRcbiAgICAgICAgfTtcblxuICAgICAgICAvLyBmb3IgbGVnZW5kXG4gICAgICAgICQkLm1hcmdpbjMgPSB7XG4gICAgICAgICAgICB0b3A6IDAsXG4gICAgICAgICAgICByaW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ICYmIHRhcmdldHNUb1Nob3cubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAkJC54LmRvbWFpbihbMCwgJCQuYXhlcy54LnNlbGVjdEFsbCgnLnRpY2snKS5zaXplKCldKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0YXJnZXRzVG9TaG93Lmxlbmd0aCkge1xuICAgICAgICAgICAgJCQudXBkYXRlWERvbWFpbih0YXJnZXRzVG9TaG93LCB3aXRoVXBkYXRlWERvbWFpbiwgd2l0aFVwZGF0ZU9yZ1hEb21haW4sIHdpdGhUcmltWERvbWFpbik7XG4gICAgICAgICAgICBpZiAoIWNvbmZpZy5heGlzX3hfdGlja192YWx1ZXMpIHtcbiAgICAgICAgICAgICAgICB0aWNrVmFsdWVzID0gJCQuYXhpcy51cGRhdGVYQXhpc1RpY2tWYWx1ZXModGFyZ2V0c1RvU2hvdyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAkJC54QXhpcy50aWNrVmFsdWVzKFtdKTtcbiAgICAgICAgICAgICQkLnN1YlhBeGlzLnRpY2tWYWx1ZXMoW10pO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGNvbmZpZy56b29tX3Jlc2NhbGUgJiYgIW9wdGlvbnMuZmxvdykge1xuICAgICAgICAgICAgeERvbWFpbkZvclpvb20gPSAkJC54Lm9yZ0RvbWFpbigpO1xuICAgICAgICB9XG5cbiAgICAgICAgJCQueS5kb21haW4oJCQuZ2V0WURvbWFpbih0YXJnZXRzVG9TaG93LCAneScsIHhEb21haW5Gb3Jab29tKSk7XG4gICAgICAgICQkLnkyLmRvbWFpbigkJC5nZXRZRG9tYWluKHRhcmdldHNUb1Nob3csICd5MicsIHhEb21haW5Gb3Jab29tKSk7XG5cbiAgICAgICAgaWYgKCFjb25maWcuYXhpc195X3RpY2tfdmFsdWVzICYmIGNvbmZpZy5heGlzX3lfdGlja19jb3VudCkge1xuICAgICAgICAgICAgJCQueUF4aXMudGlja1ZhbHVlcygkJC5heGlzLmdlbmVyYXRlVGlja1ZhbHVlcygkJC55LmRvbWFpbigpLCBjb25maWcuYXhpc195X3RpY2tfY291bnQpKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIWNvbmZpZy5heGlzX3kyX3RpY2tfdmFsdWVzICYmIGNvbmZpZy5heGlzX3kyX3RpY2tfY291bnQpIHtcbiAgICAgICAgICAgICQkLnkyQXhpcy50aWNrVmFsdWVzKCQkLmF4aXMuZ2VuZXJhdGVUaWNrVmFsdWVzKCQkLnkyLmRvbWFpbigpLCBjb25maWcuYXhpc195Ml90aWNrX2NvdW50KSk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBheGVzXG4gICAgICAgICQkLmF4aXMucmVkcmF3KHRyYW5zaXRpb25zLCBoaWRlQXhpcyk7XG5cbiAgICAgICAgLy8gVXBkYXRlIGF4aXMgbGFiZWxcbiAgICAgICAgJCQuYXhpcy51cGRhdGVMYWJlbHMod2l0aFRyYW5zaXRpb24pO1xuXG4gICAgICAgIC8vIHNob3cvaGlkZSBpZiBtYW51YWwgY3VsbGluZyBuZWVkZWRcbiAgICAgICAgaWYgKCh3aXRoVXBkYXRlWERvbWFpbiB8fCB3aXRoVXBkYXRlWEF4aXMpICYmIHRhcmdldHNUb1Nob3cubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoY29uZmlnLmF4aXNfeF90aWNrX2N1bGxpbmcgJiYgdGlja1ZhbHVlcykge1xuICAgICAgICAgICAgICAgIGZvciAoaSA9IDE7IGkgPCB0aWNrVmFsdWVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aWNrVmFsdWVzLmxlbmd0aCAvIGkgPCBjb25maWcuYXhpc194X3RpY2tfY3VsbGluZ19tYXgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGludGVydmFsRm9yQ3VsbGluZyA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAkJC5zdmcuc2VsZWN0QWxsKCcuJyArIENMQVNTLmF4aXNYICsgJyAudGljayB0ZXh0JykuZWFjaChmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgaW5kZXggPSB0aWNrVmFsdWVzLmluZGV4T2YoZSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkMy5zZWxlY3QodGhpcykuc3R5bGUoJ2Rpc3BsYXknLCBpbmRleCAlIGludGVydmFsRm9yQ3VsbGluZyA/ICdub25lJyA6ICdibG9jaycpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICQkLnN2Zy5zZWxlY3RBbGwoJy4nICsgQ0xBU1MuYXhpc1ggKyAnIC50aWNrIHRleHQnKS5zdHlsZSgnZGlzcGxheScsICdibG9jaycpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gc2V0dXAgZHJhd2VyIC0gTUVNTzogdGhlc2UgbXVzdCBiZSBjYWxsZWQgYWZ0ZXIgYXhpcyB1cGRhdGVkXG4gICAgICAgIGRyYXdBcmVhID0gJCQuZ2VuZXJhdGVEcmF3QXJlYSA/ICQkLmdlbmVyYXRlRHJhd0FyZWEoYXJlYUluZGljZXMsIGZhbHNlKSA6IHVuZGVmaW5lZDtcbiAgICAgICAgZHJhd0JhciA9ICQkLmdlbmVyYXRlRHJhd0JhciA/ICQkLmdlbmVyYXRlRHJhd0JhcihiYXJJbmRpY2VzKSA6IHVuZGVmaW5lZDtcbiAgICAgICAgZHJhd0xpbmUgPSAkJC5nZW5lcmF0ZURyYXdMaW5lID8gJCQuZ2VuZXJhdGVEcmF3TGluZShsaW5lSW5kaWNlcywgZmFsc2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y5kdXJhdGlvbixcbiAgICAgICAgICAgICAgICBkcmF3QmFyOiBkcmF3QmFyLFxuICAgICAgICAgICAgICAgIGRyYXdMaW5lOiBkcmF3TGluZSxcbiAgICAgICAgICAgICAgICBkcmF3QXJlYTogZHJhd0FyZWEsXG4gICAgICAgICAgICAgICAgY3g6IGN4LFxuICAgICAgICAgICAgICAgIGN5OiBjeSxcbiAgICAgICAgICAgICAgICB4djogeHYsXG4gICAgICAgICAgICAgICAgeEZvclRleHQ6IHhGb3JUZXh0LFxuICAgICAgICAgICAgICAgIHlGb3JUZXh0OiB5Rm9yVGV4dFxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoKGR1cmF0aW9uIHx8IGZsb3cpICYmICQkLmlzVGFiVmlzaWJsZSgpKSB7IC8vIE9ubHkgdXNlIHRyYW5zaXRpb24gaWYgdGFiIHZpc2libGUuIFNlZSAjOTM4LlxuICAgICAgICAgICAgLy8gdHJhbnNpdGlvbiBzaG91bGQgYmUgZGVyaXZlZCBmcm9tIG9uZSB0cmFuc2l0aW9uXG4gICAgICAgICAgICBkMy50cmFuc2l0aW9uKCkuZHVyYXRpb24oZHVyYXRpb24pLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHZhciB0cmFuc2l0aW9uc1RvV2FpdCA9IFtdO1xuXG4gICAgICAgICAgICAgICAgLy8gcmVkcmF3IGFuZCBnYXRoZXIgdHJhbnNpdGlvbnNcbiAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICQkLnJlZHJhd0JhcihkcmF3QmFyLCB0cnVlKSxcbiAgICAgICAgICAgICAgICAgICAgJCQucmVkcmF3TGluZShkcmF3TGluZSwgdHJ1ZSksXG4gICAgICAgICAgICAgICAgICAgICQkLnJlZHJhd0FyZWEoZHJhd0FyZWEsIHRydWUpLFxuICAgICAgICAgICAgICAgICAgICAkJC5yZWRyYXdDaXJjbGUoY3gsIGN5LCB0cnVlKSxcbiAgICAgICAgICAgICAgICAgICAgJCQucmVkcmF3VGV4dCh4Rm9yVGV4dCwgeUZvclRleHQsIG9wdGlvbnMuZmxvdywgdHJ1ZSksXG4gICAgICAgICAgICAgICAgICAgICQkLnJlZHJhd1JlZ2lvbih0cnVlKSxcbiAgICAgICAgICAgICAgICAgICAgJCQucmVkcmF3R3JpZCh0cnVlKSxcbiAgICAgICAgICAgICAgICBdLmZvckVhY2goZnVuY3Rpb24gKHRyYW5zaXRpb25zKSB7XG4gICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb25zLmZvckVhY2goZnVuY3Rpb24gKHRyYW5zaXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb25zVG9XYWl0LnB1c2godHJhbnNpdGlvbik7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgLy8gV2FpdCBmb3IgZW5kIG9mIHRyYW5zaXRpb25zIHRvIGNhbGwgZmxvdyBhbmQgb25yZW5kZXJlZCBjYWxsYmFja1xuICAgICAgICAgICAgICAgIHdhaXRGb3JEcmF3ID0gJCQuZ2VuZXJhdGVXYWl0KCk7XG4gICAgICAgICAgICAgICAgdHJhbnNpdGlvbnNUb1dhaXQuZm9yRWFjaChmdW5jdGlvbiAodCkge1xuICAgICAgICAgICAgICAgICAgICB3YWl0Rm9yRHJhdy5hZGQodCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmNhbGwod2FpdEZvckRyYXcsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBpZiAoZmxvdykge1xuICAgICAgICAgICAgICAgICAgICBmbG93KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChjb25maWcub25yZW5kZXJlZCkge1xuICAgICAgICAgICAgICAgICAgICBjb25maWcub25yZW5kZXJlZC5jYWxsKCQkKTtcbiAgICAgICA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pZ2h0JywgJCQuY3VycmVudEhlaWdodCArIFwicHhcIik7XG4gICAgfTtcblxuXG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4udXBkYXRlRGltZW5zaW9uID0gZnVuY3Rpb24gKHdpdGhvdXRBeGlzKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXM7XG4gICAgICAgIGlmICghd2l0aG91dEF4aXMpIHtcbiAgICAgICAgICAgIGlmICgkJC5jb25maWcuYXhpc19yb3RhdGVkKSB7XG4gICAgICAgICAgICAgICAgJCQuYXhlcy54LmNhbGwoJCQueEF4aXMpO1xuICAgICAgICAgICAgICAgICQkLmF4ZXMuc3VieC5jYWxsKCQkLnN1YlhBeGlzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgJCQuYXhlcy55LmNhbGwoJCQueUF4aXMpO1xuICAgICAgICAgICAgICAgICQkLmF4ZXMueTIuY2FsbCgkJC55MkF4aXMpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgICQkLnVwZGF0ZVNpemVzKCk7XG4gICAgICAgICQkLnVwZGF0ZVNjYWxlcygpO1xuICAgICAgICAkJC51cGRhdGVTdmdTaXplKCk7XG4gICAgICAgICQkLnRyYW5zZm9ybUFsbChmYWxzZSk7XG4gICAgfTtcblxuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLm9ic2VydmVJbnNlcnRlZCA9IGZ1bmN0aW9uIChzZWxlY3Rpb24pIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgb2JzZXJ2ZXI7XG4gICAgICAgIGlmICh0eXBlb2YgTXV0YXRpb25PYnNlcnZlciA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgIHdpbmRvdy5jb25zb2xlLmVycm9yKFwiTXV0YXRpb25PYnNlcnZlciBub3QgZGVmaW5lZC5cIik7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgb2JzZXJ2ZXI9IG5ldyBNdXRhdGlvbk9ic2VydmVyKGZ1bmN0aW9uIChtdXRhdGlvbnMpIHtcbiAgICAgICAgICAgIG11dGF0aW9ucy5mb3JFYWNoKGZ1bmN0aW9uIChtdXRhdGlvbikge1xuICAgICAgICAgICAgICAgIGlmIChtdXRhdGlvbi50eXBlID09PSAnY2hpbGRMaXN0JyAmJiBtdXRhdGlvbi5wcmV2aW91c1NpYmxpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgb2JzZXJ2ZXIuZGlzY29ubmVjdCgpO1xuICAgICAgICAgICAgICAgICAgICAvLyBuZWVkIHRvIHdhaXQgZm9yIGNvbXBsZXRpb24gb2YgbG9hZCBiZWNhdXNlIHNpemUgY2FsY3VsYXRpb24gcmVxdWlyZXMgdGhlIGFjdHVhbCBzaXplcyBkZXRlcm1pbmVkIGFmdGVyIHRoYXQgY29tcGxldGlvblxuICAgICAgICAgICAgICAgICAgICAkJC5pbnRlcnZhbEZvck9ic2VydmVJbnNlcnRlZCA9IHdpbmRvdy5zZXRJbnRlcnZhbChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBwYXJlbnROb2RlIHdpbGwgTk9UIGJlIG51bGwgd2hlbiBjb21wbGV0ZWRcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWxlY3Rpb24ubm9kZSgpLnBhcmVudE5vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2xlYXJJbnRlcnZhbCgkJC5pbnRlcnZhbEZvck9ic2VydmVJbnNlcnRlZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQudXBkYXRlRGltZW5zaW9uKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCQkLmJydXNoKSB7ICQkLmJydXNoLnVwZGF0ZSgpOyB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQuY29uZmlnLm9uaW5pdC5jYWxsKCQkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC5yZWRyYXcoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoVHJhbnNmb3JtOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoVXBkYXRlWERvbWFpbjogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aFVwZGF0ZU9yZ1hEb21haW46IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhUcmFuc2l0aW9uOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aFRyYW5zaXRpb25Gb3JUcmFuc2Zvcm06IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoTGVnZW5kOiB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uLnRyYW5zaXRpb24oKS5zdHlsZSgnb3BhY2l0eScsIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LCAxMCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgICAgICBvYnNlcnZlci5vYnNlcnZlKHNlbGVjdGlvbi5ub2RlKCksIHthdHRyaWJ1dGVzOiB0cnVlLCBjaGlsZExpc3Q6IHRydWUsIGNoYXJhY3RlckRhdGE6IHRydWV9KTtcbiAgICB9O1xuXG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uYmluZFJlc2l6ZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnO1xuXG4gICAgICAgICQkLnJlc2l6ZUZ1bmN0aW9uID0gJCQuZ2VuZXJhdGVSZXNpemUoKTtcblxuICAgICAgICAkJC5yZXNpemVGdW5jdGlvbi5hZGQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgY29uZmlnLm9ucmVzaXplLmNhbGwoJCQpO1xuICAgICAgICB9KTtcbiAgICAgICAgaWYgKGNvbmZpZy5yZXNpemVfYXV0bykge1xuICAgICAgICAgICAgJCQucmVzaXplRnVuY3Rpb24uYWRkKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBpZiAoJCQucmVzaXplVGltZW91dCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jbGVhclRpbWVvdXQoJCQucmVzaXplVGltZW91dCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICQkLnJlc2l6ZVRpbWVvdXQgPSB3aW5kb3cuc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSAkJC5yZXNpemVUaW1lb3V0O1xuICAgICAgICAgICAgICAgICAgICAkJC5hcGkuZmx1c2goKTtcbiAgICAgICAgICAgICAgICB9LCAxMDApO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgJCQucmVzaXplRnVuY3Rpb24uYWRkKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGNvbmZpZy5vbnJlc2l6ZWQuY2FsbCgkJCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGlmICh3aW5kb3cuYXR0YWNoRXZlbnQpIHtcbiAgICAgICAgICAgIHdpbmRvdy5hdHRhY2hFdmVudCgnb25yZXNpemUnLCAkJC5yZXNpemVGdW5jdGlvbik7XG4gICAgICAgIH0gZWxzZSBpZiAod2luZG93LmFkZEV2ZW50TGlzdGVuZXIpIHtcbiAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdyZXNpemUnLCAkJC5yZXNpemVGdW5jdGlvbiwgZmFsc2UpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gZmFsbGJhY2sg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jaChmdW5jdGlvbiAoZikge1xuICAgICAgICAgICAgICAgIGYoKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIGNhbGxSZXNpemVGdW5jdGlvbnMuYWRkID0gZnVuY3Rpb24gKGYpIHtcbiAgICAgICAgICAgIHJlc2l6ZUZ1bmN0aW9ucy5wdXNoKGYpO1xuICAgICAgICB9O1xuICAgICAgICBjYWxsUmVzaXplRnVuY3Rpb25zLnJlbW92ZSA9IGZ1bmN0aW9uIChmKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHJlc2l6ZUZ1bmN0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGlmIChyZXNpemVGdW5jdGlvbnNbaV0gPT09IGYpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzaXplRnVuY3Rpb25zLnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gY2FsbFJlc2l6ZUZ1bmN0aW9ucztcbiAgICB9O1xuXG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZW5kYWxsID0gZnVuY3Rpb24gKHRyYW5zaXRpb24sIGNhbGxiYWNrKSB7XG4gICAgICAgIHZhciBuID0gMDtcbiAgICAgICAgdHJhbnNpdGlvblxuICAgICAgICAgICAgLmVhY2goZnVuY3Rpb24gKCkgeyArK247IH0pXG4gICAgICAgICAgICAuZWFjaChcImVuZFwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgaWYgKCEtLW4pIHsgY2FsbGJhY2suYXBwbHkodGhpcywgYXJndW1lbnRzKTsgfVxuICAgICAgICAgICAgfSk7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZW5lcmF0ZVdhaXQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciB0cmFuc2l0aW9uc1RvV2FpdCA9IFtdLFxuICAgICAgICAgICAgZiA9IGZ1bmN0aW9uICh0cmFuc2l0aW9uLCBjYWxsYmFjaykge1xuICAgICAgICAgICAgICAgIHZhciB0aW1lciA9IHNldEludGVydmFsKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRvbmUgPSAwO1xuICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9uc1RvV2FpdC5mb3JFYWNoKGZ1bmN0aW9uICh0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodC5lbXB0eSgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdC50cmFuc2l0aW9uKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9uZSArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRvbmUgPT09IHRyYW5zaXRpb25zVG9XYWl0Lmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2FsbGJhY2spIHsgY2FsbGJhY2soKTsgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSwgMTApO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgZi5hZGQgPSBmdW5jdGlvbiAodHJhbnNpdGlvbikge1xuICAgICAgICAgICAgdHJhbnNpdGlvbnNUb1dhaXQucHVzaCh0cmFuc2l0aW9uK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vb21fZW5hYmxlZDogZmFsc2UsXG4gICAgICAgICAgICB6b29tX2V4dGVudDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgem9vbV9wcml2aWxlZ2VkOiBmYWxzZSxcbiAgICAgICAgICAgIHpvb21fcmVzY2FsZTogZmFsc2UsXG4gICAgICAgICAgICB6b29tX29uem9vbTogZnVuY3Rpb24gKCkge30sXG4gICAgICAgICAgICB6b29tX29uem9vbXN0YXJ0OiBmdW5jdGlvbiAoKSB7fSxcbiAgICAgICAgICAgIHpvb21fb256b29tZW5kOiBmdW5jdGlvbiAoKSB7fSxcbiAgICAgICAgICAgIHpvb21feF9taW46IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIHpvb21feF9tYXg6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGludGVyYWN0aW9uX2JyaWdodGVuOiB0cnVlLFxuICAgICAgICAgICAgaW50ZXJhY3Rpb25fZW5hYmxlZDogdHJ1ZSxcbiAgICAgICAgICAgIG9ubW91c2VvdmVyOiBmdW5jdGlvbiAoKSB7fSxcbiAgICAgICAgICAgIG9ubW91c2VvdXQ6IGZ1bmN0aW9uICgpIHt9LFxuICAgICAgICAgICAgb25yZXNpemU6IGZ1bmN0aW9uICgpIHt9LFxuICAgICAgICAgICAgb25yZXNpemVkOiBmdW5jdGlvbiAoKSB7fSxcbiAgICAgICAgICAgIG9uaW5pdDogZnVuY3Rpb24gKCkge30sXG4gICAgICAgICAgICBvbnJlbmRlcmVkOiBmdW5jdGlvbiAoKSB7fSxcbiAgICAgICAgICAgIHRyYW5zaXRpb25fZHVyYXRpb246IDM1MCxcbiAgICAgICAgICAgIGRhdGFfeDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgZGF0YV94czoge30sXG4gICAgICAgICAgICBkYXRhX3hGb3JtYXQ6ICclWS0lbS0lZCcsXG4gICAgICAgICAgICBkYXRhX3hMb2NhbHRpbWU6IHRydWUsXG4gICAgICAgICAgICBkYXRhX3hTb3J0OiB0cnVlLFxuICA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Rpb24gKCkge30sXG4gICAgICAgICAgICBkYXRhX29uc2VsZWN0ZWQ6IGZ1bmN0aW9uICgpIHt9LFxuICAgICAgICAgICAgZGF0YV9vbnVuc2VsZWN0ZWQ6IGZ1bmN0aW9uICgpIHt9LFxuICAgICAgICAgICAgZGF0YV91cmw6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGRhdGFfaGVhZGVyczogdW5kZWZpbmVkLFxuICAgICAgICAgICAgZGF0YV9qc29uOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBkYXRhX3Jvd3M6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGRhdGFfY29sdW1uczogdW5kZWZpbmVkLFxuICAgICAgICAgICAgZGF0YV9taW1lVHlwZTogdW5kZWZpbmVkLFxuICAgICAgICAgICAgZGF0YV9rZXlzOiB1bmRlZmluZWQsXG4gICAgICAgICAgICAvLyBjb25maWd1cmF0aW9uIGZvciBubyBwbG90LWFibGUgZGF0YSBzdXBwbGllZC5cbiAgICAgICAgICAgIGRhdGFfZW1wdHlfbGFiZWxfdGV4dDogXCJcIixcbiAgICAgICAgICAgIC8vIHN1YmNoYXJ0XG4gICAgICAgICAgICBzdWJjaGFydF9zaG93OiBmYWxzZSxcbiAgICAgICAgICAgIHN1YmNoYXJ0X3NpemVfaGVpZ2h0OiA2MCxcbiAgICAgICAgICAgIHN1YmNoYXJ0X2F4aXNfeF9zaG93OiB0cnVlLFxuICAgICAgICAgICAgc3ViY2hhcnRfb25icnVzaDogZnVuY3Rpb24gKCkge30sXG4gICAgICAgICAgICAvLyBjb2xvclxuICAgICAgICAgICAgY29sb3JfcGF0dGVybjogW10sXG4gICAgICAgICAgICBjb2xvcl90aHJlc2hvbGQ6IHt9LFxuICAgICAgICAgICAgLy8gbGVnZW5kXG4gICAgICAgICAgICBsZWdlbmRfc2hvdzogdHJ1ZSxcbiAgICAgICAgICAgIGxlZ2VuZF9oaWRlOiBmYWxzZSxcbiAgICAgICAgICAgIGxlZ2VuZF9wb3NpdGlvbjogJ2JvdHRvbScsXG4gICAgICAgICAgICBsZWdlbmRfaW5zZXRfYW5jaG9yOiAndG9wLWxlZnQnLFxuICAgICAgICAgICAgbGVnZW5kX2luc2V0X3g6IDEwLFxuICAgICAgICAgICAgbGVnZW5kX2luc2V0X3k6IDAsXG4gICAgICAgICAgICBsZWdlbmRfaW5zZXRfc3RlcDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgbGVnZW5kX2l0ZW1fb25jbGljazogdW5kZWZpbmVkLFxuICAgICAgICAgICAgbGVnZW5kX2l0ZW1fb25tb3VzZW92ZXI6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGxlZ2VuZF9pdGVtX29ubW91c2VvdXQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGxlZ2VuZF9lcXVhbGx5OiBmYWxzZSxcbiAgICAgICAgICAgIGxlZ2VuZF9wYWRkaW5nOiAwLFxuICAgICAgICAgICAgbGVnZW5kX2l0ZW1fdGlsZV93aWR0aDogMTAsXG4gICAgICAgICAgICBsZWdlbmRfaXRlbV90aWxlX2hlaWdodDogMTAsXG4gICAgICAgICAgICAvLyBheGlzXG4gICAgICAgICAgICBheGlzX3JvdGF0ZWQ6IGZhbHNlLFxuICAgICAgICAgICAgYXhpc194X3Nob3c6IHRydWUsXG4gICAgICAgICAgICBheGlzX3hfdHlwZTogJ2luZGV4ZWQnLFxuICAgICAgICAgICAgYXhpc194X2xvY2FsdGltZTogdHJ1ZSxcbiAgICAgICAgICAgIGF4aXNfeF9jYXRlZ29yaWVzOiBbXSxcbiAgICAgICAgICAgIGF4aXNfeF90aWNrX2NlbnRlcmVkOiBmYWxzZSxcbiAgICAgICAgICAgIGF4aXNfeF90aWNrX2Zvcm1hdDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgYXhpc194X3RpY2tfY3VsbGluZzoge30sXG4gICAgICAgICAgICBheGlzX3hfdGlja19jdWxsaW5nX21heDogMTAsXG4gICAgICAgICAgICBheGlzX3hfdGlja19jb3VudDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgYXhpc194X3RpY2tfZml0OiB0cnVlLFxuICAgICAgICAgICAgYXhpc194X3RpY2tfdmFsdWVzOiBudWxsLFxuICAgICAgICAgICAgYXhpc194X3RpY2tfcm90YXRlOiAwLFxuICAgICAgICAgICAgYXhpc194X3RpY2tfb3V0ZXI6IHRydWUsXG4gICAgICAgICAgICBheGlzX3hfdGlja19tdWx0aWxpbmU6IHRydWUsXG4gICAgICAgICAgICBheGlzX3hfdGlja193aWR0aDogbnVsbCxcbiAgICAgICAgICAgIGF4aXNfeF9tYXg6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGF4aXNfeF9taW46IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGF4aXNfeF9wYWRkaW5nOiB7fSxcbiAgICAgICAgICAgIGF4aXNfeF9oZWlnaHQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGF4aXNfeF9leHRlbnQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGF4aXNfeF9sYWJlbDoge30sXG4gICAgICAgICAgICBheGlzX3lfc2hvdzogdHJ1ZSxcbiAgICAgICAgICAgIGF4aXNfeV90eXBlOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3lfbWF4OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3lfbWluOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3lfaW52ZXJ0ZWQ6IGZhbHNlLFxuICAgICAgICAgICAgYXhpc195X2NlbnRlcjogdW5kZWZpbmVkLFxuICAgICAgICAgICAgYXhpc195X2lubmVyOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3lfbGFiZWw6IHt9LFxuICAgICAgICAgICAgYXhpc195X3RpY2tfZm9ybWF0OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3lfdGlja19vdXRlcjogdHJ1ZSxcbiAgICAgICAgICAgIGF4aXNfeV90aWNrX3ZhbHVlczogbnVsbCwgICAgICAgIFxuICAgICAgICAgICAgYXhpc195X3RpY2tfcm90YXRlOiAwLFxuICAgICAgICAgICAgYXhpc195X3RpY2tfY291bnQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGF4aXNfeV90aWNrX3RpbWVfdmFsdWU6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGF4aXNfeV90aWNrX3RpbWVfaW50ZXJ2YWw6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGF4aXNfeV9wYWRkaW5nOiB7fSxcbiAgICAgICAgICAgIGF4aXNfeV9kZWZhdWx0OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3kyX3Nob3c6IGZhbHNlLFxuICAgICAgICAgICAgYXhpc195Ml9tYXg6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGF4aXNfeTJfbWluOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3kyX2ludmVydGVkOiBmYWxzZSxcbiAgICAgICAgICAgIGF4aXNfeTJfY2VudGVyOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3kyX2lubmVyOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3kyX2xhYmVsOiB7fSxcbiAgICAgICAgICAgIGF4aXNfeTJfdGlja19mb3JtYXQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGF4aXNfeTJfdGlja19vdXRlcjogdHJ1ZSxcbiAgICAgICAgICAgIGF4aXNfeTJfdGlja192YWx1ZXM6IG51bGwsXG4gICAgICAgICAgICBheGlzX3kyX3RpY2tfY291bnQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGF4aXNfeTJfcGFkZGluZzoge30sXG4gICAgICAgICAgICBheGlzX3kyX2RlZmF1bHQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIC8vIGdyaWRcbiAgICAgICAgICAgIGdyaWRfeF9zaG93OiBmYWxzZSxcbiAgICAgICAgICAgIGdyaWRfeF90eXBlOiAndGljaycsXG4gICAgICAgICAgICBncmlkX3hfbGluZXM6IFtdLFxuICAgICAgICAgICAgZ3JpZF95X3Nob3c6IGZhbHNlLFxuICAgICAgICAgICAgLy8gbm90IHVzZWRcbiAgICAgICAgICAgIC8vIGdyaWRfeV90eXBlOiAndGljaycsXG4gICAgICAgICAgICBncmlkX3lfbGluZXM6IFtdLFxuICAgICAgICAgICAgZ3JpZF95X3RpY2tzOiAxMCxcbiAgICAgICAgICAgIGdyaWRfZm9jdXNfc2hvdzogdHJ1ZSxcbiAgICAgICAgICAgIGdyaWRfbGluZXNfZnJvbnQ6IHRydWUsXG4gICAgICAgICAgICAvLyBwb2ludCAtIHBvaW50IG9mIGVhY2ggZGF0YVxuICAgICAgICAgICAgcG9pbnRfc2hvdzogdHJ1ZSxcbiAgICAgICAgICAgIHBvaW50X3I6IDIuNSxcbiAgICAgICAgICAgIHBvaW50X3NlbnNpdGl2aXR5OiAxMCxcbiAgICAgICAgICAgIHBvaW50X2ZvY3VzX2V4cGFuZF9lbmFibGVkOiB0cnVlLFxuICAgICAgICAgICAgcG9pbnRfZm9jdXNfZXhwYW5kX3I6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIHBvaW50X3NlbGVjdF9yOiB1bmRlZmluZWQsXG4gICAgICAgICAgICAvLyBsaW5lXG4gICAgICAgICAgICBsaW5lX2Nvbm5lY3ROdWxsOiBmYWxzZSxcbiAgICAgICAgICAgIGxpbmVfc3RlcF90eXBlOiAnc3RlcCcsXG4gICAgICAgICAgICAvLyBiYXJcbiAgICAgICAgICAgIGJhcl93aWR0aDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgYmFyX3dpZHRoX3JhdGlvOiAwLjYsXG4gICAgICAgICAgICBiYXJfd2lkdGhfbWF4OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBiYXJfemVyb2Jhc2VkOiB0cnVlLFxuICAgICAgICAgICAgLy8gYXJlYVxuICAgICAgICAgICAgYXJlYV96ZXJvYmFzZWQ6IHRydWUsXG4gICAgICAgICA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VmaW5lZCxcbiAgICAgICAgICAgIGRvbnV0X3dpZHRoOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBkb251dF90aXRsZTogXCJcIixcbiAgICAgICAgICAgIGRvbnV0X2V4cGFuZDoge30sXG4gICAgICAgICAgICBkb251dF9leHBhbmRfZHVyYXRpb246IDUwLFxuICAgICAgICAgICAgLy8gc3BsaW5lXG4gICAgICAgICAgICBzcGxpbmVfaW50ZXJwb2xhdGlvbl90eXBlOiAnY2FyZGluYWwnLFxuICAgICAgICAgICAgLy8gcmVnaW9uIC0gcmVnaW9uIHRvIGNoYW5nZSBzdHlsZVxuICAgICAgICAgICAgcmVnaW9uczogW10sXG4gICAgICAgICAgICAvLyB0b29sdGlwIC0gc2hvdyB3aGVuIG1vdXNlb3ZlciBvbiBlYWNoIGRhdGFcbiAgICAgICAgICAgIHRvb2x0aXBfc2hvdzogdHJ1ZSxcbiAgICAgICAgICAgIHRvb2x0aXBfZ3JvdXBlZDogdHJ1ZSxcbiAgICAgICAgICAgIHRvb2x0aXBfZm9ybWF0X3RpdGxlOiB1bmRlZmluZWQsXG4gICAgICAgICAgICB0b29sdGlwX2Zvcm1hdF9uYW1lOiB1bmRlZmluZWQsXG4gICAgICAgICAgICB0b29sdGlwX2Zvcm1hdF92YWx1ZTogdW5kZWZpbmVkLFxuICAgICAgICAgICAgdG9vbHRpcF9wb3NpdGlvbjogdW5kZWZpbmVkLFxuICAgICAgICAgICAgdG9vbHRpcF9jb250ZW50czogZnVuY3Rpb24gKGQsIGRlZmF1bHRUaXRsZUZvcm1hdCwgZGVmYXVsdFZhbHVlRm9ybWF0LCBjb2xvcikge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmdldFRvb2x0aXBDb250ZW50ID8gdGhpcy5nZXRUb29sdGlwQ29udGVudChkLCBkZWZhdWx0VGl0bGVGb3JtYXQsIGRlZmF1bHRWYWx1ZUZvcm1hdCwgY29sb3IpIDogJyc7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgdG9vbHRpcF9pbml0X3Nob3c6IGZhbHNlLFxuICAgICAgICAgICAgdG9vbHRpcF9pbml0X3g6IDAsXG4gICAgICAgICAgICB0b29sdGlwX2luaXRfcG9zaXRpb246IHt0b3A6ICcwcHgnLCBsZWZ0OiAnNTBweCd9LFxuICAgICAgICAgICAgdG9vbHRpcF9vbnNob3c6IGZ1bmN0aW9uICgpIHt9LFxuICAgICAgICAgICAgdG9vbHRpcF9vbmhpZGU6IGZ1bmN0aW9uICgpIHt9LFxuICAgICAgICAgICAgLy8gdGl0bGVcbiAgICAgICAgICAgIHRpdGxlX3RleHQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIHRpdGxlX3BhZGRpbmc6IHtcbiAgICAgICAgICAgICAgICB0b3A6IDAsXG4gICAgICAgICAgICAgICAgcmlnaHQ6IDAsXG4gICAgICAgICAgICAgICAgYm90dG9tOiAwLFxuICAgICAgICAgICAgICAgIGxlZnQ6IDBcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB0aXRsZV9wb3NpdGlvbjogJ3RvcC1jZW50ZXInLFxuICAgICAgICB9O1xuXG4gICAgICAgIE9iamVjdC5rZXlzKHRoaXMuYWRkaXRpb25hbENvbmZpZykuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgICAgICBjb25maWdba2V5XSA9IHRoaXMuYWRkaXRpb25hbENvbmZpZ1trZXldO1xuICAgICAgICB9LCB0aGlzKTtcblxuICAgICAgICByZXR1cm4gY29uZmlnO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uYWRkaXRpb25hbENvbmZpZyA9IHt9O1xuXG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4ubG9hZENvbmZpZyA9IGZ1bmN0aW9uIChjb25maWcpIHtcbiAgICAgICAgdmFyIHRoaXNfY29uZmlnID0gdGhpcy5jb25maWcsIHRhcmdldCwga2V5cywgcmVhZDtcbiAgICAgICAgZnVuY3Rpb24gZmluZCgpIHtcbiAgICAgICAgICAgIHZhciBrZXkgPSBrZXlzLnNoaWZ0KCk7XG4gICAgLy8gICAgICAgIGNvbnNvbGUubG9nKFwia2V5ID0+XCIsIGtleSwgXCIsIHRhcmdldCA9PlwiLCB0YXJnZXQpO1xuICAgICAgICAgICAgaWYgKGtleSAmJiB0YXJnZXQgJiYgdHlwZW9mIHRhcmdldCA9PT0gJ29iamVjdCcgJiYga2V5IGluIHRhcmdldCkge1xuICAgICAgICAgICAgICAgIHRhcmdldCA9IHRhcmdldFtrZXldO1xuICAgICAgICAgICAgICAgIHJldHVybiBmaW5kKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICgha2V5KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRhcmdldDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgT2JqZWN0LmtleXModGhpc19jb25maWcpLmZvckVhY2goZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgdGFyZ2V0ID0gY29uZmlnO1xuICAgICAgICAgICAga2V5cyA9IGtleS5zcGxpdCgnXycpO1xuICAgICAgICAgICAgcmVhZCA9IGZpbmQoKTtcbiAgICAvLyAgICAgICAgY29uc29sZS5sb2coXCJDT05GSUcgOiBcIiwga2V5LCByZWFkKTtcbiAgICAgICAgICAgIGlmIChpc0RlZmluZWQocmVhZCkpIHtcbiAgICAgICAgICAgICAgICB0aGlzX2NvbmZpZ1trZXldID0gcmVhZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfTtcblxuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldFNjYWxlID0gZnVuY3Rpb24gKG1pbiwgbWF4LCBmb3JUaW1lc2VyaWVzKSB7XG4gICAgICAgIHJldHVybiAoZm9yVGltZXNlcmllcyA/IHRoaXMuZDMudGltZS5zY2FsZSgpIDogdGhpcy5kMy5zY2FsZS5saW5lYXIoKSkucmFuZ2UoW21pbiwgbWF4XSk7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRYID0gZnVuY3Rpb24gKG1pbiwgbWF4LCBkb21haW4sIG9mZnNldCkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLFxuICAgICAgICAgICAgc2NhbGUgPSAkJC5nZXRTY2FsZShtaW4sIG1heCwgJCQuaXNUaW1lU2VyaWVzKCkpLFxuICAgICAgICAgICAgX3NjYWxlID0gZG9tYWluID8gc2NhbGUuZG9tYWluKGRvbWFpbikgOiBzY2FsZSwga2V5O1xuICAgICAgICAvLyBEZWZpbmUgY3VzdG9taXplZCBzY2FsZSBpZiBjYXRlZ29yaXplZCBheGlzXG4gICAgICAgIGlmICgkJC5pc0NhdGVnb3JpemVkKCkpIHtcbiAgICAgICAgICAgIG9mZnNldCA9IG9mZnNldCB8fCBmdW5jdGlvbiAoKSB7IHJldHVybiAwOyB9O1xuICAgICAgICAgICAgc2NhbGUgPSBmdW5jdGlvbiAoZCwgcmF3KSB7XG4gICAgICAgICAgICAgICAgdmFyIHYgPSBfc2NhbGUoZCkgKyBvZmZzZXQoZCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJhdyA/IHYgOiBNYXRoLmNlaWwodik7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgc2NhbGUgPSBmdW5jdGlvbiAoZCwgcmF3KSB7XG4gICAgICAgICAgICAgICAgdmFyIHYgPSBfc2NhbGUoZCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJhdyA/IHYgOiBNYXRoLmNlaWwodik7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIC8vIGRlZmluZSBmdW5jdGlvbnNcbiAgICAgICAgZm9yIChrZXkgaW4gX3NjYWxlKSB7XG4gICAgICAgICAgICBzY2FsZVtrZXldID0gX3NjYWxlW2tleV07XG4gICAgICAgIH1cbiAgICAgICAgc2NhbGUub3JnRG9tYWluID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIF9zY2FsZS5kb21haW4oKTtcbiAgICAgICAgfTtcbiAgICAgICAgLy8gZGVmaW5lIGN1c3RvbSBkb21haW4oKSBmb3IgY2F0ZWdvcml6ZWQgYXhpc1xuICAgICAgICBpZiAoJCQuaXNDYXRlZ29yaXplZCgpKSB7XG4gICAgICAgICAgICBzY2FsZS5kb21haW4gPSBmdW5jdGlvbiAoZG9tYWluKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIGRvbWFpbiA9IHRoaXMub3JnRG9tYWluKCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBbZG9tYWluWzBdLCBkb21haW5bMV0gKyAxXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgX3NjYWxlLmRvbWFpbihkb21haW4pO1xuICAgICAgICAgICAgICAgIHJldHVybiBzY2FsZTtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHNjYWxlO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0WSA9IGZ1bmN0aW9uIChtaW4sIG1heCwgZG9tYWluKSB7XG4gICAgICAgIHZhciBzY2FsZSA9IHRoaXMuZ2V0U2NhbGUobWluLCBtYXgsIHRoaXMuaXNUaW1lU2VyaWVzWSgpKTtcbiAgICAgICAgaWYgKGRvbWFpbikgeyBzY2FsZS5kb21haW4oZG9tYWluKTsgfVxuICAgICAgICByZXR1cm4gc2NhbGU7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRZU2NhbGUgPSBmdW5jdGlvbiAoaWQpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuYXhpcy5nZXRJZChpZCk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uICAgICAgICAgICAgICAgICAgICAgICAgeXNbYmFzZUlkXVtpXSA9IHYgPCAwID8gdiA6IDA7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBDb21wdXRlIG1pblxuICAgICAgICAgICAgICAgIGZvciAoayA9IDE7IGsgPCBpZHNJbkdyb3VwLmxlbmd0aDsgaysrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlkID0gaWRzSW5Hcm91cFtrXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEgeXNbaWRdKSB7IGNvbnRpbnVlOyB9XG4gICAgICAgICAgICAgICAgICAgIHlzW2lkXS5mb3JFYWNoKGZ1bmN0aW9uICh2LCBpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoJCQuYXhpcy5nZXRJZChpZCkgPT09ICQkLmF4aXMuZ2V0SWQoYmFzZUlkKSAmJiB5c1tiYXNlSWRdICYmICEoaGFzTmVnYXRpdmVWYWx1ZSAmJiArdiA+IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeXNbYmFzZUlkXVtpXSArPSArdjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAkJC5kMy5taW4oT2JqZWN0LmtleXMoeXMpLm1hcChmdW5jdGlvbiAoa2V5KSB7IHJldHVybiAkJC5kMy5taW4oeXNba2V5XSk7IH0pKTtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldFlEb21haW5NYXggPSBmdW5jdGlvbiAodGFyZ2V0cykge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWcsXG4gICAgICAgICAgICBpZHMgPSAkJC5tYXBUb0lkcyh0YXJnZXRzKSwgeXMgPSAkJC5nZXRWYWx1ZXNBc0lkS2V5ZWQodGFyZ2V0cyksXG4gICAgICAgICAgICBqLCBrLCBiYXNlSWQsIGlkc0luR3JvdXAsIGlkLCBoYXNQb3NpdGl2ZVZhbHVlO1xuICAgICAgICBpZiAoY29uZmlnLmRhdGFfZ3JvdXBzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIGhhc1Bvc2l0aXZlVmFsdWUgPSAkJC5oYXNQb3NpdGl2ZVZhbHVlSW5UYXJnZXRzKHRhcmdldHMpO1xuICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IGNvbmZpZy5kYXRhX2dyb3Vwcy5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIC8vIERldGVybWluZSBiYXNlSWRcbiAgICAgICAgICAgICAgICBpZHNJbkdyb3VwID0gY29uZmlnLmRhdGFfZ3JvdXBzW2pdLmZpbHRlcihmdW5jdGlvbiAoaWQpIHsgcmV0dXJuIGlkcy5pbmRleE9mKGlkKSA+PSAwOyB9KTtcbiAgICAgICAgICAgICAgICBpZiAoaWRzSW5Hcm91cC5sZW5ndGggPT09IDApIHsgY29udGludWU7IH1cbiAgICAgICAgICAgICAgICBiYXNlSWQgPSBpZHNJbkdyb3VwWzBdO1xuICAgICAgICAgICAgICAgIC8vIENvbnNpZGVyIHBvc2l0aXZlIHZhbHVlc1xuICAgICAgICAgICAgICAgIGlmIChoYXNQb3NpdGl2ZVZhbHVlICYmIHlzW2Jhc2VJZF0pIHtcbiAgICAgICAgICAgICAgICAgICAgeXNbYmFzZUlkXS5mb3JFYWNoKGZ1bmN0aW9uICh2LCBpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB5c1tiYXNlSWRdW2ldID0gdiA+IDAgPyB2IDogMDtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIENvbXB1dGUgbWF4XG4gICAgICAgICAgICAgICAgZm9yIChrID0gMTsgayA8IGlkc0luR3JvdXAubGVuZ3RoOyBrKyspIHtcbiAgICAgICAgICAgICAgICAgICAgaWQgPSBpZHNJbkdyb3VwW2tdO1xuICAgICAgICAgICAgICAgICAgICBpZiAoISB5c1tpZF0pIHsgY29udGludWU7IH1cbiAgICAgICAgICAgICAgICAgICAgeXNbaWRdLmZvckVhY2goZnVuY3Rpb24gKHYsIGkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkJC5heGlzLmdldElkKGlkKSA9PT0gJCQuYXhpcy5nZXRJZChiYXNlSWQpICYmIHlzW2Jhc2VJZF0gJiYgIShoYXNQb3NpdGl2ZVZhbHVlICYmICt2IDwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB5c1tiYXNlSWRdW2ldICs9ICt2O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuICQkLmQzLm1heChPYmplY3Qua2V5cyh5cykubWFwKGZ1bmN0aW9uIChrZXkpIHsgcmV0dXJuICQkLmQzLm1heCh5c1trZXldKTsgfSkpO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0WURvbWFpbiA9IGZ1bmN0aW9uICh0YXJnZXRzLCBheGlzSWQsIHhEb21haW4pIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLFxuICAgICAgICAgICAgdGFyZ2V0c0J5QXhpc0lkID0gdGFyZ2V0cy5maWx0ZXIoZnVuY3Rpb24gKHQpIHsgcmV0dXJuICQkLmF4aXMuZ2V0SWQodC5pZCkgPT09IGF4aXNJZDsgfSksXG4gICAgICAgICAgICB5VGFyZ2V0cyA9IHhEb21haW4gPyAkJC5maWx0ZXJCeVhEb21haW4odGFyZ2V0c0J5QXhpc0lkLCB4RG9tYWluKSA6IHRhcmdldHNCeUF4aXNJZCxcb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FMYWJlbCA9ICQkLmhhc0RhdGFMYWJlbCgpICYmICFjb25maWcuYXhpc19yb3RhdGVkO1xuXG4gICAgICAgIC8vIE1FTU86IGF2b2lkIGludmVydGluZyBkb21haW4gdW5leHBlY3RlZGx5XG4gICAgICAgIHlEb21haW5NaW4gPSBpc1ZhbHVlKHlNaW4pID8geU1pbiA6IGlzVmFsdWUoeU1heCkgPyAoeURvbWFpbk1pbiA8IHlNYXggPyB5RG9tYWluTWluIDogeU1heCAtIDEwKSA6IHlEb21haW5NaW47XG4gICAgICAgIHlEb21haW5NYXggPSBpc1ZhbHVlKHlNYXgpID8geU1heCA6IGlzVmFsdWUoeU1pbikgPyAoeU1pbiA8IHlEb21haW5NYXggPyB5RG9tYWluTWF4IDogeU1pbiArIDEwKSA6IHlEb21haW5NYXg7XG5cbiAgICAgICAgaWYgKHlUYXJnZXRzLmxlbmd0aCA9PT0gMCkgeyAvLyB1c2UgY3VycmVudCBkb21haW4gaWYgdGFyZ2V0IG9mIGF4aXNJZCBpcyBub25lXG4gICAgICAgICAgICByZXR1cm4gYXhpc0lkID09PSAneTInID8gJCQueTIuZG9tYWluKCkgOiAkJC55LmRvbWFpbigpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpc05hTih5RG9tYWluTWluKSkgeyAvLyBzZXQgbWluaW11bSB0byB6ZXJvIHdoZW4gbm90IG51bWJlclxuICAgICAgICAgICAgeURvbWFpbk1pbiA9IDA7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGlzTmFOKHlEb21haW5NYXgpKSB7IC8vIHNldCBtYXhpbXVtIHRvIGhhdmUgc2FtZSB2YWx1ZSBhcyB5RG9tYWluTWluXG4gICAgICAgICAgICB5RG9tYWluTWF4ID0geURvbWFpbk1pbjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoeURvbWFpbk1pbiA9PT0geURvbWFpbk1heCkge1xuICAgICAgICAgICAgeURvbWFpbk1pbiA8IDAgPyB5RG9tYWluTWF4ID0gMCA6IHlEb21haW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ICAgICAgIGRvbWFpbiA9IFt5RG9tYWluTWluIC0gcGFkZGluZ19ib3R0b20sIHlEb21haW5NYXggKyBwYWRkaW5nX3RvcF07XG4gICAgICAgIHJldHVybiBpc0ludmVydGVkID8gZG9tYWluLnJldmVyc2UoKSA6IGRvbWFpbjtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldFhEb21haW5NaW4gPSBmdW5jdGlvbiAodGFyZ2V0cykge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWc7XG4gICAgICAgIHJldHVybiBpc0RlZmluZWQoY29uZmlnLmF4aXNfeF9taW4pID9cbiAgICAgICAgICAgICgkJC5pc1RpbWVTZXJpZXMoKSA/IHRoaXMucGFyc2VEYXRlKGNvbmZpZy5heGlzX3hfbWluKSA6IGNvbmZpZy5heGlzX3hfbWluKSA6XG4gICAgICAgICQkLmQzLm1pbih0YXJnZXRzLCBmdW5jdGlvbiAodCkgeyByZXR1cm4gJCQuZDMubWluKHQudmFsdWVzLCBmdW5jdGlvbiAodikgeyByZXR1cm4gdi54OyB9KTsgfSk7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRYRG9tYWluTWF4ID0gZnVuY3Rpb24gKHRhcmdldHMpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnO1xuICAgICAgICByZXR1cm4gaXNEZWZpbmVkKGNvbmZpZy5heGlzX3hfbWF4KSA/XG4gICAgICAgICAgICAoJCQuaXNUaW1lU2VyaWVzKCkgPyB0aGlzLnBhcnNlRGF0ZShjb25maWcuYXhpc194X21heCkgOiBjb25maWcuYXhpc194X21heCkgOlxuICAgICAgICAkJC5kMy5tYXgodGFyZ2V0cywgZnVuY3Rpb24gKHQpIHsgcmV0dXJuICQkLmQzLm1heCh0LnZhbHVlcywgZnVuY3Rpb24gKHYpIHsgcmV0dXJuIHYueDsgfSk7IH0pO1xuICA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AgICAgIH0gZWxzZSBpZiAodHlwZW9mIGNvbmZpZy5heGlzX3hfcGFkZGluZyA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgIHBhZGRpbmdMZWZ0ID0gcGFkZGluZ1JpZ2h0ID0gY29uZmlnLmF4aXNfeF9wYWRkaW5nO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcGFkZGluZ0xlZnQgPSBwYWRkaW5nUmlnaHQgPSBwYWRkaW5nO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7bGVmdDogcGFkZGluZ0xlZnQsIHJpZ2h0OiBwYWRkaW5nUmlnaHR9O1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0WERvbWFpbiA9IGZ1bmN0aW9uICh0YXJnZXRzKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsXG4gICAgICAgICAgICB4RG9tYWluID0gWyQkLmdldFhEb21haW5NaW4odGFyZ2V0cyksICQkLmdldFhEb21haW5NYXgodGFyZ2V0cyldLFxuICAgICAgICAgICAgZmlyc3RYID0geERvbWFpblswXSwgbGFzdFggPSB4RG9tYWluWzFdLFxuICAgICAgICAgICAgcGFkZGluZyA9ICQkLmdldFhEb21haW5QYWRkaW5nKHhEb21haW4pLFxuICAgICAgICAgICAgbWluID0gMCwgbWF4ID0gMDtcbiAgICAgICAgLy8gc2hvdyBjZW50ZXIgb2YgeCBkb21haW4gaWYgbWluIGFuZCBtYXggYXJlIHRoZSBzYW1lXG4gICAgICAgIGlmICgoZmlyc3RYIC0gbGFzdFgpID09PSAwICYmICEkJC5pc0NhdGVnb3JpemVkKCkpIHtcbiAgICAgICAgICAgIGlmICgkJC5pc1RpbWVTZXJpZXMoKSkge1xuICAgICAgICAgICAgICAgIGZpcnN0WCA9IG5ldyBEYXRlKGZpcnN0WC5nZXRUaW1lKCkgKiAwLjUpO1xuICAgICAgICAgICAgICAgIGxhc3RYID0gbmV3IERhdGUobGFzdFguZ2V0VGltZSgpICogMS41KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZmlyc3RYID0gZmlyc3RYID09PSAwID8gMSA6IChmaXJzdFggKiAwLjUpO1xuICAgICAgICAgICAgICAgIGxhc3RYID0gbGFzdFggPT09IDAgPyAtMSA6IChsYXN0WCAqIDEuNSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGZpcnN0WCB8fCBmaXJzdFggPT09IDApIHtcbiAgICAgICAgICAgIG1pbiA9ICQkLmlzVGltZVNlcmllcygpID8gbmV3IERhdGUoZmlyc3RYLmdldFRpbWUoKSAtIHBhZGRpbmcubGVmdCkgOiBmaXJzdFggLSBwYWRkaW5nLmxlZnQ7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGxhc3RYIHx8IGxhc3RYID09PSAwKSB7XG4gICAgICAgICAgICBtYXggPSAkJC5pc1RpbWVTZXJpZXMoKSA/IG5ldyBEYXRlKGxhc3RYLmdldFRpbWUoKSArIHBhZGRpbmcucmlnaHQpIDogbGFzdFggKyBwYWRkaW5nLnJpZ2h0O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBbbWluLCBtYXhdO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4udXBkYXRlWERvbWFpbiA9IGZ1bmN0aW9uICh0YXJnZXRzLCB3aXRoVXBkYXRlWERvbWFpbiwgd2l0aFVwZGF0ZU9yZ1hEb21haW4sIHdpdGhUcmltLCBkb21haW4pIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnO1xuXG4gICAgICAgIGlmICh3aXRoVXBkYXRlT3JnWERvbWFpbikge1xuICAgICAgICAgICAgJCQueC5kb21haW4oZG9tYWluID8gZG9tYWluIDogJCQuZDMuZXh0ZW50KCQkLmdldFhEb21haW4odGFyZ2V0cykpKTtcbiAgICAgICAgICAgICQkLm9yZ1hEb21haW4gPSAkJC54LmRvbWFpbigpO1xuICAgICAgICAgICAgaWYgKGNvbmZpZy56b29tX2VuYWJsZWQpIHsgJCQuem9vbS5zY2FsZSgkJC54KS51cGRhdGVTY2FsZUV4dGVudCgpOyB9XG4gICAgICAgICAgICAkJC5zdWJYLmRvbWFpbigkJC54LmRvbWFpbigpKTtcbiAgICAgICAgICAgIGlmICgkJC5icnVzaCkgeyAkJC5icnVzaC5zY2FsZSgkJC5zdWJYKTsgfVxuICAgICAgICB9XG4gICAgICAgIGlmICh3aXRoVXBkYXRlWERvbWFpbikge1xuICAgICAgICAgICAgJCQueC5kb21haW4oZG9tYWluID8gZG9tYWluIDogKCEkJC5icnVzaCB8fCAkJC5icnVzaC5lbXB0eSgpKSA/ICQkLm9yZ1hEb21haW4gOiAkJC5icnVzaC5leHRlbnQoKSk7XG4gICAgICAgICAgICBpZiAoY29uZmlnLnpvb21fZW5hYmxlZCkgeyAkJC56b29tLnNjYWxlKCQkLngpLnVwZGF0ZVNjYWxlRXh0ZW50KCk7IH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFRyaW0gZG9tYWluIHdoZW4gdG9vIGJpZyBieSB6b29tIG1vdXNlbW92ZSBldmVudFxuICAgICAgICBpZiAod2l0aFRyaW0pIHsgJCQueC5kb21haW4oJCQudHJpbVhEb21haW4oJCQueC5vcmdEb21haW4oKSkpOyB9XG5cbiAgICAgICAgcmV0dXJuICQkLnguZG9tYWluKCk7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi50cmltWERvbWFpbiA9IGZ1bmN0aW9uIChkb21haW4pIHtcbiAgICAgICAgdmFyIHpvb21Eb21haW4gPSB0aGlzLmdldFpvb21Eb21haW4oKSxcbiAgICAgICAgICAgIG1pbiA9IHpvb21Eb21haW5bMF0sIG1heCA9IHpvb21Eb21haW5bMV07XG4gICAgICAgIGlmIChkb21haW5bMF0gPD0gbWluKSB7XG4gICAgICAgICAgICBkb21haW5bMV0gPSArZG9tYWluWzFdICsgKG1pbiAtIGRvbWFpblswXSk7XG4gICAgICAgICAgICBkb21haW5bMF0gPSBtaW47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1heCA8PSBkb21haW5bMV0pIHtcbiAgICAgICAgICAgIGRvbWFpblswXSA9ICtkb21haW5bMF0gLSAoZG9tYWluWzFdIC0gbWF4KTtcbiAgICAgICAgICAgIGRvbWFpblsxXSA9IG1heDtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZG9tYWluO1xuICAgIH07XG5cbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5pc1ggPSBmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZztcbiAgICAgICAgcmV0dXJuIChjb25maWcuZGF0YV94ICYmIGtleSA9PT0gY29uZmlnLmRhdGFfeCkgfHwgKG5vdEVtcHR5KGNvbmZpZy5kYXRhX3hzKSAmJiBoYXNWYWx1ZShjb25maWcuZGF0YV94cywga2V5KSk7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5pc05vdFggPSBmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgIHJldHVybiAhdGhpcy5pc1goa2V5KTtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldFhLZXkgPSBmdW5jdGlvbiAoaWQpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnO1xuICAgICAgICByZXR1cm4gY29uZmlnLmRhdGFfeCA/IGNvbmZpZy5kYXRhX3ggOiBub3RFbXB0eShjb25maWcuZGF0YV94cykgPyBjb25maWcuZGF0YV94c1tpZF0gOiBudWxsO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0WFZhbHVlc09mWEtleSA9IGZ1bmN0aW9uIChrZXksIHRhcmdldHMpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcyxcbiAgICAgICAgICAgIHhWYWx1ZX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kZXJcbiAgICAgICAgcmV0dXJuIHRhcmdldHM7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5maWx0ZXJCeVggPSBmdW5jdGlvbiAodGFyZ2V0cywgeCkge1xuICAgICAgICByZXR1cm4gdGhpcy5kMy5tZXJnZSh0YXJnZXRzLm1hcChmdW5jdGlvbiAodCkgeyByZXR1cm4gdC52YWx1ZXM7IH0pKS5maWx0ZXIoZnVuY3Rpb24gKHYpIHsgcmV0dXJuIHYueCAtIHggPT09IDA7IH0pO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZmlsdGVyUmVtb3ZlTnVsbCA9IGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgIHJldHVybiBkYXRhLmZpbHRlcihmdW5jdGlvbiAoZCkgeyByZXR1cm4gaXNWYWx1ZShkLnZhbHVlKTsgfSk7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5maWx0ZXJCeVhEb21haW4gPSBmdW5jdGlvbiAodGFyZ2V0cywgeERvbWFpbikge1xuICAgICAgICByZXR1cm4gdGFyZ2V0cy5tYXAoZnVuY3Rpb24gKHQpIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgaWQ6IHQuaWQsXG4gICAgICAgICAgICAgICAgaWRfb3JnOiB0LmlkX29yZyxcbiAgICAgICAgICAgICAgICB2YWx1ZXM6IHQudmFsdWVzLmZpbHRlcihmdW5jdGlvbiAodikge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4geERvbWFpblswXSA8PSB2LnggJiYgdi54IDw9IHhEb21haW5bMV07XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH07XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uaGFzRGF0YUxhYmVsID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgY29uZmlnID0gdGhpcy5jb25maWc7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ICAgICAgIH1cblxuICAgICAgICBmb3IgKGkgPSB2YWx1ZXMubGVuZ3RoICsgMTsgMCA8IGk7IGktLSkge1xuICAgICAgICAgICAgY29udmVydGVkW2ldID0gY29udmVydGVkW2kgLSAxXTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnZlcnRlZFswXSA9IHtcbiAgICAgICAgICAgIHg6IGNvbnZlcnRlZFswXS54IC0gMSxcbiAgICAgICAgICAgIHZhbHVlOiBjb252ZXJ0ZWRbMF0udmFsdWUsXG4gICAgICAgICAgICBpZDogY29udmVydGVkWzBdLmlkXG4gICAgICAgIH07XG4gICAgICAgIGNvbnZlcnRlZFt2YWx1ZXMubGVuZ3RoICsgMV0gPSB7XG4gICAgICAgICAgICB4OiBjb252ZXJ0ZWRbdmFsdWVzLmxlbmd0aF0ueCArIDEsXG4gICAgICAgICAgICB2YWx1ZTogY29udmVydGVkW3ZhbHVlcy5sZW5ndGhdLnZhbHVlLFxuICAgICAgICAgICAgaWQ6IGNvbnZlcnRlZFt2YWx1ZXMubGVuZ3RoXS5pZFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBjb252ZXJ0ZWQ7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi51cGRhdGVEYXRhQXR0cmlidXRlcyA9IGZ1bmN0aW9uIChuYW1lLCBhdHRycykge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWcsIGN1cnJlbnQgPSBjb25maWdbJ2RhdGFfJyArIG5hbWVdO1xuICAgICAgICBpZiAodHlwZW9mIGF0dHJzID09PSAndW5kZWZpbmVkJykgeyByZXR1cm4gY3VycmVudDsgfVxuICAgICAgICBPYmplY3Qua2V5cyhhdHRycykuZm9yRWFjaChmdW5jdGlvbiAoaWQpIHtcbiAgICAgICAgICAgIGN1cnJlbnRbaWRdID0gYXR0cnNbaWRdO1xuICAgICAgICB9KTtcbiAgICAgICAgJCQucmVkcmF3KHt3aXRoTGVnZW5kOiB0cnVlfSk7XG4gICAgICAgIHJldHVybiBjdXJyZW50O1xuICAgIH07XG5cbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5jb252ZXJ0VXJsVG9EYXRhID0gZnVuY3Rpb24gKHVybCwgbWltZVR5cGUsIGhlYWRlcnMsIGtleXMsIGRvbmUpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgdHlwZSA9IG1pbWVUeXBlID8gbWltZVR5cGUgOiAnY3N2JztcbiAgICAgICAgdmFyIHJlcSA9ICQkLmQzLnhocih1cmwpO1xuICAgICAgICBpZiAoaGVhZGVycykge1xuICAgICAgICAgICAgT2JqZWN0LmtleXMoaGVhZGVycykuZm9yRWFjaChmdW5jdGlvbiAoaGVhZGVyKSB7XG4gICAgICAgICAgICAgICAgcmVxLmhlYWRlcihoZWFkZXIsIGhlYWRlcnNbaGVhZGVyXSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXEuZ2V0KGZ1bmN0aW9uIChlcnJvciwgZGF0YSkge1xuICAgICAgICAgICAgdmFyIGQ7XG4gICAgICAgICAgICBpZiAoIWRhdGEpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoZXJyb3IucmVzcG9uc2VVUkwgKyAnICcgKyBlcnJvci5zdGF0dXMgKyAnICgnICsgZXJyb3Iuc3RhdHVzVGV4dCArICcpJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodHlwZSA9PT0gJ2pzb24nKSB7XG4gICAgICAgICAgICAgICAgZCA9ICQkLmNvbnZlcnRKc29uVG9EYXRhKEpTT04ucGFyc2UoZGF0YS5yZXNwb25zZSksIGtleXMpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlID09PSAndHN2Jykge1xuICAgICAgICAgICAgICAgIGQgPSAkJC5jb252ZXJ0VHN2VG9EYXRhKGRhdGEucmVzcG9uc2UpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICA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Jvd3MgPSBbXSwgdGFyZ2V0S2V5cywgZGF0YTtcbiAgICAgICAgaWYgKGtleXMpIHsgLy8gd2hlbiBrZXlzIHNwZWNpZmllZCwganNvbiB3b3VsZCBiZSBhbiBhcnJheSB0aGF0IGluY2x1ZGVzIG9iamVjdHNcbiAgICAgICAgICAgIGlmIChrZXlzLngpIHtcbiAgICAgICAgICAgICAgICB0YXJnZXRLZXlzID0ga2V5cy52YWx1ZS5jb25jYXQoa2V5cy54KTtcbiAgICAgICAgICAgICAgICAkJC5jb25maWcuZGF0YV94ID0ga2V5cy54O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0YXJnZXRLZXlzID0ga2V5cy52YWx1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG5ld19yb3dzLnB1c2godGFyZ2V0S2V5cyk7XG4gICAgICAgICAgICBqc29uLmZvckVhY2goZnVuY3Rpb24gKG8pIHtcbiAgICAgICAgICAgICAgICB2YXIgbmV3X3JvdyA9IFtdO1xuICAgICAgICAgICAgICAgIHRhcmdldEtleXMuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGNvbnZlcnQgdW5kZWZpbmVkIHRvIG51bGwgYmVjYXVzZSB1bmRlZmluZWQgZGF0YSB3aWxsIGJlIHJlbW92ZWQgaW4gY29udmVydERhdGFUb1RhcmdldHMoKVxuICAgICAgICAgICAgICAgICAgICB2YXIgdiA9ICQkLmZpbmRWYWx1ZUluSnNvbihvLCBrZXkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoaXNVbmRlZmluZWQodikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHYgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG5ld19yb3cucHVzaCh2KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBuZXdfcm93cy5wdXNoKG5ld19yb3cpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBkYXRhID0gJCQuY29udmVydFJvd3NUb0RhdGEobmV3X3Jvd3MpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgT2JqZWN0LmtleXMoanNvbikuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgICAgICAgICAgbmV3X3Jvd3MucHVzaChba2V5XS5jb25jYXQoanNvbltrZXldKSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGRhdGEgPSAkJC5jb252ZXJ0Q29sdW1uc1RvRGF0YShuZXdfcm93cyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGRhdGE7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5maW5kVmFsdWVJbkpzb24gPSBmdW5jdGlvbiAob2JqZWN0LCBwYXRoKSB7XG4gICAgICAgIHBhdGggPSBwYXRoLnJlcGxhY2UoL1xcWyhcXHcrKVxcXS9nLCAnLiQxJyk7IC8vIGNvbnZlcnQgaW5kZXhlcyB0byBwcm9wZXJ0aWVzIChyZXBsYWNlIFtdIHdpdGggLilcbiAgICAgICAgcGF0aCA9IHBhdGgucmVwbGFjZSgvXlxcLi8sICcnKTsgICAgICAgICAgIC8vIHN0cmlwIGEgbGVhZGluZyBkb3RcbiAgICAgICAgdmFyIHBhdGhBcnJheSA9IHBhdGguc3BsaXQoJy4nKTtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBwYXRoQXJyYXkubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgIHZhciBrID0gcGF0aEFycmF5W2ldO1xuICAgICAgICAgICAgaWYgKGsgaW4gb2JqZWN0KSB7XG4gICAgICAgICAgICAgICAgb2JqZWN0ID0gb2JqZWN0W2tdO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG9iamVjdDtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmNvbnZlcnRSb3dzVG9EYXRhID0gZnVuY3Rpb24gKHJvd3MpIHtcbiAgICAgICAgdmFyIGtleXMgPSByb3dzWzBdLCBuZXdfcm93ID0ge30sIG5ld19yb3dzID0gW10sIGksIGo7XG4gICAgICAgIGZvciAoaSA9IDE7IGkgPCByb3dzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBuZXdfcm93ID0ge307XG4gICAgICAgICAgICBmb3IgKGogPSAwOyBqIDwgcm93c1tpXS5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIGlmIChpc1VuZGVmaW5lZChyb3dzW2ldW2pdKSkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJTb3VyY2UgZGF0YSBpcyBtaXNzaW5nIGEgY29tcG9uZW50IGF0IChcIiArIGkgKyBcIixcIiArIGogKyBcIikhXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBuZXdfcm93W2tleXNbal1dID0gcm93c1tpXVtqXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIG5ld19yb3dzLnB1c2gobmV3X3Jvdyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG5ld19yb3dzO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uY29udmVydENvbHVtbnNUb0RhdGEgPSBmdW5jdGlvbiAoY29sdW1ucykge1xuICAgICAgICB2YXIgbmV3X3Jvd3MgPSBbXSwgaSwgaiwga2V5O1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY29sdW1ucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAga2V5ID0gY29sdW1uc1tpXVswXTtcbiAgICAgICAgICAgIGZvciAoaiA9IDE7IGogPCBjb2x1bW5zW2ldLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzVW5kZWZpbmVkKG5ld19yb3dzW2ogLSAxXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgbmV3X3Jvd3NbaiAtIDFdID0ge307XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChpc1VuZGVmaW5lZChjb2x1bW5zW2ldW2pdKSkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJTb3VyY2UgZGF0YSBpcyBtaXNzaW5nIGEgY29tcG9uZW50IGF0IChcIiArIGkgKyBcIixcIiArIGogKyBcIikhXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBuZXdfcm93c1tqIC0gMV1ba2V5XSA9IGNvbHVtbnNbaV1bal07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG5ld19yb3dzO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uY29udmVydERhdGFUb1RhcmdldHMgPSBmdW5jdGlvbiAoZGF0YSwgYXBwZW5kWHMpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLFxuICAgICAgICAgICAgaWRzID0gJCQuZDMua2V5cyhkYXRhWzBdKS5maWx0ZXIoJCQuaXNOb3RYLCAkJCksXG4gICAgICAgICAgICB4cyA9ICQkLmQzLmtleXMoZGF0YVswXSkuZmlsdGVyKCQkLmlzWCwgJCQpLFxuICAgICAgICAgICAgdGFyZ2V0cztcblxuICAgICAgICAvLyBzYXZlIHggZm9yIHVwZGF0ZSBkYXRhIGJ5IGxvYWQgd2hlbiBjdXN0b20geCBhbmQgYzMueCBBUElcbiAgICAgICAgaWRzLmZvckVhY2goZnVuY3Rpb24gKGlkKSB7XG4gICAgICAgICAgICB2YXIgeEtleSA9ICQkLmdldFhLZXkoaWQpO1xuXG4gICAgICAgICAgICBpZiAoJCQuaXNDdXN0b21YKCkgfHwgJCQuaXNUaW1lU2VyaWVzKCkpIHtcbiAgICAgICAgICAgICAgICAvLyBpZiBpbmNsdWRlZCBpbiBpbnB1dCBkYXRhXG4gICAgICAgICAgICAgICAgaWYgKHhzLmluZGV4T2YoeEtleSkgPj0gMCkge1xuICAgICAgICAgICAgICAgICAgICAkJC5kYXRhLnhzW2lkXSA9IChhcHBlbmRYcyAmJiAkJC5kYXRhLnhzW2lkXSA/ICQkLmRhdGEueHNbaWRdIDogW10pLmNvbmNhdChcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEubWFwKGZ1bmN0aW9uIChkKSB7IHJldHVybiBkW3hLZXldOyB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoaXNWYWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKGZ1bmN0aW9uIChyYXdYLCBpKSB7IHJldHVybiAkJC5nZW5lcmF0ZVRhcmdldFgocmF3WCwgaWQsIGkpOyB9KVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBpZiBub3QgaW5jbHVkZWQgaW4gaW5wdXQgZGF0YSwgZmluZCBmcm9tIHByZWxvYWRlZCBkYXRhIG9mIG90aGVyIGlkJ3MgeFxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGNvbmZpZy5kYXRhX3gpIHtcbiAgICAgICAgICAgICAgICAgICAgJCQuZGF0YS54c1tpZF0gPSAkJC5nZXRPdGhlclRhcmdldFhzKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIGlmIG5vdCBpbmNsdWRlZCBpbiBpbnB1dCBkYXRhLCBmaW5kIGZyb20gcHJlbG9hZGVkIGRhdGFcbiAgICAgICAgICAgICAgICBlbHNlIGlmIChub3RFbXB0eShjb25maWcuZGF0YV94cykpIHtcbiAgICAgICAgICAgICAgICAgICAgJCQuZGF0YS54c1tpZF0gPSAkJC5nZXRYVmFsdWVzT2ZYS2V5KHhLZXksICQkLmRhdGEudGFyZ2V0cyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIE1FTU86IGlmIG5vIHggaW5jbHVkZWQsIHVzZSBzYW1lIHggb2YgY3VycmVudCB3aWxsIGJlIHVzZWRcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgJCQuZGF0YS54c1tpZF0gPSBkYXRhLm1hcChmdW5jdGlvbiAoZCwgaSkgeyByZXR1cm4gaTsgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG5cbiAgICAgICAgLy8gY2hlY2sgeCBpcyBkZWZpbmVkXG4gICAgICAgIGlkcy5mb3JFYWNoKGZ1bmN0aW9uIChpZCkge1xuICAgICAgICAgICAgaWYgKCEkJC5kYXRhLnhzW2lkXSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigneCBpcyBub3QgZGVmaW5lZCBmb3IgaWQgPSBcIicgKyBpZCArICdcIi4nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgLy8gY29udmVydCB0byB0YXJnZXRcbiAgICAgICAgdGFyZ2V0cyA9IGlkcy5tYXAoZnVuY3Rpb24gKGlkLCBpbmRleCkge1xuICAgICAgICAgICAgdmFyIGNvbnZlcnRlZElkID0gY29uZmlnLmRhdGFfaWRDb252ZXJ0ZXIoaWQpO1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBpZDogY29udmVydGVkSWQsXG4gICAgICAgICAgICAgICAgaWRfb3JnOiBpZCxcbiAgICAgICAgICAgICAgICB2YWx1ZXM6IGRhdGEubWFwKGZ1bmN0aW9uIChkLCBpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB4S2V5ID0gJCQuZ2V0WEtleShpZCksIHJhd1ggPSBkW3hLZXldLFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBkW2lkXSAhPT0gbnVsbCAmJiAhaXNOYU4oZFtpZF0pID8gK2RbaWRdIDogbnVsbCwgeDtcbiAgICAgICAgICAgICAgICAgICAgLy8gdXNlIHggYXMgY2F0ZWdvcmllcyBpZiBjdXN0b20geCBhbmQgY2F0ZWdvcml6ZWRcbiAgICAgICAgICAgICAgICAgICAgaWYgKCQkLmlzQ3VzdG9tWCgpICYmICQkLmlzQ2F0ZWdvcml6ZWQoKSAmJiBpbmRleCA9PT0gMCAmJiAhaXNVbmRlZmluZWQocmF3WCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA9PT0gMCAmJiBpID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmF4aXNfeF9jYXRlZ29yaWVzID0gW107XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB4ID0gY29uZmlnLmF4aXNfeF9jYXRlZ29yaWVzLmluZGV4T2YocmF3WCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoeCA9PT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ID0gY29uZmlnLmF4aXNfeF9jYXRlZ29yaWVzLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuYXhpc194X2NhdGVnb3JpZXMucHVzaChyYXdYKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHggID0gJCQuZ2VuZXJhdGVUYXJnZXRYKHJhd1gsIGlkLCBpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAvLyBtYXJrIGFzIHggPSB1bmRlZmluZWQgaWYgdmFsdWUgaXMgdW5kZWZpbmVkIGFuZCBmaWx0ZXIgdG8gcmVtb3ZlIGFmdGVyIG1hcHBlZFxuICAgICAgICAgICAgICAgICAgICBpZiAoaXNVbmRlZmluZWQoZFtpZF0pIHx8ICQkLmRhdGEueHNbaWRdLmxlbmd0aCA8PSBpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB4ID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7eDogeCwgdmFsdWU6IHZhbHVlLCBpZDogY29udmVydGVkSWR9O1xuICAgICAgICAgICAgICAgIH0pLmZpbHRlcihmdW5jdGlvbiAodikgeyByZXR1cm4gaXNEZWZpbmVkKHYueCk7IH0pXG4gICAgICAgICAgICB9O1xuICAgICAgICB9KTtcblxuICAgICAgICAvLyBmaW5pc2ggdGFyZ2V0c1xuICAgICAgICB0YXJnZXRzLmZvckVhY2goZnVuY3Rpb24gKHQpIHtcbiAgICAgICAgICAgIHZhciBpO1xuICAgICAgICAgICAgLy8gc29ydCB2YWx1ZXMgYnkgaXRzIHhcbiAgICAgICAgICAgIGlmIChjb25maWcuZGF0YV94U29ydCkge1xuICAgICAgICAgICAgICAgIHQudmFsdWVzID0gdC52YWx1ZXMuc29ydChmdW5jdGlvbiAodjEsIHYyKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB4MSA9IHYxLnggfHwgdjEueCA9PT0gMCA/IHYxLnggOiBJbmZpbml0eSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHgyID0gdjIueCB8fCB2Mi54ID09PSAwID8gdjIueCA6IEluZmluaXR5O1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4geDEgLSB4MjtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIGluZGV4aW5nIGVhY2ggdmFsdWVcbiAgICAgICAgICAgIGkgPSAwO1xuICAgICAgICAgICAgdC52YWx1ZXMuZm9yRWFjaChmdW5jdGlvbiAodikge1xuICAgICAgICAgICAgICAgIHYuaW5kZXggPSBpKys7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIC8vIHRoaXMgbmVlZHMgdG8gYmUgc29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KHRhcmdldHMpIHtcbiAgICAgICAgICAgIC8vIGZpbHRlciBsb2FkaW5nIHRhcmdldHMgaWYgbmVlZGVkXG4gICAgICAgICAgICBpZiAoYXJncy5maWx0ZXIpIHtcbiAgICAgICAgICAgICAgICB0YXJnZXRzID0gdGFyZ2V0cy5maWx0ZXIoYXJncy5maWx0ZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gc2V0IHR5cGUgaWYgYXJncy50eXBlcyB8fCBhcmdzLnR5cGUgc3BlY2lmaWVkXG4gICAgICAgICAgICBpZiAoYXJncy50eXBlIHx8IGFyZ3MudHlwZXMpIHtcbiAgICAgICAgICAgICAgICB0YXJnZXRzLmZvckVhY2goZnVuY3Rpb24gKHQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHR5cGUgPSBhcmdzLnR5cGVzICYmIGFyZ3MudHlwZXNbdC5pZF0gPyBhcmdzLnR5cGVzW3QuaWRdIDogYXJncy50eXBlO1xuICAgICAgICAgICAgICAgICAgICAkJC5zZXRUYXJnZXRUeXBlKHQuaWQsIHR5cGUpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gVXBkYXRlL0FkZCBkYXRhXG4gICAgICAgICAgICAkJC5kYXRhLnRhcmdldHMuZm9yRWFjaChmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGFyZ2V0cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZC5pZCA9PT0gdGFyZ2V0c1tpXS5pZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZC52YWx1ZXMgPSB0YXJnZXRzW2ldLnZhbHVlcztcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldHMuc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICA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GFUb1RhcmdldHMoJCQuY29udmVydEpzb25Ub0RhdGEoYXJncy5qc29uLCBhcmdzLmtleXMpKSwgYXJncyk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoYXJncy5yb3dzKSB7XG4gICAgICAgICAgICAkJC5sb2FkKCQkLmNvbnZlcnREYXRhVG9UYXJnZXRzKCQkLmNvbnZlcnRSb3dzVG9EYXRhKGFyZ3Mucm93cykpLCBhcmdzKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChhcmdzLmNvbHVtbnMpIHtcbiAgICAgICAgICAgICQkLmxvYWQoJCQuY29udmVydERhdGFUb1RhcmdldHMoJCQuY29udmVydENvbHVtbnNUb0RhdGEoYXJncy5jb2x1bW5zKSksIGFyZ3MpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgJCQubG9hZChudWxsLCBhcmdzKTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4udW5sb2FkID0gZnVuY3Rpb24gKHRhcmdldElkcywgZG9uZSkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzO1xuICAgICAgICBpZiAoIWRvbmUpIHtcbiAgICAgICAgICAgIGRvbmUgPSBmdW5jdGlvbiAoKSB7fTtcbiAgICAgICAgfVxuICAgICAgICAvLyBmaWx0ZXIgZXhpc3RpbmcgdGFyZ2V0XG4gICAgICAgIHRhcmdldElkcyA9IHRhcmdldElkcy5maWx0ZXIoZnVuY3Rpb24gKGlkKSB7IHJldHVybiAkJC5oYXNUYXJnZXQoJCQuZGF0YS50YXJnZXRzLCBpZCk7IH0pO1xuICAgICAgICAvLyBJZiBubyB0YXJnZXQsIGNhbGwgZG9uZSBhbmQgcmV0dXJuXG4gICAgICAgIGlmICghdGFyZ2V0SWRzIHx8IHRhcmdldElkcy5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIGRvbmUoKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAg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aCA9ICQkLmhlaWdodDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGlmICgoJCQuaXNDdXN0b21YKCkgfHwgJCQuaXNUaW1lU2VyaWVzKCkpICYmICEkJC5pc0NhdGVnb3JpemVkKCkpIHtcblxuICAgICAgICAgICAgICAgIC8vIHVwZGF0ZSBpbmRleCBmb3IgeCB0aGF0IGlzIHVzZWQgYnkgcHJldlggYW5kIG5leHRYXG4gICAgICAgICAgICAgICAgJCQudXBkYXRlWHMoKTtcblxuICAgICAgICAgICAgICAgIHJlY3RXID0gZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHByZXZYID0gJCQuZ2V0UHJldlgoZC5pbmRleCksIG5leHRYID0gJCQuZ2V0TmV4dFgoZC5pbmRleCk7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gaWYgdGhlcmUgdGhpcyBpcyBhIHNpbmdsZSBkYXRhIHBvaW50IG1ha2UgdGhlIGV2ZW50UmVjdCBmdWxsIHdpZHRoIChvciBoZWlnaHQpXG4gICAgICAgICAgICAgICAgICAgIGlmIChwcmV2WCA9PT0gbnVsbCAmJiBuZXh0WCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAkJC5oZWlnaHQgOiAkJC53aWR0aDtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmIChwcmV2WCA9PT0gbnVsbCkgeyBwcmV2WCA9ICQkLnguZG9tYWluKClbMF07IH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG5leHRYID09PSBudWxsKSB7IG5leHRYID0gJCQueC5kb21haW4oKVsxXTsgfVxuXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBNYXRoLm1heCgwLCAoJCQueChuZXh0WCkgLSAkJC54KHByZXZYKSkgLyAyKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHJlY3RYID0gZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHByZXZYID0gJCQuZ2V0UHJldlgoZC5pbmRleCksIG5leHRYID0gJCQuZ2V0TmV4dFgoZC5pbmRleCksXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzWCA9ICQkLmRhdGEueHNbZC5pZF1bZC5pbmRleF07XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gaWYgdGhlcmUgdGhpcyBpcyBhIHNpbmdsZSBkYXRhIHBvaW50IHBvc2l0aW9uIHRoZSBldmVudFJlY3QgYXQgMFxuICAgICAgICAgICAgICAgICAgICBpZiAocHJldlggPT09IG51bGwgJiYgbmV4dFggPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZYID09PSBudWxsKSB7IHByZXZYID0gJCQueC5kb21haW4oKVswXTsgfVxuXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAoJCQueCh0aGlzWCkgKyAkJC54KHByZXZYKSkgLyAyO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlY3RXID0gJCQuZ2V0RXZlbnRSZWN0V2lkdGgoKTtcbiAgICAgICAgICAgICAgICByZWN0WCA9IGZ1bmN0aW9uIChkKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkJC54KGQueCkgLSAocmVjdFcgLyAyKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgeCA9IGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAwIDogcmVjdFg7XG4gICAgICAgICAgICB5ID0gY29uZmlnLmF4aXNfcm90YXRlZCA/IHJlY3RYIDogMDtcbiAgICAgICAgICAgIHcgPSBjb25maWcuYXhpc19yb3RhdGVk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gICAgICAgICAgICAgICAgaWYgKCQkLmhhc0FyY1R5cGUoKSkgeyByZXR1cm47IH1cblxuICAgICAgICAgICAgICAgIC8vIEV4cGFuZCBzaGFwZXMgZm9yIHNlbGVjdGlvblxuICAgICAgICAgICAgICAgIGlmIChjb25maWcucG9pbnRfZm9jdXNfZXhwYW5kX2VuYWJsZWQpIHsgJCQuZXhwYW5kQ2lyY2xlcyhpbmRleCwgbnVsbCwgdHJ1ZSk7IH1cbiAgICAgICAgICAgICAgICAkJC5leHBhbmRCYXJzKGluZGV4LCBudWxsLCB0cnVlKTtcblxuICAgICAgICAgICAgICAgIC8vIENhbGwgZXZlbnQgaGFuZGxlclxuICAgICAgICAgICAgICAgICQkLm1haW4uc2VsZWN0QWxsKCcuJyArIENMQVNTLnNoYXBlICsgJy0nICsgaW5kZXgpLmVhY2goZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFfb25tb3VzZW92ZXIuY2FsbCgkJC5hcGksIGQpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbignbW91c2VvdXQnLCBmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgIHZhciBpbmRleCA9IGQuaW5kZXg7XG4gICAgICAgICAgICAgICAgaWYgKCEkJC5jb25maWcpIHsgcmV0dXJuOyB9IC8vIGNoYXJ0IGlzIGRlc3Ryb3llZFxuICAgICAgICAgICAgICAgIGlmICgkJC5oYXNBcmNUeXBlKCkpIHsgcmV0dXJuOyB9XG4gICAgICAgICAgICAgICAgJCQuaGlkZVhHcmlkRm9jdXMoKTtcbiAgICAgICAgICAgICAgICAkJC5oaWRlVG9vbHRpcCgpO1xuICAgICAgICAgICAgICAgIC8vIFVuZG8gZXhwYW5kZWQgc2hhcGVzXG4gICAgICAgICAgICAgICAgJCQudW5leHBhbmRDaXJjbGVzKCk7XG4gICAgICAgICAgICAgICAgJCQudW5leHBhbmRCYXJzKCk7XG4gICAgICAgICAgICAgICAgLy8gQ2FsbCBldmVudCBoYW5kbGVyXG4gICAgICAgICAgICAgICAgJCQubWFpbi5zZWxlY3RBbGwoJy4nICsgQ0xBU1Muc2hhcGUgKyAnLScgKyBpbmRleCkuZWFjaChmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YV9vbm1vdXNlb3V0LmNhbGwoJCQuYXBpLCBkKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAub24oJ21vdXNlbW92ZScsIGZ1bmN0aW9uIChkKSB7XG4gICAgICAgICAgICAgICAgdmFyIHNlbGVjdGVkRGF0YSwgaW5kZXggPSBkLmluZGV4LFxuICAgICAgICAgICAgICAgICAgICBldmVudFJlY3QgPSAkJC5zdmcuc2VsZWN0KCcuJyArIENMQVNTLmV2ZW50UmVjdCArICctJyArIGluZGV4KTtcblxuICAgICAgICAgICAgICAgIGlmICgkJC5kcmFnZ2luZyB8fCAkJC5mbG93aW5nKSB7IHJldHVybjsgfSAvLyBkbyBub3RoaW5nIHdoaWxlIGRyYWdnaW5nL2Zsb3dpbmdcbiAgICAgICAgICAgICAgICBpZiAoJCQuaGFzQXJjVHlwZSgpKSB7IHJldHVybjsgfVxuXG4gICAgICAgICAgICAgICAgaWYgKCQkLmlzU3RlcFR5cGUoZCkgJiYgJCQuY29uZmlnLmxpbmVfc3RlcF90eXBlID09PSAnc3RlcC1hZnRlcicgJiYgZDMubW91c2UodGhpcylbMF0gPCAkJC54KCQkLmdldFhWYWx1ZShkLmlkLCBpbmRleCkpKSB7XG4gICAgICAgICAgICAgICAgICAgIGluZGV4IC09IDE7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gU2hvdyB0b29sdGlwXG4gICAgICAgICAgICAgICAgc2VsZWN0ZWREYXRhID0gJCQuZmlsdGVyVGFyZ2V0c1RvU2hvdygkJC5kYXRhLnRhcmdldHMpLm1hcChmdW5jdGlvbiAodCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCQuYWRkTmFtZSgkJC5nZXRWYWx1ZU9uSW5kZXgodC52YWx1ZXMsIGluZGV4KSk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLnRvb2x0aXBfZ3JvdXBlZCkge1xuICAgICAgICAgICAgICAgICAgICAkJC5zaG93VG9vbHRpcChzZWxlY3RlZERhdGEsIHRoaXMpO1xuICAgICAgICAgICAgICAgICAgICAkJC5zaG93WEdyaWRGb2N1cyhzZWxlY3RlZERhdGEpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChjb25maWcudG9vbHRpcF9ncm91cGVkICYmICghY29uZmlnLmRhdGFfc2VsZWN0aW9uX2VuYWJsZWQgfHwgY29uZmlnLmRhdGFfc2VsZWN0aW9uX2dyb3VwZWQpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAkJC5tYWluLnNlbGVjdEFsbCgnLicgKyBDTEFTUy5zaGFwZSArICctJyArIGluZGV4KVxuICAgICAgICAgICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkMy5zZWxlY3QodGhpcykuY2xhc3NlZChDTEFTUy5FWFBBTkRFRCwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFfc2VsZWN0aW9uX2VuYWJsZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmVudFJlY3Quc3R5bGUoJ2N1cnNvcicsIGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9ncm91cGVkID8gJ3BvaW50ZXInIDogbnVsbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWNvbmZpZy50b29sdGlwX2dyb3VwZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC5oaWRlWEdyaWRGb2N1cygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQkLmhpZGVUb29sdGlwKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFjb25maWcuZGF0YV9zZWxlY3Rpb25fZ3JvdXBlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC51bmV4cGFuZENpcmNsZXMoaW5kZXgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC51bmV4cGFuZEJhcnMoaW5kZXgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgLmZpbHRlcihmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQkLmlzV2l0aGluU2hhcGUodGhpcywgZCk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIC5lYWNoKGZ1bmN0aW9uIChkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFfc2VsZWN0aW9uX2VuYWJsZWQgJiYgKGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9ncm91cGVkIHx8IGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9pc3NlbGVjdGFibGUoZCkpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnRSZWN0LnN0eWxlKCdjdXJzb3InLCAncG9pbnRlcicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFjb25maWcudG9vbHRpcF9ncm91cGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQuc2hvd1Rvb2x0aXAoW2RdLCB0aGlzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC5zaG93WEdyaWRGb2N1cyhbZF0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcucG9pbnRfZm9jdXNfZXhwYW5kX2VuYWJsZWQpIHsgJCQuZXhwYW5kQ2lyY2xlcyhpbmRleCwgZC5pZCwgdHJ1ZSk7IH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC5leHBhbmRCYXJzKGluZGV4LCBkLmlkLCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKCdjbGljaycsIGZ1bmN0aW9uIChkKSB7XG4gICAgICAgICAgICAgICAgdmFyIGluZGV4ID0gZC5pbmRleDtcbiAgICAgICAgICAgICAgICBpZiAoJCQuaGFzQXJjVHlwZSgpIHx8ICEkJC50b2dnbGVTaGFwZSkgeyByZXR1cm47IH1cbiAgICAgICAgICAgICAgICBpZiAoJCQuY2FuY2VsQ2xpY2spIHtcbiAgICAgICAgICAgICAgICAgICAgJCQuY2FuY2VsQ2xpY2sgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoJCQuaXNTdGVwVHlwZShkKSAmJiBjb25maWcubGluZV9zdGVwX3R5cGUgPT09ICdzdGVwLWFmdGVyJyAmJiBkMy5tb3VzZSh0aGlzKVswXSA8ICQkLngoJCQuZ2V0WFZhbHVlKGQuaWQsIGluZGV4KSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaW5kZXggLT0gMTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgJCQubWFpbi5zZWxlY3RBbGwoJy4nICsgQ0xBU1Muc2hhcGUgKyAnLScgKyBpbmRleCkuZWFjaChmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFfc2VsZWN0aW9uX2dyb3VwZWQgfHwgJCQuaXNXaXRoaW5TaGFwZSh0aGlzLCBkKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgJCQudG9nZ2xlU2hhcGUodGhpcywgZCwgaW5kZXgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgJCQuY29uZmlnLmRhdGFfb25jbGljay5jYWxsKCQkLmFwaSwgZCwgdGhpcyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuY2FsbChcbiAgICAgICAgICAgICAgICBjb25maWcuZGF0YV9zZWxlY3Rpb25fZHJhZ2dhYmxlICYmICQkLmRyYWcgPyAoXG4gICAgICAgICAgICAgICAgICAgIGQzLmJlaGF2aW9yLmRyYWcoKS5vcmlnaW4oT2JqZWN0KVxuICAgICAgICAgICAgICAgICAgICAgICAgLm9uKCdkcmFnJywgZnVuY3Rpb24gKCkgeyAkJC5kcmFnKGQzLm1vdXNlKHRoaXMpKTsgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgIC5vbignZHJhZ3N0YXJ0JywgZnVuY3Rpb24gKCkgeyAkJC5kcmFnc3RhcnQoZDMubW91c2UodGhpcykpOyB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgLm9uKCdkcmFnZW5kJywgZnVuY3Rpb24gKCkgeyAkJC5kcmFnZW5kKCk7IH0pXG4gICAgICAgICAgICAgICAgKSA6IGZ1bmN0aW9uICgpIHt9XG4gICAgICAgICAgICApO1xuICAgIH07XG5cbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZW5lcmF0ZUV2ZW50UmVjdHNGb3JNdWx0aXBsZVhzID0gZnVuY3Rpb24gKGV2ZW50UmVjdEVudGVyKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsIGQzID0gJCQuZDMsIGNvbmZpZyA9ICQkLmNvbmZpZztcblxuICAgICAgICBmdW5jdGlvbiBtb3VzZW91dCgpIHtcbiAgICAgICAgICAgICQkLnN2Zy5zZWxlY3QoJy4nICsgQ0xBU1MuZXZlbnRSZWN0KS5zdHlsZSgnY3Vyc29yJywgbnVsbCk7XG4gICAgICAgICAgICAkJC5oaWRlWEdyaWRGb2N1cygpO1xuICAgICAgICAgICAgJCQuaGlkZVRvb2x0aXAoKTtcbiAgICAgICAgICAgICQkLnVuZXhwYW5kQ2lyY2xlcygpO1xuICAgICAgICAgICAgJCQudW5leHBhbmRCYXJzKCk7XG4gICAgICAgIH1cblxuICAgICAgICBldmVudFJlY3RFbnRlci5hcHBlbmQoJ3JlY3QnKVxuICAgICAgICAgICAgLmF0dHIoJ3gnLCAwKVxuICAgICAgICAgICAgLmF0dHIoJ3knLCAwKVxuICAgICAgICAgICAgLmF0dHIoJ3dpZHRoJywgJCQud2lkdGgpXG4gICAgICAgICAgICAuYXR0cignaGVpZ2h0JywgJCQuaGVpZ2h0KVxuICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgQ0xBU1MuZXZlbnRSZWN0KVxuICAgICAgICAgICAgLm9uKCdtb3VzZW91dCcsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBpZiAoISQkLmNvbmZpZykgeyByZXR1cm47IH0gLy8gY2hhcnQgaXMgZGVzdHJveWVkXG4gICAgICAgICAgICAgICAgaWYgKCQkLmhhc0FyY1R5cGUoKSkgeyByZXR1cm47IH1cbiAgICAgICAgICAgICAgICBtb3VzZW91dCgpO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbignbW91c2Vtb3ZlJywgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHZhciB0YXJnZXRzVG9TaG93ID0gJCQuZmlsdGVyVGFyZ2V0c1RvU2hvdygkJC5kYXRhLnRhcmdldHMpO1xuICAgICAgICAgICAgICAgIHZhciBtb3VzZSwgY2xvc2VzdCwgc2FtZVhEYXRhLCBzZWxlY3RlZERhdGE7XG5cbiAgICAgICAgICAgICAgICBpZiAoJCQuZHJhZ2dpbmcpIHsgcmV0dXJuOyB9IC8vIGRvIG5vdGhpbmcgd2hlbiBkcmFnZ2luZ1xuICAgICAgICAgICAgICAgIGlmICgkJC5oYXNBcmNUeXBlKHRhcmdldHNUb1Nob3cpKSB7IHJldHVybjsgfVxuXG4gICAgICAgICAgICAgICAgbW91c2UgPSBkMy5tb3VzZSh0aGlzKTtcbiAgICAgICAgICAgICAgICBjbG9zZXN0ID0gJCQuZmluZENsb3Nlc3RGcm9tVGFyZ2V0cyh0YXJnZXRzVG9TaG93LCBtb3VzZSk7XG5cbiAgICAgICAgICAgICAgICBpZiAoJCQubW91c2VvdmVyICYmICghY2xvc2VzdCB8fCBjbG9zZXN0LmlkICE9PSAkJC5tb3VzZW92ZXIuaWQpKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhX29ubW91c2VvdXQuY2FsbCgkJC5hcGksICQkLm1vdXNlb3Zlcik7XG4gICAgICAgICAgICAgICAgICAgICQkLm1vdXNlb3ZlciA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoISBjbG9zZXN0KSB7XG4gICAgICAgICAgICAgICAgICAgIG1vdXNlb3V0KCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoJCQuaXNTY2F0dGVyVHlwZShjbG9zZXN0KSB8fCAhY29uZmlnLnRvb2x0aXBfZ3JvdXBlZCkge1xuICAgICAgICAgICAgICAgICAgICBzYW1lWERhdGEgPSBbY2xvc2VzdF07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgc2FtZVhEYXRhID0gJCQuZmlsdGVyQnlYKHRhcmdldHNUb1Nob3csIGNsb3Nlc3QueCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgIC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dWZmaXgoY2xvc2VzdC5pZCkpLnNlbGVjdEFsbCgnLicgKyBDTEFTUy5zaGFwZSArICctJyArIGNsb3Nlc3QuaW5kZXgpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9ncm91cGVkIHx8ICQkLmlzV2l0aGluU2hhcGUodGhpcywgY2xvc2VzdCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC50b2dnbGVTaGFwZSh0aGlzLCBjbG9zZXN0LCBjbG9zZXN0LmluZGV4KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC5jb25maWcuZGF0YV9vbmNsaWNrLmNhbGwoJCQuYXBpLCBjbG9zZXN0LCB0aGlzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5jYWxsKFxuICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9kcmFnZ2FibGUgJiYgJCQuZHJhZyA/IChcbiAgICAgICAgICAgICAgICAgICAgZDMuYmVoYXZpb3IuZHJhZygpLm9yaWdpbihPYmplY3QpXG4gICAgICAgICAgICAgICAgICAgICAgICAub24oJ2RyYWcnLCBmdW5jdGlvbiAoKSB7ICQkLmRyYWcoZDMubW91c2UodGhpcykpOyB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgLm9uKCdkcmFnc3RhcnQnLCBmdW5jdGlvbiAoKSB7ICQkLmRyYWdzdGFydChkMy5tb3VzZSh0aGlzKSk7IH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAub24oJ2RyYWdlbmQnLCBmdW5jdGlvbiAoKSB7ICQkLmRyYWdlbmQoKTsgfSlcbiAgICAgICAgICAgICAgICApIDogZnVuY3Rpb24gKCkge31cbiAgICAgICAgICAgICk7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5kaXNwYXRjaEV2ZW50ID0gZnVuY3Rpb24gKHR5cGUsIGluZGV4LCBtb3VzZSkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLFxuICAgICAgICAgICAgc2VsZWN0b3IgPSAnLicgKyBDTEFTUy5ldmVudFJlY3QgKyAoISQkLmlzTXVsdGlwbGVYKCkgPyAnLScgKyBpbmRleCA6ICcnKSxcbiAgICAgICAgICAgIGV2ZW50UmVjdCA9ICQkLm1haW4uc2VsZWN0KHNlbGVjdG9yKS5ub2RlKCksXG4gICAgICAgICAgICBib3ggPSBldmVudFJlY3QuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCksXG4gICAgICAgICAgICB4ID0gYm94LmxlZnQgKyAobW91c2UgPyBtb3VzZVswXSA6IDApLFxuICAgICAgICAgICAgeSA9IGJveC50b3AgKyAobW91c2UgPyBtb3VzZVsxXSA6IDApLFxuICAgICAgICAgICAgZXZlbnQgPSBkb2N1bWVudC5jcmVhdGVFdmVudChcIk1vdXNlRXZlbnRzXCIpO1xuXG4gICAgICAgIGV2ZW50LmluaXRNb3VzZUV2ZW50KHR5cGUsIHRydWUsIHRydWUsIHdpbmRvdywgMCwgeCwgeSwgeCwgeSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmFsc2UsIGZhbHNlLCBmYWxzZSwgZmFsc2UsIDAsIG51bGwpO1xuICAgICAgICBldmVudFJlY3QuZGlzcGF0Y2hFdmVudChldmVudCk7XG4gICAgfTtcblxuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldEN1cnJlbnRXaWR0aCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnO1xuICAgICAgICByZXR1cm4gY29uZmlnLnNpemVfd2lkdGggPyBjb25maWcuc2l6ZV93aWR0aCA6ICQkLmdldFBhcmVudFdpZHRoKCk7XG4gICAgfTtcb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Jykge1xuICAgICAgICAgICAgICAgICAgICAvLyBJbiBJRSBpbiBjZXJ0YWluIGNhc2VzIGdldEJvdW5kaW5nQ2xpZW50UmVjdFxuICAgICAgICAgICAgICAgICAgICAvLyB3aWxsIGNhdXNlIGFuIFwidW5zcGVjaWZpZWQgZXJyb3JcIlxuICAgICAgICAgICAgICAgICAgICB2ID0gcGFyZW50Lm9mZnNldFdpZHRoO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh2KSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBwYXJlbnQgPSBwYXJlbnQucGFyZW50Tm9kZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdjtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldFBhcmVudFdpZHRoID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5nZXRQYXJlbnRSZWN0VmFsdWUoJ3dpZHRoJyk7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRQYXJlbnRIZWlnaHQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBoID0gdGhpcy5zZWxlY3RDaGFydC5zdHlsZSgnaGVpZ2h0Jyk7XG4gICAgICAgIHJldHVybiBoLmluZGV4T2YoJ3B4JykgPiAwID8gK2gucmVwbGFjZSgncHgnLCAnJykgOiAwO1xuICAgIH07XG5cblxuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldFN2Z0xlZnQgPSBmdW5jdGlvbiAod2l0aG91dFJlY29tcHV0ZSkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWcsXG4gICAgICAgICAgICBoYXNMZWZ0QXhpc1JlY3QgPSBjb25maWcuYXhpc19yb3RhdGVkIHx8ICghY29uZmlnLmF4aXNfcm90YXRlZCAmJiAhY29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sgY29udGludWU7IH1cbiAgICAgICAgICAgICAgICBmb3IgKGsgPSAwOyBrIDwgY29uZmlnLmRhdGFfZ3JvdXBzW2pdLmxlbmd0aDsgaysrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YV9ncm91cHNbal1ba10gaW4gaW5kaWNlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW5kaWNlc1tkLmlkXSA9IGluZGljZXNbY29uZmlnLmRhdGFfZ3JvdXBzW2pdW2tdXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGlzVW5kZWZpbmVkKGluZGljZXNbZC5pZF0pKSB7IGluZGljZXNbZC5pZF0gPSBpKys7IH1cbiAgICAgICAgfSk7XG4gICAgICAgIGluZGljZXMuX19tYXhfXyA9IGkgLSAxO1xuICAgICAgICByZXR1cm4gaW5kaWNlcztcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldFNoYXBlWCA9IGZ1bmN0aW9uIChvZmZzZXQsIHRhcmdldHNOdW0sIGluZGljZXMsIGlzU3ViKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsIHNjYWxlID0gaXNTdWIgPyAkJC5zdWJYIDogJCQueDtcbiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChkKSB7XG4gICAgICAgICAgICB2YXIgaW5kZXggPSBkLmlkIGluIGluZGljZXMgPyBpbmRpY2VzW2QuaWRdIDogMDtcbiAgICAgICAgICAgIHJldHVybiBkLnggfHwgZC54ID09PSAwID8gc2NhbGUoZC54KSAtIG9mZnNldCAqICh0YXJnZXRzTnVtIC8gMiAtIGluZGV4KSA6IDA7XG4gICAgICAgIH07XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRTaGFwZVkgPSBmdW5jdGlvbiAoaXN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RdKSB7IHJldHVybjsgfVxuICAgICAgICAgICAgICAgIGlmICh0YXJnZXRJZHMuaW5kZXhPZih0LmlkKSA8IHRhcmdldElkcy5pbmRleE9mKGQuaWQpKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGNoZWNrIGlmIHRoZSB4IHZhbHVlcyBsaW5lIHVwXG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdmFsdWVzW2ldID09PSAndW5kZWZpbmVkJyB8fCArdmFsdWVzW2ldLnggIT09ICtkLngpIHsgIC8vIFwiK1wiIGZvciB0aW1lc2VyaWVzXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBpZiBub3QsIHRyeSB0byBmaW5kIHRoZSB2YWx1ZSB0aGF0IGRvZXMgbGluZSB1cFxuICAgICAgICAgICAgICAgICAgICAgICAgaSA9IC0xO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVzLmZvckVhY2goZnVuY3Rpb24gKHYsIGopIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodi54ID09PSBkLngpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgaW4gdmFsdWVzICYmIHZhbHVlc1tpXS52YWx1ZSAqIGQudmFsdWUgPj0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgb2Zmc2V0ICs9IHNjYWxlKHZhbHVlc1tpXS52YWx1ZSkgLSB5MDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgcmV0dXJuIG9mZnNldDtcbiAgICAgICAgfTtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmlzV2l0aGluU2hhcGUgPS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mlzTGluZVR5cGUoZCkpIHtcbiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFfcmVnaW9uc1tkLmlkXSkge1xuICAgICAgICAgICAgICAgICAgICBwYXRoID0gJCQubGluZVdpdGhSZWdpb25zKHZhbHVlcywgeCwgeSwgY29uZmlnLmRhdGFfcmVnaW9uc1tkLmlkXSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCQkLmlzU3RlcFR5cGUoZCkpIHsgdmFsdWVzID0gJCQuY29udmVydFZhbHVlc1RvU3RlcCh2YWx1ZXMpOyB9XG4gICAgICAgICAgICAgICAgICAgIHBhdGggPSBsaW5lLmludGVycG9sYXRlKCQkLmdldEludGVycG9sYXRlKGQpKSh2YWx1ZXMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKHZhbHVlc1swXSkge1xuICAgICAgICAgICAgICAgICAgICB4MCA9IHgodmFsdWVzWzBdLngpO1xuICAgICAgICAgICAgICAgICAgICB5MCA9IHkodmFsdWVzWzBdLnZhbHVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcGF0aCA9IGNvbmZpZy5heGlzX3JvdGF0ZWQgPyBcIk0gXCIgKyB5MCArIFwiIFwiICsgeDAgOiBcIk0gXCIgKyB4MCArIFwiIFwiICsgeTA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcGF0aCA/IHBhdGggOiBcIk0gMCAwXCI7XG4gICAgICAgIH07XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZW5lcmF0ZUdldExpbmVQb2ludHMgPSBmdW5jdGlvbiAobGluZUluZGljZXMsIGlzU3ViKSB7IC8vIHBhcnRpYWwgZHVwbGljYXRpb24gb2YgZ2VuZXJhdGVHZXRCYXJQb2ludHNcbiAgICAgICAgdmFyICQkID0gdGhpcywgY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HJldHVybiB0cnVlOyB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBDaGVjayBzdGFydC9lbmQgb2YgcmVnaW9uc1xuICAgICAgICBpZiAoaXNEZWZpbmVkKF9yZWdpb25zKSkge1xuICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IF9yZWdpb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgcmVnaW9uc1tpXSA9IHt9O1xuICAgICAgICAgICAgICAgIGlmIChpc1VuZGVmaW5lZChfcmVnaW9uc1tpXS5zdGFydCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVnaW9uc1tpXS5zdGFydCA9IGRbMF0ueDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZWdpb25zW2ldLnN0YXJ0ID0gJCQuaXNUaW1lU2VyaWVzKCkgPyAkJC5wYXJzZURhdGUoX3JlZ2lvbnNbaV0uc3RhcnQpIDogX3JlZ2lvbnNbaV0uc3RhcnQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChpc1VuZGVmaW5lZChfcmVnaW9uc1tpXS5lbmQpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlZ2lvbnNbaV0uZW5kID0gZFtkLmxlbmd0aCAtIDFdLng7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmVnaW9uc1tpXS5lbmQgPSAkJC5pc1RpbWVTZXJpZXMoKSA/ICQkLnBhcnNlRGF0ZShfcmVnaW9uc1tpXS5lbmQpIDogX3JlZ2lvbnNbaV0uZW5kO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFNldCBzY2FsZXNcbiAgICAgICAgeFZhbHVlID0gY29uZmlnLmF4aXNfcm90YXRlZCA/IGZ1bmN0aW9uIChkKSB7IHJldHVybiB5KGQudmFsdWUpOyB9IDogZnVuY3Rpb24gKGQpIHsgcmV0dXJuIHgoZC54KTsgfTtcbiAgICAgICAgeVZhbHVlID0gY29uZmlnLmF4aXNfcm90YXRlZCA/IGZ1bmN0aW9uIChkKSB7IHJldHVybiB4KGQueCk7IH0gOiBmdW5jdGlvbiAoZCkgeyByZXR1cm4geShkLnZhbHVlKTsgfTtcblxuICAgICAgICAvLyBEZWZpbmUgc3ZnIGdlbmVyYXRvciBmdW5jdGlvbiBmb3IgcmVnaW9uXG4gICAgICAgIGZ1bmN0aW9uIGdlbmVyYXRlTShwb2ludHMpIHtcbiAgICAgICAgICAgIHJldHVybiAnTScgKyBwb2ludHNbMF1bMF0gKyAnICcgKyBwb2ludHNbMF1bMV0gKyAnICcgKyBwb2ludHNbMV1bMF0gKyAnICcgKyBwb2ludHNbMV1bMV07XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCQkLmlzVGltZVNlcmllcygpKSB7XG4gICAgICAgICAgICBzV2l0aFJlZ2lvbiA9IGZ1bmN0aW9uIChkMCwgZDEsIGosIGRpZmYpIHtcbiAgICAgICAgICAgICAgICB2YXIgeDAgPSBkMC54LmdldFRpbWUoKSwgeF9kaWZmID0gZDEueCAtIGQwLngsXG4gICAgICAgICAgICAgICAgICAgIHh2MCA9IG5ldyBEYXRlKHgwICsgeF9kaWZmICogaiksXG4gICAgICAgICAgICAgICAgICAgIHh2MSA9IG5ldyBEYXRlKHgwICsgeF9kaWZmICogKGogKyBkaWZmKSksXG4gICAgICAgICAgICAgICAgICAgIHBvaW50cztcbiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmF4aXNfcm90YXRlZCkge1xuICAgICAgICAgICAgICAgICAgICBwb2ludHMgPSBbW3koeXAoaikpLCB4KHh2MCldLCBbeSh5cChqICsgZGlmZikpLCB4KHh2MSldXTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBwb2ludHMgPSBbW3goeHYwKSwgeSh5cChqKSldLCBbeCh4djEpLCB5KHlwKGogKyBkaWZmKSldXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIGdlbmVyYXRlTShwb2ludHMpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHNXaXRoUmVnaW9uID0gZnVuY3Rpb24gKGQwLCBkMSwgaiwgZGlmZikge1xuICAgICAgICAgICAgICAgIHZhciBwb2ludHM7XG4gICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5heGlzX3JvdGF0ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgcG9pbnRzID0gW1t5KHlwKGopLCB0cnVlKSwgeCh4cChqKSldLCBbeSh5cChqICsgZGlmZiksIHRydWUpLCB4KHhwKGogKyBkaWZmKSldXTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBwb2ludHMgPSBbW3goeHAoaiksIHRydWUpLCB5KHlwKGopKV0sIFt4KHhwKGogKyBkaWZmKSwgdHJ1ZSksIHkoeXAoaiArIGRpZmYpKV1dO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gZ2VuZXJhdGVNKHBvaW50cyk7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gR2VuZXJhdGVcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGQubGVuZ3RoOyBpKyspIHtcblxuICAgICAgICAgICAgLy8gRHJhdyBhcyBub3JtYWxcbiAgICAgICAgICAgIGlmIChpc1VuZGVmaW5lZChyZWdpb25zKSB8fCAhIGlzV2l0aGluUmVnaW9ucyhkW2ldLngsIHJlZ2lvbnMpKSB7XG4gICAgICAgICAgICAgICAgcyArPSBcIiBcIiArIHhWYWx1ZShkW2ldKSArIFwiIFwiICsgeVZhbHVlKGRbaV0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gRHJhdyB3aXRoIHJlZ2lvbiAvLyBUT0RPOiBGaXggZm9yIGhvcml6b3RhbCBjaGFydHNcbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIHhwID0gJCQuZ2V0U2NhbGUoZFtpIC0gMV0ueCArIHhPZmZzZXQsIGRbaV0ueCArIHhPZmZzZXQsICQkLmlzVGltZVNlcmllcygpKTtcbiAgICAgICAgICAgICAgICB5cCA9ICQkLmdldFNjYWxlKGRbaSAtIDFdLnZhbHVlLCBkW2ldLnZhbHVlKTtcblxuICAgICAgICAgICAgICAgIGR4ID0geChkW2ldLngpIC0geChkW2kgLSAxXS54KTtcbiAgICAgICAgICAgICAgICBkeSA9IHkoZFtpXS52YWx1ZSkgLSB5KGRbaSAtIDFdLnZhbHVlKTtcbiAgICAgICAgICAgICAgICBkZCA9IE1hdGguc3FydChNYXRoLnBvdyhkeCwgMikgKyBNYXRoLnBvdyhkeSwgMikpO1xuICAgICAgICAgICAgICAgIGRpZmYgPSAyIC8gZGQ7XG4gICAgICAgICAgICAgICAgZGlmZngyID0gZGlmZiAqIDI7XG5cbiAgICAgICAgICAgICAgICBmb3IgKGogPSBkaWZmOyBqIDw9IDE7IGogKz0gZGlmZngyKSB7XG4gICAgICAgICAgICAgICAgICAgIHMgKz0gc1dpdGhSZWdpb24oZFtpIC0gMV0sIGRbaV0sIGosIGRpZmYpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHByZXYgPSBkW2ldLng7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcztcbiAgICB9O1xuXG5cbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi51cGRhdGVBcmVhID0gZnVuY3Rpb24gKGR1cmF0aW9uRm9yRXhpdCkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBkMyA9ICQkLmQzO1xuICAgICAgICAkJC5tYWluQXJlYSA9ICQkLm1haW4uc2VsZWN0QWxsKCcuJy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XG4gICAgICAgICAgICAod2l0aFRyYW5zaXRpb24gPyBzZWxlY3RlZENpcmNsZXMudHJhbnNpdGlvbihNYXRoLnJhbmRvbSgpLnRvU3RyaW5nKCkpIDogc2VsZWN0ZWRDaXJjbGVzKVxuICAgICAgICAgICAgICAgIC5hdHRyKFwiY3hcIiwgY3gpXG4gICAgICAgICAgICAgICAgLmF0dHIoXCJjeVwiLCBjeSlcbiAgICAgICAgXTtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmNpcmNsZVggPSBmdW5jdGlvbiAoZCkge1xuICAgICAgICByZXR1cm4gZC54IHx8IGQueCA9PT0gMCA/IHRoaXMueChkLngpIDogbnVsbDtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnVwZGF0ZUNpcmNsZVkgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsIGxpbmVJbmRpY2VzLCBnZXRQb2ludHM7XG4gICAgICAgIGlmICgkJC5jb25maWcuZGF0YV9ncm91cHMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgbGluZUluZGljZXMgPSAkJC5nZXRTaGFwZUluZGljZXMoJCQuaXNMaW5lVHlwZSksXG4gICAgICAgICAgICBnZXRQb2ludHMgPSAkJC5nZW5lcmF0ZUdldExpbmVQb2ludHMobGluZUluZGljZXMpO1xuICAgICAgICAgICAgJCQuY2lyY2xlWSA9IGZ1bmN0aW9uIChkLCBpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGdldFBvaW50cyhkLCBpKVswXVsxXTtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAkJC5jaXJjbGVZID0gZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gJCQuZ2V0WVNjYWxlKGQuaWQpKGQudmFsdWUpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgYzN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AgICAgICAnTCcgKyBwb2ludHNbMV1baW5kZXhYXSArICcsJyArIHBvaW50c1sxXVtpbmRleFldICsgJyAnICtcbiAgICAgICAgICAgICAgICAgICAgJ0wnICsgcG9pbnRzWzJdW2luZGV4WF0gKyAnLCcgKyBwb2ludHNbMl1baW5kZXhZXSArICcgJyArXG4gICAgICAgICAgICAgICAgICAgICdMJyArIHBvaW50c1szXVtpbmRleFhdICsgJywnICsgcG9pbnRzWzNdW2luZGV4WV0gKyAnICcgK1xuICAgICAgICAgICAgICAgICAgICAneic7XG5cbiAgICAgICAgICAgIHJldHVybiBwYXRoO1xuICAgICAgICB9O1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2VuZXJhdGVHZXRCYXJQb2ludHMgPSBmdW5jdGlvbiAoYmFySW5kaWNlcywgaXNTdWIpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcyxcbiAgICAgICAgICAgIGF4aXMgPSBpc1N1YiA/ICQkLnN1YlhBeGlzIDogJCQueEF4aXMsXG4gICAgICAgICAgICBiYXJUYXJnZXRzTnVtID0gYmFySW5kaWNlcy5fX21heF9fICsgMSxcbiAgICAgICAgICAgIGJhclcgPSAkJC5nZXRCYXJXKGF4aXMsIGJhclRhcmdldHNOdW0pLFxuICAgICAgICAgICAgYmFyWCA9ICQkLmdldFNoYXBlWChiYXJXLCBiYXJUYXJnZXRzTnVtLCBiYXJJbmRpY2VzLCAhIWlzU3ViKSxcbiAgICAgICAgICAgIGJhclkgPSAkJC5nZXRTaGFwZVkoISFpc1N1YiksXG4gICAgICAgICAgICBiYXJPZmZzZXQgPSAkJC5nZXRTaGFwZU9mZnNldCgkJC5pc0JhclR5cGUsIGJhckluZGljZXMsICEhaXNTdWIpLFxuICAgICAgICAgICAgeVNjYWxlID0gaXNTdWIgPyAkJC5nZXRTdWJZU2NhbGUgOiAkJC5nZXRZU2NhbGU7XG4gICAgICAgIHJldHVybiBmdW5jdGlvbiAoZCwgaSkge1xuICAgICAgICAgICAgdmFyIHkwID0geVNjYWxlLmNhbGwoJCQsIGQuaWQpKDApLFxuICAgICAgICAgICAgICAgIG9mZnNldCA9IGJhck9mZnNldChkLCBpKSB8fCB5MCwgLy8gb2Zmc2V0IGlzIGZvciBzdGFja2VkIGJhciBjaGFydFxuICAgICAgICAgICAgICAgIHBvc1ggPSBiYXJYKGQpLCBwb3NZID0gYmFyWShkKTtcbiAgICAgICAgICAgIC8vIGZpeCBwb3NZIG5vdCB0byBvdmVyZmxvdyBvcHBvc2l0ZSBxdWFkcmFudFxuICAgICAgICAgICAgaWYgKCQkLmNvbmZpZy5heGlzX3JvdGF0ZWQpIHtcbiAgICAgICAgICAgICAgICBpZiAoKDAgPCBkLnZhbHVlICYmIHBvc1kgPCB5MCkgfHwgKGQudmFsdWUgPCAwICYmIHkwIDwgcG9zWSkpIHsgcG9zWSA9IHkwOyB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyA0IHBvaW50cyB0aGF0IG1ha2UgYSBiYXJcbiAgICAgICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAgICAgW3Bvc1gsIG9mZnNldF0sXG4gICAgICAgICAgICAgICAgW3Bvc1gsIHBvc1kgLSAoeTAgLSBvZmZzZXQpXSxcbiAgICAgICAgICAgICAgICBbcG9zWCArIGJhclcsIHBvc1kgLSAoeTAgLSBvZmZzZXQpXSxcbiAgICAgICAgICAgICAgICBbcG9zWCArIGJhclcsIG9mZnNldF1cbiAgICAgICAgICAgIF07XG4gICAgICAgIH07XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5pc1dpdGhpbkJhciA9IGZ1bmN0aW9uICh0aGF0KSB7XG4gICAgICAgIHZhciBtb3VzZSA9IHRoaXMuZDMubW91c2UodGhhdCksIGJveCA9IHRoYXQuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCksXG4gICAgICAgICAgICBzZWcwID0gdGhhdC5wYXRoU2VnTGlzdC5nZXRJdGVtKDApLCBzZWc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ggPSB0ZXh0RWxlbWVudC5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKSwgeFBvcywgcGFkZGluZztcbiAgICAgICAgaWYgKCQkLmNvbmZpZy5heGlzX3JvdGF0ZWQpIHtcbiAgICAgICAgICAgIHBhZGRpbmcgPSAkJC5pc0JhclR5cGUoZCkgPyA0IDogNjtcbiAgICAgICAgICAgIHhQb3MgPSBwb2ludHNbMl1bMV0gKyBwYWRkaW5nICogKGQudmFsdWUgPCAwID8gLTEgOiAxKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHhQb3MgPSAkJC5oYXNUeXBlKCdiYXInKSA/IChwb2ludHNbMl1bMF0gKyBwb2ludHNbMF1bMF0pIC8gMiA6IHBvaW50c1swXVswXTtcbiAgICAgICAgfVxuICAgICAgICAvLyBzaG93IGxhYmVscyByZWdhcmRsZXNzIG9mIHRoZSBkb21haW4gaWYgdmFsdWUgaXMgbnVsbFxuICAgICAgICBpZiAoZC52YWx1ZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgaWYgKHhQb3MgPiAkJC53aWR0aCkge1xuICAgICAgICAgICAgICAgIHhQb3MgPSAkJC53aWR0aCAtIGJveC53aWR0aDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoeFBvcyA8IDApIHtcbiAgICAgICAgICAgICAgICB4UG9zID0gNDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4geFBvcztcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldFlGb3JUZXh0ID0gZnVuY3Rpb24gKHBvaW50cywgZCwgdGV4dEVsZW1lbnQpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcyxcbiAgICAgICAgICAgIGJveCA9IHRleHRFbGVtZW50LmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLFxuICAgICAgICAgICAgeVBvcztcbiAgICAgICAgaWYgKCQkLmNvbmZpZy5heGlzX3JvdGF0ZWQpIHtcbiAgICAgICAgICAgIHlQb3MgPSAocG9pbnRzWzBdWzBdICsgcG9pbnRzWzJdWzBdICsgYm94LmhlaWdodCAqIDAuNikgLyAyO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgeVBvcyA9IHBvaW50c1syXVsxXTtcbiAgICAgICAgICAgIGlmIChkLnZhbHVlIDwgMCAgfHwgKGQudmFsdWUgPT09IDAgJiYgISQkLmhhc1Bvc2l0aXZlVmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgeVBvcyArPSBib3guaGVpZ2h0O1xuICAgICAgICAgICAgICAgIGlmICgkJC5pc0JhclR5cGUoZCkgJiYgJCQuaXNTYWZhcmkoKSkge1xuICAgICAgICAgICAgICAgICAgICB5UG9zIC09IDM7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKCEkJC5pc0JhclR5cGUoZCkgJiYgJCQuaXNDaHJvbWUoKSkge1xuICAgICAgICAgICAgICAgICAgICB5UG9zICs9IDM7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB5UG9zICs9ICQkLmlzQmFyVHlwZShkKSA/IC0zIDogLTY7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gc2hvdyBsYWJlbHMgcmVnYXJkbGVzcyBvZiB0aGUgZG9tYWluIGlmIHZhbHVlIGlzIG51bGxcbiAgICAgICAgaWYgKGQudmFsdWUgPT09IG51bGwgJiYgISQkLmNvbmZpZy5heGlzX3JvdGF0ZWQpIHtcbiAgICAgICAgICAgIGlmICh5UG9zIDwgYm94LmhlaWdodCkge1xuICAgICAgICAgICAgICAgIHlQb3MgPSBib3guaGVpZ2h0O1xuICAgICAgICAgICAgfSBlbHNlIGlmICh5UG9zID4gdGhpcy5oZWlnaHQpIHtcbiAgICAgICAgICAgICAgICB5UG9zID0gdGhpcy5oZWlnaHQgLSA0O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB5UG9zO1xuICAgIH07XG5cbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5zZXRUYXJnZXRUeXBlID0gZnVuY3Rpb24gKHRhcmdldElkcywgdHlwZSkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWc7XG4gICAgICAgICQkLm1hcFRvVGFyZ2V0SWRzKHRhcmdldElkcykuZm9yRWFjaChmdW5jdGlvbiAoaWQpIHtcbiAgICAgICAgICAgICQkLndpdGhvdXRGYWRlSW5baWRdID0gKHR5cGUgPT09IGNvbmZpZy5kYXRhX3R5cGVzW2lkXSk7XG4gICAgICAgICAgICBjb25maWcuZGF0YV90eXBlc1tpZF0gPSB0eXBlO1xuICAgICAgICB9KTtcbiAgICAgICAgaWYgKCF0YXJnZXRJZHMpIHtcbiAgICAgICAgICAgIGNvbmZpZy5kYXRhX3R5cGUgPSB0eXBlO1xuICAgICAgICB9XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5oYXNUeXBlID0gZnVuY3Rpb24gKHR5cGUsIHRhcmdldHMpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgdHlwZXMgPSAkJC5jb25maWcuZGF0YV90eXBlcywgaGFzID0gZmFsc2U7XG4gICAgICAgIHRhcmdldHMgPSB0YXJnZXRzIHx8ICQkLmRhdGEudGFyZ2V0cztcbiAgICAgICAgaWYgKHRhcmdldHMgJiYgdGFyZ2V0cy5sZW5ndGgpIHtcbiAgICAgICAgICAgIHRhcmdldHMuZm9yRWFjaChmdW5jdGlvbiAodGFyZ2V0KSB7XG4gICAgICAgICAgICAgICAgdmFyIHQgPSB0eXBlc1t0YXJnZXQuaWRdO1xuICAgICAgICAgICAgICAgIGlmICgodCAmJiB0LmluZGV4T2YodHlwZSkgPj0gMCkgfHwgKCF0ICYmIHR5cGUgPT09ICdsaW5lJykpIHtcbiAgICAgICAgICAgICAgICAgICAgaGFzID0gdHJ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aXRoVHJhbnNpdGlvbikge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWcsIHh2ID0gJCQueHYuYmluZCgkJCksXG4gICAgICAgICAgICBsaW5lcyA9ICQkLnhncmlkTGluZXMuc2VsZWN0KCdsaW5lJyksXG4gICAgICAgICAgICB0ZXh0cyA9ICQkLnhncmlkTGluZXMuc2VsZWN0KCd0ZXh0Jyk7XG4gICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICAod2l0aFRyYW5zaXRpb24gPyBsaW5lcy50cmFuc2l0aW9uKCkgOiBsaW5lcylcbiAgICAgICAgICAgICAgICAuYXR0cihcIngxXCIsIGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAwIDogeHYpXG4gICAgICAgICAgICAgICAgLmF0dHIoXCJ4MlwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gJCQud2lkdGggOiB4dilcbiAgICAgICAgICAgICAgICAuYXR0cihcInkxXCIsIGNvbmZpZy5heGlzX3JvdGF0ZWQgPyB4diA6IDApXG4gICAgICAgICAgICAgICAgLmF0dHIoXCJ5MlwiLCBjb25maWcuYXhpc19yb3RhdGVkID8geHYgOiAkJC5oZWlnaHQpXG4gICAgICAgICAgICAgICAgLnN0eWxlKFwib3BhY2l0eVwiLCAxKSxcbiAgICAgICAgICAgICh3aXRoVHJhbnNpdGlvbiA/IHRleHRzLnRyYW5zaXRpb24oKSA6IHRleHRzKVxuICAgICAgICAgICAgICAgIC5hdHRyKFwieFwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gJCQueUdyaWRUZXh0WC5iaW5kKCQkKSA6ICQkLnhHcmlkVGV4dFguYmluZCgkJCkpXG4gICAgICAgICAgICAgICAgLmF0dHIoXCJ5XCIsIHh2KVxuICAgICAgICAgICAgICAgIC50ZXh0KGZ1bmN0aW9uIChkKSB7IHJldHVybiBkLnRleHQ7IH0pXG4gICAgICAgICAgICAgICAgLnN0eWxlKFwib3BhY2l0eVwiLCAxKVxuICA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haW5bMF0uZ2V0RnVsbFllYXIoKTtcbiAgICAgICAgICAgIGxhc3RZZWFyID0geERvbWFpblsxXS5nZXRGdWxsWWVhcigpO1xuICAgICAgICAgICAgZm9yIChpID0gZmlyc3RZZWFyOyBpIDw9IGxhc3RZZWFyOyBpKyspIHtcbiAgICAgICAgICAgICAgICBncmlkRGF0YS5wdXNoKG5ldyBEYXRlKGkgKyAnLTAxLTAxIDAwOjAwOjAwJykpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZ3JpZERhdGEgPSBzY2FsZS50aWNrcygxMCk7XG4gICAgICAgICAgICBpZiAoZ3JpZERhdGEubGVuZ3RoID4gdGlja051bSkgeyAvLyB1c2Ugb25seSBpbnRcbiAgICAgICAgICAgICAgICBncmlkRGF0YSA9IGdyaWREYXRhLmZpbHRlcihmdW5jdGlvbiAoZCkgeyByZXR1cm4gKFwiXCIgKyBkKS5pbmRleE9mKCcuJykgPCAwOyB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZ3JpZERhdGE7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRHcmlkRmlsdGVyVG9SZW1vdmUgPSBmdW5jdGlvbiAocGFyYW1zKSB7XG4gICAgICAgIHJldHVybiBwYXJhbXMgPyBmdW5jdGlvbiAobGluZSkge1xuICAgICAgICAgICAgdmFyIGZvdW5kID0gZmFsc2U7XG4gICAgICAgICAgICBbXS5jb25jYXQocGFyYW1zKS5mb3JFYWNoKGZ1bmN0aW9uIChwYXJhbSkge1xuICAgICAgICAgICAgICAgIGlmICgoKCd2YWx1ZScgaW4gcGFyYW0gJiYgbGluZS52YWx1ZSA9PT0gcGFyYW0udmFsdWUpIHx8ICgnY2xhc3MnIGluIHBhcmFtICYmIGxpbmVbJ2NsYXNzJ10gPT09IHBhcmFtWydjbGFzcyddKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgZm91bmQ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nLmdyaWRfeV9saW5lcy5maWx0ZXIodG9TaG93KTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5pbml0VG9vbHRpcCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLCBpO1xuICAgICAgICAkJC50b29sdGlwID0gJCQuc2VsZWN0Q2hhcnRcbiAgICAgICAgICAgIC5zdHlsZShcInBvc2l0aW9uXCIsIFwicmVsYXRpdmVcIilcbiAgICAgICAgICAuYXBwZW5kKFwiZGl2XCIpXG4gICAgICAgICAgICAuYXR0cignY2xhc3MnLCBDTEFTUy50b29sdGlwQ29udGFpbmVyKVxuICAgICAgICAgICAgLnN0eWxlKFwicG9zaXRpb25cIiwgXCJhYnNvbHV0ZVwiKVxuICAgICAgICAgICAgLnN0eWxlKFwicG9pbnRlci1ldmVudHNcIiwgXCJub25lXCIpXG4gICAgICAgICAgICAuc3R5bGUoXCJkaXNwbGF5XCIsIFwibm9uZVwiKTtcbiAgICAgICAgLy8gU2hvdyB0b29sdGlwIGlmIG5lZWRlZFxuICAgICAgICBpZiAoY29uZmlnLnRvb2x0aXBfaW5pdF9zaG93KSB7XG4gICAgICAgICAgICBpZiAoJCQuaXNUaW1lU2VyaWVzKCkgJiYgaXNTdHJpbmcoY29uZmlnLnRvb2x0aXBfaW5pdF94KSkge1xuICAgICAgICAgICAgICAgIGNvbmZpZy50b29sdGlwX2luaXRfeCA9ICQkLnBhcnNlRGF0ZShjb25maWcudG9vbHRpcF9pbml0X3gpO1xuICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCAkJC5kYXRhLnRhcmdldHNbMF0udmFsdWVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoJCQuZGF0YS50YXJnZXRzWzBdLnZhbHVlc1tpXS54IC0gY29uZmlnLnRvb2x0aXBfaW5pdF94KSA9PT0gMCk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tZSB8fCBmdW5jdGlvbiAobmFtZSkgeyByZXR1cm4gbmFtZTsgfSxcbiAgICAgICAgICAgIHZhbHVlRm9ybWF0ID0gY29uZmlnLnRvb2x0aXBfZm9ybWF0X3ZhbHVlIHx8IGRlZmF1bHRWYWx1ZUZvcm1hdCxcbiAgICAgICAgICAgIHRleHQsIGksIHRpdGxlLCB2YWx1ZSwgbmFtZSwgYmdjb2xvcixcbiAgICAgICAgICAgIG9yZGVyQXNjID0gJCQuaXNPcmRlckFzYygpO1xuXG4gICAgICAgIGlmIChjb25maWcuZGF0YV9ncm91cHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICBkLnNvcnQoZnVuY3Rpb24oYSwgYil7XG4gICAgICAgICAgICAgICAgdmFyIHYxID0gYSA/IGEudmFsdWUgOiBudWxsLCB2MiA9IGIgPyBiLnZhbHVlIDogbnVsbDtcbiAgICAgICAgICAgICAgICByZXR1cm4gb3JkZXJBc2MgPyB2MSAtIHYyIDogdjIgLSB2MTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGlkcyA9ICQkLm9yZGVyVGFyZ2V0cygkJC5kYXRhLnRhcmdldHMpLm1hcChmdW5jdGlvbiAoaSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpLmlkO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBkLnNvcnQoZnVuY3Rpb24oYSwgYikge1xuICAgICAgICAgICAgICAgIHZhciB2MSA9IGEgPyBhLnZhbHVlIDogbnVsbCwgdjIgPSBiID8gYi52YWx1ZSA6IG51bGw7XG4gICAgICAgICAgICAgICAgaWYgKHYxID4gMCAmJiB2MiA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgdjEgPSBhID8gaWRzLmluZGV4T2YoYS5pZCkgOiBudWxsO1xuICAgICAgICAgICAgICAgICAgICB2MiA9IGIgPyBpZHMuaW5kZXhPZihiLmlkKSA6IG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBvcmRlckFzYyA/IHYxIC0gdjIgOiB2MiAtIHYxO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZC5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgaWYgKCEgKGRbaV0gJiYgKGRbaV0udmFsdWUgfHwgZFtpXS52YWx1ZSA9PT0gMCkpKSB7IGNvbnRpbnVlOyB9XG5cbiAgICAgICAgICAgIGlmICghIHRleHQpIHtcbiAgICAgICAgICAgICAgICB0aXRsZSA9IHNhbml0aXNlKHRpdGxlRm9ybWF0ID8gdGl0bGVGb3JtYXQoZFtpXS54KSA6IGRbaV0ueCk7XG4gICAgICAgICAgICAgICAgdGV4dCA9IFwiPHRhYmxlIGNsYXNzPSdcIiArICQkLkNMQVNTLnRvb2x0aXAgKyBcIic+XCIgKyAodGl0bGUgfHwgdGl0bGUgPT09IDAgPyBcIjx0cj48dGggY29sc3Bhbj0nMic+XCIgKyB0aXRsZSArIFwiPC90aD48L3RyPlwiIDogXCJcIik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhbHVlID0gc2FuaXRpc2UodmFsdWVGb3JtYXQoZFtpXS52YWx1ZSwgZFtpXS5yYXRpbywgZFtpXS5pZCwgZFtpXS5pbmRleCwgZCkpO1xuICAgICAgICAgICAgaWYgKHZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAvLyBTa2lwIGVsZW1lbnRzIHdoZW4gdGhlaXIgbmFtZSBpcyBzZXQgdG8gbnVsbFxuICAgICAgICAgICAgICAgIGlmIChkW2ldLm5hbWUgPT09IG51bGwpIHsgY29udGludWU7IH1cbiAgICAgICAgICAgICAgICBuYW1lID0gc2FuaXRpc2UobmFtZUZvcm1hdChkW2ldLm5hbWUsIGRbaV0ucmF0aW8sIGRbaV0uaWQsIGRbaV0uaW5kZXgpKTtcbiAgICAgICAgICAgIC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LCB3aXRob3V0U3RlcCkge1xuICAgICAgICAgICAgICAgIGlmICghd2l0aG91dFN0ZXApIHtcbiAgICAgICAgICAgICAgICAgICAgbWFyZ2luID0gKGFyZWFMZW5ndGggLSB0b3RhbExlbmd0aCAtIGl0ZW1MZW5ndGgpIC8gMjtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hcmdpbiA8IHBvc01pbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luID0gKGFyZWFMZW5ndGggLSBpdGVtTGVuZ3RoKSAvIDI7XG4gICAgICAgICAgICAgICAgICAgICAgICB0b3RhbExlbmd0aCA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdGVwKys7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc3RlcHNbaWRdID0gc3RlcDtcbiAgICAgICAgICAgICAgICBtYXJnaW5zW3N0ZXBdID0gJCQuaXNMZWdlbmRJbnNldCA/IDEwIDogbWFyZ2luO1xuICAgICAgICAgICAgICAgIG9mZnNldHNbaWRdID0gdG90YWxMZW5ndGg7XG4gICAgICAgICAgICAgICAgdG90YWxMZW5ndGggKz0gaXRlbUxlbmd0aDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHJlc2V0KSB7XG4gICAgICAgICAgICAgICAgdG90YWxMZW5ndGggPSAwO1xuICAgICAgICAgICAgICAgIHN0ZXAgPSAwO1xuICAgICAgICAgICAgICAgIG1heFdpZHRoID0gMDtcbiAgICAgICAgICAgICAgICBtYXhIZWlnaHQgPSAwO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoY29uZmlnLmxlZ2VuZF9zaG93ICYmICEkJC5pc0xlZ2VuZFRvU2hvdyhpZCkpIHtcbiAgICAgICAgICAgICAgICB3aWR0aHNbaWRdID0gaGVpZ2h0c1tpZF0gPSBzdGVwc1tpZF0gPSBvZmZzZXRzW2lkXSA9IDA7XG4gICAgICAg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jdEFsbCgnLicgKyBDTEFTUy5sZWdlbmRJdGVtKVxuICAgICAgICAgICAgLmRhdGEodGFyZ2V0SWRzKVxuICAgICAgICAgICAgLmVudGVyKCkuYXBwZW5kKCdnJylcbiAgICAgICAgICAgIC5hdHRyKCdjbGFzcycsIGZ1bmN0aW9uIChpZCkgeyByZXR1cm4gJCQuZ2VuZXJhdGVDbGFzcyhDTEFTUy5sZWdlbmRJdGVtLCBpZCk7IH0pXG4gICAgICAgICAgICAuc3R5bGUoJ3Zpc2liaWxpdHknLCBmdW5jdGlvbiAoaWQpIHsgcmV0dXJuICQkLmlzTGVnZW5kVG9TaG93KGlkKSA/ICd2aXNpYmxlJyA6ICdoaWRkZW4nOyB9KVxuICAgICAgICAgICAgLnN0eWxlKCdjdXJzb3InLCAncG9pbnRlcicpXG4gICAgICAgICAgICAub24oJ2NsaWNrJywgZnVuY3Rpb24gKGlkKSB7XG4gICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5sZWdlbmRfaXRlbV9vbmNsaWNrKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5sZWdlbmRfaXRlbV9vbmNsaWNrLmNhbGwoJCQsIGlkKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAoJCQuZDMuZXZlbnQuYWx0S2V5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAkJC5hcGkuaGlkZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgJCQuYXBpLnNob3coaWQpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgJCQuYXBpLnRvZ2dsZShpZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAkJC5pc1RhcmdldFRvU2hvdyhpZCkgPyAkJC5hcGkuZm9jdXMoaWQpIDogJCQuYXBpLnJldmVydCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbignbW91c2VvdmVyJywgZnVuY3Rpb24gKGlkKSB7XG4gICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5sZWdlbmRfaXRlbV9vbm1vdXNlb3Zlcikge1xuICAgICAgICAgICAgICAgICAgICBjb25maWcubGVnZW5kX2l0ZW1fb25tb3VzZW92ZXIuY2FsbCgkJCwgaWQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgJCQuZDMuc2VsZWN0KHRoaXMpLmNsYXNzZWQoQ0xBU1MubGVnZW5kSXRlbUZvY3VzZWQsIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoISQkLnRyYW5zaXRpbmcgJiYgJCQuaXNUYXJnZXRUb1Nob3coaWQpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAkJC5hcGkuZm9jdXMoaWQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbignbW91c2VvdXQnLCBmdW5jdGlvbiAoaWQpIHtcbiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmxlZ2VuZF9pdGVtX29ubW91c2VvdXQpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmxlZ2VuZF9pdGVtX29ubW91c2VvdXQuY2FsbCgkJCwgaWQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgJCQuZDMuc2VsZWN0KHRoaXMpLmNsYXNzZWQoQ0xBU1MubGVnZW5kSXRlbUZvY3VzZWQsIGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgJCQuYXBpLnJldmVydCgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICBsLmFwcGVuZCgndGV4dCcpXG4gICAgICAgICAgICAudGV4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AgICAgICAgICAgICAgd2l0aG91dFRyYW5zaXRpb246IHdpdGhvdXRUcmFuc2l0aW9uLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGF4aXMgPSBjM19heGlzKCQkLmQzLCBheGlzUGFyYW1zKS5zY2FsZShzY2FsZSkub3JpZW50KG9yaWVudCk7XG5cbiAgICAgICAgaWYgKCQkLmlzVGltZVNlcmllcygpICYmIHRpY2tWYWx1ZXMgJiYgdHlwZW9mIHRpY2tWYWx1ZXMgIT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICAgICAgdGlja1ZhbHVlcyA9IHRpY2tWYWx1ZXMubWFwKGZ1bmN0aW9uICh2KSB7IHJldHVybiAkJC5wYXJzZURhdGUodik7IH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gU2V0IHRpY2tcbiAgICAgICAgYXhpcy50aWNrRm9ybWF0KHRpY2tGb3JtYXQpLnRpY2tWYWx1ZXModGlja1ZhbHVlcyk7XG4gICAgICAgIGlmICgkJC5pc0NhdGVnb3JpemVkKCkpIHtcbiAgICAgICAgICAgIGF4aXMudGlja0NlbnRlcmVkKGNvbmZpZy5heGlzX3hfdGlja19jZW50ZXJlZCk7XG4gICAgICAgICAgICBpZiAoaXNFbXB0eShjb25maWcuYXhpc194X3RpY2tfY3VsbGluZykpIHtcbiAgICAgICAgICAgICAgICBjb25maWcuYXhpc194X3RpY2tfY3VsbGluZyA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGF4aXM7XG4gICAgfTtcbiAgICBBeGlzLnByb3RvdHlwZS51cGRhdGVYQXhpc1RpY2tWYWx1ZXMgPSBmdW5jdGlvbiB1cGRhdGVYQXhpc1RpY2tWYWx1ZXModGFyZ2V0cywgYXhpcykge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLm93bmVyLCBjb25maWcgPSAkJC5jb25maWcsIHRpY2tWYWx1ZXM7XG4gICAgICAgIGlmIChjb25maWcu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aXNJZChheGlzSWQpO1xuICAgICAgICByZXR1cm4gaXNTdHJpbmcob3B0aW9uKSA/IG9wdGlvbiA6IG9wdGlvbiA/IG9wdGlvbi50ZXh0IDogbnVsbDtcbiAgICB9O1xuICAgIEF4aXMucHJvdG90eXBlLnNldExhYmVsVGV4dCA9IGZ1bmN0aW9uIHNldExhYmVsVGV4dChheGlzSWQsIHRleHQpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcy5vd25lciwgY29uZmlnID0gJCQuY29uZmlnLFxuICAgICAgICAgICAgb3B0aW9uID0gdGhpcy5nZXRMYWJlbE9wdGlvbkJ5QXhpc0lkKGF4aXNJZCk7XG4gICAgICAgIGlmIChpc1N0cmluZyhvcHRpb24pKSB7XG4gICAgICAgICAgICBpZiAoYXhpc0lkID09PSAneScpIHtcbiAgICAgICAgICAgICAgICBjb25maWcuYXhpc195X2xhYmVsID0gdGV4dDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoYXhpc0lkID09PSAneTInKSB7XG4gICAgICAgICAgICAgICAgY29uZmlnLmF4aXNfeTJfbGFiZWwgPSB0ZXh0O1xuICAgICAgICAgICAgfSBlbHNlIGlmIChheGlzSWQgPT09ICd4Jykge1xuICAgICAgICAgICAgICAgIGNvbmZpZy5heGlzX3hfbGFiZWwgPSB0ZXh0O1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKG9wdGlvbikge1xuICAgICAgICAgICAgb3B0aW9uLnRleHQgPSB0ZXh0O1xuICAgICAgICB9XG4gICAgfTtcbiAgICBBeGlzLnByb3RvdHlwZS5nZXRMYWJlbFBvc2l0aW9uID0gZnVuY3Rpb24gZ2V0TGFiZWxQb3NpdGlvbihheGlzSWQsIGRlZmF1bHRQb3NpdGlvbikge1xuICAgICAgICB2YXIgb3B0aW9uID0gdGhpcy5nZXRMYWJlbE9wdGlvbkJ5QXhpc0lkKGF4aXNJZCksXG4gICAgICAgICAgICBwb3NpdGlvbiA9IChvcHRpb24gJiYgdHlw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GggPSBmdW5jdGlvbiBnZXRNYXhUaWNrV2lkdGgoaWQsIHdpdGhvdXRSZWNvbXB1dGUpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcy5vd25lciwgY29uZmlnID0gJCQuY29uZmlnLFxuICAgICAgICAgICAgbWF4V2lkdGggPSAwLCB0YXJnZXRzVG9TaG93LCBzY2FsZSwgYXhpcywgZHVtbXksIHN2ZztcbiAgICAgICAgaWYgKHdpdGhvdXRSZWNvbXB1dGUgJiYgJCQuY3VycmVudE1heFRpY2tXaWR0aHNbaWRdKSB7XG4gICAgICAgICAgICByZXR1cm4gJCQuY3VycmVudE1heFRpY2tXaWR0aHNbaWRdO1xuICAgICAgICB9XG4gICAgICAgIGlmICgkJC5zdmcpIHtcbiAgICAgICAgICAgIHRhcmdldHNUb1Nob3cgPSAkJC5maWx0ZXJUYXJnZXRzVG9TaG93KCQkLmRhdGEudGFyZ2V0cyk7XG4gICAgICAgICAgICBpZiAoaWQgPT09ICd5Jykge1xuICAgICAgICAgICAgICAgIHNjYWxlID0gJCQueS5jb3B5KCkuZG9tYWluKCQkLmdldFlEb21haW4odGFyZ2V0c1RvU2hvdywgJ3knKSk7XG4gICAgICAgICAgICAgICAgYXhpcyA9IHRoaXMuZ2V0WUF4aXMoc2NhbGUsICQkLnlPcmllbnQsIGNvbmZpZy5heGlzX3lfdGlja19mb3JtYXQsICQkLnlBeGlzVGlja1ZhbHVlcywgZmFsc2UsIHRydWUsIHRydWUpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChpZCA9PT0gJ3kyJykge1xuICAgICAgICAgICAgICAgIHNjYWxlID0gJCQueTIuY29weSgpLmRvbWFpbigkJC5nZXRZRG9tYWluKHRhcmdldHNUb1Nob3csICd5MicpKTtcbiAgICAgICAgICAgICAgICBheGlzID0gdGhpcy5nZXRZQXhpcyhzY2FsZSwgJCQueTJPcmllbnQsIGNvbmZpZy5heGlzX3kyX3RpY2tfZm9ybWF0LCAkJC55MkF4aXNUaWNrVmFsdW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0aWNrQ291bnQoKSA6IHRpY2tDb3VudDtcbiAgICAgICAgICAgIC8vIGNvbXB1dGUgdGlja3MgYWNjb3JkaW5nIHRvIHRpY2tDb3VudFxuICAgICAgICAgICAgaWYgKHRhcmdldENvdW50ID09PSAxKSB7XG4gICAgICAgICAgICAgICAgdGlja1ZhbHVlcyA9IFt2YWx1ZXNbMF1dO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0YXJnZXRDb3VudCA9PT0gMikge1xuICAgICAgICAgICAgICAgIHRpY2tWYWx1ZXMgPSBbdmFsdWVzWzBdLCB2YWx1ZXNbdmFsdWVzLmxlbmd0aCAtIDFdXTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodGFyZ2V0Q291bnQgPiAyKSB7XG4gICAgICAgICAgICAgICAgY291bnQgPSB0YXJnZXRDb3VudCAtIDI7XG4gICAgICAgICAgICAgICAgc3RhcnQgPSB2YWx1ZXNbMF07XG4gICAgICAgICAgICAgICAgZW5kID0gdmFsdWVzW3ZhbHVlcy5sZW5ndGggLSAxXTtcbiAgICAgICAgICAgICAgICBpbnRlcnZhbCA9IChlbmQgLSBzdGFydCkgLyAoY291bnQgKyAxKTtcbiAgICAgICAgICAgICAgICAvLyByZS1jb25zdHJ1Y3QgdW5pcXVlIHZhbHVlc1xuICAgICAgICAgICAgICAgIHRpY2tWYWx1ZXMgPSBbc3RhcnRdO1xuICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBjb3VudDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIHRpY2tWYWx1ZSA9ICtzdGFydCArIGludGVydmFsICogKGkgKyAxKTtcbiAgICAgICAgICAgICAgICAgICAgdGlja1ZhbHVlcy5wdXNoKGZvclRpbWVTZXJpZXMgPyBuZXcgRGF0ZSh0aWNrVmFsdWUpIDogdGlja1ZhbHVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGlja1ZhbHVlcy5wdXNoKGVuZCk7XG4gICAgICAg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ZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZyxcbiAgICAgICAgICAgIGZvdW5kID0gZmFsc2UsIGluZGV4ID0gMCxcbiAgICAgICAgICAgIGdNaW4sIGdNYXgsIGdUaWMsIGdWYWx1ZTtcblxuICAgICAgICBpZiAoIWNvbmZpZykge1xuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cblxuICAgICAgICAkJC5waWUoJCQuZmlsdGVyVGFyZ2V0c1RvU2hvdygkJC5kYXRhLnRhcmdldHMpKS5mb3JFYWNoKGZ1bmN0aW9uICh0KSB7XG4gICAgICAgICAgICBpZiAoISBmb3VuZCAmJiB0LmRhdGEuaWQgPT09IGQuZGF0YS5pZCkge1xuICAgICAgICAgICAgICAgIGZvdW5kID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBkID0gdDtcbiAgICAgICAgICAgICAgICBkLmluZGV4ID0gaW5kZXg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpbmRleCsrO1xuICAgICAgICB9KTtcbiAgICAgICAgaWYgKGlzTmFOKGQuc3RhcnRBbmdsZSkpIHtcbiAgICAgICAgICAgIGQuc3RhcnRBbmdsZSA9IDA7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGlzTmFOKGQuZW5kQW5nbGUpKSB7XG4gICAgICAgICAgICBkLmVuZEFuZ2xlID0gZC5zdGFydEFuZ2xlO1xuICAgICAgICB9XG4gICAgICAgIGlmICgkJC5pc0dhdWdlVHlwZShkLmRhdGEpKSB7XG4gICAgICAgICAgICBnTWluID0gY29uZmlnLmdhdWdlX21pbjtcbiAgICAgICAgICAgIGdNYXggPSBjb25maWcuZ2F1Z2VfbWF4O1xuICAgICAgICAgICAgZ1RpYyA9IChNYXRoLlBJICogKGNvbmZpZy5nYXVnZV9mdWxsQ2lyY2xlID8gMiA6IDEpKSAvIChnTWF4IC0gZ01pbik7XG4gICAgICAgICAgICBnVmFsdWUgPSBkLnZhbHVlIDwgZ01p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AgIHkgPSBpc05hTihjWzFdKSA/IDAgOiBjWzFdO1xuICAgICAgICAgICAgaCA9IE1hdGguc3FydCh4ICogeCArIHkgKiB5KTtcbiAgICAgICAgICAgIGlmICgkJC5oYXNUeXBlKCdkb251dCcpICYmIGNvbmZpZy5kb251dF9sYWJlbF9yYXRpbykge1xuICAgICAgICAgICAgICAgIHJhdGlvID0gaXNGdW5jdGlvbihjb25maWcuZG9udXRfbGFiZWxfcmF0aW8pID8gY29uZmlnLmRvbnV0X2xhYmVsX3JhdGlvKGQsICQkLnJhZGl1cywgaCkgOiBjb25maWcuZG9udXRfbGFiZWxfcmF0aW87XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCQkLmhhc1R5cGUoJ3BpZScpICYmIGNvbmZpZy5waWVfbGFiZWxfcmF0aW8pIHtcbiAgICAgICAgICAgICAgICByYXRpbyA9IGlzRnVuY3Rpb24oY29uZmlnLnBpZV9sYWJlbF9yYXRpbykgPyBjb25maWcucGllX2xhYmVsX3JhdGlvKGQsICQkLnJhZGl1cywgaCkgOiBjb25maWcucGllX2xhYmVsX3JhdGlvO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByYXRpbyA9ICQkLnJhZGl1cyAmJiBoID8gKDM2IC8gJCQucmFkaXVzID4gMC4zNzUgPyAxLjE3NSAtIDM2IC8gJCQucmFkaXVzIDogMC44KSAqICQkLnJhZGl1cyAvIGggOiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdHJhbnNsYXRlID0gXCJ0cmFuc2xhdGUoXCIgKyAoeCAqIHJhdGlvKSArICAnLCcgKyAoeSAqIHJhdGlvKSArICBcIilcIjtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJhbnNsYXRlO1xuICAgIH07XG5cbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRBcmNSYXRpbyA9IGZ1bmN0aW9uIChkKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsXG4gICAgICAg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lc2hvbGQocmF0aW8pKSB7IHJldHVybiBcIlwiOyB9XG4gICAgICAgIGZvcm1hdCA9ICQkLmdldEFyY0xhYmVsRm9ybWF0KCk7XG4gICAgICAgIHJldHVybiBmb3JtYXQgPyBmb3JtYXQodmFsdWUsIHJhdGlvLCBpZCkgOiAkJC5kZWZhdWx0QXJjVmFsdWVGb3JtYXQodmFsdWUsIHJhdGlvKTtcbiAgICB9O1xuXG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZXhwYW5kQXJjID0gZnVuY3Rpb24gKHRhcmdldElkcykge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBpbnRlcnZhbDtcblxuICAgICAgICAvLyBNRU1POiBhdm9pZCB0byBjYW5jZWwgdHJhbnNpdGlvblxuICAgICAgICBpZiAoJCQudHJhbnNpdGluZykge1xuICAgICAgICAgICAgaW50ZXJ2YWwgPSB3aW5kb3cuc2V0SW50ZXJ2YWwoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGlmICghJCQudHJhbnNpdGluZykge1xuICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2xlYXJJbnRlcnZhbChpbnRlcnZhbCk7XG4gICAgICAgICAgICAgICAgICAgIGlmICgkJC5sZWdlbmQuc2VsZWN0QWxsKCcuYzMtbGVnZW5kLWl0ZW0tZm9jdXNlZCcpLnNpemUoKSA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICQkLmV4cGFuZEFyYyh0YXJnZXRJZHMpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSwgMTApO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdGFyZ2V0SWRzID0gJCQubWFwVG9UYXJnZXRJZHModGFyZ2V0SWRzKTtcblxuICAgICAgICAkJC5zdmcuc2VsZWN0QWxsKCQkLnNlbGVjdG9yVGFyZ2V0cyh0YXJnZXRJZHMsICcuJyArIENMQVN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YykpLnNlbGVjdEFsbCgncGF0aCcpXG4gICAgICAgICAgICAudHJhbnNpdGlvbigpLmR1cmF0aW9uKGZ1bmN0aW9uKGQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gJCQuZXhwYW5kRHVyYXRpb24oZC5kYXRhLmlkKTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuYXR0cihcImRcIiwgJCQuc3ZnQXJjKTtcbiAgICAgICAgJCQuc3ZnLnNlbGVjdEFsbCgnLicgKyBDTEFTUy5hcmMpXG4gICAgICAgICAgICAuc3R5bGUoXCJvcGFjaXR5XCIsIDEpO1xuICAgIH07XG5cbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5leHBhbmREdXJhdGlvbiA9IGZ1bmN0aW9uIChpZCkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWc7XG5cbiAgICAgICAgaWYgKCQkLmlzRG9udXRUeXBlKGlkKSkge1xuICAgICAgICAgICAgcmV0dXJuIGNvbmZpZy5kb251dF9leHBhbmRfZHVyYXRpb247XG4gICAgICAgIH0gZWxzZSBpZiAoJCQuaXNHYXVnZVR5cGUoaWQpKSB7XG4gICAgICAgICAgICByZXR1cm4gY29uZmlnLmdhdWdlX2V4cGFuZF9kdXJhdGlvbjtcbiAgICAgICAgfSBlbHNlIGlmICgkJC5pc1BpZVR5cGUoaWQpKSB7XG4gICAgICAgICAgICByZXR1cm4gY29uZmlnLnBpZV9leHBhbmRfZHVyYXRpb247XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gNTA7XG4gICAgICAgIH1cblxuICAgIH07XG5cbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5zaG91bGRFeHBhbmQgPSBmdW5jdGlvbiAoaWQpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnO1xuICAgICAgICByZXR1cm4gKCQkLmlzRG9udXRUeXBlKGlkKSAmJiBjb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gIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdXBkYXRlZCA9ICQkLnVwZGF0ZUFuZ2xlKGQpO1xuICAgICAgICAgICAgICAgIGlmICh1cGRhdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGFyY0RhdGEgPSAkJC5jb252ZXJ0VG9BcmNEYXRhKHVwZGF0ZWQpO1xuICAgICAgICAgICAgICAgICAgICAvLyB0cmFuc2l0aW9uc1xuICAgICAgICAgICAgICAgICAgICAkJC5leHBhbmRBcmModXBkYXRlZC5kYXRhLmlkKTtcbiAgICAgICAgICAgICAgICAgICAgJCQuYXBpLmZvY3VzKHVwZGF0ZWQuZGF0YS5pZCk7XG4gICAgICAgICAgICAgICAgICAgICQkLnRvZ2dsZUZvY3VzTGVnZW5kKHVwZGF0ZWQuZGF0YS5pZCwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgICQkLmNvbmZpZy5kYXRhX29ubW91c2VvdmVyKGFyY0RhdGEsIHRoaXMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gOiBudWxsKVxuICAgICAgICAgICAgLm9uKCdtb3VzZW1vdmUnLCBjb25maWcuaW50ZXJhY3Rpb25fZW5hYmxlZCA/IGZ1bmN0aW9uIChkKSB7XG4gICAgICAgICAgICAgICAgdmFyIHVwZGF0ZWQgPSAkJC51cGRhdGVBbmdsZShkKSwgYXJjRGF0YSwgc2VsZWN0ZWREYXRhO1xuICAgICAgICAgICAgICAgIGlmICh1cGRhdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGFyY0RhdGEgPSAkJC5jb252ZXJ0VG9BcmNEYXRhKHVwZGF0ZWQpLFxuICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZERhdGEgPSBbYXJjRGF0YV07XG4gICAgICAgICAgICAgICAgICAgICQkLnNob3dUb29sdGlwKHNlbGVjdGVkRGF0YSwgdGhpcyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSA6IG51bGwpXG4gICAgICAgICAgICAub24oJ21vdXNlb3V0JywgY29uZmlnLmludGVyYWN0aW9uX2VuYWJsZWQgPyBmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgIHZhciB1cGRhdGVkLCBhcmNEYXRhO1xuICAgICAgICAgICAgICAgIGlmICgkJC50cmFuc2l0aW5nKSB7IC8vIHNraXAgd2hpbGUgdHJhbnNpdGluZ1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHVwZGF0ZWQgPSAkJC51cGRhdGVBbmdsZShkKTtcbiAgICAgICAgICAgICAgICBpZiAodXBkYXRlZCkge1xuICAgICAgICAgICAgICAgICAgICBhcmNEYXRhID0gJCQuY29udmVydFRvQXJjRGF0YSh1cGRhdGVkKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gdHJhbnNpdGlvbnNcbiAgICAgICAgICAgICAgICAgICAgJCQudW5leHBhbmRBcmModXBkYXRlZC5kYXRhLmlkKTtcbiAgICAgICAgICAgICAgICAgICAgJCQuYXBpLnJldmVydCgpO1xuICAgICAgICAgICAgICAgICAgICAkJC5yZXZlcnRMZWdlbmQoKTtcbiAgICAgICAgICAgICAgICAgICAgJCQuaGlkZVRvb2x0aXAoKTtcbiAgICAgICAgICAgICAgICAgICAgJCQuY29uZmlnLmRhdGFfb25tb3VzZW91dChhcmNEYXRhLCB0aGlzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IDogbnVsbClcbiAgICAgICAgICAgIC5vbignY2xpY2snLCBjb25maWcuaW50ZXJhY3Rpb25fZW5hYmxlZCA/IGZ1bmN0aW9uIChkLCBpKSB7XG4gICAgICAgICAgICAgICAgdmFyIHVwZGF0ZWQgPSAkJC51cGRhdGVBbmdsZShkKSwgYXJjRGF0YTtcbiAgICAgICAgICAgICAgICBpZiAodXBkYXRlZCkge1xuICAgICAgICAgICAgICAgICAgICBhcmNEYXRhID0gJCQuY29udmVydFRvQXJjRGF0YSh1cGRhdGVkKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCQkLnRvZ2dsZVNoYXBlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAkJC50b2dnbGVTaGFwZSh0aGlzLCBhcmNEYXRhLCBpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAkJC5jb25maWcuZGF0YV9vbmNsaWNrLmNhbGwoJCQuYXBpLCBhcmNEYXRhLCB0aGlzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IDogbnVsbClcbiAgICAgICAgICAgIC5lYWNoKGZ1bmN0aW9uICgpIHsgJCQudHJhbnNpdGluZyA9IHRydWU7IH0pXG4gICAgICAgICAgICAudHJhbnNpdGlvbigpLmR1cmF0aW9uKGR1cmF0aW9uKVxuICAgICAgICAgICAgLmF0dHJUd2VlbihcImRcIiwgZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICB2YXIgdXBkYXRlZCA9ICQkLnVwZGF0ZUFuZ2xlKGQpLCBpbnRlcnBvbGF0ZTtcbiAgICAgICAgICAgICAgICBpZiAoISB1cGRhdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoKSB7IHJldHVybiBcIk0gMCAwXCI7IH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50ID09PSBkKSB7XG4gICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnQgPSB7XG4gICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICAgICBzdGFydEFuZ2xlOiBNYXRoLlBJKjIsXG4gICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgICAgICBlbmRBbmdsZTogTWF0aC5QSSoyLFxuICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoaXNOYU4odGhpcy5fY3VycmVudC5zdGFydEFuZ2xlKSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50LnN0YXJ0QW5nbGUgPSAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoaXNOYU4odGhpcy5fY3VycmVudC5lbmRBbmdsZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudC5lbmRBbmdsZSA9IHRoaXMuX2N1cnJlbnQuc3RhcnRBbmdsZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaW50ZXJwb2xhdGUgPSBkMy5pbnRlcnBvbGF0ZSh0aGlzLl9jdXJyZW50LCB1cGRhdGVkKTtcbiAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50ID0gaW50ZXJwb2xhdGUoMCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uICh0KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBpbnRlcnBvbGF0ZWQgPSBpbnRlcnBvbGF0ZSh0KTtcbiAgICAgICAgICAgICAgICAgICAgaW50ZXJwb2xhdGVkLmRhdGEgPSBkLmRhdGE7IC8vIGRhdGEuaWQgd2lsbCBiZSB1cGRhdGVkIGJ5IGludGVycG9yYXRvclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCQuZ2V0QXJjKGludGVycG9sYXRlZCwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuYXR0cihcInRyYW5zZm9ybVwiLCB3aXRoVHJhbnNmb3JtID8gXCJzY2FsZSgxKVwiIDogXCJcIilcbiAgICAgICAgICAgIC5zdHlsZShcImZpbGxcIiwgZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICByZX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ZGl1cyAvIDUpICsgJ3B4JyA6ICcnOyB9KVxuICAgICAgICAgIC50cmFuc2l0aW9uKCkuZHVyYXRpb24oZHVyYXRpb24pXG4gICAgICAgICAgICAuc3R5bGUoXCJvcGFjaXR5XCIsIGZ1bmN0aW9uIChkKSB7IHJldHVybiAkJC5pc1RhcmdldFRvU2hvdyhkLmRhdGEuaWQpICYmICQkLmlzQXJjVHlwZShkLmRhdGEpID8gMSA6IDA7IH0pO1xuICAgICAgICBtYWluLnNlbGVjdCgnLicgKyBDTEFTUy5jaGFydEFyY3NUaXRsZSlcbiAgICAgICAgICAgIC5zdHlsZShcIm9wYWNpdHlcIiwgJCQuaGFzVHlwZSgnZG9udXQnKSB8fCAkJC5oYXNUeXBlKCdnYXVnZScpID8gMSA6IDApO1xuXG4gICAgICAgIGlmICgkJC5oYXNUeXBlKCdnYXVnZScpKSB7XG4gICAgICAgICAgICAkJC5hcmNzLnNlbGVjdCgnLicgKyBDTEFTUy5jaGFydEFyY3NCYWNrZ3JvdW5kKVxuICAgICAgICAgICAgICAgIC5hdHRyKFwiZFwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBkID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogW3t2YWx1ZTogY29uZmlnLmdhdWdlX21heH1dLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRBbmdsZTogY29uZmlnLmdhdWdlX3N0YXJ0aW5nQW5nbGUsXG4gICAgICAgICAgICAgICAgICAgICAgICBlbmRBbmdsZTogLTEgKiBjb25maWcuZ2F1Z2Vfc3RhcnRpbmdBbmdsZVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCQuZ2V0QXJjKGQsIHRydWUsIHRydWUpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgJCQuYXJjcy5zZWxlY3QoJy4nICsgQ0xBU1MuY2hhcnRBcmNzR2F1Z2VVbml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ICAgICAgIGlmICh0aGlzLmhhc1R5cGUoJ2dhdWdlJykpIHtcbiAgICAgICAgICAgIGFyY3MuYXBwZW5kKCdwYXRoJylcbiAgICAgICAgICAgICAgICAuYXR0cihcImNsYXNzXCIsIENMQVNTLmNoYXJ0QXJjc0JhY2tncm91bmQpO1xuICAgICAgICAgICAgYXJjcy5hcHBlbmQoXCJ0ZXh0XCIpXG4gICAgICAgICAgICAgICAgLmF0dHIoXCJjbGFzc1wiLCBDTEFTUy5jaGFydEFyY3NHYXVnZVVuaXQpXG4gICAgICAgICAgICAgICAgLnN0eWxlKFwidGV4dC1hbmNob3JcIiwgXCJtaWRkbGVcIilcbiAgICAgICAgICAgICAgICAuc3R5bGUoXCJwb2ludGVyLWV2ZW50c1wiLCBcIm5vbmVcIik7XG4gICAgICAgICAgICBhcmNzLmFwcGVuZChcInRleHRcIilcbiAgICAgICAgICAgICAgICAuYXR0cihcImNsYXNzXCIsIENMQVNTLmNoYXJ0QXJjc0dhdWdlTWluKVxuICAgICAgICAgICAgICAgIC5zdHlsZShcInRleHQtYW5jaG9yXCIsIFwibWlkZGxlXCIpXG4gICAgICAgICAgICAgICAgLnN0eWxlKFwicG9pbnRlci1ldmVudHNcIiwgXCJub25lXCIpO1xuICAgICAgICAgICAgYXJjcy5hcHBlbmQoXCJ0ZXh0XCIpXG4gICAgICAgICAgICAgICAgLmF0dHIoXCJjbGFzc1wiLCBDTEFTUy5jaGFydEFyY3NHYXVnZU1heClcbiAgICAgICAgICAgICAgICAuc3R5bGUoXCJ0ZXh0LWFuY2hvclwiLCBcIm1pZGRsZVwiKVxuICAgICAgICAgICAgICAgIC5zdHlsZShcInBvaW50ZXItZXZlbnRzXCIsIFwibm9uZVwiKTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0R2F1Z2VMYWJlbEhlaWdodCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuY29uZmln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uWSA9IGZ1bmN0aW9uIChkKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZyxcbiAgICAgICAgICAgIHlQb3MsIHlTY2FsZSA9IGQuYXhpcyA9PT0gJ3knID8gJCQueSA6ICQkLnkyO1xuICAgICAgICBpZiAoZC5heGlzID09PSAneScgfHwgZC5heGlzID09PSAneTInKSB7XG4gICAgICAgICAgICB5UG9zID0gY29uZmlnLmF4aXNfcm90YXRlZCA/IDAgOiAoJ2VuZCcgaW4gZCA/IHlTY2FsZShkLmVuZCkgOiAwKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHlQb3MgPSBjb25maWcuYXhpc19yb3RhdGVkID8gKCdzdGFydCcgaW4gZCA/ICQkLngoJCQuaXNUaW1lU2VyaWVzKCkgPyAkJC5wYXJzZURhdGUoZC5zdGFydCkgOiBkLnN0YXJ0KSA6IDApIDogMDtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4geVBvcztcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnJlZ2lvbldpZHRoID0gZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLFxuICAgICAgICAgICAgc3RhcnQgPSAkJC5yZWdpb25YKGQpLCBlbmQsIHlTY2FsZSA9IGQuYXhpcyA9PT0gJ3knID8gJCQueSA6ICQkLnkyO1xuICAgICAgICBpZiAoZC5heGlzID09PSAneScgfHwgZC5heGlzID09PSAneTInKSB7XG4gICAgICAgICAgICBlbmQgPSBjb25maWcuYXhpc19yb3RhdGVkID8gKCdlbmQnIGluIGQgPyB5U2NhbGUoZC5lbmQpIDogJCQud2lkdGgpIDogJCQud2lkdGg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBlbmQgPSBjb25maWcuYXhpc19yb3RhdGVkID8gJCQud2lkdGggOiAoJ2VuZCcgaW4gZCA/ICQk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AgIF95ID0gc2hhcGUuYXR0cihcImN5XCIpICogMTtcbiAgICAgICAgICAgICAgICAgICAgdG9nZ2xlID0gJCQudG9nZ2xlUG9pbnQ7XG4gICAgICAgICAgICAgICAgICAgIGlzV2l0aGluID0gbWluWCA8IF94ICYmIF94IDwgbWF4WCAmJiBtaW5ZIDwgX3kgJiYgX3kgPCBtYXhZO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChzaGFwZS5jbGFzc2VkKENMQVNTLmJhcikpIHtcbiAgICAgICAgICAgICAgICAgICAgYm94ID0gZ2V0UGF0aEJveCh0aGlzKTtcbiAgICAgICAgICAgICAgICAgICAgX3ggPSBib3gueDtcbiAgICAgICAgICAgICAgICAgICAgX3kgPSBib3gueTtcbiAgICAgICAgICAgICAgICAgICAgX3cgPSBib3gud2lkdGg7XG4gICAgICAgICAgICAgICAgICAgIF9oID0gYm94LmhlaWdodDtcbiAgICAgICAgICAgICAgICAgICAgdG9nZ2xlID0gJCQudG9nZ2xlUGF0aDtcbiAgICAgICAgICAgICAgICAgICAgaXNXaXRoaW4gPSAhKG1heFggPCBfeCB8fCBfeCArIF93IDwgbWluWCkgJiYgIShtYXhZIDwgX3kgfHwgX3kgKyBfaCA8IG1pblkpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGxpbmUvYXJlYSBzZWxlY3Rpb24gbm90IHN1cHBvcnRlZCB5ZXRcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoaXNXaXRoaW4gXiBpc0luY2x1ZGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIHNoYXBlLmNsYXNzZWQoQ0xBU1MuSU5DTFVERUQsICFpc0luY2x1ZGVkKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gVE9ETzogaW5jbHVkZWQvdW5pbmNsdWRlZCBjYWxsYmFjayBo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gICAgICAgLy8tLSBCYXIgLS0vL1xuICAgICAgICAgICAgY29udGV4dEJhclVwZGF0ZSA9IGNvbnRleHQuc2VsZWN0KCcuJyArIENMQVNTLmNoYXJ0QmFycykuc2VsZWN0QWxsKCcuJyArIENMQVNTLmNoYXJ0QmFyKVxuICAgICAgICAgICAgICAgIC5kYXRhKHRhcmdldHMpXG4gICAgICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgY2xhc3NDaGFydEJhcik7XG4gICAgICAgICAgICBjb250ZXh0QmFyRW50ZXIgPSBjb250ZXh0QmFyVXBkYXRlLmVudGVyKCkuYXBwZW5kKCdnJylcbiAgICAgICAgICAgICAgICAuc3R5bGUoJ29wYWNpdHknLCAwKVxuICAgICAgICAgICAgICAgIC5hdHRyKCdjbGFzcycsIGNsYXNzQ2hhcnRCYXIpO1xuICAgICAgICAgICAgLy8gQmFycyBmb3IgZWFjaCBkYXRhXG4gICAgICAgICAgICBjb250ZXh0QmFyRW50ZXIuYXBwZW5kKCdnJylcbiAgICAgICAgICAgICAgICAuYXR0cihcImNsYXNzXCIsIGNsYXNzQmFycyk7XG5cbiAgICAgICAgICAgIC8vLS0gTGluZSAtLS8vXG4gICAgICAgICAgICBjb250ZXh0TGluZVVwZGF0ZSA9IGNvbnRleHQuc2VsZWN0KCcuJyArIENMQVNTLmNoYXJ0TGluZXMpLnNlbGVjdEFsbCgnLicgKyBDTEFTUy5jaGFydExpbmUpXG4gICAgICAgICAgICAgICAgLmRhdGEodGFyZ2V0cylcbiAgICAgICAgICAgICAgICAuYXR0cignY2xhc3MnLCBjbGFzc0NoYXJ0TGluZSk7XG4gICAgICAgICAgICBjb250ZXh0TGluZUVudGVyID0gY29udGV4dExpbmVVcGRhdGUuZW50ZXIoKS5hcHBlbmQoJ2cnKVxuICAgICAgICAgICAgICAgIC5zdHlsZSgnb3BhY2l0eScsIDApXG4gICAgICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgY2xhc3NDaGFydExpbmUpO1xuICAg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cbiAgICAgICAgICAgIC5vbihcInpvb21cIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICQkLnJlZHJhd0Zvclpvb20uY2FsbCgkJCk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKCd6b29tZW5kJywgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHZhciBldmVudCA9IGQzLmV2ZW50LnNvdXJjZUV2ZW50O1xuICAgICAgICAgICAgICAgIC8vIGlmIGNsaWNrLCBkbyBub3RoaW5nLiBvdGhlcndpc2UsIGNsaWNrIGludGVyYWN0aW9uIHdpbGwgYmUgY2FuY2VsZWQuXG4gICAgICAgICAgICAgICAgaWYgKGV2ZW50ICYmIHN0YXJ0RXZlbnQuY2xpZW50WCA9PT0gZXZlbnQuY2xpZW50WCAmJiBzdGFydEV2ZW50LmNsaWVudFkgPT09IGV2ZW50LmNsaWVudFkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAkJC5yZWRyYXdFdmVudFJlY3QoKTtcbiAgICAgICAgICAgICAgICAkJC51cGRhdGVab29tKCk7XG4gICAgICAgICAgICAgICAgY29uZmlnLnpvb21fb256b29tZW5kLmNhbGwoJCQuYXBpLCAkJC54Lm9yZ0RvbWFpbigpKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAkJC56b29tLnNjYWxlID0gZnVuY3Rpb24gKHNjYWxlKSB7XG4gICAgICAgICAgICByZXR1cm4gY29uZmlnLmF4aXNfcm90YXRlZCA/IHRoaXMueShzY2FsZSkgOiB0aGlzLngoc2NhbGUpO1xuICAgICAgICB9O1xuICAgICAgICAkJC56b29tLm9yZ1NjYWxlRXh0ZW50ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGV4dGVudCA9IGNvbmZpZy56b29tX2V4dGVudCA/IGNvbmZpZy56b29tX2V4dGVudCA6IFsxLCAxMF07XG4gICAgICAgICAgICByZXR1cm4gW2V4dGVudFswXSwgTWF0aC5tYXgoJCQuZ2V0TWF4RGF0YUNvdW50KCkgLyBleHRlbnRbMV0sIGV4dGVudFsxXSldO1xuICAgICAgICB9O1xuICAgICAgICAkJC56b29tLnVwZGF0ZVNjYWxlRXh0ZW50ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIHJhdGlvID0gZGlmZkRvbWFpbigkJC54Lm9yZ0RvbWFpbigpKSAvIGRpZmZEb21haW4oJCQuZ2V0Wm9vbURvbWFpbigpKSxcbiAgICAgICAgICAgICAgICBleHRlbnQgPSB0aGlzLm9yZ1NjYWxlRXh0ZW50KCk7XG4gICAgICAgICAgICB0aGlzLnNjYWxlRXh0ZW50KFtleHRlbnRbMF0gKiByYXRpbywgZXh0ZW50WzFdICogcmF0aW9dKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9O1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0Wm9vbURvbWFpbiA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLCBkMyA9ICQkLmQzLFxuICAgICAgICAgICAgbWluID0gZDMubWluKFskJC5vcmdYRG9tYWluWzBdLCBjb25maWcuem9vbV94X21pbl0pLFxuICAgICAgICAgICAgbWF4ID0gZDMubWF4KFskJC5vcmdYRG9tYWluWzFdLCBjb25maWcuem9vbV94X21heF0pO1xuICAgICAgICByZXR1cm4gW21pbiwgbWF4XTtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnVwZGF0ZVpvb20gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsIHogPSAkJC5jb25maWcuem9vbV9lbmFibGVkID8gJCQuem9vbSA6IGZ1bmN0aW9uICgpIHt9O1xuICAgICAgICAkJC5tYWluLnNlbGVjdCgnLicgKyBDTEFTUy56b29tUmVjdCkuY2FsbCh6KS5vbihcImRibGNsaWNrLnpvb21cIiwgbnVsbCk7XG4gICAgICAgICQkLm1haW4uc2VsZWN0QWxsKCcuJyArIENMQVNTLmV2ZW50UmVjdCkuY2FsbCh6KS5vbihcImRibGNsaWNrLnpvb21cIiwgbnVsbCk7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5yZWRyYXdGb3Jab29tID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBkMyA9ICQkLmQzLCBjb25maWcgPSAkJC5jb25maWcsIHpvb20gPSAkJC56b29tLCB4ID0gJCQueDtcbiAgICAgICAgaWYgKCFjb25maWcuem9vbV9lbmFibGVkKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCQkLmZpbHRlclRhcmdldHNUb1Nob3coJCQuZGF0YS50YXJnZXRzKS5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoZDMuZXZlbnQuc291cmNlRXZlbnQudHlwZSA9PT0gJ21vdXNlbW92ZScgJiYgem9vbS5hbHREb21haW4pIHtcbiAgICAgICAgICAgIHguZG9tYWluKHpvb20uYWx0RG9tYWluKTtcbiAgICAgICAgICAgIHpvb20uc2NhbGUoeCkudXBkYXRlU2NhbGVFeHRlbnQoKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoJCQuaXNDYXRlZ29yaXplZCgpICYmIHgub3JnRG9tYWluKClbMF0gPT09ICQkLm9yZ1hEb21haW5bMF0pIHtcbiAgICAgICAgICAgIHguZG9tYWluKFskJC5vcmdYRG9tYWluWzBdIC0gMWUtMTAsIHgub3JnRG9tYWluKClbMV1dKTtcbiAgICAgICAgfVxuICAgICAgICAkJC5yZWRyYXcoe1xuICAgICAgICAgICAgd2l0aFRyYW5zaXRpb246IGZhbHNlLFxuICAgICAg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bmNlb2YgRnVuY3Rpb24pIHtcbiAgICAgICAgICAgICAgICBjb2xvciA9IGNvbG9yc1tpZF0oZCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBpZiBzcGVjaWZpZWQsIGNob29zZSB0aGF0IGNvbG9yXG4gICAgICAgICAgICBlbHNlIGlmIChjb2xvcnNbaWRdKSB7XG4gICAgICAgICAgICAgICAgY29sb3IgPSBjb2xvcnNbaWRdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gaWYgbm90IHNwZWNpZmllZCwgY2hvb3NlIGZyb20gcGF0dGVyblxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKGlkcy5pbmRleE9mKGlkKSA8IDApIHsgaWRzLnB1c2goaWQpOyB9XG4gICAgICAgICAgICAgICAgY29sb3IgPSBwYXR0ZXJuW2lkcy5pbmRleE9mKGlkKSAlIHBhdHRlcm4ubGVuZ3RoXTtcbiAgICAgICAgICAgICAgICBjb2xvcnNbaWRdID0gY29sb3I7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gY2FsbGJhY2sgaW5zdGFuY2VvZiBGdW5jdGlvbiA/IGNhbGxiYWNrKGNvbG9yLCBkKSA6IGNvbG9yO1xuICAgICAgICB9O1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2VuZXJhdGVMZXZlbENvbG9yID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWcsXG4gICAgICAgICAgICBjb2xvcnMgPSBjb25maWcuY29sb3JfcGF0dGVybixcbiAgICAgICAgICAgIHRocmVzaG9sZCA9IGNvbmZpZy5jb2xvcl90aHJlc2hvbGQsXG4gICAgICAgICAgICBhc1ZhbHVlID0gdGhyZXNob2xkLnVuaXQgPT09ICd2YWx1ZScsXG4gICAgICAgICAgICB2YWx1ZXMgPSB0aHJlc2hvbGQudmFsdWVzICYm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sZWQpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcy5pbnRlcm5hbDtcbiAgICAgICAgJCQuY29uZmlnLnpvb21fZW5hYmxlZCA9IGVuYWJsZWQ7XG4gICAgICAgICQkLnVwZGF0ZUFuZFJlZHJhdygpO1xuICAgIH07XG4gICAgYzNfY2hhcnRfZm4udW56b29tID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLmludGVybmFsO1xuICAgICAgICAkJC5icnVzaC5jbGVhcigpLnVwZGF0ZSgpO1xuICAgICAgICAkJC5yZWRyYXcoe3dpdGhVcGRhdGVYRG9tYWluOiB0cnVlfSk7XG4gICAgfTtcblxuICAgIGMzX2NoYXJ0X2ZuLnpvb20ubWF4ID0gZnVuY3Rpb24gKG1heCkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLmludGVybmFsLCBjb25maWcgPSAkJC5jb25maWcsIGQzID0gJCQuZDM7XG4gICAgICAgIGlmIChtYXggPT09IDAgfHwgbWF4KSB7XG4gICAgICAgICAgICBjb25maWcuem9vbV94X21heCA9IGQzLm1heChbJCQub3JnWERvbWFpblsxXSwgbWF4XSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gY29uZmlnLnpvb21feF9tYXg7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgYzNfY2hhcnRfZm4uem9vbS5taW4gPSBmdW5jdGlvbiAobWluKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMuaW50ZXJuYWwsIGNvbmZpZyA9ICQkLmNvbmZpZywgZDMgPSAkJC5kMztcbiAgICAgICAgaWYgKG1pbiA9PT0gMCB8fCBtaW4pIHtcbiAgICAgICAgICAgIGNvbmZpZy56b29tX3hfbWluID0gZDMubWluKFskJC5vcmdYRG9tYWluWzBdLCBtaW5dKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiBjb25maWcuem9vbV94X21pbjtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICBjM19jaGFydF9mbi56b29tLnJhbmdlID0gZnVuY3Rpb24gKHJhbmdlKSB7XG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoaXNEZWZpbmVkKHJhbmdlLm1heCkpIHsgdGhpcy5kb21haW4ubWF4KHJhbmdlLm1heCk7IH1cbiAgICAgICAgICAgIGlmIChpc0RlZmluZWQocmFuZ2UubWluKSkgeyB0aGlzLmRvbWFpbi5taW4ocmFuZ2UubWluKTsgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBtYXg6IHRoaXMuZG9tYWluLm1heCgpLFxuICAgICAgICAgICAgICAgIG1pbjogdGhpcy5kb21haW4ubWluKClcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgYzNfY2hhcnRfZm4ubG9hZCA9IGZ1bmN0aW9uIChhcmdzKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMuaW50ZXJuYWwsIGNvbmZpZyA9ICQkLmNvbmZpZztcbiAgICAgICAgLy8gdXBkYXRlIHhzIGlmIHNwZWNpZmllZFxuICAgICAgICBpZiAoYXJncy54cykge1xuICAgICAgICAgICAgJCQuYWRkWHMoYXJncy54cyk7XG4gICAgICAgIH1cbiAgICAgICAgLy8gdXBkYXRlIG5hbWVzIGlmIGV4aXN0c1xuICAgICAgICBpZiAoJ25hbWVzJyBpbiBhcmdzKSB7XG4gICAgICAgICAgICBjM19jaGFydF9mbi5kYXRhLm5hbWVzLmJpbmQodGhpcykoYXJncy5uYW1lcyk7XG4gICAgICAgIH1cbiAgICAgICAgLy8gdXBkYXRlIGNsYXNzZXMgaWYgZXhpc3RzXG4gICAgICAgIGlmICgnY2xhc3NlcycgaW4gYXJncykge1xuICAgICAgICAgICAgT2JqZWN0LmtleXMoYXJncy5jbGFzc2VzKS5mb3JFYWN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b24gKHQpIHtcbiAgICAgICAgICAgIHZhciBmb3VuZCA9IGZhbHNlLCBpLCBqO1xuICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IHRhcmdldHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAodC5pZCA9PT0gdGFyZ2V0c1tpXS5pZCkge1xuICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHQudmFsdWVzW3QudmFsdWVzLmxlbmd0aCAtIDFdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0YWlsID0gdC52YWx1ZXNbdC52YWx1ZXMubGVuZ3RoIC0gMV0uaW5kZXggKyAxO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGxlbmd0aCA9IHRhcmdldHNbaV0udmFsdWVzLmxlbmd0aDtcblxuICAgICAgICAgICAgICAgICAgICBmb3IgKGogPSAwOyBqIDwgbGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldHNbaV0udmFsdWVzW2pdLmluZGV4ID0gdGFpbCArIGo7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoISQkLmlzVGltZVNlcmllcygpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0c1tpXS52YWx1ZXNbal0ueCA9IHRhaWwgKyBqO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHQudmFsdWVzID0gdC52YWx1ZXMuY29uY2F0KHRhcmdldHNbaV0udmFsdWVzKTtcblxuICAgICAgICAgICAgICAgICAgICB0YXJnZXRzLnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFmb3VuZCkgeyBub3Rmb3VuZElkcy5wdXNoKHQuaWQpOyB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIC8vIEFwcGVuZCBudWxsIGZvciBub3QgZm91bmQgdGFyZ2V0c1xuICAgICAgICAkJC5kYXRhLnRhcmdldHMuZm9yRWFjaChmdW5jdGlvbiAodCkge1xuICAgICAgICAgICAgdmFyIGksIGo7XG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbm90Zm91bmRJZHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAodC5pZCA9PT0gbm90Zm91bmRJZHNbaV0pIHtcbiAgICAgICAgICAgICAgICAgICAgdGFpbCA9IHQudmFsdWVzW3QudmFsdWVzLmxlbmd0aCAtIDFdLmluZGV4ICsgMTtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IGxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0LnZhbHVlcy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogdC5pZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogdGFpbCArIGosXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeDogJCQuaXNUaW1lU2VyaWVzKCkgPyAkJC5nZXRPdGhlclRhcmdldFgodGFpbCArIGopIDogdGFpbCArIGosXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IG51bGxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICAvLyBHZW5lcmF0ZSBudWxsIHZhbHVlcyBmb3IgbmV3IHRhcmdldFxuICAgICAgICBpZiAoJCQuZGF0YS50YXJnZXRzLmxlbmd0aCkge1xuICAgICAgICAgICAgdGFyZ2V0cy5mb3JFYWNoKGZ1bmN0aW9uICh0KSB7XG4gICAgICAgICAgICAgICAgdmFyIGksIG1pc3NpbmcgPSBbXTtcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSAkJC5kYXRhLnRhcmdldHNbMF0udmFsdWVzWzBdLmluZGV4OyBpIDwgdGFpbDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIG1pc3NpbmcucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogdC5pZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpLFxuICAgICAgICAgICAgICAgICAgICAgICAgeDogJCQuaXNUaW1lU2VyaWVzKCkgPyAkJC5nZXRPdGhlclRhcmdldFgoaSkgOiBpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IG51bGxcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHQudmFsdWVzLmZvckVhY2goZnVuY3Rpb24gKHYpIHtcbiAgICAgICAgICAgICAgICAgICAgdi5pbmRleCArPSB0YWlsO1xuICAgICAgICAgICAgICAgICAgICBpZiAoISQkLmlzVGltZVNlcmllcygpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2LnggKz0gdGFpbDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHQudmFsdWVzID0gbWlzc2luZy5jb25jYXQodC52YWx1ZXMpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgJCQuZGF0YS50YXJnZXRzID0gJCQuZGF0YS50YXJnZXRzLmNvbmNhdCh0YXJnZXRzKTsgLy8gYWRkIHJlbWFpbmVkXG5cbiAgICAgICAgLy8gY2hlY2sgZGF0YSBjb3VudCBiZWNhdXNlIGJlaGF2aW9yIG5lZWRzIHRvIGNoYW5nZSB3aGVuIGl0J3Mgb25seSBvbmVcbiAgICAgICAgZGF0YUNvdW50ID0gJCQuZ2V0TWF4RGF0YUNvdW50KCk7XG4gICAgICAgIGJ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GFyZ3MuZHVyYXRpb24pID8gYXJncy5kdXJhdGlvbiA6ICQkLmNvbmZpZy50cmFuc2l0aW9uX2R1cmF0aW9uLFxuICAgICAgICAgICAgICAgIGRvbmU6IGFyZ3MuZG9uZSxcbiAgICAgICAgICAgICAgICBvcmdEYXRhQ291bnQ6IG9yZ0RhdGFDb3VudCxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB3aXRoTGVnZW5kOiB0cnVlLFxuICAgICAgICAgICAgd2l0aFRyYW5zaXRpb246IG9yZ0RhdGFDb3VudCA+IDEsXG4gICAgICAgICAgICB3aXRoVHJpbVhEb21haW46IGZhbHNlLFxuICAgICAgICAgICAgd2l0aFVwZGF0ZVhBeGlzOiB0cnVlLFxuICAgICAgICB9KTtcbiAgICB9O1xuXG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2VuZXJhdGVGbG93ID0gZnVuY3Rpb24gKGFyZ3MpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLCBkMyA9ICQkLmQzO1xuXG4gICAgICAgIHJldHVybiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgdGFyZ2V0cyA9IGFyZ3MudGFyZ2V0cyxcbiAgICAgICAgICAgICAgICBmbG93ID0gYXJncy5mbG93LFxuICAgICAgICAgICAgICAgIGRyYXdCYXIgPSBhcmdzLmRyYXdCYXIsXG4gICAgICAgICAgICAgICAgZHJhd0xpbmUgPSBhcmdzLmRyYXdMaW5lLFxuICAgICAgICAgICAgICAgIGRyYXdBcmVhID0gYXJncy5kcmF3QXJlYSxcbiAgICAgICAgICAgICAgICBjeCA9IGFyZ3MuY3gsXG4gICAgICAgICAgICAgICAgY3kgPSBhcmdzLmN5LFxuICAgICAgICAgICAgICAgIHh2ID0gYXJncy54dixcbiAgICAgICAgICAgICAgICB4Rm9yVGV4dCA9IGFyZ3MueEZvclRleHQsXG4gICAgICAgICAgICAgICAgeUZvclRleHQgPSBhcmdzLnlGb3JUZXh0LFxuICAgICAgICAgICAgICAgIGR1cmF0aW9uID0gYXJncy5kdXJhdGlvbjtcblxuICAgICAgICAgICAgdmFyIHRyYW5zbGF0ZVgsIHNjYWxlWCA9IDEsIHRyYW5zZm9ybSxcbiAgICAgICAgICAgICAgICBmbG93SW5kZXggPSBmbG93LmluZGV4LFxuICAgICAgICAgICAgICAgIGZsb3dMZW5ndGggPSBmbG93Lmxlbmd0aCxcbiAgICAgICAgICAgICAgICBmbG93U3RhcnQgPSAkJC5nZXRWYWx1ZU9uSW5kZXgoJCQuZGF0YS50YXJnZXRzWzBdLnZhbHVlcywgZmxvd0luZGV4KSxcbiAgICAgICAgICAgICAgICBmbG93RW5kID0gJCQuZ2V0VmFsdWVPbkluZGV4KCQkLmRhdGEudGFyZ2V0c1swXS52YWx1ZXMsIGZsb3dJbmRleCArIGZsb3dMZW5ndGgpLFxuICAgICAgICAgICAgICAgIG9yZ0RvbWFpbiA9ICQkLnguZG9tYWluKCksIGRvbWFpbixcbiAgICAgICAgICAgICAgICBkdXJhdGlvbkZvckZsb3cgPSBmbG93LmR1cmF0aW9uIHx8IGR1cmF0aW9uLFxuICAgICAgICAgICAgICAgIGRvbmUgPSBmbG93LmRvbmUgfHwgZnVuY3Rpb24gKCkge30sXG4gICAgICAgICAgICAgICAgd2FpdCA9ICQkLmdlbmVyYXRlV2FpdCgpO1xuXG4gICAgICAgICAgICB2YXIgeGdyaWQgPSAkJC54Z3JpZCB8fCBkMy5zZWxlY3RBbGwoW10pLFxuICAgICAgICAgICAgICAgIHhncmlkTGluZXMgPSAkJC54Z3JpZExpbmVzIHx8IGQzLnNlbGVjdEFsbChbXSksXG4gICAgICAgICAgICAgICAgbWFpblJlZ2lvbiA9ICQkLm1haW5SZWdpb24gfHwgZDMuc2VsZWN0QWxsKFtdKSxcbiAgICAgICAgICAgICAgICBtYWluVGV4dCA9ICQkLm1haW5UZXh0IHx8IGQzLnNlbGVjdEFsbChbXSksXG4gICAgICAgICA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nZhbHVlcy5sZW5ndGggIT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgdHJhbnNsYXRlWCA9ICQkLngob3JnRG9tYWluWzBdKSAtICQkLngoZG9tYWluWzBdKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAoJCQuaXNUaW1lU2VyaWVzKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZsb3dTdGFydCA9ICQkLmdldFZhbHVlT25JbmRleCgkJC5kYXRhLnRhcmdldHNbMF0udmFsdWVzLCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZsb3dFbmQgPSAkJC5nZXRWYWx1ZU9uSW5kZXgoJCQuZGF0YS50YXJnZXRzWzBdLnZhbHVlcywgJCQuZGF0YS50YXJnZXRzWzBdLnZhbHVlcy5sZW5ndGggLSAxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zbGF0ZVggPSAkJC54KGZsb3dTdGFydC54KSAtICQkLngoZmxvd0VuZC54KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zbGF0ZVggPSBkaWZmRG9tYWluKGRvbWFpbikgLyAyO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChmbG93Lm9yZ0RhdGFDb3VudCA9PT0gMSB8fCAoZmxvd1N0YXJ0ICYmIGZsb3dTdGFydC54KSA9PT0gKGZsb3dFbmQgJiYgZmxvd0VuZC54KSkge1xuICAgICAgICAgICAgICAgIHRyYW5zbGF0ZVggPSAkJC54KG9yZ0RvbWFpblswXSkgLSAkJC54KGRvbWFpblswXSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICgkJC5pc1RpbWVTZXJpZXMoKSkge1xuICAgICAgICAgICAgICAgICAgICB0cmFuc2xhdGVYID0gKCQkLngob3JnRG9tYWluWzBdKSAtICQkLngoZG9tYWluWzBdKSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdHJhbnNsYXRlWCA9ICgkJC54KGZsb3dTdGFydC54KSAtICQkLngoZmxvd0VuZC54KSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgc2NhbGVYID0gKGRpZmZEb21haW4ob3JnRG9tYWluKSAvIGRpZmZEb21haW4oZG9tYWluKSk7XG4gICAgICAgICAgICB0cmFuc2Zvcm0gPSAndHJhbnNsYXRlKCcgKyB0cmFuc2xhdGVYICsgJywwKSBzY2FsZSgnICsgc2NhbGVYICsgJywxKSc7XG5cbiAgICAgICAgICAgICQkLmhpZGVYR3JpZEZvY3VzKCk7XG5cbiAgICAgICAgICAgIGQzLnRyYW5zaXRpb24oKS5lYXNlKCdsaW5lYXInKS5kdXJhdGlvbihkdXJhdGlvbkZvckZsb3cpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHdhaXQuYWRkKCQkLmF4ZXMueC50cmFuc2l0aW9uKCkuY2FsbCgkJC54QXhpcykpO1xuICAgICAgICAgICAgICAgIHdhaXQuYWRkKG1haW5CYXIudHJhbnNpdGlvbigpLmF0dHIoJ3RyYW5zZm9ybScsIHRyYW5zZm9ybSkpO1xuICAgICAgICAgICAgICAgIHdhaXQuYWRkKG1haW5MaW5lLnRyYW5zaXRpb24oKS5hdHRyKCd0cmFuc2Zvcm0nLCB0cmFuc2Zvcm0pKTtcbiAgICAgICAgICAgICAgICB3YWl0LmFkZChtYWluQXJlYS50cmFuc2l0aW9uKCkuYXR0cigndHJhbnNmb3JtJywgdHJhbnNmb3JtKSk7XG4gICAgICAgICAgICAgICAgd2FpdC5hZGQobWFpbkNpcmNsZS50cmFuc2l0aW9uKCkuYXR0cigndHJhbnNmb3JtJywgdHJhbnNmb3JtKSk7XG4gICAgICAgICAgICAgICAgd2FpdC5hZGQobWFpblRleHQudHJhbnNpdGlvbigpLmF0dHIoJ3RyYW5zZm9ybScsIHRyYW5zZm9ybSkpO1xuICAgICAgICAgICAgICAgIHdhaXQuYWRkKG1haW5SZWdpb24uZmlsdGVyKCQkLmlzUmVnaW9uT25YKS50cmFuc2l0aW9uKCkuYXR0cigndHJhbnNmb3JtJywgdHJhbnNmb3JtKSk7XG4gICAgICAgICAgICAgICAgd2FpdC5hZGQoeGdyaWQudHJhbnNpdGlvbigpLmF0dHIoJ3RyYW5zZm9ybScsIHRyYW5zZm9ybSkpO1xuICAgICAgICAgICAgICAgIHdhaXQuYWRkKHhncmlkTGluZXMudHJhbnNpdGlvbigpLmF0dHIoJ3RyYW5zZm9ybScsIHRyYW5zZm9ybSkpO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5jYWxsKHdhaXQsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICB2YXIgaSwgc2hhcGVzID0gW10sIHRleHRzID0gW10sIGV2ZW50UmVjdHMgPSBbXTtcblxuICAgICAgICAgICAgICAgIC8vIHJlbW92ZSBmbG93ZWQgZWxlbWVudHNcbiAgICAgICAgICAgICAgICBpZiAoZmxvd0xlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZmxvd0xlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzaGFwZXMucHVzaCgnLicgKyBDTEFTUy5zaGFwZSArICctJyArIChmbG93SW5kZXggKyBpKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0cy5wdXNoKCcuJyArIENMQVNTLnRleHQgKyAnLScgKyAoZmxvd0luZGV4ICsgaSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnRSZWN0cy5wdXNoKCcuJyArIENMQVNTLmV2ZW50UmVjdCArICctJyArIChmbG93SW5kZXggKyBpKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgJCQuc3ZnLnNlbGVjdEFsbCgnLicgKyBDTEFTUy5zaGFwZXMpLnNlbGVjdEFsbChzaGFwZXMpLnJlbW92ZSgpO1xuICAgICAgICAgICAgICAgICAgICAkJC5zdmcuc2VsZWN0QWxsKCcuJyArIENMQVNTLnRleHRzKS5zZWxlY3RBbGwodGV4dHMpLnJlbW92ZSgpO1xuICAgICAgICAgICAgICAgICAgICAkJC5zdmcuc2VsZWN0QWxsKCcuJyArIENMQVNTLmV2ZW50UmVjdHMpLnNlbGVjdEFsbChldmVudFJlY3RzKS5yZW1vdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgJCQuc3ZnLnNlbGVjdCgnLicgKyBDTEFTUy54Z3JpZCkucmVtb3ZlKCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gZHJhdyBhZ2FpbiBmb3IgcmVtb3ZpbmcgZmxvd2VkIGVsZW1lbnRzIGFuZCByZXZlcnRpbmcgYXR0clxuICAgICAgICAgICAgICAgIHhncmlkXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCBudWxsKVxuICAgICAgICAgICAgICAgICAgICAuYXR0cigkJC54Z3JpZEF0dHIpO1xuICAgICAgICAgICAgICAgIHhncmlkTGluZXNcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIG51bGwpO1xuICAgICAgICAgICAgICAgIHhncmlkTGluZXMuc2VsZWN0KCdsaW5lJylcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJ4MVwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gMCA6IHh2KVxuICAgICAgICAgICAgICAgICAgICAuYXR0cihcIngyXCIsIGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAkJC53aWR0aCA6IHh2KTtcbiAgICAgICAgICAgICAgICB4Z3JpZExpbmVzLnNlbGVjdCgndGV4dCcpXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKFwieFwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gJCQud2lkdGggOiAwKVxuICAgICAgICAgICAgICAgICAgICAuYXR0cihcInlcIiwgeHYpO1xuICAgICAgICAgICAgICAgIG1haW5CYXJcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIG51bGwpXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKFwiZFwiLCBkcmF3QmFyKTtcbiAgICAgICAgICAgICAgICBtYWluTGluZVxuICAgICAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgbnVsbClcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJkXCIsIGRyYXdMaW5lKTtcbiAgICAgICAgICAgICAgICBtYWluQXJlYVxuICAgICAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgbnVsbClcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJkXCIsIGRyYXdBcmVhKTtcbiAgICAgICAgICAgICAgICBtYWluQ2lyY2xlXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCBudWxsKVxuICAgICAgICAgICAgICAgICAgICAuYXR0cihcImN4XCIsIGN4KVxuICAgICAgICAgICAgICAgICAgICAuYXR0cihcImN5XCIsIGN5KTtcbiAgICAgICAgICAgICAgICBtYWluVGV4dFxuICAgICAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgbnVsbClcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3gnLCB4Rm9yVGV4dClcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3knLCB5Rm9yVGV4dClcbiAgICAgICAgICAgICAgICAgICAgLnN0eWxlKCdmaWxsLW9wYWNpdHknLCAkJC5vcGFjaXR5Rm9yVGV4dC5iaW5kKCQkKSk7XG4gICAgICAgICAgICAgICAgbWFpblJlZ2lvblxuICAgICAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgbnVsbCk7XG4gICAgICA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WQgPSBkLmRhdGEgPyBkLmRhdGEuaWQgOiBkLmlkLFxuICAgICAgICAgICAgICAgIHRvZ2dsZSA9ICQkLmdldFRvZ2dsZSh0aGlzLCBkKS5iaW5kKCQkKSxcbiAgICAgICAgICAgICAgICBpc1RhcmdldElkID0gY29uZmlnLmRhdGFfc2VsZWN0aW9uX2dyb3VwZWQgfHwgIWlkcyB8fCBpZHMuaW5kZXhPZihpZCkgPj0gMCxcbiAgICAgICAgICAgICAgICBpc1RhcmdldEluZGV4ID0gIWluZGljZXMgfHwgaW5kaWNlcy5pbmRleE9mKGkpID49IDAsXG4gICAgICAgICAgICAgICAgaXNTZWxlY3RlZCA9IHNoYXBlLmNsYXNzZWQoQ0xBU1MuU0VMRUNURUQpO1xuICAgICAgICAgICAgLy8gbGluZS9hcmVhIHNlbGVjdGlvbiBub3Qgc3VwcG9ydGVkIHlldFxuICAgICAgICAgICAgaWYgKHNoYXBlLmNsYXNzZWQoQ0xBU1MubGluZSkgfHwgc2hhcGUuY2xhc3NlZChDTEFTUy5hcmVhKSkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChpc1RhcmdldElkICYmIGlzVGFyZ2V0SW5kZXgpIHtcbiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFfc2VsZWN0aW9uX2lzc2VsZWN0YWJsZShkKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaXNTZWxlY3RlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9nZ2xlKGZhbHNlLCBzaGFwZS5jbGFzc2VkKENMQVNTLlNFTEVDVEVELCBmYWxzZSksIGQsIGkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9O1xuXG4gICAgYzNfY2hhcnRfZm4udHJhbnNmb3JtID0gZnVuY3Rpb24gKHR5cGUsIHRhcmdldElkcykge1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G4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuICQkLmRhdGEueHM7XG4gICAgfTtcbiAgICBjM19jaGFydF9mbi54cyA9IGZ1bmN0aW9uICh4cykge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLmludGVybmFsO1xuICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCkge1xuICAgICAgICAgICAgJCQudXBkYXRlVGFyZ2V0WHMoJCQuZGF0YS50YXJnZXRzLCB4cyk7XG4gICAgICAgICAgICAkJC5yZWRyYXcoe3dpdGhVcGRhdGVPcmdYRG9tYWluOiB0cnVlLCB3aXRoVXBkYXRlWERvbWFpbjogdHJ1ZX0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiAkJC5kYXRhLnhzO1xuICAgIH07XG5cbiAgICBjM19jaGFydF9mbi5heGlzID0gZnVuY3Rpb24gKCkge307XG4gICAgYzNfY2hhcnRfZm4uYXhpcy5sYWJlbHMgPSBmdW5jdGlvbiAobGFiZWxzKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMuaW50ZXJuYWw7XG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoKSB7XG4gICAgICAgICAgICBPYmplY3Qua2V5cyhsYWJlbHMpLmZvckVhY2goZnVuY3Rpb24gKGF4aXNJZCkge1xuICAgICAgICAgICAgICAgICQkLmF4aXMuc2V0TGFiZWxUZXh0KGF4aXNJZCwgbGFiZWxzW2F4aXNJZF0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAkJC5heGlzLnVwZGF0ZUxhYmVscygpO1xuICAgICAgICB9XG4gICAgICAgIC8vIFRPRE86IHJldHVybiBzb21lIHZhbHVlcz9cbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ZuLmF4aXMubWF4ID0gZnVuY3Rpb24gKG1heCkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLmludGVybmFsLCBjb25maWcgPSAkJC5jb25maWc7XG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIG1heCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICBpZiAoaXNWYWx1ZShtYXgueCkpIHsgY29uZmlnLmF4aXNfeF9tYXggPSBtYXgueDsgfVxuICAgICAgICAgICAgICAgIGlmIChpc1ZhbHVlKG1heC55KSkgeyBjb25maWcuYXhpc195X21heCA9IG1heC55OyB9XG4gICAgICAgICAgICAgICAgaWYgKGlzVmFsdWUobWF4LnkyKSkgeyBjb25maWcuYXhpc195Ml9tYXggPSBtYXgueTI7IH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29uZmlnLmF4aXNfeV9tYXggPSBjb25maWcuYXhpc195Ml9tYXggPSBtYXg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAkJC5yZWRyYXcoe3dpdGhVcGRhdGVPcmdYRG9tYWluOiB0cnVlLCB3aXRoVXBkYXRlWERvbWFpbjogdHJ1ZX0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICB4OiBjb25maWcuYXhpc194X21heCxcbiAgICAgICAgICAgICAgICB5OiBjb25maWcuYXhpc195X21heCxcbiAgICAgICAgICAgICAgICB5MjogY29uZmlnLmF4aXNfeTJfbWF4XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgfTtcbiAgICBjM19jaGFydF9mbi5heGlzLm1pbiA9IGZ1bmN0aW9uIChtaW4pIHtcbiAgICAgICAgdmFyICQkID0gdGhpcy5pbnRlcm5hbCwgY29uZmlnID0gJCQuY29uZmlnO1xuICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCkge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBtaW4gPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzVmFsdWUobWluLngpKSB7IGNvbmZpZy5heGlzX3hfbWluID0gbWluLng7IH1cbiAgICAgICAgICAgICAgICBpZiAoaXNWYWx1ZShtaW4ueSkpIHsgY29uZmlnLmF4aXNfeV9taW4gPSBtaW4ueTsgfVxuICAgICAgICAgICAgICAgIGlmIChpc1ZhbHVlKG1pbi55MikpIHsgY29uZmlnLmF4aXNfeTJfbWluID0gbWluLnkyOyB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbmZpZy5heGlzX3lfbWluID0gY29uZmlnLmF4aXNfeTJfbWluID0gbWluO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgJCQucmVkcmF3KHt3aXRoVXBkYXRlT3JnWERvbWFpbjogdHJ1ZSwgd2l0aFVwZGF0ZVhEb21haW46IHRydWV9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgeDogY29uZmlnLmF4aXNfeF9taW4sXG4gICAgICAgICAgICAgICAgeTogY29uZmlnLmF4aXNfeV9taW4sXG4gICAgICAgICAgICAgICAgeTI6IGNvbmZpZy5heGlzX3kyX21pblxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgYzNfY2hhcnRfZm4uYXhpcy5yYW5nZSA9IGZ1bmN0aW9uIChyYW5nZSkge1xuICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCkge1xuICAgICAgICAgICAgaWYgKGlzRGVmaW5lZChyYW5nZS5tYXgpKSB7IHRoaXMuYXhpcy5tYXgocmFuZ2UubWF4KTsgfVxuICAgICAgICAgICAgaWYgKGlzRGVmaW5lZChyYW5nZS5taW4pKSB7IHRoaXMuYXhpcy5taW4ocmFuZ2UubWluKTsgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBtYXg6IHRoaXMuYXhpcy5tYXgoKSxcbiAgICAgICAgICAgICAgICBtaW46IHRoaXMuYXhpcy5taW4oKVxuICAgICAgICAgICAgfTtcbiAgICAgIC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RhdGEudmFsdWUpXTtcbiAgICAgICAgICAgICAgICBpbmRleCA9IG51bGw7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIFRPRE86IHdoZW4gdG9vbHRpcF9ncm91cGVkID0gZmFsc2VcbiAgICAgICAgICAgICAgICBpbmRleCA9IGlzVmFsdWUoYXJncy5kYXRhLmluZGV4KSA/IGFyZ3MuZGF0YS5pbmRleCA6ICQkLmdldEluZGV4QnlYKGFyZ3MuZGF0YS54KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0eXBlb2YgYXJncy54ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgaW5kZXggPSAkJC5nZXRJbmRleEJ5WChhcmdzLngpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKHR5cGVvZiBhcmdzLmluZGV4ICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgaW5kZXggPSBhcmdzLmluZGV4O1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gZW11bGF0ZSBtb3VzZSBldmVudHMgdG8gc2hvd1xuICAgICAgICAkJC5kaXNwYXRjaEV2ZW50KCdtb3VzZW92ZXInLCBpbmRleCwgbW91c2UpO1xuICAgICAgICAkJC5kaXNwYXRjaEV2ZW50KCdtb3VzZW1vdmUnLCBpbmRleCwgbW91c2UpO1xuXG4gICAgICAgICQkLmNvbmZpZy50b29sdGlwX29uc2hvdy5jYWxsKCQkLCBhcmdzLmRhdGEpO1xuICAgIH07XG4gICAgYzNfY2hhcnRfZm4udG9vbHRpcC5oaWRlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAvLyBUT0RPOiBnZXQgdGFyZ2V0IGRhdGEgYnkgY2hlY2tpbmcgdGhlIHN0YXRlIG9mIGZvY3VzXG4gICAgICAgIHRoaXMuaW50ZXJuYWwuZGlzcGF0Y2hFdmVudCgnbW91c2VvdXQnLCAwKTtcblxuICAgICAgICB0aGl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IHtcbiAgICAgICAgICAgIHNlbGVjdGlvbi5hdHRyKFwidHJhbnNmb3JtXCIsIGZ1bmN0aW9uIChkKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFwidHJhbnNsYXRlKDAsXCIgKyBNYXRoLmNlaWwoeShkKSkgKyBcIilcIjtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIHNjYWxlRXh0ZW50KGRvbWFpbikge1xuICAgICAgICAgICAgdmFyIHN0YXJ0ID0gZG9tYWluWzBdLCBzdG9wID0gZG9tYWluW2RvbWFpbi5sZW5ndGggLSAxXTtcbiAgICAgICAgICAgIHJldHVybiBzdGFydCA8IHN0b3AgPyBbIHN0YXJ0LCBzdG9wIF0gOiBbIHN0b3AsIHN0YXJ0IF07XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gZ2VuZXJhdGVUaWNrcyhzY2FsZSkge1xuICAgICAgICAgICAgdmFyIGksIGRvbWFpbiwgdGlja3MgPSBbXTtcbiAgICAgICAgICAgIGlmIChzY2FsZS50aWNrcykge1xuICAgICAgICAgICAgICAgIHJldHVybiBzY2FsZS50aWNrcy5hcHBseShzY2FsZSwgdGlja0FyZ3VtZW50cyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkb21haW4gPSBzY2FsZS5kb21haW4oKTtcbiAgICAgICAgICAgIGZvciAoaSA9IE1hdGguY2VpbChkb21haW5bMF0pOyBpIDwgZG9tYWluWzFdOyBpKyspIHtcbiAgICAgICAgICAgICAgICB0aWNrcy5wdXNoKGkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHRpY2tzLmxlbmd0aCA+IDAgJiYgdGlja3NbMF0gPiAwKSB7XG4gICAgICAgICAgICAgICAgdGlja3MudW5zaGlmdCh0aWNrc1swXSAtICh0aWNrc1sxXSAtIHRpY2tzWzBdKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGlja3M7XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gY29weVNjYWxlKCkge1xuICAgICAgICAgICAgdmFyIG5ld1NjYWxlID0gc2NhbGUuY29weSgpLCBkb21haW47XG4gICAgICAgICAgICBpZiAocGFyYW1zLmlzQ2F0ZWdvcnkpIHtcbiAgICAgICAgICAgICAgICBkb21haW4gPSBzY2FsZS5kb21haW4oKTtcbiAgICAgICAgICAgICAgICBuZXdTY2FsZS5kb21haW4oW2RvbWFpblswXSwgZG9tYWluWzFdIC0gMV0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG5ld1NjYWxlO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIHRleHRGb3JtYXR0ZWQodikge1xuICAgICAgICAgICAgdmFyIGZvcm1hdHRlZCA9IHRpY2tGb3JtYXQgPyB0aWNrRm9ybWF0KHYpIDogdjtcbiAgICAgICAgICAgIHJldHVybiB0eXBlb2YgZm9ybWF0dGVkICE9PSAndW5kZWZpbmVkJyA/IGZvcm1hdHRlZCA6ICcnO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIGdldFNpemVGb3IxQ2hhcih0aWNrKSB7XG4gICAgICAgICAgICBpZiAodGlja1RleHRDaGFyU2l6ZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aWNrVGV4dENoYXJTaXplO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHNpemUgPSB7XG4gICAgICAgICAgICAgICAgaDogMTEuNSxcbiAgICAgICAgICAgICAgICB3OiA1LjVcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB0aWNrLnNlbGVjdCgndGV4dCcpLnRleHQodGV4dEZvcm1hdHRlZCkuZWFjaChmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgIHZhciBib3ggPSB0aGlzLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLFxuICAgICAgICAgICAgICAgICAgICB0ZXh0ID0gdGV4dEZvcm1hdHRlZChkKSxcbiAgICAgICAgICAgICAgICAgICAgaCA9IGJveC5oZWlnaHQsXG4gICAgICAgICAgICAgICAgICAgIHcgPSB0ZXh0ID8gKGJveC53aWR0aCAvIHRleHQubGVuZ3RoKSA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICBpZiAoaCAmJiB3KSB7XG4gICAgICAgICAgICAgICAgICAgIHNpemUuaCA9IGg7XG4gICAgICAgICAgICAgICAgICAgIHNpemUudyA9IHc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSkudGV4dCgnJyk7XG4gICAgICAgICAgICB0aWNrVGV4dENoYXJTaXplID0gc2l6ZTtcbiAgICAgICAgICAgIHJldHVybiBzaXplO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIHRyYW5zaXRpb25pc2Uoc2VsZWN0aW9uKSB7XG4gICAgICAgICAgICByZXR1cm4gcGFyYW1zLndpdGhvdXRUcmFuc2l0aW9uID8gc2VsZWN0aW9uIDogZDMudHJhbnNpdGlvbihzZWxlY3Rpb24pO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIGF4aXMoZykge1xuICAgICAgICAgICAgZy5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICB2YXIgZyA9IGF4aXMuZyA9IGQzLnNlbGVjdCh0aGlzKTtcblxuICAgICAgICAgICAgICAgIHZhciBzY2FsZTAgPSB0aGlzLl9fY2hhcnRfXyB8fCBzY2FsZSwgc2NhbGUxID0gdGhpcy5fX2NoYXJ0X18gPSBjb3B5U2NhbGUoKTtcblxuICAgICAgICAgICAgICAgIHZhciB0aWNrcyA9IHRpY2tWYWx1ZXMgPyB0aWNrVmFsdWVzIDogZ2VuZXJhdGVUaWNrcyhzY2FsZTEpLFxuICAgICAgICAgICAgICAgICAgICB0aWNrID0gZy5zZWxlY3RBbGwoXCIudGlja1wiKS5kYXRhKHRpY2tzLCBzY2FsZTEpLFxuICAgICAgICAgICAgICAgICAgICB0aWNrR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luZUVudGVyID0gdGlja0VudGVyLnNlbGVjdChcImxpbmVcIiksXG4gICAgICAgICAgICAgICAgICAgIGxpbmVVcGRhdGUgPSB0aWNrVXBkYXRlLnNlbGVjdChcImxpbmVcIiksXG4gICAgICAgICAgICAgICAgICAgIHRleHRFbnRlciA9IHRpY2tFbnRlci5zZWxlY3QoXCJ0ZXh0XCIpLFxuICAgICAgICAgICAgICAgICAgICB0ZXh0VXBkYXRlID0gdGlja1VwZGF0ZS5zZWxlY3QoXCJ0ZXh0XCIpO1xuXG4gICAgICAgICAgICAgICAgaWYgKHBhcmFtcy5pc0NhdGVnb3J5KSB7XG4gICAgICAgICAgICAgICAgICAgIHRpY2tPZmZzZXQgPSBNYXRoLmNlaWwoKHNjYWxlMSgxKSAtIHNjYWxlMSgwKSkgLyAyKTtcbiAgICAgICAgICAgICAgICAgICAgdGlja1ggPSB0aWNrQ2VudGVyZWQgPyAwIDogdGlja09mZnNldDtcbiAgICAgICAgICAgICAgICAgICAgdGlja1kgPSB0aWNrQ2VudGVyZWQgPyB0aWNrT2Zmc2V0IDogMDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aWNrT2Zmc2V0ID0gdGlja1ggPSAwO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHZhciB0ZXh0LCB0c3Bhbiwgc2l6ZUZvcjFDaGFyID0gZ2V0U2l6ZUZvcjFDaGFyKGcuc2VsZWN0KCcudGljaycpKSwgY291bnRzID0gW107XG4gICAgICAgICAgICAgICAgdmFyIHRpY2tMZW5ndGggPSBNYXRoLm1heChpbm5lclRpY2tTaXplLCAwKSArIHRpY2tQYWRkaW5nLFxuICAgICAgICAgICAgICAgICAgICBpc1ZlcnRpY2FsID0gb3JpZW50ID09PSAnbGVmdCcgfHwgb3JpZW50ID09PSAncmlnaHQnO1xuXG4gICAgICAgICAgICAgICAgLy8gdGhpcyBzaG91bGQgYmUgY2FsbGVkIG9ubHkgd2hlbiBjYXRlZ29yeSBheGlzXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gc3BsaXRUaWNrVGV4dChkLCBtYXhXaWR0aCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdGlja1RleHQgPSB0ZXh0Rm9ybWF0dGVkKGQpLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3VidGV4dCwgc3BhY2VJbmRleCwgdGV4dFdpZHRoLCBzcGxpdHRlZCA9IFtdO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwodGlja1RleHQpID09PSBcIltvYmplY3QgQXJyYXldXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0aWNrVGV4dDtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICghbWF4V2lkdGggfHwgbWF4V2lkdGggPD0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWF4V2lkdGggPSBpc1ZlcnRpY2FsID8gOTUgOiBwYXJhbXMuaXNDYXRlZ29yeSA/IChNYXRoLmNlaWwoc2NhbGUxKHRpY2tzWzFdKSAtIHNjYWxlMSh0aWNrc1swXSkpIC0gMTIpIDogMTEwO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gc3BsaXQoc3BsaXR0ZWQsIHRleHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNwYWNlSW5kZXggPSB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IHRleHQubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGV4dC5jaGFyQXQoaSkgPT09ICcgJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzcGFjZUluZGV4ID0gaTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VidGV4dCA9IHRleHQuc3Vic3RyKDAsIGkgKyAxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0V2lkdGggPSBzaXplRm9yMUNoYXIudyAqIHN1YnRleHQubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmIHRleHQgd2lkdGggZ2V0cyBvdmVyIHRpY2sgd2lkdGgsIHNwbGl0IGJ5IHNwYWNlIGluZGV4IG9yIGNycmVudCBpbmRleFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtYXhXaWR0aCA8IHRleHRXaWR0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3BsaXQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzcGxpdHRlZC5jb25jYXQodGV4dC5zdWJzdHIoMCwgc3BhY2VJbmRleCA/IHNwYWNlSW5kZXggOiBpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0LnNsaWNlKHNwYWNlSW5kZXggPyBzcGFjZUluZGV4ICsgMSA6IGkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNwbGl0dGVkLmNvbmNhdCh0ZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzcGxpdChzcGxpdHRlZCwgdGlja1RleHQgKyBcIlwiKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB0c3BhbkR5KGQsIGkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGR5ID0gc2l6ZUZvcjFDaGFyLmg7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAob3JpZW50ID09PSAnbGVmdCcgfHwgb3JpZW50ID09PSAncmlnaHQnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZHkgPSAtKChjb3VudHNbZC5pbmRleF0gLSAxKSAqIChzaXplRm9yMUNoYXIuaCAvIDIpIC0gMyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGR5ID0gXCIuNzFlbVwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBkeTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB0aWNrU2l6ZShkKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB0aWNrUG9zaXRpb24gPSBzY2FsZShkKSArICh0aWNrQ2VudGVyZWQgPyAwIDogdGlja09mZnNldCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByYW5nZVswXSA8IHRpY2tQb3NpdGlvbiAmJiB0aWNrUG9zaXRpb24gPCByYW5nZVsxXSA/IGlubmVyVGlja1NpemUgOiAwO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHRleHQgPSB0aWNrLnNlbGVjdChcInRleHRcIik7XG4gICAgICAgICAgICAgICAgdHNwYW4gPSB0ZXh0LnNlbGVjdEFsbCgndHNwYW4nKVxuICAgICAgICAgICAgICAgICAgICAuZGF0YShmdW5jdGlvbiAoZCwgaSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHNwbGl0dGVkID0gcGFyYW1zLnRpY2tNdWx0aWxpbmUgPyBzcGxpdFRpY2tUZXh0KGQsIHBhcmFtcy50aWNrV2lkdGgpIDogW10uY29uY2F0KHRleHRGb3JtYXR0ZWQoZCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgY291bnRzW2ldID0gc3BsaXR0ZWQubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNwbGl0dGVkLm1hcChmdW5jdGlvbiAocykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7IGluZGV4OiBpLCBzcGxpdHRlZDogcyB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHRzcGFuLmVudGVyKCkuYXBwZW5kKCd0c3BhbicpO1xuICAgICAgICAgICAgICAgIHRzcGFuLmV4aXQoKS5yZW1vdmUoKTtcbiAgICAgICAgICAgICAgICB0c3Bhbi50ZXh0KGZ1bmN0aW9uIChkKSB7IHJldHVybiBkLnNwbGl0dGVkOyB9KTtcblxuICAgICAgICAgICAgICAgIHZhciByb3RhdGUgPSBwYXJhbXMudGlja1RleHRSb3RhdGU7XG5cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB0ZXh0QW5jaG9yRm9yVGV4dChyb3RhdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFyb3RhdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnbWlkZGxlJztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcm90YXRlID4gMCA/IFwic3RhcnRcIiA6IFwiZW5kXCI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHRleHRUcmFuc2Zvcm0ocm90YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghcm90YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJyc7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwicm90YXRlKFwiICsgcm90YXRlICsgXCIpXCI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGR4Rm9yVGV4dChyb3RhdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFyb3RhdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiA4ICogTWF0aC5zaW4oTWF0aC5QSSAqIChyb3RhdGUgLyAxODApKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZnVuY3Rpb24geUZvclRleHQocm90YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghcm90YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGlja0xlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTEuNSAtIDIuNSAqIChyb3RhdGUgLyAxNSkgKiAocm90YXRlID4gMCA/IDEgOiAtMSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgc3dpdGNoIChvcmllbnQpIHtcbiAgICAgICAgICAgICAgICBjYXNlIFwiYm90dG9tXCI6XG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpY2tUcmFuc2Zvcm0gPSBheGlzWDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVFbnRlci5hdHRyKFwieTJcIiwgaW5uZXJUaWNrU2l6ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0RW50ZXIuYXR0cihcInlcIiwgdGlja0xlbmd0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lVXBkYXRlLmF0dHIoXCJ4MVwiLCB0aWNrWCkuYXR0cihcIngyXCIsIHRpY2tYKS5hdHRyKFwieTJcIiwgdGlja1NpemUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFVwZGF0ZS5hdHRyKFwieFwiLCAwKS5hdHRyKFwieVwiLCB5Rm9yVGV4dChyb3RhdGUpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zdHlsZShcInRleHQtYW5jaG9yXCIsIHRleHRBbmNob3JGb3JUZXh0KHJvdGF0ZSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJ0cmFuc2Zvcm1cIiwgdGV4dFRyYW5zZm9ybShyb3RhdGUpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRzcGFuLmF0dHIoJ3gnLCAwKS5hdHRyKFwiZHlcIiwgdHNwYW5EeSkuYXR0cignZHgnLCBkeEZvclRleHQocm90YXRlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBwYXRoVXBkYXRlLmF0dHIoXCJkXCIsIFwiTVwiICsgcmFuZ2VbMF0gKyBcIixcIiArIG91dGVyVGlja1NpemUgKyBcIlYwSFwiICsgcmFuZ2VbMV0gKyBcIlZcIiArIG91dGVyVGlja1NpemUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjYXNlIFwidG9wXCI6XG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRPRE86IHJvdGF0ZWQgdGljayB0ZXh0XG4gICAgICAgICAgICAgICAgICAgICAgICB0aWNrVHJhbnNmb3JtID0gYXhpc1g7XG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lRW50ZXIuYXR0cihcInkyXCIsIC1pbm5lclRpY2tTaXplKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRFbnRlci5hdHRyKFwieVwiLCAtdGlja0xlbmd0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lVXBkYXRlLmF0dHIoXCJ4MlwiLCAwKS5hdHRyKFwieTJcIiwgLWlubmVyVGlja1NpemUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFVwZGF0ZS5hdHRyKFwieFwiLCAwKS5hdHRyKFwieVwiLCAtdGlja0xlbmd0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0LnN0eWxlKFwidGV4dC1hbmNob3JcIiwgXCJtaWRkbGVcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICB0c3Bhbi5hdHRyKCd4JywgMCkuYXR0cihcImR5XCIsIFwiMGVtXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcGF0aFVwZGF0ZS5hdHRyKFwiZFwiLCBcIk1cIiArIHJhbmdlWzBdICsgXCIsXCIgKyAtb3V0ZXJUaWNrU2l6ZSArIFwiVjBIXCIgKyByYW5nZVsxXSArIFwiVlwiICsgLW91dGVyVGlja1NpemUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjYXNlIFwibGVmdFwiOlxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aWNrVHJhbnNmb3JtID0gYXhpc1k7XG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lRW50ZXIuYXR0cihcIngyXCIsIC1pbm5lclRpY2tTaXplKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRFbnRlci5hdHRyKFwieFwiLCAtdGlja0xlbmd0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lVXBkYXRlLmF0dHIoXCJ4MlwiLCAtaW5uZXJUaWNrU2l6ZSkuYXR0cihcInkxXCIsIHRpY2tZKS5hdHRyKFwieTJcIiwgdGlja1kpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFVwZGF0ZS5hdHRyKFwieFwiLCAtdGlja0xlbmd0aCkuYXR0cihcInlcIiwgdGlja09mZnNldCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0LnN0eWxlKFwidGV4dC1hbmNob3JcIiwgXCJlbmRcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICB0c3Bhbi5hdHRyKCd4JywgLXRpY2tMZW5ndGgpLmF0dHIoXCJkeVwiLCB0c3BhbkR5KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhVcGRhdGUuYXR0cihcImRcIiwgXCJNXCIgKyAtb3V0ZXJUaWNrU2l6ZSArIFwiLFwiICsgcmFuZ2VbMF0gKyBcIkgwVlwiICsgcmFuZ2VbMV0gKyBcIkhcIiArIC1vdXRlclRpY2tTaXplKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY2FzZSBcInJpZ2h0XCI6XG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpY2tUcmFuc2Zvcm0gPSBheGlzWTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVFbnRlci5hdHRyKFwieDJcIiwgaW5uZXJUaWNrU2l6ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0RW50ZXIuYXR0cihcInhcIiwgdGlja0xlbmd0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lVXBkYXRlLmF0dHIoXCJ4MlwiLCBpbm5lclRpY2tTaXplKS5hdHRyKFwieTJcIiwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0VXBkYXRlLmF0dHIoXCJ4XCIsIHRpY2tMZW5ndGgpLmF0dHIoXCJ5XCIsIDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dC5zdHlsZShcInRleHQtYW5jaG9yXCIsIFwic3RhcnRcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICB0c3Bhbi5hdHRyKCd4JywgdGlja0xlbmd0aCkuYXR0cihcImR5XCIsIHRzcGFuRHkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcGF0aFVwZGF0ZS5hdHRyKFwiZFwiLCBcIk1cIiArIG91dGVyVGlja1NpemUgKyBcIixcIiArIHJhbmdlWzBdICsgXCJIMFZcIiArIHJhbmdlWzFdICsgXCJIXCIgKyBvdXRlclRpY2tTaXplKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzY2FsZTEucmFuZ2VCYW5kKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB4ID0gc2NhbGUxLCBkeCA9IHgucmFuZ2VCYW5kKCkgLyAyO1xuICAgICAgICAgICAgICAgICAgICBzY2FsZTAgPSBzY2FsZTEgPSBmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHgoZCkgKyBkeDtcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHNjYWxlMC5yYW5nZUJhbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgc2NhbGUwID0gc2NhbGUxO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRpY2tFeGl0LmNhbGwodGlja1RyYW5zZm9ybSwgc2NhbGUxKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGlja0VudGVyLmNhbGwodGlja1RyYW5zZm9ybSwgc2NhbGUwKTtcbiAgICAgICAgICAgICAgICB0aWNrVXBkYXRlLmNhbGwodGlja1RyYW5zZm9ybSwgc2NhbGUxKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIGF4aXMuc2NhbGUgPSBmdW5jdGlvbiAoeCkge1xuICAgICAgICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSB7IHJldHVybiBzY2FsZTsgfVxuICAgICAgICAgICAgc2NhbGUgPSB4O1xuICAgICAgICAgICAgcmV0dXJuIGF4aXM7XG4gICAgICAgIH07XG4gICAgICAgIGF4aXMub3JpZW50ID0gZnVuY3Rpb24gKHgpIHtcbiAgICAgICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgeyByZXR1cm4gb3JpZW50OyB9XG4gICAgICAgICAgICBvcmllbnQgPSB4IGluIHt0b3A6IDEsIHJpZ2h0OiAxLCBib3R0b206IDEsIGxlZnQ6IDF9ID8geCArIFwiXCIgOiBcImJvdHRvbVwiO1xuICAgICAgICAgICAgcmV0dXJuIGF4aXM7XG4gICAgICAgIH07XG4gICAgICAgIGF4aXMudGlja0Zvcm1hdCA9IGZ1bmN0aW9uIChmb3JtYXQpIHtcbiAgICAgICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgeyByZXR1cm4gdGlja0Zvcm1hdDsgfVxuICAgICAgICAgICAgdGlja0Zvcm1hdCA9IGZvcm1hdDtcbiAgICAgICAgICAgIHJldHVybiBheGlzO1xuICAgICAgICB9O1xuICAgICAgICBheGlzLnRpY2tDZW50ZXJlZCA9IGZ1bmN0aW9uIChpc0NlbnRlcmVkKSB7XG4gICAgICAgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHsgcmV0dXJuIHRpY2tDZW50ZXJlZDsgfVxuICAgICAgICAgICAgdGlja0NlbnRlcmVkID0gaXNDZW50ZXJlZDtcbiAgICAgICAgICAgIHJldHVybiBheGlzO1xuICAgICAgICB9O1xuICAgICAgICBheGlzLnRpY2tPZmZzZXQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGlja09mZnNldDtcbiAgICAgICAgfTtcbiAgICAgICAgYXhpcy50aWNrSW50ZXJ2YWwgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgaW50ZXJ2YWwsIGxlbmd0aDtcbiAgICAgICAgICAgIGlmIChwYXJhbXMuaXNDYXRlZ29yeSkge1xuICAgICAgICAgICAgICAgIGludGVydmFsID0gdGlja09mZnNldCAqIDI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBsZW5ndGggPSBheGlzLmcuc2VsZWN0KCdwYXRoLmRvbWFpbicpLm5vZGUoKS5nZXRUb3RhbExlbmd0aCgpIC0gb3V0ZXJUaWNrU2l6ZSAqIDI7XG4gICAgICAgICAgICAgICAgaW50ZXJ2YWwgPSBsZW5ndGggLyBheGlzLmcuc2VsZWN0QWxsKCdsaW5lJykuc2l6ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGludGVydmFsID09PSBJbmZpbml0eSA/IDAgOiBpbnRlcnZhbDtcbiAgICAgICAgfTtcbiAgICAgICAgYXhpcy50aWNrcyA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgeyByZXR1cm4gdGlja0FyZ3VtZW50czsgfVxuICAgICAgICAgICAgdGlja0FyZ3VtZW50cyA9IGFyZ3VtZW50cztcbiAgICAgICAgICAgIHJldHVybiBheGlzO1xuICAgICAgICB9O1xuICAgICAgICBheGlzLnRpY2tDdWxsaW5nID0gZnVuY3Rpb24gKGN1bGxpbmcpIHtcbiAgICAgICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgeyByZXR1cm4gdGlja0N1bGxpbmc7IH1cbiAgICAgICAgICAgIHRpY2tDdWxsaW5nID0gY3VsbGluZztcbiAgICAgICAgICAgIHJldHVybiBheGlzO1xuICAgICAgICB9O1xuICAgICAgICBheGlzLnRpY2tWYWx1ZXMgPSBmdW5jdGlvbiAoeCkge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiB4ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgdGlja1ZhbHVlcyA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHgoc2NhbGUuZG9tYWluKCkpO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoIWFyZ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iAgICAgICAgICAgICBpZiAobmV3SXRlbS5fb3duaW5nUGF0aFNlZ0xpc3QpIHtcbiAgICAgICAgICAgICAgICAgLy8gU1ZHMiBzcGVjIHNheXMgdG8gbWFrZSBhIGNvcHkuXG4gICAgICAgICAgICAgICAgIG5ld0l0ZW0gPSBuZXdJdGVtLmNsb25lKCk7XG4gICAgICAgICAgICAgfVxuICAgICAgICAgICAgIHRoaXMuX2NoZWNrVmFsaWRJbmRleChpbmRleCk7XG4gICAgICAgICAgICAgdGhpcy5fbGlzdFtpbmRleF0gPSBuZXdJdGVtO1xuICAgICAgICAgICAgIG5ld0l0ZW0uX293bmluZ1BhdGhTZWdMaXN0ID0gdGhpcztcbiAgICAgICAgICAgICB0aGlzLl93cml0ZUxpc3RUb1BhdGgoKTtcbiAgICAgICAgICAgICByZXR1cm4gbmV3SXRlbTtcbiAgICAgICAgIH1cblxuICAgICAgICAgU1ZHUGF0aFNlZ0xpc3QucHJvdG90eXBlLnJlbW92ZUl0ZW0gPSBmdW5jdGlvbihpbmRleCkge1xuICAgICAgICAgICAgIHRoaXMuX2NoZWNrUGF0aFN5bmNocm9uaXplZFRvTGlzdCgpO1xuXG4gICAgICAgICAgICAgdGhpcy5fY2hlY2tWYWxpZEluZGV4KGluZGV4KTtcbiAgICAgICAgICAgICB2YXIgaXRlbSA9IHRoaXMuX2xpc3RbaW5kZXhdO1xuICAgICAgICAgICAgIHRoaXMuX2xpc3Quc3BsaWNlKGluZGV4LCAxKTtcbiAgICAgICAgICAgICB0aGlzLl93cml0ZUxpc3RUb1BhdGgoKTtcbiAgICAgICAgICAgICByZXR1cm4gaXRlbTtcbiAgICAgICAgIH1cblxuICAgICAgICAgU1ZHUGF0aFNlZ0xpc3QucHJvdG90eXBlLmFwcGVuZEl0ZW0gPSBmdW5jdGlvbihuZXdJdGVtKSB7XG4gICAgICAgICAgICAgdGhpcy5fY2hlY2tQYXRoU3luY2hyb25pemVkVG9MaXN0KCk7XG5cbiAgICAgICAgICAgICBpZiAobmV3SXRlbS5fb3duaW5nUGF0aFNlZ0xpc3QpIHtcbiAgICAgICAgICAgICAgICAgLy8gU1ZHMiBzcGVjIHNheXMgdG8gbWFrZSBhIGNvcHkuXG4gICAgICAgICAgICAgICAgIG5ld0l0ZW0gPSBuZXdJdGVtLmNsb25lKCk7XG4gICAgICAgICAgICAgfVxuICAgICAgICAgICAgIHRoaXMuX2xpc3QucHVzaChuZXdJdGVtKTtcbiAgICAgICAgICAgICBuZXdJdGVtLl9vd25pbmdQYXRoU2VnTGlzdCA9IHRoaXM7XG4gICAgICAgICAgICAgLy8gVE9ETzogT3B0aW1pemUgdGhpcyB0byBqdXN0IGFwcGVuZCB0byB0aGUgZXhpc3RpbmcgYXR0cmlidXRlLlxuICAgICAgICAgICAgIHRoaXMuX3dyaXRlTGlzdFRvUGF0aCgpO1xuICAgICAgICAgICAgIHJldHVybiBuZXdJdGVtO1xuICAgICAgICAgfVxuXG4gICAgICAgICBTVkdQYXRoU2VnTGlzdC5fcGF0aFNlZ0FycmF5QXNTdHJpbmcgPSBmdW5jdGlvbihwYXRoU2VnQXJyYXkpIHtcbiAgICAgICAgICAgICB2YXIgc3RyaW5nID0gXCJcIjtcbiAgICAgICAgICAgICB2YXIgZmlyc3QgPSB0cnVlO1xuICAgICAgICAgICAgIHBhdGhTZWdBcnJheS5mb3JFYWNoKGZ1bmN0aW9uKHBhdGhTZWcpIHtcbiAgICAgICAgICAgICAgICAgaWYgKGZpcnN0KSB7XG4gICAgICAgICAgICAgICAgICAgICBmaXJzdCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgc3RyaW5nICs9IHBhdGhTZWcuX2FzUGF0aFN0cmluZygpO1xuICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgc3RyaW5nICs9IFwiIFwiICsgcGF0aFNlZy5fYXNQYXRoU3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICByZXR1cm4gc3RyaW5nO1xuICAgICAgICAgfVxuXG4gICAgICAgICAvLyBUaGlzIGNsb3NlbHkgZm9sbG93cyBTVkdQYXRoUGFyc2VyOjpwYXJzZVBhdGggZnJvbSBTb3VyY2UvY29yZS9zdmcvU1ZHUGF0aFBhcnNlci5jcHAuXG4gICAgICAgICBTVkdQYXRoU2VnTGlzdC5wcm90b3R5cGUuX3BhcnNlUGF0aCA9IGZ1bmN0aW9uKHN0cmluZykge1xuICAgICAgICAgICAgIGlmICghc3RyaW5nIHx8IHN0cmluZy5sZW5ndGggPT0gMClcbiAgICAgICAgICAgICAgICAgcmV0dXJuIFtdO1xuXG4gICAgICAgICAgICAgdmFyIG93bmluZ1BhdGhTZWdMaXN0ID0gdGhpcztcblxuICAgICAgICAgICAgIHZhciBCdWlsZGVyID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgIHRoaXMucGF0aFNlZ0xpc3QgPSBbXTtcbiAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICBCdWlsZGVyLnByb3RvdHlwZS5hcHBlbmRTZWdtZW50ID0gZnVuY3Rpb24ocGF0aFNlZykge1xuICAgICAgICAgICAgICAgICB0aGlzLnBhdGhTZWdMaXN0LnB1c2gocGF0aFNlZyk7XG4gICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgdmFyIFNvdXJjZSA9IGZ1bmN0aW9uKHN0cmluZykge1xuICAgICAgICAgICAgICAgICB0aGlzLl9zdHJpbmcgPSBzdHJpbmc7XG4gICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJbmRleCA9IDA7XG4gICAgICAgICAgICAgICAgIHRoaXMuX2VuZEluZGV4ID0gdGhpcy5fc3RyaW5nLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgdGhpcy5fcHJldmlvdXNDb21tYW5kID0gU1ZHUGF0aFNlZy5QQVRIU0VHX1VOS05PV047XG5cbiAgICAgICAgICAgICAgICAgdGhpcy5fc2tpcE9wdGlvbmFsU3BhY2VzKCk7XG4gICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgU291cmNlLnByb3RvdHlwZS5faXNDdXJyZW50U3BhY2UgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgdmFyIGNoYXJhY3RlciA9IHRoaXMuX3N0cmluZ1t0aGlzLl9jdXJyZW50SW5kZXhdO1xuICAgICAgICAgICAgICAgICByZXR1cm4gY2hhcmFjdGVyIDw9IFwiIFwiICYmIChjaGFyYWN0ZXIgPT0gXCIgXCIgfHwgY2hhcmFjdGVyID09IFwiXFxuXCIgfHwgY2hhcmFjdGVyID09IFwiXFx0XCIgfHwgY2hhcmFjdGVyID09IFwiXFxyXCIgfHwgY2hhcmFjdGVyID09IFwiXFxmXCIpO1xuICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUuX3NraXBPcHRpb25hbFNwYWNlcyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICB3aGlsZSAodGhpcy5fY3VycmVudEluZGV4IDwgdGhpcy5fZW5kSW5kZXggJiYgdGhpcy5faXNDdXJyZW50U3BhY2UoKSlcbiAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJbmRleCsrO1xuICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fY3VycmVudEluZGV4IDwgdGhpcy5fZW5kSW5kZXg7XG4gICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgU291cmNlLnByb3RvdHlwZS5fc2tpcE9wdGlvbmFsU3BhY2VzT3JEZWxpbWl0ZXIgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRJbmRleCA8IHRoaXMuX2VuZEluZGV4ICYmICF0aGlzLl9pc0N1cnJlbnRTcGFjZSgpICYmIHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSAhPSBcIixcIilcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX3NraXBPcHRpb25hbFNwYWNlcygpKSB7XG4gICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fY3VycmVudEluZGV4IDwgdGhpcy5fZW5kSW5kZXggJiYgdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpID09IFwiLFwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEluZGV4Kys7XG4gICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2tpcE9wdGlvbmFsU3BhY2VzKCk7XG4gICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2N1cnJlbnRJbmRleCA8IHRoaXMuX2VuZEluZGV4O1xuICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUuaGFzTW9yZURhdGEgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2N1cnJlbnRJbmRleCA8IHRoaXMuX2VuZEluZGV4O1xuICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUucGVla1NlZ21lbnRUeXBlID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgIHZhciBsb29rYWhlYWQgPSB0aGlzLl9zdHJpbmdbdGhpcy5fY3VycmVudEluZGV4XTtcbiAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3BhdGhTZWdUeXBlRnJvbUNoYXIobG9va2FoZWFkKTtcbiAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICBTb3VyY2UucHJvdG90eXBlLl9wYXRoU2VnVHlwZUZyb21DaGFyID0gZnVuY3Rpb24obG9va2FoZWFkKSB7XG4gICAgICAgICAgICAgICAgIHN3aXRjaCAobG9va2FoZWFkKSB7XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJaXCI6XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJ6XCI6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0NMT1NFUEFUSDtcbiAgICAgICAgICAgICAgICAgY2FzZSBcIk1cIjpcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfTU9WRVRPX0FCUztcbiAgICAgICAgICAgICAgICAgY2FzZSBcIm1cIjpcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfTU9WRVRPX1JFTDtcbiAgICAgICAgICAgICAgICAgY2FzZSBcIkxcIjpcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfTElORVRPX0FCUztcbiAgICAgICAgICAgICAgICAgY2FzZSBcImxcIjpcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfTElORVRPX1JFTDtcbiAgICAgICAgICAgICAgICAgY2FzZSBcIkNcIjpcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfQ1VSVkVUT19DVUJJQ19BQlM7XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJjXCI6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0NVUlZFVE9fQ1VCSUNfUkVMO1xuICAgICAgICAgICAgICAgICBjYXNlIFwiUVwiOlxuICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19DVVJWRVRPX1FVQURSQVRJQ19BQlM7XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJxXCI6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0NVUlZFVE9fUVVBRFJBVElDX1JFTDtcbiAgICAgICAgICAgICAgICAgY2FzZSBcIkFcIjpcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfQVJDX0FCUztcbiAgICAgICAgICAgICAgICAgY2FzZSBcImFcIjpcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfQVJDX1JFTDtcbiAgICAgICAgICAgICAgICAgY2FzZSBcIkhcIjpcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfTElORVRPX0hPUklaT05UQUxfQUJTO1xuICAgICAgICAgICAgICAgICBjYXNlIFwiaFwiOlxuICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19MSU5FVE9fSE9SSVpPTlRBTF9SRUw7XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJWXCI6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0xJTkVUT19WRVJUSUNBTF9BQlM7XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJ2XCI6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0xJTkVUT19WRVJUSUNBTF9SRUw7XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJTXCI6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0NVUlZFVE9fQ1VCSUNfU01PT1RIX0FCUztcbiAgICAgICAgICAgICAgICAgY2FzZSBcInNcIjpcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfQ1VSVkVUT19DVUJJQ19TTU9PVEhfUkVMO1xuICAgICAgICAgICAgICAgICBjYXNlIFwiVFwiOlxuICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19DVVJWRVRPX1FVQURSQVRJQ19TTU9PVEhfQUJTO1xuICAgICAgICAgICAgICAgICBjYXNlIFwidFwiOlxuICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19DVVJWRVRPX1FVQURSQVRJQ19TTU9PVEhfUkVMO1xuICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19VTktOT1dOO1xuICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgU291cmNlLnByb3RvdHlwZS5fbmV4dENvbW1hbmRIZWxwZXIgPSBmdW5jdGlvbihsb29rYWhlYWQsIHByZXZpb3VzQ29tbWFuZCkge1xuICAgICAgICAgICAgICAgICAvLyBDaGVjayBmb3IgcmVtYWluaW5nIGNvb3JkaW5hdGVzIGluIHRoZSBjdXJyZW50IGNvbW1hbmQuXG4gICAgICAgICAgICAgICAgIGlmICgobG9va2FoZWFkID09IFwiK1wiIHx8IGxvb2thaGVhZCA9PSBcIi1cIiB8fCBsb29rYWhlYWQgPT0gXCIuXCIgfHwgKGxvb2thaGVhZCA+PSBcIjBcIiAmJiBsb29rYWhlYWQgPD0gXCI5XCIpKSAmJiBwcmV2aW91c0NvbW1hbmQgIT0gU1ZHUGF0aFNlZy5QQVRIU0VHX0NMT1NFUEFUSCkge1xuICAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZpb3VzQ29tbWFuZCA9PSBTVkdQYXRoU2VnLlBBVEhTRUdfTU9WRVRPX0FCUylcbiAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0xJTkVUT19BQlM7XG4gICAgICAgICAgICAgICAgICAgICBpZiAocHJldmlvdXNDb21tYW5kID09IFNWR1BhdGhTZWcuUEFUSFNFR19NT1ZFVE9fUkVMKVxuICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfTElORVRPX1JFTDtcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwcmV2aW91c0NvbW1hbmQ7XG4gICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19VTktOT1dOO1xuICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUuaW5pdGlhbENvbW1hbmRJc01vdmVUbyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAvLyBJZiB0aGUgcGF0aCBpcyBlbXB0eSBpdCBpcyBzdGlsbCB2YWxpZCwgc28gcmV0dXJuIHRydWUuXG4gICAgICAgICAgICAgICAgIGlmICghdGhpcy5oYXNNb3JlRGF0YSgpKVxuICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgIHZhciBjb21tYW5kID0gdGhpcy5wZWVrU2VnbWVudFR5cGUoKTtcbiAgICAgICAgICAgICAgICAgLy8gUGF0aCBtdXN0IHN0YXJ0IHdpdGggbW92ZVRvLlxuICAgICAgICAgICAgICAgICByZXR1cm4gY29tbWFuZCA9PSBTVkdQYXRoU2VnLlBBVEhTRUdfTU9WRVRPX0FCUyB8fCBjb21tYW5kID09IFNWR1BhdGhTZWcuUEFUSFNFR19NT1ZFVE9fUkVMO1xuICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgIC8vIFBhcnNlIGEgbnVtYmVyIGZyb20gYW4gU1ZHIHBhdGguIFRoaXMgdmVyeSBjbG9zZWx5IGZvbGxvd3MgZ2VuZXJpY1BhcnNlTnVtYmVyKC4uLikgZnJvbSBTb3VyY2UvY29yZS9zdmcvU1ZHUGFyc2VyVXRpbGl0aWVzLmNwcC5cbiAgICAgICAgICAgICAvLyBTcGVjOiBodHRwOi8vd3d3LnczLm9yZy9UUi9TVkcxMS9zaW5nbGUtcGFnZS5odG1sI3BhdGhzLVBhdGhEYXRhQk5GXG4gICAgICAgICAgICAgU291cmNlLnByb3RvdHlwZS5fcGFyc2VOdW1iZXIgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgdmFyIGV4cG9uZW50ID0gMDtcbiAgICAgICAgICAgICAgICAgdmFyIGludGVnZXIgPSAwO1xuICAgICAgICAgICAgICAgICB2YXIgZnJhYyA9IDE7XG4gICAgICAgICAgICAgICAgIHZhciBkZWNpbWFsID0gMDtcbiAgICAgICAgICAgICAgICAgdmFyIHNpZ24gPSAxO1xuICAgICAgICAgICAgICAgICB2YXIgZXhwc2lnbiA9IDE7XG5cbiAgICAgICAgICAgICAgICAgdmFyIHN0YXJ0SW5kZXggPSB0aGlzLl9jdXJyZW50SW5kZXg7XG5cbiAgICAgICAgICAgICAgICAgdGhpcy5fc2tpcE9wdGlvbmFsU3BhY2VzKCk7XG5cbiAgICAgICAgICAgICAgICAgLy8gUmVhZCB0aGUgc2lnbi5cbiAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRJbmRleCA8IHRoaXMuX2VuZEluZGV4ICYmIHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSA9PSBcIitcIilcbiAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJbmRleCsrO1xuICAgICAgICAgICAgICAgICBlbHNlIGlmICh0aGlzLl9jdXJyZW50SW5kZXggPCB0aGlzLl9lbmRJbmRleCAmJiB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPT0gXCItXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJbmRleCsrO1xuICAgICAgICAgICAgICAgICAgICAgc2lnbiA9IC0xO1xuICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJl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tdWx0aXBsaWVyID0gMTtcbiAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChzY2FuSW50UGFydEluZGV4ID49IHN0YXJ0SW50UGFydEluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgaW50ZWdlciArPSBtdWx0aXBsaWVyICogKHRoaXMuX3N0cmluZy5jaGFyQXQoc2NhbkludFBhcnRJbmRleC0tKSAtIFwiMFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICBtdWx0aXBsaWVyICo9IDEwO1xuICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgLy8gUmVhZCB0aGUgZGVjaW1hbHMuXG4gICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50SW5kZXggPCB0aGlzLl9lbmRJbmRleCAmJiB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPT0gXCIuXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJbmRleCsrO1xuXG4gICAgICAgICAgICAgICAgICAgICAvLyBUaGVyZSBtdXN0IGJlIGEgbGVhc3Qgb25lIGRpZ2l0IGZvbGxvd2luZyB0aGUgLlxuICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRJbmRleCA+PSB0aGlzLl9lbmRJbmRleCB8fCB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPCBcIjBcIiB8fCB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPiBcIjlcIilcbiAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHRoaXMuX2N1cnJlbnRJbmRleCA8IHRoaXMuX2VuZEluZGV4ICYmIHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3V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XJBdCh0aGlzLl9jdXJyZW50SW5kZXgpID09IFwiLVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEluZGV4Kys7XG4gICAgICAgICAgICAgICAgICAgICAgICAgZXhwc2lnbiA9IC0xO1xuICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAvLyBUaGVyZSBtdXN0IGJlIGFuIGV4cG9uZW50LlxuICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRJbmRleCA+PSB0aGlzLl9lbmRJbmRleCB8fCB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPCBcIjBcIiB8fCB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPiBcIjlcIilcbiAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuXG4gICAgICAgICAgICAgICAgICAgICB3aGlsZSAodGhpcy5fY3VycmVudEluZGV4IDwgdGhpcy5fZW5kSW5kZXggJiYgdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpID49IFwiMFwiICYmIHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSA8PSBcIjlcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgIGV4cG9uZW50ICo9IDEwO1xuICAgICAgICAgICAgICAgICAgICAgICAgIGV4cG9uZW50ICs9ICh0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgLSBcIjBcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEluZGV4Kys7XG4gICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICB2YXIgbnVtYmVyID0gaW50ZWdlciArIGRlY2ltYWw7XG4gICAgICAgICAgICAgICAgIG51bWJlciAqPSBzaWduO1xuXG4gICAgICAgICAgICAgICAgIGlmIChleHBvbmVudClcbiAgICAgICAgICAgICAgICAgICAgIG51bWJlciAqPSBNYXRoLnBvdygxMCwgZXhwc2lnbiAqIGV4cG9uZW50KTtcblxuICAgICAgICAgICAgICAgICBpZiAoc3RhcnRJbmRleCA9PSB0aGlzLl9jdXJyZW50SW5kZXgpXG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuXG4gICAgICAgICAgICAgICAgIHRoaXMuX3NraXBPcHRpb25hbFNwYWNlc09yRGVsaW1pdGVyKCk7XG5cbiAgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlcjtcbiAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICBTb3VyY2UucHJvdG90eXBlLl9wYXJzZUFyY0ZsYWcgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRJbmRleCA+PSB0aGlzLl9lbmRJbmRleClcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgIHZhciBmbGFnID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgIHZhciBmbGFnQ2hhciA9IHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KyspO1xuICAgICAgICAgICAgICAgICBpZiAoZmxhZ0NoYXIgPT0gXCIwXCIpXG4gICAgICAgICAgICAgICAgICAgICBmbGFnID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgIGVsc2UgaWYgKGZsYWdDaGFyID09IFwiMVwiKVxuICAgICAgICAgICAgICAgICAgICAgZmxhZyA9IHRydWU7XG4gICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG5cbiAgICAgICAgICAgICAgICAgdGhpcy5fc2tpcE9wdGlvbmFsU3BhY2VzT3JEZWxpbWl0ZXIoKTtcbiAgICAgICAgICAgICAgICAgcmV0dXJuIGZsYWc7XG4gICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgU291cmNlLnByb3RvdHlwZS5wYXJzZVNlZ21lbnQgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgdmFyIGxvb2thaGVhZCA9IHRoaXMuX3N0cmluZ1t0aGlzLl9jdXJyZW50SW5kZXhdO1xuICAgICAgICAgICAgICAgICB2YXIgY29tbWFuZCA9IHRoaXMuX3BhdGhTZWdUeXBlRnJvbUNoYXIobG9va2FoZWFkKTtcbiAgICAgICAgICAgICAgICAgaWYgKGNvbW1hbmQgPT0gU1ZHUGF0aFNlZy5QQVRIU0VHX1VOS05PV04pIHtcbiAgICAgICAgICAgICAgICAgICAgIC8vIFBvc3NpYmx5IGFuIGltcGxpY2l0IGNvbW1hbmQuIE5vdCBhbGxvd2VkIGlmIHRoaXMgaXMgdGhlIGZpcnN0IGNvbW1hbmQuXG4gICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fcHJldmlvdXNDb21tYW5kID09IFNWR1BhdGhTZWcuUEFUSFNFR19VTktOT1dOKVxuICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgY29tbWFuZCA9IHRoaXMuX25leHRDb21tYW5kSGVscGVyKGxvb2thaGVhZCwgdGhpcy5fcHJldmlvdXNDb21tYW5kKTtcbiAgICAgICAgICAgICAgICAgICAgIGlmIChjb21tYW5kID09IFNWR1BhdGhTZWcuUEFUSFNFR19VTktOT1dOKVxuICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEluZGV4Kys7XG4gICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICB0aGlzLl9wcmV2aW91c0NvbW1hbmQgPSBjb21tYW5kO1xuX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yb3cgXCJVbmtub3duIHBhdGggc2VnIHR5cGUuXCJcbiAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgIHZhciBidWlsZGVyID0gbmV3IEJ1aWxkZXIoKTtcbiAgICAgICAgICAgICB2YXIgc291cmNlID0gbmV3IFNvdXJjZShzdHJpbmcpO1xuXG4gICAgICAgICAgICAgaWYgKCFzb3VyY2UuaW5pdGlhbENvbW1hbmRJc01vdmVUbygpKVxuICAgICAgICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgICAgICAgd2hpbGUgKHNvdXJjZS5oYXNNb3JlRGF0YSgpKSB7XG4gICAgICAgICAgICAgICAgIHZhciBwYXRoU2VnID0gc291cmNlLnBhcnNlU2VnbWVudCgpO1xuICAgICAgICAgICAgICAgICBpZiAoIXBhdGhTZWcpXG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgICAgICAgICAgIGJ1aWxkZXIuYXBwZW5kU2VnbWVudChwYXRoU2VnKTtcbiAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICByZXR1cm4gYnVpbGRlci5wYXRoU2VnTGlzdDtcbiAgICAgICAgIH1cbiAgICAgfVxuICAgIH0oKSk7XG5cbiAgICAvKiBqc2hpbnQgaWdub3JlOmVuZCAqL1xuXG4gICAgaWYgKHR5cGVvZiBkZWZpbmUgPT09ICdmdW5jdGlvbicgJiYgZGVmaW5lLmFtZCkge1xuICAgICAgICBkZWZpbmUoXCJjM1wiLCBbXCJkM1wiXSwgZnVuY3Rpb24gKCkgeyByZXR1cm4gYzM7IH0pO1xuICAgIH0gZWxzZSBpZiAoJ3VuZGVmaW5lZCcgIT09IHR5cGVvZiBleHBvcnRzICYmICd1bmRlZmluZWQnICE9PSB0eXBlb2YgbW9kdWxlKSB7XG4gICAgICAgIG1vZHVsZS5leHBvcnRzID0gYzM7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgd2luZG93LmMzID0gYzM7XG4gICAgfVx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T0gbnVsbDtcblxuICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgcmVzdWx0W2luZGV4XSA9IHNraXAgPyB1bmRlZmluZWQgOiBnZXQob2JqZWN0LCBwYXRoc1tpbmRleF0pO1xuICAgICAgfVxuICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5jbGFtcGAgd2hpY2ggZG9lc24ndCBjb2VyY2UgYXJndW1lbnRzLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiBAcGFyYW0ge251bWJlcn0gbnVtYmVyIFRoZSBudW1iZXIgdG8gY2xhbXAuXG4gICAgICogQHBhcmFtIHtudW1iZXJ9IFtsb3dlcl0gVGhlIGxvd2VyIGJvdW5kLlxuICAgICAqIEBwYXJhbSB7bnVtYmVyfSB1cHBlciBUaGUgdXBwZXIgYm91bmQuXG4gICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgY2xhbXBlZCBudW1iZXIuXG4gICAgICovXG4gICAgZnVuY3Rpb24gYmFzZUNsYW1wKG51bWJlciwgbG93ZXIsIHVwcGVyKSB7XG4gICAgICBpZiAobnVtYmVyID09PSBudW1iZXIpIHtcbiAgICAgICAgaWYgKHVwcGVyICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBudW1iZXIgPSBudW1iZXIgPD0gdXBwZXIgPyBudW1iZXIgOiB1cHBlcjtcbiAgICAgICAgfVxuICAgICAgICBpZiAobG93ZXIgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIG51bWJlciA9IG51bWJlciA+PSBsb3dlciA/IG51bWJlciA6IGxvd2VyO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gbnVtYmVyO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfL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tYXNrICYgQ0xPTkVfU1lNQk9MU19GTEFHO1xuXG4gICAgICBpZiAoY3VzdG9taXplcikge1xuICAgICAgICByZXN1bHQgPSBvYmplY3QgPyBjdXN0b21pemVyKHZhbHVlLCBrZXksIG9iamVjdCwgc3RhY2spIDogY3VzdG9taXplcih2YWx1ZSk7XG4gICAgICB9XG4gICAgICBpZiAocmVzdWx0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgIH1cbiAgICAgIGlmICghaXNPYmplY3QodmFsdWUpKSB7XG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICAgIH1cbiAgICAgIHZhciBpc0FyciA9IGlzQXJyYXkodmFsdWUpO1xuICAgICAgaWYgKGlzQXJyKSB7XG4gICAgICAgIHJlc3VsdCA9IGluaXRDbG9uZUFycmF5KHZhbHVlKTtcbiAgICAgICAgaWYgKCFpc0RlZXApIHtcbiAgICAgICAgICByZXR1cm4gY29weUFycmF5KHZhbHVlLCByZXN1bHQpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgdGFnID0gZ2V0VGFnKHZhbHVlKSxcbiAgICAgICAgICAgIGlzRnVuYyA9IHRhZyA9PSBmdW5jVGFnIHx8IHRhZyA9PSBnZW5UYWc7XG5cbiAgICAgICAgaWYgKGlzQnVmZmVyKHZhbHVlKSkge1xuICAgICAgICAgIHJldHVybiBjbG9uZUJ1ZmZlcih2YWx1ZSwgaXNEZWVwKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodGFnID09IG9iamVjdFRhZyB8fCB0YWcgPT0gYXJnc1RhZyB8fCAoaXNGdW5jICYmICFvYmplY3QpKSB7XG4gICAgICAgICAgcmVzdWx0ID0gKGlzRmxhdCB8fCBpc0Z1bmMpID8ge30gOiBpbml0Q2xvbmVPYmplY3QodmFsdWUpO1xuICAgICAgICAgIGlmICghaXNEZWVwKSB7XG4gICAgICAgICAgICByZXR1cm4gaXNGbGF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HZhbHVlO1xuXG4gICAgICAgIHZhbHVlID0gKGNvbXBhcmF0b3IgfHwgdmFsdWUgIT09IDApID8gdmFsdWUgOiAwO1xuICAgICAgICBpZiAoIShzZWVuXG4gICAgICAgICAgICAgID8gY2FjaGVIYXMoc2VlbiwgY29tcHV0ZWQpXG4gICAgICAgICAgICAgIDogaW5jbHVkZXMocmVzdWx0LCBjb21wdXRlZCwgY29tcGFyYXRvcilcbiAgICAgICAgICAgICkpIHtcbiAgICAgICAgICBvdGhJbmRleCA9IG90aExlbmd0aDtcbiAgICAgICAgICB3aGlsZSAoLS1vdGhJbmRleCkge1xuICAgICAgICAgICAgdmFyIGNhY2hlID0gY2FjaGVzW290aEluZGV4XTtcbiAgICAgICAgICAgIGlmICghKGNhY2hlXG4gICAgICAgICAgICAgICAgICA/IGNhY2hlSGFzKGNhY2hlLCBjb21wdXRlZClcbiAgICAgICAgICAgICAgICAgIDogaW5jbHVkZXMoYXJyYXlzW290aEluZGV4XSwgY29tcHV0ZWQsIGNvbXBhcmF0b3IpKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICBjb250aW51ZSBvdXRlcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKHNlZW4pIHtcbiAgICAgICAgICAgIHNlZW4ucHVzaChjb21wdXRlZCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJlc3VsdC5wdXNoKHZhbHVlKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy5pbnZlcnRgIGFuZCBgXy5pbnZlcnRCeWAgd2hpY2ggaW52ZXJ0c1xuICAgICAqIGBvYmplY3RgIHdpdGggdmFsdWVzIHRyYW5zZm9ybWVkIGJ5IGBpdGVyYXRlZWAgYW5kIHNldCBieSBgc2V0dGVyYC5cbiAgICAgKlx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byBjdXN0b21pemUgY29tcGFyaXNvbnMuXG4gICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGBvYmplY3RgIGlzIGEgbWF0Y2gsIGVsc2UgYGZhbHNlYC5cbiAgICAgKi9cbiAgICBmdW5jdGlvbiBiYXNlSXNNYXRjaChvYmplY3QsIHNvdXJjZSwgbWF0Y2hEYXRhLCBjdXN0b21pemVyKSB7XG4gICAgICB2YXIgaW5kZXggPSBtYXRjaERhdGEubGVuZ3RoLFxuICAgICAgICAgIGxlbmd0aCA9IGluZGV4LFxuICAgICAgICAgIG5vQ3VzdG9taXplciA9ICFjdXN0b21pemVyO1xuXG4gICAgICBpZiAob2JqZWN0ID09IG51bGwpIHtcbiAgICAgICAgcmV0dXJuICFsZW5ndGg7XG4gICAgICB9XG4gICAgICBvYmplY3QgPSBPYmplY3Qob2JqZWN0KTtcbiAgICAgIHdoaWxlIChpbmRleC0tKSB7XG4gICAgICAgIHZhciBkYXRhID0gbWF0Y2hEYXRhW2luZGV4XTtcbiAgICAgICAgaWYgKChub0N1c3RvbWl6ZXIgJiYgZGF0YVsyXSlcbiAgICAgICAgICAgICAgPyBkYXRhWzFdICE9PSBvYmplY3RbZGF0YVswXV1cbiAgICAgICAgICAgICAgOiAhKGRhdGFbMF0gaW4gb2JqZWN0KVxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICBkYXRhID0gbWF0Y2hEYXRhW2luZGV4XTtcbiAgICAgICAgdmFyIGtleSA9IGRhdGFbMF0sXG4gICAgICAgICAgICBvYmpWYWx1ZSA9IG9iamVjdFtrZXldLFxuICAgICAgICAgICAgc3JjVmFsdWUgPSBkYXRhWzFdO1xuXG4gICAgICAgIGlmIChub0N1c3RvbWl6ZXIgJiYgZGF0YVsyXSkge1xuICAgICAgICAgIGlm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IChzdGFja2VkICYmIHN0YWNrLmdldChvdGhlcikpIHtcbiAgICAgICAgcmV0dXJuIHN0YWNrZWQgPT0gb3RoZXI7XG4gICAgICB9XG4gICAgICB2YXIgaW5kZXggPSAtMSxcbiAgICAgICAgICByZXN1bHQgPSB0cnVlLFxuICAgICAgICAgIHNlZW4gPSAoYml0bWFzayAmIENPTVBBUkVfVU5PUkRFUkVEX0ZMQUcpID8gbmV3IFNldENhY2hlIDogdW5kZWZpbmVkO1xuXG4gICAgICBzdGFjay5zZXQoYXJyYXksIG90aGVyKTtcbiAgICAgIHN0YWNrLnNldChvdGhlciwgYXJyYXkpO1xuXG4gICAgICAvLyBJZ25vcmUgbm9uLWluZGV4IHByb3BlcnRpZXMuXG4gICAgICB3aGlsZSAoKytpbmRleCA8IGFyckxlbmd0aCkge1xuICAgICAgICB2YXIgYXJyVmFsdWUgPSBhcnJheVtpbmRleF0sXG4gICAgICAgICAgICBvdGhWYWx1ZSA9IG90aGVyW2luZGV4XTtcblxuICAgICAgICBpZiAoY3VzdG9taXplcikge1xuICAgICAgICAgIHZhciBjb21wYXJlZCA9IGlzUGFydGlhbFxuICAgICAgICAgICAgPyBjdXN0b21pemVyKG90aFZhbHVlLCBhcnJWYWx1ZSwgaW5kZXgsIG90aGVyLCBhcnJheSwgc3RhY2spXG4gICAgICAgICAgICA6IGN1c3RvbWl6ZXIoYXJyVmFsdWUsIG90aFZhbHVlLCBpbmRleCwgYXJyYXksIG90aGVyLCBzdGFjayk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGNvbXBhcmVkICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICBpZiAoY29tcGFyZWQpIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXN1bHQgPSBmYWxzZTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICAvLyBSZWN1cnNpdmVseSBjb21wYXJlIGFycmF5cyAoc3VzY2VwdGl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biAgICBmdW5jdGlvbiBlcXVhbEJ5VGFnKG9iamVjdCwgb3RoZXIsIHRhZywgYml0bWFzaywgY3VzdG9taXplciwgZXF1YWxGdW5jLCBzdGFjaykge1xuICAgICAgc3dpdGNoICh0YWcpIHtcbiAgICAgICAgY2FzZSBkYXRhVmlld1RhZzpcbiAgICAgICAgICBpZiAoKG9iamVjdC5ieXRlTGVuZ3RoICE9IG90aGVyLmJ5dGVMZW5ndGgpIHx8XG4gICAgICAgICAgICAgIChvYmplY3QuYnl0ZU9mZnNldCAhPSBvdGhlci5ieXRlT2Zmc2V0KSkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgIH1cbiAgICAgICAgICBvYmplY3QgPSBvYmplY3QuYnVmZmVyO1xuICAgICAgICAgIG90aGVyID0gb3RoZXIuYnVmZmVyO1xuXG4gICAgICAgIGNhc2UgYXJyYXlCdWZmZXJUYWc6XG4gICAgICAgICAgaWYgKChvYmplY3QuYnl0ZUxlbmd0aCAhPSBvdGhlci5ieXRlTGVuZ3RoKSB8fFxuICAgICAgICAgICAgICAhZXF1YWxGdW5jKG5ldyBVaW50OEFycmF5KG9iamVjdCksIG5ldyBVaW50OEFycmF5KG90aGVyKSkpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHRydWU7XG5cbiAgICAgICAgY2FzZSBib29sVGFnOlxuICAgICAgICBjYXNlIGRhdGVUYWc6XG4gICAgICAgIGNhc2UgbnVtYmVyVGFnOlxuICAgICAgICAgIC8vIENvZXJjZSBib29sZWFucyB0byBgMWAgb3IgYDBgIGFuZCBkYXRlcyB0byBtaWxsaXNlY29uZHMuXG4gICAgICAgICAgLy8gSW52YWxpZCBkYXRlcyBhcmUgY29lcmNlZCB0byBgTmFOYC5cbiAgICAgICAgICByZXR1cm4gZXEoK29iamVjdCwgK290aGVyKTtcblxuICAgICAgICBjYXNlIGVycm9yVGFnOlxuICAg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pIHtcbiAgICAgICAgdmFyIGtleSA9IG9ialByb3BzW2luZGV4XTtcbiAgICAgICAgaWYgKCEoaXNQYXJ0aWFsID8ga2V5IGluIG90aGVyIDogaGFzT3duUHJvcGVydHkuY2FsbChvdGhlciwga2V5KSkpIHtcbiAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIC8vIEFzc3VtZSBjeWNsaWMgdmFsdWVzIGFyZSBlcXVhbC5cbiAgICAgIHZhciBzdGFja2VkID0gc3RhY2suZ2V0KG9iamVjdCk7XG4gICAgICBpZiAoc3RhY2tlZCAmJiBzdGFjay5nZXQob3RoZXIpKSB7XG4gICAgICAgIHJldHVybiBzdGFja2VkID09IG90aGVyO1xuICAgICAgfVxuICAgICAgdmFyIHJlc3VsdCA9IHRydWU7XG4gICAgICBzdGFjay5zZXQob2JqZWN0LCBvdGhlcik7XG4gICAgICBzdGFjay5zZXQob3RoZXIsIG9iamVjdCk7XG5cbiAgICAgIHZhciBza2lwQ3RvciA9IGlzUGFydGlhbDtcbiAgICAgIHdoaWxlICgrK2luZGV4IDwgb2JqTGVuZ3RoKSB7XG4gICAgICAgIGtleSA9IG9ialByb3BzW2luZGV4XTtcbiAgICAgICAgdmFyIG9ialZhbHVlID0gb2JqZWN0W2tleV0sXG4gICAgICAgICAgICBvdGhWYWx1ZSA9IG90aGVyW2tleV07XG5cbiAgICAgICAgaWYgKGN1c3RvbWl6ZXIpIHtcbiAgICAgICAgICB2YXIgY29tcGFyZWQgPSBpc1BhcnRpYWxcbiAgICAgICAgICAgID8gY3VzdG9taXplcihvdGhWYWx1ZSwgb2JqVmFsdWUsIGtleSwgb3RoZXIsIG9iamVjdCwgc3RhY2spXG4gICAgICAgICAgICA6IGN1c3RvbWl6ZXIob2JqVmFsdWUsIG90aFZhbHVlLCBrZXksIG9iamVjdCwgb3RoZXIsIHN0YWNrKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBSZWN1cnNpdmVseSBjb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gIH0gZWxzZSB7XG4gICAgICAgICAgY291bnQgPSAwO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmdW5jLmFwcGx5KHVuZGVmaW5lZCwgYXJndW1lbnRzKTtcbiAgICAgIH07XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQSBzcGVjaWFsaXplZCB2ZXJzaW9uIG9mIGBfLnNodWZmbGVgIHdoaWNoIG11dGF0ZXMgYW5kIHNldHMgdGhlIHNpemUgb2YgYGFycmF5YC5cbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIHNodWZmbGUuXG4gICAgICogQHBhcmFtIHtudW1iZXJ9IFtzaXplPWFycmF5Lmxlbmd0aF0gVGhlIHNpemUgb2YgYGFycmF5YC5cbiAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgYGFycmF5YC5cbiAgICAgKi9cbiAgICBmdW5jdGlvbiBzaHVmZmxlU2VsZihhcnJheSwgc2l6ZSkge1xuICAgICAgdmFyIGluZGV4ID0gLTEsXG4gICAgICAgICAgbGVuZ3RoID0gYXJyYXkubGVuZ3RoLFxuICAgICAgICAgIGxhc3RJbmRleCA9IGxlbmd0aCAtIDE7XG5cbiAgICAgIHNpemUgPSBzaXplID09PSB1bmRlZmluZWQgPyBsZW5ndGggOiBzaXplO1xuICAgICAgd2hpbGUgKCsraW5kZXggPCBzaXplKSB7XG4gICAgICAgIHZhciByYW5kID0gYmFzZVJhbmRvbShpbmRleCwgbGFzdEluZGV4KSxcbiAgICAgICAgICAgIHZhbHVlID0gYXJyYXlbcmFuZF07XG5cbiAgICAgICAgYXJyYXlbcmFuZF0gPSBhcnJheVtpbmRleF07XG4gICAgICAgIGFycmF5W2luZGV4XSA9IHZhbHVlO1xuICAgICAgfVxuICAgICAgYXJyYXkubGVuZ3RoID0gc2l6ZTtcbiAgICAgIHJldHVybiBhcnJheTtcbiAgICB9XG5cbiAgICA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YXRlZ29yeSBBcnJheVxuICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBjb25jYXRlbmF0ZS5cbiAgICAgKiBAcGFyYW0gey4uLip9IFt2YWx1ZXNdIFRoZSB2YWx1ZXMgdG8gY29uY2F0ZW5hdGUuXG4gICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBuZXcgY29uY2F0ZW5hdGVkIGFycmF5LlxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiB2YXIgYXJyYXkgPSBbMV07XG4gICAgICogdmFyIG90aGVyID0gXy5jb25jYXQoYXJyYXksIDIsIFszXSwgW1s0XV0pO1xuICAgICAqXG4gICAgICogY29uc29sZS5sb2cob3RoZXIpO1xuICAgICAqIC8vID0+IFsxLCAyLCAzLCBbNF1dXG4gICAgICpcbiAgICAgKiBjb25zb2xlLmxvZyhhcnJheSk7XG4gICAgICogLy8gPT4gWzFdXG4gICAgICovXG4gICAgZnVuY3Rpb24gY29uY2F0KCkge1xuICAgICAgdmFyIGxlbmd0aCA9IGFyZ3VtZW50cy5sZW5ndGg7XG4gICAgICBpZiAoIWxlbmd0aCkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICB2YXIgYXJncyA9IEFycmF5KGxlbmd0aCAtIDEpLFxuICAgICAgICAgIGFycmF5ID0gYXJndW1lbnRzWzBdLFxuICAgICAgICAgIGluZGV4ID0gbGVuZ3RoO1xuXG4gICAgICB3aGlsZSAoaW5kZXgtLSkge1xuICAgICAgICBhcmdzW2luZGV4IC0gMV0gPSBhcmd1bWVudHNbaW5kZXhdO1xuICAgICAgfVxuICAgICAgcmV0dXJuIGFycmF5UHVzaChpc0FycmF5KGFycmF5KSA/IGNvcHlBcnJheShhcnJheSkgOiBbYXJyYXldLCBiYXNlRmxhdHRlbihhcmdzLCAxKSk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQ3JlYXRlcyBhbiBhcnJheSBvZi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AgKlxuICAgICAqIGZ1bmN0aW9uIHNxdWFyZShuKSB7XG4gICAgICogICByZXR1cm4gbiAqIG47XG4gICAgICogfVxuICAgICAqXG4gICAgICogdmFyIHdyYXBwZWQgPSBfKFsxLCAyXSkubWFwKHNxdWFyZSk7XG4gICAgICogdmFyIG90aGVyID0gd3JhcHBlZC5wbGFudChbMywgNF0pO1xuICAgICAqXG4gICAgICogb3RoZXIudmFsdWUoKTtcbiAgICAgKiAvLyA9PiBbOSwgMTZdXG4gICAgICpcbiAgICAgKiB3cmFwcGVkLnZhbHVlKCk7XG4gICAgICogLy8gPT4gWzEsIDRdXG4gICAgICovXG4gICAgZnVuY3Rpb24gd3JhcHBlclBsYW50KHZhbHVlKSB7XG4gICAgICB2YXIgcmVzdWx0LFxuICAgICAgICAgIHBhcmVudCA9IHRoaXM7XG5cbiAgICAgIHdoaWxlIChwYXJlbnQgaW5zdGFuY2VvZiBiYXNlTG9kYXNoKSB7XG4gICAgICAgIHZhciBjbG9uZSA9IHdyYXBwZXJDbG9uZShwYXJlbnQpO1xuICAgICAgICBjbG9uZS5fX2luZGV4X18gPSAwO1xuICAgICAgICBjbG9uZS5fX3ZhbHVlc19fID0gdW5kZWZpbmVkO1xuICAgICAgICBpZiAocmVzdWx0KSB7XG4gICAgICAgICAgcHJldmlvdXMuX193cmFwcGVkX18gPSBjbG9uZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXN1bHQgPSBjbG9uZTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgcHJldmlvdXMgPSBjbG9uZTtcbiAgICAgICAgcGFyZW50ID0gcGFyZW50Ll9fd3JhcHBlZF9fO1xuICAgICAgfVxuICAgICAgcHJldmlvdXMuX193cmFwcGVkX18gPSB2YWx1ZTtcbiAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogVGhpcyBtZXRob2QgaXMgdGhlIHdyYXBwZXIgdmVyc2lvbiBvZiBgXy5yZXZlcnNlYC5cbiAgICAgKlxuICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBtdXRhdGVzIHRoZSB3cmFwcGVkIGFycmF5LlxuICAgICAqXG4gICAgICogQG5hbWUgcmV2ZXJzZVxuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQHNpbmNlIDAuMS4wXG4gICAgICogQGNhdGVnb3J5IFNlcVxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhlIG5ldyBgbG9kYXNoYCB3cmFwcGVyIGluc3RhbmNlLlxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiB2YXIgYXJyYXkgPSBbMSwgMiwgM107XG4gICAgICpcbiAgICAgKiBfKGFycmF5KS5yZXZlcnNlKCkudmFsdWUoKVxuICAgICAqIC8vID0+IFszLCAyLCAxXVxuICAgICAqXG4gICAgICogY29uc29sZS5sb2coYXJyYXkpO1xuICAgICAqIC8vID0+IFszLCAyLCAxXVxuICAgICAqL1xuICAgIGZ1bmN0aW9uIHdyYXBwZXJSZXZlcnNlKCkge1xuICAgICAgdmFyIHZhbHVlID0gdGhpcy5fX3dyYXBwZWRfXztcbiAgICAgIGlmICh2YWx1ZSBpbnN0YW5jZW9mIExhenlXcmFwcGVyKSB7XG4gICAgICAgIHZhciB3cmFwcGVkID0gdmFsdWU7XG4gICAgICAgIGlmICh0aGlzLl9fYWN0aW9uc19fLmxlbmd0aCkge1xuICAgICAgICAgIHdyYXBwZWQgPSBuZXcgTGF6eVdyYXBwZXIodGhpcyk7XG4gICAgICAgIH1cbiAgICAgICAgd3JhcHBlZCA9IHdyYXBwZWQucmV2ZXJzZSgpO1xuICAgICAgICB3cmFwcGVkLl9fYWN0aW9uc19fLnB1c2goe1xuICAgICAgICAgICdmdW5jJzogdGhydSxcbiAgICAgICAgICAnYXJncyc6IFtyZXZlcnNlXSxcbiAgICAgICAgICAndGhpc0FyZyc6IHVuZGVmaW5lZFxuICAgICAgICB9KTtcbiAgICAgICAgcm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dGhpcztcbiAgICAgICAgbGFzdENhbGxUaW1lID0gdGltZTtcblxuICAgICAgICBpZiAoaXNJbnZva2luZykge1xuICAgICAgICAgIGlmICh0aW1lcklkID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHJldHVybiBsZWFkaW5nRWRnZShsYXN0Q2FsbFRpbWUpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAobWF4aW5nKSB7XG4gICAgICAgICAgICAvLyBIYW5kbGUgaW52b2NhdGlvbnMgaW4gYSB0aWdodCBsb29wLlxuICAgICAgICAgICAgdGltZXJJZCA9IHNldFRpbWVvdXQodGltZXJFeHBpcmVkLCB3YWl0KTtcbiAgICAgICAgICAgIHJldHVybiBpbnZva2VGdW5jKGxhc3RDYWxsVGltZSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICh0aW1lcklkID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICB0aW1lcklkID0gc2V0VGltZW91dCh0aW1lckV4cGlyZWQsIHdhaXQpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICB9XG4gICAgICBkZWJvdW5jZWQuY2FuY2VsID0gY2FuY2VsO1xuICAgICAgZGVib3VuY2VkLmZsdXNoID0gZmx1c2g7XG4gICAgICByZXR1cm4gZGVib3VuY2VkO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIERlZmVycyBpbnZva2luZyB0aGUgYGZ1bmNgIHVudGlsIHRoZSBjdXJyZW50IGNhbGwgc3RhY2sgaGFzIGNsZWFyZWQuIEFueVxuICAgICAqIGFkZGl0aW9uYWwgYXJndW1lbnRzIGFyZSBwcm92aWRlZCB0byBgZnVuY2Agd2hlbiBpdCdzIGludm9rZWQuXG4gICAgICpcbiAgICAgKiBAc3RhdGljXG4gICAgICogQG1lbWJlck9mIF9cbiAgICAgKiBAc2luY2UgMC4xLjBcbiAgICAgKiBAY2F0ZWdvcnkgRnVuY3Rpb25cbiAgICAgKi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ICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBkZXN0aW5hdGlvbiBvYmplY3QuXG4gICAgICogQHBhcmFtIHsuLi5PYmplY3R9IFtzb3VyY2VzXSBUaGUgc291cmNlIG9iamVjdHMuXG4gICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBgb2JqZWN0YC5cbiAgICAgKiBAc2VlIF8uYXNzaWduSW5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogZnVuY3Rpb24gRm9vKCkge1xuICAgICAqICAgdGhpcy5hID0gMTtcbiAgICAgKiB9XG4gICAgICpcbiAgICAgKiBmdW5jdGlvbiBCYXIoKSB7XG4gICAgICogICB0aGlzLmMgPSAzO1xuICAgICAqIH1cbiAgICAgKlxuICAgICAqIEZvby5wcm90b3R5cGUuYiA9IDI7XG4gICAgICogQmFyLnByb3RvdHlwZS5kID0gNDtcbiAgICAgKlxuICAgICAqIF8uYXNzaWduKHsgJ2EnOiAwIH0sIG5ldyBGb28sIG5ldyBCYXIpO1xuICAgICAqIC8vID0+IHsgJ2EnOiAxLCAnYyc6IDMgfVxuICAgICAqL1xuICAgIHZhciBhc3NpZ24gPSBjcmVhdGVBc3NpZ25lcihmdW5jdGlvbihvYmplY3QsIHNvdXJjZSkge1xuICAgICAgaWYgKGlzUHJvdG90eXBlKHNvdXJjZSkgfHwgaXNBcnJheUxpa2Uoc291cmNlKSkge1xuICAgICAgICBjb3B5T2JqZWN0KHNvdXJjZSwga2V5cyhzb3VyY2UpLCBvYmplY3QpO1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG4gICAgICBmb3IgKHZhciBrZXkgaW4gc291cmNlKSB7XG4gICAgICAgIGlmIChoYXNPd25Qcm9wZXJ0eS5jYWxsKHNvdXJjZSwga2V5KSkge1xuICAgICAgICAgIGFzc2lnblZhbHVlKG9iamVjdCwga2V5LCBzb3VyY2Vba2V5XSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9KTtcblxuIC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biAgICAgIC8vIEZyYW1lIGNvZGUgYXMgdGhlIGZ1bmN0aW9uIGJvZHkuXG4gICAgICBzb3VyY2UgPSAnZnVuY3Rpb24oJyArICh2YXJpYWJsZSB8fCAnb2JqJykgKyAnKSB7XFxuJyArXG4gICAgICAgICh2YXJpYWJsZVxuICAgICAgICAgID8gJydcbiAgICAgICAgICA6ICdvYmogfHwgKG9iaiA9IHt9KTtcXG4nXG4gICAgICAgICkgK1xuICAgICAgICBcInZhciBfX3QsIF9fcCA9ICcnXCIgK1xuICAgICAgICAoaXNFc2NhcGluZ1xuICAgICAgICAgICA/ICcsIF9fZSA9IF8uZXNjYXBlJ1xuICAgICAgICAgICA6ICcnXG4gICAgICAgICkgK1xuICAgICAgICAoaXNFdmFsdWF0aW5nXG4gICAgICAgICAgPyAnLCBfX2ogPSBBcnJheS5wcm90b3R5cGUuam9pbjtcXG4nICtcbiAgICAgICAgICAgIFwiZnVuY3Rpb24gcHJpbnQoKSB7IF9fcCArPSBfX2ouY2FsbChhcmd1bWVudHMsICcnKSB9XFxuXCJcbiAgICAgICAgICA6ICc7XFxuJ1xuICAgICAgICApICtcbiAgICAgICAgc291cmNlICtcbiAgICAgICAgJ3JldHVybiBfX3BcXG59JztcblxuICAgICAgdmFyIHJlc3VsdCA9IGF0dGVtcHQoZnVuY3Rpb24oKSB7XG4gICAgICAgIHJldHVybiBGdW5jdGlvbihpbXBvcnRzS2V5cywgc291cmNlVVJMICsgJ3JldHVybiAnICsgc291cmNlKVxuICAgICAgICAgIC5hcHBseSh1bmRlZmluZWQsIGltcG9ydHNWYWx1ZXMpO1xuICAgICAgfSk7XG5cbiAgICAgIC8vIFByb3ZpZGUgdGhlIGNvbXBpbGVkIGZ1bmN0aW9uJ3Mgc291cmNlIGJ5IGl0cyBgdG9TdHJpbmdgIG1ldGhvZCBvclxuICAgICAgLy8gdGhlIGBzb3VyY2VgIHByb3BlcnR5IGFzIGEgY29udmVuaWVuY2UgZm9yIGlubGluaW5nIGNvbXB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zIFRoZSBvYmplY3QgbWV0aG9kIG5hbWVzIHRvIGJpbmQuXG4gICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBgb2JqZWN0YC5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogdmFyIHZpZXcgPSB7XG4gICAgICogICAnbGFiZWwnOiAnZG9jcycsXG4gICAgICogICAnY2xpY2snOiBmdW5jdGlvbigpIHtcbiAgICAgKiAgICAgY29uc29sZS5sb2coJ2NsaWNrZWQgJyArIHRoaXMubGFiZWwpO1xuICAgICAqICAgfVxuICAgICAqIH07XG4gICAgICpcbiAgICAgKiBfLmJpbmRBbGwodmlldywgWydjbGljayddKTtcbiAgICAgKiBqUXVlcnkoZWxlbWVudCkub24oJ2NsaWNrJywgdmlldy5jbGljayk7XG4gICAgICogLy8gPT4gTG9ncyAnY2xpY2tlZCBkb2NzJyB3aGVuIGNsaWNrZWQuXG4gICAgICovXG4gICAgdmFyIGJpbmRBbGwgPSBmbGF0UmVzdChmdW5jdGlvbihvYmplY3QsIG1ldGhvZE5hbWVzKSB7XG4gICAgICBhcnJheUVhY2gobWV0aG9kTmFtZXMsIGZ1bmN0aW9uKGtleSkge1xuICAgICAgICBrZXkgPSB0b0tleShrZXkpO1xuICAgICAgICBiYXNlQXNzaWduVmFsdWUob2JqZWN0LCBrZXksIGJpbmQob2JqZWN0W2tleV0sIG9iamVjdCkpO1xuICAgICAgfSk7XG4gICAgICByZXR1cm4gb2JqZWN0O1xuICAgIH0pO1xuXG4gICAgLyoqXG4gICAgICogQ3JlYXRlcyBhIGZ1bmN0aW9uIHRoYXQgaXRlcmF0ZXMgb3ZlciBgcGFpcnNgIGFuZCBpbnZva2VzIHRoZSBjb3JyZXNwb25kaW5nXG4gICAgICogZnVuY3Rpb24gb2YgdGhlIGZpcnN0IHByZWRpY2F0ZSB0byByZXR1cm4gdHJ1dGh5LiBUaGUgcHJlZGljYXRlLWZ1bmN0aW9uXG4gICAgICogcGFpcnMgYXJlIGludm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XG4gICAgdmFyIGRpdmlkZSA9IGNyZWF0ZU1hdGhPcGVyYXRpb24oZnVuY3Rpb24oZGl2aWRlbmQsIGRpdmlzb3IpIHtcbiAgICAgIHJldHVybiBkaXZpZGVuZCAvIGRpdmlzb3I7XG4gICAgfSwgMSk7XG5cbiAgICAvKipcbiAgICAgKiBDb21wdXRlcyBgbnVtYmVyYCByb3VuZGVkIGRvd24gdG8gYHByZWNpc2lvbmAuXG4gICAgICpcbiAgICAgKiBAc3RhdGljXG4gICAgICogQG1lbWJlck9mIF9cbiAgICAgKiBAc2luY2UgMy4xMC4wXG4gICAgICogQGNhdGVnb3J5IE1hdGhcbiAgICAgKiBAcGFyYW0ge251bWJlcn0gbnVtYmVyIFRoZSBudW1iZXIgdG8gcm91bmQgZG93bi5cbiAgICAgKiBAcGFyYW0ge251bWJlcn0gW3ByZWNpc2lvbj0wXSBUaGUgcHJlY2lzaW9uIHRvIHJvdW5kIGRvd24gdG8uXG4gICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgcm91bmRlZCBkb3duIG51bWJlci5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogXy5mbG9vcig0LjAwNik7XG4gICAgICogLy8gPT4gNFxuICAgICAqXG4gICAgICogXy5mbG9vcigwLjA0NiwgMik7XG4gICAgICogLy8gPT4gMC4wNFxuICAgICAqXG4gICAgICogXy5mbG9vcig0MDYwLCAtMik7XG4gICAgICogLy8gPT4gNDAwMFxuICAgICAqL1xuICAgIHZhciBmbG9vciA9IGNyZWF0ZVJvdW5kKCdmbG9vcicpO1xuXG4gICAgLyoqXG4gICAgICogQ29tcHV0ZXMgdGhlIG1heGltdW0gdmFsdWUgb2YgYGFycmF5YC4gSWYgYGFycmF5YCBpcyBlbXB0eSBvciBmYWxzZXksXG4gICAgICogYHVuZGVmaW5lZGAgaXMgcmV0dXJuZWQuXG4gICAgICpcbiAgICAgKiBAc3RhdGljXG4gICAgICogQHNpbmNlIDAuMS4wXG4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0OlxuICAgICAgICAgICAgY2FsbGJhY2suYXBwbHkodW5kZWZpbmVkLCBhcmdzKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gcnVuSWZQcmVzZW50KGhhbmRsZSkge1xuICAgICAgICAvLyBGcm9tIHRoZSBzcGVjOiBcIldhaXQgdW50aWwgYW55IGludm9jYXRpb25zIG9mIHRoaXMgYWxnb3JpdGhtIHN0YXJ0ZWQgYmVmb3JlIHRoaXMgb25lIGhhdmUgY29tcGxldGVkLlwiXG4gICAgICAgIC8vIFNvIGlmIHdlJ3JlIGN1cnJlbnRseSBydW5uaW5nIGEgdGFzaywgd2UnbGwgbmVlZCB0byBkZWxheSB0aGlzIGludm9jYXRpb24uXG4gICAgICAgIGlmIChjdXJyZW50bHlSdW5uaW5nQVRhc2spIHtcbiAgICAgICAgICAgIC8vIERlbGF5IGJ5IGRvaW5nIGEgc2V0VGltZW91dC4gc2V0SW1tZWRpYXRlIHdhcyB0cmllZCBpbnN0ZWFkLCBidXQgaW4gRmlyZWZveCA3IGl0IGdlbmVyYXRlZCBhXG4gICAgICAgICAgICAvLyBcInRvbyBtdWNoIHJlY3Vyc2lvblwiIGVycm9yLlxuICAgICAgICAgICAgc2V0VGltZW91dChydW5JZlByZXNlbnQsIDAsIGhhbmRsZSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgdGFzayA9IHRhc2tzQnlIYW5kbGVbaGFuZGxlXTtcbiAgICAgICAgICAgIGlmICh0YXNrKSB7XG4gICAgICAgICAgICAgICAgY3VycmVudGx5UnVubmluZ0FUYXNrID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBydW4odGFzayk7XG4gICAgICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJJbW1lZGlhdGUoaGFuZGxlKTtcbiAgICAgICAgICAgIC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Jhd2xlciAoaHR0cDovL2xpc3RpbmcueWFob28uY28uanAvc3VwcG9ydC9mYXEvJykgPj0gMFxuICAgICAgICAgICAgfHwgdWEuaW5kZXhPZignY3Jhd2xlciAoaHR0cDovL2hlbHAueWFob28uY28uanAvaGVscC9qcC8nKSA+PSAwKSB7XG4gICAgICAgICAgdXBkYXRlTWFwKHJlc3VsdCwgZGF0YXNldC5nZXQoJ1lhaG9vSlAnKSk7XG4gICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHVhLmluZGV4T2YoJ1khSi1CUlovWUFUU0hBIGNyYXdsZXInKSA+PSAwXG4gICAgICAgICAgICB8fCB1YS5pbmRleE9mKCdZIUotQlJZL1lBVFNIIGNyYXdsZXInKSA+PSAwKSB7XG4gICAgICAgICAgdXBkYXRlTWFwKHJlc3VsdCwgZGF0YXNldC5nZXQoJ1lhaG9vSlAnKSk7XG4gICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHVhLmluZGV4T2YoJ1lhaG9vIFBpcGVzJykgPj0gMCkge1xuICAgICAgICAgIHVwZGF0ZU1hcChyZXN1bHQsIGRhdGFzZXQuZ2V0KCdZYWhvb1BpcGVzJykpO1xuICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAodWEuaW5kZXhPZignbXNuYm90JykgPj0gMCkge1xuICAgICAgICB1cGRhdGVNYXAocmVzdWx0LCBkYXRhc2V0LmdldCgnbXNuYm90JykpO1xuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh1YS5pbmRleE9mKCdiaW5nYm90JykgPj0gMCkge1xuICAgICAgICBpZiAodWEuaW5kZXhPZignY29tcGF0aWJsZTsgYmluZ2JvdCcpID49IDApIHtcbiAgICAgICAgICB1cGRhdGVNYXAocmVzdWx0LCBkYXRhc2V0LmdldCgnYmluZ2JvdCcpKTtc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GhlZSA9IHdvb3RoZWU7XG4gIH1cbn0pKCk7XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL34vd29vdGhlZS9yZWxlYXNlL3dvb3RoZWUuanNcbi8vIG1vZHVsZSBpZCA9IDE1NFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vaW5kZXguYnVuZGxlLmpzIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBmNTM0Zjk5ZWU2OGZhMmRmMzM0MSIsIndlYnBhY2s6Ly8vLi9zcmMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vLy4vfi9tb21lbnQvbW9tZW50LmpzIiwid2VicGFjazovLy8uL34vYXhpb3MvbGliL3V0aWxzLmpzIiwid2VicGFjazovLy8uL34vcmlvdC9yaW90LmpzIiwid2VicGFjazovLy8uL34vcHJvY2Vzcy9icm93c2VyLmpzIiwid2VicGFjazovLy8uL34vYXhpb3MvbGliL2FkYXB0ZXJzL3hoci5qcyIsIndlYnBhY2s6Ly8vLi9+L2F4aW9zL2xpYi9jb3JlL2NyZWF0ZUVycm9yLmpzIiwid2VicGFjazovLy8uL34vYXhpb3MvbGliL2hlbHBlcnMvYmluZC5qcyIsIndlYnBhY2s6Ly8vLi9+L2QzL2QzLmpzIiwid2VicGFjazovLy8uL34vbW9tZW50L2xvY2FsZS9hZi5qcyIsIndlYnBhY2s6Ly8vLi9+L21vbWVudC9sb2NhbGUvYXItZHouanMiLCJ3ZWJwYWNrOi8vLy4vfi9tb21lbnQvbG9jYWxlL2FyLWt3LmpzIiwid2VicGFjazovLy8uL34vbW9tZW50L2xvY2FsZS9hci1seS5qcyIsIndlYnBhY2s6Ly8vLi9+L21vbWVudC9sb2NhbGUvYX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mYXVsdC5vbWl0KGVycm9yLmRhdGEubWV0YSwgWydwcm9qZWN0JywgJ21lc3NhZ2UnLCAndHlwZScsICdiYWNrdHJhY2UnLCAndGltZXN0YW1wJywgJ2V2ZW50JywgJ25vdGlmaWNhdGlvbnMnLCAncmV2ZXJzZWRVbml4dGltZSddKTtcblx0XG5cdCAgICAgICAgX3Jpb3QyLmRlZmF1bHQubW91bnQoJ2FwcCcsICdvdmVydmlldycsIHtcblx0ICAgICAgICAgICAgcmVxOiByZXEsXG5cdCAgICAgICAgICAgIHByb2plY3Q6IGVycm9yLmRhdGEubWV0YS5wcm9qZWN0LFxuXHQgICAgICAgICAgICBtZXNzYWdlOiBlcnJvci5kYXRhLm1ldGEubWVzc2FnZSxcblx0ICAgICAgICAgICAgdHlwZTogZXJyb3IuZGF0YS5tZXRhLnR5cGUsXG5cdCAgICAgICAgICAgIG1ldGE6IG9taXR0ZWQsXG5cdCAgICAgICAgICAgIGJhY2t0cmFjZTogZXJyb3IuZGF0YS5tZXRhLmJhY2t0cmFjZSxcblx0ICAgICAgICAgICAgdGltZXN0YW1wOiBlcnJvci5kYXRhLm1ldGEudGltZXN0YW1wLFxuXHQgICAgICAgICAgICBvY2N1cnJlbmNlczogb2NjdXJyZW5jZXMsXG5cdCAgICAgICAgICAgIHdvb3RoZWU6IF93b290aGVlMi5kZWZhdWx0LFxuXHQgICAgICAgICAgICBpdGVtczogZXJyb3IuZGF0YS50aW1lbGluZS5lcnJvcnMsXG5cdCAgICAgICAgICAgIGMzOiBfYzIuZGVmYXVsdCxcblx0ICAgICAgICAgICAgXzogX2xvZGFzaDIuZGVmYXVsdCxcblx0ICAgICAgICAgICAgbW9tZW50OiBfbW9tZW50Mi5kZWZhdWx0LFxuXHQgICAgICAgICAgICBzdGFydDogc3RhcnQsXG5cdCAgICAgICAgICAgIGVuZDogZW5kXG5cdCAgICAgICAgfSk7XG5cdCAgICB9KS5jYXRjaChmdW5jdGlvbiAoZXJyKSB7XG5cdCAgICAgICAg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uXHQgICAgcmV0dXJuIGRpZmZzICsgbGVuZ3RoRGlmZjtcblx0fVxuXHRcblx0ZnVuY3Rpb24gd2Fybihtc2cpIHtcblx0ICAgIGlmIChob29rcy5zdXBwcmVzc0RlcHJlY2F0aW9uV2FybmluZ3MgPT09IGZhbHNlICYmXG5cdCAgICAgICAgICAgICh0eXBlb2YgY29uc29sZSAhPT0gICd1bmRlZmluZWQnKSAmJiBjb25zb2xlLndhcm4pIHtcblx0ICAgICAgICBjb25zb2xlLndhcm4oJ0RlcHJlY2F0aW9uIHdhcm5pbmc6ICcgKyBtc2cpO1xuXHQgICAgfVxuXHR9XG5cdFxuXHRmdW5jdGlvbiBkZXByZWNhdGUobXNnLCBmbikge1xuXHQgICAgdmFyIGZpcnN0VGltZSA9IHRydWU7XG5cdFxuXHQgICAgcmV0dXJuIGV4dGVuZChmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgaWYgKGhvb2tzLmRlcHJlY2F0aW9uSGFuZGxlciAhPSBudWxsKSB7XG5cdCAgICAgICAgICAgIGhvb2tzLmRlcHJlY2F0aW9uSGFuZGxlcihudWxsLCBtc2cpO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAoZmlyc3RUaW1lKSB7XG5cdCAgICAgICAgICAgIHZhciBhcmdzID0gW107XG5cdCAgICAgICAgICAgIHZhciBhcmc7XG5cdCAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYXJndW1lbnRzLmxlbmd0aDsgaSsrKSB7XG5cdCAgICAgICAgICAgICAgICBhcmcgPSAnJztcblx0ICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgYXJndW1lbnRzW2ldID09PSAnb2JqZWN0Jykge1xuXHQgICAgICAgICAgICAgICAgICAgIGFyZyArPSAnXFxuWycgKyBpICsgJ10gJztcblx0ICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gYXJndW1lbnRzWzBdKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGFyZyArPSBrZXkgKyAnOiAnICsgYXJndW1lbnRzWzBdW2tleV0gKyAnLCAnO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICBhcmcgPSBhcmcuc2xpY2UoMCwgLTIpOyAvLyBSZW1vdmUgdHJhaWxpbmcgY29tbWEgYW5kIHNwYWNlXG5cdCAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgICAgIGFyZyA9IGFyZ3VtZW50c1tpXTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIGFyZ3MucHVzaChhcmcpO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHdhcm4obXNnICsgJ1xcbkFyZ3VtZW50czogJyArIEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3MpLmpvaW4oJycpICsgJ1xcbicgKyAobmV3IEVycm9yKCkpLnN0YWNrKTtcblx0ICAgICAgICAgICAgZmlyc3RUaW1lID0gZmFsc2U7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHJldHVybiBmbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuXHQgICAgfSwgZm4pO1xuXHR9XG5cdFxuXHR2YXIgZGVwcmVjYXRpb25zID0ge307XG5cdFxuXHRmdW5jdGlvbiBkZXByZWNhdGVTaW1wbGUobmFtZSwgbXNnKSB7XG5cdCAgICBpZiAoaG9va3MuZGVwcmVjYXRpb25IYW5kbGVyICE9IG51bGwpIHtcblx0ICAgICAgICBob29rcy5kZXByZWNhdGlvbkhhbmRsZXIobmFtZSwgbXNnKTtcblx0ICAgIH1cblx0ICAgIGlmICghZGVwcmVjYXRpb25zW25hbWVdKSB7XG5cdCAgICAgICAgd2Fybihtc2cpO1xuXHQgICAgICAgIGRlcHJlY2F0aW9uc1tuYW1lXSA9IHRydWU7XG5cdCAgICB9XG5cdH1cblx0XG5cdGhvb2tzLnN1cHByZXNzRGVwcmVjYXRpb25XYXJ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c291cmNlKSArXG5cdCAgICAgICAgICAgICd8JyArICgvXFxkezEsMn0vKS5zb3VyY2UpO1xuXHR9XG5cdFxuXHRmdW5jdGlvbiBtZXJnZUNvbmZpZ3MocGFyZW50Q29uZmlnLCBjaGlsZENvbmZpZykge1xuXHQgICAgdmFyIHJlcyA9IGV4dGVuZCh7fSwgcGFyZW50Q29uZmlnKSwgcHJvcDtcblx0ICAgIGZvciAocHJvcCBpbiBjaGlsZENvbmZpZykge1xuXHQgICAgICAgIGlmIChoYXNPd25Qcm9wKGNoaWxkQ29uZmlnLCBwcm9wKSkge1xuXHQgICAgICAgICAgICBpZiAoaXNPYmplY3QocGFyZW50Q29uZmlnW3Byb3BdKSAmJiBpc09iamVjdChjaGlsZENvbmZpZ1twcm9wXSkpIHtcblx0ICAgICAgICAgICAgICAgIHJlc1twcm9wXSA9IHt9O1xuXHQgICAgICAgICAgICAgICAgZXh0ZW5kKHJlc1twcm9wXSwgcGFyZW50Q29uZmlnW3Byb3BdKTtcblx0ICAgICAgICAgICAgICAgIGV4dGVuZChyZXNbcHJvcF0sIGNoaWxkQ29uZmlnW3Byb3BdKTtcblx0ICAgICAgICAgICAgfSBlbHNlIGlmIChjaGlsZENvbmZpZ1twcm9wXSAhPSBudWxsKSB7XG5cdCAgICAgICAgICAgICAgICByZXNbcHJvcF0gPSBjaGlsZENvbmZpZ1twcm9wXTtcblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIGRlbGV0ZSByZXNbcHJvcF07XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICB9XG5cdCAgICBmb3IgKHByb3AgaW4gcGFyZW50Q29uZmlnKSB7XG5cdCAgICAgICAgaWYgKGhhc093blByb3AocGFyZW50Q29uZmlnLCBwcm9wKSAmJlxuXHQgICAgICAgICAgICAgICAgIWhhc093blByb3AoY2hpbGRDb25maWcsIHByb3ApICYmXG5cdCAgICAgICAgICAgICAgICBpc09iamVjdChwYXJlbn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dCAgICAgICAgICAgIGlmIChpaSAhPT0gLTEpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiBpaTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBpaSA9IGluZGV4T2YkMS5jYWxsKHRoaXMuX21pbldlZWtkYXlzUGFyc2UsIGxsYyk7XG5cdCAgICAgICAgICAgIHJldHVybiBpaSAhPT0gLTEgPyBpaSA6IG51bGw7XG5cdCAgICAgICAgfSBlbHNlIGlmIChmb3JtYXQgPT09ICdkZGQnKSB7XG5cdCAgICAgICAgICAgIGlpID0gaW5kZXhPZiQxLmNhbGwodGhpcy5fc2hvcnRXZWVrZGF5c1BhcnNlLCBsbGMpO1xuXHQgICAgICAgICAgICBpZiAoaWkgIT09IC0xKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gaWk7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl93ZWVrZGF5c1BhcnNlLCBsbGMpO1xuXHQgICAgICAgICAgICBpZiAoaWkgIT09IC0xKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gaWk7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl9taW5XZWVrZGF5c1BhcnNlLCBsbGMpO1xuXHQgICAgICAgICAgICByZXR1cm4gaWkgIT09IC0xID8gaWkgOiBudWxsO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIGlpID0gaW5kZXhPZiQxLmNhbGwodGhpcy5fbWluV2Vla2RheXNQYXJzZSwgbGxjKTtcblx0ICAgICAgICAgICAgaWYgKGlpICE9PSAtMSkge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIGlpO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIGlpID0gaW5kZXhPZiQxLmNhbGwodGhpcy5fd2Vla2RheXNQYXJzZSwgbGxjKTtcblx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GlzdGluZyBsb2NhbGUuIG1vbWVudC5kZWZpbmVMb2NhbGUobG9jYWxlTmFtZSwgJyArXG5cdCAgICAgICAgICAgICAgICAgICAgJ2NvbmZpZykgc2hvdWxkIG9ubHkgYmUgdXNlZCBmb3IgY3JlYXRpbmcgYSBuZXcgbG9jYWxlICcgK1xuXHQgICAgICAgICAgICAgICAgICAgICdTZWUgaHR0cDovL21vbWVudGpzLmNvbS9ndWlkZXMvIy93YXJuaW5ncy9kZWZpbmUtbG9jYWxlLyBmb3IgbW9yZSBpbmZvLicpO1xuXHQgICAgICAgICAgICBwYXJlbnRDb25maWcgPSBsb2NhbGVzW25hbWVdLl9jb25maWc7XG5cdCAgICAgICAgfSBlbHNlIGlmIChjb25maWcucGFyZW50TG9jYWxlICE9IG51bGwpIHtcblx0ICAgICAgICAgICAgaWYgKGxvY2FsZXNbY29uZmlnLnBhcmVudExvY2FsZV0gIT0gbnVsbCkge1xuXHQgICAgICAgICAgICAgICAgcGFyZW50Q29uZmlnID0gbG9jYWxlc1tjb25maWcucGFyZW50TG9jYWxlXS5fY29uZmlnO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgaWYgKCFsb2NhbGVGYW1pbGllc1tjb25maWcucGFyZW50TG9jYWxlXSkge1xuXHQgICAgICAgICAgICAgICAgICAgIGxvY2FsZUZhbWlsaWVzW2NvbmZpZy5wYXJlbnRMb2NhbGVdID0gW107XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBsb2NhbGVGYW1pbGllc1tjb25maWcucGFyZW50TG9jYWxlXS5wdXNoKHtcblx0ICAgICAgICAgICAgICAgICAgICBuYW1lOiBuYW1lLFxuXHQgICAgICAgICAgICAgICAgICAgIGNvbmZpZzogY29uZmlnXG5cdCAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfVxuXHQgICAg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ykge1xuXHQgICAgICAgICAgICAgICAgaWYgKGlzb1RpbWVzW2ldWzFdLmV4ZWMobWF0Y2hbM10pKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgLy8gbWF0Y2hbMl0gc2hvdWxkIGJlICdUJyBvciBzcGFjZVxuXHQgICAgICAgICAgICAgICAgICAgIHRpbWVGb3JtYXQgPSAobWF0Y2hbMl0gfHwgJyAnKSArIGlzb1RpbWVzW2ldWzBdO1xuXHQgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIGlmICh0aW1lRm9ybWF0ID09IG51bGwpIHtcblx0ICAgICAgICAgICAgICAgIGNvbmZpZy5faXNWYWxpZCA9IGZhbHNlO1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGlmICghYWxsb3dUaW1lICYmIHRpbWVGb3JtYXQgIT0gbnVsbCkge1xuXHQgICAgICAgICAgICBjb25maWcuX2lzVmFsaWQgPSBmYWxzZTtcblx0ICAgICAgICAgICAgcmV0dXJuO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAobWF0Y2hbNF0pIHtcblx0ICAgICAgICAgICAgaWYgKHR6UmVnZXguZXhlYyhtYXRjaFs0XSkpIHtcblx0ICAgICAgICAgICAgICAgIHR6Rm9ybWF0ID0gJ1onO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgY29uZmlnLl9pc1ZhbGlkID0gZmFsc2U7XG5cdCAgICAgICAgICAgICAgICByZXR1cm47XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgICAgY29uZmlnLl9mID0gZGF0ZUZvcm1hdCArICh0aW1lRm9ybWF0IHx8ICcnKSArICh0ekZvcm1hdCB8fCAnJyk7XG5cdCAgICAgICAgY29uZmlnRnJvbVN0cmlu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ZWsgY2hlY2suXG5cdCAgICAgICAgaWYgKG1hdGNoWzFdKSB7IC8vIGRheSBvZiB3ZWVrIGdpdmVuXG5cdCAgICAgICAgICAgIHZhciBtb21lbnREYXRlID0gbmV3IERhdGUobWF0Y2hbMl0pO1xuXHQgICAgICAgICAgICB2YXIgbW9tZW50RGF5ID0gWydTdW4nLCdNb24nLCdUdWUnLCdXZWQnLCdUaHUnLCdGcmknLCdTYXQnXVttb21lbnREYXRlLmdldERheSgpXTtcblx0XG5cdCAgICAgICAgICAgIGlmIChtYXRjaFsxXS5zdWJzdHIoMCwzKSAhPT0gbW9tZW50RGF5KSB7XG5cdCAgICAgICAgICAgICAgICBnZXRQYXJzaW5nRmxhZ3MoY29uZmlnKS53ZWVrZGF5TWlzbWF0Y2ggPSB0cnVlO1xuXHQgICAgICAgICAgICAgICAgY29uZmlnLl9pc1ZhbGlkID0gZmFsc2U7XG5cdCAgICAgICAgICAgICAgICByZXR1cm47XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdFxuXHQgICAgICAgIHN3aXRjaCAobWF0Y2hbNV0ubGVuZ3RoKSB7XG5cdCAgICAgICAgICAgIGNhc2UgMjogLy8gbWlsaXRhcnlcblx0ICAgICAgICAgICAgICAgIGlmICh0aW1lem9uZUluZGV4ID09PSAwKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgdGltZXpvbmUgPSAnICswMDAwJztcblx0ICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICAgICAgdGltZXpvbmVJbmRleCA9IG1pbGl0YXJ5LmluZGV4T2YobWF0Y2hbNV1bMV0udG9VcHBlckNhc2UoKSkgLSAxMjtcblx0ICAgICAgICAgICAgICAgICAgICB0aW1lem9uZSA9ICgodGltZXpvbmVJbmRleCA8IDApID8gJyAtJyA6ICcgKycpICtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgKCgnJyArIHRpbWV6b25lSW5kZXgpLnJlcGxhY2UoL14tPy8sICcw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1cmF0aW9uKGlucHV0KSkge1xuXHQgICAgICAgIGR1cmF0aW9uID0ge1xuXHQgICAgICAgICAgICBtcyA6IGlucHV0Ll9taWxsaXNlY29uZHMsXG5cdCAgICAgICAgICAgIGQgIDogaW5wdXQuX2RheXMsXG5cdCAgICAgICAgICAgIE0gIDogaW5wdXQuX21vbnRoc1xuXHQgICAgICAgIH07XG5cdCAgICB9IGVsc2UgaWYgKGlzTnVtYmVyKGlucHV0KSkge1xuXHQgICAgICAgIGR1cmF0aW9uID0ge307XG5cdCAgICAgICAgaWYgKGtleSkge1xuXHQgICAgICAgICAgICBkdXJhdGlvbltrZXldID0gaW5wdXQ7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgZHVyYXRpb24ubWlsbGlzZWNvbmRzID0gaW5wdXQ7XG5cdCAgICAgICAgfVxuXHQgICAgfSBlbHNlIGlmICghIShtYXRjaCA9IGFzcE5ldFJlZ2V4LmV4ZWMoaW5wdXQpKSkge1xuXHQgICAgICAgIHNpZ24gPSAobWF0Y2hbMV0gPT09ICctJykgPyAtMSA6IDE7XG5cdCAgICAgICAgZHVyYXRpb24gPSB7XG5cdCAgICAgICAgICAgIHkgIDogMCxcblx0ICAgICAgICAgICAgZCAgOiB0b0ludChtYXRjaFtEQVRFXSkgICAgICAgICAgICAgICAgICAgICAgICAgKiBzaWduLFxuXHQgICAgICAgICAgICBoICA6IHRvSW50KG1hdGNoW0hPVVJdKSAgICAgICAgICAgICAgICAgICAgICAgICAqIHNpZ24sXG5cdCAgICAgICAgICAgIG0gIDogdG9JbnQobWF0Y2hbTUlOVVRFXSkgICAgICAgICAgICAgICAgICAgICAgICogc2lnbixcblx0ICAgICAgICAgICAgcyAgOiB0b0ludChtYXRjaFtTRUNPTkRdKSAgICAgICAgICAgICAgICAgICAgICAgKiBzaWduLFxuXHQgICAgICAgICAgICBtcyA6IHRvSW50KGFic1JvdW5kKG1hdGNoW01JTExJU0VDT05EXSAqIDEwMDApKSAqIHNp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b2tlbiArPSAnUycpIHtcblx0ICAgIGFkZFBhcnNlVG9rZW4odG9rZW4sIHBhcnNlTXMpO1xuXHR9XG5cdC8vIE1PTUVOVFNcblx0XG5cdHZhciBnZXRTZXRNaWxsaXNlY29uZCA9IG1ha2VHZXRTZXQoJ01pbGxpc2Vjb25kcycsIGZhbHNlKTtcblx0XG5cdC8vIEZPUk1BVFRJTkdcblx0XG5cdGFkZEZvcm1hdFRva2VuKCd6JywgIDAsIDAsICd6b25lQWJicicpO1xuXHRhZGRGb3JtYXRUb2tlbignenonLCAwLCAwLCAnem9uZU5hbWUnKTtcblx0XG5cdC8vIE1PTUVOVFNcblx0XG5cdGZ1bmN0aW9uIGdldFpvbmVBYmJyICgpIHtcblx0ICAgIHJldHVybiB0aGlzLl9pc1VUQyA/ICdVVEMnIDogJyc7XG5cdH1cblx0XG5cdGZ1bmN0aW9uIGdldFpvbmVOYW1lICgpIHtcblx0ICAgIHJldHVybiB0aGlzLl9pc1VUQyA/ICdDb29yZGluYXRlZCBVbml2ZXJzYWwgVGltZScgOiAnJztcblx0fVxuXHRcblx0dmFyIHByb3RvID0gTW9tZW50LnByb3RvdHlwZTtcblx0XG5cdHByb3RvLmFkZCAgICAgICAgICAgICAgID0gYWRkO1xuXHRwcm90by5jYWxlbmRhciAgICAgICAgICA9IGNhbGVuZGFyJDE7XG5cdHByb3RvLmNsb25lICAgICAgICAgICAgID0gY2xvbmU7XG5cdHByb3RvLmRpZmYgICAgICAgICAgICAgID0gZGlmZjtcblx0cHJvdG8uZW5kT2YgICAgICAgICAgICAgPSBlbmRPZjtcblx0cHJvdG8uZm9ybWF0ICAgICAgICAgICAgPSBmb3JtYXQ7XG5cdHByb3RvLmZyb20gICAgICAgICAgICAgID0gZnJvbTtcblx0cHJvdG8uZnJvbU5vdyAgICAgICAgICAgPSBmcm9tTm93O1xuXHRwcm90by50byAgICAgICAgICAgICAgICA9IHRvO1xuXHRwcm90by50b05vdyAgICAgICAgICAgICA9IHRvTm93O1xuXHRwcm90by5nZXQgICAgICAgICAgICAgICA9IHN0cmluZ0dldDtcblx0cHJvdG8uaW52YWxpZEF0ICAgICAgICAgPSBpbnZhbGlkQXQ7XG5cdHByb3RvLmlzQWZ0ZXIgICAgICAgICAgID0gaXNBZnRlcjtcblx0cHJvdG8uaXNCZWZvcmUgICAgICAgICAgPSBpc0JlZm9yZTtcblx0cHJvdG8uaXNCZXR3ZWVuICAgICAgICAgPSBpc0JldHdlZW47XG5cdHByb3RvLmlzU2FtZSAgICAgICAgICAgID0gaXNTYW1lO1xuXHRwcm90by5pc1NhbWVPckFmdGVyICAgICA9IGlzU2FtZU9yQWZ0ZXI7XG5cdHByb3RvLmlzU2FtZU9yQmVmb3JlICAgID0gaXNTYW1lT3JCZWZvcmU7XG5cdHByb3RvLmlzVmFsaWQgICAgICAgICAgID0gaXNWYWxpZCQyO1xuXHRwcm90by5sYW5nICAgICAgICAgICAgICA9IGxhbmc7XG5cdHByb3RvLmxvY2FsZSAgICAgICAgICAgID0gbG9jYWxlO1xuXHRwcm90by5sb2NhbGVEYXRhICAgICAgICA9IGxvY2FsZURhdGE7XG5cdHByb3RvLm1heCAgICAgICAgICAgICAgID0gcHJvdG90eXBlTWF4O1xuXHRwcm90by5taW4gICAgICAgICAgICAgICA9IHByb3RvdHlwZU1pbjtcblx0cHJvdG8ucGFyc2luZ0ZsYWdzICAgICAgPSBwYXJzaW5nRmxhZ3M7XG5cdHByb3RvLnNldCAgICAgICAgICAgICAgID0gc3RyaW5nU2V0O1xuXHRwcm90by5zdGFydE9mICAgICAgICAgICA9IHN0YXJ0T2Y7XG5cdHByb3RvLnN1YnRyYWN0ICAgICAgICAgID0gc3VidHJhY3Q7XG5cdHByb3RvLnRvQXJyYXkgICAgICAgICAgID0gdG9BcnJheTtcblx0cHJvdG8udG9PYmplY3QgICAgICAgICAgPSB0b09iamVjdDtcblx0cHJvdG8udG9EYXRlICAgICAgICAgICAgPSB0b0RhdGU7XG5cdHByb3RvLnRvSVNPU3RyaW5nICAgICAgID0gdG9JU09TdHJpbmc7XG5cdHByb3RvLmluc3BlY3QgICAgICAgICAgID0gaW5zcGVjdDtcblx0cHJvdG8udG9KU09OICAgICAgICAgICAgPSB0b0pTT047XG5cdHByb3RvLnRvU3RyaW5nICAgICAgICAgID0gdG9TdHJpbmc7XG5cdHByb3RvLnVuaXggICAgICAgICAgICAgID0gdW5peDtcblx0cHJvdG8udmFsdWVPZiAgICAgICAgICAgPSB2YWx1ZU9mO1xuXHRwcm90by5jcmVhdGlvbkRhdGEgICAgICA9IGNyZWF0aW9uRGF0YTtcblx0XG5cdC8vIFllYXJcblx0cHJvdG8ueWVhciAgICAgICA9IGdldFNldFllYXI7XG5cdHByb3RvLmlzTGVhcFllYXIgPSBnZXRJc0xlYXBZZWFyO1xuXHRcblx0Ly8gV2VlayBZZWFyXG5cdHByb3RvLndlZWtZZWFyICAgID0gZ2V0U2V0V2Vla1llYXI7XG5cdHByb3RvLmlzb1dlZWtZZWFyID0gZ2V0U2V0SVNPV2Vla1llYXI7XG5cdFxuXHQvLyBRdWFydGVyXG5cdHByb3RvLnF1YXJ0ZXIgPSBwcm90by5xdWFydGVycyA9IGdldFNldFF1YXJ0ZXI7XG5cdFxuXHQvLyBNb250aFxuXHRwcm90by5tb250aCAgICAgICA9IGdldFNldE1vbnRoO1xuXHRwcm90by5kYXlzSW5Nb250aCA9IGdldERheXNJbk1vbnRoO1xuXHRcblx0Ly8gV2Vla1xuXHRwcm90by53ZWVrICAgICAgICAgICA9IHByb3RvLndlZWtzICAgICAgICA9IGdldFNldFdlZWs7XG5cdHByb3RvLmlzb1dlZWsgICAgICAgID0gcHJvdG8uaXNvV2Vla3MgICAgID0gZ2V0U2V0SVNPV2Vlaztcblx0cHJvdG8ud2Vla3NJblllYXIgICAgPSBnZXRXZWVrc0luWWVhcjtcblx0cHJvdG8uaXNvV2Vla3NJblllYXIgPSBnZXRJU09XZWVrc0luWWVhcjtcblx0XG5cdC8vIERheVxuXHRwcm90by5kYXRlICAgICAgID0gZ2V0U2V0RGF5T2ZNb250aDtcblx0cHJvdG8uZGF5ICAgICAgICA9IHByb3RvLmRheXMgICAgICAgICAgICAgPSBnZXRTZXREYXlPZldlZWs7XG5cdHByb3RvLndlZWtkYXkgICAgPSBnZXRTZXRMb2NhbGVEYXlPZldlZWs7XG5cdHByb3RvLmlzb1dlZWtkYXkgPSBnZXRTZXRJU09EYXlPZldlZWs7XG5cdHByb3RvLmRheU9mWWVhciAgPSBnZXRTZXREYXlPZlllYXI7XG5cdFxuXHQvLyBIb3VyXG5cdHByb3RvLmhvdXIgPSBwcm90by5ob3VycyA9IGdldFNldEhvdXI7XG5cdFxuXHQvLyBNaW51dGVcblx0cHJvdG8ubWludXRlID0gcHJvdG8ubWludXRlcyA9IGdldFNldE1pbnV0ZTtcblx0XG5cdC8vIFNlY29uZFxuXHRwcm90by5zZWNvbmQgPSBwcm90by5zZWNvbmRzID0gZ2V0U2V0U2Vjb25kO1xuXHRcblx0Ly8gTWlsbGlzZWNvbmRcblx0cHJvdG8ubWlsbGlzZWNvbmQgPSBwcm90by5taWxsaXNlY29uZHMgPSBnZXRTZXRNaWxsaXNlY29uZDtcblx0XG5cdC8vIE9mZnNldFxuXHRwcm90by51dGNPZmZzZXQgICAgICAgICAgICA9IGdldFNldE9mZnNldDtcblx0cHJvdG8udXRjICAgICAgICAgICAgICAgICAgPSBzZXRPZmZzZXRUb1VUQztcblx0cHJvdG8ubG9jYWwgICAgICAgICAgICAgICAgPSBzZXRPZmZzZXRUb0xvY2FsO1xuXHRwcm90by5wYXJzZVpvbmUgICAgICAgICAgICA9IHNldE9mZnNldFRvUGFyc2VkT2Zmc2V0O1xuXHRwcm90by5oYXNBbGlnbmVkSG91ck9mZnNldCA9IGhhc0FsaWduZWRIb3VyT2Zmc2V0O1xuXHRwcm90by5pc0RTVCAgICAgICAgICAgICAgICA9IGlzRGF5bGlnaHRTYXZpbmdUaW1lO1xuXHRwcm90by5pc0xvY2FsICAgICAgICAgICAgICA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NUb01vbnRocyhkYXlzKTtcblx0ICAgICAgICByZXR1cm4gdW5pdHMgPT09ICdtb250aCcgPyBtb250aHMgOiBtb250aHMgLyAxMjtcblx0ICAgIH0gZWxzZSB7XG5cdCAgICAgICAgLy8gaGFuZGxlIG1pbGxpc2Vjb25kcyBzZXBhcmF0ZWx5IGJlY2F1c2Ugb2YgZmxvYXRpbmcgcG9pbnQgbWF0aCBlcnJvcnMgKGlzc3VlICMxODY3KVxuXHQgICAgICAgIGRheXMgPSB0aGlzLl9kYXlzICsgTWF0aC5yb3VuZChtb250aHNUb0RheXModGhpcy5fbW9udGhzKSk7XG5cdCAgICAgICAgc3dpdGNoICh1bml0cykge1xuXHQgICAgICAgICAgICBjYXNlICd3ZWVrJyAgIDogcmV0dXJuIGRheXMgLyA3ICAgICArIG1pbGxpc2Vjb25kcyAvIDYwNDhlNTtcblx0ICAgICAgICAgICAgY2FzZSAnZGF5JyAgICA6IHJldHVybiBkYXlzICAgICAgICAgKyBtaWxsaXNlY29uZHMgLyA4NjRlNTtcblx0ICAgICAgICAgICAgY2FzZSAnaG91cicgICA6IHJldHVybiBkYXlzICogMjQgICAgKyBtaWxsaXNlY29uZHMgLyAzNmU1O1xuXHQgICAgICAgICAgICBjYXNlICdtaW51dGUnIDogcmV0dXJuIGRheXMgKiAxNDQwICArIG1pbGxpc2Vjb25kcyAvIDZlNDtcblx0ICAgICAgICAgICAgY2FzZSAnc2Vjb25kJyA6IHJldHVybiBkYXlzICogODY0MDAgKyBtaWxsaXNlY29uZHMgLyAxMDAwO1xuXHQgICAgICAgICAgICAvLyBNYXRoLmZsb29yIHByZXZlbnRzIGZsb2F0aW5nIHBvaW50IG1hdGggZXJyb3JzIGhlcmVcblx0ICAgICAgICAgICAgY2FzZSAnbWlsbGlzZWNvbmQnOiByZXR1cm4gTWF0aC5mbG9vcihkYXlzICogODY0ZTUpICsgbWlsbGlzZWNvbmRzO1xuXHQgICAgICAgICAgICBkZWZhdWx0OiB0aHJvdyBuZXcg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hyZXNob2xkcy5zcyAmJiBbJ3MnLCBzZWNvbmRzXSAgfHxcblx0ICAgICAgICAgICAgc2Vjb25kcyA8IHRocmVzaG9sZHMucyAgICYmIFsnc3MnLCBzZWNvbmRzXSB8fFxuXHQgICAgICAgICAgICBtaW51dGVzIDw9IDEgICAgICAgICAgICAgJiYgWydtJ10gICAgICAgICAgIHx8XG5cdCAgICAgICAgICAgIG1pbnV0ZXMgPCB0aHJlc2hvbGRzLm0gICAmJiBbJ21tJywgbWludXRlc10gfHxcblx0ICAgICAgICAgICAgaG91cnMgICA8PSAxICAgICAgICAgICAgICYmIFsnaCddICAgICAgICAgICB8fFxuXHQgICAgICAgICAgICBob3VycyAgIDwgdGhyZXNob2xkcy5oICAgJiYgWydoaCcsIGhvdXJzXSAgIHx8XG5cdCAgICAgICAgICAgIGRheXMgICAgPD0gMSAgICAgICAgICAgICAmJiBbJ2QnXSAgICAgICAgICAgfHxcblx0ICAgICAgICAgICAgZGF5cyAgICA8IHRocmVzaG9sZHMuZCAgICYmIFsnZGQnLCBkYXlzXSAgICB8fFxuXHQgICAgICAgICAgICBtb250aHMgIDw9IDEgICAgICAgICAgICAgJiYgWydNJ10gICAgICAgICAgIHx8XG5cdCAgICAgICAgICAgIG1vbnRocyAgPCB0aHJlc2hvbGRzLk0gICAmJiBbJ01NJywgbW9udGhzXSAgfHxcblx0ICAgICAgICAgICAgeWVhcnMgICA8PSAxICAgICAgICAgICAgICYmIFsneSddICAgICAgICAgICB8fCBbJ3l5JywgeWVhcnNdO1xuXHRcblx0ICAgIGFbMl0gPSB3aXRob3V0U3VmZml4O1xuXHQgICAgYVszXSA9ICtwb3NOZWdEdXJhdGlvbiA+IDA7XG5cdCAgICBhWzRdID0gbG9jYWxlO1xuXHQgICAgcmV0dXJuIHN1YnN0aXR1dGVUaW1lQWdvLmFwcGx5KG51bGwsIGEpO1xuXHR9XG5cdFxuXHQvLyBUaGlzIGZ1bmN0aW9uIGFsbG93cyB5b3UgdG8gc2V0IHR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gdmFyIHRvdGFsID0gdGhpcy5hc1NlY29uZHMoKTtcblx0XG5cdCAgICBpZiAoIXRvdGFsKSB7XG5cdCAgICAgICAgLy8gdGhpcyBpcyB0aGUgc2FtZSBhcyBDIydzIChOb2RhKSBhbmQgcHl0aG9uIChpc29kYXRlKS4uLlxuXHQgICAgICAgIC8vIGJ1dCBub3Qgb3RoZXIgSlMgKGdvb2cuZGF0ZSlcblx0ICAgICAgICByZXR1cm4gJ1AwRCc7XG5cdCAgICB9XG5cdFxuXHQgICAgcmV0dXJuICh0b3RhbCA8IDAgPyAnLScgOiAnJykgK1xuXHQgICAgICAgICdQJyArXG5cdCAgICAgICAgKFkgPyBZICsgJ1knIDogJycpICtcblx0ICAgICAgICAoTSA/IE0gKyAnTScgOiAnJykgK1xuXHQgICAgICAgIChEID8gRCArICdEJyA6ICcnKSArXG5cdCAgICAgICAgKChoIHx8IG0gfHwgcykgPyAnVCcgOiAnJykgK1xuXHQgICAgICAgIChoID8gaCArICdIJyA6ICcnKSArXG5cdCAgICAgICAgKG0gPyBtICsgJ00nIDogJycpICtcblx0ICAgICAgICAocyA/IHMgKyAnUycgOiAnJyk7XG5cdH1cblx0XG5cdHZhciBwcm90byQyID0gRHVyYXRpb24ucHJvdG90eXBlO1xuXHRcblx0cHJvdG8kMi5pc1ZhbGlkICAgICAgICA9IGlzVmFsaWQkMTtcblx0cHJvdG8kMi5hYnMgICAgICAgICAgICA9IGFicztcblx0cHJvdG8kMi5hZGQgICAgICAgICAgICA9IGFkZCQxO1xuXHRwcm90byQyLnN1YnRyYWN0ICAgICAgID0gc3VidHJhY3QkMTtcblx0cHJvdG8kMi5hcyAgICAgICAgICAgICA9IGFzO1xuXHRwcm90byQyLmFzTWlsbGlzZWNvbmRzID0gYXNNaWxsaXNlY29uZHM7XG5cdHByb3RvJDIuYXNTZWNvbmRzICAgICAgPSBhc1NlY29uZHM7XG5cdHByb3RvJDIuYXNNaW51dGVzICAgICAgPSBhc01pbnV0ZXM7XG5cdHByb3RvJDIuYXNIb3VycyAgICAgICAgPSBhc0hvdXJzO1xuXHRwcm90byQyLmFzRGF5cyAgICAgICAgID0gYXNEYXlzO1xuXHRwcm90byQyLmFzV2Vla3MgICAgICAgID0gYXNXZWVrcztcblx0cHJvdG8kMi5hc01vbnRocyAgICAgICA9IGFzTW9udGhzO1xuXHRwcm90byQyLmFzWWVhcnMgICAgICAgID0gYXNZZWFycztcblx0cHJvdG8kMi52YWx1ZU9mICAgICAgICA9IHZhbHVlT2YkMTtcblx0cHJvdG8kMi5fYnViYmxlICAgICAgICA9IGJ1YmJsZTtcblx0cHJvdG8kMi5nZXQgICAgICAgICAgICA9IGdldCQyO1xuXHRwcm90byQyLm1pbGxpc2Vjb25kcyAgID0gbWlsbGlzZWNvbmRzO1xuXHRwcm90byQyLnNlY29uZHMgICAgICAgID0gc2Vjb25kcztcblx0cHJvdG8kMi5taW51dGVzICAgICAgICA9IG1pbnV0ZXM7XG5cdHByb3RvJDIuaG91cnMgICAgICAgICAgPSBob3Vycztcblx0cHJvdG8kMi5kYXlzICAgICAgICAgICA9IGRheXM7XG5cdHByb3RvJDIud2Vla3MgICAgICAgICAgPSB3ZWVrcztcblx0cHJvdG8kMi5tb250aHMgICAgICAgICA9IG1vbnRocztcblx0cHJvdG8kMi55ZWFycyAgICAgICAgICA9IHllYXJzO1xuXHRwcm90byQyLmh1bWFuaXplICAgICAgID0gaHVtYW5pemU7XG5cdHByb3RvJDIudG9JU09TdHJpbmcgICAgPSB0b0lTT1N0cmluZyQxO1xuXHRwcm90byQyLnRvU3RyaW5nICAgICAgID0gdG9JU09TdHJpbmckMTtcblx0cHJvdG8kMi50b0pTT04gICAgICAgICA9IHRvSVNPU3RyaW5nJDE7XG5cdHByb3RvJDIubG9jYWxlICAgICAgICAgPSBsb2NhbGU7XG5cdHByb3RvJDIubG9jYWxlRGF0YSAgICAgPSBsb2NhbGVEYXRhO1xuXHRcblx0Ly8gRGVwcmVjYXRpb25zXG5cdHByb3RvJDIudG9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CAgICAgICAgICAgICAgICAgICA9IG1heDtcblx0aG9va3Mubm93ICAgICAgICAgICAgICAgICAgID0gbm93O1xuXHRob29rcy51dGMgICAgICAgICAgICAgICAgICAgPSBjcmVhdGVVVEM7XG5cdGhvb2tzLnVuaXggICAgICAgICAgICAgICAgICA9IGNyZWF0ZVVuaXg7XG5cdGhvb2tzLm1vbnRocyAgICAgICAgICAgICAgICA9IGxpc3RNb250aHM7XG5cdGhvb2tzLmlzRGF0ZSAgICAgICAgICAgICAgICA9IGlzRGF0ZTtcblx0aG9va3MubG9jYWxlICAgICAgICAgICAgICAgID0gZ2V0U2V0R2xvYmFsTG9jYWxlO1xuXHRob29rcy5pbnZhbGlkICAgICAgICAgICAgICAgPSBjcmVhdGVJbnZhbGlkO1xuXHRob29rcy5kdXJhdGlvbiAgICAgICAgICAgICAgPSBjcmVhdGVEdXJhdGlvbjtcblx0aG9va3MuaXNNb21lbnQgICAgICAgICAgICAgID0gaXNNb21lbnQ7XG5cdGhvb2tzLndlZWtkYXlzICAgICAgICAgICAgICA9IGxpc3RXZWVrZGF5cztcblx0aG9va3MucGFyc2Vab25lICAgICAgICAgICAgID0gY3JlYXRlSW5ab25lO1xuXHRob29rcy5sb2NhbGVEYXRhICAgICAgICAgICAgPSBnZXRMb2NhbGU7XG5cdGhvb2tzLmlzRHVyYXRpb24gICAgICAgICAgICA9IGlzRHVyYXRpb247XG5cdGhvb2tzLm1vbnRoc1Nob3J0ICAgICAgICAgICA9IGxpc3RNb250aHNTaG9ydDtcblx0aG9va3Mud2Vla2RheXNNaW4gICAgICAgICAgID0gbGlzdFdlZWtkYXlzTWluO1xuXHRob29rcy5kZWZpbmVMb2NhbGUgICAgICAgICAgPSBkZWZpbmVMb2NhbGU7XG5cdGhvb2tzLnVwZGF0ZUxvY2FsZSAgICAgICAgICA9IHVwZGF0ZUxvY2FsZTtcblx0aG9va3MubG9jYWxlcyAgICAgICAgICAgICAgID0gbGlzdExvY2FsZXM7XG5cdGhvb2tzLndl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blx0ICBmdW5jdGlvbiBfcGFyc2VFeHByIChleHByLCBhc1RleHQsIHFzdHIpIHtcblx0XG5cdCAgICBleHByID0gZXhwclxuXHQgICAgICAgICAgLnJlcGxhY2UoUkVfUUJMT0NLLCBmdW5jdGlvbiAocywgZGl2KSB7XG5cdCAgICAgICAgICAgIHJldHVybiBzLmxlbmd0aCA+IDIgJiYgIWRpdiA/IENIX0lERVhQUiArIChxc3RyLnB1c2gocykgLSAxKSArICd+JyA6IHNcblx0ICAgICAgICAgIH0pXG5cdCAgICAgICAgICAucmVwbGFjZSgvXFxzKy9nLCAnICcpLnRyaW0oKVxuXHQgICAgICAgICAgLnJlcGxhY2UoL1xcID8oW1tcXCh7fSw/XFwuOl0pXFwgPy9nLCAnJDEnKVxuXHRcblx0ICAgIGlmIChleHByKSB7XG5cdCAgICAgIHZhclxuXHQgICAgICAgIGxpc3QgPSBbXSxcblx0ICAgICAgICBjbnQgPSAwLFxuXHQgICAgICAgIG1hdGNoXG5cdFxuXHQgICAgICB3aGlsZSAoZXhwciAmJlxuXHQgICAgICAgICAgICAobWF0Y2ggPSBleHByLm1hdGNoKFJFX0NTTkFNRSkpICYmXG5cdCAgICAgICAgICAgICFtYXRjaC5pbmRleFxuXHQgICAgICAgICkge1xuXHQgICAgICAgIHZhclxuXHQgICAgICAgICAga2V5LFxuXHQgICAgICAgICAganNiLFxuXHQgICAgICAgICAgcmUgPSAvLHwoW1t7KF0pfCQvZ1xuXHRcblx0ICAgICAgICBleHByID0gUmVnRXhwLnJpZ2h0Q29udGV4dFxuXHQgICAgICAgIGtleSAgPSBtYXRjaFsyXSA/IHFzdHJbbWF0Y2hbMl1dLnNsaWNlKDEsIC0xKS50cmltKCkucmVwbGFjZSgvXFxzKy9nLCAnICcpIDogbWF0Y2hbMV1cblx0XG5cdCAgICAgICAgd2hpbGUgKGpzYiA9IChtYXRjaCA9IHJlLmV4ZWMoZXhwcikpWzFdKSBza2lwQnJhY2VzKGpzYiwgcmUpXG5cdFxuXHQgICAgICAgIGpzYiAgPSBleHByLnNsaWNlKDAsIG1hdGNoLmluZGV4KVxuXHQgICAgICAgIGV4cHIgPSBSZWdFeHAucmlnaHRDb250ZXh0XG5cdFxuXHQgICAgICAgIGxpc3RbY250KytdID0gX3dyYXBFeHByKGpzYiwgMSwga2V5KVxuXHQgICAgICB9XG5cdFxuXHQgICAgICBleHByID0gIWNudCA/IF93cmFwRXhwcihleHByLCBhc1RleHQpXG5cdCAgICAgICAgICAgOiBjbnQgPiAxID8gJ1snICsgbGlzdC5qb2luKCcsJykgKyAnXS5qb2luKFwiIFwiKS50cmltKCknIDogbGlzdFswXVxuXHQgICAgfVxuXHQgICAgcmV0dXJuIGV4cHJcblx0XG5cdCAgICBmdW5jdGlvbiBza2lwQnJhY2VzIChjaCwgcmUpIHtcblx0ICAgICAgdmFyXG5cdCAgICAgICAgbW0sXG5cdCAgICAgICAgbHYgPSAxLFxuXHQgICAgICAgIGlyID0gUkVfQlJFTkRbY2hdXG5cdFxuXHQgICAgICBpci5sYXN0SW5kZXggPSByZS5sYXN0SW5kZXhcblx0ICAgICAgd2hpbGUgKG1tID0gaXIuZXhlYyhleHByKSkge1xuXHQgICAgICAgIGlmIChtbVswXSA9PT0gY2gpICsrbHZcblx0ICAgICAgICBlbHNlIGlmICghLS1sdikgYnJlYWtcblx0ICAgICAgfVxuXHQgICAgICByZS5sYXN0SW5kZXggPSBsdiA/IGV4cHIubGVuZ3RoIDogaXIubGFzdEluZGV4XG5cdCAgICB9XG5cdCAgfVxuXHRcblx0ICAvLyBpc3RhbmJ1bCBpZ25vcmUgbmV4dDogbm90IGJvdGhcblx0ICB2YXIgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG1heC1sZW5cblx0ICAgIEpTX0NPTlRFWFQgPSAnXCJpbiB0aGlzP3RoaXM6JyArICh0eXBlb2Ygd2luZG93ICE9PSAnb2JqZWN0JyA/ICdnbG9iYWwnIDogJ3dpbmRvdycpICsgJykuJyxcblx0ICAgIE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5cdCAgICAgICAgICAgIG5vZGUuX19kYXRhX18gPSBub2RlRGF0YTtcblx0ICAgICAgICAgIH1cblx0ICAgICAgICAgIG5vZGVCeUtleVZhbHVlLnNldChrZXlWYWx1ZSwgdHJ1ZSk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGZvciAoaSA9IC0xOyArK2kgPCBuOyApIHtcblx0ICAgICAgICAgIGlmIChpIGluIGtleVZhbHVlcyAmJiBub2RlQnlLZXlWYWx1ZS5nZXQoa2V5VmFsdWVzW2ldKSAhPT0gdHJ1ZSkge1xuXHQgICAgICAgICAgICBleGl0Tm9kZXNbaV0gPSBncm91cFtpXTtcblx0ICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgZm9yIChpID0gLTE7ICsraSA8IG4wOyApIHtcblx0ICAgICAgICAgIG5vZGUgPSBncm91cFtpXTtcblx0ICAgICAgICAgIG5vZGVEYXRhID0gZ3JvdXBEYXRhW2ldO1xuXHQgICAgICAgICAgaWYgKG5vZGUpIHtcblx0ICAgICAgICAgICAgbm9kZS5fX2RhdGFfXyA9IG5vZGVEYXRhO1xuXHQgICAgICAgICAgICB1cGRhdGVOb2Rlc1tpXSA9IG5vZGU7XG5cdCAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICBlbnRlck5vZGVzW2ldID0gZDNfc2VsZWN0aW9uX2RhdGFOb2RlKG5vZGVEYXRhKTtcblx0ICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgICAgZm9yICg7aSA8IG07ICsraSkge1xuXHQgICAgICAgICAgZW50ZXJOb2Rlc1tpXSA9IGQzX3NlbGVjdGlvbl9kYXRhTm9kZShncm91cERhdGFbaV0pO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBmb3IgKDtpIDwgbjsgKytpKSB7XG5cdCAgICAgICAgICBleGl0Tm9kZXNbaV0gPSBncm91cFtpXTtcblx0ICAgICAgICB9XG5cdCAgICAgI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xcIiBpbiBkM19kb2N1bWVudCA/IChkM19iZWhhdmlvcl96b29tRGVsdGEgPSBmdW5jdGlvbigpIHtcblx0ICAgICAgICByZXR1cm4gZDMuZXZlbnQud2hlZWxEZWx0YTtcblx0ICAgICAgfSwgXCJtb3VzZXdoZWVsXCIpIDogKGQzX2JlaGF2aW9yX3pvb21EZWx0YSA9IGZ1bmN0aW9uKCkge1xuXHQgICAgICAgIHJldHVybiAtZDMuZXZlbnQuZGV0YWlsO1xuXHQgICAgICB9LCBcIk1vek1vdXNlUGl4ZWxTY3JvbGxcIik7XG5cdCAgICB9XG5cdCAgICBmdW5jdGlvbiB6b29tKGcpIHtcblx0ICAgICAgZy5vbihtb3VzZWRvd24sIG1vdXNlZG93bmVkKS5vbihkM19iZWhhdmlvcl96b29tV2hlZWwgKyBcIi56b29tXCIsIG1vdXNld2hlZWxlZCkub24oXCJkYmxjbGljay56b29tXCIsIGRibGNsaWNrZWQpLm9uKHRvdWNoc3RhcnQsIHRvdWNoc3RhcnRlZCk7XG5cdCAgICB9XG5cdCAgICB6b29tLmV2ZW50ID0gZnVuY3Rpb24oZykge1xuXHQgICAgICBnLmVhY2goZnVuY3Rpb24oKSB7XG5cdCAgICAgICAgdmFyIGRpc3BhdGNoID0gZXZlbnQub2YodGhpcywgYXJndW1lbnRzKSwgdmlldzEgPSB2aWV3O1xuXHQgICAgICAgIGlmIChkM190cmFuc2l0aW9uSW5oZXJpdElkKSB7XG5cdCAgICAgICAgICBkMy5zZWxlY3QodGhpcykudHJhbnNpdGlvbigpLmVhY2goXCJzdGFydC56b29tXCIsIGZ1bmN0aW9uKCkge1xuXHQgICAgICAgICAgICB2aWV3ID0gdGhpcy5fX2NoYXJ0X18gfHwge1xuXHQgICAgICAgICAgICAgIHg6IDAsXG5cdCAgICAgICAgICAgICAgeTogMCxcblx0ICAgICAgICAgICAgICBrOiAxXG5cdCAgICAgICAgICAgIH07XG5cdCAgICAgICAgICAgIHpvb21zdGFydGVkKGRpc3BhdGNoKTtcblx0ICAgICAgICAgIH0pLnR3ZWVuKFwiem9vbTp6b29tXCIsIGZ1bmN0aW9uKCkge1xuXHQgICAgICAgICAgICB2YXIgZHggPSBzaXplWzBdLCBkeSA9IHNpemVbMV0sIGN4ID0gY2VudGVyMCA/IGNlbnRlcjBbMF0gOiBkeCAvIDIsIGN5ID0gY2VudGVyMCA/IGNlbnRlcjBbMV0gOiBkeSAvIDIsIGkgPSBkMy5pbnRlcnBvbGF0ZVpvb20oWyAoY3ggLSB2aWV3LngpIC8gdmlldy5rLCAoY3kgLSB2aWV3LnkpIC8gdmlldy5rLCBkeCAvIHZpZXcuayBdLCBbIChjeCAtIHZpZXcxLngpIC8gdmlldzEuaywgKGN5IC0gdmlldzEueSkgLyB2aWV3MS5rLCBkeCAvIHZpZXcxLmsgXSk7XG5cdCAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7XG5cdCAgICAgICAgICAgICAgdmFyIGwgPSBpKHQpLCBrID0gZHggLyBsWzJdO1xuXHQgICAgICAgICAgICAgIHRoaXMuX19jaGFydF9fID0gdmlldyA9IHtcblx0ICAgICAgICAgICAgICAgIHg6IGN4IC0gbFswXSAqIGssXG5cdCAgICAgICAgICAgICAgICB5OiBjeSAtIGxbMV0gKiBrLFxuXHQgICAgICAgICAgICAgICAgazoga1xuXHQgICAgICAgICAgICAgIH07XG5cdCAgICAgICAgICAgICAgem9vbWVkKGRpc3BhdGNoKTtcblx0ICAgICAgICAgICAgfTtcblx0ICAgICAgICAgIH0pLmVhY2goXCJpbnRlcnJ1cHQuem9vbVwiLCBmdW5jdGlvbigpIHtcblx0ICAgICAgICAgICAgem9vbWVuZGVkKGRpc3BhdGNoKTtcblx0ICAgICAgICAgIH0pLmVhY2goXCJlbmQuem9vbVwiLCBmdW5jdGlvbigpIHtcblx0ICAgICAgICAgICAgem9vbWVuZGVkKGRpc3BhdGNoKTtcblx0ICAgICAgICAgIH0pO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICB0aGlzLl9fY2hhcnRfXyA9IHZpZXc7XG5cdCAgICAgICAgICB6b29tc3RhcnRlZChkaXNwYXRjaCk7XG5cdCAgICAgICAgICB6b29tZWQoZGlzcGF0Y2gpO1xuXHQgICAgICAgICAgem9vbWVuZGVkKGRpc3BhdGNoKTtcblx0ICAgICAgICB9XG5cdCAgICAgIH0pO1xuXHQgICAgfTtcblx0ICAgIHpvb20udHJhbnNsYXRlID0gZnVuY3Rpb24oXykge1xuXHQgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBbIHZpZXcueCwgdmlldy55IF07XG5cdCAgICAgIHZpZXcgPSB7XG5cdCAgICAgICAgeDogK19bMF0sXG5cdCAgICAgICAgeTogK19bMV0sXG5cdCAgICAgICAgazogdmlldy5rXG5cdCAgICAgIH07XG5cdCAgICAgIHJlc2NhbGUoKTtcblx0ICAgICAgcmV0dXJuIHpvb207XG5cdCAgICB9O1xuXHQgICAgem9vbS5zY2FsZSA9IGZ1bmN0aW9uKF8pIHtcblx0ICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gdmlldy5rO1xuXHQgICAgICB2aWV3ID0ge1xuXHQgICAgICAgIHg6IHZpZXcueCxcblx0ICAgICAgICB5OiB2aWV3LnksXG5cdCAgICAgICAgazogbnVsbFxuXHQgICAgICB9O1xuXHQgICAgICBzY2FsZVRvKCtfKTtcblx0ICAgICAgcmVzY2FsZSgpO1xuXHQgICAgICByZXR1cm4gem9vbTtcblx0ICAgIH07XG5cdCAgICB6b29tLnNjYWxlRXh0ZW50ID0gZnVuY3Rpb24oXykge1xuXHQgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBzY2FsZUV4dGVudDtcblx0ICAgICAgc2NhbGVFeHRlbnQgPSBfID09IG51bGwgPyBkM19iZWhhdmlvcl96b29tSW5maW5pdHkgOiBbICtfWzBdLCArX1sxXSBdO1xuXHQgICAgICByZXR1cm4gem9vbTtcbl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7XG5cdCAgICAgICAgdmFyIGEgPSBuZXcgRnVuY3Rpb24oXCJkXCIsIFwicmV0dXJuIHtcIiArIHJvdy5tYXAoZnVuY3Rpb24obmFtZSwgaSkge1xuXHQgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KG5hbWUpICsgXCI6IGRbXCIgKyBpICsgXCJdXCI7XG5cdCAgICAgICAgfSkuam9pbihcIixcIikgKyBcIn1cIik7XG5cdCAgICAgICAgbyA9IGYgPyBmdW5jdGlvbihyb3csIGkpIHtcblx0ICAgICAgICAgIHJldHVybiBmKGEocm93KSwgaSk7XG5cdCAgICAgICAgfSA6IGE7XG5cdCAgICAgIH0pO1xuXHQgICAgfTtcblx0ICAgIGRzdi5wYXJzZVJvd3MgPSBmdW5jdGlvbih0ZXh0LCBmKSB7XG5cdCAgICAgIHZhciBFT0wgPSB7fSwgRU9GID0ge30sIHJvd3MgPSBbXSwgTiA9IHRleHQubGVuZ3RoLCBJID0gMCwgbiA9IDAsIHQsIGVvbDtcblx0ICAgICAgZnVuY3Rpb24gdG9rZW4oKSB7XG5cdCAgICAgICAgaWYgKEkgPj0gTikgcmV0dXJuIEVPRjtcblx0ICAgICAgICBpZiAoZW9sKSByZXR1cm4gZW9sID0gZmFsc2UsIEVPTDtcblx0ICAgICAgICB2YXIgaiA9IEk7XG5cdCAgICAgICAgaWYgKHRleHQuY2hhckNvZGVBdChqKSA9PT0gMzQpIHtcblx0ICAgICAgICAgIHZhciBpID0gajtcblx0ICAgICAgICAgIHdoaWxlIChpKysgPCBOKSB7XG5cdCAgICAgICAgICAgIGlmICh0ZXh0LmNoYXJDb2RlQXQoaSkgPT09IDM0KSB7XG5cdCAgICAgICAgICAgICAgaWYgKHRleHQuY2hhckNvZGVBdChpICsgMSkgIT09IDM0KSBicmVhaztcblx0ICAgICAgICAgICAgICArK2k7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgIH1cblx0ICAgICAgICAgIEkgPSBpICsgMjtcblx0ICAgICAgICAgIHZhciBjID0gdGV4dC5jaGFyQ29kZUF0KGkgKyAxKTtcblx0ICAgICAgICAgIGlmIChjID09PSAxMykge1xuXHQgICAgICAgICAgICBlb2wgPSB0cnVlO1xuXHQgICAgICAgICAgICBpZiAodGV4dC5jaGFyQ29kZUF0KGkgKyAyKSA9PT0gMTApICsrSTtcblx0ICAgICAgICAgIH0gZWxzZSBpZiAoYyA9PT0gMTApIHtcblx0ICAgICAgICAgICAgZW9sID0gdHJ1ZTtcblx0ICAgICAgICAgIH1cblx0ICAgICAgICAgIHJldHVybiB0ZXh0LnNsaWNlKGogKyAxLCBpKS5yZXBsYWNlKC9cIlwiL2csICdcIicpO1xuXHQgICAgICAgIH1cblx0ICAgICAgICB3aGlsZSAoSSA8IE4pIHtcblx0ICAgICAgICAgIHZhciBjID0gdGV4dC5jaGFyQ29kZUF0KEkrKyksIGsgPSAxO1xuXHQgICAgICAgICAgaWYgKGMgPT09IDEwKSBlb2wgPSB0cnVlOyBlbHNlIGlmIChjID09PSAxMykge1xuXHQgICAgICAgICAgICBlb2wgPSB0cnVlO1xuXHQgICAgICAgICAgICBpZiAodGV4dC5jaGFyQ29kZUF0KEkpID09PSAxMCkgKytJLCArK2s7XG5cdCAgICAgICAgICB9IGVsc2UgaWYgKGMgIT09IGRlbGltaXRlckNvZGUpIGNvbnRpbnVlO1xuXHQgICAgICAgICAgcmV0dXJuIHRleHQuc2xpY2UoaiwgSSAtIGspO1xuXHQgICAgICAgIH1cblx0ICAgICAgICByZXR1cm4gdGV4dC5zbGljZShqKTtcblx0ICAgICAgfVxuXHQgICAgICB3aGlsZSAoKHQgPSB0b2tlbigpKSAhPT0gRU9GKSB7XG5cdCAgICAgICAgdmFyIGEgPSBbXTtcblx0ICAgICAgICB3aGlsZSAodCAhPT0gRU9MICYmIHQgIT09IEVPRikge1xuXHQgICAgICAgICAgYS5wdXNoKHQpO1xuXHQgICAgICAgICAgdCA9IHRva2VuKCk7XG5cdCAgICAgICAgfVxuXHQgICA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AxOTAwLFxuXHQgICAgICAgICAgbTogMCxcblx0ICAgICAgICAgIGQ6IDEsXG5cdCAgICAgICAgICBIOiAwLFxuXHQgICAgICAgICAgTTogMCxcblx0ICAgICAgICAgIFM6IDAsXG5cdCAgICAgICAgICBMOiAwLFxuXHQgICAgICAgICAgWjogbnVsbFxuXHQgICAgICAgIH0sIGkgPSBkM190aW1lX3BhcnNlKGQsIHRlbXBsYXRlLCBzdHJpbmcsIDApO1xuXHQgICAgICAgIGlmIChpICE9IHN0cmluZy5sZW5ndGgpIHJldHVybiBudWxsO1xuXHQgICAgICAgIGlmIChcInBcIiBpbiBkKSBkLkggPSBkLkggJSAxMiArIGQucCAqIDEyO1xuXHQgICAgICAgIHZhciBsb2NhbFogPSBkLlogIT0gbnVsbCAmJiBkM19kYXRlICE9PSBkM19kYXRlX3V0YywgZGF0ZSA9IG5ldyAobG9jYWxaID8gZDNfZGF0ZV91dGMgOiBkM19kYXRlKSgpO1xuXHQgICAgICAgIGlmIChcImpcIiBpbiBkKSBkYXRlLnNldEZ1bGxZZWFyKGQueSwgMCwgZC5qKTsgZWxzZSBpZiAoXCJXXCIgaW4gZCB8fCBcIlVcIiBpbiBkKSB7XG5cdCAgICAgICAgICBpZiAoIShcIndcIiBpbiBkKSkgZC53ID0gXCJXXCIgaW4gZCA/IDEgOiAwO1xuXHQgICAgICAgICAgZGF0ZS5zZXRGdWxsWWVhcihkLnksIDAsIDEpO1xuXHQgICAgICAgICAgZGF0ZS5zZXRGdWxsWWVhcihkLnksIDAsIFwiV1wiIGluIGQgPyAoZC53ICsgNikgJSA3ICsgZC5XICogNyAtIChkYXRlLmdldERheSgpICsgNSkgJSA3IDogZC53ICsgZC5VICogNyAtIChkYXRlLmdldERheSgpICsgNikgJSA3KTtcblx0ICAgICAgICB9IGVsc2UgZGF0ZS5zZXRGdWxsWWVhcihkLnksIGQubSwgZC5kKTtcblx0ICAgICAgICBkYXRlLnNldEhvdXJzKGQuSCArIChkLlogLyAxMDAgfCAw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dsZSjOuzAsIM67KSA+IGFuZ2xlKM67MCwgzrsxKSkgzrsxID0gzrs7XG5cdCAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICBpZiAoYW5nbGUozrssIM67MSkgPiBhbmdsZSjOuzAsIM67MSkpIM67MCA9IM67O1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICBpZiAozrsxID49IM67MCkge1xuXHQgICAgICAgICAgICBpZiAozrsgPCDOuzApIM67MCA9IM67O1xuXHQgICAgICAgICAgICBpZiAozrsgPiDOuzEpIM67MSA9IM67O1xuXHQgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgaWYgKM67ID4gzrtfKSB7XG5cdCAgICAgICAgICAgICAgaWYgKGFuZ2xlKM67MCwgzrspID4gYW5nbGUozrswLCDOuzEpKSDOuzEgPSDOuztcblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICBpZiAoYW5nbGUozrssIM67MSkgPiBhbmdsZSjOuzAsIM67MSkpIM67MCA9IM67O1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgfVxuXHQgICAgICB9IGVsc2Uge1xuXHQgICAgICAgIHBvaW50KM67LCDPhik7XG5cdCAgICAgIH1cblx0ICAgICAgcDAgPSBwLCDOu18gPSDOuztcblx0ICAgIH1cblx0ICAgIGZ1bmN0aW9uIGxpbmVTdGFydCgpIHtcblx0ICAgICAgYm91bmQucG9pbnQgPSBsaW5lUG9pbnQ7XG5cdCAgICB9XG5cdCAgICBmdW5jdGlvbiBsaW5lRW5kKCkge1xuXHQgICAgICByYW5nZVswXSA9IM67MCwgcmFuZ2VbMV0gPSDOuzE7XG5cdCAgICAgIGJvdW5kLnBvaW50ID0gcG9pbnQ7XG5cdCAgICAgIHAwID0gbnVsbDtcblx0ICAgIH1cblx0ICAgIGZ1bmN0aW9uIHJpbmdQb2ludCjOuywgz4YpIHtcblx0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RoLnNpbijPhik7XG5cdCAgICAgIGQzX2dlb19jZW50cm9pZC5wb2ludCA9IG5leHRQb2ludDtcblx0ICAgICAgZDNfZ2VvX2NlbnRyb2lkUG9pbnRYWVooeDAsIHkwLCB6MCk7XG5cdCAgICB9O1xuXHQgICAgZnVuY3Rpb24gbmV4dFBvaW50KM67LCDPhikge1xuXHQgICAgICDOuyAqPSBkM19yYWRpYW5zO1xuXHQgICAgICB2YXIgY29zz4YgPSBNYXRoLmNvcyjPhiAqPSBkM19yYWRpYW5zKSwgeCA9IGNvc8+GICogTWF0aC5jb3MozrspLCB5ID0gY29zz4YgKiBNYXRoLnNpbijOuyksIHogPSBNYXRoLnNpbijPhiksIHcgPSBNYXRoLmF0YW4yKE1hdGguc3FydCgodyA9IHkwICogeiAtIHowICogeSkgKiB3ICsgKHcgPSB6MCAqIHggLSB4MCAqIHopICogdyArICh3ID0geDAgKiB5IC0geTAgKiB4KSAqIHcpLCB4MCAqIHggKyB5MCAqIHkgKyB6MCAqIHopO1xuXHQgICAgICBkM19nZW9fY2VudHJvaWRXMSArPSB3O1xuXHQgICAgICBkM19nZW9fY2VudHJvaWRYMSArPSB3ICogKHgwICsgKHgwID0geCkpO1xuXHQgICAgICBkM19nZW9fY2VudHJvaWRZMSArPSB3ICogKHkwICsgKHkwID0geSkpO1xuXHQgICAgICBkM19nZW9fY2VudHJvaWRaMSArPSB3ICogKHowICsgKHowID0geikpO1xuXHQgICAgICBkM19nZW9fY2VudHJvaWRQb2ludFhZWih4MCwgeTAsIHowKTtcblx0ICAgIH1cblx0ICB9XG5cdCAgZnVuY3Rpb24gZDNfZ2VvX2NlbnRyb2lkTGluZUVuZCgpIHtcblx0ICAgIGQzX2dlb19jZW50cm9pZC5wb2ludCA9IGQzX2dlb19jZW50cm9pZFBvaW50O1xuXHQgIH1cblx0ICBmdW5jdGlvbiBkM19nZW9fY2VudHJvaWRSaW5nU3RhcnQoKSB7XG5cdCAgICB2YXIgzrswMCwgz4YwMCwgeDAsI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KTtcblx0ICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIGludGVycG9sYXRlKGN1cnJlbnQueCwgY3VycmVudC5uLngsIDEsIGxpc3RlbmVyKTtcblx0ICAgICAgICAgIH1cblx0ICAgICAgICAgIGN1cnJlbnQgPSBjdXJyZW50Lm47XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgIGlmIChpc1N1YmplY3QpIHtcblx0ICAgICAgICAgICAgcG9pbnRzID0gY3VycmVudC5wLno7XG5cdCAgICAgICAgICAgIGZvciAodmFyIGkgPSBwb2ludHMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIGxpc3RlbmVyLnBvaW50KChwb2ludCA9IHBvaW50c1tpXSlbMF0sIHBvaW50WzFdKTtcblx0ICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIGludGVycG9sYXRlKGN1cnJlbnQueCwgY3VycmVudC5wLngsIC0xLCBsaXN0ZW5lcik7XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgICBjdXJyZW50ID0gY3VycmVudC5wO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBjdXJyZW50ID0gY3VycmVudC5vO1xuXHQgICAgICAgIHBvaW50cyA9IGN1cnJlbnQuejtcblx0ICAgICAgICBpc1N1YmplY3QgPSAhaXNTdWJqZWN0O1xuXHQgICAgICB9IHdoaWxlICghY3VycmVudC52KTtcblx0ICAgICAgbGlzdGVuZXIubGluZUVuZCgpO1xuXHQgICAgfVxuXHQgIH1cblx0ICBmdW5jdGlvbiBkM19nZW9fY2xpcFBvbHlnb25MaW5rQ2lyY3VsYXIoYXJyYXkpIHtcblx0ICAgIGlmICghKG4gPSBhcnJheS5sZW5ndGgpKSByZXR1cm47XG5cdCAgICB2YXIgbiwgaSA9IDAsIGEgPSBhcnJheVswXSwgYjtcblx0ICAgIHdoaWxlICgrK2kgPCBuKSB7XG5cdCAgICAgIGEubiA9IGIgPSBhcnJheVtpXTtcblx0ICAgIC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GMCk7XG5cdCAgICAgICAgICBsaXN0ZW5lci5saW5lRW5kKCk7XG5cdCAgICAgICAgICBsaXN0ZW5lci5saW5lU3RhcnQoKTtcblx0ICAgICAgICAgIGxpc3RlbmVyLnBvaW50KHPOuzEsIM+GMCk7XG5cdCAgICAgICAgICBjbGVhbiA9IDA7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGxpc3RlbmVyLnBvaW50KM67MCA9IM67MSwgz4YwID0gz4YxKTtcblx0ICAgICAgICBzzrswID0gc867MTtcblx0ICAgICAgfSxcblx0ICAgICAgbGluZUVuZDogZnVuY3Rpb24oKSB7XG5cdCAgICAgICAgbGlzdGVuZXIubGluZUVuZCgpO1xuXHQgICAgICAgIM67MCA9IM+GMCA9IE5hTjtcblx0ICAgICAgfSxcblx0ICAgICAgY2xlYW46IGZ1bmN0aW9uKCkge1xuXHQgICAgICAgIHJldHVybiAyIC0gY2xlYW47XG5cdCAgICAgIH1cblx0ICAgIH07XG5cdCAgfVxuXHQgIGZ1bmN0aW9uIGQzX2dlb19jbGlwQW50aW1lcmlkaWFuSW50ZXJzZWN0KM67MCwgz4YwLCDOuzEsIM+GMSkge1xuXHQgICAgdmFyIGNvc8+GMCwgY29zz4YxLCBzaW7OuzBfzrsxID0gTWF0aC5zaW4ozrswIC0gzrsxKTtcblx0ICAgIHJldHVybiBhYnMoc2luzrswX867MSkgPiDOtSA/IE1hdGguYXRhbigoTWF0aC5zaW4oz4YwKSAqIChjb3PPhjEgPSBNYXRoLmNvcyjPhjEpKSAqIE1hdGguc2luKM67MSkgLSBNYXRoLnNpbijPhjEpICogKGNvc8+GMCA9IE1hdGguY29zKM+GMCkpICogTWF0aC5zaW4ozrswKSkgLyAoY29zz4YwICogY29zz4YxICogc2luzrswX867MSkpIDogKM+GMCArIM+GMSkgLyAyO1xuXHQgIH1cblx0ICBmdW5jdGlvbiBkM19nZW9fY2xpcEFudGltZXJpZGlhbkludGVycG9sYXRlKGZyb20sIHRvLCBkaXJlY3Rpb24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XIubGluZVN0YXJ0KCk7XG5cdCAgICAgICAgICBpZiAodiAhPT0gdjApIHtcblx0ICAgICAgICAgICAgcG9pbnQyID0gaW50ZXJzZWN0KHBvaW50MCwgcG9pbnQxKTtcblx0ICAgICAgICAgICAgaWYgKGQzX2dlb19zcGhlcmljYWxFcXVhbChwb2ludDAsIHBvaW50MikgfHwgZDNfZ2VvX3NwaGVyaWNhbEVxdWFsKHBvaW50MSwgcG9pbnQyKSkge1xuXHQgICAgICAgICAgICAgIHBvaW50MVswXSArPSDOtTtcblx0ICAgICAgICAgICAgICBwb2ludDFbMV0gKz0gzrU7XG5cdCAgICAgICAgICAgICAgdiA9IHZpc2libGUocG9pbnQxWzBdLCBwb2ludDFbMV0pO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgICBpZiAodiAhPT0gdjApIHtcblx0ICAgICAgICAgICAgY2xlYW4gPSAwO1xuXHQgICAgICAgICAgICBpZiAodikge1xuXHQgICAgICAgICAgICAgIGxpc3RlbmVyLmxpbmVTdGFydCgpO1xuXHQgICAgICAgICAgICAgIHBvaW50MiA9IGludGVyc2VjdChwb2ludDEsIHBvaW50MCk7XG5cdCAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQocG9pbnQyWzBdLCBwb2ludDJbMV0pO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgIHBvaW50MiA9IGludGVyc2VjdChwb2ludDAsIHBvaW50MSk7XG5cdCAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQocG9pbnQyWzBdLCBwb2ludDJbMV0pO1xuXHQgICAgICAgICAgICAgIGxpc3RlbmVyLmxpbmVFbmQoKTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBwb2ludDAgPSBwb2ludDI7XG5cdCAgICAgICAgICB9IGVsc2UgaWYgKG5vdEhlbWlzcGhlcmUgJiYgcG9pbnQwICYmIHNtYWxsUmFkaXVzIF4gdikge1xuXHQgICAgICAgICAgICB2YXIgdDtcblx0ICAgICAgICAgICAgaWYgKCEoYyAmIGMwKSAmJiAodCA9IGludGVyc2VjdChwb2ludDEsIHBvaW50MCwgdHJ1ZSkpKSB7XG5cdCAgICAgICAgICAgICAgY2xlYW4gPSAwO1xuXHQgICAgICAgICAgICAgIGlmIChzbWFsbFJhZGl1cykge1xuXHQgICAgICAgICAgICAgICAgbGlzdGVuZXIubGluZVN0YXJ0KCk7XG5cdCAgICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludCh0WzBdWzBdLCB0WzBdWzFdKTtcblx0ICAgICAgICAgICAgICAgIGxpc3RlbmVyLnBvaW50KHRbMV1bMF0sIHRbMV1bMV0pO1xuXHQgICAgICAgICAgICAgICAgbGlzdGVuZXIubGluZUVuZCgpO1xuXHQgICAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludCh0WzFdWzBdLCB0WzFdWzFdKTtcblx0ICAgICAgICAgICAgICAgIGxpc3RlbmVyLmxpbmVFbmQoKTtcblx0ICAgICAgICAgICAgICAgIGxpc3RlbmVyLmxpbmVTdGFydCgpO1xuXHQgICAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQodFswXVswXSwgdFswXVsxXSk7XG5cdCAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgICBpZiAodiAmJiAoIXBvaW50MCB8fCAhZDNfZ2VvX3NwaGVyaWNhbEVxdWFsKHBvaW50MCwgcG9pbnQxKSkpIHtcblx0ICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQocG9pbnQxWzBdLCBwb2ludDFbMV0pO1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgICAgcG9pbnQwID0gcG9pbnQxLCB2MCA9IHYsIGMwID0gYztcblx0ICAgICAgICB9LFxuXHQgICAgICAgIGxpbmVFbmQ6IGZ1bmN0aW9uKCkge1xuXHQgICAgICAgICAga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ICAgIGlmIChyID4gdDEpIHJldHVybjtcblx0ICAgICAgICBpZiAociA+IHQwKSB0MCA9IHI7XG5cdCAgICAgIH0gZWxzZSBpZiAoZHggPiAwKSB7XG5cdCAgICAgICAgaWYgKHIgPCB0MCkgcmV0dXJuO1xuXHQgICAgICAgIGlmIChyIDwgdDEpIHQxID0gcjtcblx0ICAgICAgfVxuXHQgICAgICByID0geTAgLSBheTtcblx0ICAgICAgaWYgKCFkeSAmJiByID4gMCkgcmV0dXJuO1xuXHQgICAgICByIC89IGR5O1xuXHQgICAgICBpZiAoZHkgPCAwKSB7XG5cdCAgICAgICAgaWYgKHIgPCB0MCkgcmV0dXJuO1xuXHQgICAgICAgIGlmIChyIDwgdDEpIHQxID0gcjtcblx0ICAgICAgfSBlbHNlIGlmIChkeSA+IDApIHtcblx0ICAgICAgICBpZiAociA+IHQxKSByZXR1cm47XG5cdCAgICAgICAgaWYgKHIgPiB0MCkgdDAgPSByO1xuXHQgICAgICB9XG5cdCAgICAgIHIgPSB5MSAtIGF5O1xuXHQgICAgICBpZiAoIWR5ICYmIHIgPCAwKSByZXR1cm47XG5cdCAgICAgIHIgLz0gZHk7XG5cdCAgICAgIGlmIChkeSA8IDApIHtcblx0ICAgICAgICBpZiAociA+IHQxKSByZXR1cm47XG5cdCAgICAgICAgaWYgKHIgPiB0MCkgdDAgPSByO1xuXHQgICAgICB9IGVsc2UgaWYgKGR5ID4gMCkge1xuXHQgICAgICAgIGlmIChyIDwgdDApIHJldHVybjtcblx0ICAgICAgICBpZiAociA8IHQxKSB0MSA9IHI7XG5cdCAgICAgIH1cblx0ICAgICAgaWYgKHQwID4gMCkgbGluZS5hID0ge1xuXHQgICAgICAgIHg6IGF4ICsgdDAgKiBkeCxcblx0ICAgICAgICB5OiBheSArIHQwICogZHlcblx0ICAgICAgfTtcblx0ICAgICAgaWYgKHQxIDwgMSkgbGluZS5iID0ge1xuXHQgICAgICAgIHg6IGF4ICsgdDEgKiBkeCxcblx0ICAgICAgICB5O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ICAgICAgICAgZmlyc3QgPSBmYWxzZTtcblx0ICAgICAgICAgIGlmICh2KSB7XG5cdCAgICAgICAgICAgIGxpc3RlbmVyLmxpbmVTdGFydCgpO1xuXHQgICAgICAgICAgICBsaXN0ZW5lci5wb2ludCh4LCB5KTtcblx0ICAgICAgICAgIH1cblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgaWYgKHYgJiYgdl8pIGxpc3RlbmVyLnBvaW50KHgsIHkpOyBlbHNlIHtcblx0ICAgICAgICAgICAgdmFyIGwgPSB7XG5cdCAgICAgICAgICAgICAgYToge1xuXHQgICAgICAgICAgICAgICAgeDogeF8sXG5cdCAgICAgICAgICAgICAgICB5OiB5X1xuXHQgICAgICAgICAgICAgIH0sXG5cdCAgICAgICAgICAgICAgYjoge1xuXHQgICAgICAgICAgICAgICAgeDogeCxcblx0ICAgICAgICAgICAgICAgIHk6IHlcblx0ICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH07XG5cdCAgICAgICAgICAgIGlmIChjbGlwTGluZShsKSkge1xuXHQgICAgICAgICAgICAgIGlmICghdl8pIHtcblx0ICAgICAgICAgICAgICAgIGxpc3RlbmVyLmxpbmVTdGFydCgpO1xuXHQgICAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQobC5hLngsIGwuYS55KTtcblx0ICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQobC5iLngsIGwuYi55KTtcblx0ICAgICAgICAgICAgICBpZiAoIXYpIGxpc3RlbmVyLmxpbmVFbmQoKTtcblx0ICAgICAgICAgICAgICBjbGVhbiA9IGZhbHNlO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKHYpIHtcblx0ICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lU3RhcnQoKTtcblx0ICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludCh4LCB5KTtcblx0ICAgICAgICAgICAgICBjbGVhbiA9IGZhbHNlO1xuXHQgICAgIC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GVudFsxXVswXSwgeTAgPSBleHRlbnRbMF1bMV0sIHkxID0gZXh0ZW50WzFdWzFdLCBsU2l0ZSA9IGVkZ2UubCwgclNpdGUgPSBlZGdlLnIsIGx4ID0gbFNpdGUueCwgbHkgPSBsU2l0ZS55LCByeCA9IHJTaXRlLngsIHJ5ID0gclNpdGUueSwgZnggPSAobHggKyByeCkgLyAyLCBmeSA9IChseSArIHJ5KSAvIDIsIGZtLCBmYjtcblx0ICAgIGlmIChyeSA9PT0gbHkpIHtcblx0ICAgICAgaWYgKGZ4IDwgeDAgfHwgZnggPj0geDEpIHJldHVybjtcblx0ICAgICAgaWYgKGx4ID4gcngpIHtcblx0ICAgICAgICBpZiAoIXZhKSB2YSA9IHtcblx0ICAgICAgICAgIHg6IGZ4LFxuXHQgICAgICAgICAgeTogeTBcblx0ICAgICAgICB9OyBlbHNlIGlmICh2YS55ID49IHkxKSByZXR1cm47XG5cdCAgICAgICAgdmIgPSB7XG5cdCAgICAgICAgICB4OiBmeCxcblx0ICAgICAgICAgIHk6IHkxXG5cdCAgICAgICAgfTtcblx0ICAgICAgfSBlbHNlIHtcblx0ICAgICAgICBpZiAoIXZhKSB2YSA9IHtcblx0ICAgICAgICAgIHg6IGZ4LFxuXHQgICAgICAgICAgeTogeTFcblx0ICAgICAgICB9OyBlbHNlIGlmICh2YS55IDwgeTApIHJldHVybjtcblx0ICAgICAgICB2YiA9IHtcblx0ICAgICAgICAgIHg6IGZ4LFxuXHQgICAgICAgICAgeTogeTBcblx0ICAgICAgICB9O1xuXHQgICAgICB9XG5cdCAgICB9IGVsc2Uge1xuXHQgICAgICBmbSA9IChseCAtIHJ4KSAvIChyeSAtIGx5KTtcblx0ICAgICAgZmIgPSBmeSAtIGZtICogZng7XG5cdCAgICAgIGlmIChmbSA8IC0xIHx8IGZtID4gMSkge1xuXHQgICAgICAgIGlmIChseCA+IHJ4KSB7XG5cdCAgICAgICAgICBpZiAoIXZhKSB2YSA9IHtcblx0ICAgICAgICAgICAgeDogKHkwIC0gZmIpIC8gZm0sXG5cdCAgICAgICAgICAgIHk6IHkwXG5cdCAgICAgICAgICB9OyBlbHNlIGlmICh2YS55ID49IHkxKSByZXR1cm47XG5cdCAgICAgICAgICB2YiA9IHtcblx0ICAgICAgICAgICAgeDogKHkxIC0gZmIpIC8gZm0sXG5cdCAgICAgICAgICAgIHk6IHkxXG5cdCAgICAgICAgICB9O1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICBpZiAoIXZhKSB2YSA9IHtcblx0ICAgICAgICAgICAgeDogKHkxIC0gZmIpIC8gZm0sXG5cdCAgICAgICAgICAgIHk6IHkxXG5cdCAgICAgICAgICB9OyBlbHNlIGlmICh2YS55IDwgeTApIHJldHVybjtcblx0ICAgICAgICAgIHZiID0ge1xuXHQgICAgICAgICAgICB4OiAoeTAgLSBmYikgLyBmbSxcblx0ICAgICAgICAgICAgeTogeTBcblx0ICAgICAgICAgIH07XG5cdCAgICAgICAgfVxuXHQgICAgICB9IGVsc2Uge1xuXHQgICAgICAgIGlmIChseSA8IHJ5KSB7XG5cdCAgICAgICAgICBpZiAoIXZhKSB2YSA9IHtcblx0ICAgICAgICAgICAgeDogeDAsXG5cdCAgICAgICAgICAgIHk6IGZtICogeDAgKyBmYlxuXHQgICAgICAgICAgfTsgZWxzZSBpZiAodmEueCA+PSB4MSkgcmV0dXJuO1xuXHQgICAgICAgICAgdmIgPSB7XG5cdCAgICAgICAgICAgIHg6IHgxLFxuXHQgICAgICAgICAgICB5OiBmbSAqIHgxICsgZmJcblx0ICAgICAgICAgIH07XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgIGlmICghdmEpIHZhID0ge1xuXHQgICAgICAgICAgICB4OiB4MSxcblx0ICAgICAgICAgICAgeTogZm0gKiB4MSArIGZiXG5cdCAgICAgICAgICB9OyBlbHNlIGlmICh2YS54IDwgeDApIHJldHVybjtcblx0ICAgICAgICAgIHZiID0ge1xuXHQgICAgICAgICAgICB4OiB4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NsZS5DID0gZmFsc2U7XG5cdCAgICAgICAgICAgIGdyYW5kcGEuQyA9IHRydWU7XG5cdCAgICAgICAgICAgIGFmdGVyID0gZ3JhbmRwYTtcblx0ICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIGlmIChhZnRlciA9PT0gcGFyZW50LlIpIHtcblx0ICAgICAgICAgICAgICBkM19nZW9tX3Zvcm9ub2lSZWRCbGFja1JvdGF0ZUxlZnQodGhpcywgcGFyZW50KTtcblx0ICAgICAgICAgICAgICBhZnRlciA9IHBhcmVudDtcblx0ICAgICAgICAgICAgICBwYXJlbnQgPSBhZnRlci5VO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHBhcmVudC5DID0gZmFsc2U7XG5cdCAgICAgICAgICAgIGdyYW5kcGEuQyA9IHRydWU7XG5cdCAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlUmlnaHQodGhpcywgZ3JhbmRwYSk7XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgIHVuY2xlID0gZ3JhbmRwYS5MO1xuXHQgICAgICAgICAgaWYgKHVuY2xlICYmIHVuY2xlLkMpIHtcblx0ICAgICAgICAgICAgcGFyZW50LkMgPSB1bmNsZS5DID0gZmFsc2U7XG5cdCAgICAgICAgICAgIGdyYW5kcGEuQyA9IHRydWU7XG5cdCAgICAgICAgICAgIGFmdGVyID0gZ3JhbmRwYTtcblx0ICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIGlmIChhZnRlciA9PT0gcGFyZW50LkwpIHtcblx0ICAgICAgICAgICAgICBkM19nZW9tX3Zvcm9ub2lSZWRCbGFja1JvdGF0ZVJpZ2h0KHRoaXMsIHBhcmVudCk7XG5cdCAgICAgICAgICAgICAgYWZ0ZXIgPSBwYXJlbnQ7XG5cdCAgICAgICAgICAgICAgcGFyZW50ID0gYWZ0ZXIuVTtcblx0ICAgICAgIC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C5MID0gbGVmdDtcblx0ICAgICAgICBsZWZ0LlUgPSBuZXh0O1xuXHQgICAgICAgIGlmIChuZXh0ICE9PSByaWdodCkge1xuXHQgICAgICAgICAgcGFyZW50ID0gbmV4dC5VO1xuXHQgICAgICAgICAgbmV4dC5VID0gbm9kZS5VO1xuXHQgICAgICAgICAgbm9kZSA9IG5leHQuUjtcblx0ICAgICAgICAgIHBhcmVudC5MID0gbm9kZTtcblx0ICAgICAgICAgIG5leHQuUiA9IHJpZ2h0O1xuXHQgICAgICAgICAgcmlnaHQuVSA9IG5leHQ7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgIG5leHQuVSA9IHBhcmVudDtcblx0ICAgICAgICAgIHBhcmVudCA9IG5leHQ7XG5cdCAgICAgICAgICBub2RlID0gbmV4dC5SO1xuXHQgICAgICAgIH1cblx0ICAgICAgfSBlbHNlIHtcblx0ICAgICAgICByZWQgPSBub2RlLkM7XG5cdCAgICAgICAgbm9kZSA9IG5leHQ7XG5cdCAgICAgIH1cblx0ICAgICAgaWYgKG5vZGUpIG5vZGUuVSA9IHBhcmVudDtcblx0ICAgICAgaWYgKHJlZCkgcmV0dXJuO1xuXHQgICAgICBpZiAobm9kZSAmJiBub2RlLkMpIHtcblx0ICAgICAgICBub2RlLkMgPSBmYWxzZTtcblx0ICAgICAgICByZXR1cm47XG5cdCAgICAgIH1cblx0ICAgICAgZG8ge1xuXHQgICAgICAgIGlmIChub2RlID09PSB0aGlzLl8pIGJyZWFrO1xuXHQgICAgICAgIGlmIChub2RlID09PSBwYXJlbnQuTCkge1xuXHQgICAgICAgICAgc2libGluZyA9IHBhcmVudC5SO1xuXHQgICAgICAgICAgaWYgKHNpYmxpbmcuQykge1xuXHQgICAgICAgICAgICBzaWJsaW5nLkMgPSBmYWxzZTtcblx0ICAgICAgICAgICAgcGFyZW50LkMgPSB0cnVlO1xuXHQgICAgICAgICAgICBkM19nZW9tX3Zvcm9ub2lSZWRCbGFja1JvdGF0ZUxlZnQodGhpcywgcGFyZW50KTtcblx0ICAgICAgICAgICAgc2libGluZyA9IHBhcmVudC5SO1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgICAgaWYgKHNpYmxpbmcuTCAmJiBzaWJsaW5nLkwuQyB8fCBzaWJsaW5nLlIgJiYgc2libGluZy5SLkMpIHtcblx0ICAgICAgICAgICAgaWYgKCFzaWJsaW5nLlIgfHwgIXNpYmxpbmcuUi5DKSB7XG5cdCAgICAgICAgICAgICAgc2libGluZy5MLkMgPSBmYWxzZTtcblx0ICAgICAgICAgICAgICBzaWJsaW5nLkMgPSB0cnVlO1xuXHQgICAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlUmlnaHQodGhpcywgc2libGluZyk7XG5cdCAgICAgICAgICAgICAgc2libGluZyA9IHBhcmVudC5SO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHNpYmxpbmcuQyA9IHBhcmVudC5DO1xuXHQgICAgICAgICAgICBwYXJlbnQuQyA9IHNpYmxpbmcuUi5DID0gZmFsc2U7XG5cdCAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlTGVmdCh0aGlzLCBwYXJlbnQpO1xuXHQgICAgICAgICAgICBub2RlID0gdGhpcy5fO1xuXHQgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICAgIH1cblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgc2libGluZyA9IHBhcmVudC5MO1xuXHQgICAgICAgICAgaWYgKHNpYmxpbmcuQykge1xuXHQgICAgICAgICAgICBzaWJsaW5nLkMgPSBmYWxzZTtcblx0ICAgICAgICAgICAgcGFyZW50LkMgPSB0cnVlO1xuXHQgICAgICAgICAgICBkM19nZW9tX3Zvcm9ub2lSZWRCbGFja1JvdGF0ZVJpZ2h0KHRoaXMsIHBhcmVudCk7XG5cdCAgICAgICAgICAgIHNpYmxpbmcgPSBwYXJlbnQuTDtcblx0ICAgICAgICAgIH1cblx0ICAgICAgICAgIGlmIChzaWJsaW5nLkwgJiYgc2libGluZy5MLkMgfHwgc2libGluZy5SICYmIHNpYmxpbmcuUi5DKSB7XG5cdCAgICAgICAgICAgIGlmICghc2libGluZy5MIHx8ICFzaWJsaW5nLkwuQykge1xuXHQgICAgICAgICAgICAgIHNpYmxpbmcuUi5DID0gZmFsc2U7XG5cdCAgICAgICAgICAgICAgc2libGluZy5DID0gdHJ1ZTtcblx0ICAgICAgICAgICAgICBkM19nZW9tX3Zvcm9ub2lSZWRCbGFja1JvdGF0ZUxlZnQodGhpcywgc2libGluZyk7XG5cdCAgICAgICAgICAgICAgc2libGluZyA9IHBhcmVudC5MO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHNpYmxpbmcuQyA9IHBhcmVudC5DO1xuXHQgICAgICAgICAgICBwYXJlbnQuQyA9IHNpYmxpbmcuTC5DID0gZmFsc2U7XG5cdCAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlUmlnaHQodGhpcywgcGFyZW50KTtcblx0ICAgICAgICAgICAgbm9kZSA9IHRoaXMuXztcblx0ICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHNpYmxpbmcuQyA9IHRydWU7XG5cdCAgICAgICAgbm9kZSA9IHBhcmVudDtcblx0ICAgICAgICBwYXJlbnQgPSBwYXJlbnQuVTtcblx0ICAgICAgfSB3aGlsZSAoIW5vZGUuQyk7XG5cdCAgICAgIGlmIChub2RlKSBub2RlLkMgPSBmYWxzZTtcblx0ICAgIH1cblx0ICB9O1xuXHQgIGZ1bmN0aW9uIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlTGVmdCh0cmVlLCBub2RlKSB7XG5cdCAgICB2YXIgcCA9IG5vZGUsIHEgPSBub2RlLlIsIHBhcmVudCA9IHAuVTtcblx0ICAgIGlmIChwYXJlbnQpIHtcblx0ICAgICAga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g6IGRqLFxuXHQgICAgICAgICAgICBzdGFydEFuZ2xlOiBhMCxcblx0ICAgICAgICAgICAgZW5kQW5nbGU6IGExLFxuXHQgICAgICAgICAgICB2YWx1ZTogdlxuXHQgICAgICAgICAgfTtcblx0ICAgICAgICB9XG5cdCAgICAgICAgZ3JvdXBzW2RpXSA9IHtcblx0ICAgICAgICAgIGluZGV4OiBkaSxcblx0ICAgICAgICAgIHN0YXJ0QW5nbGU6IHgwLFxuXHQgICAgICAgICAgZW5kQW5nbGU6IHgsXG5cdCAgICAgICAgICB2YWx1ZTogZ3JvdXBTdW1zW2RpXVxuXHQgICAgICAgIH07XG5cdCAgICAgICAgeCArPSBwYWRkaW5nO1xuXHQgICAgICB9XG5cdCAgICAgIGkgPSAtMTtcblx0ICAgICAgd2hpbGUgKCsraSA8IG4pIHtcblx0ICAgICAgICBqID0gaSAtIDE7XG5cdCAgICAgICAgd2hpbGUgKCsraiA8IG4pIHtcblx0ICAgICAgICAgIHZhciBzb3VyY2UgPSBzdWJncm91cHNbaSArIFwiLVwiICsgal0sIHRhcmdldCA9IHN1Ymdyb3Vwc1tqICsgXCItXCIgKyBpXTtcblx0ICAgICAgICAgIGlmIChzb3VyY2UudmFsdWUgfHwgdGFyZ2V0LnZhbHVlKSB7XG5cdCAgICAgICAgICAgIGNob3Jkcy5wdXNoKHNvdXJjZS52YWx1ZSA8IHRhcmdldC52YWx1ZSA/IHtcblx0ICAgICAgICAgICAgICBzb3VyY2U6IHRhcmdldCxcblx0ICAgICAgICAgICAgICB0YXJnZXQ6IHNvdXJjZVxuXHQgICAgICAgICAgICB9IDoge1xuXHQgICAgICAgICAgICAgIHNvdXJjZTogc291cmNlLFxuXHQgICAgICAgICAgICAgIHRhcmdldDogdGFyZ2V0XG5cdCAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgIH1cblx0ICAgICAgfVxuXHQgICAgICBpZiAoc29ydENob3JkcykgcmVzb3J0KCk7XG5cdCAgICB9XG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nRpY2sgPSBmdW5jdGlvbigpIHtcblx0ICAgICAgaWYgKChhbHBoYSAqPSAuOTkpIDwgLjAwNSkge1xuXHQgICAgICAgIHRpbWVyID0gbnVsbDtcblx0ICAgICAgICBldmVudC5lbmQoe1xuXHQgICAgICAgICAgdHlwZTogXCJlbmRcIixcblx0ICAgICAgICAgIGFscGhhOiBhbHBoYSA9IDBcblx0ICAgICAgICB9KTtcblx0ICAgICAgICByZXR1cm4gdHJ1ZTtcblx0ICAgICAgfVxuXHQgICAgICB2YXIgbiA9IG5vZGVzLmxlbmd0aCwgbSA9IGxpbmtzLmxlbmd0aCwgcSwgaSwgbywgcywgdCwgbCwgaywgeCwgeTtcblx0ICAgICAgZm9yIChpID0gMDsgaSA8IG07ICsraSkge1xuXHQgICAgICAgIG8gPSBsaW5rc1tpXTtcblx0ICAgICAgICBzID0gby5zb3VyY2U7XG5cdCAgICAgICAgdCA9IG8udGFyZ2V0O1xuXHQgICAgICAgIHggPSB0LnggLSBzLng7XG5cdCAgICAgICAgeSA9IHQueSAtIHMueTtcblx0ICAgICAgICBpZiAobCA9IHggKiB4ICsgeSAqIHkpIHtcblx0ICAgICAgICAgIGwgPSBhbHBoYSAqIHN0cmVuZ3Roc1tpXSAqICgobCA9IE1hdGguc3FydChsKSkgLSBkaXN0YW5jZXNbaV0pIC8gbDtcblx0ICAgICAgICAgIHggKj0gbDtcblx0ICAgICAgICAgIHkgKj0gbDtcblx0ICAgICAgICAgIHQueCAtPSB4ICogKGsgPSBzLndlaWdodCArIHQud2VpZ2h0ID8gcy53ZWlnaHQgLyAocy53ZWlnaHQgKyB0LndlaWdodCkgOiAuNSk7XG5cdCAgICAgICAgICB0LnkgLT0geSAqIGs7XG5cdCAgICAgICAgICBzLnggKz0geCAqIChrID0gMSAtIGspO1xuXHQgICAgICAgICAgcy55ICs9IHkgKiBrO1xuXHQgICAgICAgIH1cblx0ICAgICAgfVxuXHQgICAgICBpZiAoayA9IGFscGhhICogZ3Jhdml0eSkge1xuXHQgICAgICAgIHggPSBzaXplWzBdIC8gMjtcblx0ICAgICAgICB5ID0gc2l6ZVsxXSAvIDI7XG5cdCAgICAgICAgaSA9IC0xO1xuXHQgICAgICAgIGlmIChrKSB3aGlsZSAoKytpIDwgbikge1xuXHQgICAgICAgICAgbyA9IG5vZGVzW2ldO1xuXHQgICAgICAgICAgby54ICs9ICh4IC0gby54KSAqIGs7XG5cdCAgICAgICAgICBvLnkgKz0gKHkgLSBvLnkpICogaztcblx0ICAgICAgICB9XG5cdCAgICAgIH1cblx0ICAgICAgaWYgKGNoYXJnZSkge1xuXHQgICAgICAgIGQzX2xheW91dF9mb3JjZUFjY3VtdWxhdGUocSA9IGQzLmdlb20ucXVhZHRyZWUobm9kZXMpLCBhbHBoYSwgY2hhcmdlcyk7XG5cdCAgICAgICAgaSA9IC0xO1xuXHQgICAgICAgIHdoaWxlICgrK2kgPCBuKSB7XG5cdCAgICAgICAgICBpZiAoIShvID0gbm9kZXNbaV0pLmZpeGVkKSB7XG5cdCAgICAgICAgICAgIHEudmlzaXQocmVwdWxzZShvKSk7XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgfVxuXHQgICAgICB9XG5cdCAgICAgIGkgPSAtMTtcblx0ICAgICAgd2hpbGUgKCsraSA8IG4pIHtcblx0ICAgICAgICBvID0gbm9kZXNbaV07XG5cdCAgICAgICAgaWYgKG8uZml4ZWQpIHtcblx0ICAgICAgICAgIG8ueCA9IG8ucHg7XG5cdCAgICAgICAgICBvLnkgPSBvLnB5O1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICBvLnggLT0gKG8ucHggLSAoby5weCA9IG8ueCkpICogZnJpY3Rpb247XG5cdCAgICAgICAgICBvLnkgLT0gKG8ucHkgLSAoby5weSA9IG8ueSkpICogZnJpY3Rpb247XG5cdCAgICAgICAgfVxuXHQgICAgICB9XG5cdCAgICAgIGV2ZW50LnRpY2soe1xuXHQgICAgICAgIHR5cGU6IFwidGlja1wiLFxuXHQgICA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XHQgICAgZm9yY2UuYWxwaGEgPSBmdW5jdGlvbih4KSB7XG5cdCAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIGFscGhhO1xuXHQgICAgICB4ID0gK3g7XG5cdCAgICAgIGlmIChhbHBoYSkge1xuXHQgICAgICAgIGlmICh4ID4gMCkge1xuXHQgICAgICAgICAgYWxwaGEgPSB4O1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICB0aW1lci5jID0gbnVsbCwgdGltZXIudCA9IE5hTiwgdGltZXIgPSBudWxsO1xuXHQgICAgICAgICAgZXZlbnQuZW5kKHtcblx0ICAgICAgICAgICAgdHlwZTogXCJlbmRcIixcblx0ICAgICAgICAgICAgYWxwaGE6IGFscGhhID0gMFxuXHQgICAgICAgICAgfSk7XG5cdCAgICAgICAgfVxuXHQgICAgICB9IGVsc2UgaWYgKHggPiAwKSB7XG5cdCAgICAgICAgZXZlbnQuc3RhcnQoe1xuXHQgICAgICAgICAgdHlwZTogXCJzdGFydFwiLFxuXHQgICAgICAgICAgYWxwaGE6IGFscGhhID0geFxuXHQgICAgICAgIH0pO1xuXHQgICAgICAgIHRpbWVyID0gZDNfdGltZXIoZm9yY2UudGljayk7XG5cdCAgICAgIH1cblx0ICAgICAgcmV0dXJuIGZvcmNlO1xuXHQgICAgfTtcblx0ICAgIGZvcmNlLnN0YXJ0ID0gZnVuY3Rpb24oKSB7XG5cdCAgICAgIHZhciBpLCBuID0gbm9kZXMubGVuZ3RoLCBtID0gbGlua3MubGVuZ3RoLCB3ID0gc2l6ZVswXSwgaCA9IHNpemVbMV0sIG5laWdoYm9ycywgbztcblx0ICAgICAgZm9yIChpID0gMDsgaSA8IG47ICsraSkge1xuXHQgICAgICAgIChvID0gbm9kZXNbaV0pLmluZGV4ID0gaTtcblx0ICAgICAgICBvLndlaWdodCA9IDA7XG5cdCAgICAgIH1cblx0ICAgICAgZm9yIChpID0gMDsgaSA8IG07ICsraSkge1xuXHQgICAgICA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b3IgKGogPSBiLl9wYWNrX25leHQ7IGogIT09IGI7IGogPSBqLl9wYWNrX25leHQsIHMxKyspIHtcblx0ICAgICAgICAgICAgaWYgKGQzX2xheW91dF9wYWNrSW50ZXJzZWN0cyhqLCBjKSkge1xuXHQgICAgICAgICAgICAgIGlzZWN0ID0gMTtcblx0ICAgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgfVxuXHQgICAgICAgICAgaWYgKGlzZWN0ID09IDEpIHtcblx0ICAgICAgICAgICAgZm9yIChrID0gYS5fcGFja19wcmV2OyBrICE9PSBqLl9wYWNrX3ByZXY7IGsgPSBrLl9wYWNrX3ByZXYsIHMyKyspIHtcblx0ICAgICAgICAgICAgICBpZiAoZDNfbGF5b3V0X3BhY2tJbnRlcnNlY3RzKGssIGMpKSB7XG5cdCAgICAgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgIH1cblx0ICAgICAgICAgIGlmIChpc2VjdCkge1xuXHQgICAgICAgICAgICBpZiAoczEgPCBzMiB8fCBzMSA9PSBzMiAmJiBiLnIgPCBhLnIpIGQzX2xheW91dF9wYWNrU3BsaWNlKGEsIGIgPSBqKTsgZWxzZSBkM19sYXlvdXRfcGFja1NwbGljZShhID0gaywgYik7XG5cdCAgICAgICAgICAgIGktLTtcblx0ICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIGQzX2xheW91dF9wYWNrSW5zZXJ0KGEsIGMpO1xuXHQgICAgICAgICAgICBiID0gYztcblx0ICAgICAgICAgICAgYm91bmQoYyk7XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgfVxuXHQgICAgICB9XG5cdCAgICB9XG5cdCAgICB2YXIgY3ggPSAoeE1pbiArIHhNYXgpIC8gMiwgY3kgPSAoeU1pbiArIHlNYXgpIC8gMiwgY3IgPSAwO1xuXHQgICAgZm9yIChpID0gMDsgaSA8IG47IGk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vb3QxID0ge1xuXHQgICAgICAgIEE6IG51bGwsXG5cdCAgICAgICAgY2hpbGRyZW46IFsgcm9vdDAgXVxuXHQgICAgICB9LCBxdWV1ZSA9IFsgcm9vdDEgXSwgbm9kZTE7XG5cdCAgICAgIHdoaWxlICgobm9kZTEgPSBxdWV1ZS5wb3AoKSkgIT0gbnVsbCkge1xuXHQgICAgICAgIGZvciAodmFyIGNoaWxkcmVuID0gbm9kZTEuY2hpbGRyZW4sIGNoaWxkLCBpID0gMCwgbiA9IGNoaWxkcmVuLmxlbmd0aDsgaSA8IG47ICsraSkge1xuXHQgICAgICAgICAgcXVldWUucHVzaCgoY2hpbGRyZW5baV0gPSBjaGlsZCA9IHtcblx0ICAgICAgICAgICAgXzogY2hpbGRyZW5baV0sXG5cdCAgICAgICAgICAgIHBhcmVudDogbm9kZTEsXG5cdCAgICAgICAgICAgIGNoaWxkcmVuOiAoY2hpbGQgPSBjaGlsZHJlbltpXS5jaGlsZHJlbikgJiYgY2hpbGQuc2xpY2UoKSB8fCBbXSxcblx0ICAgICAgICAgICAgQTogbnVsbCxcblx0ICAgICAgICAgICAgYTogbnVsbCxcblx0ICAgICAgICAgICAgejogMCxcblx0ICAgICAgICAgICAgbTogMCxcblx0ICAgICAgICAgICAgYzogMCxcblx0ICAgICAgICAgICAgczogMCxcblx0ICAgICAgICAgICAgdDogbnVsbCxcblx0ICAgICAgICAgICAgaTogaVxuXHQgICAgICAgICAgfSkuYSA9IGNoaWxkKTtcblx0ICAgICAgICB9XG5cdCAgICAgIH1cblx0ICAgICAgcmV0dXJuIHJvb3QxLmNoaWxkcmVuWzBdO1xuXHQgICAgfVxuXHQgICAgZnVuY3Rpb24gZmlyc3RXYWxrKHYpIHtcblx0ICAgICAgdmFyIGNoaWxkcmVuID0gdi5jaGlsZHJlbiwgc2libGluZ3MgPSB2LnBhcmVudC5jaGlsZHJlbiwgdyA9IHYuaSA/IHNpYmxpbmdzW3YuaSAtIDFdIDogbnVsbDtcblx0ICAgICA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lZnQodmlwKSwgdmltICYmIHZpcCkge1xuXHQgICAgICAgICAgdm9tID0gZDNfbGF5b3V0X3RyZWVMZWZ0KHZvbSk7XG5cdCAgICAgICAgICB2b3AgPSBkM19sYXlvdXRfdHJlZVJpZ2h0KHZvcCk7XG5cdCAgICAgICAgICB2b3AuYSA9IHY7XG5cdCAgICAgICAgICBzaGlmdCA9IHZpbS56ICsgc2ltIC0gdmlwLnogLSBzaXAgKyBzZXBhcmF0aW9uKHZpbS5fLCB2aXAuXyk7XG5cdCAgICAgICAgICBpZiAoc2hpZnQgPiAwKSB7XG5cdCAgICAgICAgICAgIGQzX2xheW91dF90cmVlTW92ZShkM19sYXlvdXRfdHJlZUFuY2VzdG9yKHZpbSwgdiwgYW5jZXN0b3IpLCB2LCBzaGlmdCk7XG5cdCAgICAgICAgICAgIHNpcCArPSBzaGlmdDtcblx0ICAgICAgICAgICAgc29wICs9IHNoaWZ0O1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgICAgc2ltICs9IHZpbS5tO1xuXHQgICAgICAgICAgc2lwICs9IHZpcC5tO1xuXHQgICAgICAgICAgc29tICs9IHZvbS5tO1xuXHQgICAgICAgICAgc29wICs9IHZvcC5tO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAodmltICYmICFkM19sYXlvdXRfdHJlZVJpZ2h0KHZvcCkpIHtcblx0ICAgICAgICAgIHZvcC50ID0gdmltO1xuXHQgICAgICAgICAgdm9wLm0gKz0gc2ltIC0gc29wO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAodmlwICYmICFkM19sYXlvdXRfdHJlZUxlZnQodm9tKSkge1xuXHQgICAgICAgICAgdm9tLnQgPSB2aXA7XG5cdCAgICAgICAgICB2b20ubSArPSBzaXAgLSBzb207XG5cdCAgICAgICAgICBhbmNlc3RvciA9IHY7XG5cdCAgICAgICAgfVxuXHQgICAgICB9XG5cdCAgICAgIHJldHVybiBhbmNlc3Rvcjtcblx0ICAgIH1cblx0ICAgIGZ1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aXR5LCBzY29yZSwgdSA9IG1vZGUgPT09IFwic2xpY2VcIiA/IHJlY3QuZHggOiBtb2RlID09PSBcImRpY2VcIiA/IHJlY3QuZHkgOiBtb2RlID09PSBcInNsaWNlLWRpY2VcIiA/IG5vZGUuZGVwdGggJiAxID8gcmVjdC5keSA6IHJlY3QuZHggOiBNYXRoLm1pbihyZWN0LmR4LCByZWN0LmR5KSwgbjtcblx0ICAgICAgICBzY2FsZShyZW1haW5pbmcsIHJlY3QuZHggKiByZWN0LmR5IC8gbm9kZS52YWx1ZSk7XG5cdCAgICAgICAgcm93LmFyZWEgPSAwO1xuXHQgICAgICAgIHdoaWxlICgobiA9IHJlbWFpbmluZy5sZW5ndGgpID4gMCkge1xuXHQgICAgICAgICAgcm93LnB1c2goY2hpbGQgPSByZW1haW5pbmdbbiAtIDFdKTtcblx0ICAgICAgICAgIHJvdy5hcmVhICs9IGNoaWxkLmFyZWE7XG5cdCAgICAgICAgICBpZiAobW9kZSAhPT0gXCJzcXVhcmlmeVwiIHx8IChzY29yZSA9IHdvcnN0KHJvdywgdSkpIDw9IGJlc3QpIHtcblx0ICAgICAgICAgICAgcmVtYWluaW5nLnBvcCgpO1xuXHQgICAgICAgICAgICBiZXN0ID0gc2NvcmU7XG5cdCAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByb3cuYXJlYSAtPSByb3cucG9wKCkuYXJlYTtcblx0ICAgICAgICAgICAgcG9zaXRpb24ocm93LCB1LCByZWN0LCBmYWxzZSk7XG5cdCAgICAgICAgICAgIHUgPSBNYXRoLm1pbihyZWN0LmR4LCByZWN0LmR5KTtcblx0ICAgICAgICAgICAgcm93Lmxlbmd0aCA9IHJvdy5hcmVhID0gMDtcblx0ICAgICAgICAgICAgYmVzdCA9IEluZmluaXR5O1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAocm93Lmxlbmd0aCkge1xuXHQgICAgICAgICAgcG9zaXRpb24ocm93LCB1LCByZ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ID0gSW5maW5pdHksIGkgPSAtMSwgbiA9IHJvdy5sZW5ndGg7XG5cdCAgICAgIHdoaWxlICgrK2kgPCBuKSB7XG5cdCAgICAgICAgaWYgKCEociA9IHJvd1tpXS5hcmVhKSkgY29udGludWU7XG5cdCAgICAgICAgaWYgKHIgPCBybWluKSBybWluID0gcjtcblx0ICAgICAgICBpZiAociA+IHJtYXgpIHJtYXggPSByO1xuXHQgICAgICB9XG5cdCAgICAgIHMgKj0gcztcblx0ICAgICAgdSAqPSB1O1xuXHQgICAgICByZXR1cm4gcyA/IE1hdGgubWF4KHUgKiBybWF4ICogcmF0aW8gLyBzLCBzIC8gKHUgKiBybWluICogcmF0aW8pKSA6IEluZmluaXR5O1xuXHQgICAgfVxuXHQgICAgZnVuY3Rpb24gcG9zaXRpb24ocm93LCB1LCByZWN0LCBmbHVzaCkge1xuXHQgICAgICB2YXIgaSA9IC0xLCBuID0gcm93Lmxlbmd0aCwgeCA9IHJlY3QueCwgeSA9IHJlY3QueSwgdiA9IHUgPyByb3VuZChyb3cuYXJlYSAvIHUpIDogMCwgbztcblx0ICAgICAgaWYgKHUgPT0gcmVjdC5keCkge1xuXHQgICAgICAgIGlmIChmbHVzaCB8fCB2ID4gcmVjdC5keSkgdiA9IHJlY3QuZHk7XG5cdCAgICAgICAgd2hpbGUgKCsraSA8IG4pIHtcblx0ICAgICAgICAgIG8gPSByb3dbaV07XG5cdCAgICAgICAgICBvLnggPSB4O1xuXHQgICAgICAgICAgby55ID0geTtcblx0ICAgICAgICAgIG8uZHkgPSB2O1xuXHQgICAgICAgICAgeCArPSBvLmR4ID0gTWF0aC5taW4ocmVjdC54ICsgcmVjdC5keCAtIHgsIHYgPyByb3VuZChvLmFyZWEgLyB2KSA6IDApO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBvLnogPSB0cnVlO1xuXHQgICAgICAgIG8uZHggKz0gcmVjdC54ICsgcmVjdC5keCAtIHg7XG5cdCAgICAgICAgcmVjdC55ICs9IHY7XG5cdCAgICAgICAgcmVjdC5keSAtPSB2O1xuXHQgICAgICB9IGVsc2Uge1xuXHQgICAgICAgIGlmIChmbHVzaCB8fCB2ID4gcmVjdC5keCkgdiA9IHJlY3QuZHg7XG5cdCAgICAgICAgd2hpbGUgKCsraSA8IG4pIHtcblx0ICAgICAgICAgIG8gPSByb3dbaV07XG5cdCAgICAgICAgICBvLnggPSB4O1xuXHQgICAgICAgICAgby55ID0geTtcblx0ICAgICAgICAgIG8uZHggPSB2O1xuXHQgICAgICAgICAgeSArPSBvLmR5ID0gTWF0aC5taW4ocmVjdC55ICsgcmVjdC5keSAtIHksIHYgPyByb3VuZChvLmFyZWEgLyB2KSA6IDApO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBvLnogPSBmYWxzZTtcblx0ICAgICAgICBvLmR5ICs9IHJlY3QueSArIHJlY3QuZHkgLSB5O1xuXHQgICAgICAgIHJlY3QueCArPSB2O1xuXHQgICAgICAgIHJlY3QuZHggLT0gdjtcblx0ICAgICAgfVxuXHQgICAgfVxuXHQgICAgZnVuY3Rpb24gdHJlZW1hcChkKSB7XG5cdCAgICAgIHZhciBub2RlcyA9IHN0aWNraWVzIHx8IGhpZXJhcmNoeShkKSwgcm9vdCA9IG5vZGVzWzBdO1xuXHQgICAgICByb290LnggPSByb290LnkgPSAwO1xuXHQgICAgICBpZiAocm9vdC52YWx1ZSkgcm9vdC5keCA9IHNpemVbMF0sIHJvb3QuZHkgPSBzaXplWzFdOyBlbHNlIHJvb3QuZHggPSByb290LmR5ID0gMDtcblx0ICAgICAgaWYgKHN0aWNraWVzKSBoaWVyYXJjaHkucmV2YWx1ZShyb290KTtcblx0ICAgICAgc2NhbGUoWyByb290IF0sIHJvb3QuZHggKiByb290LmR5IC8gcm9vdC52YWx1ZSk7XG5cdCAgICAgIChzdGlja2llcyA/IHN0aWNraWZ5IDogc3F1YXJpZnkpKHJvb3QpO1xuXHQgICAgICBpZiAoc3RpY2t5KSBzdGlja2llcyA9IG5vZGVzO1xuXH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EpIHtcblx0ICAgICAgICAgIHZhciBoMSA9IChhMCArIGExKSAvIDI7XG5cdCAgICAgICAgICB4MCA9IHIxICogTWF0aC5jb3MoaDEpO1xuXHQgICAgICAgICAgeTAgPSByMSAqIE1hdGguc2luKGgxKTtcblx0ICAgICAgICAgIHgxID0geTEgPSBudWxsO1xuXHQgICAgICAgIH1cblx0ICAgICAgfSBlbHNlIHtcblx0ICAgICAgICB4MCA9IHkwID0gMDtcblx0ICAgICAgfVxuXHQgICAgICBpZiAocjApIHtcblx0ICAgICAgICB4MiA9IHIwICogTWF0aC5jb3MoYTEgLSBwMCk7XG5cdCAgICAgICAgeTIgPSByMCAqIE1hdGguc2luKGExIC0gcDApO1xuXHQgICAgICAgIHgzID0gcjAgKiBNYXRoLmNvcyhhMCArIHAwKTtcblx0ICAgICAgICB5MyA9IHIwICogTWF0aC5zaW4oYTAgKyBwMCk7XG5cdCAgICAgICAgdmFyIGwwID0gTWF0aC5hYnMoYTAgLSBhMSArIDIgKiBwMCkgPD0gz4AgPyAwIDogMTtcblx0ICAgICAgICBpZiAocDAgJiYgZDNfc3ZnX2FyY1N3ZWVwKHgyLCB5MiwgeDMsIHkzKSA9PT0gMSAtIGN3IF4gbDApIHtcblx0ICAgICAgICAgIHZhciBoMCA9IChhMCArIGExKSAvIDI7XG5cdCAgICAgICAgICB4MiA9IHIwICogTWF0aC5jb3MoaDApO1xuXHQgICAgICAgICAgeTIgPSByMCAqIE1hdGguc2luKGgwKTtcblx0ICAgICAgICAgIHgzID0geTMgPSBudWxsO1xuXHQgICAgICAgIH1cblx0ICAgICAgfSBlbHNlIHtcblx0ICAgICAgICB4MiA9IHkyID0gMDtcblx0ICAgICAgfVxuXHQgICAgICBpZiAoZGEgPiDOtSAmJiAocmMgPSBNYXRoLm1pbihNYXRoLmFicyhyMSAtIHIwKSAvIDIsICtjb3JuZXJSYWRpdXMuYXBwbHkodGhpcywgYXJndW1lbnRzKSkpID4gLjAwMSkge1xuXHQgICAgICAgIGNyID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GFyZ3VtZW50cyksIGV4dGVudDEgPSB7XG5cdCAgICAgICAgICB4OiB4RXh0ZW50LFxuXHQgICAgICAgICAgeTogeUV4dGVudCxcblx0ICAgICAgICAgIGk6IHhFeHRlbnREb21haW4sXG5cdCAgICAgICAgICBqOiB5RXh0ZW50RG9tYWluXG5cdCAgICAgICAgfSwgZXh0ZW50MCA9IHRoaXMuX19jaGFydF9fIHx8IGV4dGVudDE7XG5cdCAgICAgICAgdGhpcy5fX2NoYXJ0X18gPSBleHRlbnQxO1xuXHQgICAgICAgIGlmIChkM190cmFuc2l0aW9uSW5oZXJpdElkKSB7XG5cdCAgICAgICAgICBkMy5zZWxlY3QodGhpcykudHJhbnNpdGlvbigpLmVhY2goXCJzdGFydC5icnVzaFwiLCBmdW5jdGlvbigpIHtcblx0ICAgICAgICAgICAgeEV4dGVudERvbWFpbiA9IGV4dGVudDAuaTtcblx0ICAgICAgICAgICAgeUV4dGVudERvbWFpbiA9IGV4dGVudDAuajtcblx0ICAgICAgICAgICAgeEV4dGVudCA9IGV4dGVudDAueDtcblx0ICAgICAgICAgICAgeUV4dGVudCA9IGV4dGVudDAueTtcblx0ICAgICAgICAgICAgZXZlbnRfKHtcblx0ICAgICAgICAgICAgICB0eXBlOiBcImJydXNoc3RhcnRcIlxuXHQgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgIH0pLnR3ZWVuKFwiYnJ1c2g6YnJ1c2hcIiwgZnVuY3Rpb24oKSB7XG5cdCAgICAgICAgICAgIHZhciB4aSA9IGQzX2ludGVycG9sYXRlQXJyYXkoeEV4dGVudCwgZXh0ZW50MS54KSwgeWkgPSBkM19pbnRlcnBvbGF0ZUFycmF5KHlFeHRlbnQsIGV4dGVudDEueSk7XG5cdCAgICAgICAgICAgIHhFeHRlbnREb21haW4gPSB5RXh0ZW50RG9tYWluID0gbnVsbDtcblx0ICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uKHQpIHtcblx0ICAgICAgICAgICAgICB4RXh0ZW50ID0gZXh0ZW50MS54ID0geGkodCk7XG5cdCAgICAgICAgICAgICAgeUV4dGVudCA9IGV4dGVudDEueSA9IHlpKHQpO1xuXHQgICAgICAgICAgICAgIGV2ZW50Xyh7XG5cdCAgICAgICAgICAgICAgICB0eXBlOiBcImJydXNoXCIsXG5cdCAgICAgICAgICAgICAgICBtb2RlOiBcInJlc2l6ZVwiXG5cdCAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgIH07XG5cdCAgICAgICAgICB9KS5lYWNoKFwiZW5kLmJydXNoXCIsIGZ1bmN0aW9uKCkge1xuXHQgICAgICAgICAgICB4RXh0ZW50RG9tYWluID0gZXh0ZW50MS5pO1xuXHQgICAgICAgICAgICB5RXh0ZW50RG9tYWluID0gZXh0ZW50MS5qO1xuXHQgICAgICAgICAgICBldmVudF8oe1xuXHQgICAgICAgICAgICAgIHR5cGU6IFwiYnJ1c2hcIixcblx0ICAgICAgICAgICAgICBtb2RlOiBcInJlc2l6ZVwiXG5cdCAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICBldmVudF8oe1xuXHQgICAgICAgICAgICAgIHR5cGU6IFwiYnJ1c2hlbmRcIlxuXHQgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgIH0pO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICBldmVudF8oe1xuXHQgICAgICAgICAgICB0eXBlOiBcImJydXNoc3RhcnRcIlxuXHQgICAgICAgICAgfSk7XG5cdCAgICAgICAgICBldmVudF8oe1xuXHQgICAgICAgICAgICB0eXBlOiBcImJydXNoXCIsXG5cdCAgICAgICAgICAgIG1vZGU6IFwicmVzaXplXCJcblx0ICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgZXZlbnRfKHtcblx0ICAgICAgICAgICAgdHlwZTogXCJicnVzaGVuZFwiXG5cdCAgICAgICAgICB9KTtcblx0ICAgICAgICB9XG5cdCAgICAgIH0pO1xuXHQgICAgfTtcblx0ICAgIGZ1bmN0aW9uIHJl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SwgeTAsIHkxLCB0O1xuXHQgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHtcblx0ICAgICAgICBpZiAoeCkge1xuXHQgICAgICAgICAgaWYgKHhFeHRlbnREb21haW4pIHtcblx0ICAgICAgICAgICAgeDAgPSB4RXh0ZW50RG9tYWluWzBdLCB4MSA9IHhFeHRlbnREb21haW5bMV07XG5cdCAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICB4MCA9IHhFeHRlbnRbMF0sIHgxID0geEV4dGVudFsxXTtcblx0ICAgICAgICAgICAgaWYgKHguaW52ZXJ0KSB4MCA9IHguaW52ZXJ0KHgwKSwgeDEgPSB4LmludmVydCh4MSk7XG5cdCAgICAgICAgICAgIGlmICh4MSA8IHgwKSB0ID0geDAsIHgwID0geDEsIHgxID0gdDtcblx0ICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKHkpIHtcblx0ICAgICAgICAgIGlmICh5RXh0ZW50RG9tYWluKSB7XG5cdCAgICAgICAgICAgIHkwID0geUV4dGVudERvbWFpblswXSwgeTEgPSB5RXh0ZW50RG9tYWluWzFdO1xuXHQgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgeTAgPSB5RXh0ZW50WzBdLCB5MSA9IHlFeHRlbnRbMV07XG5cdCAgICAgICAgICAgIGlmICh5LmludmVydCkgeTAgPSB5LmludmVydCh5MCksIHkxID0geS5pbnZlcnQoeTEpO1xuXHQgICAgICAgICAgICBpZiAoeTEgPCB5MCkgdCA9IHkwLCB5MCA9IHkxLCB5MSA9IHQ7XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHJldHVybiB4ICYmIHkgPyBbIFsgeDAsIHkwIF0sIFsgeDEsIHkxIF0gXSA6IHggPyBbIHgwLCB4MSBdIDogeSAmJiBbIHkwLCB5MSBdO1xuXHQgICAgICB9XG5cdCAgICAgIGlmICh4KSB7XG5cdCAgICAgICAgeDAgPSB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AgICAgcmV0dXJuICfZhSc7XG5cdCAgICAgICAgfVxuXHQgICAgfSxcblx0ICAgIGNhbGVuZGFyIDoge1xuXHQgICAgICAgIHNhbWVEYXk6ICdb2KfZhNmK2YjZhSDYudmE2Ykg2KfZhNiz2KfYudipXSBMVCcsXG5cdCAgICAgICAgbmV4dERheTogJ1vYutiv2Kcg2LnZhNmJINin2YTYs9in2LnYqV0gTFQnLFxuXHQgICAgICAgIG5leHRXZWVrOiAnZGRkZCBb2LnZhNmJINin2YTYs9in2LnYqV0gTFQnLFxuXHQgICAgICAgIGxhc3REYXk6ICdb2KPZhdizINi52YTZiSDYp9mE2LPYp9i52KldIExUJyxcblx0ICAgICAgICBsYXN0V2VlazogJ2RkZGQgW9i52YTZiSDYp9mE2LPYp9i52KldIExUJyxcblx0ICAgICAgICBzYW1lRWxzZTogJ0wnXG5cdCAgICB9LFxuXHQgICAgcmVsYXRpdmVUaW1lIDoge1xuXHQgICAgICAgIGZ1dHVyZSA6ICfZgdmKICVzJyxcblx0ICAgICAgICBwYXN0IDogJ9mF2YbYsCAlcycsXG5cdCAgICAgICAgcyA6ICfYq9mI2KfZhicsXG5cdCAgICAgICAgbSA6ICfYr9mC2YrZgtipJyxcblx0ICAgICAgICBtbSA6ICclZCDYr9mC2KfYptmCJyxcblx0ICAgICAgICBoIDogJ9iz2KfYudipJyxcblx0ICAgICAgICBoaCA6ICclZCDYs9in2LnYp9iqJyxcblx0ICAgICAgICBkIDogJ9mK2YjZhScsXG5cdCAgICAgICAgZGQgOiAnJWQg2KPZitin2YUnLFxuXHQgICAgICAgIE0gOiAn2LTZh9ixJyxcblx0ICAgICAgICBNTSA6ICclZCDYo9i02YfYsScsXG5cdCAgICAgICAgeSA6ICfYs9mG2KknLFxuXHQgICAgICAgIHl5IDogJyVkINiz2YbZiNin2KonXG5cdCAgICB9LFxuXHQgICAgcHJlcGFyc2U6IGZ1bmN0aW9uIChzdHJpbmcpIHtcblx0ICAgICAgICByZXR1cm4gc3RyaW5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HQgICAgICAgICAgICAgICAgY2FzZSAzOlxuXHQgICAgICAgICAgICAgICAgY2FzZSA1OlxuXHQgICAgICAgICAgICAgICAgY2FzZSA2OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CjINC80ZbQvdGD0LvRg9GOXSBkZGRkIFvRnl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAxOlxuXHQgICAgICAgICAgICAgICAgY2FzZSAyOlxuXHQgICAgICAgICAgICAgICAgY2FzZSA0OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CjINC80ZbQvdGD0LvRi10gZGRkZCBb0Z5dIExUJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgc2FtZUVsc2U6ICdMJ1xuXHQgICAgfSxcblx0ICAgIHJlbGF0aXZlVGltZSA6IHtcblx0ICAgICAgICBmdXR1cmUgOiAn0L/RgNCw0LcgJXMnLFxuXHQgICAgICAgIHBhc3QgOiAnJXMg0YLQsNC80YMnLFxuXHQgICAgICAgIHMgOiAn0L3QtdC60LDQu9GM0LrRliDRgdC10LrRg9C90LQnLFxuXHQgICAgICAgIG0gOiByZWxhdGl2ZVRpbWVXaXRoUGx1cmFsLFxuXHQgICAgICAgIG1tIDogcmVsYXRpdmVUaW1lV2l0aFBsdXJhbCxcblx0ICAgICAgICBoIDogcmVsYXRpdmVUaW1lV2l0aFBsdXJhbCxcblx0ICAgICAgICBoaCA6IHJlbGF0aXZlVGltZVdpdGhQbHVyYWwsXG5cdCAgICAgICAgZCA6ICfQtNC30LXQvdGMJyxcblx0ICAgICAgICBkZCA6IHJlbGF0aXZlVGltZVdpdGhQbHVyYWwsXG5cdCAgICAgICAgTSA6ICfQvNC10YHRj9GGJyxcblx0ICAgICAgICBNTSA6IHJlbGF0aXZlVGltZVdpdGhQbHVyYWwsXG5cdCAgICAgICAgeSA6ICfQs9C+0LQnLFxuXHQgICAgICAgIHl5IDogcmVsYXRpdmVUaW1lV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ogJ0QuTU0uWVlZWScsXG5cdCAgICAgICAgTEwgOiAnRCBNTU1NIFlZWVknLFxuXHQgICAgICAgIExMTCA6ICdEIE1NTU0gWVlZWSBIOm1tJyxcblx0ICAgICAgICBMTExMIDogJ2RkZGQsIEQgTU1NTSBZWVlZIEg6bW0nXG5cdCAgICB9LFxuXHQgICAgY2FsZW5kYXIgOiB7XG5cdCAgICAgICAgc2FtZURheSA6ICdb0JTQvdC10YEg0LJdIExUJyxcblx0ICAgICAgICBuZXh0RGF5IDogJ1vQo9GC0YDQtSDQsl0gTFQnLFxuXHQgICAgICAgIG5leHRXZWVrIDogJ2RkZGQgW9CyXSBMVCcsXG5cdCAgICAgICAgbGFzdERheSA6ICdb0JLRh9C10YDQsCDQsl0gTFQnLFxuXHQgICAgICAgIGxhc3RXZWVrIDogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcblx0ICAgICAgICAgICAgICAgIGNhc2UgMDpcblx0ICAgICAgICAgICAgICAgIGNhc2UgMzpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNjpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQkiDQuNC30LzQuNC90LDQu9Cw0YLQsF0gZGRkZCBb0LJdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMTpcblx0ICAgICAgICAgICAgICAgIGNhc2UgMjpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNDpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNTpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQkiDQuNC30LzQuNC90LDQu9C40Y9dIGRkZGQgW9CyXSBMVCc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9LFxuXHQgICAgICAgIHNhbWVFbHNlIDogJ0wnXG5cdCAgICB9LFxuXHQgICAgcmVsYXRpdmVUaW1lIDoge1xuXHQgICAgICAgIGZ1dHVyZSA6ICfRgdC70LXQtCAlcyc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gICAgICdtbSc6ICdtdW51dGVubicsXG5cdCAgICAgICAgJ01NJzogJ21peicsXG5cdCAgICAgICAgJ2RkJzogJ2RldmV6aCdcblx0ICAgIH07XG5cdCAgICByZXR1cm4gbnVtYmVyICsgJyAnICsgbXV0YXRpb24oZm9ybWF0W2tleV0sIG51bWJlcik7XG5cdH1cblx0ZnVuY3Rpb24gc3BlY2lhbE11dGF0aW9uRm9yWWVhcnMobnVtYmVyKSB7XG5cdCAgICBzd2l0Y2ggKGxhc3ROdW1iZXIobnVtYmVyKSkge1xuXHQgICAgICAgIGNhc2UgMTpcblx0ICAgICAgICBjYXNlIDM6XG5cdCAgICAgICAgY2FzZSA0OlxuXHQgICAgICAgIGNhc2UgNTpcblx0ICAgICAgICBjYXNlIDk6XG5cdCAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnIGJsb2F6Jztcblx0ICAgICAgICBkZWZhdWx0OlxuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJyB2bG9heic7XG5cdCAgICB9XG5cdH1cblx0ZnVuY3Rpb24gbGFzdE51bWJlcihudW1iZXIpIHtcblx0ICAgIGlmIChudW1iZXIgPiA5KSB7XG5cdCAgICAgICAgcmV0dXJuIGxhc3ROdW1iZXIobnVtYmVyICUgMTApO1xuXHQgICAgfVxuXHQgICAgcmV0dXJuIG51bWJlcjtcblx0fVxuXHRmdW5jdGlvbiBtdXRhdGlvbih0ZXh0LCBudW1iZXIpIHtcblx0ICAgIGlmIChudW1iZXIgPT09IDIpIHtcblx0ICAgICAgICByZXR1cm4gc29mdE11dGF0aW9uKHRleHQpO1xuXHQgICAgfVxuXHQgICAgcmV0dXJuIHRleHQ7XG5cdH1cblx0ZnVuY3Rpb24gc29mdE11dGF0aW9uKHRleHQpIHtcblx0ICAgIHZhciBtdXRhdGlvblRhYmxlID0ge1xuXHQgICAgICAgICdtJzogJ3YnLFxuXHQgICAgICAgICdiJzogJ3YnLFxuXHQgICAgICAgICdkJzogJ3onXG5cdCAgIC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bnQnXSwgZmFjdG9yeSkgOlxuXHQgICBmYWN0b3J5KGdsb2JhbC5tb21lbnQpXG5cdH0odGhpcywgKGZ1bmN0aW9uIChtb21lbnQpIHsgJ3VzZSBzdHJpY3QnO1xuXHRcblx0XG5cdGZ1bmN0aW9uIHRyYW5zbGF0ZShudW1iZXIsIHdpdGhvdXRTdWZmaXgsIGtleSkge1xuXHQgICAgdmFyIHJlc3VsdCA9IG51bWJlciArICcgJztcblx0ICAgIHN3aXRjaCAoa2V5KSB7XG5cdCAgICAgICAgY2FzZSAnbSc6XG5cdCAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4ID8gJ2plZG5hIG1pbnV0YScgOiAnamVkbmUgbWludXRlJztcblx0ICAgICAgICBjYXNlICdtbSc6XG5cdCAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnbWludXRhJztcblx0ICAgICAgICAgICAgfSBlbHNlIGlmIChudW1iZXIgPT09IDIgfHwgbnVtYmVyID09PSAzIHx8IG51bWJlciA9PT0gNCkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtaW51dGUnO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtaW51dGEnO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG5cdCAgICAgICAgY2FzZSAnaCc6XG5cdCAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4ID8gJ2plZGFuIHNhdCcgOiAnamVkbm9nIHNhdGEnO1xuXHQgICAgICAgIGNhc2UgJ2hoJzpcblx0ICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdzYXQnO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMiB8fCBudW1iZXIgPT09IDMgfHwgbnVtYmVyID09PSA0KSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ3NhdGEnO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdzYXRpJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuXHQgICAgICAgIGNhc2UgJ2RkJzpcblx0ICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdkYW4nO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdkYW5hJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuXHQgICAgICAgIGNhc2UgJ01NJzpcblx0ICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtamVzZWMnO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMiB8fCBudW1iZXIgPT09IDMgfHwgbnVtYmVyID09PSA0KSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ21qZXNlY2EnO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtamVzZWNpJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuXHQgICAgICAgIGNhc2UgJ3l5Jzpcblx0ICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdnb2RpbmEnO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMiB8fCBudW1iZXIgPT09IDMgfHwgbnVtYmVyID09PSA0KSB7XG5cdCAgICAgICAg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TU0gWVlZWScsXG5cdCAgICAgICAgTExMIDogJ0QuIE1NTU0gWVlZWSBIOm1tJyxcblx0ICAgICAgICBMTExMIDogJ2RkZGQsIEQuIE1NTU0gWVlZWSBIOm1tJ1xuXHQgICAgfSxcblx0ICAgIGNhbGVuZGFyIDoge1xuXHQgICAgICAgIHNhbWVEYXkgIDogJ1tkYW5hcyB1XSBMVCcsXG5cdCAgICAgICAgbmV4dERheSAgOiAnW3N1dHJhIHVdIExUJyxcblx0ICAgICAgICBuZXh0V2VlayA6IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDA6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gW25lZGplbGp1XSBbdV0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAzOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIFtzcmlqZWR1XSBbdV0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSA2OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIFtzdWJvdHVdIFt1XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDE6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDI6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDQ6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDU6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gZGRkZCBbdV0gTFQnO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBsYXN0RGF5ICA6ICdbanXEjWVyIHVdIExUJyxcblx0ICAgICAgICBsYXN0V2VlayA6IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDA6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDM6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbcHJvxaFsdV0gZGRkZCBbdV0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSA2OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3Byb8WhbGVdIFtzdWJvdGVdIFt1XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDE6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDI6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDQ6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDU6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbcHJvxaFsaV0gZGRkZCBbdV0gTFQnO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuXHQgICAgfSxcblx0ICAgIHJlbGF0aXZlVGltZSA6IHtcblx0ICAgICAgICBmdXR1cmUgOiAnemEgJXMnLFxuXHQgICAgICAgIHBhc3QgICA6ICdwcmlqZSAlcycsXG5cdCAgICAgICAgcyAgICAgIDogJ3BhciBzZWt1bmRpJyxcblx0ICAgICAgICBtICAgICAgOiB0cmFuc2xhdGUsXG5cdCAgICAgICAgbW0gICAgIDogdHJhbnNsYXRlLFxuXHQgICAgICAgIGggICAgICA6IHRyYW5zbGF0ZSxcblx0ICAgICAgICBoaCAgICAgOiB0cmFuc2xhdGUsXG5cdCAgICAgICAgZCAgICAgIDogJ2RhbicsXG5cdCAgICAgICAgZGQgICAgIDogdHJhbnNsYXRlLFxuXHQgICAgICAgIE0gICAgICA6ICdtamVzZWMnLFxuXHQgICAgICAgIE1NICAgICA6IHRyYW5zbGF0ZSxcblx0ICAgICAgICB5ICAgICAgOiAnZ29kaW51Jyxcblx0ICAgICAgICB5eSAgICAgOiB0cmFuc2xhdGVcblx0ICAgIH0sXG5cdCAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn1cX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KSA/ICdtaW51dHknIDogJ21pbnV0Jyk7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ21pbnV0YW1pJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICBjYXNlICdoJzogIC8vIGFuIGhvdXIgLyBpbiBhbiBob3VyIC8gYW4gaG91ciBhZ29cblx0ICAgICAgICAgICAgcmV0dXJuIHdpdGhvdXRTdWZmaXggPyAnaG9kaW5hJyA6IChpc0Z1dHVyZSA/ICdob2RpbnUnIDogJ2hvZGlub3UnKTtcblx0ICAgICAgICBjYXNlICdoaCc6IC8vIDkgaG91cnMgLyBpbiA5IGhvdXJzIC8gOSBob3VycyBhZ29cblx0ICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAocGx1cmFsKG51bWJlcikgPyAnaG9kaW55JyA6ICdob2RpbicpO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdob2RpbmFtaSc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgY2FzZSAnZCc6ICAvLyBhIGRheSAvIGluIGEgZGF5IC8gYSBkYXkgYWdvXG5cdCAgICAgICAgICAgIHJldHVybiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkgPyAnZGVuJyA6ICdkbmVtJztcblx0ICAgICAgICBjYXNlICdkZCc6IC8vIDkgZGF5cyAvIGluIDkgZGF5cyAvIDkgZGF5cyBhZ29cblx0ICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAocGx1cmFsKG51bWJlcikgPyAnZG55JyA6ICdkbsOtJyk7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ2RueSc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgY2FzZSAnTSc6ICAvLyBhIG1vbnRoIC8gaW4gYSBtb250aCAvIGEgbW9udGggYWdvXG5cdCAgICAgICAgICAgIHJldHVybiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkgPyAnbcSbc8OtYycgOiAnbcSbc8OtY2VtJztcblx0ICAgICAgICBjYXNlICdNTSc6IC8vIDkgbW9udGhzIC8gaW4gOSBtb250aHMgLyA5IG1vbnRocyBhZ29cblx0ICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAocGx1cmFsKG51bWJlcikgPyAnbcSbc8OtY2UnIDogJ23Em3PDrWPFrycpO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdtxJtzw61jaSc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgY2FzZSAneSc6ICAvLyBhIHllYXIgLyBpbiBhIHllYXIgLyBhIHllYXIgYWdvXG5cdCAgICAgICAgICAgIHJldHVybiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkgPyAncm9rJyA6ICdyb2tlbSc7XG5cdCAgICAgICAgY2FzZSAneXknOiAvLyA5IHllYXJzIC8gaW4gOSB5ZWFycyAvIDkgeWVhcnMgYWdvXG5cdCAgICAgICAgICAgIGlmICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHBsdXJhbChudW1iZXIpID8gJ3Jva3knIDogJ2xldCcpO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdsZXR5Jztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBicmVhaztcblx0ICAgIH1cblx0fVxuXHRcblx0dmFyIGNzID0gbW9tZW50LmRlZmluZUxvY2FsZSgnY3MnLCB7XG5cdCAgICBtb250aHMgOiBtb250aHMsXG5cdCAgICBtb250aHNTaG9ydCA6IG1vbnRoc1Nob3J0LFxuXHQgICAgbW9udGhzUGFyc2UgOiAoZnVuY3Rpb24gKG1vbnRocywgbW9udGhzU2hvcnQpIHtcblx0ICAgICAgICB2YXIgaSwgX21vbnRoc1BhcnNlID0gW107XG5cdCAgICAgICAgZm9yIChpID0gMDsgaSA8IDEyOyBpKyspIHtcblx0ICAgICAgICAgICAgLy8gdXNlIGN1c3RvbSBwYXJzZXIgdG8gc29sdmUgcHJvYmxlbSB3aXRoIEp1bHkgKMSNZXJ2ZW5lYylcblx0ICAgICAgICAgICAgX21vbnRoc1BhcnNlW2ldID0gbmV3IFJlZ0V4cCgnXicgKyBtb250aHNbaV0gKyAnJHxeJyArIG1vbnRoc1Nob3J0W2ldICsgJyQnLCAnaScpO1xuXHQgICAgICAgIH1cblx0ICAgICAgICByZXR1cm4gX21vbnRoc1BhcnNlO1xuXHQgICAgfShtb250aHMsIG1vbnRoc1Nob3J0KSksXG5cdCAgICBzaG9ydE1vbnRoc1BhcnNlIDogKGZ1bmN0aW9uIChtb250aHNTaG9ydCkge1xuXHQgICAgICAgIHZhciBpLCBfc2hvcnRNb250aHNQYXJzZSA9IFtdO1xuXHQgICAgICAgIGZvciAoaSA9IDA7IGkgPCAxMjsgaSsrKSB7XG5cdCAgICAgICAgICAgIF9zaG9ydE1vbnRoc1BhcnNlW2ldID0gbmV3IFJlZ0V4cCgnXicgKyBtb250aHNTaG9ydFtpXSArICckJywgJ2knKTtcblx0ICAgICAgICB9XG5cd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lRGF5OiAnW2RuZXMgdl0gTFQnLFxuXHQgICAgICAgIG5leHREYXk6ICdbesOtdHJhIHZdIExUJyxcblx0ICAgICAgICBuZXh0V2VlazogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcblx0ICAgICAgICAgICAgICAgIGNhc2UgMDpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2IG5lZMSbbGkgdl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAxOlxuXHQgICAgICAgICAgICAgICAgY2FzZSAyOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ZdIGRkZGQgW3ZdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMzpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2ZSBzdMWZZWR1IHZdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgNDpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2ZSDEjXR2cnRlayB2XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDU6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdiBww6F0ZWsgdl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSA2OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3Ygc29ib3R1IHZdIExUJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgbGFzdERheTogJ1t2xI1lcmEgdl0gTFQnLFxuXHQgICAgICAgIGxhc3RXZWVrOiBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuXHQgICAgICAgICAgICAgICAgY2FzZSAwOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW21pbnVsb3UgbmVkxJtsaSB2XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDE6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDI6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbbWludWzDqV0gZGRkZCBbdl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAzOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW21pbnVsb3Ugc3TFmWVkdSB2XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDQ6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDU6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbbWludWzDvV0gZGRkZCBbdl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSA2OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW21pbnVsb3Ugc29ib3R1IHZdIExUJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgc2FtZUVsc2U6ICdMJ1xuXHQgICAgfSxcblx0ICAgIHJlbGF0aXZlVGltZSA6IHtcblx0ICAgICAgICBmdXR1cmUgOiAnemEgJXMnLFxuXHQgICAgICAgIHBhc3QgOiAncMWZZWQgJXMnLFxuXHQgICAgICAgIHMgOiB0cmFuc2xhdGUsXG5cdCAgICAgICAgbSA6IHRyYW5zbGF0ZSxcblx0ICAgICAgICBtbSA6IHRyYW5zbGF0ZSxcblx0ICAgICAgICBoIDogdHJhbnNsYXRlLFxuXHQgICAgICAgIGhoIDogdHJhbnNsYXRlLFxuXHQgICAgICAgIGQgOiB0cmFuc2xhdGUsXG5cdCAgICAgICAgZGQgOiB0cmFuc2xhdGUsXG5cdCAgICAgICAgTSA6IHRyYW5zbGF0ZSxcblx0ICAgICAgICBNTSA6IHRyYW5zbGF0ZSxcblx0ICAgICAgICB5IDogdHJhbnNsYXRlLFxuXHQgICAgICAgIHl5IDogdHJhbnNsYXRlXG5cdCAgICB9LFxuXHQgICAgZGF5T2ZNb250aE9yZGluYWxQYXJzZSA6IC9cXGR7MSwyfVxc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uY29tL2phd2lzaFxuXHRcblx0OyhmdW5jdGlvbiAoZ2xvYmFsLCBmYWN0b3J5KSB7XG5cdCAgICB0cnVlID8gZmFjdG9yeShfX3dlYnBhY2tfcmVxdWlyZV9fKDEpKSA6XG5cdCAgIHR5cGVvZiBkZWZpbmUgPT09ICdmdW5jdGlvbicgJiYgZGVmaW5lLmFtZCA/IGRlZmluZShbJy4uL21vbWVudCddLCBmYWN0b3J5KSA6XG5cdCAgIGZhY3RvcnkoZ2xvYmFsLm1vbWVudClcblx0fSh0aGlzLCAoZnVuY3Rpb24gKG1vbWVudCkgeyAndXNlIHN0cmljdCc7XG5cdFxuXHRcblx0dmFyIG1vbnRocyA9IFtcblx0ICAgICfelt6s3oLeqt6H3qbeg96pJyxcblx0ICAgICfeit6s3oTesN6D3qreh96m3oPeqScsXG5cdCAgICAn3onep96D3qjel96qJyxcblx0ICAgICfeh96t3pXesN6D3qnejd6qJyxcblx0ICAgICfeid6tJyxcblx0ICAgICfelt6r3oLesCcsXG5cdCAgICAn3pbeqt6N3qbeh96oJyxcblx0ICAgICfeh96v3o7ept6Q3rDek96qJyxcblx0ICAgICfekN6s3pXesN6T3qzeid6w3oTept6D3qonLFxuXHQgICAgJ96H3q7eht6w3pPer96E3qbeg96qJyxcblx0ICAgICfegt6u3ojerN6J3rDehN6m3oPeqicsXG5cdCAgICAn3pHeqN6Q3qzeid6w3oTept6D3qonXG5cdF07XG5cdHZhciB3ZWVrZGF5cyA9IFtcblx0ICAgICfeh96n3oveqN6H3rDejN6mJyxcblx0ICAgICfegN6v3onepicsXG5cdCAgICAn3ofept6C3rDejt6n3oPepicsXG5cdCAgICAn3oTeqt6L3qYnLFxuXHQgICAgJ96E3qreg96n3pDesN6K3qbejN6oJyxcblx0ICAgICfegN6q3obeqt6D3qonLFxuXHQgICAgJ96A3q7egt6o3oDeqN6D3qonXG5cdF07XG5cdFxuXHR2YXIgZHYgPSBtb21lbnQuZGVmaW5lTG9jYWxlKCdkdicsIHtcblx0ICAgIG1vbnRocyA6IG1vbnRocyxcblx0ICAgIG1vbnRoc1Nob3J0IDogbW9udGhzLFxuXHQgICAgd2Vla2RheXMgOiB3ZWVrZGF5cyxcblx0ICAgIHdlZWtkYXlzU2hvcnQgOiB3ZWVrZGF5cyxcblx0ICAgIHdlZWtkYXlzTWluIDogJ96H3qfei96oX96A3q/eid6mX96H3qbegt6wX96E3qrei96mX96E3qreg96nX96A3qreht6qX96A3q7egt6oJy5zcGxpdCgnXycpLFxuXHQgICAgbG9uZ0RhdGVGb3JtYXQgOiB7XG5cdFxuXHQgICAgICAgIExUIDogJ0hIOm1tJyxcblx0ICAgICAgICBMVFMgOiAnSEg6bW06c3MnLFxuXHQgICAgICAgIEwgOiAnRC9NL1lZWVknLFxuXHQgICAgICAgIExMIDogJ0QgTU1NTSBZWVlZJyxcblx0ICAgICAgICBMTEwgOiAnRCBNTU1NIFlZWVkgSEg6bW0nLFxuXHQgICAgICAgIExMTEwgOiAnZGRkZCBEIE1NTU0gWVlZWSBISDptbSdcblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbVBhcnNlOiAv3onehnzeid6KLyxcblx0ICAgIGlzUE0gOiBmdW5jdGlvbiAoaW5wdXQpIHtcblx0ICAgICAgICByZXR1cm4gJ96J3oonID09PSBpbnB1dDtcblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcblx0ICAgICAgICBpZiAoaG91ciA8IDEyKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn3onehic7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfeid6KJztcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgY2FsZW5kYXIgOiB7XG5cdCAgICAgICAgc2FtZURheSA6ICdb3oneqN6H3qbei96qXSBMVCcsXG5cdCAgICAgICAgbmV4dERheSA6ICdb3onep96L3qbeid6nXSBMVCcsXG5cdCAgICAgICAgbmV4dFdlZWsgOiAnZGRkZCBMVCcsXG5cdCAgICAgICAgbGFzdERheSA6ICdb3ofeqN6H3rDelN6sXSBMVCcsXG5cdCAgICAgICAgbGFzdFdlZWsgOiAnW96K3qfeh96o3ozeqt6I3qhdIGRkZGQgTFQnLFxuXHQgICAgICAgIHNhbWVFbHNlIDogJ0wnXG5cdCAgICB9LFxuXHQgICAgcmVsYXRpdmVUaW1lIDoge1xuXHQgICAgICAgIGZ1dHVyZSA6ICfejN6s3oPerd6O3qbeh96oICVzJyxcblx0ICAgICAgICBwYXN0IDogJ96G3qreg96o3oLesCAlcycsXG5cdCAgICAgICAgcyA6ICfekN6o3obeqt6C3rDejN6q3obert6F3qzeh96wJyxcblx0ICAgICAgICBtIDogJ96J3qjegt6o3pPerN6H3rAnLFxuXHQgICAgICAgIG1tIDogJ96J3qjegt6o3pPeqiAlZCcsXG5cdCAgICAgICAgaCA6ICfejt6m3pHeqN6H3qjeg96s3ofesCcsXG5cdCAgICAgICAgaGggOiAn3o7ept6R3qjeh96o3oPeqiAlZCcsXG5cdCAgICAgICAgZCA6ICfei96q3ojept6A3qzeh96wJyxcblx0ICAgICAgICBkZCA6ICfei96q3ojept6Q3rAgJWQnLFxuXHQgICAgICAgIE0gOiAn3onept6A3qzeh96wJyxcblx0ICAgICAgICBNTSA6ICfeid6m3pDesCAlZCcsXG5cdCAgICAgICAgeSA6ICfeh96m3oDept6D3qzeh96wJyxcblx0ICAgICAgICB5eSA6ICfeh96m3oDept6D3qogJWQnXG5cdCAgICB9LFxuXHQgICAgcHJlcGFyc2U6IGZ1bmN0aW9uIChzdHJpbmcpIHtcblx0ICAgICAgICByZXR1cm4gc3RyaW5nLnJlcGxhY2UoL9iML2csICcsJyk7XG5cdCAgICB9LFxuXHQgICAgcG9zdGZvcm1hdDogZnVuY3Rpb24gKHN0cmluZykge1xuXHQgICAgICAgIHJldHVybiBzdHJpbmcucmVwbGFjZSgvLC9nLCAn2IwnKTtcblx0ICAgIH0sX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kgIT09IDEpID8gJ3MnIDogJycpICsgJ10gTFQnO1xuXHQgICAgICAgIH0sXG5cdCAgICAgICAgbmV4dERheSA6IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICdbbWHDsWFuYSBhIGxhJyArICgodGhpcy5ob3VycygpICE9PSAxKSA/ICdzJyA6ICcnKSArICddIExUJztcblx0ICAgICAgICB9LFxuXHQgICAgICAgIG5leHRXZWVrIDogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ2RkZGQgW2EgbGEnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ3MnIDogJycpICsgJ10gTFQnO1xuXHQgICAgICAgIH0sXG5cdCAgICAgICAgbGFzdERheSA6IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICdbYXllciBhIGxhJyArICgodGhpcy5ob3VycygpICE9PSAxKSA/ICdzJyA6ICcnKSArICddIExUJztcblx0ICAgICAgICB9LFxuXHQgICAgICAgIGxhc3RXZWVrIDogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ1tlbF0gZGRkZCBbcGFzYWRvIGEgbGEnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ3MnIDogJycpICsgJ10gTFQnO1xuXHQgICAgICAgIH0sXG5cdCAgICAgICAgc2FtZUVsc2UgOiAnTCdcblx0ICAgIH0sXG5cdCAgICByZWxhdGl2ZVRpbWUgOiB7XG5cdCAgICAgICAgZnV0dXJlIDogJ2VuICVzJyxcblx0ICAgICAgICBwYXN0IDogJ2hhY2UgJXMnLFxuXHQgICAgICAgIHMgOiAndW5vcyBzZWd1bmRvcycsXG5cdCAgICAgICAgbSA6ICd1biBtaW51dG8nLFxuXHQgICAgICAgIG1tIDogJyVkIG1pbnV0b3MnLFxuXHQgICAgICAgIGggOiAndW5hIGhvcmEnLFxuXHQgICAgICAgIGhoIDogJyVkIGhvcmFzJyxcblx0ICAgICAgIC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TFQnLFxuXHQgICAgICAgIHNhbWVFbHNlIDogJ0wnXG5cdCAgICB9LFxuXHQgICAgcmVsYXRpdmVUaW1lIDoge1xuXHQgICAgICAgIGZ1dHVyZSA6ICfYr9ixICVzJyxcblx0ICAgICAgICBwYXN0IDogJyVzINm+24zYtCcsXG5cdCAgICAgICAgcyA6ICfahtmG2K8g2KvYp9mG24zZhycsXG5cdCAgICAgICAgbSA6ICfbjNqpINiv2YLbjNmC2YcnLFxuXHQgICAgICAgIG1tIDogJyVkINiv2YLbjNmC2YcnLFxuXHQgICAgICAgIGggOiAn24zaqSDYs9in2LnYqicsXG5cdCAgICAgICAgaGggOiAnJWQg2LPYp9i52KonLFxuXHQgICAgICAgIGQgOiAn24zaqSDYsdmI2LInLFxuXHQgICAgICAgIGRkIDogJyVkINix2YjYsicsXG5cdCAgICAgICAgTSA6ICfbjNqpINmF2KfZhycsXG5cdCAgICAgICAgTU0gOiAnJWQg2YXYp9mHJyxcblx0ICAgICAgICB5IDogJ9uM2qkg2LPYp9mEJyxcblx0ICAgICAgICB5eSA6ICclZCDYs9in2YQnXG5cdCAgICB9LFxuXHQgICAgcHJlcGFyc2U6IGZ1bmN0aW9uIChzdHJpbmcpIHtcblx0ICAgICAgICByZXR1cm4gc3RyaW5nLnJlcGxhY2UoL1vbsC3buV0vZywgZnVuY3Rpb24gKG1hdGNoKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBudW1iZXJNYXBbbWF0Y2hdO1xuXHQgICAgICAgIH0pLnJlcGxhY2UoL9iML2csICcsJyk7XG5cdCAgICB9LFxuXHQgICAgcG9zdGZvcm1hdDogZnVuY3Rpb24gKHN0cmluZykge1xuXHQgICAgICAgIHJldHVybiBzdHJpbmcucmVwbGFjZSgvXFxkL2csIGZ1bmN0aW9uIChtYXRjaCkge1xuXHQgICAgICAgICAgICByZXR1cm4gc3ltYm9sTWFwW21hdGNoXTtcblx0ICAgICAgICB9KS5yZXBsYWNlKC8sL2csICfYjCcpO1xuXHQgICA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AgICAgICAgTU0gOiAnJWQgbW9pcycsXG5cdCAgICAgICAgeSA6ICd1biBhbicsXG5cdCAgICAgICAgeXkgOiAnJWQgYW5zJ1xuXHQgICAgfSxcblx0ICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2U6IC9cXGR7MSwyfShlcnxlKS8sXG5cdCAgICBvcmRpbmFsIDogZnVuY3Rpb24gKG51bWJlciwgcGVyaW9kKSB7XG5cdCAgICAgICAgc3dpdGNoIChwZXJpb2QpIHtcblx0ICAgICAgICAgICAgLy8gV29yZHMgd2l0aCBtYXNjdWxpbmUgZ3JhbW1hdGljYWwgZ2VuZGVyOiBtb2lzLCB0cmltZXN0cmUsIGpvdXJcblx0ICAgICAgICAgICAgZGVmYXVsdDpcblx0ICAgICAgICAgICAgY2FzZSAnTSc6XG5cdCAgICAgICAgICAgIGNhc2UgJ1EnOlxuXHQgICAgICAgICAgICBjYXNlICdEJzpcblx0ICAgICAgICAgICAgY2FzZSAnREREJzpcblx0ICAgICAgICAgICAgY2FzZSAnZCc6XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgKG51bWJlciA9PT0gMSA/ICdlcicgOiAnZScpO1xuXHRcblx0ICAgICAgICAgICAgLy8gV29yZHMgd2l0aCBmZW1pbmluZSBncmFtbWF0aWNhbCBnZW5kZXI6IHNlbWFpbmVcblx0ICAgICAgICAgICAgY2FzZSAndyc6XG5cdCAgICAgICAgICAgIGNhc2UgJ1cnOlxuXHQgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArIChudW1iZXIgPT09IDEgPyAncmUnIDogJ2UnKTtcblx0ICAgICAgICB9XG5cdCAgICB9XG5cdH0pO1xuXHRcblx0cmV0dXJuIGZyQ2E7XG5cdFxuXHR9KSkpO1xuXG5cbi8qKiovIH0pLFxuLyogNDggKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxuXHQvLyEgbW9tZW50L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dW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAnW2hveGUgJyArICgodGhpcy5ob3VycygpICE9PSAxKSA/ICfDoXMnIDogJ8OhJykgKyAnXSBMVCc7XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBuZXh0RGF5IDogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ1ttYcOxw6EgJyArICgodGhpcy5ob3VycygpICE9PSAxKSA/ICfDoXMnIDogJ8OhJykgKyAnXSBMVCc7XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBuZXh0V2VlayA6IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICdkZGRkIFsnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ8OhcycgOiAnYScpICsgJ10gTFQnO1xuXHQgICAgICAgIH0sXG5cdCAgICAgICAgbGFzdERheSA6IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICdbb250ZSAnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ8OhJyA6ICdhJykgKyAnXSBMVCc7XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBsYXN0V2VlayA6IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICdbb10gZGRkZCBbcGFzYWRvICcgKyAoKHRoaXMuaG91cnMoKSAhPT0gMSkgPyAnw6FzJyA6ICdhJykgKyAnXSBMVCc7XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuXHQgICAgfSxcblx0ICAgIHJlbGF0aXZlVGltZSA6IHtcblx0ICAgICAgICBmdXR1cmUgOiBmdW5jdGlvbiAoc3RyKSB7XG5cdCAgICAgICAgICAgIGlmIChzdHIuaW5kZXhPZigndW4nKSA9PT0gMCkge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuICduJyArIHN0cjtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgIC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LFxuXHQgICAgbWVyaWRpZW1QYXJzZTogL3JhdGl8c29rYWxsaXxkb25wYXJhbXxzYW5qZS8sXG5cdCAgICBtZXJpZGllbUhvdXIgOiBmdW5jdGlvbiAoaG91ciwgbWVyaWRpZW0pIHtcblx0ICAgICAgICBpZiAoaG91ciA9PT0gMTIpIHtcblx0ICAgICAgICAgICAgaG91ciA9IDA7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGlmIChtZXJpZGllbSA9PT0gJ3JhdGknKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBob3VyIDwgNCA/IGhvdXIgOiBob3VyICsgMTI7XG5cdCAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ3Nva2FsbGknKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBob3VyO1xuXHQgICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICdkb25wYXJhbScpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGhvdXIgPiAxMiA/IGhvdXIgOiBob3VyICsgMTI7XG5cdCAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ3NhbmplJykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcblx0ICAgICAgICBpZiAoaG91ciA8IDQpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICdyYXRpJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxMikge1xuXHQgICAgICAgICAgICByZXR1cm4gJ3Nva2FsbGknO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDE2KSB7XG5cdCAgICAgICAgICAgIHJldHVybiAnZG9ucGFyYW0nO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDIwKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAnc2Fu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DXldeS15XXodeYX9eh16TXmNee15HXqF/XkNeV16fXmNeV15HXqF/XoNeV15HXnteR16hf15PXptee15HXqCcuc3BsaXQoJ18nKSxcblx0ICAgIG1vbnRoc1Nob3J0IDogJ9eZ16DXldezX9ek15HXqNezX9ee16jXpV/XkNek16jXs1/XnteQ15lf15nXldeg15lf15nXldec15lf15DXldeS17Nf16HXpNeY17Nf15DXlden17Nf16DXldeR17Nf15PXptee17MnLnNwbGl0KCdfJyksXG5cdCAgICB3ZWVrZGF5cyA6ICfXqNeQ16nXldefX9ep16DXmV/Xqdec15nXqdeZX9eo15HXmdei15lf15fXnteZ16nXmV/XqdeZ16nXmV/XqdeR16onLnNwbGl0KCdfJyksXG5cdCAgICB3ZWVrZGF5c1Nob3J0IDogJ9eQ17Nf15HXs1/XktezX9eT17Nf15TXs1/XldezX9ep17MnLnNwbGl0KCdfJyksXG5cdCAgICB3ZWVrZGF5c01pbiA6ICfXkF/XkV/Xkl/Xk1/XlF/XlV/XqScuc3BsaXQoJ18nKSxcblx0ICAgIGxvbmdEYXRlRm9ybWF0IDoge1xuXHQgICAgICAgIExUIDogJ0hIOm1tJyxcblx0ICAgICAgICBMVFMgOiAnSEg6bW06c3MnLFxuXHQgICAgICAgIEwgOiAnREQvTU0vWVlZWScsXG5cdCAgICAgICAgTEwgOiAnRCBb15FdTU1NTSBZWVlZJyxcblx0ICAgICAgICBMTEwgOiAnRCBb15FdTU1NTSBZWVlZIEhIOm1tJyxcblx0ICAgICAgICBMTExMIDogJ2RkZGQsIEQgW9eRXU1NTU0gWVlZWSBISDptbScsXG5cdCAgICAgICAgbCA6ICdEL00vWVlZWScsXG5cdCAgICAgICAgbGwgOiAnRCBNTU0gWVlZWScsXG5cdCAgICAgICAgbGxsIDogJ0QgTU1NIFlZWVkgSEg6bW0nLFxuXHQgICAgICAgIGxsbGwgOiAnZGRkLCBEIE1NTSBZWVlZIEhIOm1tJ1xuXHQgICAgfSxcblx0ICAgIGNhbGVuZGFyIDoge1xuXHQgICAgICAgIHNhbWVEYXkgOiAnW9eU15nXldedINeR1r5dTFQnLFxuXHQgICAgICAgIG5leHREYXkgOiAnW9ee15fXqCDXkda+XUxUJyxcblx0ICAgICAgICBuZXh0V2VlayA6ICdkZGRkIFvXkdep16LXlF0gTFQnLFxuXHQgICAgICAgIGxhc3REYXkgOiAnW9eQ16rXnteV15wg15HWvl1MVCcsXG5cdCAgICAgICAgbGFzdFdlZWsgOiAnW9eR15nXldedXSBkZGRkIFvXlNeQ15fXqNeV158g15HXqdei15RdIExUJyxcblx0ICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuXHQgICAgfSxcblx0ICAgIHJlbGF0aXZlVGltZSA6IHtcblx0ICAgICAgICBmdXR1cmUgOiAn15HXoteV15MgJXMnLFxuXHQgICAgICAgIHBhc3QgOiAn15zXpNeg15kgJXMnLFxuXHQgICAgICAgIHMgOiAn157Xodek16gg16nXoNeZ15XXqicsXG5cdCAgICAgICAgbSA6ICfXk9en15QnLFxuXHQgICAgICAgIG1tIDogJyVkINeT16fXldeqJyxcblx0ICAgICAgICBoIDogJ9ep16LXlCcsXG5cdCAgICAgICAgaGggOiBmdW5jdGlvbiAobnVtYmVyKSB7XG5cdCAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDIpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiAn16nXoteq15nXmdedJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJyDXqdei15XXqic7XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBkIDogJ9eZ15XXnScsXG5cdCAgICAgICAgZGQgOiBmdW5jdGlvbiAobnVtYmVyKSB7XG5cdCAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDIpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiAn15nXldee15nXmdedJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJyDXmdee15nXnSc7XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBNIDogJ9eX15XXk9epJyxcblx0ICAgICAgICBNTSA6IGZ1bmN0aW9uIChudW1iZXIpIHtcblx0ICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMikge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuICfXl9eV15PXqdeZ15nXnSc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICcg15fXldeT16nXmdedJztcblx0ICAgICAgICB9LFxuXHQgICAgICAgIHkgOiAn16nXoNeUJyxcblx0ICAgICAgICB5eSA6IGZ1bmN0aW9uIChudW1iZXIpIHtcblx0ICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMikge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuICfXqdeg16rXmdeZ150nO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciAlIDEwID09PSAwICYmIG51bWJlciAhPT0gMTApIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnINep16DXlCc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICcg16nXoNeZ150nO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbVBhcnNlOiAv15DXl9eUXCLXpnzXnNek16DXlFwi16Z815DXl9eo15kg15TXpteU16jXmdeZ151815zXpNeg15kg15TXpteU16jXmdeZ151815zXpNeg15XXqiDXkdeV16fXqHzXkdeR15XXp9eofNeR16LXqNeRL2ksXG5cdCAgICBpc1BNIDogZnVuY3Rpb24gKGlucHV0KSB7XG5cdCAgICAgICAgcmV0dXJuIC9eKNeQ15fXlFwi16Z815DXl9eo15kg15TXpteU16jXmdeZ151815HXoteo15EpJC8udGVzdChpbnB1dCk7XG5cdCAgICB9LFxuXHQgICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG5cdCAgICAgICAgaW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G51bWJlciA9PT0gMyB8fCBudW1iZXIgPT09IDQpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnbWludXRlJztcblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnbWludXRhJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuXHQgICAgICAgIGNhc2UgJ2gnOlxuXHQgICAgICAgICAgICByZXR1cm4gd2l0aG91dFN1ZmZpeCA/ICdqZWRhbiBzYXQnIDogJ2plZG5vZyBzYXRhJztcblx0ICAgICAgICBjYXNlICdoaCc6XG5cdCAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnc2F0Jztcblx0ICAgICAgICAgICAgfSBlbHNlIGlmIChudW1iZXIgPT09IDIgfHwgbnVtYmVyID09PSAzIHx8IG51bWJlciA9PT0gNCkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdzYXRhJztcblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnc2F0aSc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcblx0ICAgICAgICBjYXNlICdkZCc6XG5cdCAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnZGFuJztcblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnZGFuYSc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcblx0ICAgICAgICBjYXNlICdNTSc6XG5cdCAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnbWplc2VjJztcblx0ICAgICAgICAgICAgfSBlbHNlIGlmIChudW1iZXIgPT09IDIgfHwgbnVtYmVyID09PSAzIHx8IG51bWJlciA9PT0gNCkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtamVzZWNhJztcblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnbWplc2VjaSc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcblx0ICAgICAgICBjYXNlICd5eSc6XG5cdCAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnZ29kaW5hJztcblx0ICAgICAgICAgICAgfSBlbHNlIGlmIChudW1iZXIgPT09IDIgfHwgbnVtYmVyID09PSAzIHx8IG51bWJlciA9PT0gNCkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdnb2RpbmUnO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdnb2RpbmEnO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG5cdCAgICB9XG5cdH1cblx0XG5cdHZhciBociA9IG1vbWVudC5kZWZpbmVMb2NhbGUoJ2hyJywge1xuXHQgICAgbW9udGhzIDoge1xuXHQgICAgICAgIGZvcm1hdDogJ3NpamXEjW5qYV92ZWxqYcSNZV9vxb51amthX3RyYXZuamFfc3ZpYm5qYV9saXBuamFfc3JwbmphX2tvbG92b3phX3J1am5hX2xpc3RvcGFkYV9zdHVkZW5vZ2FfcHJvc2luY2EnLnNwbGl0KCdfJyksXG5cdCAgICAgICAgc3RhbmRhbG9uZTogJ3NpamXEjWFual92ZWxqYcSNYV9vxb51amFrX3RyYXZhbmpfc3ZpYmFual9saXBhbmpfc3JwYW5qX2tvbG92b3pfcnVqYW5fbGlzdG9wYWRfc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F5KCkpIHtcblx0ICAgICAgICAgICAgICAgIGNhc2UgMDpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBbbmVkamVsanVdIFt1XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDM6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gW3NyaWplZHVdIFt1XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDY6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gW3N1Ym90dV0gW3VdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMTpcblx0ICAgICAgICAgICAgICAgIGNhc2UgMjpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNDpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNTpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBkZGRkIFt1XSBMVCc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9LFxuXHQgICAgICAgIGxhc3REYXkgIDogJ1tqdcSNZXIgdV0gTFQnLFxuXHQgICAgICAgIGxhc3RXZWVrIDogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcblx0ICAgICAgICAgICAgICAgIGNhc2UgMDpcblx0ICAgICAgICAgICAgICAgIGNhc2UgMzpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1twcm/FoWx1XSBkZGRkIFt1XSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDY6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbcHJvxaFsZV0gW3N1Ym90ZV0gW3VdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMTpcblx0ICAgICAgICAgICAgICAgIGNhc2UgMjpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNDpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNTpcblx0ICAgICAgICAgICAgICAgICA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G5cdCAgICBtZXJpZGllbVBhcnNlOiAv1aPVq9W31aXWgNW+1aF81aHVvNWh1b7VuNW/1b7VoXzWgdWl1oDVpdWv1b7VoXzVpdaA1aXVr9W41bXVodW2Lyxcblx0ICAgIGlzUE06IGZ1bmN0aW9uIChpbnB1dCkge1xuXHQgICAgICAgIHJldHVybiAvXijWgdWl1oDVpdWv1b7VoXzVpdaA1aXVr9W41bXVodW2KSQvLnRlc3QoaW5wdXQpO1xuXHQgICAgfSxcblx0ICAgIG1lcmlkaWVtIDogZnVuY3Rpb24gKGhvdXIpIHtcblx0ICAgICAgICBpZiAoaG91ciA8IDQpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfVo9Wr1bfVpdaA1b7VoSc7XG5cdCAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTIpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfVodW81aHVvtW41b/VvtWhJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxNykge1xuXHQgICAgICAgICAgICByZXR1cm4gJ9aB1aXWgNWl1a/VvtWhJztcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4gJ9Wl1oDVpdWv1bjVtdWh1bYnO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn18XFxkezEsMn0tKNWr1bZ81oDVpCkvLFxuXHQgICAgb3JkaW5hbDogZnVuY3Rpb24gKG51bWJlciwgcGVyaW9kKSB7XG5cdCAgICAgICAgc3dpdGNoIChwZXJpb2QpIHtcblx0ICAgICAgICAgICAgY2FzZSAnREREJzpcblx0ICAgICAgICAgICAgY2FzZSAndyc6XG5cdCAgICAgICAgICAgIGNhc2UgJ1cnOlxuXHQgICAgICAgICAgICBjYXNlICdERERvJzpcblx0ICAgICAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcblx0ICAgICAgICAgICAgICAgICAgICByZX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lcmlkaWVtUGFyc2U6IC9wYWdpfHNpYW5nfHNvcmV8bWFsYW0vLFxuXHQgICAgbWVyaWRpZW1Ib3VyIDogZnVuY3Rpb24gKGhvdXIsIG1lcmlkaWVtKSB7XG5cdCAgICAgICAgaWYgKGhvdXIgPT09IDEyKSB7XG5cdCAgICAgICAgICAgIGhvdXIgPSAwO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAobWVyaWRpZW0gPT09ICdwYWdpJykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91cjtcblx0ICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAnc2lhbmcnKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBob3VyID49IDExID8gaG91ciA6IGhvdXIgKyAxMjtcblx0ICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAnc29yZScgfHwgbWVyaWRpZW0gPT09ICdtYWxhbScpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGhvdXIgKyAxMjtcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91cnMsIG1pbnV0ZXMsIGlzTG93ZXIpIHtcblx0ICAgICAgICBpZiAoaG91cnMgPCAxMSkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ3BhZ2knO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91cnMgPCAxNSkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ3NpYW5nJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXJzIDwgMTkpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICdzb3JlJztcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4gJ21hbGFtJztcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgY2FsZW5kYXIgOiB7XG5cdCAgICAgICAgc2FtZURheSA6ICdbSGFyaSBpbmkgcHVrdWxdIExUJyxcblx0ICAgICAgICBuZXh0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Igc2Vrw7puZHVyJyA6ICdub2trcnVtIHNla8O6bmR1bSc7XG5cdCAgICAgICAgY2FzZSAnbSc6XG5cdCAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4ID8gJ23DrW7DunRhJyA6ICdtw61uw7p0dSc7XG5cdCAgICAgICAgY2FzZSAnbW0nOlxuXHQgICAgICAgICAgICBpZiAocGx1cmFsKG51bWJlcikpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdtw61uw7p0dXInIDogJ23DrW7DunR1bScpO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKHdpdGhvdXRTdWZmaXgpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAnbcOtbsO6dGEnO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAnbcOtbsO6dHUnO1xuXHQgICAgICAgIGNhc2UgJ2hoJzpcblx0ICAgICAgICAgICAgaWYgKHBsdXJhbChudW1iZXIpKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAna2x1a2t1c3R1bmRpcicgOiAna2x1a2t1c3R1bmR1bScpO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAna2x1a2t1c3R1bmQnO1xuXHQgICAgICAgIGNhc2UgJ2QnOlxuXHQgICAgICAgICAgICBpZiAod2l0aG91dFN1ZmZpeCkge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuICdkYWd1cic7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIGlzRnV0dXJlID8gJ2RhZycgOiAnZGVnaSc7XG5cdCAgICAgICAgY2FzZSAnZGQnOlxuXHQgICAgICAgICAgICBpZiAocGx1cmFsKG51bWJlcikpIHtcblx0ICAgICAgICAgICAgICAgIGlmICh3aXRob3V0U3VmZml4KSB7XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdkYWdhcic7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKGlzRnV0dXJlID8gJ2RhZ2EnIDogJ2TDtmd1bScpO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKHdpdGhvdXRTdWZmaXgpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAnZGFndXInO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAoaXNGdXR1cmUgPyAnZGFnJyA6ICdkZWdpJyk7XG5cdCAgICAgICAgY2FzZSAnTSc6XG5cdCAgICAgICAgICAgIGlmICh3aXRob3V0U3VmZml4KSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gJ23DoW51w7B1cic7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIGlzRnV0dXJlID8gJ23DoW51w7AnIDogJ23DoW51w7BpJztcblx0ICAgICAgICBjYXNlICdNTSc6XG5cdCAgICAgICAgICAgIGlmIChwbHVyYWwobnVtYmVyKSkge1xuXHQgICAgICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXgpIHtcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ23DoW51w7Bpcic7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKGlzRnV0dXJlID8gJ23DoW51w7BpJyA6ICdtw6FudcOwdW0nKTtcblx0ICAgICAgICAgICAgfSBlbHNlIGlmICh3aXRob3V0U3VmZml4KSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ23DoW51w7B1cic7XG5cdCAgICAgICAgICAgIH1cblx0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ZGRkLCBEIE1NTU0gWVlZWSBISDptbSdcblx0ICAgIH0sXG5cdCAgICBjYWxlbmRhciA6IHtcblx0ICAgICAgICBzYW1lRGF5OiAnW09nZ2kgYWxsZV0gTFQnLFxuXHQgICAgICAgIG5leHREYXk6ICdbRG9tYW5pIGFsbGVdIExUJyxcblx0ICAgICAgICBuZXh0V2VlazogJ2RkZGQgW2FsbGVdIExUJyxcblx0ICAgICAgICBsYXN0RGF5OiAnW0llcmkgYWxsZV0gTFQnLFxuXHQgICAgICAgIGxhc3RXZWVrOiBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuXHQgICAgICAgICAgICAgICAgY2FzZSAwOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW2xhIHNjb3JzYV0gZGRkZCBbYWxsZV0gTFQnO1xuXHQgICAgICAgICAgICAgICAgZGVmYXVsdDpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1tsbyBzY29yc29dIGRkZGQgW2FsbGVdIExUJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgc2FtZUVsc2U6ICdMJ1xuXHQgICAgfSxcblx0ICAgIHJlbGF0aXZlVGltZSA6IHtcblx0ICAgICAgICBmdXR1cmUgOiBmdW5jdGlvbiAocykge1xuXHQgICAgICAgICAgICByZXR1cm4gKCgvXlswLTldLiskLykudGVzdChzKSA/ICd0cmEnIDogJ2luJykgKyAnICcgKyBzO1xuXHQgICAgICAgIH0sXG5cdCAgICAgICAgcGFzdCA6ICclcyBmYScsXG5cdCAgICAgICAgcyA6ICdhbGN1bmkgc2Vjb25kaScsXG5cdCAgICAgICAgbSA6ICd1biBtaW51dG8nLFxuXHQgICAgICAgIG1tIDogJyVkIG1pbnV0aScsXG5cdCAgICAgICAgaCA6ICd1blxcJ29yYScsXG5cdCAgICAgICAgaGggOiAnJWQgb3JlJyxcblx0ICAgICAgICBkIDogJ3V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hvdXIgKyAxMjtcblx0ICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4LKs4LOG4LKz4LK/4LKX4LON4LKX4LOGJykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91cjtcblx0ICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4LKu4LKn4LON4LKv4LK+4LK54LON4LKoJykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91ciA+PSAxMCA/IGhvdXIgOiBob3VyICsgMTI7XG5cdCAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+CyuOCyguCynOCzhicpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGhvdXIgKyAxMjtcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG5cdCAgICAgICAgaWYgKGhvdXIgPCA0KSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn4LKw4LK+4LKk4LON4LKw4LK/Jztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+CyrOCzhuCys+Cyv+Cyl+CzjeCyl+Czhic7XG5cdCAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTcpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfgsq7gsqfgs43gsq/gsr7gsrngs43gsqgnO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDIwKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn4LK44LKC4LKc4LOGJztcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+CysOCyvuCypOCzjeCysOCyvyc7XG5cdCAgICAgICAgfVxuXHQgICAgfSxcblx0ICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2U6IC9cXGR7MSwyfSjgsqjgs4bgs5UpLyxcblx0ICAgIG9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dCAgICAgICAgICAgICAgICBjYXNlIDI6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDQ6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDU6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gZGRkZCBbdV0gTFQnO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBsYXN0RGF5ICA6ICdbanXEjWUgdV0gTFQnLFxuXHQgICAgICAgIGxhc3RXZWVrIDogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICB2YXIgbGFzdFdlZWtEYXlzID0gW1xuXHQgICAgICAgICAgICAgICAgJ1twcm/FoWxlXSBbbmVkamVsamVdIFt1XSBMVCcsXG5cdCAgICAgICAgICAgICAgICAnW3Byb8WhbG9nXSBbcG9uZWRqZWxqa2FdIFt1XSBMVCcsXG5cdCAgICAgICAgICAgICAgICAnW3Byb8WhbG9nXSBbdXRvcmthXSBbdV0gTFQnLFxuXHQgICAgICAgICAgICAgICAgJ1twcm/FoWxlXSBbc3JpamVkZV0gW3VdIExUJyxcblx0ICAgICAgICAgICAgICAgICdbcHJvxaFsb2ddIFvEjWV0dnJ0a2FdIFt1XSBMVCcsXG5cdCAgICAgICAgICAgICAgICAnW3Byb8WhbG9nXSBbcGV0a2FdIFt1XSBMVCcsXG5cdCAgICAgICAgICAgICAgICAnW3Byb8WhbGVdIFtzdWJvdGVdIFt1XSBMVCdcblx0ICAgICAgICAgICAgXTtcblx0ICAgICAgICAgICAgcmV0dXJuIGxhc3RXZWVrRGF5c1t0aGlzLmRheSgpXTtcblx0ICAgICAgICB9LFxuXHQgICAgICAgIHNhbWVFbHNlIDogJ0wnXG5cdCAgICB9LFxuXHQgICAgcmVsYXRpdmVUaW1lIDoge1xuXHQgICAgICAgIGZ1dHVyZSA6ICd6YSAlcycsXG5cdCAgICAgICAgcGFzdCAgIDogJ3ByaWplICVzJyxcblx0ICAgICAgICBzICAgICAgOiAnbmVrb2xpa28gc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gICAgICAgICAgICByZXR1cm4gaG91ciA8IDQgPyBob3VyIDogaG91ciArIDEyO1xuXHQgICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfgpLjgpJXgpL7gpLPgpYAnKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBob3VyO1xuXHQgICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfgpKbgpYHgpKrgpL7gpLDgpYAnKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBob3VyID49IDEwID8gaG91ciA6IGhvdXIgKyAxMjtcblx0ICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4KS44KS+4KSv4KSC4KSV4KS+4KSz4KWAJykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbTogZnVuY3Rpb24gKGhvdXIsIG1pbnV0ZSwgaXNMb3dlcikge1xuXHQgICAgICAgIGlmIChob3VyIDwgNCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+CksOCkvuCkpOCljeCksOClgCc7XG5cdCAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTApIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfgpLjgpJXgpL7gpLPgpYAnO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDE3KSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn4KSm4KWB4KSq4KS+4KSw4KWAJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAyMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+CkuOCkvuCkr+CkguCkleCkvuCks+ClgCc7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfgpLDgpL7gpKTgpY3gpLDgpYAnO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICB3ZWVrIDoge1xuXHQgICAgICAgIGRvdyA6IDAsIC8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1lRGF5OiAnW0R6acWbIG9dIExUJyxcblx0ICAgICAgICBuZXh0RGF5OiAnW0p1dHJvIG9dIExUJyxcblx0ICAgICAgICBuZXh0V2VlazogJ1tXXSBkZGRkIFtvXSBMVCcsXG5cdCAgICAgICAgbGFzdERheTogJ1tXY3pvcmFqIG9dIExUJyxcblx0ICAgICAgICBsYXN0V2VlazogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcblx0ICAgICAgICAgICAgICAgIGNhc2UgMDpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1tXIHplc3rFgsSFIG5pZWR6aWVsxJkgb10gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAzOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW1cgemVzesWCxIUgxZtyb2TEmSBvXSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDY6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbVyB6ZXN6xYLEhSBzb2JvdMSZIG9dIExUJztcblx0ICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbVyB6ZXN6xYJ5XSBkZGRkIFtvXSBMVCc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9LFxuXHQgICAgICAgIHNhbWVFbHNlOiAnTCdcblx0ICAgIH0sXG5cdCAgICByZWxhdGl2ZVRpbWUgOiB7XG5cdCAgICAgICAgZnV0dXJlIDogJ3phICVzJyxcblx0ICAgICAgICBwYXN0IDogJyVzIHRlbXUnLFxuXHQgICAgICAgIHMgOiAna2lsa2Egc2VrdW5kJyxcblx0ICAgICAgICBtIDogdHJhbnNsYXRlLFxuXHQgICAgICAgIG1tIDogdHJhbnNsYXRlLFxuXHQgICAgICAgIGggOiB0cmFuc2xhdGUsXG5cdCAgICAgICAgaGggOiB0cmFuc2xhdGUsXG5cdCAgICAgICAgZ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GlmIChub3cud2VlaygpICE9PSB0aGlzLndlZWsoKSkge1xuXHQgICAgICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgY2FzZSAwOlxuXHQgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQkiDRgdC70LXQtNGD0Y7RidC10LVdIGRkZGQgW9CyXSBMVCc7XG5cdCAgICAgICAgICAgICAgICAgICAgY2FzZSAxOlxuXHQgICAgICAgICAgICAgICAgICAgIGNhc2UgMjpcblx0ICAgICAgICAgICAgICAgICAgICBjYXNlIDQ6XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CSINGB0LvQtdC00YPRjtGJ0LjQuV0gZGRkZCBb0LJdIExUJztcblx0ICAgICAgICAgICAgICAgICAgICBjYXNlIDM6XG5cdCAgICAgICAgICAgICAgICAgICAgY2FzZSA1OlxuXHQgICAgICAgICAgICAgICAgICAgIGNhc2UgNjpcblx0ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0JIg0YHQu9C10LTRg9GO0YnRg9GOXSBkZGRkIFvQsl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgaWYgKHRoaXMuZGF5KCkgPT09IDIpIHtcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQktC+XSBkZGRkIFvQsl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQkl0gZGRkZCBb0LJdIExUJztcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgbGFzdFdlZWs6IGZ1bmN0aW9uIChub3cpIHtcblx0ICAgICAgICAgICAgaWYgKG5vdy53ZWVrKCkgIT09IHRoaXMud2VlaygpKSB7XG5cdCAgICAgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcblx0ICAgICAgICAgICAgICAgICAgICBjYXNlIDA6XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CSINC/0YDQvtGI0LvQvtC1XSBkZGRkIFvQsl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgICAgIGNhc2UgMTpcblx0ICAgICAgICAgICAgICAgICAgICBjYXNlIDI6XG5cdCAgICAgICAgICAgICAgICAgICAgY2FzZSA0OlxuXHQgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQkiDQv9GA0L7RiNC70YvQuV0gZGRkZCBb0LJdIExUJztcblx0ICAgICAgICAgICAgICAgICAgICBjYXNlIDM6XG5cdCAgICAgICAgICAgICAgICAgICAgY2FzZSA1OlxuXHQgICAgICAgICAgICAgICAgICAgIGNhc2UgNjpcblx0ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0JIg0L/RgNC+0YjQu9GD0Y5dIGRkZGQgW9CyXSBMVCc7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICBpZiAodGhpcy5kYXkoKSA9PT0gMikge1xuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CS0L5dIGRkZGQgW9CyXSBMVCc7XG5cdCAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CSXSBkZGRkIFvQsl0gTFQnO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBzYW1lRWxzZTogJ0wnXG5cdCAgICB9LFxuXHQgICAgcmVsYXRpdmVUaW1lIDoge1xuXHQgICAgICAgIGZ1dHVyZSA6ICfRh9C10YDQtdC3ICVzJyxcblx0ICAgICAgICBwYXN0IDogJyVzINC90LDQt9Cw0LQnLFxuXHQgICAg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lIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfQstC10YfQtdGA0LAnO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn0tKNC5fNCz0L580Y8pLyxcblx0ICAgIG9yZGluYWw6IGZ1bmN0aW9uIChudW1iZXIsIHBlcmlvZCkge1xuXHQgICAgICAgIHN3aXRjaCAocGVyaW9kKSB7XG5cdCAgICAgICAgICAgIGNhc2UgJ00nOlxuXHQgICAgICAgICAgICBjYXNlICdkJzpcblx0ICAgICAgICAgICAgY2FzZSAnREREJzpcblx0ICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnLdC5Jztcblx0ICAgICAgICAgICAgY2FzZSAnRCc6XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3Qs9C+Jztcblx0ICAgICAgICAgICAgY2FzZSAndyc6XG5cdCAgICAgICAgICAgIGNhc2UgJ1cnOlxuXHQgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0Y8nO1xuXHQgICAgICAgICAgICBkZWZhdWx0OlxuXHQgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlcjtcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgd2VlayA6IHtcblx0ICAgICAgICBkb3cgOiAxLCAvLyBNb25kYXkgaXMgdGhlIGZpcnN0IGRheSBvZiB0aGUgd2Vlay5cblx0ICAgICAgICBkb3kgOiA3ICAvLyBUaGUgd2VlayB0aGF0IGNvbnRhaW5zIEphbiAxc3QgaXMgdGhlIGZpcnN0IHdlZWsgb2YgdGhlIHllYXIuXG5cdCAgICB9XG5cdH0pO1xuXHRcblx0cmV0dXJuIHJ1O1xuXHRcblx0fSkpKTtcblxuXG4vKioqLyB9KSxcbi8qIDkzICovXG4vKioqLyAoZnVuY3Rpb24obW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG5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0ICsgKHBsdXJhbChudW1iZXIpID8gJ2hvZGlueScgOiAnaG9kw61uJyk7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ2hvZGluYW1pJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICBjYXNlICdkJzogIC8vIGEgZGF5IC8gaW4gYSBkYXkgLyBhIGRheSBhZ29cblx0ICAgICAgICAgICAgcmV0dXJuICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlKSA/ICdkZcWIJyA6ICdkxYhvbSc7XG5cdCAgICAgICAgY2FzZSAnZGQnOiAvLyA5IGRheXMgLyBpbiA5IGRheXMgLyA5IGRheXMgYWdvXG5cdCAgICAgICAgICAgIGlmICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHBsdXJhbChudW1iZXIpID8gJ2RuaScgOiAnZG7DrScpO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdkxYhhbWknO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIGJyZWFrO1xuXHQgICAgICAgIGNhc2UgJ00nOiAgLy8gYSBtb250aCAvIGluIGEgbW9udGggLyBhIG1vbnRoIGFnb1xuXHQgICAgICAgICAgICByZXR1cm4gKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpID8gJ21lc2lhYycgOiAnbWVzaWFjb20nO1xuXHQgICAgICAgIGNhc2UgJ01NJzogLy8gOSBtb250aHMgLyBpbiA5IG1vbnRocyAvIDkgbW9udGhzIGFnb1xuXHQgICAgICAgICAgICBpZiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArIChwbHVyYWwobnVtYmVyKSA/ICdtZXNpYWNlJyA6ICdtZXNpYWNvdicpO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdtZXNpYWNtaSc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgY2FzZSAneSc6ICAvLyBhIHllYXIgLyBpbiBhIHllYXIgLyBhIHllYXIgYWdvXG5cdCAgICAgICAgICAgIHJldHVybiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkgPyAncm9rJyA6ICdyb2tvbSc7XG5cdCAgICAgICAgY2FzZSAneXknOiAvLyA5IHllYXJzIC8gaW4gOSB5ZWFycyAvIDkgeWVhcnMgYWdvXG5cdCAgICAgICAgICAgIGlmICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHBsdXJhbChudW1iZXIpID8gJ3Jva3knIDogJ3Jva292Jyk7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ3Jva21pJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBicmVhaztcblx0ICAgIH1cblx0fVxuXHRcblx0dmFyIHNrID0gbW9tZW50LmRlZmluZUxvY2FsZSgnc2snLCB7XG5cdCAgICBtb250aHMgOiBtb250aHMsXG5cdCAgICBtb250aHNTaG9ydCA6IG1vbnRoc1Nob3J0LFxuXHQgICAgd2Vla2RheXMgOiAnbmVkZcS+YV9wb25kZWxva191dG9yb2tfc3RyZWRhX8WhdHZydG9rX3BpYXRva19zb2JvdGEnLnNwbGl0KCdfJyksXG5cdCAgICB3ZWVrZGF5c1Nob3J0IDogJ25lX3BvX3V0X3N0X8WhdF9waV9zbycuc3BsaXQoJ18nKSxcblx0ICAgIHdlZWtkYXlzTWluIDogJ25lX3BvX3V0X3N0X8WhdF9waV9zbycuc3BsaXQoJ18nKSxcblx0ICAgIGxvbmdEYXRlRm9ybWF0IDoge1xuXHQgICAgICAgIExUOiAnSDptbScsXG5cdCAgICAgICAgTFRTIDogJ0g6bW06c3MnLFxuXHQgICAgICAgIEwgOiAnREQuTU0uWVlZWScsXG5cdCAgICAgICAgTEwgOiAnRC4gTU1NTSBZWVlZJyxcblx0ICAgICAgICBMTEwgOiAnRC4gTU1NTSBZWVlZIEg6bW0nLFxuXHQgICAgICAgIExMTEwgOiAnZGRkZCBELiBNTU1NIFlZWVkgSDptbSdcblx0ICAgIH0sXG5cdCAgICBjYWxlbmRhciA6IHtcblx0ICAgICAgICBzYW1lRGF5OiAnW2RuZXMgb10gTFQnLFxuXHQgICAgICAgIG5leHREYXk6ICdbemFqdHJhIG9dIExUJyxcblx0ICAgICAgICBuZXh0V2VlazogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcblx0ICAgICAgICAgICAgICAgIGNhc2UgMDpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2IG5lZGXEvnUgb10gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAxOlxuXHQgICAgICAgICAgICAgICAgY2FzZSAyOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ZdIGRkZGQgW29dIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMzpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2IHN0cmVkdSBvXSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDQ6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdm8gxaF0dnJ0b2sgb10gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSA1OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3YgcGlhdG9rIG9dIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgNjpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2IHNvYm90dSBvXSBMVCc7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9LFxuXHQgICAgICAgIGxhc3REYXk6ICdbdsSNZXJhIG9dIExUJyxcblx0ICAgICAgICBsYXN0V2VlazogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcblx0ICAgICAgICAgICAgICAgIGNhc2UgMDpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1ttaW51bMO6IG5lZGXEvnUgb10gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAxOlxuXHQgICAgICAgICAgICAgICAgY2FzZSAyOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW21pbnVsw71dIGRkZGQgW29dIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMzpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1ttaW51bMO6IHN0cmVkdSBvXSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDQ6XG5cdCAgICAgICAgICAgICAgICBjYXNlIDU6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbbWludWzDvV0gZGRkZCBbb10gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSA2OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW21pbnVsw7ogc29ib3R1IG9dIExUJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgc2FtZUVsc2U6ICdMJ1xuXHQgICAgfSxcblx0ICAgIHJlbGF0aXZlVGltZSA6IHtcblx0ICAgICAgICBmdXR1cmUgOiAnemEgJXMnLFxuXHQgICAgICAgIHBhc3QgOiAncHJlZCAlcycsXG5cdCAgICAgICAgcyA6IHRyYW5zbGF0ZSxcblx0ICAgICAgICBtIDogdHJhbnNsYXRlLFxuXHQgICAgICAgIG1tIDogdHJhbnN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hbWknO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnbWludXQnIDogJ21pbnV0YW1pJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuXHQgICAgICAgIGNhc2UgJ2gnOlxuXHQgICAgICAgICAgICByZXR1cm4gd2l0aG91dFN1ZmZpeCA/ICdlbmEgdXJhJyA6ICdlbm8gdXJvJztcblx0ICAgICAgICBjYXNlICdoaCc6XG5cdCAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4ID8gJ3VyYScgOiAndXJvJztcblx0ICAgICAgICAgICAgfSBlbHNlIGlmIChudW1iZXIgPT09IDIpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ3VyaScgOiAndXJhbWEnO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA8IDUpIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ3VyZScgOiAndXJhbWknO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAndXInIDogJ3VyYW1pJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuXHQgICAgICAgIGNhc2UgJ2QnOlxuXHQgICAgICAgICAgICByZXR1cm4gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdlbiBkYW4nIDogJ2VuaW0gZG5lbSc7XG5cdCAgICAgICAgY2FzZSAnZGQnOlxuXHQgICAgICAgICAgICBpZiAobnVtYmVyID09PSAxKSB7XG5cdCAgICAgICAgICAgICAgICByZXN1bHQgKz0gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdkYW4nIDogJ2RuZW0nO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMikge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnZG5pJyA6ICdkbmV2b21hJztcblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ2RuaScgOiAnZG5ldmknO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG5cdCAgICAgICAgY2FzZSAnTSc6XG5cdCAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ2VuIG1lc2VjJyA6ICdlbmltIG1lc2VjZW0nO1xuXHQgICAgICAgIGNhc2UgJ01NJzpcblx0ICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnbWVzZWMnIDogJ21lc2VjZW0nO1xuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMikge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnbWVzZWNhJyA6ICdtZXNlY2VtYSc7XG5cdCAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyIDwgNSkge1xuXHQgICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnbWVzZWNlJyA6ICdtZXNlY2knO1xuXHQgICAgIC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gKCkge1xuXHQgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcblx0ICAgICAgICAgICAgICAgIGNhc2UgMDpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2XSBbbmVkZWxqb10gW29iXSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDM6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdl0gW3NyZWRvXSBbb2JdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgNjpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2XSBbc29ib3RvXSBbb2JdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMTpcblx0ICAgICAgICAgICAgICAgIGNhc2UgMjpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNDpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNTpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2XSBkZGRkIFtvYl0gTFQnO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBsYXN0RGF5ICA6ICdbdsSNZXJhaiBvYl0gTFQnLFxuXHQgICAgICAgIGxhc3RXZWVrIDogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcblx0ICAgICAgICAgICAgICAgIGNhc2UgMDpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1twcmVqxaFuam9dIFtuZWRlbGpvXSBbb2JdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMzpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1twcmVqxaFuam9dIFtzcmVkb10gW29iXSBMVCc7XG5cdCAgICAgICAgICAgICAgICBjYXNlIDY6XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbcHJlasWhbmpvXSBbc29ib3RvXSBbb2JdIExUJztcblx0ICAgICAgICAgICAgICAgIG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G5cdCAgICBsb25nRGF0ZUZvcm1hdDoge1xuXHQgICAgICAgIExUOiAnSDptbScsXG5cdCAgICAgICAgTFRTIDogJ0g6bW06c3MnLFxuXHQgICAgICAgIEw6ICdERC5NTS5ZWVlZJyxcblx0ICAgICAgICBMTDogJ0QuIE1NTU0gWVlZWScsXG5cdCAgICAgICAgTExMOiAnRC4gTU1NTSBZWVlZIEg6bW0nLFxuXHQgICAgICAgIExMTEw6ICdkZGRkLCBELiBNTU1NIFlZWVkgSDptbSdcblx0ICAgIH0sXG5cdCAgICBjYWxlbmRhcjoge1xuXHQgICAgICAgIHNhbWVEYXk6ICdb0LTQsNC90LDRgSDRg10gTFQnLFxuXHQgICAgICAgIG5leHREYXk6ICdb0YHRg9GC0YDQsCDRg10gTFQnLFxuXHQgICAgICAgIG5leHRXZWVrOiBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuXHQgICAgICAgICAgICAgICAgY2FzZSAwOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9GDXSBb0L3QtdC00LXRmdGDXSBb0YNdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMzpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vRg10gW9GB0YDQtdC00YNdIFvRg10gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSA2OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9GDXSBb0YHRg9Cx0L7RgtGDXSBb0YNdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgMTpcblx0ICAgICAgICAgICAgICAgIGNhc2UgMjpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNDpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNTpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vRg10gZGRkZCBb0YNdIExUJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAg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GF5c01pbjogJ25lX3BvX3V0X3NyX8SNZV9wZV9zdScuc3BsaXQoJ18nKSxcblx0ICAgIHdlZWtkYXlzUGFyc2VFeGFjdCA6IHRydWUsXG5cdCAgICBsb25nRGF0ZUZvcm1hdDoge1xuXHQgICAgICAgIExUOiAnSDptbScsXG5cdCAgICAgICAgTFRTIDogJ0g6bW06c3MnLFxuXHQgICAgICAgIEw6ICdERC5NTS5ZWVlZJyxcblx0ICAgICAgICBMTDogJ0QuIE1NTU0gWVlZWScsXG5cdCAgICAgICAgTExMOiAnRC4gTU1NTSBZWVlZIEg6bW0nLFxuXHQgICAgICAgIExMTEw6ICdkZGRkLCBELiBNTU1NIFlZWVkgSDptbSdcblx0ICAgIH0sXG5cdCAgICBjYWxlbmRhcjoge1xuXHQgICAgICAgIHNhbWVEYXk6ICdbZGFuYXMgdV0gTFQnLFxuXHQgICAgICAgIG5leHREYXk6ICdbc3V0cmEgdV0gTFQnLFxuXHQgICAgICAgIG5leHRXZWVrOiBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuXHQgICAgICAgICAgICAgICAgY2FzZSAwOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIFtuZWRlbGp1XSBbdV0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAzOlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIFtzcmVkdV0gW3VdIExUJztcblx0ICAgICAgICAgICAgICAgIGNhc2UgNjpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBbc3Vib3R1XSBbdV0gTFQnO1xuXHQgICAgICAgICAgICAgICAgY2FzZSAxOlxuXHQgICAgICAgICAgICAgICAgY2FzZSAyOlxuXHQgICAgICAgICAgICAgICAgY2FzZSA0OlxuXHQgICAgICAgICAgICAgICAgY2FzZSA1OlxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIGRkZGQgW3VdIExUJztcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0sXG5cdCAgICAgICAgbGFzdERheSAgOiAnW2p1xI1lIHVdIExUJyxcblx0ICAgICAgICBsYXN0V2VlayA6IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgdmFyIGxhc3RXZWVrRGF5cyA9IFtcblx0ICAgICAgICAgICAgICAgICdbcHJvxaFsZV0gW25lZGVsamVdIFt1XSBMVCcsXG5cdCAgICAgICAgICAgICAgICAnW3Byb8WhbG9nXSBbcG9uZWRlbGprYV0gW3VdIExUJyxcblx0ICAgICAgICAgICAgICAgICdbcHJvxaFsb2ddIFt1dG9ya2FdIFt1XSBMVCcsXG5cdCAgICAgICAgICAgICAgICAnW3Byb8WhbGVdIFtzcmVkZV0gW3VdIExUJyxcblx0ICAgICAgICAgICAgICAgICdbcHJvxaFsb2ddIFvEjWV0dnJ0a2FdIFt1XSBMVCcsXG5cdCAgICAgICAgICAgICAgICAnW3Byb8WhbG9nXSBbcGV0a2FdIFt1XSBMVCcsXG5cdCAgICAgICAgICAgICAgICAnW3Byb8WhbGVdIFtzdWJvdGVdIFt1XSBMVCdcblx0ICAgICAgICAgICAgXTtcblx0ICAgICAgICAgICAgcmV0dXJuIGxhc3RXZWVrRGF5c1t0aGlzLmRheSgpXTtcblx0ICAgICAgICB9LFxuXHQgICAgICAgIHNhbWVFbHNlIDogJ0wnXG5cdCAgICB9LFxuXHQgICAgcmVsYXRpdmVUaW1lIDoge1xuXHQgICAgICAgIGZ1dHVyZSA6ICd6YSAlcycsXG5cdCAgICAgICAgcGFzdCAgIDogJ3ByZSAlcycsXG5cdCAgICAgICAgcyAgICAgIDogJ25la29saWtvIHNla3VuZGknLFxuXHQgICAgICAgIG0gICAgICA6IHRyYW5zbGF0b3IudHJhbnNsYXRlLFxuXHQgICAgICAgIG1tICAgICA6IHRyYW5zbGF0b3IudHJhbnNsYXRlLFxuXHQgICAgICAgIGggICAgICA6IHRyYW5zbGF0b3Iud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gICB5eSA6ICclZCBpbWlueWFrYSdcblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbVBhcnNlOiAvZWt1c2VuaXxlbWluaXxlbnRzYW1iYW1hfGVidXN1a3UvLFxuXHQgICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91cnMsIG1pbnV0ZXMsIGlzTG93ZXIpIHtcblx0ICAgICAgICBpZiAoaG91cnMgPCAxMSkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ2VrdXNlbmknO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG91cnMgPCAxNSkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ2VtaW5pJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhvdXJzIDwgMTkpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICdlbnRzYW1iYW1hJztcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4gJ2VidXN1a3UnO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbUhvdXIgOiBmdW5jdGlvbiAoaG91ciwgbWVyaWRpZW0pIHtcblx0ICAgICAgICBpZiAoaG91ciA9PT0gMTIpIHtcblx0ICAgICAgICAgICAgaG91ciA9IDA7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGlmIChtZXJpZGllbSA9PT0gJ2VrdXNlbmknKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBob3VyO1xuXHQgICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICdlbWluaScpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGhvdXIgPj0gMTEgPyBob3VyIDogaG91ciArIDEyO1xuXHQgICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICdlbnRzYW1iYW1hJyB8fCBtZXJpZGllbSA9PT0gJ2VidXN1a3UnKSB7XG5cdCAgICAgICAgICAgIGlmIChob3VyID09PSAwKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gMDt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uXHQgICAgJ+Cvpic6ICcwJ1xuXHR9O1xuXHRcblx0dmFyIHRhID0gbW9tZW50LmRlZmluZUxvY2FsZSgndGEnLCB7XG5cdCAgICBtb250aHMgOiAn4K6c4K6p4K614K6w4K6/X+CuquCuv+CuquCvjeCusOCuteCusOCuv1/grq7grr7grrDgr43grprgr41f4K6P4K6q4K+N4K6w4K6y4K+NX+CuruCvh1/grpzgr4Lgrqngr41f4K6c4K+C4K6y4K+IX+CuhuCuleCuuOCvjeCun+CvjV/grprgr4bgrqrgr43grp/gr4bgrq7gr43grqrgrrDgr41f4K6F4K6V4K+N4K6f4K+H4K6+4K6q4K6w4K+NX+CuqOCuteCuruCvjeCuquCusOCvjV/grp/grr/grprgrq7gr43grqrgrrDgr40nLnNwbGl0KCdfJyksXG5cdCAgICBtb250aHNTaG9ydCA6ICfgrpzgrqngrrXgrrDgrr9f4K6q4K6/4K6q4K+N4K6w4K614K6w4K6/X+CuruCuvuCusOCvjeCumuCvjV/gro/grqrgr43grrDgrrLgr41f4K6u4K+HX+CunOCvguCuqeCvjV/grpzgr4LgrrLgr4hf4K6G4K6V4K644K+N4K6f4K+NX+CumuCvhuCuquCvjeCun+CvhuCuruCvjeCuquCusOCvjV/groXgrpXgr43grp/gr4fgrr7grqrgrrDgr41f4K6o4K614K6u4K+N4K6q4K6w4K+NX+Cun+Cuv+CumuCuruCvjeCuquCusOCvjScuc3BsaXQoJ18nKSxcblx0ICAgIHdlZWtkYXlzIDogJ+CunuCuvuCur+Cuv+CuseCvjeCuseCvgeCuleCvjeCuleCuv+CutOCuruCviF/grqTgrr/grpngr43grpXgrp/gr43grpXgrr/grrTgrq7gr4hf4K6a4K+G4K614K+N4K614K6+4K6v4K+N4K6V4K6/4K604K6u4K+IX+CuquCvgeCupOCuqeCvjeCuleCuv+CutOCuruCviF/grrXgrr/grq/grr7grrTgrpXgr43grpXgrr/grrTgrq7gr4hf4K614K+G4K6z4K+N4K6z4K6/4K6V4K+N4K6V4K6/4K604K6u4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XHQgICAgICAgIExMTEwgOiAn4Lin4Lix4LiZZGRkZOC4l+C4teC5iCBEIE1NTU0gWVlZWSDguYDguKfguKXguLIgSDptbSdcblx0ICAgIH0sXG5cdCAgICBtZXJpZGllbVBhcnNlOiAv4LiB4LmI4Lit4LiZ4LmA4LiX4Li14LmI4Lii4LiHfOC4q+C4peC4seC4h+C5gOC4l+C4teC5iOC4ouC4hy8sXG5cdCAgICBpc1BNOiBmdW5jdGlvbiAoaW5wdXQpIHtcblx0ICAgICAgICByZXR1cm4gaW5wdXQgPT09ICfguKvguKXguLHguIfguYDguJfguLXguYjguKLguIcnO1xuXHQgICAgfSxcblx0ICAgIG1lcmlkaWVtIDogZnVuY3Rpb24gKGhvdXIsIG1pbnV0ZSwgaXNMb3dlcikge1xuXHQgICAgICAgIGlmIChob3VyIDwgMTIpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfguIHguYjguK3guJnguYDguJfguLXguYjguKLguIcnO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn4Lir4Lil4Lix4LiH4LmA4LiX4Li14LmI4Lii4LiHJztcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgY2FsZW5kYXIgOiB7XG5cdCAgICAgICAgc2FtZURheSA6ICdb4Lin4Lix4LiZ4LiZ4Li14LmJIOC5gOC4p+C4peC4sl0gTFQnLFxuXHQgICAgICAgIG5leHREYXkgOiAnW+C4nuC4o+C4uOC5iOC4h+C4meC4teC5iSDguYDguKfguKXguLJdIExUJyxcblx0ICAgICAgICBuZXh0V2VlayA6ICdkZGRkW+C4q+C4meC5ieC4siDguYDguKfguKXguLJdIExUJyxcblx0ICAgICAgICBsYXN0RGF5IDogJ1vguYDguKHguLfguYjguK3guKfguLLguJnguJnguLXguYkg4LmA4Lin4Lil4LiyXSBMVCcsXG5cdCAgICAgICAgbGFzdFdlZWsgOiAnW+C4p+C4seC4mV1kZGRkW+C4l+C4teC5iOC5geC4peC5ieC4py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ICAgdmFyIG51bWJlck5vdW4gPSBudW1iZXJBc05vdW4obnVtYmVyKTtcblx0ICAgIHN3aXRjaCAoc3RyaW5nKSB7XG5cdCAgICAgICAgY2FzZSAnbW0nOlxuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyTm91biArICcgdHVwJztcblx0ICAgICAgICBjYXNlICdoaCc6XG5cdCAgICAgICAgICAgIHJldHVybiBudW1iZXJOb3VuICsgJyByZXAnO1xuXHQgICAgICAgIGNhc2UgJ2RkJzpcblx0ICAgICAgICAgICAgcmV0dXJuIG51bWJlck5vdW4gKyAnIGphaic7XG5cdCAgICAgICAgY2FzZSAnTU0nOlxuXHQgICAgICAgICAgICByZXR1cm4gbnVtYmVyTm91biArICcgamFyJztcblx0ICAgICAgICBjYXNlICd5eSc6XG5cdCAgICAgICAgICAgIHJldHVybiBudW1iZXJOb3VuICsgJyBESVMnO1xuXHQgICAgfVxuXHR9XG5cdFxuXHRmdW5jdGlvbiBudW1iZXJBc05vdW4obnVtYmVyKSB7XG5cdCAgICB2YXIgaHVuZHJlZCA9IE1hdGguZmxvb3IoKG51bWJlciAlIDEwMDApIC8gMTAwKSxcblx0ICAgIHRlbiA9IE1hdGguZmxvb3IoKG51bWJlciAlIDEwMCkgLyAxMCksXG5cdCAgICBvbmUgPSBudW1iZXIgJSAxMCxcblx0ICAgIHdvcmQgPSAnJztcblx0ICAgIGlmIChodW5kcmVkID4gMCkge1xuXHQgICAgICAgIHdvcmQgKz0gbnVtYmVyc05vdW5zW2h1bmRyZWRdICsgJ3ZhdGxoJztcblx0ICAgIH1cblx0ICAgIGlmICh0ZW4gPiAwKSB7XG5cdCAgICAgICAgd29yZCArPSAoKHdvcmQgIT09ICcnKSA/ICcgJyA6ICcnKSArIG51bWJlcnNOb3Vuc1t0ZW5dICsgJ21hSCc7XG5cdCAgICB9XG5cdCAgICBpZiAob25lID4gMCkge1xuXHQgICAgICAgIHdvcmQgKz0gKCh3b3JkICE9PSAnJykgPyAnICcgOiAnJyk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CwICcpLFxuXHQgICAgICAgIG5leHRXZWVrOiBwcm9jZXNzSG91cnNGdW5jdGlvbignW9CjXSBkZGRkIFsnKSxcblx0ICAgICAgICBsYXN0V2VlazogZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcblx0ICAgICAgICAgICAgICAgIGNhc2UgMDpcblx0ICAgICAgICAgICAgICAgIGNhc2UgMzpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNTpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNjpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHJvY2Vzc0hvdXJzRnVuY3Rpb24oJ1vQnNC40L3Rg9C70L7Rl10gZGRkZCBbJykuY2FsbCh0aGlzKTtcblx0ICAgICAgICAgICAgICAgIGNhc2UgMTpcblx0ICAgICAgICAgICAgICAgIGNhc2UgMjpcblx0ICAgICAgICAgICAgICAgIGNhc2UgNDpcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHJvY2Vzc0hvdXJzRnVuY3Rpb24oJ1vQnNC40L3Rg9C70L7Qs9C+XSBkZGRkIFsnKS5jYWxsKHRoaXMpO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfSxcblx0ICAgICAgICBzYW1lRWxzZTogJ0wnXG5cdCAgICB9LFxuXHQgICAgcmVsYXRpdmVUaW1lIDoge1xuXHQgICAgICAgIGZ1dHVyZSA6ICfQt9CwICVzJyxcblx0ICAgICAgICBwYXN0IDogJyVzINGC0L7QvNGDJyxcblx0ICAgICAgICBzIDogJ9C00LXQutGW0LvRjNC60LAg0YHQtdC60YPQvdC0Jyxcblx0ICAgICAgICBtIDogcmVsYXRpdmVUaW1lV2l0aFBsdXJhbCxcblx0ICAgICAgICBtbSA6IHJlbGF0aXZlVGltZVdpdGhQbHVyYWwsXG5cdCAgICAgICAgaCA6ICfQs9C+0LTQuNC90YMnLFxuXHQgICAgICAgIGhoIDogcmVsYXRpdmVUaW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ICAgICAgICB9XG5cdCAgICAgICAgaWYgKG1lcmlkaWVtID09PSAn5YeM5pmoJyB8fCBtZXJpZGllbSA9PT0gJ+aXqeS4iicgfHxcblx0ICAgICAgICAgICAgICAgIG1lcmlkaWVtID09PSAn5LiK5Y2IJykge1xuXHQgICAgICAgICAgICByZXR1cm4gaG91cjtcblx0ICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn5LiL5Y2IJyB8fCBtZXJpZGllbSA9PT0gJ+aZmuS4iicpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGhvdXIgKyAxMjtcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAvLyAn5Lit5Y2IJ1xuXHQgICAgICAgICAgICByZXR1cm4gaG91ciA+PSAxMSA/IGhvdXIgOiBob3VyICsgMTI7XG5cdCAgICAgICAgfVxuXHQgICAgfSxcblx0ICAgIG1lcmlkaWVtIDogZnVuY3Rpb24gKGhvdXIsIG1pbnV0ZSwgaXNMb3dlcikge1xuXHQgICAgICAgIHZhciBobSA9IGhvdXIgKiAxMDAgKyBtaW51dGU7XG5cdCAgICAgICAgaWYgKGhtIDwgNjAwKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn5YeM5pmoJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhtIDwgOTAwKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn5pep5LiKJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhtIDwgMTEzMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+S4iuWNiCc7XG5cdCAgICAgICAgfSBlbHNlIGlmIChobSA8IDEyMzApIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfkuK3ljYgnO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG0gPCAxODAwKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn5LiL5Y2IJztcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+aZmuS4iic7XG5cdCAgICAgICAgfVxuXHQgICAgfSxcblx0ICAgIGNhbGVuZGFyIDoge1xuXHQgICAgICAgIHNhbWVEYXkgOiAnW+S7iuWkqV1MVCcsXG5cdCAgICAgICAgbmV4dERheSA6ICdb5piO5aSpXUxUJyxcblx0ICAgICAgICBuZXh0V2VlayA6ICdb5LiLXWRkZGRMVCcsXG5cdCAgICAgICAgbGFzdERheSA6ICdb5pio5aSpXUxUJyxcblx0ICAgICAgICBsYXN0V2VlayA6ICdb5LiKXWRkZGRMVCcsXG5cdCAgICAgICAgc2FtZUVsc2UgOiAnTCdcblx0ICAgIH0sXG5cdCAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn0o5pelfOaciHzlkagpLyxcblx0ICAgIG9yZGluYWwgOiBmdW5jdGlvbiAobnVtYmVyLCBwZXJpb2QpIHtcblx0ICAgICAgICBzd2l0Y2ggKHBlcmlvZCkge1xuXHQgICAgICAgICAgICBjYXNlICdkJzpcblx0ICAgICAgICAgICAgY2FzZSAnRCc6XG5cdCAgICAgICAgICAgIGNhc2UgJ0RERCc6XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJ+aXpSc7XG5cdCAgICAgICAgICAgIGNhc2UgJ00nOlxuXHQgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICfmnIgnO1xuXHQgICAgICAgICAgICBjYXNlICd3Jzpcblx0ICAgICAgICAgICAgY2FzZSAnVyc6XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJ+WRqCc7XG5cdCAgICAgICAgICAgIGRlZmF1bHQ6XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICByZWxhdGl2ZVRpbWUgOiB7XG5cdCAgICAgICAgZnV0dXJlIDogJyVz5YaFJyxcblx0ICAgICAgICBwYXN0IDogJyVz5YmNJyxcblx0ICAgICAgICBzIDogJ+WHoOen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ksXG5cdCAgICB3ZWVrZGF5c01pbiA6ICfml6Vf5LiAX+S6jF/kuIlf5ZubX+S6lF/lha0nLnNwbGl0KCdfJyksXG5cdCAgICBsb25nRGF0ZUZvcm1hdCA6IHtcblx0ICAgICAgICBMVCA6ICdISDptbScsXG5cdCAgICAgICAgTFRTIDogJ0hIOm1tOnNzJyxcblx0ICAgICAgICBMIDogJ1lZWVnlubRNTU1E5pelJyxcblx0ICAgICAgICBMTCA6ICdZWVlZ5bm0TU1NROaXpScsXG5cdCAgICAgICAgTExMIDogJ1lZWVnlubRNTU1E5pelIEhIOm1tJyxcblx0ICAgICAgICBMTExMIDogJ1lZWVnlubRNTU1E5pelZGRkZCBISDptbScsXG5cdCAgICAgICAgbCA6ICdZWVlZ5bm0TU1NROaXpScsXG5cdCAgICAgICAgbGwgOiAnWVlZWeW5tE1NTUTml6UnLFxuXHQgICAgICAgIGxsbCA6ICdZWVlZ5bm0TU1NROaXpSBISDptbScsXG5cdCAgICAgICAgbGxsbCA6ICdZWVlZ5bm0TU1NROaXpWRkZGQgSEg6bW0nXG5cdCAgICB9LFxuXHQgICAgbWVyaWRpZW1QYXJzZTogL+WHjOaZqHzml6nkuIp85LiK5Y2IfOS4reWNiHzkuIvljYh85pma5LiKLyxcblx0ICAgIG1lcmlkaWVtSG91ciA6IGZ1bmN0aW9uIChob3VyLCBtZXJpZGllbSkge1xuXHQgICAgICAgIGlmIChob3VyID09PSAxMikge1xuXHQgICAgICAgICAgICBob3VyID0gMDtcblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKG1lcmlkaWVtID09PSAn5YeM5pmoJyB8fCBtZXJpZGllbSA9PT0gJ+aXqeS4iicgfHwgbWVyaWRpZW0gPT09ICfkuIrljYgnKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBob3VyO1xuXHQgICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfkuK3ljYgnKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBob3VyID49IDExID8gaG91ciA6IGhvdXIgKyAxMjtcblx0ICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn5LiL5Y2IJyB8fCBtZXJpZGllbSA9PT0gJ+aZmuS4iicpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGhvdXIgKyAxMjtcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG5cdCAgICAgICAgdmFyIGhtID0gaG91ciAqIDEwMCArIG1pbnV0ZTtcblx0ICAgICAgICBpZiAoaG0gPCA2MDApIHtcblx0ICAgICAgICAgICAgcmV0dXJuICflh4zmmagnO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG0gPCA5MDApIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfml6nkuIonO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG0gPCAxMTMwKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn5LiK5Y2IJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhtIDwgMTIzMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+S4reWNiCc7XG5cdCAgICAgICAgfSBlbHNlIGlmIChobSA8IDE4MDApIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfkuIvljYgnO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn5pma5LiKJztcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgY2FsZW5kYXIgOiB7XG5cdCAgICAgICAgc2FtZURheSA6ICdb5LuK5aSpXUxUJyxcblx0ICAgICAgICBuZXh0RGF5IDogJ1vmmI7lpKldTFQnLFxuXHQgICAgICAgIG5leHRXZWVrIDogJ1vkuItdZGRkZExUJyxcblx0ICAgICAgICBsYXN0RGF5IDogJ1vmmKjlpKldTFQnLFxuXHQgICAgICAgIGxhc3RXZWVrIDogJ1vkuIpdZGRkZExUJyxcblx0ICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuXHQgICAgfSxcblx0ICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2U6IC9cXGR7MSwyfSjml6V85pyIfOmAsSkvLFxuXHQgICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIsIHBlcmlvZCkge1xuXHQgICAgICAgIHN3aXRjaCAocGVyaW9kKSB7XG5cdCAgICAgICAgICAgIGNhc2UgJ2QnIDpcblx0ICAgICAgICAgICAgY2FzZSAnRCcgOlxuXHQgICAgICAgICAgICBjYXNlICdEREQnIDpcblx0ICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAn5pelJztcblx0ICAgICAgICAgICAgY2FzZSAnTScgOlxuXHQgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICfmnIgnO1xuXHQgICAgICAgICAgICBjYXNlICd3JyA6XG5cdCAgICAgICAgICAgIGNhc2UgJ1cnIDpcblx0ICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAn6YCxJztcblx0ICAgICAgICAgICAgZGVmYXVsdCA6XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICByZWxhdGl2ZVRpbWUgOiB7XG5cdCAgICAgICAgZnV0dXJlIDogJyVz5YWnJyxcblx0ICAgICAgICBwYXN0IDogJyVz5YmNJyxcblx0ICAgICAgICBzIDogJ+W5vuenkicsXG5cdCAgICAgICAgbSA6ICcxIOWIhumQmCcsXG5cdCAgICAgICAgbW0gOiAnJWQg5YiG6ZCYJyxcblx0ICAgICAgICBoIDogJzEg5bCP5pmCJyxcblx0ICAgICAgICBoaCA6ICclZCDlsI/mmYInLFxuXHQgICAgICAgIGQgOiAnMSDlpKknLFxuXHQgICAgICAgIGRkIDogJyVkIOWkqScsXG5cdCAgICAgICAgTSA6ICcxIOWAi+aciCcsXG5cdCAgICAgICAgTU0gOiAnJWQg5YCL5pyIJyxcblx0ICAgICA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1xuXHQgICAgICAgIGlmIChob3VyID09PSAxMikge1xuXHQgICAgICAgICAgICBob3VyID0gMDtcblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKG1lcmlkaWVtID09PSAn5YeM5pmoJyB8fCBtZXJpZGllbSA9PT0gJ+aXqeS4iicgfHwgbWVyaWRpZW0gPT09ICfkuIrljYgnKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBob3VyO1xuXHQgICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfkuK3ljYgnKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBob3VyID49IDExID8gaG91ciA6IGhvdXIgKyAxMjtcblx0ICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn5LiL5Y2IJyB8fCBtZXJpZGllbSA9PT0gJ+aZmuS4iicpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGhvdXIgKyAxMjtcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG5cdCAgICAgICAgdmFyIGhtID0gaG91ciAqIDEwMCArIG1pbnV0ZTtcblx0ICAgICAgICBpZiAoaG0gPCA2MDApIHtcblx0ICAgICAgICAgICAgcmV0dXJuICflh4zmmagnO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG0gPCA5MDApIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfml6nkuIonO1xuXHQgICAgICAgIH0gZWxzZSBpZiAoaG0gPCAxMTMwKSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn5LiK5Y2IJztcblx0ICAgICAgICB9IGVsc2UgaWYgKGhtIDwgMTIzMCkge1xuXHQgICAgICAgICAgICByZXR1cm4gJ+S4reWNiCc7XG5cdCAgICAgICAgfSBlbHNlIGlmIChobSA8IDE4MDApIHtcblx0ICAgICAgICAgICAgcmV0dXJuICfkuIvljYgnO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIHJldHVybiAn5pma5LiKJztcblx0ICAgICAgICB9XG5cdCAgICB9LFxuXHQgICAgY2FsZW5kYXIgOiB7XG5cdCAgICAgICAgc2FtZURheSA6ICdb5LuK5aSpXUxUJyxcblx0ICAgICAgICBuZXh0RGF5IDogJ1vmmI7lpKldTFQnLFxuXHQgICAgICAgIG5leHRXZWVrIDogJ1vkuItdZGRkZExUJyxcblx0ICAgICAgICBsYXN0RGF5IDogJ1vmmKjlpKldTFQnLFxuXHQgICAgICAgIGxhc3RXZWVrIDogJ1vkuIpdZGRkZExUJyxcblx0ICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuXHQgICAgfSxcblx0ICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2U6IC9cXGR7MSwyfSjml6V85pyIfOmAsSkvLFxuXHQgICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIsIHBlcmlvZCkge1xuXHQgICAgICAgIHN3aXRjaCAocGVyaW9kKSB7XG5cdCAgICAgICAgICAgIGNhc2UgJ2QnIDpcblx0ICAgICAgICAgICAgY2FzZSAnRCcgOlxuXHQgICAgICAgICAgICBjYXNlICdEREQnIDpcblx0ICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAn5pelJztcblx0ICAgICAgICAgICAgY2FzZSAnTScgOlxuXHQgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICfmnIgnO1xuXHQgICAgICAgICAgICBjYXNlICd3JyA6XG5cdCAgICAgICAgICAgIGNhc2UgJ1cnIDpcblx0ICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAn6YCxJztcblx0ICAgICAgICAgICAgZGVmYXVsdCA6XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyO1xuXHQgICAgICAgIH1cblx0ICAgIH0sXG5cdCAgICByZWxhdGl2ZVRpbWUgOiB7XG5cdCAgICAgICAgZnV0dXJlIDogJyVz5YWnJyxcblx0ICAgICAgICBwYXN0IDog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bWFpbiwgc2VjdXJlKSB7XG5cdCAgICAgICAgdmFyIGNvb2tpZSA9IFtdO1xuXHQgICAgICAgIGNvb2tpZS5wdXNoKG5hbWUgKyAnPScgKyBlbmNvZGVVUklDb21wb25lbnQodmFsdWUpKTtcblx0XG5cdCAgICAgICAgaWYgKHV0aWxzLmlzTnVtYmVyKGV4cGlyZXMpKSB7XG5cdCAgICAgICAgICBjb29raWUucHVzaCgnZXhwaXJlcz0nICsgbmV3IERhdGUoZXhwaXJlcykudG9HTVRTdHJpbmcoKSk7XG5cdCAgICAgICAgfVxuXHRcblx0ICAgICAgICBpZiAodXRpbHMuaXNTdHJpbmcocGF0aCkpIHtcblx0ICAgICAgICAgIGNvb2tpZS5wdXNoKCdwYXRoPScgKyBwYXRoKTtcblx0ICAgICAgICB9XG5cdFxuXHQgICAgICAgIGlmICh1dGlscy5pc1N0cmluZyhkb21haW4pKSB7XG5cdCAgICAgICAgICBjb29raWUucHVzaCgnZG9tYWluPScgKyBkb21haW4pO1xuXHQgICAgICAgIH1cblx0XG5cdCAgICAgICAgaWYgKHNlY3VyZSA9PT0gdHJ1ZSkge1xuXHQgICAgICAgICAgY29va2llLnB1c2goJ3NlY3VyZScpO1xuXHQgICAgICAgIH1cblx0XG5cdCAgICAgICAgZG9jdW1lbnQuY29va2llID0gY29va2llLmpvaW4oJzsgJyk7XG5cdCAgICAgIH0sXG5cdFxuXHQgICAgICByZWFkOiBmdW5jdGlvbiByZWFkKG5hbWUpIHtcblx0ICAgICAgICB2YXIgbWF0Y2ggPSBkb2N1bWVudC5jb29raWUubWF0Y2gobmV3IFJlZ0V4cCgnKF58O1xcXFxzKikoJyArIG5hbWUgKyAnKT0oW147XSopJykpO1xuXHQgICAgICAgIHJldHVybiAobWF0Y2ggPyBkZWNvZGVVUklDb21wb25lbnQobWF0Y2hbM10pIDogbnVsbCk7XG5cdCAgICAgIH0sXG5cdFxuXHQgICAgICByZW1vdmU6IGZ1bmN0aW9uIHJlbW92ZShuYW1lKS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XMnLFxuXHQgICAgICAgICAgdGljazoge1xuXHQgICAgICAgICAgICB2YWx1ZXM6IFtzdGFydCwgZW5kXSxcblx0ICAgICAgICAgICAgZm9ybWF0OiAnJVktJW0tJWQgJUg6JU06JVMlWidcblx0ICAgICAgICAgIH1cblx0ICAgICAgICB9LFxuXHQgICAgICAgIHk6IHtcblx0ICAgICAgICAgIHRpY2s6IHtcblx0ICAgICAgICAgICAgdmFsdWVzOiBmdW5jdGlvbiB2YWx1ZXModikge1xuXHQgICAgICAgICAgICAgIHZhciB2YWx1ZXMgPSBbMCwgNV07XG5cdCAgICAgICAgICAgICAgdmFyIG1heCA9IHZbMV07XG5cdCAgICAgICAgICAgICAgdmFyIGkgPSAxMDtcblx0ICAgICAgICAgICAgICB3aGlsZSAoaSA8IG1heCkge1xuXHQgICAgICAgICAgICAgICAgdmFsdWVzLnB1c2goaSk7XG5cdCAgICAgICAgICAgICAgICBpID0gaSAqIDEwO1xuXHQgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICByZXR1cm4gdmFsdWVzO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgfVxuXHQgICAgICB9XG5cdCAgICB9KTtcblx0ICB9KTtcblx0XG5cdCAgc2VsZi5yZWxvYWQgPSBmdW5jdGlvbiAoZSkge1xuXHQgICAgdmFyIHN0YXJ0ID0gX3RoaXMuc3RhcnQudmFsdWU7XG5cdCAgICB2YXIgZW5kID0gX3RoaXMuZW5kLnZhbHVlO1xuXHQgICAgdmFyIHVybCA9ICc/c3RhcnQ9JyArIHN0YXJ0ICsgJyZlbmQ9JyArIGVuZCArICcjL3Byb2plY3RzLycgKyBlbmNvZGVVUklDb21wb25lbnQob3B0cy5wcm9qZWN0KSArICcvJyArIGVuY29kZVVSSUNvbXBvbmVudChvcHRzLm1lc3NhZ2UpO1xuXHQgICAgbG9jYXRpb24uaHJlZiA9IHVybDtcblx0ICB9O1xuXHR9KTtcblx0LyogV0VCUEFDSy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nByb3RvdHlwZTtcblx0ICAgICAgICAgICAgZGVyaXZlZC5wcm90b3R5cGUgPSBuZXcgZigpO1xuXHQgICAgICAgIH1cblx0XG5cdCAgICAgICAgZGVyaXZlZC5wcm90b3R5cGUuY29uc3RydWN0b3IgPSBkZXJpdmVkO1xuXHRcblx0ICAgICAgICByZXR1cm4gZGVyaXZlZDtcblx0ICAgIH1cblx0XG5cdCAgICBmdW5jdGlvbiBDaGFydChjb25maWcpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLmludGVybmFsID0gbmV3IENoYXJ0SW50ZXJuYWwodGhpcyk7XG5cdCAgICAgICAgJCQubG9hZENvbmZpZyhjb25maWcpO1xuXHRcblx0ICAgICAgICAkJC5iZWZvcmVJbml0KGNvbmZpZyk7XG5cdCAgICAgICAgJCQuaW5pdCgpO1xuXHQgICAgICAgICQkLmFmdGVySW5pdChjb25maWcpO1xuXHRcblx0ICAgICAgICAvLyBiaW5kIFwidGhpc1wiIHRvIG5lc3RlZCBBUElcblx0ICAgICAgICAoZnVuY3Rpb24gYmluZFRoaXMoZm4sIHRhcmdldCwgYXJnVGhpcykge1xuXHQgICAgICAgICAgICBPYmplY3Qua2V5cyhmbikuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7XG5cdCAgICAgICAgICAgICAgICB0YXJnZXRba2V5XSA9IGZuW2tleV0uYmluZChhcmdUaGlzKTtcblx0ICAgICAgICAgICAgICAgIGlmIChPYmplY3Qua2V5cyhmbltrZXldKS5sZW5ndGggPiAwKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgYmluZFRoaXMoZm5ba2V5XSwgdGFyZ2V0W2tleV0sIGFyZ1RoaXMpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9KTtcblx0ICAgICAgICB9KShjM19jaGFydF9mbiwgdGhpcywgdGhpcyk7XG5cdCAgICB9XG5cdFxuXHQgICAgZnVuY3Rpb24gQ2hhcnRJbnRlcm5hbChhcGkpIHtcblx0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gPSAkJC5kMy5zZWxlY3QodGhpcyksXG5cdCAgICAgICAgICAgICAgICAgICAgeDEgPSBnLmF0dHIoJ3gxJyksXG5cdCAgICAgICAgICAgICAgICAgICAgeDIgPSBnLmF0dHIoJ3gyJyksXG5cdCAgICAgICAgICAgICAgICAgICAgeTEgPSBnLmF0dHIoJ3kxJyksXG5cdCAgICAgICAgICAgICAgICAgICAgeTIgPSBnLmF0dHIoJ3kyJyk7XG5cdCAgICAgICAgICAgICAgICBnLmF0dHIoe1xuXHQgICAgICAgICAgICAgICAgICAgICd4MSc6IE1hdGguY2VpbCh4MSksXG5cdCAgICAgICAgICAgICAgICAgICAgJ3gyJzogTWF0aC5jZWlsKHgyKSxcblx0ICAgICAgICAgICAgICAgICAgICAneTEnOiBNYXRoLmNlaWwoeTEpLFxuXHQgICAgICAgICAgICAgICAgICAgICd5Mic6IE1hdGguY2VpbCh5Milcblx0ICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICB9KTtcblx0ICAgICAgICB9XG5cdCAgICB9O1xuXHRcblx0XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi51cGRhdGVTaXplcyA9IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWc7XG5cdCAgICAgICAgdmFyIGxlZ2VuZEhlaWdodCA9ICQkLmxlZ2VuZCA/ICQkLmdldExlZ2VuZEhlaWdodCgpIDogMCxcblx0ICAgICAgICAgICAgbGVnZW5kV2lkdGggPSAkJC5sZWdlbmQgPyAkJC5nZXRMZWdlbmRXaWR0aCgpIDogMCxcblx0ICAgICAgICAgICAgbGVnZW5kSGVpZ2h0Rm9yQm90dG9tID0gJCQuaXNMZWdlbmRSaWdodCB8fCAkJC5pc0xlZ2VuZEluc2V0ID8gMCA6IGxlZ2VuZEhlaWdodCxcblx0ICAgICAgICAgICAgaGFzQXJjID0gJCQuaGFzQXJjVHlwZSgpLFxuXHQgICAgICAgIC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gICBpZiAoY29uZmlnLmF4aXNfeF90aWNrX2N1bGxpbmcgJiYgdGlja1ZhbHVlcykge1xuXHQgICAgICAgICAgICAgICAgZm9yIChpID0gMTsgaSA8IHRpY2tWYWx1ZXMubGVuZ3RoOyBpKyspIHtcblx0ICAgICAgICAgICAgICAgICAgICBpZiAodGlja1ZhbHVlcy5sZW5ndGggLyBpIDwgY29uZmlnLmF4aXNfeF90aWNrX2N1bGxpbmdfbWF4KSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGludGVydmFsRm9yQ3VsbGluZyA9IGk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICQkLnN2Zy5zZWxlY3RBbGwoJy4nICsgQ0xBU1MuYXhpc1ggKyAnIC50aWNrIHRleHQnKS5lYWNoKGZ1bmN0aW9uIChlKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgdmFyIGluZGV4ID0gdGlja1ZhbHVlcy5pbmRleE9mKGUpO1xuXHQgICAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA+PSAwKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGQzLnNlbGVjdCh0aGlzKS5zdHlsZSgnZGlzcGxheScsIGluZGV4ICUgaW50ZXJ2YWxGb3JDdWxsaW5nID8gJ25vbmUnIDogJ2Jsb2NrJyk7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICAkJC5zdmcuc2VsZWN0QWxsKCcuJyArIENMQVNTLmF4aXNYICsgJyAudGljayB0ZXh0Jykuc3R5bGUoJ2Rpc3BsYXknLCAnYmxvY2snKTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH1cblx0XG5cdCAgICAgICAgLy8gc2V0dXAgZHJhd2V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dCAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb25zVG9XYWl0LnB1c2godHJhbnNpdGlvbik7XG5cdCAgICAgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgICAgICB9KTtcblx0XG5cdCAgICAgICAgICAgICAgICAvLyBXYWl0IGZvciBlbmQgb2YgdHJhbnNpdGlvbnMgdG8gY2FsbCBmbG93IGFuZCBvbnJlbmRlcmVkIGNhbGxiYWNrXG5cdCAgICAgICAgICAgICAgICB3YWl0Rm9yRHJhdyA9ICQkLmdlbmVyYXRlV2FpdCgpO1xuXHQgICAgICAgICAgICAgICAgdHJhbnNpdGlvbnNUb1dhaXQuZm9yRWFjaChmdW5jdGlvbiAodCkge1xuXHQgICAgICAgICAgICAgICAgICAgIHdhaXRGb3JEcmF3LmFkZCh0KTtcblx0ICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICB9KVxuXHQgICAgICAgICAgICAuY2FsbCh3YWl0Rm9yRHJhdywgZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICAgICAgaWYgKGZsb3cpIHtcblx0ICAgICAgICAgICAgICAgICAgICBmbG93KCk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBpZiAoY29uZmlnLm9ucmVuZGVyZWQpIHtcblx0ICAgICAgICAgICAgICAgICAgICBjb25maWcub25yZW5kZXJlZC5jYWxsKCQkKTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGVsc2Uge1xuXHQgICAgICAgICAgICAkJC5yZWRyYXdCYXIoZHJhd0Jhcik7XG5cdCAgICAgICAgICAgICQkLnJlZHJhd0xpbmUoZHJhd0xpbmUpO1xuXHQgICAgICAgICAgICAkJC5yZWRyYXdBcmVhKGRyYXdBcmVhKTtcblx0ICAgICAgICAgICAgJCQucmVkcmF3Q2lyY2xlKGN4LCBjeSk7XG5cdCAgICAgICAg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vbi5ub2RlKCkucGFyZW50Tm9kZSkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmNsZWFySW50ZXJ2YWwoJCQuaW50ZXJ2YWxGb3JPYnNlcnZlSW5zZXJ0ZWQpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQudXBkYXRlRGltZW5zaW9uKCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoJCQuYnJ1c2gpIHsgJCQuYnJ1c2gudXBkYXRlKCk7IH1cblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICQkLmNvbmZpZy5vbmluaXQuY2FsbCgkJCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC5yZWRyYXcoe1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhUcmFuc2Zvcm06IHRydWUsXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aFVwZGF0ZVhEb21haW46IHRydWUsXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aFVwZGF0ZU9yZ1hEb21haW46IHRydWUsXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aFRyYW5zaXRpb246IGZhbHNlLFxuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhUcmFuc2l0aW9uRm9yVHJhbnNmb3JtOiBmYWxzZSxcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoTGVnZW5kOiB0cnVlXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbi50cmFuc2l0aW9uKCkuc3R5bGUoJ29wYWNpdHknLCAxKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIH0sIDEwKTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgIC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lc2l6ZUZ1bmN0aW9ucy5zcGxpY2UoaSwgMSk7XG5cdCAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9O1xuXHQgICAgICAgIHJldHVybiBjYWxsUmVzaXplRnVuY3Rpb25zO1xuXHQgICAgfTtcblx0XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5lbmRhbGwgPSBmdW5jdGlvbiAodHJhbnNpdGlvbiwgY2FsbGJhY2spIHtcblx0ICAgICAgICB2YXIgbiA9IDA7XG5cdCAgICAgICAgdHJhbnNpdGlvblxuXHQgICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAoKSB7ICsrbjsgfSlcblx0ICAgICAgICAgICAgLmVhY2goXCJlbmRcIiwgZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICAgICAgaWYgKCEtLW4pIHsgY2FsbGJhY2suYXBwbHkodGhpcywgYXJndW1lbnRzKTsgfVxuXHQgICAgICAgICAgICB9KTtcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZW5lcmF0ZVdhaXQgPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgdmFyIHRyYW5zaXRpb25zVG9XYWl0ID0gW10sXG5cdCAgICAgICAgICAgIGYgPSBmdW5jdGlvbiAodHJhbnNpdGlvbiwgY2FsbGJhY2spIHtcblx0ICAgICAgICAgICAgICAgIHZhciB0aW1lciA9IHNldEludGVydmFsKGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgICAgICAgICB2YXIgZG9uZSA9IDA7XG5cdCAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbnNUb1dhaXQuZm9yRWFjaChmdW5jdGlvbiAodCkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBpZiAodC5lbXB0eSgpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb25lICs9IDE7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQudHJhbnNpdGlvbigpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb25lICs9IDE7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgICAgICAgICBpZiAoZG9uZSA9PT0gdHJhbnNpdGlvbnNUb1dhaXQubGVuZ3RoKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2FsbGJhY2spIHsgY2FsbGJhY2soKTsgfVxuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIH0sIDEwKTtcblx0ICAgICAgICAgICAgfTtcblx0ICAgICAgICBmLmFkZCA9IGZ1bmN0aW9uICh0cmFuc2l0aW9uKSB7XG5cdCAgICAgICAgICAgIHRyYW5zaXRpb25zVG9XYWl0LnB1c2godHJhbnNpdGlvbik7XG5cdCAgICAgICAgfTtcblx0ICAgICAgICByZXR1cm4gZjtcblx0ICAgIH07XG5cdFxuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4ucGFyc2VEYXRlID0gZnVuY3Rpb24gKGRhdGUpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLCBwYXJzZWREYXRlO1xuXHQgICAgICAgIGlmIChkYXRlIGluc3RhbmNlb2YgRGF0ZSkge1xuXHQgICAgICAgICAgICBwYXJzZWREYXRlID0gZGF0ZTtcblx0ICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBkYXRlID09PSAnc3Rya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dGlvbiAoKSB7fSxcblx0ICAgICAgICAgICAgem9vbV9vbnpvb21zdGFydDogZnVuY3Rpb24gKCkge30sXG5cdCAgICAgICAgICAgIHpvb21fb256b29tZW5kOiBmdW5jdGlvbiAoKSB7fSxcblx0ICAgICAgICAgICAgem9vbV94X21pbjogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICB6b29tX3hfbWF4OiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIGludGVyYWN0aW9uX2JyaWdodGVuOiB0cnVlLFxuXHQgICAgICAgICAgICBpbnRlcmFjdGlvbl9lbmFibGVkOiB0cnVlLFxuXHQgICAgICAgICAgICBvbm1vdXNlb3ZlcjogZnVuY3Rpb24gKCkge30sXG5cdCAgICAgICAgICAgIG9ubW91c2VvdXQ6IGZ1bmN0aW9uICgpIHt9LFxuXHQgICAgICAgICAgICBvbnJlc2l6ZTogZnVuY3Rpb24gKCkge30sXG5cdCAgICAgICAgICAgIG9ucmVzaXplZDogZnVuY3Rpb24gKCkge30sXG5cdCAgICAgICAgICAgIG9uaW5pdDogZnVuY3Rpb24gKCkge30sXG5cdCAgICAgICAgICAgIG9ucmVuZGVyZWQ6IGZ1bmN0aW9uICgpIHt9LFxuXHQgICAgICAgICAgICB0cmFuc2l0aW9uX2R1cmF0aW9uOiAzNTAsXG5cdCAgICAgICAgICAgIGRhdGFfeDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBkYXRhX3hzOiB7fSxcblx0ICAgICAgICAgICAgZGF0YV94Rm9ybWF0OiAnJVktJW0tJWQnLFxuXHQgICAgICAgICAgICBkYXRhX3hMb2NhbHRpbWU6IHRydWUsXG5cdCAgICAgICAgICAgIGRhdGFfeFNvcnQ6IHRydWUsXG5cdCAgICAgICAgICAgIGRhdGFfaWRDb252ZXJ0ZXI6IGZ1bmN0aW9uIChpZCkgeyByZXR1cm4gaWQ7IH0sXG5cdCAgICAgICAgICAgIGRhdGFfbmFtZXM6IHt9LFxuXHQgICAgICAgICAgICBkYX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HQgICAgICAgICAgICBkYXRhX29udW5zZWxlY3RlZDogZnVuY3Rpb24gKCkge30sXG5cdCAgICAgICAgICAgIGRhdGFfdXJsOiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIGRhdGFfaGVhZGVyczogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBkYXRhX2pzb246IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgZGF0YV9yb3dzOiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIGRhdGFfY29sdW1uczogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBkYXRhX21pbWVUeXBlOiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIGRhdGFfa2V5czogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICAvLyBjb25maWd1cmF0aW9uIGZvciBubyBwbG90LWFibGUgZGF0YSBzdXBwbGllZC5cblx0ICAgICAgICAgICAgZGF0YV9lbXB0eV9sYWJlbF90ZXh0OiBcIlwiLFxuXHQgICAgICAgICAgICAvLyBzdWJjaGFydFxuXHQgICAgICAgICAgICBzdWJjaGFydF9zaG93OiBmYWxzZSxcblx0ICAgICAgICAgICAgc3ViY2hhcnRfc2l6ZV9oZWlnaHQ6IDYwLFxuXHQgICAgICAgICAgICBzdWJjaGFydF9heGlzX3hfc2hvdzogdHJ1ZSxcblx0ICAgICAgICAgICAgc3ViY2hhcnRfb25icnVzaDogZnVuY3Rpb24gKCkge30sXG5cdCAgICAgICAgICAgIC8vIGNvbG9yXG5cdCAgICAgICAgICAgIGNvbG9yX3BhdHRlcm46IFtdLFxuXHQgICAgICAgICAgICBjb2xvcl90aHJlc2hvbGQ6IHt9LFxuXHQgICAgICAgICAgICAvLyBsZWdlbmRcblx0ICAgICAgICAgICAgbGVnZW5kX3Nob3c6IHRydWUsXG5cdCAgICAgICAgICAgIGxlZ2VuZF9oaWRlOiBmYWxzZSxcblx0ICAgICAgICAgICAgbGVnZW5kX3Bvc2l0aW9uOiAnYm90dG9tJyxcblx0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F4OiAxMCxcblx0ICAgICAgICAgICAgYXhpc194X3RpY2tfY291bnQ6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc194X3RpY2tfZml0OiB0cnVlLFxuXHQgICAgICAgICAgICBheGlzX3hfdGlja192YWx1ZXM6IG51bGwsXG5cdCAgICAgICAgICAgIGF4aXNfeF90aWNrX3JvdGF0ZTogMCxcblx0ICAgICAgICAgICAgYXhpc194X3RpY2tfb3V0ZXI6IHRydWUsXG5cdCAgICAgICAgICAgIGF4aXNfeF90aWNrX211bHRpbGluZTogdHJ1ZSxcblx0ICAgICAgICAgICAgYXhpc194X3RpY2tfd2lkdGg6IG51bGwsXG5cdCAgICAgICAgICAgIGF4aXNfeF9tYXg6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc194X21pbjogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3hfcGFkZGluZzoge30sXG5cdCAgICAgICAgICAgIGF4aXNfeF9oZWlnaHQ6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc194X2V4dGVudDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3hfbGFiZWw6IHt9LFxuXHQgICAgICAgICAgICBheGlzX3lfc2hvdzogdHJ1ZSxcblx0ICAgICAgICAgICAgYXhpc195X3R5cGU6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc195X21heDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3lfbWluOiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIGF4aXNfeV9pbnZlcnRlZDogZmFsc2UsXG5cdCAgICAgICAgICAgIGF4aXNfeV9jZW50ZXI6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc195X2lubmVyOiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIGF4aXNfeV9sYWJlbDoge30sXG5cdCAgICAgICAgICAgIGF4aXNfeV90aWNrX2Zvcm1hdDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3lfdGlja19vdXRlcjogdHJ1ZSxcblx0ICAgICAgICAgICAgYXhpc195X3RpY2tfdmFsdWVzOiBudWxsLCAgICAgICAgXG5cdCAgICAgICAgICAgIGF4aXNfeV90aWNrX3JvdGF0ZTogMCxcblx0ICAgICAgICAgICAgYXhpc195X3RpY2tfY291bnQ6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc195X3RpY2tfdGltZV92YWx1ZTogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBheGlzX3lfdGlja190aW1lX2ludGVydmFsOiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIGF4aXNfeV9wYWRkaW5nOiB7fSxcblx0ICAgICAgICAgICAgYXhpc195X2RlZmF1bHQ6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc195Ml9zaG93OiBmYWxzZSxcblx0ICAgICAgICAgICAgYXhpc195Ml9tYXg6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc195Ml9taW46IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc195Ml9pbnZlcnRlZDogZmFsc2UsXG5cdCAgICAgICAgICAgIGF4aXNfeTJfY2VudGVyOiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIGF4aXNfeTJfaW5uZXI6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc195Ml9sYWJlbDoge30sXG5cdCAgICAgICAgICAgIGF4aXNfeTJfdGlja19mb3JtYXQ6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc195Ml90aWNrX291dGVyOiB0cnVlLFxuXHQgICAgICAgICAgICBheGlzX3kyX3RpY2tfdmFsdWVzOiBudWxsLFxuXHQgICAgICAgICAgICBheGlzX3kyX3RpY2tfY291bnQ6IHVuZGVmaW5lZCxcblx0ICAgICAgICAgICAgYXhpc195Ml9wYWRkaW5nOiB7fSxcblx0ICAgICAgICAgICAgYXhpc195Ml9kZWZhdWx0OiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIC8vIGdyaWRcblx0ICAgICAgICAgICAgZ3JpZF94X3Nob3c6IGZhbHNlLFxuXHQgICAgICAgICAgICBncmlkX3hfdHlwZTogJ3RpY2snLFxuXHQgICAgICAgICAgICBncmlkX3hfbGluZXM6IFtdLFxuXHQgICAgICAgICAgICBncmlkX3lfc2hvdzogZmFsc2UsXG5cdCAgICAgICAgICAgIC8vIG5vdCB1c2VkXG5cdCAgICAgICAgICAgIC8vIGdyaWRfeV90eXBlOiAndGljaycsXG5cdCAgICAgICAgICAgIGdyaWRfeV9saW5lczogW10sXG5cdCAgICAgICAgICAgIGdyaWRfeV90aWNrczogMTAsXG5cdCAgICAgICAgICAgIGdyaWRfZm9jdXNfc2hvdzogdHJ1ZSxcblx0ICAgICAgICAgICAgZ3JpZF9saW5lc19mcm9udDogdHJ1ZSxcblx0ICAgICAgICAgICAgLy8gcG9pbnQgLSBwb2ludCBvZiBlYWNoIGRhdGFcblx0ICAgICAgICAgICAgcG9pbnRfc2hvdzogdHJ1ZSxcblx0ICAgICAgICAgICAgcG9pbnRfcjogMi41LFxuXHQgICAgICAgICAgICBwb2ludF9zZW5zaXRpdml0eTogMTAsXG5cdCAgICAgICAgICAgIHBvaW50X2ZvY3VzX2V4cGFuZF9lbmFibGVkOiB0cnVlLFxuXHQgICAgICAgICAgICBwb2ludF9mb2N1c19leHBhbmRfcjogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICBwb2ludF9zZWxlY3RfcjogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICAvLyBsaW5lXG5cdCAgICAgICAgICAgIGxpbmVfY29ubmVjdE51bGw6IGZhbHNlLFxuXHQgICAgICAgICAgICBsaW5lX3N0ZXBfdHlwZTogJ3N0ZXAnLFxuXHQgICAgICAgICAgICAvLyBiYXJcblx0ICAgICAgICAgICAgYmFyX3dpZHRoOiB1bmRlZmluZWQsXG5cdCAgICAgICAgICAgIGJhcl93aWR0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ZpbmVkLFxuXHQgICAgICAgICAgICB0b29sdGlwX2NvbnRlbnRzOiBmdW5jdGlvbiAoZCwgZGVmYXVsdFRpdGxlRm9ybWF0LCBkZWZhdWx0VmFsdWVGb3JtYXQsIGNvbG9yKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5nZXRUb29sdGlwQ29udGVudCA/IHRoaXMuZ2V0VG9vbHRpcENvbnRlbnQoZCwgZGVmYXVsdFRpdGxlRm9ybWF0LCBkZWZhdWx0VmFsdWVGb3JtYXQsIGNvbG9yKSA6ICcnO1xuXHQgICAgICAgICAgICB9LFxuXHQgICAgICAgICAgICB0b29sdGlwX2luaXRfc2hvdzogZmFsc2UsXG5cdCAgICAgICAgICAgIHRvb2x0aXBfaW5pdF94OiAwLFxuXHQgICAgICAgICAgICB0b29sdGlwX2luaXRfcG9zaXRpb246IHt0b3A6ICcwcHgnLCBsZWZ0OiAnNTBweCd9LFxuXHQgICAgICAgICAgICB0b29sdGlwX29uc2hvdzogZnVuY3Rpb24gKCkge30sXG5cdCAgICAgICAgICAgIHRvb2x0aXBfb25oaWRlOiBmdW5jdGlvbiAoKSB7fSxcblx0ICAgICAgICAgICAgLy8gdGl0bGVcblx0ICAgICAgICAgICAgdGl0bGVfdGV4dDogdW5kZWZpbmVkLFxuXHQgICAgICAgICAgICB0aXRsZV9wYWRkaW5nOiB7XG5cdCAgICAgICAgICAgICAgICB0b3A6IDAsXG5cdCAgICAgICAgICAgICAgICByaWdodDogMCxcblx0ICAgICAgICAgICAgICAgIGJvdHRvbTogMCxcblx0ICAgICAgICAgICAgICAgIGxlZnQ6IDBcblx0ICAgICAgICAgICAgfSxcblx0ICAgICAgICAgICAgdGl0bGVfcG9zaXRpb246ICd0b3AtY2VudGVyJyxcblx0ICAgICAgICB9O1xuXHRcblx0ICAgICAgICBPYmplY3Qua2V5cyh0aGlzLmFkZGl0aW9uYWxDb25maWcpLmZvckVhY2goZnVuY3Rpb24gKGtleSkge1xuXHQgICAgICAgICAgICBjb25maWdba2V5XSA9IHRoaXMuYWRkaXRpb25hbENvbmZpZ1trZXldO1xuXHQgICAgICAgIH0sIHRoaXMpO1xuXHRcblx0ICAgICAgICByZXR1cm4gY29uZmlnO1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmFkZGl0aW9uYWxDb25maWcgPSB7fTtcblx0XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5sb2FkQ29uZmlnID0gZnVuY3Rpb24gKGNvbmZpZykge1xuXHQgICAgICAgIHZhciB0aGlzX2NvbmZpZyA9IHRoaXMuY29uZmlnLCB0YXJnZXQsIGtleXMsIHJlYWQ7XG5cdCAgICAgICAgZnVuY3Rpb24gZmluZCgpIHtcblx0ICAgICAgICAgICAgdmFyIGtleSA9IGtleXMuc2hpZnQoKTtcblx0ICAgIC8vICAgICAgICBjb25zb2xlLmxvZyhcImtleSA9PlwiLCBrZXksIFwiLCB0YXJnZXQgPT5cIiwgdGFyZ2V0KTtcblx0ICAgICAgICAgICAgaWYgKGtleSAmJiB0YXJnZXQgJiYgdHlwZW9mIHRhcmdldCA9PT0gJ29iamVjdCcgJiYga2V5IGluIHRhcmdldCkge1xuXHQgICAgICAgICAgICAgICAgdGFyZ2V0ID0gdGFyZ2V0W2tleV07XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gZmluZCgpO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIGVsc2UgaWYgKCFrZXkpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiB0YXJnZXQ7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfVxuXHQgICAgICAgIE9iamVjdC5rZXlzKHRoaXNfY29uZmlnKS5mb3JFYWNoKGZ1bmN0aW9uIChrZXkpIHtcblx0ICAgICAgICAgICA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IHsgcmV0dXJuIDA7IH07XG5cdCAgICAgICAgICAgIHNjYWxlID0gZnVuY3Rpb24gKGQsIHJhdykge1xuXHQgICAgICAgICAgICAgICAgdmFyIHYgPSBfc2NhbGUoZCkgKyBvZmZzZXQoZCk7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gcmF3ID8gdiA6IE1hdGguY2VpbCh2KTtcblx0ICAgICAgICAgICAgfTtcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICBzY2FsZSA9IGZ1bmN0aW9uIChkLCByYXcpIHtcblx0ICAgICAgICAgICAgICAgIHZhciB2ID0gX3NjYWxlKGQpO1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIHJhdyA/IHYgOiBNYXRoLmNlaWwodik7XG5cdCAgICAgICAgICAgIH07XG5cdCAgICAgICAgfVxuXHQgICAgICAgIC8vIGRlZmluZSBmdW5jdGlvbnNcblx0ICAgICAgICBmb3IgKGtleSBpbiBfc2NhbGUpIHtcblx0ICAgICAgICAgICAgc2NhbGVba2V5XSA9IF9zY2FsZVtrZXldO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBzY2FsZS5vcmdEb21haW4gPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBfc2NhbGUuZG9tYWluKCk7XG5cdCAgICAgICAgfTtcblx0ICAgICAgICAvLyBkZWZpbmUgY3VzdG9tIGRvbWFpbigpIGZvciBjYXRlZ29yaXplZCBheGlzXG5cdCAgICAgICAgaWYgKCQkLmlzQ2F0ZWdvcml6ZWQoKSkge1xuXHQgICAgICAgICAgICBzY2FsZS5kb21haW4gPSBmdW5jdGlvbiAoZG9tYWluKSB7XG5cdCAgICAgICAgICAgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHtcblx0ICAgICAgICAgICAgICAgICAgICBkb21haW4gPSB0aGlzLm9yZ0RvbWFpbigpO1xuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiBbZG9tYWluWzBdLCBk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l2ZVZhbHVlO1xuXHQgICAgICAgIGlmIChjb25maWcuZGF0YV9ncm91cHMubGVuZ3RoID4gMCkge1xuXHQgICAgICAgICAgICBoYXNOZWdhdGl2ZVZhbHVlID0gJCQuaGFzTmVnYXRpdmVWYWx1ZUluVGFyZ2V0cyh0YXJnZXRzKTtcblx0ICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IGNvbmZpZy5kYXRhX2dyb3Vwcy5sZW5ndGg7IGorKykge1xuXHQgICAgICAgICAgICAgICAgLy8gRGV0ZXJtaW5lIGJhc2VJZFxuXHQgICAgICAgICAgICAgICAgaWRzSW5Hcm91cCA9IGNvbmZpZy5kYXRhX2dyb3Vwc1tqXS5maWx0ZXIoZnVuY3Rpb24gKGlkKSB7IHJldHVybiBpZHMuaW5kZXhPZihpZCkgPj0gMDsgfSk7XG5cdCAgICAgICAgICAgICAgICBpZiAoaWRzSW5Hcm91cC5sZW5ndGggPT09IDApIHsgY29udGludWU7IH1cblx0ICAgICAgICAgICAgICAgIGJhc2VJZCA9IGlkc0luR3JvdXBbMF07XG5cdCAgICAgICAgICAgICAgICAvLyBDb25zaWRlciBuZWdhdGl2ZSB2YWx1ZXNcblx0ICAgICAgICAgICAgICAgIGlmIChoYXNOZWdhdGl2ZVZhbHVlICYmIHlzW2Jhc2VJZF0pIHtcblx0ICAgICAgICAgICAgICAgICAgICB5c1tiYXNlSWRdLmZvckVhY2goZnVuY3Rpb24gKHYsIGkpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgeXNbYmFzZUlkXVtpXSA9IHYgPCAwID8gdiA6IDA7XG5cdCAgICAgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAvLyBDb21wdXRlIG1pblxuXHQgICAgICAgICAgICAgICAgZm9yIChrID0gMTsgayA8IGlkc0luR3JvdXAubGVuZ3RoOyBrKyspIHtcblx0ICAgICAgICAgICAgICAgICAgICBpZCA9IGlkc0luR3JvdXBba107XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKCEgeXNbaWRdKSB7IGNvbnRpbnVlOyB9XG5cdCAgICAgICAgICAgICAgICAgICAgeXNbaWRdLmZvckVhY2goZnVuY3Rpb24gKHYsIGkpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCQkLmF4aXMuZ2V0SWQoaWQpID09PSAkJC5heGlzLmdldElkKGJhc2VJZCkgJiYgeXNbYmFzZUlkXSAmJiAhKGhhc05lZ2F0aXZlVmFsdWUgJiYgK3YgPiAwKSkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgeXNbYmFzZUlkXVtpXSArPSArdjtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHJldHVybiAkJC5kMy5taW4oT2JqZWN0LmtleXMoeXMpLm1hcChmdW5jdGlvbiAoa2V5KSB7IHJldHVybiAkJC5kMy5taW4oeXNba2V5XSk7IH0pKTtcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRZRG9tYWluTWF4ID0gZnVuY3Rpb24gKHRhcmdldHMpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWcsXG5cdCAgICAgICAgICAgIGlkcyA9ICQkLm1hcFRvSWRzKHRhcmdldHMpLCB5cyA9ICQkLmdldFZhbHVlc0FzSWRLZXllZCh0YXJnZXRzKSxcblx0ICAgICAgICAgICAgaiwgaywgYmFzZUlkLCBpZHNJbkdyb3VwLCBpZCwgaGFzUG9zaXRpdmVWYWx1ZTtcblx0ICAgICAgICBpZiAoY29uZmlnLmRhdGFfZ3JvdXBzLmxlbmd0aCA+IDApIHtcblx0ICAgICAgICAgICAgaGFzUG9zaXRpdmVWYWx1ZSA9ICQkLmhhc1Bvc2l0aXZlVmFsdWVJblRhcmdldHModGFyZ2V0cyk7XG5cdCAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBjb25maWcuZGF0YV9ncm91cHMubGVuZ3RoOyBqKyspIHtcblx0ICAgICAgICAgICAgICAgIC8vIERldGVybWluZSBiYXNlSWRcblx0ICAgICAgICAgICAgICAgIGlkc0luR3JvdXAgPSBjb25maWcuZGF0YV9ncm91cHNbal0uZmlsdGVyKGZ1bmN0aW9uIChpZCkgeyByZXR1cm4gaWRzLmluZGV4T2YoaWQpID49IDA7IH0pO1xuXHQgICAgICAgICAgICAgICAgaWYgKGlkc0luR3JvdXAubGVuZ3RoID09PSAwKSB7IGNvbnRpbnVlOyB9XG5cdCAgICAgICAgICAgICAgICBiYXNlSWQgPSBpZHNJbkdyb3VwWzBdO1xuXHQgICAgICAgICAgICAgICAgLy8gQ29uc2lkZXIgcG9zaXRpdmUgdmFsdWVzXG5cdCAgICAgICAgICAgICAgICBpZiAoaGFzUG9zaXRpdmVWYWx1ZSAmJiB5c1tiYXNlSWRdKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgeXNbYmFzZUlkXS5mb3JFYWNoKGZ1bmN0aW9uICh2LCBpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHlzW2Jhc2VJZF1baV0gPSB2ID4gMCA/IHYgOiAwO1xuXHQgICAgICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgLy8gQ29tcHV0ZSBtYXhcblx0ICAgICAgICAgICAgICAgIGZvciAoayA9IDE7IGsgPCBpZHNJbkdyb3VwLmxlbmd0aDsgaysrKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgaWQgPSBpZHNJbkdyb3VwW2tdO1xuXHQgICAgICAgICAgICAgICAgICAgIGlmICghIHlzW2lkXSkgeyBjb250aW51ZTsgfVxuXHQgICAgICAgICAgICAgICAgICAgIHlzW2lkXS5mb3JFYWNoKGZ1bmN0aW9uICh2LCBpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkJC5heGlzLmdldElkKGlkKSA9PT0gJCQuYXhpcy5nZXRJZChiYXNlSWQpICYmIHlzW2Jhc2VJZF0gJiYgIShoYXNQb3NpdGl2ZVZhbHVlICYmICt2IDwgMCkpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHlzW2Jhc2VJZF1baV0gKz0gK3Y7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH1cblx0ICAgICAgICByZXR1cm4gJCQuZDMubWF4KE9iamVjdC5rZXlzKHlzKS5tYXAoZnVuY3Rpb24gKGtleSkgeyByZXR1cm4gJCQuZDMubWF4KHlzW2tleV0pOyB9KSk7XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0WURvbWFpbiA9IGZ1bmN0aW9uICh0YXJnZXRzLCBheGlzSWQsIHhEb21haW4pIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWcsXG5cdCAgICAgICAgICAgIHRhcmdldHNCeUF4aXNJZCA9IHRhcmdldHMuZmlsdGVyKGZ1bmN0aW9uICh0KSB7IHJldHVybiAkJC5heGlzLmdldElkKHQuaWQpID09PSBheGlzSWQ7IH0pLFxuXHQgICAgICAgICAgICB5VGFyZ2V0cyA9IHhEb21haW4gPyAkJC5maWx0ZXJCeVhEb21haW4odGFyZ2V0c0J5QXhpc0lkLCB4RG9tYWluKSA6IHRhcmdldHNCeUF4aXNJZCxcblx0ICAgICAgICAgICAgeU1pbiA9IGF4aXNJZCA9PT0gJ3kyJyA/IGNvbmZpZy5heGlzX3kyX21pbiA6IGNvbmZpZy5heGlzX3lfbWluLFxuXHQgICAgICAgICAgICB5TWF4ID0gYXhpc0lkID09PSA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XJ0aW5nIGRvbWFpbiB1bmV4cGVjdGVkbHlcblx0ICAgICAgICB5RG9tYWluTWluID0gaXNWYWx1ZSh5TWluKSA/IHlNaW4gOiBpc1ZhbHVlKHlNYXgpID8gKHlEb21haW5NaW4gPCB5TWF4ID8geURvbWFpbk1pbiA6IHlNYXggLSAxMCkgOiB5RG9tYWluTWluO1xuXHQgICAgICAgIHlEb21haW5NYXggPSBpc1ZhbHVlKHlNYXgpID8geU1heCA6IGlzVmFsdWUoeU1pbikgPyAoeU1pbiA8IHlEb21haW5NYXggPyB5RG9tYWluTWF4IDogeU1pbiArIDEwKSA6IHlEb21haW5NYXg7XG5cdFxuXHQgICAgICAgIGlmICh5VGFyZ2V0cy5sZW5ndGggPT09IDApIHsgLy8gdXNlIGN1cnJlbnQgZG9tYWluIGlmIHRhcmdldCBvZiBheGlzSWQgaXMgbm9uZVxuXHQgICAgICAgICAgICByZXR1cm4gYXhpc0lkID09PSAneTInID8gJCQueTIuZG9tYWluKCkgOiAkJC55LmRvbWFpbigpO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAoaXNOYU4oeURvbWFpbk1pbikpIHsgLy8gc2V0IG1pbmltdW0gdG8gemVybyB3aGVuIG5vdCBudW1iZXJcblx0ICAgICAgICAgICAgeURvbWFpbk1pbiA9IDA7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGlmIChpc05hTih5RG9tYWluTWF4KSkgeyAvLyBzZXQgbWF4aW11bSB0byBoYXZlIHNhbWUgdmFsdWUgYXMgeURvbWFpbk1pblxuXHQgICAgICAgICAgICB5RG9tYWluTWF4ID0geURvbWFpbk1pbjtcblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKHlEb21haW5NaW4gPT09IHlEb21haW5NYXgpIHtcblx0ICAgICAgICAgICAgeURvbWFpbk1pbiA8IDAgPyB5RG9tYWluTWF4ID0gMCA6IHlEb21haW5NaW4gPSAwO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpc0FsbFBvc2l0a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VkKCkpIHtcblx0ICAgICAgICAgICAgaWYgKCQkLmlzVGltZVNlcmllcygpKSB7XG5cdCAgICAgICAgICAgICAgICBmaXJzdFggPSBuZXcgRGF0ZShmaXJzdFguZ2V0VGltZSgpICogMC41KTtcblx0ICAgICAgICAgICAgICAgIGxhc3RYID0gbmV3IERhdGUobGFzdFguZ2V0VGltZSgpICogMS41KTtcblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIGZpcnN0WCA9IGZpcnN0WCA9PT0gMCA/IDEgOiAoZmlyc3RYICogMC41KTtcblx0ICAgICAgICAgICAgICAgIGxhc3RYID0gbGFzdFggPT09IDAgPyAtMSA6IChsYXN0WCAqIDEuNSk7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKGZpcnN0WCB8fCBmaXJzdFggPT09IDApIHtcblx0ICAgICAgICAgICAgbWluID0gJCQuaXNUaW1lU2VyaWVzKCkgPyBuZXcgRGF0ZShmaXJzdFguZ2V0VGltZSgpIC0gcGFkZGluZy5sZWZ0KSA6IGZpcnN0WCAtIHBhZGRpbmcubGVmdDtcblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKGxhc3RYIHx8IGxhc3RYID09PSAwKSB7XG5cdCAgICAgICAgICAgIG1heCA9ICQkLmlzVGltZVNlcmllcygpID8gbmV3IERhdGUobGFzdFguZ2V0VGltZSgpICsgcGFkZGluZy5yaWdodCkgOiBsYXN0WCArIHBhZGRpbmcucmlnaHQ7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHJldHVybiBbbWluLCBtYXhdO1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnVwZGF0ZVhEb21haW4gPSBmdW5jdGlvbiAodGFyZ2V0cywgd2l0aFVwZGF0ZVhEb21haW4sIHdpdGhVcGRhdGVPcmdYRG9tYWluLCB3aXRoVHJpbSwgZG9tYWluKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnO1xuXHRcblx0ICAgICAgICBpZiAod2l0aFVwZGF0ZU9yZ1hEb21haW4pIHtcblx0ICAgICAgICAgICAgJCQueC5kb21haW4oZG9tYWluID8gZG9tYWluIDogJCQuZDMuZXh0ZW50KCQkLmdldFhEb21haW4odGFyZ2V0cykpKTtcblx0ICAgICAgICAgICAgJCQub3JnWERvbWFpbiA9ICQkLnguZG9tYWluKCk7XG5cdCAgICAgICAgICAgIGlmIChjb25maWcuem9vbV9lbmFibGVkKSB7ICQkLnpvb20uc2NhbGUoJCQueCkudXBkYXRlU2NhbGVFeHRlbnQoKTsgfVxuXHQgICAgICAgICAgICAkJC5zdWJYLmRvbWFpbigkJC54LmRvbWFpbigpKTtcblx0ICAgICAgICAgICAgaWYgKCQkLmJydXNoKSB7ICQkLmJydXNoLnNjYWxlKCQkLnN1YlgpOyB9XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGlmICh3aXRoVXBkYXRlWERvbWFpbikge1xuXHQgICAgICAgICAgICAkJC54LmRvbWFpbihkb21haW4gPyBkb21haW4gOiAoISQkLmJydXNoIHx8ICQkLmJydXNoLmVtcHR5KCkpID8gJCQub3JnWERvbWFpbiA6ICQkLmJydXNoLmV4dGVudCgpKTtcblx0ICAgICAgICAgICAgaWYgKGNvbmZpZy56b29tX2VuYWJsZWQpIHsgJCQuem9vbS5zY2FsZSgkJC54KS51cGRhdGVTY2FsZUV4dGVudCgpOyB9XG5cdCAgICAgICAgfVxuXHRcblx0ICAgICAgICAvLyBUcmltIGRvbWFpbiB3aGVuIHRvbyBiaWcgYnkgem9vbSBtb3VzZW1vdmUgZXZlbnRcblx0ICAgICAgICBpZiAod2l0aFRyaW0pIHsgJCQueC5kb21haW4oJCQudHJpbVhEb21haW4oJCQueC5vcmdEb21haW4oKSkpOyB9XG5cdFxuXHQgICAgICAgIHJldHVybiAkJC54LmRvbWFpbigpO1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnRyaW1YRG9tYWluID0gZnVuY3Rpb24gKGRvbWFpbikge1xuXHQgICAgICAgIHZhciB6b29tRG9tYWluID0gdGhpcy5nZXRab29tRG9tYWluKCksXG5cdCAgICAgICAgICAgIG1pbiA9IHpvb21Eb21haW5bMF0sIG1heCA9IHpvb21Eb21haW5bMV07XG5cdCAgICAgICAgaWYgKGRvbWFpblswXSA8PSBtaW4pIHtcblx0ICAgICAgICAgICAgZG9tYWluWzFdID0gK2RvbWFpblsxXSArIChtaW4gLSBkb21haW5bMF0pO1xuXHQgICAgICAgICAgICBkb21haW5bMF0gPSBtaW47XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGlmIChtYXggPD0gZG9tYWluWzFdKSB7XG5cdCAgICAgICAgICAgIGRvbWFpblswXSA9ICtkb21haW5bMF0gLSAoZG9tYWluWzFdIC0gbWF4KTtcblx0ICAgICAgICAgICAgZG9tYWluWzFdID0gbWF4O1xuXHQgICAgICAgIH1cblx0ICAgICAgICByZXR1cm4gZG9tYWluO1xuXHQgICAgfTtcblx0XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5pc1ggPSBmdW5jdGlvbiAoa2V5KSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnO1xuXHQgICAgICAgIHJldHVybiAoY29uZmlnLmRhdGFfeCAmJiBrZXkgPT09IGNvbmZpZy5kYXRhX3gpIHx8IChub3RFbXB0eShjb25maWcuZGF0YV94cykgJiYgaGFzVmFsdWUoY29uZmlnLmRhdGFfeHMsIGtleSkpO1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmlzTm90WCA9IGZ1bmN0aW9uIChrZXkpIHtcblx0ICAgICAgICByZXR1cm4gIXRoaXMuaXNYKGtleSk7XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0WEtleSA9IGZ1bmN0aW9uIChpZ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ICAgICAgeCA9IGlzVmFsdWUocmF3WCkgPyArcmF3WCA6ICQkLmdldFhWYWx1ZShpZCwgaW5kZXgpO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBlbHNlIHtcblx0ICAgICAgICAgICAgeCA9IGluZGV4O1xuXHQgICAgICAgIH1cblx0ICAgICAgICByZXR1cm4geDtcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5jbG9uZVRhcmdldCA9IGZ1bmN0aW9uICh0YXJnZXQpIHtcblx0ICAgICAgICByZXR1cm4ge1xuXHQgICAgICAgICAgICBpZCA6IHRhcmdldC5pZCxcblx0ICAgICAgICAgICAgaWRfb3JnIDogdGFyZ2V0LmlkX29yZyxcblx0ICAgICAgICAgICAgdmFsdWVzIDogdGFyZ2V0LnZhbHVlcy5tYXAoZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiB7eDogZC54LCB2YWx1ZTogZC52YWx1ZSwgaWQ6IGQuaWR9O1xuXHQgICAgICAgICAgICB9KVxuXHQgICAgICAgIH07XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4udXBkYXRlWHMgPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcztcblx0ICAgICAgICBpZiAoJCQuZGF0YS50YXJnZXRzLmxlbmd0aCkge1xuXHQgICAgICAgICAgICAkJC54cyA9IFtdO1xuXHQgICAgICAgICAgICAkJC5kYXRhLnRhcmdldHNbMF0udmFsdWVzLmZvckVhY2goZnVuY3Rpb24gKHYpIHtcblx0ICAgICAgICAgICAgICAgICQkLnhzW3YuaW5kZXhdID0gdi54O1xuXHQgICAgICAgICAgICB9KTtcblx0ICAgICAgICB9XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0UHJldlggPSBmdW5jdGlvbiAoaSkge1xuXHQgICAgICAgIHZhciB4ID0gdGhpcy54c1tpIC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lnWydkYXRhXycgKyBuYW1lXTtcblx0ICAgICAgICBpZiAodHlwZW9mIGF0dHJzID09PSAndW5kZWZpbmVkJykgeyByZXR1cm4gY3VycmVudDsgfVxuXHQgICAgICAgIE9iamVjdC5rZXlzKGF0dHJzKS5mb3JFYWNoKGZ1bmN0aW9uIChpZCkge1xuXHQgICAgICAgICAgICBjdXJyZW50W2lkXSA9IGF0dHJzW2lkXTtcblx0ICAgICAgICB9KTtcblx0ICAgICAgICAkJC5yZWRyYXcoe3dpdGhMZWdlbmQ6IHRydWV9KTtcblx0ICAgICAgICByZXR1cm4gY3VycmVudDtcblx0ICAgIH07XG5cdFxuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uY29udmVydFVybFRvRGF0YSA9IGZ1bmN0aW9uICh1cmwsIG1pbWVUeXBlLCBoZWFkZXJzLCBrZXlzLCBkb25lKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcywgdHlwZSA9IG1pbWVUeXBlID8gbWltZVR5cGUgOiAnY3N2Jztcblx0ICAgICAgICB2YXIgcmVxID0gJCQuZDMueGhyKHVybCk7XG5cdCAgICAgICAgaWYgKGhlYWRlcnMpIHtcblx0ICAgICAgICAgICAgT2JqZWN0LmtleXMoaGVhZGVycykuZm9yRWFjaChmdW5jdGlvbiAoaGVhZGVyKSB7XG5cdCAgICAgICAgICAgICAgICByZXEuaGVhZGVyKGhlYWRlciwgaGVhZGVyc1toZWFkZXJdKTtcblx0ICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHJlcS5nZXQoZnVuY3Rpb24gKGVycm9yLCBkYXRhKSB7XG5cdCAgICAgICAgICAgIHZhciBkO1xuXHQgICAgICAgICAgICBpZiAoIWRhdGEpIHtcblx0ICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihlcnJvci5yZXNwb25zZVVSTCArICcgJyArIGVycm9yLnN0YXR1cyArICcgKCcgKyBlcnJvci5zdGF0dXNUZXh0ICsgJyknKT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QgICAgICAgICAgICAgICAgICAgIC8vIGNvbnZlcnQgdW5kZWZpbmVkIHRvIG51bGwgYmVjYXVzZSB1bmRlZmluZWQgZGF0YSB3aWxsIGJlIHJlbW92ZWQgaW4gY29udmVydERhdGFUb1RhcmdldHMoKVxuXHQgICAgICAgICAgICAgICAgICAgIHZhciB2ID0gJCQuZmluZFZhbHVlSW5Kc29uKG8sIGtleSk7XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKGlzVW5kZWZpbmVkKHYpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHYgPSBudWxsO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICBuZXdfcm93LnB1c2godik7XG5cdCAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgICAgIG5ld19yb3dzLnB1c2gobmV3X3Jvdyk7XG5cdCAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICBkYXRhID0gJCQuY29udmVydFJvd3NUb0RhdGEobmV3X3Jvd3MpO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIE9iamVjdC5rZXlzKGpzb24pLmZvckVhY2goZnVuY3Rpb24gKGtleSkge1xuXHQgICAgICAgICAgICAgICAgbmV3X3Jvd3MucHVzaChba2V5XS5jb25jYXQoanNvbltrZXldKSk7XG5cdCAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICBkYXRhID0gJCQuY29udmVydENvbHVtbnNUb0RhdGEobmV3X3Jvd3MpO1xuXHQgICAgICAgIH1cblx0ICAgICAgICByZXR1cm4gZGF0YTtcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5maW5kVmFsdWVJbkpzb24gPSBmdW5jdGlvbiAob2JqZWN0LCBwYXRoKSB7XG5cdCAgICAgICAgcGF0aCA9IHBhdGgucmVwbGFjZSgvXFxbKFxcdyspXFxdL2csICcuJDEnKTsgLy8gY29udmVydCBpbmRleGVzIHRvIHByb3BlcnRpZXMgKHJlcGxhY2UgW10gd2l0aCAuKVxuXHQgICAgICAgIHBhdGggPSBwYXRoLnJlcGxhY2UoL15cXC4vLCAnJyk7ICAgICAgICAgICAvLyBzdHJpcCBhIGxlYWRpbmcgZG90XG5cdCAgICAgICAgdmFyIHBhdGhBcnJheSA9IHBhdGguc3BsaXQoJy4nKTtcblx0ICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHBhdGhBcnJheS5sZW5ndGg7ICsraSkge1xuXHQgICAgICAgICAgICB2YXIgayA9IHBhdGhBcnJheVtpXTtcblx0ICAgICAgICAgICAgaWYgKGsgaW4gb2JqZWN0KSB7XG5cdCAgICAgICAgICAgICAgICBvYmplY3QgPSBvYmplY3Rba107XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm47XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgICAgcmV0dXJuIG9iamVjdDtcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5jb252ZXJ0Um93c1RvRGF0YSA9IGZ1bmN0aW9uIChyb3dzKSB7XG5cdCAgICAgICAgdmFyIGtleXMgPSByb3dzWzBdLCBuZXdfcm93ID0ge30sIG5ld19yb3dzID0gW10sIGksIGo7XG5cdCAgICAgICAgZm9yIChpID0gMTsgaSA8IHJvd3MubGVuZ3RoOyBpKyspIHtcblx0ICAgICAgICAgICAgbmV3X3JvdyA9IHt9O1xuXHQgICAgICAgICAgICBmb3IgKGogPSAwOyBqIDwgcm93c1tpXS5sZW5ndGg7IGorKykge1xuXHQgICAgICAgICAgICAgICAgaWYgKGlzVW5kZWZpbmVkKHJvd3NbaV1bal0pKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiU291cmNlIGRhdGEgaXMgbWlzc2luZyBhIGNvbXBvbmVudCBhdCAoXCIgKyBpICsgXCIsXCIgKyBqICsgXCIpIVwiKTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIG5ld19yb3dba2V5c1tqXV0gPSByb3dzW2ldW2pdO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIG5ld19yb3dzLnB1c2gobmV3X3Jvdyk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIHJldHVybiBuZXdfcm93cztcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5jb252ZXJ0Q29sdW1uc1RvRGF0YSA9IGZ1bmN0aW9uIChjb2x1bW5zKSB7XG5cdCAgICAgICAgdmFyIG5ld19yb3dzID0gW10sIGksIGosIGtleTtcblx0ICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY29sdW1ucy5sZW5ndGg7IGkrKykge1xuXHQgICAgICAgICAgICBrZXkgPSBjb2x1bW5zW2ldWzBdO1xuXHQgICAgICAgICAgICBmb3IgKGogPSAxOyBqIDwgY29sdW1uc1tpXS5sZW5ndGg7IGorKykge1xuXHQgICAgICAgICAgICAgICAgaWYgKGlzVW5kZWZpbmVkKG5ld19yb3dzW2ogLSAxXSkpIHtcblx0ICAgICAgICAgICAgICAgICAgICBuZXdfcm93c1tqIC0gMV0gPSB7fTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIGlmIChpc1VuZGVmaW5lZChjb2x1bW5zW2ldW2pdKSkge1xuXHQgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIlNvdXJjZSBkYXRhIGlzIG1pc3NpbmcgYSBjb21wb25lbnQgYXQgKFwiICsgaSArIFwiLFwiICsgaiArIFwiKSFcIik7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBuZXdfcm93c1tqIC0gMV1ba2V5XSA9IGNvbHVtbnNbaV1bal07XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgICAgcmV0dXJuIG5ld19yb3dzO1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmNvbnZlcnREYXRhVG9UYXJnZXRzID0gZnVuY3Rpb24gKGRhdGEsIGFwcGVuZFhzKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLFxuXHQgICAgICAgICAgICBpZHMgPSAkJC5kMy5rZXlzKGRhdGFbMF0pLmZpbHRlcigkJC5pc05vdFgsICQkKSxcblx0ICAgICAgICAgICAgeHMgPSAkJC5kMy5rZXlzKGRhdGFbMF0pLmZpbHRlcigkJC5pc1gsICQkKSxcblx0ICAgICAgICAgICAgdGFyZ2V0cztcblx0XG5cdCAgICAgICAgLy8gc2F2ZSB4IGZvciB1cGRhdGUgZGF0YSBieSBsb2FkIHdoZW4gY3VzdG9tIHggYW5kIGMzLnggQVBJXG5cdCAgICAgICAgaWRzLmZvckVhY2goZnVuY3Rpb24gKGlkKSB7XG5cdCAgICAgICAgICAgIHZhciB4S2V5ID0gJCQuZ2V0WEtleShpZCk7XG5cdFxuXHQgICAgICAgICAgICBpZiAoJCQuaXNDdXN0b21YKCkgfHwgJCQuaXNUaW1lU2VyaWVzKCkpIHtcblx0ICAgICAgICAgICAgICAgIC8vIGlmIGluY2x1ZGVkIGluIGlucHV0IGRhdGFcblx0ICAgICAgICAgICAgICAgIGlmICh4cy5pbmRleE9mKHhLZXkpID49IDApIHtcblx0ICAgICAgICAgICAgICAgICAgICAkJC5kYXRhLnhzW2lkXSA9IChhcHBlbmRYcyAmJiAkJC5kYXRhLnhzW2lkXSA/ICQkLmRhdGEueHNbaWRdIDogW10pLmNvbmNhdChcblx0ICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5tYXAoZnVuY3Rpb24gKGQpIHsgcmV0dXJuIGRbeEtleV07IH0pXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKGlzVmFsdWUpXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwK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ZvckVhY2goZnVuY3Rpb24gKGlkKSB7XG5cdCAgICAgICAgICAgIGlmICghJCQuZGF0YS54c1tpZF0pIHtcblx0ICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcigneCBpcyBub3QgZGVmaW5lZCBmb3IgaWQgPSBcIicgKyBpZCArICdcIi4nKTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH0pO1xuXHRcblx0ICAgICAgICAvLyBjb252ZXJ0IHRvIHRhcmdldFxuXHQgICAgICAgIHRhcmdldHMgPSBpZHMubWFwKGZ1bmN0aW9uIChpZCwgaW5kZXgpIHtcblx0ICAgICAgICAgICAgdmFyIGNvbnZlcnRlZElkID0gY29uZmlnLmRhdGFfaWRDb252ZXJ0ZXIoaWQpO1xuXHQgICAgICAgICAgICByZXR1cm4ge1xuXHQgICAgICAgICAgICAgICAgaWQ6IGNvbnZlcnRlZElkLFxuXHQgICAgICAgICAgICAgICAgaWRfb3JnOiBpZCxcblx0ICAgICAgICAgICAgICAgIHZhbHVlczogZGF0YS5tYXAoZnVuY3Rpb24gKGQsIGkpIHtcblx0ICAgICAgICAgICAgICAgICAgICB2YXIgeEtleSA9ICQkLmdldFhLZXkoaWQpLCByYXdYID0gZFt4S2V5XSxcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBkW2lkXSAhPT0gbnVsbCAmJiAhaXNOYU4oZFtpZF0pID8gK2RbaWRdIDogbnVsbCwgeDtcblx0ICAgICAgICAgICAgICAgICAgICAvLyB1c2UgeCBhcyBjYXRlZ29yaWVzIGlmIGN1c3RvbSB4IGFuZCBjYXRlZ29yaXplZFxuXHQgICAgICAgICAgICAgICAgICAgIGlmICgkJC5pc0N1c3RvbVgoKSAmJiAkJC5pc0NhdGVnb3JpemVkKCkgJiYgaW5kZXggPT09IDAgJiYgIWlzVW5kZWZpbmVkKHJhd1gpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA9PT0gMCAmJiBpID09PSAwKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuYXhpc194X2NhdGVnb3JpZXMgPSBbXTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgICAgICB4ID0gY29uZmlnLmF4aXNfeF9jYXRlZ29yaWVzLmluZGV4T2YocmF3WCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGlmICh4ID09PSAtMSkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgeCA9IGNvbmZpZy5heGlzX3hfY2F0ZWdvcmllcy5sZW5ndGg7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuYXhpc194X2NhdGVnb3JpZXMucHVzaChyYXdYKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHggID0gJCQuZ2VuZXJhdGVUYXJnZXRYKHJhd1gsIGlkLCBpKTtcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgLy8gbWFyayBhcyB4ID0gdW5kZWZpbmVkIGlmIHZhbHVlIGlzIHVuZGVmaW5lZCBhbmQgZmlsdGVyIHRvIHJlbW92ZSBhZnRlciBtYXBwZWRcblx0ICAgICAgICAgICAgICAgICAgICBpZiAoaXNVbmRlZmluZWQoZFtpZF0pIHx8ICQkLmRhdGEueHNbaWRdLmxlbmd0aCA8PSBpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHggPSB1bmRlZmluZWQ7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiB7eDogeCwgdmFsdWU6IHZhbHVlLCBpZDogY29udmVydGVkSWR9O1xuXHQgICAgICAgICAgICAgICAgfSkuZmlsdGVyKGZ1bmN0aW9uICh2KSB7IHJldHVybiBpc0RlZmluZWQodi54KTsgfSlcblx0ICAgICAgICAgICAgfTtcblx0ICAgICAgICB9KTtcblx0XG5cdCAgICAgICAgLy8gZmluaXNoIHRhcmdldHNcblx0ICAgICAgICB0YXJnZXRzLmZvckVhY2goZnVuY3Rpb24gKHQpIHtcblx0ICAgICAgICAgICAgdmFyIGk7XG5cdCAgICAgICAgICAgIC8vIHNvcnQgdmFsdWVzIGJ5IGl0cyB4XG5cdCAgICAgICAgICAgIGlmIChjb25maWcuZGF0YV94U29ydCkge1xuXHQgICAgICAgICAgICAgICAgdC52YWx1ZXMgPSB0LnZhbHVlcy5zb3J0KGZ1bmN0aW9uICh2MSwgdjIpIHtcblx0ICAgICAgICAgICAgICAgICAgICB2YXIgeDEgPSB2MS54IHx8IHYxLnggPT09IDAgPyB2MS54IDogSW5maW5pdHksXG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHgyID0gdjIueCB8fCB2Mi54ID09PSAwID8gdjIueCA6IEluZmluaXR5O1xuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiB4MSAtIHgyO1xuXHQgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgLy8gaW5kZXhpbmcgZWFjaCB2YWx1ZVxuXHQgICAgICAgICAgICBpID0gMDtcblx0ICAgICAgICAgICAgdC52YWx1ZXMuZm9yRWFjaChmdW5jdGlvbiAodikge1xuXHQgICAgICAgICAgICAgICAgdi5pbmRleCA9IGkrKztcblx0ICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgIC8vIHRoaXMgbmVlZHMgdG8gYmUgc29ydGVkIGJlY2F1c2UgaXRzIGluZGV4IGFuZCB2YWx1ZS5pbmRleCBpcyBpZGVudGljYWxcblx0ICAgICAgICAgICAgJCQuZGF0YS54c1t0LmlkXS5zb3J0KGZ1bmN0aW9uICh2MSwgdjIpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiB2MSAtIHYyO1xuXHQgICAgICAgICAgICB9KTtcblx0ICAgICAgICB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mdldHMgPSB0YXJnZXRzLmZpbHRlcihhcmdzLmZpbHRlcik7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgLy8gc2V0IHR5cGUgaWYgYXJncy50eXBlcyB8fCBhcmdzLnR5cGUgc3BlY2lmaWVkXG5cdCAgICAgICAgICAgIGlmIChhcmdzLnR5cGUgfHwgYXJncy50eXBlcykge1xuXHQgICAgICAgICAgICAgICAgdGFyZ2V0cy5mb3JFYWNoKGZ1bmN0aW9uICh0KSB7XG5cdCAgICAgICAgICAgICAgICAgICAgdmFyIHR5cGUgPSBhcmdzLnR5cGVzICYmIGFyZ3MudHlwZXNbdC5pZF0gPyBhcmdzLnR5cGVzW3QuaWRdIDogYXJncy50eXBlO1xuXHQgICAgICAgICAgICAgICAgICAgICQkLnNldFRhcmdldFR5cGUodC5pZCwgdHlwZSk7XG5cdCAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAvLyBVcGRhdGUvQWRkIGRhdGFcblx0ICAgICAgICAgICAgJCQuZGF0YS50YXJnZXRzLmZvckVhY2goZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGFyZ2V0cy5sZW5ndGg7IGkrKykge1xuXHQgICAgICAgICAgICAgICAgICAgIGlmIChkLmlkID09PSB0YXJnZXRzW2ldLmlkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGQudmFsdWVzID0gdGFyZ2V0c1tpXS52YWx1ZXM7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldHMuc3BsaWNlKGksIDEpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICAkJC5kYXRhLnRhcmdldHMgPSAkJC5kYXRhLnRhcmdldHMuY29uY2F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cblx0XG5cdCAgICAgICAgaWYgKCQkLmlzTXVsdGlwbGVYKCkpIHtcblx0ICAgICAgICAgICAgLy8gVE9ETzogcm90YXRlZCBub3Qgc3VwcG9ydGVkIHlldFxuXHQgICAgICAgICAgICB4ID0gMDtcblx0ICAgICAgICAgICAgeSA9IDA7XG5cdCAgICAgICAgICAgIHcgPSAkJC53aWR0aDtcblx0ICAgICAgICAgICAgaCA9ICQkLmhlaWdodDtcblx0ICAgICAgICB9XG5cdCAgICAgICAgZWxzZSB7XG5cdCAgICAgICAgICAgIGlmICgoJCQuaXNDdXN0b21YKCkgfHwgJCQuaXNUaW1lU2VyaWVzKCkpICYmICEkJC5pc0NhdGVnb3JpemVkKCkpIHtcblx0XG5cdCAgICAgICAgICAgICAgICAvLyB1cGRhdGUgaW5kZXggZm9yIHggdGhhdCBpcyB1c2VkIGJ5IHByZXZYIGFuZCBuZXh0WFxuXHQgICAgICAgICAgICAgICAgJCQudXBkYXRlWHMoKTtcblx0XG5cdCAgICAgICAgICAgICAgICByZWN0VyA9IGZ1bmN0aW9uIChkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgdmFyIHByZXZYID0gJCQuZ2V0UHJldlgoZC5pbmRleCksIG5leHRYID0gJCQuZ2V0TmV4dFgoZC5pbmRleCk7XG5cdFxuXHQgICAgICAgICAgICAgICAgICAgIC8vIGlmIHRoZXJlIHRoaXMgaXMgYSBzaW5nbGUgZGF0YSBwb2ludCBtYWtlIHRoZSBldmVudFJlY3QgZnVsbCB3aWR0aCAob3IgaGVpZ2h0KVxuXHQgICAgICAgICAgICAgICAgICAgIGlmIChwcmV2WCA9PT0gbnVsbCAmJiBuZXh0WCA9PT0gbnVsbCkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29uZmlnLmF4aXNfcm90YXRlZCA/ICQkLmhlaWdodCA6ICQkLndpZHRoO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZYID09PSBudWxsKSB7IHByZXZYID0gJCQueC5kb21haW4oKVswXTsgfVxuXHQgICAgICAgICAgICAgICAgICAgIGlmIChuZXh0WCA9PT0gbnVsbCkgeyBuZXh0WCA9ICQkLnguZG9tYWluKClbMV07IH1cblx0XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE1hdGgubWF4KDAsICgkJC54KG5leHRYKSAtICQkLngocHJldlgpKSAvIDIpO1xuXHQgICAgICAgICAgICAgICAgfTtcblx0ICAgICAgICAgICAgICAgIHJlY3RYID0gZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgICAgICB2YXIgcHJldlggPSAkJC5nZXRQcmV2WChkLmluZGV4KSwgbmV4dFggPSAkJC5nZXROZXh0WChkLmluZGV4KSxcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1ggPSAkJC5kYXRhLnhzW2QuaWRdW2QuaW5kZXhdO1xuXHRcblx0ICAgICAgICAgICAgICAgICAgICAvLyBpZiB0aGVyZSB0aGlzIGlzIGEgc2luZ2xlIGRhdGEgcG9pbnQgcG9zaXRpb24gdGhlIGV2ZW50UmVjdCBhdCAwXG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZYID09PSBudWxsICYmIG5leHRYID09PSBudWxsKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZYID09PSBudWxsKSB7IHByZXZYID0gJCQueC5kb21haW4oKVswXTsgfVxuXHRcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gKCQkLngodGhpc1gpICsgJCQueChwcmV2WCkpIC8gMjtcblx0ICAgICAgICAgICAgICAgIH07XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICByZWN0VyA9ICQkLmdldEV2ZW50UmVjdFdpZHRoKCk7XG5cdCAgICAgICAgICAgICAgICByZWN0WCA9IGZ1bmN0aW9uIChkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQkLngoZC54KSAtIChyZWN0VyAvIDIpO1xuXHQgICAgICAgICAgICAgICAgfTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB4ID0gY29uZmlnLmF4aXNfcm90YXRlZCA/IDAgOiByZWN0WDtcblx0ICAgICAgICAgICAgeSA9IGNvbmZpZy5heGlzX3JvdGF0ZWQgPyByZWN0WCA6IDA7XG5cdCAgICAgICAgICAgIHcgPSBjb25maWcuYXhpc19yb3RhdGVkID8gJCQud2lkdGggOiByZWN0Vztcblx0ICAgICAgICAgICAgaCA9IGNvbmZpZy5heGlzX3JvdGF0ZWQgPyByZWN0VyA6ICQkLmhlaWdodDtcblx0ICAgICAgICB9XG5cdFxuXHQgICAgICAgIGV2ZW50UmVjdFVwZGF0ZVxuXHQgICAgICAgICAgICAuYXR0cignY2xhc3MnLCAkJC5jbGFzc0V2ZW50LmJpbmQoJCQpKVxuXHQgICAgICAgICAgICAuYXR0cihcInhcIiwgeClcblx0ICAgICAgICAgICAgLmF0dHIoXCJ5XCIsIHkpXG5cdCAgICAgICAgICAgIC5hdHRyKFwid2lkdGhcIiwgdylcblx0ICAgICAgICAgICAgLmF0dHIoXCJoZWlnaHRcIiwgaCk7XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2VuZXJhdGVFdmVudFJlY3RzRm9yU2luZ2xlWCA9IGZ1bmN0aW9uIChldmVudFJlY3RFbnRlcikge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsIGQzID0gJCQuZDMsIGNvbmZpZyA9ICQkLmNvbmZpZztcblx0ICAgICAgICBldmVudFJlY3RFbnRlci5hcHBlbmQoXCJyZWN0XCIpXG5cdCAgICAgICAgICAgIC5hdHRyKFwiY2xhc3NcIiwgJCQuY2xhc3NFdmVudC5iaW5kKCQkKSlcblx0ICAgICAgICA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5cdCAgICAgICAgICAgICAgICB2YXIgaW5kZXggPSBkLmluZGV4O1xuXHQgICAgICAgICAgICAgICAgaWYgKCEkJC5jb25maWcpIHsgcmV0dXJuOyB9IC8vIGNoYXJ0IGlzIGRlc3Ryb3llZFxuXHQgICAgICAgICAgICAgICAgaWYgKCQkLmhhc0FyY1R5cGUoKSkgeyByZXR1cm47IH1cblx0ICAgICAgICAgICAgICAgICQkLmhpZGVYR3JpZEZvY3VzKCk7XG5cdCAgICAgICAgICAgICAgICAkJC5oaWRlVG9vbHRpcCgpO1xuXHQgICAgICAgICAgICAgICAgLy8gVW5kbyBleHBhbmRlZCBzaGFwZXNcblx0ICAgICAgICAgICAgICAgICQkLnVuZXhwYW5kQ2lyY2xlcygpO1xuXHQgICAgICAgICAgICAgICAgJCQudW5leHBhbmRCYXJzKCk7XG5cdCAgICAgICAgICAgICAgICAvLyBDYWxsIGV2ZW50IGhhbmRsZXJcblx0ICAgICAgICAgICAgICAgICQkLm1haW4uc2VsZWN0QWxsKCcuJyArIENMQVNTLnNoYXBlICsgJy0nICsgaW5kZXgpLmVhY2goZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YV9vbm1vdXNlb3V0LmNhbGwoJCQuYXBpLCBkKTtcblx0ICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICB9KVxuXHQgICAgICAgICAgICAub24oJ21vdXNlbW92ZScsIGZ1bmN0aW9uIChkKSB7XG5cdCAgICAgICAgICAgICAgICB2YXIgc2VsZWN0ZWREYXRhLCBpbmRleCA9IGQuaW5kZXgsXG5cdCAgICAgICAgICAgICAgICAgICAgZXZlbnRSZWN0ID0gJCQuc3ZnLnNlbGVjdCgnLicgKyBDTEFTUy5ldmVudFJlY3QgKyAnLScgKyBpbmRleCk7XG5cdFxuXHQgICAgICAgICAgICAgICAgaWYgKCQkLmRyYWdnaW5nIHx8ICQkLmZsb3dpbmcpIHsgcmV0dXJuOyB9IC8vIGRvIG5vdGhpbmcgd2hpbGUgZHJhZ2dpbmcvZmxvd2luZ1xuXHQgICAgICAgICAgICAgICAgaWYgKCQkLmhhc0FyY1R5cGUoKSkgeyByZXR1cm47IH1cblx0XG5cdCAgICAgICAgICAgICAgICBpZiAoJCQuaXNTdGVwVHlwZShkKSAmJiAkJC5jb25maWcubGluZV9zdGVwX3R5cGUgPT09ICdzdGVwLWFmdGVyJyAmJiBkMy5tb3VzZSh0aGlzKVswXSA8ICQkLngoJCQuZ2V0WFZhbHVlKGQuaWQsIGluZGV4KSkpIHtcblx0ICAgICAgICAgICAgICAgICAgICBpbmRleCAtPSAxO1xuXHQgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgICAgIC8vIFNob3cgdG9vbHRpcFxuXHQgICAgICAgICAgICAgICAgc2VsZWN0ZWREYXRhID0gJCQuZmlsdGVyVGFyZ2V0c1RvU2hvdygkJC5kYXRhLnRhcmdldHMpLm1hcChmdW5jdGlvbiAodCkge1xuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAkJC5hZGROYW1lKCQkLmdldFZhbHVlT25JbmRleCh0LnZhbHVlcywgaW5kZXgpKTtcblx0ICAgICAgICAgICAgICAgIH0pO1xuXHRcblx0ICAgICAgICAgICAgICAgIGlmIChjb25maWcudG9vbHRpcF9ncm91cGVkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgJCQuc2hvd1Rvb2x0aXAoc2VsZWN0ZWREYXRhLCB0aGlzKTtcblx0ICAgICAgICAgICAgICAgICAgICAkJC5zaG93WEdyaWRGb2N1cyhzZWxlY3RlZERhdGEpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgICAgIGlmIChjb25maWcudG9vbHRpcF9ncm91cGVkICYmICghY29uZmlnLmRhdGFfc2VsZWN0aW9uX2VuYWJsZWQgfHwgY29uZmlnLmRhdGFfc2VsZWN0aW9uX2dyb3VwZWQpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuXHQgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgICAgICQkLm1haW4uc2VsZWN0QWxsKCcuJyArIENMQVNTLnNoYXBlICsgJy0nICsgaW5kZXgpXG5cdCAgICAgICAgICAgICAgICAgICAgLmVhY2goZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBkMy5zZWxlY3QodGhpcykuY2xhc3NlZChDTEFTUy5FWFBBTkRFRCwgdHJ1ZSk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YV9zZWxlY3Rpb25fZW5hYmxlZCkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnRSZWN0LnN0eWxlKCdjdXJzb3InLCBjb25maWcuZGF0YV9zZWxlY3Rpb25fZ3JvdXBlZCA/ICdwb2ludGVyJyA6IG51bGwpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGlmICghY29uZmlnLnRvb2x0aXBfZ3JvdXBlZCkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQuaGlkZVhHcmlkRm9jdXMoKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICQkLmhpZGVUb29sdGlwKCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWNvbmZpZy5kYXRhX3NlbGVjdGlvbl9ncm91cGVkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQudW5leHBhbmRDaXJjbGVzKGluZGV4KTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC51bmV4cGFuZEJhcnMoaW5kZXgpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgfSlcblx0ICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKGZ1bmN0aW9uIChkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkJC5pc1dpdGhpblNoYXBlKHRoaXMsIGQpO1xuXHQgICAgICAgICAgICAgICAgICAgIH0pXG5cdCAgICAgICAgICAgICAgICAgICAgLmVhY2goZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9lbmFibGVkICYmIChjb25maWcuZGF0YV9zZWxlY3Rpb25fZ3JvdXBlZCB8fCBjb25maWcuZGF0YV9zZWxlY3Rpb25faXNzZWxlY3RhYmxlKGQpKSkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnRSZWN0LnN0eWxlKCdjdXJzb3InLCAncG9pbnRlcicpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGlmICghY29uZmlnLnRvb2x0aXBfZ3JvdXBlZCkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQuc2hvd1Rvb2x0aXAoW2RdLCB0aGlzKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICQkLnNob3dYR3JpZEZvY3VzKFtkXSk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLnBvaW50X2ZvY3VzX2V4cGFuZF9lbmFibGVkKSB7ICQkLmV4cGFuZENpcmNsZXMoaW5kZXgsIGQuaWQsIHRydWUpOyB9XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC5leHBhbmRCYXJzKGluZGV4LCBkLmlkLCB0cnVlKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICB9KVxuXHQgICAgICAgICAgICAub24oJ2NsaWNrJywgZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgIHZhciBpbmRleCA9IGQuaW5kZXg7XG5cdCAgICAgICAgICAgICAgICBpZiAoJCQuaGFzQXJjVHlwZSgpIHx8ICEkJC50b2dnbGVTaGFwZSkgeyByZXR1cm47IH1cblx0ICAgICAgICAgICAgICAgIGlmICgkJC5jYW5jZWxDbGljaykge1xuXHQgICAgICAgICAgICAgICAgICAgICQkLmNhbmNlbENsaWNrID0gZmFsc2U7XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgaWYgKCQkLmlzU3RlcFR5cGUoZCkgJiYgY29uZmlnLmxpbmVfc3RlcF90eXBlID09PSAnc3RlcC1hZnRlcicgJiYgZDMubW91c2UodGhpcylbMF0gPCAkJC54KCQkLmdldFhWYWx1ZShkLmlkLCBpbmRleCkpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgaW5kZXggLT0gMTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICQkLm1haW4uc2VsZWN0QWxsKCcuJyArIENMQVNTLnNoYXBlICsgJy0nICsgaW5kZXgpLmVhY2goZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFfc2VsZWN0aW9uX2dyb3VwZWQgfHwgJCQuaXNXaXRoaW5TaGFwZSh0aGlzLCBkKSkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAkJC50b2dnbGVTaGFwZSh0aGlzLCBkLCBpbmRleCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICQkLmNvbmZpZy5kYXRhX29uY2xpY2suY2FsbCgkJC5hcGksIGQsIHRoaXMpO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICB9KVxuXHQgICAgICAgICAgICAuY2FsbChcblx0ICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9kcmFnZ2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XJnZXRzKHRhcmdldHNUb1Nob3csIG1vdXNlKTtcblx0XG5cdCAgICAgICAgICAgICAgICBpZiAoJCQubW91c2VvdmVyICYmICghY2xvc2VzdCB8fCBjbG9zZXN0LmlkICE9PSAkJC5tb3VzZW92ZXIuaWQpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFfb25tb3VzZW91dC5jYWxsKCQkLmFwaSwgJCQubW91c2VvdmVyKTtcblx0ICAgICAgICAgICAgICAgICAgICAkJC5tb3VzZW92ZXIgPSB1bmRlZmluZWQ7XG5cdCAgICAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgICAgaWYgKCEgY2xvc2VzdCkge1xuXHQgICAgICAgICAgICAgICAgICAgIG1vdXNlb3V0KCk7XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuXHQgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgICAgIGlmICgkJC5pc1NjYXR0ZXJUeXBlKGNsb3Nlc3QpIHx8ICFjb25maWcudG9vbHRpcF9ncm91cGVkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgc2FtZVhEYXRhID0gW2Nsb3Nlc3RdO1xuXHQgICAgICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgICAgICBzYW1lWERhdGEgPSAkJC5maWx0ZXJCeVgodGFyZ2V0c1RvU2hvdywgY2xvc2VzdC54KTtcblx0ICAgICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICAgICAvLyBzaG93IHRvb2x0aXAgd2hlbiBjdXJzb3IgaXMgY2xvc2UgdG8gc29tZSBwb2ludFxuXHQgICAgICAgICAgICAgICAgc2VsZWN0ZWREYXRhID0gc2FtZVhEYXRhLm1hcChmdW5jdGlvbiAoZCkge1xuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAkJC5hZGROYW1lKGQpO1xuXHQgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgICAgICAkJC5zaG93VG9vbHRpcChzZWxlY3RlZERhdGEsIHRoaXMpO1xuXHRcblx0ICAgICAgICAgICAgICAgIC8vIGV4cGFuZCBwb2ludHNcblx0ICAgICAgICAgICAgICAgIGlmIChjb25maWcucG9pbnRfZm9jdXNfZXhwYW5kX2VuYWJsZWQpIHtcblx0ICAgICAgICAgICAgICAgICAgICAkJC5leHBhbmRDaXJjbGVzKGNsb3Nlc3QuaW5kZXgsIGNsb3Nlc3QuaWQsIHRydWUpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgJCQuZXhwYW5kQmFycyhjbG9zZXN0LmluZGV4LCBjbG9zZXN0LmlkLCB0cnVlKTtcblx0XG5cdCAgICAgICAgICAgICAgICAvLyBTaG93IHhncmlkIGZvY3VzIGxpbmVcblx0ICAgICAgICAgICAgICAgICQkLnNob3dYR3JpZEZvY3VzKHNlbGVjdGVkRGF0YSk7XG5cdFxuXHQgICAgICAgICAgICAgICAgLy8gU2hvdyBjdXJzb3IgYXMgcG9pbnRlciBpZiBwb2ludCBpcyBjbG9zZSB0byBtb3VzZSBwb3NpdGlvblxuXHQgICAgICAgICAgICAgICAgaWYgKCQkLmlzQmFyVHlwZShjbG9zZXN0LmlkKSB8fCAkJC5kaXN0KGNsb3Nlc3QsIG1vdXNlKSA8IGNvbmZpZy5wb2ludF9zZW5zaXRpdml0eSkge1xuXHQgICAgICAgICAgICAgICAgICAgICQkLnN2Zy5zZWxlY3QoJy4nICsgQ0xBU1MuZXZlbnRSZWN0KS5zdHlsZSgnY3Vyc29yJywgJ3BvaW50ZXInKTtcblx0ICAgICAgICAgICAgICAgICAgICBpZiAoISQkLm1vdXNlb3Zlcikge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YV9vbm1vdXNlb3Zlci5jYWxsKCQkLmFwaSwgY2xvc2VzdCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICQkLm1vdXNlb3ZlciA9IGNsb3Nl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vbl9ncm91cGVkIHx8ICQkLmlzV2l0aGluU2hhcGUodGhpcywgY2xvc2VzdCkpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICQkLnRvZ2dsZVNoYXBlKHRoaXMsIGNsb3Nlc3QsIGNsb3Nlc3QuaW5kZXgpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQuY29uZmlnLmRhdGFfb25jbGljay5jYWxsKCQkLmFwaSwgY2xvc2VzdCwgdGhpcyk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgfSlcblx0ICAgICAgICAgICAgLmNhbGwoXG5cdCAgICAgICAgICAgICAgICBjb25maWcuZGF0YV9zZWxlY3Rpb25fZHJhZ2dhYmxlICYmICQkLmRyYWcgPyAoXG5cdCAgICAgICAgICAgICAgICAgICAgZDMuYmVoYXZpb3IuZHJhZygpLm9yaWdpbihPYmplY3QpXG5cdCAgICAgICAgICAgICAgICAgICAgICAgIC5vbignZHJhZycsIGZ1bmN0aW9uICgpIHsgJCQuZHJhZyhkMy5tb3VzZSh0aGlzKSk7IH0pXG5cdCAgICAgICAgICAgICAgICAgICAgICAgIC5vbignZHJhZ3N0YXJ0JywgZnVuY3Rpb24gKCkgeyAkJC5kcmFnc3RhcnQoZDMubW91c2UodGhpcykpOyB9KVxuXHQgICAgICAgICAgICAgICAgICAgICAgICAub24oJ2RyYWdlbmQnLCBmdW5jdGlvbiAoKSB7ICQkLmRyYWdlbmQoKTsgfSlcblx0ICAgICAgICAgICAgICAgICkgOiBmdW5jdGlvbiAoKSB7fVxuXHQgICAgICAgICAgICApO1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmRpc3BhdGNoRXZlbnQgPSBmdW5jdGlvbiAodHlwZSwgaW5kZXgsIG1vdXNlKSB7XG5cdCAgICAgICAgdmFyICQkID0g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QkLmZpbHRlclRhcmdldHNUb1Nob3coJCQuZGF0YS50YXJnZXRzLmZpbHRlcih0eXBlRmlsdGVyLCAkJCkpLmZvckVhY2goZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IGNvbmZpZy5kYXRhX2dyb3Vwcy5sZW5ndGg7IGorKykge1xuXHQgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhX2dyb3Vwc1tqXS5pbmRleE9mKGQuaWQpIDwgMCkgeyBjb250aW51ZTsgfVxuXHQgICAgICAgICAgICAgICAgZm9yIChrID0gMDsgayA8IGNvbmZpZy5kYXRhX2dyb3Vwc1tqXS5sZW5ndGg7IGsrKykge1xuXHQgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YV9ncm91cHNbal1ba10gaW4gaW5kaWNlcykge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBpbmRpY2VzW2QuaWRdID0gaW5kaWNlc1tjb25maWcuZGF0YV9ncm91cHNbal1ba11dO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgaWYgKGlzVW5kZWZpbmVkKGluZGljZXNbZC5pZF0pKSB7IGluZGljZXNbZC5pZF0gPSBpKys7IH1cblx0ICAgICAgICB9KTtcblx0ICAgICAgICBpbmRpY2VzLl9fbWF4X18gPSBpIC0gMTtcblx0ICAgICAgICByZXR1cm4gaW5kaWNlcztcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRTaGFwZVggPSBmdW5jdGlvbiAob2Zmc2V0LCB0YXJnZXRzTnVtLCBpbmRpY2VzLCBpc1N1Yikge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsIHNjYWxlID0gaXNTdWIgPyAkJC5zdWJYIDogJCQueDtcblx0ICAgICAgICBy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llTY2FsZShkLmlkKSA6ICQkLmdldFlTY2FsZShkLmlkKSxcblx0ICAgICAgICAgICAgICAgIHkwID0gc2NhbGUoMCksIG9mZnNldCA9IHkwO1xuXHQgICAgICAgICAgICB0YXJnZXRzLmZvckVhY2goZnVuY3Rpb24gKHQpIHtcblx0ICAgICAgICAgICAgICAgIHZhciB2YWx1ZXMgPSAkJC5pc1N0ZXBUeXBlKGQpID8gJCQuY29udmVydFZhbHVlc1RvU3RlcCh0LnZhbHVlcykgOiB0LnZhbHVlcztcblx0ICAgICAgICAgICAgICAgIGlmICh0LmlkID09PSBkLmlkIHx8IGluZGljZXNbdC5pZF0gIT09IGluZGljZXNbZC5pZF0pIHsgcmV0dXJuOyB9XG5cdCAgICAgICAgICAgICAgICBpZiAodGFyZ2V0SWRzLmluZGV4T2YodC5pZCkgPCB0YXJnZXRJZHMuaW5kZXhPZihkLmlkKSkge1xuXHQgICAgICAgICAgICAgICAgICAgIC8vIGNoZWNrIGlmIHRoZSB4IHZhbHVlcyBsaW5lIHVwXG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZXNbaV0gPT09ICd1bmRlZmluZWQnIHx8ICt2YWx1ZXNbaV0ueCAhPT0gK2QueCkgeyAgLy8gXCIrXCIgZm9yIHRpbWVzZXJpZXNcblx0ICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYgbm90LCB0cnkgdG8gZmluZCB0aGUgdmFsdWUgdGhhdCBkb2VzIGxpbmUgdXBcblx0ICAgICAgICAgICAgICAgICAgICAgICAgaSA9IC0xO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXMuZm9yRWFjaChmdW5jdGlvbiAodiwgaikge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHYueCA9PT0gZC54KSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGo7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICBpZiAoaSBpbiB2YWx1ZXMgJiYgdmFsdWVzW2ldLnZhbHVlICogZC52YWx1ZSA+PSAwKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIG9mZnNldCArPSBzY2FsZSh2YWx1ZXNbaV0udmFsdWUpIC0geTA7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgcmV0dXJuIG9mZnNldDtcblx0ICAgICAgICB9O1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmlzV2l0aGluU2hhcGUgPSBmdW5jdGlvbiAodGhhdCwgZCkge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsXG5cdCAgICAgICAgICAgIHNoYXBlID0gJCQuZDMuc2VsZWN0KHRoYXQpLCBpc1dpdGhpbjtcblx0ICAgICAgICBpZiAoISQkLmlzVGFyZ2V0VG9TaG93KGQuaWQpKSB7XG5cdCAgICAgICAgICAgIGlzV2l0aGluID0gZmFsc2U7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGVsc2UgaWYgKHRoYXQubm9kZU5hbWUgPT09ICdjaXJjbGUnKSB7XG5cdCAgICAgICAgICAgIGlzV2l0aGluID0gJCQuaXNTdGVwVHlwZShkKSA/ICQkLmlzV2l0aGluU3RlcCh0aGF0LCAkJC5nZXRZU2NhbGUoZC5pZCkoZC52YWx1ZSkpIDogJCQuaXNXaXRoaW5DaXJjbGUodGhhdCwgJCQucG9pbnRTZWxlY3RSKGQpICogMS41KTtcblx0ICAgICAgICB9XG5cdCAgICAgICAgZWxzZSBpZiAodGhhdC5ub2RlTmFtZSA9PT0gJ3BhdGgnKSB7XG5cdCAgICAgICAgICAgIGlzV2l0aGluID0gc2hhcGUuY2xhc3NlZChDTEFT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A/IGZ1bmN0aW9uIChkKSB7IHJldHVybiB4KGQueCk7IH0gOiBmdW5jdGlvbiAoZCkgeyByZXR1cm4geShkLnZhbHVlKTsgfTtcblx0XG5cdCAgICAgICAgLy8gRGVmaW5lIHN2ZyBnZW5lcmF0b3IgZnVuY3Rpb24gZm9yIHJlZ2lvblxuXHQgICAgICAgIGZ1bmN0aW9uIGdlbmVyYXRlTShwb2ludHMpIHtcblx0ICAgICAgICAgICAgcmV0dXJuICdNJyArIHBvaW50c1swXVswXSArICcgJyArIHBvaW50c1swXVsxXSArICcgJyArIHBvaW50c1sxXVswXSArICcgJyArIHBvaW50c1sxXVsxXTtcblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKCQkLmlzVGltZVNlcmllcygpKSB7XG5cdCAgICAgICAgICAgIHNXaXRoUmVnaW9uID0gZnVuY3Rpb24gKGQwLCBkMSwgaiwgZGlmZikge1xuXHQgICAgICAgICAgICAgICAgdmFyIHgwID0gZDAueC5nZXRUaW1lKCksIHhfZGlmZiA9IGQxLnggLSBkMC54LFxuXHQgICAgICAgICAgICAgICAgICAgIHh2MCA9IG5ldyBEYXRlKHgwICsgeF9kaWZmICogaiksXG5cdCAgICAgICAgICAgICAgICAgICAgeHYxID0gbmV3IERhdGUoeDAgKyB4X2RpZmYgKiAoaiArIGRpZmYpKSxcblx0ICAgICAgICAgICAgICAgICAgICBwb2ludHM7XG5cdCAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmF4aXNfcm90YXRlZCkge1xuXHQgICAgICAgICAgICAgICAgICAgIHBvaW50cyA9IFtbeSh5cChqKSksIHgoeHYwKV0sIFt5KHlwKGogKyBkaWZmKSksIHgoeHYxKV1dO1xuXHQgICAgICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgICAgICBwb2ludHMgPSBbW3goeHYwKSwgeSh5cChqKSldLCBbeCh4djEpLCB5KHlwKGogKyBkaWZmKSldXTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIHJldHVybiBnZW5lcmF0ZU0ocG9pbnRzKTtcblx0ICAgICAgICAgICAgfTtcblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICBzV2l0aFJlZ2lvbiA9IGZ1bmN0aW9uIChkMCwgZDEsIGosIGRpZmYpIHtcblx0ICAgICAgICAgICAgICAgIHZhciBwb2ludHM7XG5cdCAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmF4aXNfcm90YXRlZCkge1xuXHQgICAgICAgICAgICAgICAgICAgIHBvaW50cyA9IFtbeSh5cChqKSwgdHJ1ZSksIHgoeHAoaikpXSwgW3koeXAoaiArIGRpZmYpLCB0cnVlKSwgeCh4cChqICsgZGlmZikpXV07XG5cdCAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgICAgIHBvaW50cyA9IFtbeCh4cChqKSwgdHJ1ZSksIHkoeXAoaikpXSwgW3goeHAoaiArIGRpZmYpLCB0cnVlKSwgeSh5cChqICsgZGlmZikpXV07XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gZ2VuZXJhdGVNKHBvaW50cyk7XG5cdCAgICAgICAgICAgIH07XG5cdCAgICAgICAgfVxuXHRcblx0ICAgICAgICAvLyBHZW5lcmF0ZVxuXHQgICAgICAgIGZvciAoaSA9IDA7IGkgPCBkLmxlbmd0aDsgaSsrKSB7XG5cdFxuXHQgICAgICAgICAgICAvLyBEcmF3IGFzIG5vcm1hbFxuXHQgICAgICAgICAgICBpZiAoaXNVbmRlZmluZWQocmVnaW9ucykgfHwgISBpc1dpdGhpblJlZ2lvbnMoZFtpXS54LCByZWdpb25zKSkge1xuXHQgICAgICAgICAgICAgICAgcyArPSBcIiBcIiArIHhWYWx1ZShkW2ldKSArIFwiIFwiICsgeVZhbHVlKGRbaV0pO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIC8vIERyYXcgd2l0aCByZWdpb24gLy8gVE9ETzogRml4IGZvciBob3Jpem90YWwgY2hhcnRzXG5cdCAgICAgICAgICAgIGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgeHAgPSAkJC5nZXRTY2FsZShkW2kgLSAxXS54ICsgeE9mZnNldCwgZFtpXS54ICsgeE9mZnNldCwgJCQuaXNUaW1lU2VyaWVzKCkpO1xuXHQgICAgICAgICAgICAgICAgeXAgPSAkJC5nZXRTY2FsZShkW2kgLSAxXS52YWx1ZSwgZFtpXS52YWx1ZSk7XG5cdFxuXHQgICAgICAgICAgICAgICAgZHggPSB4KGRbaV0ueCkgLSB4KGRbaSAtIDFdLngpO1xuXHQgICAgICAgICAgICAgICAgZHkgPSB5KGRbaV0udmFsdWUpIC0geShkW2kgLSAxXS52YWx1ZSk7XG5cdCAgICAgICAgICAgICAgICBkZCA9IE1hdGguc3FydChNYXRoLnBvdyhkeCwgMikgKyBNYXRoLnBvdyhkeSwgMikpO1xuXHQgICAgICAgICAgICAgICAgZGlmZiA9IDIgLyBkZDtcblx0ICAgICAgICAgICAgICAgIGRpZmZ4MiA9IGRpZmYgKiAyO1xuXHRcblx0ICAgICAgICAgICAgICAgIGZvciAoaiA9IGRpZmY7IGogPD0gMTsgaiArPSBkaWZmeDIpIHtcblx0ICAgICAgICAgICAgICAgICAgICBzICs9IHNXaXRoUmVnaW9uKGRbaSAtIDFdLCBkW2ldLCBqLCBkaWZmKTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBwcmV2ID0gZFtpXS54O1xuXHQgICAgICAgIH1cblx0XG5cdCAgICAgICAgcmV0dXJuIHM7XG5cdCAgICB9O1xuXHRcblx0XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi51cGRhdGVBcmVhID0gZnVuY3Rpb24gKGR1cmF0aW9uRm9yRXhpdCkge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsIGQzID0gJCQuZDM7XG5cdCAgICAgICAgJCQubWFpbkFy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aXNTdWIpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWcsXG5cdCAgICAgICAgICAgIGdldFBvaW50cyA9ICQkLmdlbmVyYXRlR2V0QmFyUG9pbnRzKGJhckluZGljZXMsIGlzU3ViKTtcblx0ICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGQsIGkpIHtcblx0ICAgICAgICAgICAgLy8gNCBwb2ludHMgdGhhdCBtYWtlIGEgYmFyXG5cdCAgICAgICAgICAgIHZhciBwb2ludHMgPSBnZXRQb2ludHMoZCwgaSk7XG5cdFxuXHQgICAgICAgICAgICAvLyBzd2l0Y2ggcG9pbnRzIGlmIGF4aXMgaXMgcm90YXRlZCwgbm90IGFwcGxpY2FibGUgZm9yIHN1YiBjaGFydFxuXHQgICAgICAgICAgICB2YXIgaW5kZXhYID0gY29uZmlnLmF4aXNfcm90YXRlZCA/IDEgOiAwO1xuXHQgICAgICAgICAgICB2YXIgaW5kZXhZID0gY29uZmlnLmF4aXNfcm90YXRlZCA/IDAgOiAxO1xuXHRcblx0ICAgICAgICAgICAgdmFyIHBhdGggPSAnTSAnICsgcG9pbnRzWzBdW2luZGV4WF0gKyAnLCcgKyBwb2ludHNbMF1baW5kZXhZXSArICcgJyArXG5cdCAgICAgICAgICAgICAgICAgICAgJ0wnICsgcG9pbnRzWzFdW2luZGV4WF0gKyAnLCcgKyBwb2ludHNbMV1baW5kZXhZXSArICcgJyArXG5cdCAgICAgICAgICAgICAgICAgICAgJ0wnICsgcG9pbnRzWzJdW2luZGV4WF0gKyAnLCcgKyBwb2ludHNbMl1baW5kZXhZXSArICcgJyArXG5cdCAgICAgICAgICAgICAgICAgICAgJ0wnICsgcG9pbnRzWzNdW2luZGV4WF0gKyAnLCcgKyBwb2ludHNbM11baW5kZXhZXSArICcgJyArXG5cdCAgICAgICAgICAgICAgICAgICAgJ3onO1xuXHRcblx0ICAgICAgICAgICAgcmV0dXJuIHBhdGg7XG5cdCAgICAgICAg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2xhc3NUZXh0KVxuXHQgICAgICAgICAgICAuYXR0cigndGV4dC1hbmNob3InLCBmdW5jdGlvbiAoZCkgeyByZXR1cm4gY29uZmlnLmF4aXNfcm90YXRlZCA/IChkLnZhbHVlIDwgMCA/ICdlbmQnIDogJ3N0YXJ0JykgOiAnbWlkZGxlJzsgfSlcblx0ICAgICAgICAgICAgLnN0eWxlKFwic3Ryb2tlXCIsICdub25lJylcblx0ICAgICAgICAgICAgLnN0eWxlKFwiZmlsbFwiLCBmdW5jdGlvbiAoZCkgeyByZXR1cm4gJCQuY29sb3IoZCk7IH0pXG5cdCAgICAgICAgICAgIC5zdHlsZShcImZpbGwtb3BhY2l0eVwiLCAwKTtcblx0ICAgICAgICAkJC5tYWluVGV4dFxuXHQgICAgICAgICAgICAudGV4dChmdW5jdGlvbiAoZCwgaSwgaikgeyByZXR1cm4gJCQuZGF0YUxhYmVsRm9ybWF0KGQuaWQpKGQudmFsdWUsIGQuaWQsIGksIGopOyB9KTtcblx0ICAgICAgICAkJC5tYWluVGV4dC5leGl0KClcblx0ICAgICAgICAgICAgLnRyYW5zaXRpb24oKS5kdXJhdGlvbihkdXJhdGlvbkZvckV4aXQpXG5cdCAgICAgICAgICAgIC5zdHlsZSgnZmlsbC1vcGFjaXR5JywgMClcblx0ICAgICAgICAgICAgLnJlbW92ZSgpO1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnJlZHJhd1RleHQgPSBmdW5jdGlvbiAoeEZvclRleHQsIHlGb3JUZXh0LCBmb3JGbG93LCB3aXRoVHJhbnNpdGlvbikge1xuXHQgICAgICAgIHJldHVybiBbXG5cdCAgICAgICAgICAgICh3aXRoVHJhbnNpdGlvbiA/IHRoaXMubWFpblRleHQudHJhbnNpdGlvbigpIDogdGhpcy5tYWluVGV4dClcblx0ICAgICAgICAgICAgICAgIC5hdHRyKCd4JywgeEZvclRleHQpXG5cdCAgICAgICAgICAgICAgICAuYXR0cigneScsIHlGb3JUZ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xuXHQgICAgICAgICAgICB5UG9zO1xuXHQgICAgICAgIGlmICgkJC5jb25maWcuYXhpc19yb3RhdGVkKSB7XG5cdCAgICAgICAgICAgIHlQb3MgPSAocG9pbnRzWzBdWzBdICsgcG9pbnRzWzJdWzBdICsgYm94LmhlaWdodCAqIDAuNikgLyAyO1xuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgIHlQb3MgPSBwb2ludHNbMl1bMV07XG5cdCAgICAgICAgICAgIGlmIChkLnZhbHVlIDwgMCAgfHwgKGQudmFsdWUgPT09IDAgJiYgISQkLmhhc1Bvc2l0aXZlVmFsdWUpKSB7XG5cdCAgICAgICAgICAgICAgICB5UG9zICs9IGJveC5oZWlnaHQ7XG5cdCAgICAgICAgICAgICAgICBpZiAoJCQuaXNCYXJUeXBlKGQpICYmICQkLmlzU2FmYXJpKCkpIHtcblx0ICAgICAgICAgICAgICAgICAgICB5UG9zIC09IDM7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBlbHNlIGlmICghJCQuaXNCYXJUeXBlKGQpICYmICQkLmlzQ2hyb21lKCkpIHtcblx0ICAgICAgICAgICAgICAgICAgICB5UG9zICs9IDM7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICB5UG9zICs9ICQkLmlzQmFyVHlwZShkKSA/IC0zIDogLTY7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdCAgICAgICAgLy8gc2hvdyBsYWJlbHMgcmVnYXJkbGVzcyBvZiB0aGUgZG9tYWluIGlmIHZhbHVlIGlzIG51bGxcblx0ICAgICAgICBpZiAoZC52YWx1ZSA9PT0gbnVsbCAmJiAhJCQuY29uZmlnLmF4aXNfcm90YXRlZCkge1xuXHQgICAgICAgICAgICBpZiAoeVBvcyA8IGJveC5oZWlnaHQpIHtcblx0ICAgICAgICAgICAgICAgIHlQb3MgPSBib3guaGVpZ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kJC54Z3JpZExpbmVzLnNlbGVjdCgndGV4dCcpO1xuXHQgICAgICAgIHJldHVybiBbXG5cdCAgICAgICAgICAgICh3aXRoVHJhbnNpdGlvbiA/IGxpbmVzLnRyYW5zaXRpb24oKSA6IGxpbmVzKVxuXHQgICAgICAgICAgICAgICAgLmF0dHIoXCJ4MVwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gMCA6IHh2KVxuXHQgICAgICAgICAgICAgICAgLmF0dHIoXCJ4MlwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gJCQud2lkdGggOiB4dilcblx0ICAgICAgICAgICAgICAgIC5hdHRyKFwieTFcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/IHh2IDogMClcblx0ICAgICAgICAgICAgICAgIC5hdHRyKFwieTJcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/IHh2IDogJCQuaGVpZ2h0KVxuXHQgICAgICAgICAgICAgICAgLnN0eWxlKFwib3BhY2l0eVwiLCAxKSxcblx0ICAgICAgICAgICAgKHdpdGhUcmFuc2l0aW9uID8gdGV4dHMudHJhbnNpdGlvbigpIDogdGV4dHMpXG5cdCAgICAgICAgICAgICAgICAuYXR0cihcInhcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/ICQkLnlHcmlkVGV4dFguYmluZCgkJCkgOiAkJC54R3JpZFRleHRYLmJpbmQoJCQpKVxuXHQgICAgICAgICAgICAgICAgLmF0dHIoXCJ5XCIsIHh2KVxuXHQgICAgICAgICAgICAgICAgLnRleHQoZnVuY3Rpb24gKGQpIHsgcmV0dXJuIGQudGV4dDsgfSlcblx0ICAgICAgICAgICAgICAgIC5zdHlsZShcIm9wYWNpdHlcIiwgMSlcblx0ICAgICAgICBdO1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnNob3dYR3JpZEZvY3VzID0gZnVuY3Rpb24gKHNlbGVjdGVkRGF0YSkge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbm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AgICBjM19jaGFydF9pbnRlcm5hbF9mbi51cGRhdGVYZ3JpZEZvY3VzID0gZnVuY3Rpb24gKCkge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZztcblx0ICAgICAgICAkJC5tYWluLnNlbGVjdCgnbGluZS4nICsgQ0xBU1MueGdyaWRGb2N1cylcblx0ICAgICAgICAgICAgLmF0dHIoXCJ4MVwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gMCA6IC0xMClcblx0ICAgICAgICAgICAgLmF0dHIoXCJ4MlwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gJCQud2lkdGggOiAtMTApXG5cdCAgICAgICAgICAgIC5hdHRyKFwieTFcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/IC0xMCA6IDApXG5cdCAgICAgICAgICAgIC5hdHRyKFwieTJcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/IC0xMCA6ICQkLmhlaWdodCk7XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2VuZXJhdGVHcmlkRGF0YSA9IGZ1bmN0aW9uICh0eXBlLCBzY2FsZSkge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsXG5cdCAgICAgICAgICAgIGdyaWREYXRhID0gW10sIHhEb21haW4sIGZpcnN0WWVhciwgbGFzdFllYXIsIGksXG5cdCAgICAgICAgICAgIHRpY2tOdW0gPSAkJC5tYWluLnNlbGVjdChcIi5cIiArIENMQVNTLmF4aXNYKS5zZWxlY3RBbGwoJy50aWNrJykuc2l6ZSgpO1xuXHQgICAgICAgIGlmICh0eXBlID09PSAneWVhcicpIHtcblx0ICAgICAgICAgICAgeERvbWFpbiA9ICQkLmdldFhEb21haW4oKTtcblx0ICAgICAgICAgICAgZmlyc3RZZWFyID0geERvbWFpblswXS5nZXRGdWxsWWVhcigpO1xuXHQgICAgICAgICAgICBsYXN0WWVhciA9IHhEb21haW5bMV0uZ2V0RnVsbFllYXIoKTtcblx0ICAgICAgICAgICAgZm9yIChpID0gZmlyc3RZZWFyOyBpIDw9IGxhc3RZZWFyOyBpKyspIHtcblx0ICAgICAgICAgICAgICAgIGdyaWREYXRhLnB1c2gobmV3IERhdGUoaSArICctMDEtMDEgMDA6MDA6MDAnKSk7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICBncmlkRGF0YSA9IHNjYWxlLnRpY2tzKDEwKTtcblx0ICAgICAgICAgICAgaWYgKGdyaWREYXRhLmxlbmd0aCA+IHRpY2tOdW0pIHsgLy8gdXNlIG9ubHkgaW50XG5cdCAgICAgICAgICAgICAgICBncmlkRGF0YSA9IGdyaWREYXRhLmZpbHRlcihmdW5jdGlvbiAoZCkgeyByZXR1cm4gKFwiXCIgKyBkKS5pbmRleE9mKCcuJykgPCAwOyB9KTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgIH1cblx0ICAgICAgICByZXR1cm4gZ3JpZERhdGE7XG5cdCAgICB9O1xuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0R3JpZEZpbHRlclRvUmVtb3ZlID0gZnVuY3Rpb24gKHBhcmFtcykge1xuXHQgICAgICAgIHJldHVybiBwYXJhbXMgPyBmdW5jdGlvbiAobGluZSkge1xuXHQgICAgICAgICAgICB2YXIgZm91bmQgPSBmYWxzZTtcblx0ICAgICAgICAgICAgW10uY29uY2F0KHBhcmFtcykuZm9yRWFjaChmdW5jdGlvbiAocGFyYW0pIHtcblx0ICAgICAgICAgICAgICAgIGlmICgoKCd2YWx1ZScgaW4gcGFyYW0gJiYgbGluZS52YWx1ZSA9PT0gcGFyYW0udmFsdWUpIHx8ICgnY2xhc3MnIGluIHBhcmFtICYmIGxpbmVbJ2NsYXNzJ10gPT09IHBhcmFtWydjbGFzcyddKSkpIHtcblx0ICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7XG5cdCAgICAgICAgICAgICAgICB9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lkX3lfbGluZXMgPSBjb25maWcuZ3JpZF95X2xpbmVzLmZpbHRlcih0b1Nob3cpO1xuXHQgICAgICAgIH1cblx0ICAgIH07XG5cdFxuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uaW5pdFRvb2x0aXAgPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLCBpO1xuXHQgICAgICAgICQkLnRvb2x0aXAgPSAkJC5zZWxlY3RDaGFydFxuXHQgICAgICAgICAgICAuc3R5bGUoXCJwb3NpdGlvblwiLCBcInJlbGF0aXZlXCIpXG5cdCAgICAgICAgICAuYXBwZW5kKFwiZGl2XCIpXG5cdCAgICAgICAgICAgIC5hdHRyKCdjbGFzcycsIENMQVNTLnRvb2x0aXBDb250YWluZXIpXG5cdCAgICAgICAgICAgIC5zdHlsZShcInBvc2l0aW9uXCIsIFwiYWJzb2x1dGVcIilcblx0ICAgICAgICAgICAgLnN0eWxlKFwicG9pbnRlci1ldmVudHNcIiwgXCJub25lXCIpXG5cdCAgICAgICAgICAgIC5zdHlsZShcImRpc3BsYXlcIiwgXCJub25lXCIpO1xuXHQgICAgICAgIC8vIFNob3cgdG9vbHRpcCBpZiBuZWVkZWRcblx0ICAgICAgICBpZiAoY29uZmlnLnRvb2x0aXBfaW5pdF9zaG93KSB7XG5cdCAgICAgICAgICAgIGlmICgkJC5pc1RpbWVTZXJpZXMoKSAmJiBpc1N0cmluZyhjb25maWcudG9vbHRpcF9pbml0X3gpKSB7XG5cdCAgICAgICAgICAgICAgICBjb25maWcudG9vbHRpcF9pbml0X3ggPSAkJC5wYXJzZURhdGUoY29uZmlnLnRvb2x0aXBfaW5pdF94KTtcblx0ICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCAkJC5kYXRhLnRhcmdldHNbMF0udmFsdWVzLmxlbmd0aDsgaSsrKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKCgkJC5kYXRhLnRhcmdldHNbMF0udmFsdWVzW2ldLnggLSBjb25maWcudG9vbHRpcF9pbml0X3gpID09PSAwKSB7IGJyZWFrOyB9XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBjb25maWcudG9vbHRpcF9pbml0X3ggPSBpO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICQkLnRvb2x0aXAuaHRtbChjb25maWcudG9vbHRpcF9jb250ZW50cy5jYWxsKCQkLCAkJC5kYXRhLnRhcmdldHMubWFwKGZ1bmN0aW9uIChkKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gJCQuYWRkTmFtZShkLnZhbHVlc1tjb25maWcudG9vbHRpcF9pbml0X3hdKTtcblx0ICAgICAgICAgICAgfSksICQkLmF4aXMuZ2V0WEF4aXNUaWNrRm9ybWF0KCksICQkLmdldFlGb3JtYXQoJCQuaGFzQXJjVHlwZSgpKSwgJCQuY29sb3IpKTtcblx0ICAgICAgICAgICAgJCQudG9vbHRpcC5zdHlsZShcInRvcFwiLCBjb25maWcudG9vbHRpcF9pbml0X3Bvc2l0aW9uLnRvcClcblx0ICAgICAgICAgICAgICAgIC5zdHlsZShcImxlZnRcIiwgY29uZmlnLnRvb2x0aXBfaW5pdF9wb3NpdGlvbi5sZWZ0KVxuXHQgICAgICAgICAgICAgICAgLnN0eWxlKFwiZGlzcGxheVwiLCBcImJsb2NrXCIpO1xuXHQgICAgICAgIH1cblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRUb29sdGlwQ29udGVudCA9IGZ1bmN0aW9uIChkLCBkZWZhdWx0VGl0bGVGb3JtYXQsIGRlZmF1bHRWYWx1ZUZvcm1hdCwgY29sb3IpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWcsXG5cdCAgICAgICAgICAgIHRpdGxlRm9ybWF0ID0gY29uZmlnLnRvb2x0aXBfZm9ybWF0X3RpdG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5cdCAgICAgICAgICAgICAgICAgICAgdjEgPSBhID8gaWRzLmluZGV4T2YoYS5pZCkgOiBudWxsO1xuXHQgICAgICAgICAgICAgICAgICAgIHYyID0gYiA/IGlkcy5pbmRleE9mKGIuaWQpIDogbnVsbDtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIHJldHVybiBvcmRlckFzYyA/IHYxIC0gdjIgOiB2MiAtIHYxO1xuXHQgICAgICAgICAgICB9KTtcblx0ICAgICAgICB9XG5cdFxuXHQgICAgICAgIGZvciAoaSA9IDA7IGkgPCBkLmxlbmd0aDsgaSsrKSB7XG5cdCAgICAgICAgICAgIGlmICghIChkW2ldICYmIChkW2ldLnZhbHVlIHx8IGRbaV0udmFsdWUgPT09IDApKSkgeyBjb250aW51ZTsgfVxuXHRcblx0ICAgICAgICAgICAgaWYgKCEgdGV4dCkge1xuXHQgICAgICAgICAgICAgICAgdGl0bGUgPSBzYW5pdGlzZSh0aXRsZUZvcm1hdCA/IHRpdGxlRm9ybWF0KGRbaV0ueCkgOiBkW2ldLngpO1xuXHQgICAgICAgICAgICAgICAgdGV4dCA9IFwiPHRhYmxlIGNsYXNzPSdcIiArICQkLkNMQVNTLnRvb2x0aXAgKyBcIic+XCIgKyAodGl0bGUgfHwgdGl0bGUgPT09IDAgPyBcIjx0cj48dGggY29sc3Bhbj0nMic+XCIgKyB0aXRsZSArIFwiPC90aD48L3RyPlwiIDogXCJcIik7XG5cdCAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgIHZhbHVlID0gc2FuaXRpc2UodmFsdWVGb3JtYXQoZFtpXS52YWx1ZSwgZFtpXS5yYXRpbywgZFtpXS5pZCwgZFtpXS5pbmRleCwgZCkpO1xuXHQgICAgICAgICAgICBpZiAodmFsdWUgIT09IHVuZGVmaW5lZCkge1xuXHQgICAgICAgICAgICAgICAgLy8gU2tpcCBlbGVtZW50cyB3aGVuIHRoZWlyIG5hbWUgaXMgc2V0IHRvIG51bGxcblx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cmdpbiA9IChhcmVhTGVuZ3RoIC0gaXRlbUxlbmd0aCkgLyAyO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0b3RhbExlbmd0aCA9IDA7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHN0ZXArKztcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBzdGVwc1tpZF0gPSBzdGVwO1xuXHQgICAgICAgICAgICAgICAgbWFyZ2luc1tzdGVwXSA9ICQkLmlzTGVnZW5kSW5zZXQgPyAxMCA6IG1hcmdpbjtcblx0ICAgICAgICAgICAgICAgIG9mZnNldHNbaWRdID0gdG90YWxMZW5ndGg7XG5cdCAgICAgICAgICAgICAgICB0b3RhbExlbmd0aCArPSBpdGVtTGVuZ3RoO1xuXHQgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICBpZiAocmVzZXQpIHtcblx0ICAgICAgICAgICAgICAgIHRvdGFsTGVuZ3RoID0gMDtcblx0ICAgICAgICAgICAgICAgIHN0ZXAgPSAwO1xuXHQgICAgICAgICAgICAgICAgbWF4V2lkdGggPSAwO1xuXHQgICAgICAgICAgICAgICAgbWF4SGVpZ2h0ID0gMDtcblx0ICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgaWYgKGNvbmZpZy5sZWdlbmRfc2hvdyAmJiAhJCQuaXNMZWdlbmRUb1Nob3coaWQpKSB7XG5cdCAgICAgICAgICAgICAgICB3aWR0aHNbaWRdID0gaGVpZ2h0c1tpZF0gPSBzdGVwc1tpZF0gPSBvZmZzZXRzW2lkXSA9IDA7XG5cdCAgICAgICAgICAgICAgICByZXR1cm47XG5cdCAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgIHdpZHRoc1tpZF0gPSBpdGVtV2lkdGg7XG5cdCAgICAgICAgICAgIGhlaWdodHNbaWRdID0gaXRlbUhlaWdodDtcblx0XG5cdCAgICAgICAgICAgIGlmICghbWF4V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0ZW0pXG5cdCAgICAgICAgICAgIC5kYXRhKHRhcmdldElkcylcblx0ICAgICAgICAgICAgLmVudGVyKCkuYXBwZW5kKCdnJylcblx0ICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgZnVuY3Rpb24gKGlkKSB7IHJldHVybiAkJC5nZW5lcmF0ZUNsYXNzKENMQVNTLmxlZ2VuZEl0ZW0sIGlkKTsgfSlcblx0ICAgICAgICAgICAgLnN0eWxlKCd2aXNpYmlsaXR5JywgZnVuY3Rpb24gKGlkKSB7IHJldHVybiAkJC5pc0xlZ2VuZFRvU2hvdyhpZCkgPyAndmlzaWJsZScgOiAnaGlkZGVuJzsgfSlcblx0ICAgICAgICAgICAgLnN0eWxlKCdjdXJzb3InLCAncG9pbnRlcicpXG5cdCAgICAgICAgICAgIC5vbignY2xpY2snLCBmdW5jdGlvbiAoaWQpIHtcblx0ICAgICAgICAgICAgICAgIGlmIChjb25maWcubGVnZW5kX2l0ZW1fb25jbGljaykge1xuXHQgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5sZWdlbmRfaXRlbV9vbmNsaWNrLmNhbGwoJCQsIGlkKTtcblx0ICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKCQkLmQzLmV2ZW50LmFsdEtleSkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAkJC5hcGkuaGlkZSgpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAkJC5hcGkuc2hvdyhpZCk7XG5cdCAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgJCQuYXBpLnRvZ2dsZShpZCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICQkLmlzVGFyZ2V0VG9TaG93KGlkKSA/ICQkLmFwaS5mb2N1cyhpZCkgOiAkJC5hcGkucmV2ZXJ0KCk7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9KVxuXHQgICAgICAgICAgICAub24oJ21vdXNlb3ZlcicsIGZ1bmN0aW9uIChpZCkge1xuXHQgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5sZWdlbmRfaXRlbV9vbm1vdXNlb3Zlcikge1xuXHQgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5sZWdlbmRfaXRlbV9vbm1vdXNlb3Zlci5jYWxsKCQkLCBpZCk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBlbHNlIHtcblx0ICAgICAgICAgICAgICAgICAgICAkJC5kMy5zZWxlY3QodGhpcykuY2xhc3NlZChDTEFTUy5sZWdlbmRJdGVtRm9jdXNlZCwgdHJ1ZSk7XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKCEkJC50cmFuc2l0aW5nICYmICQkLmlzVGFyZ2V0VG9TaG93KGlkKSkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAkJC5hcGkuZm9jdXMoaWQpO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgfSlcblx0ICAgICAgICAgICAgLm9uKCdtb3VzZW91dCcsIGZ1bmN0aW9uIChpZCkge1xuXHQgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5sZWdlbmRfaXRlbV9vbm1vdXNlb3V0KSB7XG5cdCAgICAgICAgICAgICAgICAgICAgY29uZmlnLmxlZ2VuZF9pdGVtX29ubW91c2VvdXQuY2FsbCgkJCwgaWQpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgZWxzZSB7XG5cdCAgICAgICAgICAgICAgICAgICAgJCQuZDMuc2VsZWN0KHRoaXMpLmNsYXNzZWQoQ0xBU1MubGVnZW5kSXRlbUZvY3VzZWQsIGZhbHNlKTtcblx0ICAgICAgICAgICAgICAgICAgICAkJC5hcGkucmV2ZXJ0KCk7XG5cdCAgICAgICAgICAgICAgIC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VGlja1RleHQpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLm93bmVyLCBjb25maWcgPSAkJC5jb25maWcsXG5cdCAgICAgICAgICAgIGF4aXNQYXJhbXMgPSB7XG5cdCAgICAgICAgICAgICAgICBpc0NhdGVnb3J5OiAkJC5pc0NhdGVnb3JpemVkKCksXG5cdCAgICAgICAgICAgICAgICB3aXRoT3V0ZXJUaWNrOiB3aXRoT3V0ZXJUaWNrLFxuXHQgICAgICAgICAgICAgICAgdGlja011bHRpbGluZTogY29uZmlnLmF4aXNfeF90aWNrX211bHRpbGluZSxcblx0ICAgICAgICAgICAgICAgIHRpY2tXaWR0aDogY29uZmlnLmF4aXNfeF90aWNrX3dpZHRoLFxuXHQgICAgICAgICAgICAgICAgdGlja1RleHRSb3RhdGU6IHdpdGhvdXRSb3RhdGVUaWNrVGV4dCA/IDAgOiBjb25maWcuYXhpc194X3RpY2tfcm90YXRlLFxuXHQgICAgICAgICAgICAgICAgd2l0aG91dFRyYW5zaXRpb246IHdpdGhvdXRUcmFuc2l0aW9uLFxuXHQgICAgICAgICAgICB9LFxuXHQgICAgICAgICAgICBheGlzID0gYzNfYXhpcygkJC5kMywgYXhpc1BhcmFtcykuc2NhbGUoc2NhbGUpLm9yaWVudChvcmllbnQpO1xuXHRcblx0ICAgICAgICBpZiAoJCQuaXNUaW1lU2VyaWVzKCkgJiYgdGlja1ZhbHVlcyAmJiB0eXBlb2YgdGlja1ZhbHVlcyAhPT0gXCJmdW5jdGlvblwiKSB7XG5cdCAgICAgICAgICAgIHRpY2tWYWx1ZXMgPSB0aWNrVmFsdWVzLm1hcChmdW5jdGlvbiAodikgeyByZXR1cm4gJCQucGFyc2VEYXRlKHYpOyB9KTtcblx0ICAgICAgICB9XG5cdFxuXHQgICAgICAgIC8vIFNldCB0aWNrXG5cdCAgICAgICAgYXhpcy50aWNrRm9ybWF0KHRpY2tGb3JtYXQpLnRpY2tWYWx1ZXModGlja1ZhbHVlcyk7XG5cdCAgICAgICAgaWYgKCQkLmlzQ2F0ZWdvcml6ZWQoKSkge1xuXHQgICAgICAgICAgICBheGlzLnRpY2tDZW50ZXJlZChjb25maWcuYXhpc194X3RpY2tfY2VudGVyZWQpO1xuXHQgICAgICAgICAgICBpZiAoaXNFbXB0eShjb25maWcuYXhpc194X3RpY2tfY3VsbGluZykpIHtcblx0ICAgICAgICAgICAgICAgIGNvbmZpZy5heGlzX3hfdGlja19jdWxsaW5nID0gZmFsc2U7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9XG5cdFxuXHQgICAgICAgIHJldHVybiBheGlzO1xuXHQgICAgfTtcblx0ICAgIEF4aXMucHJvdG90eXBlLnVwZGF0ZVhBeGlzVGlja1ZhbHVlcyA9IGZ1bmN0aW9uIHVwZGF0ZVhBeGlzVGlja1ZhbHVlcyh0YXJnZXRzLCBheGlzKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcy5vd25lciwgY29uZmlnID0gJCQuY29uZmlnLCB0aWNrVmFsdWVzO1xuXHQgICAgICAgIGlmIChjb25maWcuYXhpc194X3RpY2tfZml0IHx8IGNvbmZpZy5heGlzX3hfdGlja19jb3VudCkge1xuXHQgICAgICAgICAgICB0aWNrVmFsdWVzID0gdGhpcy5nZW5lcmF0ZVRpY2tWYWx1ZXMoJCQubWFwVGFyZ2V0c1RvVW5pcXVlWHModGFyZ2V0cyksIGNvbmZpZy5heGlzX3hfdGlja19jb3VudCwgJCQuaXNUaW1lU2VyaWVzKCkpO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAoYXhpcykge1xuXHQgICAgICAgICAgICBheGlzLnRpY2tWYWx1ZXModGlja1ZhbHVlcyk7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgJCQueEF4aXMudGlja1ZhbHVlcyh0aWNrVmFsdWVzKTtcblx0ICAgICAgICAgICAgJCQuc3ViWEF4aXMudGlja1ZhbHVlcyh0aWNrVmFsdWVzKTtcblx0ICAgICAgICB9XG5c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JC5kZWZhdWx0QXJjVmFsdWVGb3JtYXQodmFsdWUsIHJhdGlvKTtcblx0ICAgIH07XG5cdFxuXHQgICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZXhwYW5kQXJjID0gZnVuY3Rpb24gKHRhcmdldElkcykge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsIGludGVydmFsO1xuXHRcblx0ICAgICAgICAvLyBNRU1POiBhdm9pZCB0byBjYW5jZWwgdHJhbnNpdGlvblxuXHQgICAgICAgIGlmICgkJC50cmFuc2l0aW5nKSB7XG5cdCAgICAgICAgICAgIGludGVydmFsID0gd2luZG93LnNldEludGVydmFsKGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgICAgIGlmICghJCQudHJhbnNpdGluZykge1xuXHQgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jbGVhckludGVydmFsKGludGVydmFsKTtcblx0ICAgICAgICAgICAgICAgICAgICBpZiAoJCQubGVnZW5kLnNlbGVjdEFsbCgnLmMzLWxlZ2VuZC1pdGVtLWZvY3VzZWQnKS5zaXplKCkgPiAwKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICQkLmV4cGFuZEFyYyh0YXJnZXRJZHMpO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgfSwgMTApO1xuXHQgICAgICAgICAgICByZXR1cm47XG5cdCAgICAgICAgfVxuXHRcblx0ICAgICAgICB0YXJnZXRJZHMgPSAkJC5tYXBUb1RhcmdldElkcyh0YXJnZXRJZHMpO1xuXHRcblx0ICAgICAgICAkJC5zdmcuc2VsZWN0QWxsKCQkLnNlbGVjdG9yVGFyZ2V0cyh0YXJnZXRJZHMsICcuJyArIENMQVNTLmNoYXJ0QXJjKSkuZWFjaChmdW5jdGlvbiAoZCkge1xuXHQgICAgICAgICAgICBpZiAoISAkJC5zaG91bGRFeHBhbmQoZC5kYXRhLmlkKSkgeyByZXR1cm47IH1cbl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sgfSlcblx0ICAgICAgICAgICAgLm9uKCdtb3VzZW92ZXInLCBjb25maWcuaW50ZXJhY3Rpb25fZW5hYmxlZCA/IGZ1bmN0aW9uIChkKSB7XG5cdCAgICAgICAgICAgICAgICB2YXIgdXBkYXRlZCwgYXJjRGF0YTtcblx0ICAgICAgICAgICAgICAgIGlmICgkJC50cmFuc2l0aW5nKSB7IC8vIHNraXAgd2hpbGUgdHJhbnNpdGluZ1xuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybjtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIHVwZGF0ZWQgPSAkJC51cGRhdGVBbmdsZShkKTtcblx0ICAgICAgICAgICAgICAgIGlmICh1cGRhdGVkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgYXJjRGF0YSA9ICQkLmNvbnZlcnRUb0FyY0RhdGEodXBkYXRlZCk7XG5cdCAgICAgICAgICAgICAgICAgICAgLy8gdHJhbnNpdGlvbnNcblx0ICAgICAgICAgICAgICAgICAgICAkJC5leHBhbmRBcmModXBkYXRlZC5kYXRhLmlkKTtcblx0ICAgICAgICAgICAgICAgICAgICAkJC5hcGkuZm9jdXModXBkYXRlZC5kYXRhLmlkKTtcblx0ICAgICAgICAgICAgICAgICAgICAkJC50b2dnbGVGb2N1c0xlZ2VuZCh1cGRhdGVkLmRhdGEuaWQsIHRydWUpO1xuXHQgICAgICAgICAgICAgICAgICAgICQkLmNvbmZpZy5kYXRhX29ubW91c2VvdmVyKGFyY0RhdGEsIHRoaXMpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9IDogbnVsbClcblx0ICAgICAgICAgICAgLm9uKCdtb3VzZW1vdmUnLCBjb25maWcuaW50ZXJhY3Rpb25fZW5hYmxlZCA/IGZ1bmN0aW9uIChkKSB7XG5cdCAgICAgICAgICAgICAgICB2YXIgdXBkYXRlZCA9ICQkLnVwZGF0ZUFuZ2xlKGQpLCBhcmNEYXRhLCBzZWxlY3RlZERhdGE7XG5cdCAgICAgICAgICAgICAgICBpZiAodXBkYXRlZCkge1xuXHQgICAgICAgICAgICAgICAgICAgIGFyY0RhdGEgPSAkJC5jb252ZXJ0VG9BcmNEYXRhKHVwZGF0ZWQpLFxuXHQgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkRGF0YSA9IFthcmNEYXRhXTtcblx0ICAgICAgICAgICAgICAgICAgICAkJC5zaG93VG9vbHRpcChzZWxlY3RlZERhdGEsIHRoaXMpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9IDogbnVsbClcblx0ICAgICAgICAgICAgLm9uKCdtb3VzZW91dCcsIGNvbmZpZy5pbnRlcmFjdGlvbl9lbmFibGVkID8gZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgIHZhciB1cGRhdGVkLCBhcmNEYXRhO1xuXHQgICAgICAgICAgICAgICAgaWYgKCQkLnRyYW5zaXRpbmcpIHsgLy8gc2tpcCB3aGlsZSB0cmFuc2l0aW5nXG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgdXBkYXRlZCA9ICQkLnVwZGF0ZUFuZ2xlKGQpO1xuXHQgICAgICAgICAgICAgICAgaWYgKHVwZGF0ZWQpIHtcblx0ICAgICAgICAgICAgICAgICAgICBhcmNEYXRhID0gJCQuY29udmVydFRvQXJjRGF0YSh1cGRhdGVkKTtcblx0ICAgICAgICAgICAgICAgICAgICAvLyB0cmFuc2l0aW9uc1xuXHQgICAgICAgICAgICAgICAgICAgICQkLnVuZXhwYW5kQXJjKHVwZGF0ZWQuZGF0YS5pZCk7XG5cdCAgICAgICAgICAgICAgICAgICAgJCQuYXBpLnJldmVydCgpO1xuXHQgICAgICAgICAgICAgICAgICAgICQkLnJldmVydExlZ2VuZCgpO1xuXHQgICAgICAgICAgICAgICAgICAgICQkLmhpZGVUb29sdGlwKCk7XG5cdCAgICAgICAgICAgICAgICAgICAgJCQuY29uZmlnLmRhdGFfb25tb3VzZW91dChhcmNEYXRhLCB0aGlzKTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgfSA6IG51bGwpXG5cdCAgICAgICAgICAgIC5vbignY2xpY2snLCBjb25maWcuaW50ZXJhY3Rpb25fZW5hYmxlZCA/IGZ1bmN0aW9uIChkLCBpKSB7XG5cdCAgICAgICAgICAgICAgICB2YXIgdXBkYXRlZCA9ICQkLnVwZGF0ZUFuZ2xlKGQpLCBhcmNEYXRhO1xuXHQgICAgICAgICAgICAgICAgaWYgKHVwZGF0ZWQpIHtcblx0ICAgICAgICAgICAgICAgICAgICBhcmNEYXRhID0gJCQuY29udmVydFRvQXJjRGF0YSh1cGRhdGVkKTtcblx0ICAgICAgICAgICAgICAgICAgICBpZiAoJCQudG9nZ2xlU2hhcGUpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgJCQudG9nZ2xlU2hhcGUodGhpcywgYXJjRGF0YSwgaSk7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgICQkLmNvbmZpZy5kYXRhX29uY2xpY2suY2FsbCgkJC5hcGksIGFyY0RhdGEsIHRoaXMpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9IDogbnVsbClcblx0ICAgICAgICAgICAgLmVhY2goZnVuY3Rpb24gKCkgeyAkJC50cmFuc2l0aW5nID0gdHJ1ZTsgfSlcblx0ICAgICAgICAgICAgLnRyYW5zaXRpb24oKS5kdXJhdGlvbihkdXJhdGlvbilcblx0ICAgICAgICAgICAgLmF0dHJUd2VlbihcImRcIiwgZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgIHZhciB1cGRhdGVkID0gJCQudXBkYXRlQW5nbGUoZCksIGludGVycG9sYXRlO1xuXHQgICAgICAgICAgICAgICAgaWYgKCEgdXBkYXRlZCkge1xuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoKSB7IHJldHVybiBcIk0gMCAwXCI7IH07XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICBpZiAodGhpcy5fY3VycmVudCA9PT0gZCkge1xuXHQgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnQgPSB7XG5cdCAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0QW5nbGU6IE1hdGguUEkqMixcblx0ICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgZW5kQW5nbGU6IE1hdGguUEkqMixcblx0ICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICB9O1xuXHQgICAgICAgICAgICAgICAgLy8gICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgaWYgKGlzTmFOKHRoaXMuX2N1cnJlbnQuc3RhcnRBbmdsZSkpIHtcblx0ICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50LnN0YXJ0QW5nbGUgPSAwO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgaWYgKGlzTmFOKHRoaXMuX2N1cnJlbnQuZW5kQW5nbGUpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudC5lbmRBbmdsZSA9IHRoaXMuX2N1cnJlbnQuc3RhcnRBbmdsZTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIGludGVycG9sYXRlID0gZDMuaW50ZXJwb2xhdGUodGhpcy5fY3VycmVudCwgdXBkYXRlZCk7XG5cdCAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50ID0gaW50ZXJwb2xhdGUoMCk7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKHQpIHtcblx0ICAgICAgICAgICAgICAgICAgICB2YXIgaW50Z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vdW5kKVxuXHQgICAgICAgICAgICAgICAgLmF0dHIoXCJkXCIsIGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgICAgICAgICB2YXIgZCA9IHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogW3t2YWx1ZTogY29uZmlnLmdhdWdlX21heH1dLFxuXHQgICAgICAgICAgICAgICAgICAgICAgICBzdGFydEFuZ2xlOiBjb25maWcuZ2F1Z2Vfc3RhcnRpbmdBbmdsZSxcblx0ICAgICAgICAgICAgICAgICAgICAgICAgZW5kQW5nbGU6IC0xICogY29uZmlnLmdhdWdlX3N0YXJ0aW5nQW5nbGVcblx0ICAgICAgICAgICAgICAgICAgICB9O1xuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiAkJC5nZXRBcmMoZCwgdHJ1ZSwgdHJ1ZSk7XG5cdCAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgJCQuYXJjcy5zZWxlY3QoJy4nICsgQ0xBU1MuY2hhcnRBcmNzR2F1Z2VVbml0KVxuXHQgICAgICAgICAgICAgICAgLmF0dHIoXCJkeVwiLCBcIi43NWVtXCIpXG5cdCAgICAgICAgICAgICAgICAudGV4dChjb25maWcuZ2F1Z2VfbGFiZWxfc2hvdyA/IGNvbmZpZy5nYXVnZV91bml0cyA6ICcnKTtcblx0ICAgICAgICAgICAgJCQuYXJjcy5zZWxlY3QoJy4nICsgQ0xBU1MuY2hhcnRBcmNzR2F1Z2VNaW4pXG5cdCAgICAgICAgICAgICAgICAuYXR0cihcImR4XCIsIC0xICogKCQkLmlubmVyUmFkaXVzICsgKCgkJC5yYWRpdXMgLSAkJC5pbm5lclJhZGl1cykgLyAoY29uZmlnLmdhdWdlX2Z1bGxDaXJjbGUgPyAxIDogMikpKSArIFwicHhcIilcblx0ICAgICAgICAgICAgICAgIC5hdHRyKFwiZHlcIiwgXCIxLjJlbVwiKVxuXHQgICAgICAgICAgICAgICAgLnRleHQoY29uZmlnLmdhdWdlX2xh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W5YKVxuXHQgICAgICAgICAgICAuYXR0cigneScsIG1pblkpXG5cdCAgICAgICAgICAgIC5hdHRyKCd3aWR0aCcsIG1heFggLSBtaW5YKVxuXHQgICAgICAgICAgICAuYXR0cignaGVpZ2h0JywgbWF4WSAtIG1pblkpO1xuXHQgICAgICAgIC8vIFRPRE86IGJpbmFyeSBzZWFyY2ggd2hlbiBtdWx0aXBsZSB4c1xuXHQgICAgICAgIG1haW4uc2VsZWN0QWxsKCcuJyArIENMQVNTLnNoYXBlcykuc2VsZWN0QWxsKCcuJyArIENMQVNTLnNoYXBlKVxuXHQgICAgICAgICAgICAuZmlsdGVyKGZ1bmN0aW9uIChkKSB7IHJldHVybiBjb25maWcuZGF0YV9zZWxlY3Rpb25faXNzZWxlY3RhYmxlKGQpOyB9KVxuXHQgICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAoZCwgaSkge1xuXHQgICAgICAgICAgICAgICAgdmFyIHNoYXBlID0gZDMuc2VsZWN0KHRoaXMpLFxuXHQgICAgICAgICAgICAgICAgICAgIGlzU2VsZWN0ZWQgPSBzaGFwZS5jbGFzc2VkKENMQVNTLlNFTEVDVEVEKSxcblx0ICAgICAgICAgICAgICAgICAgICBpc0luY2x1ZGVkID0gc2hhcGUuY2xhc3NlZChDTEFTUy5JTkNMVURFRCksXG5cdCAgICAgICAgICAgICAgICAgICAgX3gsIF95LCBfdywgX2gsIHRvZ2dsZSwgaXNXaXRoaW4gPSBmYWxzZSwgYm94O1xuXHQgICAgICAgICAgICAgICAgaWYgKHNoYXBlLmNsYXNzZWQoQ0xBU1MuY2lyY2xlKSkge1xuXHQgICAgICAgICAgICAgICAgICAgIF94ID0gc2hhcGUuYXR0cihcImN4XCIpICogMTtcblx0ICAgICAgICAgICAgICAgICAgICBfeSA9IHNoYXBlLmF0dHIoXCJjeVwiKSAqIDE7XG5cdCAgICAgICAgICAgICAgICAgICAgdG9nZ2xlID0gJCQudG9nZ2xlUG9pbnQ7XG5cdCAgICAgICAgICAgICAgICAgICAgaXNXaXRoaW4gPSBtaW5YIDwgX3ggJiYgX3ggPCBtYXhYICYmIG1pblkgPCBfeSAmJiBfeSA8IG1heFk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBlbHNlIGlmIChzaGFwZS5jbGFzc2VkKENMQVNTLmJhcikpIHtcblx0ICAgICAgICAgICAgICAgICAgICBib3ggPSBnZXRQYXRoQm94KHRoaXMpO1xuXHQgICAgICAgICAgICAgICAgICAgIF94ID0gYm94Lng7XG5cdCAgICAgICAgICAgICAgICAgICAgX3kgPSBib3gueTtcblx0ICAgICAgICAgICAgICAgICAgICBfdyA9IGJveC53aWR0aDtcblx0ICAgICAgICAgICAgICAgICAgICBfaCA9IGJveC5oZWlnaHQ7XG5cdCAgICAgICAgICAgICAgICAgICAgdG9nZ2xlID0gJCQudG9nZ2xlUGF0aDtcblx0ICAgICAgICAgICAgICAgICAgICBpc1dpdGhpbiA9ICEobWF4WCA8IF94IHx8IF94ICsgX3cgPCBtaW5YKSAmJiAhKG1heFkgPCBfeSB8fCBfeSArIF9oIDwgbWluWSk7XG5cdCAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgICAgIC8vIGxpbmUvYXJlYSBzZWxlY3Rpb24gbm90IHN1cHBvcnRlZCB5ZXRcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm47XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBpZiAoaXNXaXRoaW4gXiBpc0luY2x1ZGVkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgc2hhcGUuY2xhc3NlZChDTEFTUy5JTkNMVURFRCwgIWlzSW5jbHVkZWQpO1xuXHQgICAgICAgICAgICAgICAgICAgIC8vIFRPRE86IGluY2x1ZGVkL3VuaW5jbHVkZWQgY2FsbGJhY2sgaGVyZVxuXHQgICAgICAgICAgICAgICAgICAgIHNoYXBlLmNsYXNzZWQoQ0xBU1MuU0VMRUNURUQ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AgICAgICAvLy0tIExpbmUgLS0vL1xuXHQgICAgICAgICAgICBjb250ZXh0TGluZVVwZGF0ZSA9IGNvbnRleHQuc2VsZWN0KCcuJyArIENMQVNTLmNoYXJ0TGluZXMpLnNlbGVjdEFsbCgnLicgKyBDTEFTUy5jaGFydExpbmUpXG5cdCAgICAgICAgICAgICAgICAuZGF0YSh0YXJnZXRzKVxuXHQgICAgICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgY2xhc3NDaGFydExpbmUpO1xuXHQgICAgICAgICAgICBjb250ZXh0TGluZUVudGVyID0gY29udGV4dExpbmVVcGRhdGUuZW50ZXIoKS5hcHBlbmQoJ2cnKVxuXHQgICAgICAgICAgICAgICAgLnN0eWxlKCdvcGFjaXR5JywgMClcblx0ICAgICAgICAgICAgICAgIC5hdHRyKCdjbGFzcycsIGNsYXNzQ2hhcnRMaW5lKTtcblx0ICAgICAgICAgICAgLy8gTGluZXMgZm9yIGVhY2ggZGF0YVxuXHQgICAgICAgICAgICBjb250ZXh0TGluZUVudGVyLmFwcGVuZChcImdcIilcblx0ICAgICAgICAgICAgICAgIC5hdHRyKFwiY2xhc3NcIiwgY2xhc3NMaW5lcyk7XG5cdCAgICAgICAgICAgIC8vIEFyZWFcblx0ICAgICAgICAgICAgY29udGV4dExpbmVFbnRlci5hcHBlbmQoXCJnXCIpXG5cdCAgICAgICAgICAgICAgICAuYXR0cihcImNsYXNzXCIsIGNsYXNzQXJlYXMpO1xuXHRcblx0ICAgICAgICAgICAgLy8tLSBCcnVzaCAtLS8vXG5cdCAgICAgICAgICAgIGNvbnRleHQuc2VsZWN0QWxsKCcuJyArIENMQVNTLmJydXNoICsgJyByZWN0Jylcblx0ICAgICAgICAgICAgICAgIC5hdHRyKGNvbmZpZy5heGlzX3JvdGF0ZWQgPyBcIndpZHRoXCIgOiBcImhlaWdodFwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gJCQud2lkdGgyIDogJCQuaGVpZ2h0Mik7XG5cdCAgICAgICAg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CgkJC5nZXRYRG9tYWluKCQkLmRhdGEudGFyZ2V0cykpIDogY29uZmlnLmF4aXNfeF9leHRlbnQ7XG5cdCAgICAgICAgaWYgKCQkLmlzVGltZVNlcmllcygpKSB7XG5cdCAgICAgICAgICAgIGV4dGVudCA9IFskJC5wYXJzZURhdGUoZXh0ZW50WzBdKSwgJCQucGFyc2VEYXRlKGV4dGVudFsxXSldO1xuXHQgICAgICAgIH1cblx0ICAgICAgICByZXR1cm4gZXh0ZW50O1xuXHQgICAgfTtcblx0XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5pbml0Wm9vbSA9IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLCBkMyA9ICQkLmQzLCBjb25maWcgPSAkJC5jb25maWcsIHN0YXJ0RXZlbnQ7XG5cdFxuXHQgICAgICAgICQkLnpvb20gPSBkMy5iZWhhdmlvci56b29tKClcblx0ICAgICAgICAgICAgLm9uKFwiem9vbXN0YXJ0XCIsIGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgICAgIHN0YXJ0RXZlbnQgPSBkMy5ldmVudC5zb3VyY2VFdmVudDtcblx0ICAgICAgICAgICAgICAgICQkLnpvb20uYWx0RG9tYWluID0gZDMuZXZlbnQuc291cmNlRXZlbnQuYWx0S2V5ID8gJCQueC5vcmdEb21haW4oKSA6IG51bGw7XG5cdCAgICAgICAgICAgICAgICBjb25maWcuem9vbV9vbnpvb21zdGFydC5jYWxsKCQkLmFwaSwgZDMuZXZlbnQuc291cmNlRXZlbnQpO1xuXHQgICAgICAgICAgICB9KVxuXHQgICAgICAgICAgICAub24oXCJ6b29tXCIsIGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgICAgICQkLnJlZHJhd0Zvclpvb20uY2FsbCgkJCk7XG5cdCAgICAgICAgICAgIH0pXG5cdCAgICAgICAgICAgIC5vbignem9vbWVuZCcsIGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICAgICAgICAgIHZhciBldmVudCA9IGQzLmV2ZW50LnNvdXJjZUV2ZW50O1xuXHQgICAgICAgICAgICAgICAgLy8gaWYgY2xpY2ssIGRvIG5vdGhpbmcuIG90aGVyd2lzZSwgY2xpY2sgaW50ZXJhY3Rpb24gd2lsbCBiZSBjYW5jZWxlZC5cblx0ICAgICAgICAgICAgICAgIGlmIChldmVudCAmJiBzdGFydEV2ZW50LmNsaWVudFggPT09IGV2ZW50LmNsaWVudFggJiYgc3RhcnRFdmVudC5jbGllbnRZID09PSBldmVudC5jbGllbnRZKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgJCQucmVkcmF3RXZlbnRSZWN0KCk7XG5cdCAgICAgICAgICAgICAgICAkJC51cGRhdGVab29tKCk7XG5cdCAgICAgICAgICAgICAgICBjb25maWcuem9vbV9vbnpvb21lbmQuY2FsbCgkJC5hcGksICQkLngub3JnRG9tYWluKCkpO1xuXHQgICAgICAgICAgICB9KTtcblx0ICAgICAgICAkJC56b29tLnNjYWxlID0gZnVuY3Rpb24gKHNjYWxlKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBjb25maWcuYXhpc19yb3RhdGVkID8gdGhpcy55KHNjYWxlKSA6IHRoaXMueChzY2FsZSk7XG5cdCAgICAgICAgfTtcblx0ICAgICAgICAkJC56b29tLm9yZ1NjYWxlRXh0ZW50ID0gZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICB2YXIgZXh0ZW50ID0gY29uZmlnLnpvb21fZXh0ZW50ID8gY29uZmlnLnpvb21fZXh0ZW50IDogWzEsIDEwXTtcblx0ICAgICAgICAgICAgcmV0dXJuIFtleHRlbnRbMF0sIE1hdGgubWF4KCQkLmdldE1heERhdGFDb3VudCgpIC8gZXh0ZW50WzFdLCBleHRlbnRbMV0pXTtcblx0ICAgICAgICB9O1xuXHQgICAgICAgICQkLnpvb20udXBkYXRlU2NhbGVFeHRlbnQgPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgIHZhciByYXRpbyA9IGRpZmZEb21haW4oJCQueC5vcmdEb21haW4oKSkgLyBkaWZmRG9tYWluKCQkLmdldFpvb21Eb21haW4oKSksXG5cdCAgICAgICAgICAgICAgICBleHRlbnQgPSB0aGlzLm9yZ1NjYWxlRXh0ZW50KCk7XG5cdCAgICAgICAgICAgIHRoaXMuc2NhbGVFeHRlbnQoW2V4dGVudFswXSAqIHJhdGlvLCBleHRlbnRbMV0gKiByYXRpb10pO1xuXHQgICAgICAgICAgICByZXR1cm4gdGhpcztcblx0ICAgICAgICB9O1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldFpvb21Eb21haW4gPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLCBkMyA9ICQkLmQzLFxuXHQgICAgICAgICAgICBtaW4gPSBkMy5taW4oWyQkLm9yZ1hEb21haW5bMF0sIGNvbmZpZy56b29tX3hfbWluXSksXG5cdCAgICAgICAgICAgIG1heCA9IGQzLm1heChbJCQub3JnWERvbWFpblsxXSwgY29uZmlnLnpvb21feF9tYXhdKTtcblx0ICAgICAgICByZXR1cm4gW21pbiwgbWF4XTtcblx0ICAgIH07XG5cdCAgICBjM19jaGFydF9pbnRlcm5hbF9mbi51cGRhdGVab29tID0gZnVuY3Rpb24gKCkge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMsIHogPSAkJC5jb25maWcuem9vbV9lbmFibGVkID8gJCQuem9vbSA6IGZ1bmN0aW9uICgpIHt9O1xuXHQgICAgICAgICQkLm1haW4uc2VsZWN0KCcuJyArIENMQVNTLnpvb21SZWN0KS5jYWxsKHopLm9uKFwiZGJsY2xpY2suem9vbVwiLCBudWxsKTtcblx0ICAgICAgICAkJC5tYWluLnNlbGVjdEFsbCgnLicgKyBDTEFTUy5ldmVudFJlY3QpLmNhbGwoeikub24oXCJkYmxjbGljay56b29tXCIsIG51bGwpO1xuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnJlZHJhd0Zvclpvb20gPSBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgdmFyICQkID0gdGhpcywgZDMgPSAkJC5kMywgY29uZmlnID0gJCQuY29uZmlnLCB6b29tID0gJCQuem9vbSwgeCA9ICQkLng7XG5cdCAgICAgICAgaWYgKCFjb25maWcuem9vbV9lbmFibGVkKSB7XG5cdCAgICAgICAgICAgIHJldHVybjtcblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKCQkLmZpbHRlclRhcmdldHNUb1Nob3coJCQuZGF0YS50YXJnZXRzKS5sZW5ndGggPT09IDApIHtcblx0ICAgICAgICAgICAgcmV0dXJuO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBpZiAoZDMuZXZlbnQuc291cmNlRXZlbnQudHlwZSA9PT0gJ21vdXNlbW92ZScgJiYgem9vbS5hbHREb21haW4pIHtcblx0ICAgICAgICAgICAgeC5kb21haW4oem9vbS5hbHREb21haW4pO1xuXHQgICAgICAgICAgICB6b29tLnNjYWxlKHgpLnVwZGF0ZVNjYWxlRXh0ZW50KCk7XG5cdCAgICAgICAgICAgIHJldHVybjtcblx0ICAgICAgICB9XG5cdCAgICAgICAgaWYgKCQkLmlzQ2F0ZWdvcml6ZWQoKSAmJiB4Lm9yZ0RvbWFpbigpWzBdID09PSAkJC5vcmdYRG9tYWluWzBdKSB7XG5cdCAgICAgICAgICAgIHguZG9tYWluKFskJC5vcmdYRG9tYWluWzBdIC0gMWUtMTAsIHgub3JnRG9tYWluKClbMV1dKTtcblx0ICAgICAgICB9XG5cdCAgICAgICAgJCQucmVkcmF3KHtcblx0ICAgICAgICAgICAgd2l0aFRyYW5zaXRpb246IGZhbHNlLFxuXHQgICAgICAgICAgICB3aXRoWTogY29uZmlnLnpvb21fcmVzY2FsZSxcblx0ICAgICAgICAgICAgd2l0aFN1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WcsIGQzID0gJCQuZDM7XG5cdCAgICAgICAgaWYgKG1pbiA9PT0gMCB8fCBtaW4pIHtcblx0ICAgICAgICAgICAgY29uZmlnLnpvb21feF9taW4gPSBkMy5taW4oWyQkLm9yZ1hEb21haW5bMF0sIG1pbl0pO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBlbHNlIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGNvbmZpZy56b29tX3hfbWluO1xuXHQgICAgICAgIH1cblx0ICAgIH07XG5cdFxuXHQgICAgYzNfY2hhcnRfZm4uem9vbS5yYW5nZSA9IGZ1bmN0aW9uIChyYW5nZSkge1xuXHQgICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoKSB7XG5cdCAgICAgICAgICAgIGlmIChpc0RlZmluZWQocmFuZ2UubWF4KSkgeyB0aGlzLmRvbWFpbi5tYXgocmFuZ2UubWF4KTsgfVxuXHQgICAgICAgICAgICBpZiAoaXNEZWZpbmVkKHJhbmdlLm1pbikpIHsgdGhpcy5kb21haW4ubWluKHJhbmdlLm1pbik7IH1cblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4ge1xuXHQgICAgICAgICAgICAgICAgbWF4OiB0aGlzLmRvbWFpbi5tYXgoKSxcblx0ICAgICAgICAgICAgICAgIG1pbjogdGhpcy5kb21haW4ubWluKClcblx0ICAgICAgICAgICAgfTtcblx0ICAgICAgICB9XG5cdCAgICB9O1xuXHRcblx0ICAgIGMzX2NoYXJ0X2ZuLmxvYWQgPSBmdW5jdGlvbiAoYXJncykge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMuaW50ZXJuYWwsIGNvbmZpZyA9ICQkLmNvbmZpZztcblx0ICAgICAgICAvLyB1cGRhdGUgeHMgaWYgc3BlY2lmaWVkXG5cdCAgICAgICAgaWYgKGFyZ3MueHMpIHtcblx0ICAgICAgICAgICAgJCQuYWRkWHMoYXJncy54cyk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIC8vI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CAgICAgICAgICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IGxlbmd0aDsgaisrKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldHNbaV0udmFsdWVzW2pdLmluZGV4ID0gdGFpbCArIGo7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGlmICghJCQuaXNUaW1lU2VyaWVzKCkpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldHNbaV0udmFsdWVzW2pdLnggPSB0YWlsICsgajtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICB0LnZhbHVlcyA9IHQudmFsdWVzLmNvbmNhdCh0YXJnZXRzW2ldLnZhbHVlcyk7XG5cdFxuXHQgICAgICAgICAgICAgICAgICAgIHRhcmdldHMuc3BsaWNlKGksIDEpO1xuXHQgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIGlmICghZm91bmQpIHsgbm90Zm91bmRJZHMucHVzaCh0LmlkKTsgfVxuXHQgICAgICAgIH0pO1xuXHRcblx0ICAgICAgICAvLyBBcHBlbmQgbnVsbCBmb3Igbm90IGZvdW5kIHRhcmdldHNcblx0ICAgICAgICAkJC5kYXRhLnRhcmdldHMuZm9yRWFjaChmdW5jdGlvbiAodCkge1xuXHQgICAgICAgICAgICB2YXIgaSwgajtcblx0ICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IG5vdGZvdW5kSWRzLmxlbmd0aDsgaSsrKSB7XG5cdCAgICAgICAgICAgICAgICBpZiAodC5pZCA9PT0gbm90Zm91bmRJZHNbaV0pIHtcblx0ICAgICAgICAgICAgICAgICAgICB0YWlsID0gdC52YWx1ZXNbdC52YWx1ZXMubGVuZ3RoIC0gMV0uaW5kZXggKyAxO1xuXHQgICAgICAgICAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBsZW5ndGg7IGorKykge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0LnZhbHVlcy5wdXNoKHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiB0LmlkLFxuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IHRhaWwgKyBqLFxuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgeDogJCQuaXNUaW1lU2VyaWVzKCkgPyAkJC5nZXRPdGhlclRhcmdldFgodGFpbCArIGopIDogdGFpbCArIGosXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogbnVsbFxuXHQgICAgICAgICAgICAgICAgICAgICAgICB9KTtcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICB9KTtcblx0XG5cdCAgICAgICAgLy8gR2VuZXJhdGUgbnVsbCB2YWx1ZXMgZm9yIG5ldyB0YXJnZXRcblx0ICAgICAgICBpZiAoJCQuZGF0YS50YXJnZXRzLmxlbmd0aCkge1xuXHQgICAgICAgICAgICB0YXJnZXRzLmZvckVhY2goZnVuY3Rpb24gKHQpIHtcblx0ICAgICAgICAgICAgICAgIHZhciBpLCBtaXNzaW5nID0gW107XG5cdCAgICAgICAgICAgICAgICBmb3IgKGkgPSAkJC5kYXRhLnRhcmdldHNbMF0udmFsdWVzWzBdLmluZGV4OyBpIDwgdGFpbDsgaSsrKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgbWlzc2luZy5wdXNoKHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHQuaWQsXG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpLFxuXHQgICAgICAgICAgICAgICAgICAgICAgICB4OiAkJC5pc1RpbWVTZXJpZXMoKSA/ICQkLmdldE90aGVyVGFyZ2V0WChpKSA6IGksXG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBudWxsXG5cdCAgICAgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICB0LnZhbHVlcy5mb3JFYWNoKGZ1bmN0aW9uICh2KSB7XG5cdCAgICAgICAgICAgICAgICAgICAgdi5pbmRleCArPSB0YWlsO1xuXHQgICAgICAgICAgICAgICAgICAgIGlmICghJCQuaXNUaW1lU2VyaWVzKCkpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdi54ICs9IHRhaWw7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgICAgICB0LnZhbHVlcyA9IG1pc3NpbmcuY29uY2F0KHQudmFsdWVzKTtcblx0ICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgICQkLmRhdGEudGFyZ2V0cyA9ICQkLmRhdGEudGFyZ2V0cy5jb25jYXQodGFyZ2V0cyk7IC8vIGFkZCByZW1haW5lZFxuXHRcblx0ICAgICAgICAvLyBjaGVjayBkYXRhIGNvdW50IGJlY2F1c2UgYmVoYXZpb3IgbmVlZHMgdG8gY2hhbmdlIHdoZW4gaXQncyBvbmx5IG9uZVxuXHQgICAgICAgIGRhdGFDb3VudCA9ICQkLmdldE1heERhdGFDb3VudCgpO1xuXHQgICAgICAgIGJhc2VUYXJnZXQgPSAkJC5kYXRhLnRhcmdldHNbMF07XG5cdCAgICAgICAgYmFzZVZhbHVlID0gYmFzZVRhcmdldC52YWx1ZXNbMF07XG5cdFxuXHQgICAgICAgIC8vIFVwZGF0ZSBsZW5ndGggdG8gZmxvdyBpZiBuZWVkZWRcblx0ICAgICAgICBpZiAoaXNEZWZpbmVkKGFyZ3MudG8pKSB7XG5cdCAgICAgICAgICAgIGxlbmd0aCA9IDA7XG5cdCAgICAgICAgICAgIHRvID0gJCQuaXNUaW1lU2VyaWVzKCkgPyAkJC5wYXJzZURhdGUoY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MSwgdHJhbnNmb3JtLFxuXHQgICAgICAgICAgICAgICAgZmxvd0luZGV4ID0gZmxvdy5pbmRleCxcblx0ICAgICAgICAgICAgICAgIGZsb3dMZW5ndGggPSBmbG93Lmxlbmd0aCxcblx0ICAgICAgICAgICAgICAgIGZsb3dTdGFydCA9ICQkLmdldFZhbHVlT25JbmRleCgkJC5kYXRhLnRhcmdldHNbMF0udmFsdWVzLCBmbG93SW5kZXgpLFxuXHQgICAgICAgICAgICAgICAgZmxvd0VuZCA9ICQkLmdldFZhbHVlT25JbmRleCgkJC5kYXRhLnRhcmdldHNbMF0udmFsdWVzLCBmbG93SW5kZXggKyBmbG93TGVuZ3RoKSxcblx0ICAgICAgICAgICAgICAgIG9yZ0RvbWFpbiA9ICQkLnguZG9tYWluKCksIGRvbWFpbixcblx0ICAgICAgICAgICAgICAgIGR1cmF0aW9uRm9yRmxvdyA9IGZsb3cuZHVyYXRpb24gfHwgZHVyYXRpb24sXG5cdCAgICAgICAgICAgICAgICBkb25lID0gZmxvdy5kb25lIHx8IGZ1bmN0aW9uICgpIHt9LFxuXHQgICAgICAgICAgICAgICAgd2FpdCA9ICQkLmdlbmVyYXRlV2FpdCgpO1xuXHRcblx0ICAgICAgICAgICAgdmFyIHhncmlkID0gJCQueGdyaWQgfHwgZDMuc2VsZWN0QWxsKFtdKSxcblx0ICAgICAgICAgICAgICAgIHhncmlkTGluZXMgPSAkJC54Z3JpZExpbmVzIHx8IGQzLnNlbGVjdEFsbChbXSksXG5cdCAgICAgICAgICAgICAgICBtYWluUmVnaW9uID0gJCQubWFpblJlZ2lvbiB8fCBkMy5zZWxlY3RBbGwoW10pLFxuXHQgICAgICAgICAgICAgICAgbWFpblRleHQgPSAkJC5tYWluVGV4dCB8fCBkMy5zZWxlY3RBbGwoW10pLFxuXHQgICAgICAgICAgICAgICAgbWFpbkJhciA9ICQkLm1haW5CYXIgfHwgZDMuc2VsZWN0QWxsKFtdKSxcblx0ICAgICAgICAgICAgICAgIG1haW5Ma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ICAgICAgICAgICAgICAgICAgdHJhbnNsYXRlWCA9ICQkLngob3JnRG9tYWluWzBdKSAtICQkLngoZG9tYWluWzBdKTtcblx0ICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKCQkLmlzVGltZVNlcmllcygpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGZsb3dTdGFydCA9ICQkLmdldFZhbHVlT25JbmRleCgkJC5kYXRhLnRhcmdldHNbMF0udmFsdWVzLCAwKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgZmxvd0VuZCA9ICQkLmdldFZhbHVlT25JbmRleCgkJC5kYXRhLnRhcmdldHNbMF0udmFsdWVzLCAkJC5kYXRhLnRhcmdldHNbMF0udmFsdWVzLmxlbmd0aCAtIDEpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2xhdGVYID0gJCQueChmbG93U3RhcnQueCkgLSAkJC54KGZsb3dFbmQueCk7XG5cdCAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNsYXRlWCA9IGRpZmZEb21haW4oZG9tYWluKSAvIDI7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9IGVsc2UgaWYgKGZsb3cub3JnRGF0YUNvdW50ID09PSAxIHx8IChmbG93U3RhcnQgJiYgZmxvd1N0YXJ0LngpID09PSAoZmxvd0VuZCAmJiBmbG93RW5kLngpKSB7XG5cdCAgICAgICAgICAgICAgICB0cmFuc2xhdGVYID0gJCQueChvcmdEb21haW5bMF0pIC0gJCQueChkb21haW5bMF0pO1xuXHQgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgaWYgKCQkLmlzVGltZVNlcmllcygpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgdHJhbnNsYXRlWCA9ICgkJC54KG9yZ0RvbWFpblsw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Zm9ybSkpO1xuXHQgICAgICAgICAgICAgICAgd2FpdC5hZGQobWFpblRleHQudHJhbnNpdGlvbigpLmF0dHIoJ3RyYW5zZm9ybScsIHRyYW5zZm9ybSkpO1xuXHQgICAgICAgICAgICAgICAgd2FpdC5hZGQobWFpblJlZ2lvbi5maWx0ZXIoJCQuaXNSZWdpb25PblgpLnRyYW5zaXRpb24oKS5hdHRyKCd0cmFuc2Zvcm0nLCB0cmFuc2Zvcm0pKTtcblx0ICAgICAgICAgICAgICAgIHdhaXQuYWRkKHhncmlkLnRyYW5zaXRpb24oKS5hdHRyKCd0cmFuc2Zvcm0nLCB0cmFuc2Zvcm0pKTtcblx0ICAgICAgICAgICAgICAgIHdhaXQuYWRkKHhncmlkTGluZXMudHJhbnNpdGlvbigpLmF0dHIoJ3RyYW5zZm9ybScsIHRyYW5zZm9ybSkpO1xuXHQgICAgICAgICAgICB9KVxuXHQgICAgICAgICAgICAuY2FsbCh3YWl0LCBmdW5jdGlvbiAoKSB7XG5cdCAgICAgICAgICAgICAgICB2YXIgaSwgc2hhcGVzID0gW10sIHRleHRzID0gW10sIGV2ZW50UmVjdHMgPSBbXTtcblx0XG5cdCAgICAgICAgICAgICAgICAvLyByZW1vdmUgZmxvd2VkIGVsZW1lbnRzXG5cdCAgICAgICAgICAgICAgICBpZiAoZmxvd0xlbmd0aCkge1xuXHQgICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBmbG93TGVuZ3RoOyBpKyspIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgc2hhcGVzLnB1c2goJy4nICsgQ0xBU1Muc2hhcGUgKyAnLScgKyAoZmxvd0luZGV4ICsgaSkpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0cy5wdXNoKCcuJyArIENMQVNTLnRleHQgKyAnLScgKyAoZmxvd0luZGV4ICsgaSkpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBldmVudFJlY3RzLnB1c2goJy4nICsgQ0xBU1MuZXZlbnRSZWN0ICsgJy0nICsgKGZsb3dJbmRleCArIGkpKTtcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgJCQuc3ZnLnNlbGVjdEFsbCgnLicgKyBDTEFTUy5zaGFwZXMpLnNlbGVjdEFsbChzaGFwZXMpLnJlbW92ZSgpO1xuXHQgICAgICAgICAgICAgICAgICAgICQkLnN2Zy5zZWxlY3RBbGwoJy4nICsgQ0xBU1MudGV4dHMpLnNlbGVjdEFsbCh0ZXh0cykucmVtb3ZlKCk7XG5cdCAgICAgICAgICAgICAgICAgICAgJCQuc3ZnLnNlbGVjdEFsbCgnLicgKyBDTEFTUy5ldmVudFJlY3RzKS5zZWxlY3RBbGwoZXZlbnRSZWN0cykucmVtb3ZlKCk7XG5cdCAgICAgICAgICAgICAgICAgICAgJCQuc3ZnLnNlbGVjdCgnLicgKyBDTEFTUy54Z3JpZCkucmVtb3ZlKCk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgICAgLy8gZHJhdyBhZ2FpbiBmb3IgcmVtb3ZpbmcgZmxvd2VkIGVsZW1lbnRzIGFuZCByZXZlcnRpbmcgYXR0clxuXHQgICAgICAgICAgICAgICAgeGdyaWRcblx0ICAgICAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgbnVsbClcblx0ICAgICAgICAgICAgICAgICAgICAuYXR0cigkJC54Z3JpZEF0dHIpO1xuXHQgICAgICAgICAgICAgICAgeGdyaWRMaW5lc1xuXHQgICAgICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCBudWxsKTtcblx0ICAgICAgICAgICAgICAgIHhncmlkTGluZXMuc2VsZWN0KCdsaW5lJylcblx0ICAgICAgICAgICAgICAgICAgICAuYXR0cihcIngxXCIsIGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAwIDogeHYpXG5cdCAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJ4MlwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gJCQud2lkdGggOiB4dik7XG5cdCAgICAgICAgICAgICAgICB4Z3JpZExpbmVzLnNlbGVjdCgndGV4dCcpXG5cdCAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJ4XCIsIGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAkJC53aWR0aCA6IDApXG5cdCAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJ5XCIsIHh2KTtcblx0ICAgICAgICAgICAgICAgIG1haW5CYXJcblx0ICAgICAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgbnVsbClcblx0ICAgICAgICAgICAgICAgICAgICAuYXR0cihcImRcIiwgZHJhd0Jhcik7XG5cdCAgICAgICAgICAgICAgICBtYWluTGluZVxuXHQgICAgICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCBudWxsKVxuXHQgICAgICAgICAgICAgICAgICAgIC5hdHRyKFwiZFwiLCBkcmF3TGluZSk7XG5cdCAgICAgICAgICAgICAgICBtYWluQXJlYVxuXHQgICAgICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCBudWxsKVxuXHQgICAgICAgICAgICAgICAgICAgIC5hdHRyKFwiZFwiLCBkcmF3QXJlYSk7XG5cdCAgICAgICAgICAgICAgICBtYWluQ2lyY2xlXG5cdCAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIG51bGwpXG5cdCAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJjeFwiLCBjeClcblx0ICAgICAgICAgICAgICAgICAgICAuYXR0cihcImN5XCIsIGN5KTtcblx0ICAgICAgICAgICAgICAgIG1haW5UZXh0XG5cdCAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIG51bGwpXG5cdCAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3gnLCB4Rm9yVGV4dClcblx0ICAgICAgICAgICAgICAgICAgICAuYXR0cigneScsIHlGb3JUZXh0KVxuXHQgICAgICAgICAgICAgICAgICAgIC5zdHlsZSgnZmlsbC1vcGFjaXR5JywgJCQub3BhY2l0eUZvclRleHQuYmluZCgkJCkpO1xuXHQgICAgICAgICAgICAgICAgbWFpblJlZ2lvblxuXHQgICAgICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCBudWxsKTtcblx0ICAgICAgICAgICAgICAgIG1haW5SZWdpb24uc2VsZWN0KCdyZWN0JykuZmlsdGVyKCQkLmlzUmVnaW9uT25YKVxuXHQgICAgICAgICAgICAgICAgICAgIC5hdHRyKFwieFwiLCAkJC5yZWdpb25YLmJpbmQoJCQpKVxuXHQgICAgICAgICAgICAgICAgICAgIC5hdHRyKFwid2lkdGhcIiwgJCQucmVnaW9uV2lkdGguYmluZCgkJCkpO1xuXHRcblx0ICAgICAgICAgICAgICAgIGlmIChjb25maWcuaW50ZXJhY3Rpb25fZW5hYmxlZCkge1xuXHQgICAgICAgICAgICAgICAgICAgICQkLnJlZHJhd0V2ZW50UmVjdCgpO1xuXHQgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgICAgIC8vIGNhbGxiYWNrIGZvciBlbmQgb2YgZmxvd1xuXHQgICAgICAgICAgICAgICAgZG9uZSgpO1xuXHRcblx0ICAgICAgICAgICAgICAgICQkLmZsb3dpbmcgPSBmYWxzZTtcblx0ICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgfTtcblx0ICAgIH07XG5cdFxuXHQgICAgYzNfY2hhcnRfZm4uc2VsZWN0ZWQgPSBmdW5jdGlvbiAodGFyZ2V0SWQpIHtcblx0ICAgICAgICB2YXIgJCQgPSB0aGlzLmludGVybmFsLCBkMyA9ICQkLmQzO1xuXHQgICAgICAgIHJldHVybiBkMy5tZXJnZShcblx0ICAgICAgICAgICAgJCQubWFpbi5zZWxlY3RBbGwoJy4nICsgQ0xBU1Muc2hhcGVzICsgJCQuZ2V0VGFyZ2V0U2VsZWN0b3JTdW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gICAgIGlmIChpc1ZhbHVlKG1heC54KSkgeyBjb25maWcuYXhpc194X21heCA9IG1heC54OyB9XG5cdCAgICAgICAgICAgICAgICBpZiAoaXNWYWx1ZShtYXgueSkpIHsgY29uZmlnLmF4aXNfeV9tYXggPSBtYXgueTsgfVxuXHQgICAgICAgICAgICAgICAgaWYgKGlzVmFsdWUobWF4LnkyKSkgeyBjb25maWcuYXhpc195Ml9tYXggPSBtYXgueTI7IH1cblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIGNvbmZpZy5heGlzX3lfbWF4ID0gY29uZmlnLmF4aXNfeTJfbWF4ID0gbWF4O1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICQkLnJlZHJhdyh7d2l0aFVwZGF0ZU9yZ1hEb21haW46IHRydWUsIHdpdGhVcGRhdGVYRG9tYWluOiB0cnVlfSk7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgcmV0dXJuIHtcblx0ICAgICAgICAgICAgICAgIHg6IGNvbmZpZy5heGlzX3hfbWF4LFxuXHQgICAgICAgICAgICAgICAgeTogY29uZmlnLmF4aXNfeV9tYXgsXG5cdCAgICAgICAgICAgICAgICB5MjogY29uZmlnLmF4aXNfeTJfbWF4XG5cdCAgICAgICAgICAgIH07XG5cdCAgICAgICAgfVxuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ZuLmF4aXMubWluID0gZnVuY3Rpb24gKG1pbikge1xuXHQgICAgICAgIHZhciAkJCA9IHRoaXMuaW50ZXJuYWwsIGNvbmZpZyA9ICQkLmNvbmZpZztcblx0ICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCkge1xuXHQgICAgICAgICAgICBpZiAodHlwZW9mIG1pbiA9PT0gJ29iamVjdCcpIHtcblx0ICAgICAgICAgICAgICAgIGlmIChpc1ZhbHVlKG1pbi54KSkgeyBjb25maWcuYXhpc194X21pbiA9IG1pbi54OyB9XG5cdCAgICAgICAgICAgICAgICBpZiAoaXNWYWx1ZShtaW4ueSkpIHsgY29uZmlnLmF4aXNfeV9taW4gPSBtaW4ueTsgfVxuXHQgICAgICAgICAgICAgICAgaWYgKGlzVmFsdWUobWluLnkyKSkgeyBjb25maWcuYXhpc195Ml9taW4gPSBtaW4ueTI7IH1cblx0ICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgIGNvbmZpZy5heGlzX3lfbWluID0gY29uZmlnLmF4aXNfeTJfbWluID0gbWluO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICQkLnJlZHJhdyh7d2l0aFVwZGF0ZU9yZ1hEb21haW46IHRydWUsIHdpdGhVcGRhdGVYRG9tYWluOiB0cnVlfSk7XG5cdCAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgcmV0dXJuIHtcblx0ICAgICAgICAgICAgICAgIHg6IGNvbmZpZy5heGlzX3hfbWluLFxuXHQgICAgICAgICAgICAgICAgeTogY29uZmlnLmF4aXNfeV9taW4sXG5cdCAgICAgICAgICAgICAgICB5MjogY29uZmlnLmF4aXNfeTJfbWluXG5cdCAgICAgICAgICAgIH07XG5cdCAgICAgICAgfVxuXHQgICAgfTtcblx0ICAgIGMzX2NoYXJ0X2ZuLmF4aXMucmFuZ2UgPSBmdW5jdGlvbiAocmFuZ2UpIHtcblx0ICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCkge1xuXHQgICAgICAgICAgICBpZiAoaXNEZWZpbmVkKHJhbmdlLm1heCkpIHsgdGhpcy5heGlzLm1heChyYW5nZS5tYXgpOyB9XG5cdCAgICAgICAgICAgIGlmIChpc0RlZmluZWQocmFuZ2UubWluKSkgeyB0aGlzLmF4aXMubWluKHJhbmdlLm1pbik7IH1cblx0ICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICByZXR1cm4ge1xuXHQgICAgICAgICAgICAgICAgbWF4OiB0aGlzLmF4aXMubWF4KCksXG5cdCAgICAgICAgICAgIC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XHQgICAgICAgIG91dGVyVGlja1NpemUgPSBwYXJhbXMud2l0aE91dGVyVGljayA/IDYgOiAwO1xuXHRcblx0ICAgICAgICBmdW5jdGlvbiBheGlzWChzZWxlY3Rpb24sIHgpIHtcblx0ICAgICAgICAgICAgc2VsZWN0aW9uLmF0dHIoXCJ0cmFuc2Zvcm1cIiwgZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgIHJldHVybiBcInRyYW5zbGF0ZShcIiArIE1hdGguY2VpbCh4KGQpICsgdGlja09mZnNldCkgKyBcIiwgMClcIjtcblx0ICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGZ1bmN0aW9uIGF4aXNZKHNlbGVjdGlvbiwgeSkge1xuXHQgICAgICAgICAgICBzZWxlY3Rpb24uYXR0cihcInRyYW5zZm9ybVwiLCBmdW5jdGlvbiAoZCkge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIFwidHJhbnNsYXRlKDAsXCIgKyBNYXRoLmNlaWwoeShkKSkgKyBcIilcIjtcblx0ICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGZ1bmN0aW9uIHNjYWxlRXh0ZW50KGRvbWFpbikge1xuXHQgICAgICAgICAgICB2YXIgc3RhcnQgPSBkb21haW5bMF0sIHN0b3AgPSBkb21haW5bZG9tYWluLmxlbmd0aCAtIDFdO1xuXHQgICAgICAgICAgICByZXR1cm4gc3RhcnQgPCBzdG9wID8gWyBzdGFydCwgc3RvcCBdIDogWyBzdG9wLCBzdGFydCBdO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBmdW5jdGlvbiBnZW5lcmF0ZVRpY2tzKHNjYWxlKSB7XG5cdCAgICAgICAgICAgIHZhciBpLCBkb21haW4sIHRpY2tzID0gW107XG5cdCAgICAgICAgICAgIGlmIChzY2FsZS50aWNrcykge1xuXHQgICAgICAgICAgICAgICAgcmV0dXJuIHNjYWxlLnRpY2tzLmFwcGx5KHNjYWxlLCB0aWNrQXJndW1lbnRzKTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBkb21haW4gPSBzY2FsZS5kb21haW4oKTtcblx0ICAgICAgICAgICAgZm9yIChpID0gTWF0aC5jZWlsKGRvbWFpblswXSk7IGkgPCBkb21haW5bMV07IGkrKykge1xuXHQgICAgICAgICAgICAgICAgdGlja3MucHVzaChpKTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICBpZiAodGlja3MubGVuZ3RoID4gMCAmJiB0aWNrc1swXSA+IDApIHtcblx0ICAgICAgICAgICAgICAgIHRpY2tzLnVuc2hpZnQodGlja3NbMF0gLSAodGlja3NbMV0gLSB0aWNrc1swXSkpO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIHJldHVybiB0aWNrcztcblx0ICAgICAgICB9XG5cdCAgICAgICAgZnVuY3Rpb24gY29weVNjYWxlKCkge1xuXHQgICAgICAgICAgICB2YXIgbmV3U2NhbGUgPSBzY2FsZS5jb3B5KCksIGRvbWFpbjtcblx0ICAgICAgICAgICAgaWYgKHBhcmFtcy5pc0NhdGVnb3J5KSB7XG5cdCAgICAgICAgICAgICAgICBkb21haW4gPSBzY2FsZS5kb21haW4oKTtcblx0ICAgICAgICAgICAgICAgIG5ld1NjYWxlLmRvbWFpbihbZG9tYWluWzBdLCBkb21haW5bMV0gLSAxXSk7XG5cdCAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgcmV0dXJuIG5ld1NjYWxlO1xuXHQgICAgICAgIH1cblx0ICAgICAgICBmdW5jdGlvbiB0ZXh0Rm9ybWF0dGVkKHYpIHtcblx0ICAgICAgICAgICAgdmFyIGZvcm1hdHRlZCA9IHRpY2tGb3JtYXQgPyB0aWNrRm9ybWF0KHYpIDogdjtcblx0ICAgICAgICAgICAgcmV0dXJuIHR5cGVvZiBmb3JtYXR0ZWQgIT09ICd1bmRlZmluZWQnID8gZm9ybWF0dGVkIDogJyc7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGZ1bmN0aW9uIGdldFNpemVGb3IxQ2hhcih0aWNrKSB7XG5cdCAgICAgICAgICAgIGlmICh0aWNrVGV4dENoYXJTaXplKSB7XG5cdCAgICAgICAgICAgICAgICByZXR1cm4gdGlja1RleHRDaGFyU2l6ZTtcblx0ICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB2YXIgc2l6ZSA9IHtcblx0ICAgICAgICAgICAgICAgIGg6IDExLjUsXG5cdCAgICAgICAgICAgICAgICB3OiA1LjVcblx0ICAgICAgICAgICAgfTtcblx0ICAgICAgICAgICAgdGljay5zZWxlY3QoJ3RleHQnKS50ZXh0KHRleHRGb3JtYXR0ZWQpLmVhY2goZnVuY3Rpb24gKGQpIHtcblx0ICAgICAgICAgICAgICAgIHZhciBib3ggPSB0aGlzLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLFxuXHQgICAgICAgICAgICAgICAgICAgIHRleHQgPSB0ZXh0Rm9ybWF0dGVkKGQpLFxuXHQgICAgICAgICAgICAgICAgICAgIGggPSBib3guaGVpZ2h0LFxuXHQgICAgICAgICAgICAgICAgICAgIHcgPSB0ZXh0ID8gKGJveC53aWR0aCAvIHRleHQubGVuZ3RoKSA6IHVuZGVmaW5lZDtcblx0ICAgICAgICAgICAgICAgIGlmIChoICYmIHcpIHtcblx0ICAgICAgICAgICAgICAgICAgICBzaXplLmggPSBoO1xuXHQgICAgICAgICAgICAgICAgICAgIHNpemUudyA9IHc7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgIH0pLnRleHQoJycpO1xuXHQgICAgICAgICAgICB0aWNrVGV4dENoYXJTaXplID0gc2l6ZTtcblx0ICAgICAgICAgICAgcmV0dXJuIHNpemU7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGZ1bmN0aW9uIHRyYW5zaXRpb25pc2Uoc2VsZWN0aW9uKSB7XG5cdCAgICAgICAgICAgIHJldHVybiBwYXJhbXMud2l0aG91dFRyYW5zaXRpb24gPy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oXCJvcGFjaXR5XCIsIDEpLFxuXHQgICAgICAgICAgICAgICAgICAgIHRpY2tUcmFuc2Zvcm0sIHRpY2tYLCB0aWNrWTtcblx0XG5cdCAgICAgICAgICAgICAgICB2YXIgcmFuZ2UgPSBzY2FsZS5yYW5nZUV4dGVudCA/IHNjYWxlLnJhbmdlRXh0ZW50KCkgOiBzY2FsZUV4dGVudChzY2FsZS5yYW5nZSgpKSxcblx0ICAgICAgICAgICAgICAgICAgICBwYXRoID0gZy5zZWxlY3RBbGwoXCIuZG9tYWluXCIpLmRhdGEoWyAwIF0pLFxuXHQgICAgICAgICAgICAgICAgICAgIHBhdGhVcGRhdGUgPSAocGF0aC5lbnRlcigpLmFwcGVuZChcInBhdGhcIikuYXR0cihcImNsYXNzXCIsIFwiZG9tYWluXCIpLCB0cmFuc2l0aW9uaXNlKHBhdGgpKTtcblx0ICAgICAgICAgICAgICAgIHRpY2tFbnRlci5hcHBlbmQoXCJsaW5lXCIpO1xuXHQgICAgICAgICAgICAgICAgdGlja0VudGVyLmFwcGVuZChcInRleHRcIik7XG5cdFxuXHQgICAgICAgICAgICAgICAgdmFyIGxpbmVFbnRlciA9IHRpY2tFbnRlci5zZWxlY3QoXCJsaW5lXCIpLFxuXHQgICAgICAgICAgICAgICAgICAgIGxpbmVVcGRhdGUgPSB0aWNrVXBkYXRlLnNlbGVjdChcImxpbmVcIiksXG5cdCAgICAgICAgICAgICAgICAgICAgdGV4dEVudGVyID0gdGlja0VudGVyLnNlbGVjdChcInRleHRcIiksXG5cdCAgICAgICAgICAgICAgICAgICAgdGV4dFVwZGF0ZSA9IHRpY2tVcGRhdGUuc2VsZWN0KFwidGV4dFwiKTtcblx0XG5cdCAgICAgICAgICAgICAgICBpZiAocGFyYW1zLmlzQ2F0ZWdvcnkpIHtcblx0ICAgICAgICAgICAgICAgICAgICB0aWNrT2Zmc2V0ID0gTWF0aC5jZWlsKChzY2FsZTEoMSkgLSBzY2FsZTEoMCkpIC8gMik7XG5cdCAgICAgICAgICAgICAgICAgICAgdGlja1ggPSB0aWNrQ2VudGVyZWQgPyAwIDogdGlja09mZnNldDtcblx0ICAgICAgICAgICAgICAgICAgICB0aWNrWSA9IHRpY2tDZW50ZXJlZCA/IHRpY2tPZmZzZXQgOiAwO1xuXHQgICAgICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgICAgICB0aWNrT2Zmc2V0ID0gdGlja1ggPSAwO1xuXHQgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgICAgIHZhciB0ZXh0LCB0c3Bhbiwgc2l6ZUZvcjFDaGFyID0gZ2V0U2l6ZUZvcjFDaGFyKGcuc2VsZWN0KCcudGljaycpKSwgY291bnRzID0gW107XG5cdCAgICAgICAgICAgICAgICB2YXIgdGlja0xlbmd0aCA9IE1hdGgubWF4KGlubmVyVGlja1NpemUsIDApICsgdGlja1BhZGRpbmcsXG5cdCAgICAgICAgICAgICAgICAgICAgaXNWZXJ0aWNhbCA9IG9yaWVudCA9PT0gJ2xlZnQnIHx8IG9yaWVudCA9PT0gJ3JpZ2h0Jztcblx0XG5cdCAgICAgICAgICAgICAgICAvLyB0aGlzIHNob3VsZCBiZSBjYWxsZWQgb25seSB3aGVuIGNhdGVnb3J5IGF4aXNcblx0ICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHNwbGl0VGlja1RleHQoZCwgbWF4V2lkdGgpIHtcblx0ICAgICAgICAgICAgICAgICAgICB2YXIgdGlja1RleHQgPSB0ZXh0Rm9ybWF0dGVkKGQpLFxuXHQgICAgICAgICAgICAgICAgICAgICAgICBzdWJ0ZXh0LCBzcGFjZUluZGV4LCB0ZXh0V2lkdGgsIHNwbGl0dGVkID0gW107XG5cdFxuXHQgICAgICAgICAgICAgICAgICAgIGlmIChPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwodGlja1RleHQpID09PSBcIltvYmplY3QgQXJyYXldXCIpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRpY2tUZXh0O1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKCFtYXhXaWR0aCB8fCBtYXhXaWR0aCA8PSAwKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIG1heFdpZHRoID0gaXNWZXJ0aWNhbCA/IDk1IDogcGFyYW1zLmlzQ2F0ZWdvcnkgPyAoTWF0aC5jZWlsKHNjYWxlMSh0aWNrc1sxXSkgLSBzY2FsZTEodGlja3NbMF0pKSAtIDEyKSA6IDExMDtcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHNwbGl0KHNwbGl0dGVkLCB0ZXh0KSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHNwYWNlSW5kZXggPSB1bmRlZmluZWQ7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAxOyBpIDwgdGV4dC5sZW5ndGg7IGkrKykge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRleHQuY2hhckF0KGkpID09PSAnICcpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzcGFjZUluZGV4ID0gaTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1YnRleHQgPSB0ZXh0LnN1YnN0cigwLCBpICsgMSk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0V2lkdGggPSBzaXplRm9yMUNoYXIudyAqIHN1YnRleHQubGVuZ3RoO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYgdGV4dCB3aWR0aCBnZXRzIG92ZXIgdGljayB3aWR0aCwgc3BsaXQgYnkgc3BhY2UgaW5kZXggb3IgY3JyZW50IGluZGV4XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobWF4V2lkdGggPCB0ZXh0V2lkdGgpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3BsaXQoXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNwbGl0dGVkLmNvbmNhdCh0ZXh0LnN1YnN0cigwLCBzcGFjZUluZGV4ID8gc3BhY2VJbmRleCA6IGkpKSxcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dC5zbGljZShzcGFjZUluZGV4ID8gc3BhY2VJbmRleCArIDEgOiBpKVxuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNwbGl0dGVkLmNvbmNhdCh0ZXh0KTtcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiBzcGxpdChzcGxpdHRlZCwgdGlja1RleHQgKyBcIlwiKTtcblx0ICAgICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICAgICBmdW5jdGlvbiB0c3BhbkR5KGQsIGkpIHtcblx0ICAgICAgICAgICAgICAgICAgICB2YXIgZHkgPSBzaXplRm9yMUNoYXIuaDtcblx0ICAgICAgICAgICAgICAgICAgICBpZiAoaSA9PT0gMCkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBpZiAob3JpZW50ID09PSAnbGVmdCcgfHwgb3JpZW50ID09PSAncmlnaHQnKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICBkeSA9IC0oKGNvdW50c1tkLmluZGV4XSAtIDEpICogKHNpemVGb3IxQ2hhci5oIC8gMikgLSAzKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGR5ID0gXCIuNzFlbVwiO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiBkeTtcblx0ICAgICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICAgICBmdW5jdGlvbiB0aWNrU2l6ZShkKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgdmFyIHRpY2tQb3NpdGlvbiA9IHNjYWxlKGQpICsgKHRpY2tDZW50ZXJlZCA/IDAgOiB0aWNrT2Zmc2V0KTtcblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmFuZ2VbMF0gPCB0aWNrUG9zaXRpb24gJiYgdGlja1Bvc2l0aW9uIDwgcmFuZ2VbMV0gPyBpbm5lclRpY2tTaXplIDogMDtcblx0ICAgICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICAgICB0ZXh0ID0gdGljay5zZWxlY3QoXCJ0ZXh0XCIpO1xuXHQgICAgICAgICAgICAgICAgdHNwYW4gPSB0ZXh0LnNlbGVjdEFsbCgndHNwYW4nKVxuXHQgICAgICAgICAgICAgICAgICAgIC5kYXRhKGZ1bmN0aW9uIChkLCBpKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzcGxpdHRlZCA9IHBhcmFtcy50aWNrTXVsdGlsaW5lID8gc3BsaXRUaWNrVGV4dChkLCBwYXJhbXMudGlja1dpZHRoKSA6IFtdLmNvbmNhdCh0ZXh0Rm9ybWF0dGVkKGQpKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgY291bnRzW2ldID0gc3BsaXR0ZWQubGVuZ3RoO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3BsaXR0ZWQubWFwKGZ1bmN0aW9uIChzKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBpbmRleDogaSwgc3BsaXR0ZWQ6IHMgfTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgICAgICAgICB0c3Bhbi5lbnRlcigpLmFwcGVuZCgndHNwYW4nKTtcblx0ICAgICAgICAgICAgICAgIHRzcGFuLmV4aXQoKS5yZW1vdmUoKTtcblx0ICAgICAgICAgICAgICAgIHRzcGFuLnRleHQoZnVuY3Rpb24gKGQpIHsgcmV0dXJuIGQuc3BsaXR0ZWQ7IH0pO1xuXHRcblx0ICAgICAgICAgICAgICAgIHZhciByb3RhdGUgPSBwYXJhbXMudGlja1RleHRSb3RhdGU7XG5cdFxuXHQgICAgICAgICAgICAgICAgZnVuY3Rpb24gdGV4dEFuY2hvckZvclRleHQocm90YXRlKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKCFyb3RhdGUpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdtaWRkbGUnO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gcm90YXRlID4gMCA/IFwic3RhcnRcIiA6IFwiZW5kXCI7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBmdW5jdGlvbiB0ZXh0VHJhbnNmb3JtKHJvdGF0ZSkge1xuXHQgICAgICAgICAgICAgICAgICAgIGlmICghcm90YXRlKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnJztcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwicm90YXRlKFwiICsgcm90YXRlICsgXCIpXCI7XG5cdCAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBmdW5jdGlvbiBkeEZvclRleHQocm90YXRlKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgaWYgKCFyb3RhdGUpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgICAgIHJldHVybiA4ICogTWF0aC5zaW4oTWF0aC5QSSAqIChyb3RhdGUgLyAxODApKTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHlGb3JUZXh0KHJvdGF0ZSkge1xuXHQgICAgICAgICAgICAgICAgICAgIGlmICghcm90YXRlKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0aWNrTGVuZ3RoO1xuXHQgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTEuNSAtIDIuNSAqIChyb3RhdGUgLyAxNSkgKiAocm90YXRlID4gMCA/IDEgOiAtMSk7XG5cdCAgICAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgICAgc3dpdGNoIChvcmllbnQpIHtcblx0ICAgICAgICAgICAgICAgIGNhc2UgXCJib3R0b21cIjpcblx0ICAgICAgICAgICAgICAgICAgICB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHRpY2tUcmFuc2Zvcm0gPSBheGlzWDtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgbGluZUVudGVyLmF0dHIoXCJ5MlwiLCBpbm5lclRpY2tTaXplKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdGV4dEVudGVyLmF0dHIoXCJ5XCIsIHRpY2tMZW5ndGgpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBsaW5lVXBkYXRlLmF0dHIoXCJ4MVwiLCB0aWNrWCkuYXR0cihcIngyXCIsIHRpY2tYKS5hdHRyKFwieTJcIiwgdGlja1NpemUpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0VXBkYXRlLmF0dHIoXCJ4XCIsIDApLmF0dHIoXCJ5XCIsIHlGb3JUZXh0KHJvdGF0ZSkpXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc3R5bGUoXCJ0ZXh0LWFuY2hvclwiLCB0ZXh0QW5jaG9yRm9yVGV4dChyb3RhdGUpKVxuXHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJ0cmFuc2Zvcm1cIiwgdGV4dFRyYW5zZm9ybShyb3RhdGUpKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdHNwYW4uYXR0cigneCcsIDApLmF0dHIoXCJkeVwiLCB0c3BhbkR5KS5hdHRyKCdkeCcsIGR4Rm9yVGV4dChyb3RhdGUpKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgcGF0aFVwZGF0ZS5hdHRyKFwiZFwiLCBcIk1cIiArIHJhbmdlWzBdICsgXCIsXCIgKyBvdXRlclRpY2tTaXplICsgXCJWMEhcIiArIHJhbmdlWzFdICsgXCJWXCIgKyBvdXRlclRpY2tTaXplKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgY2FzZSBcInRvcFwiOlxuXHQgICAgICAgICAgICAgICAgICAgIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgLy8gVE9ETzogcm90YXRlZCB0aWNrIHRleHRcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdGlja1RyYW5zZm9ybSA9IGF4aXNYO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBsaW5lRW50ZXIuYXR0cihcInkyXCIsIC1pbm5lclRpY2tTaXplKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdGV4dEVudGVyLmF0dHIoXCJ5XCIsIC10aWNrTGVuZ3RoKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgbGluZVVwZGF0ZS5hdHRyKFwieDJcIiwgMCkuYXR0cihcInkyXCIsIC1pbm5lclRpY2tTaXplKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFVwZGF0ZS5hdHRyKFwieFwiLCAwKS5hdHRyKFwieVwiLCAtdGlja0xlbmd0aCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHRleHQuc3R5bGUoXCJ0ZXh0LWFuY2hvclwiLCBcIm1pZGRsZVwiKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdHNwYW4uYXR0cigneCcsIDApLmF0dHIoXCJkeVwiLCBcIjBlbVwiKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgcGF0aFVwZGF0ZS5hdHRyKFwiZFwiLCBcIk1cIiArIHJhbmdlWzBdICsgXCIsXCIgKyAtb3V0ZXJUaWNrU2l6ZSArIFwiVjBIXCIgKyByYW5nZVsxXSArIFwiVlwiICsgLW91dGVyVGlja1NpemUpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcblx0ICAgICAgICAgICAgICAgICAgICB9XG5cdCAgICAgICAgICAgICAgICBjYXNlIFwibGVmdFwiOlxuXHQgICAgICAgICAgICAgICAgICAgIHtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdGlja1RyYW5zZm9ybSA9IGF4aXNZO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICBsaW5lRW50ZXIuYXR0cihcIngyXCIsIC1pbm5lclRpY2tTaXplKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdGV4dEVudGVyLmF0dHIoXCJ4XCIsIC10aWNrTGVuZ3RoKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgbGluZVVwZGF0ZS5hdHRyKFwieDJcIiwgLWlubmVyVGlja1NpemUpLmF0dHIoXCJ5MVwiLCB0aWNrWSkuYXR0cihcInkyXCIsIHRpY2tZKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFVwZGF0ZS5hdHRyKFwieFwiLCAtdGlja0xlbmd0aCkuYXR0cihcInlcIiwgdGlja09mZnNldCk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHRleHQuc3R5bGUoXCJ0ZXh0LWFuY2hvclwiLCBcImVuZFwiKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdHNwYW4uYXR0cigneCcsIC10aWNrTGVuZ3RoKS5hdHRyKFwiZHlcIiwgdHNwYW5EeSk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhVcGRhdGUuYXR0cihcImRcIiwgXCJNXCIgKyAtb3V0ZXJUaWNrU2l6ZSArIFwiLFwiICsgcmFuZ2VbMF0gKyBcIkgwVlwiICsgcmFuZ2VbMV0gKyBcIkhcIiArIC1vdXRlclRpY2tTaXplKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgY2FzZSBcInJpZ2h0XCI6XG5cdCAgICAgICAgICAgICAgICAgICAge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0aWNrVHJhbnNmb3JtID0gYXhpc1k7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVFbnRlci5hdHRyKFwieDJcIiwgaW5uZXJUaWNrU2l6ZSk7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgIHRleHRFbnRlci5hdHRyKFwieFwiLCB0aWNrTGVuZ3RoKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgbGluZVVwZGF0ZS5hdHRyKFwieDJcIiwgaW5uZXJUaWNrU2l6ZSkuYXR0cihcInkyXCIsIDApO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0VXBkYXRlLmF0dHIoXCJ4XCIsIHRpY2tMZW5ndGgpLmF0dHIoXCJ5XCIsIDApO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0LnN0eWxlKFwidGV4dC1hbmNob3JcIiwgXCJzdGFydFwiKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgdHNwYW4uYXR0cigneCcsIHRpY2tMZW5ndGgpLmF0dHIoXCJkeVwiLCB0c3BhbkR5KTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgcGF0aFVwZGF0ZS5hdHRyKFwiZFwiLCBcIk1cIiArIG91dGVyVGlja1NpemUgKyBcIixcIiArIHJhbmdlWzBdICsgXCJIMFZcIiArIHJhbmdlWzFdICsgXCJIXCIgKyBvdXRlclRpY2tTaXplKTtcblx0ICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cdCAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgaWYgKHNjYWxlMS5yYW5nZUJhbmQpIHtcblx0ICAgICAgICAgICAgICAgICAgICB2YXIgeCA9IHNjYWxlMSwgZHggPSB4LnJhbmdlQmFuZCgpIC8gMjtcblx0ICAgICAgICAgICAgICAgICAgICBzY2FsZTAgPSBzY2FsZTEgPSBmdW5jdGlvbiAoZCkge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geChkKSArIGR4O1xuXHQgICAgICAgICAgICAgICAgICAgIH07XG5cdCAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHNjYWxlMC5yYW5nZUJhbmQpIHtcblx0ICAgICAgICAgICAgICAgICAgICBzY2FsZTAgPSBzY2FsZTE7XG5cdCAgICAgICAgICAgICAgICB9IGVsc2Uge1xuXHQgICAgICAgICAgICAgICAgICAgIHRpY2tFeGl0LmNhbGwodGlja1RyYW5zZm9ybSwgc2NhbGUxKTtcblx0ICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgIHRpY2tFbnRlci5jYWxsKHRpY2tUcmFuc2Zvcm0sIHNjYWxlMCk7XG5cdCAgICAgICAgICAgICAgICB0aWNrVXBkYXRlLmNhbGwodGlja1RyYW5zZm9ybSwgc2NhbGUxKTtcblx0ICAgICAgICAgICAgfSk7XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGF4aXMuc2NhbGUgPSBmdW5jdGlvbiAoeCkge1xuXHQgICAgICAgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHsgcmV0dXJuIHNjYWxlOyB9XG5cdCAgICAgICAgICAgIHNjYWxlID0geDtcblx0ICAgICAgICAgICAgcmV0dXJuIGF4aXM7XG5cdCAgICAgICAgfTtcblx0ICAgICAgICBheGlzLm9yaWVudCA9IGZ1bmN0aW9uICh4KSB7XG5cdCAgICAgICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgeyByZXR1cm4gb3JpZW50OyB9XG5cdCAgICAgICAgICAgIG9yaWVudCA9IHggaW4ge3RvcDogMSwgcmlnaHQ6IDEsIGJvdHRvbTogMSwgbGVmdDogMX0gPyB4ICsgXCJcIiA6IFwiYm90dG9tXCI7XG5cdCAgICAgICAgICAgIHJldHVybiBheGlzO1xuXHQgICAgICAgIH07XG5cdCAgICAgICAgYXhpcy50aWNrRm9ybWF0ID0gZnVuY3Rpb24gKGZvcm1hdCkge1xuXHQgICAgICAgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHsgcmV0dXJuIHRpY2tGb3JtYXQ7IH1cblx0ICAgICAgICAgICAgdGlja0Zvcm1hdCA9IGZvcm1hdDtcblx0ICAgICAgICAgICAgcmV0dXJuIGF4aXM7XG5cdCAgICAgICAgfTtcblx0ICAgICAgICBheGlzLnRpY2tDZW50ZXJlZCA9IGZ1bmN0aW9uIChpc0NlbnRlcmVkKSB7XG5cdCAgICAgICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgeyByZXR1cm4gdGlja0NlbnRlcmVkOyB9XG5cdCAgICAgICAgICAgIHRpY2tDZW50ZXJlZCA9IGlzQ2VudGVyZWQ7XG5cdCAgICAgICAgICAgIHJldHVybiBheGlzO1xuXHQgICAgICAgIH07XG5cdCAgICAgICAgYXhpcy50aWNrT2Zmc2V0ID0gZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICByZXR1cm4gdGlja09mZnNldDtcblx0ICAgICAgICB9O1xuXHQgICAgICAgIGF4aXMudGlja0ludGVydmFsID0gZnVuY3Rpb24gKCkge1xuXHQgICAgICAgICAgICB2YXIgaW50ZXJ2YWwsIGxlbmd0aDtc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VxuXHQgICAgICAgICAgICAgICAgIHJldHVybiBbXTtcblx0XG5cdCAgICAgICAgICAgICB2YXIgb3duaW5nUGF0aFNlZ0xpc3QgPSB0aGlzO1xuXHRcblx0ICAgICAgICAgICAgIHZhciBCdWlsZGVyID0gZnVuY3Rpb24oKSB7XG5cdCAgICAgICAgICAgICAgICAgdGhpcy5wYXRoU2VnTGlzdCA9IFtdO1xuXHQgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgIEJ1aWxkZXIucHJvdG90eXBlLmFwcGVuZFNlZ21lbnQgPSBmdW5jdGlvbihwYXRoU2VnKSB7XG5cdCAgICAgICAgICAgICAgICAgdGhpcy5wYXRoU2VnTGlzdC5wdXNoKHBhdGhTZWcpO1xuXHQgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgIHZhciBTb3VyY2UgPSBmdW5jdGlvbihzdHJpbmcpIHtcblx0ICAgICAgICAgICAgICAgICB0aGlzLl9zdHJpbmcgPSBzdHJpbmc7XG5cdCAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEluZGV4ID0gMDtcblx0ICAgICAgICAgICAgICAgICB0aGlzLl9lbmRJbmRleCA9IHRoaXMuX3N0cmluZy5sZW5ndGg7XG5cdCAgICAgICAgICAgICAgICAgdGhpcy5fcHJldmlvdXNDb21tYW5kID0gU1ZHUGF0aFNlZy5QQVRIU0VHX1VOS05PV047XG5cdFxuXHQgICAgICAgICAgICAgICAgIHRoaXMuX3NraXBPcHRpb25hbFNwYWNlcygpO1xuXHQgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUuX2lzQ3VycmVudFNwYWNlID0gZnVuY3Rpb24oKSB7XG5cdCAgICAgICAgICAgICAgICAgdmFyIGNoYXJhY3RlciA9IHRoaXMuX3N0cmluZ1t0aGlzLl9jdXJyZW50SW5kZXhdO1xuXHQgICAgICAgICAgICAgICAgIHJldHVybiBjaGFyYWN0ZXIgPD0gX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XQodGhpcy5fY3VycmVudEluZGV4KSA9PSBcIixcIikge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEluZGV4Kys7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9za2lwT3B0aW9uYWxTcGFjZXMoKTtcblx0ICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fY3VycmVudEluZGV4IDwgdGhpcy5fZW5kSW5kZXg7XG5cdCAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgU291cmNlLnByb3RvdHlwZS5oYXNNb3JlRGF0YSA9IGZ1bmN0aW9uKCkge1xuXHQgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9jdXJyZW50SW5kZXggPCB0aGlzLl9lbmRJbmRleDtcblx0ICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICBTb3VyY2UucHJvdG90eXBlLnBlZWtTZWdtZW50VHlwZSA9IGZ1bmN0aW9uKCkge1xuXHQgICAgICAgICAgICAgICAgIHZhciBsb29rYWhlYWQgPSB0aGlzLl9zdHJpbmdbdGhpcy5fY3VycmVudEluZGV4XTtcblx0ICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fcGF0aFNlZ1R5cGVGcm9tQ2hhcihsb29rYWhlYWQpO1xuXHQgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUuX3BhdGhTZWdUeXBlRnJvbUNoYXIgPSBmdW5jdGlvbihsb29rYWhlYWQpIHtcblx0ICAgICAgICAgICAgICAgICBzd2l0Y2ggKGxvb2thaGVhZCkge1xuXHQgICAgICAgICAgICAgICAgIGNhc2UgXCJaXCI6XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBcInpcIjpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19DTE9TRVBBVEg7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBcIk1cIjpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19NT1ZFVE9fQUJTO1xuXHQgICAgICAgICAgICAgICAgIGNhc2UgXCJtXCI6XG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfTU9WRVRPX1JFTDtcblx0ICAgICAgICAgICAgICAgICBjYXNlIFwiTFwiOlxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0xJTkVUT19BQlM7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBcImxcIjpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19MSU5FVE9fUkVMO1xuXHQgICAgICAgICAgICAgICAgIGNhc2UgXCJDXCI6XG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfQ1VSVkVUT19DVUJJQ19BQlM7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBcImNcIjpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19DVVJWRVRPX0NVQklDX1JFTDtcblx0ICAgICAgICAgICAgICAgICBjYXNlIFwiUVwiOlxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0NVUlZFVE9fUVVBRFJBVElDX0FCUztcblx0ICAgICAgICAgICAgICAgICBjYXNlIFwicVwiOlxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0NVUlZFVE9fUVVBRFJBVElDX1JFTDtcblx0ICAgICAgICAgICAgICAgICBjYXNlIFwiQVwiOlxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0FSQ19BQlM7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBcImFcIjpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19BUkNfUkVMO1xuXHQgICAgICAgICAgICAgICAgIGNhc2UgXCJIXCI6XG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfTElORVRPX0hPUklaT05UQUxfQUJTO1xuXHQgICAgICAgICAgICAgICAgIGNhc2UgXCJoXCI6XG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfTElORVRPX0hPUklaT05UQUxfUkVMO1xuXHQgICAgICAgICAgICAgICAgIGNhc2UgXCJWXCI6XG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfTElORVRPX1ZFUlRJQ0FMX0FCUztcblx0ICAgICAgICAgICAgICAgICBjYXNlIFwidlwiOlxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0xJTkVUT19WRVJUSUNBTF9SRUw7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBcIlNcIjpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19DVVJWRVRPX0NVQklDX1NNT09USF9BQlM7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBcInNcIjpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19DVVJWRVRPX0NVQklDX1NNT09USF9SRUw7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBcIlRcIjpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19DVVJWRVRPX1FVQURSQVRJQ19TTU9PVEhfQUJTO1xuXHQgICAgICAgICAgICAgICAgIGNhc2UgXCJ0XCI6XG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfQ1VSVkVUT19RVUFEUkFUSUNfU01PT1RIX1JFTDtcblx0ICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX1VOS05PV047XG5cdCAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUuX25leHRDb21tYW5kSGVscGVyID0gZnVuY3Rpb24obG9va2FoZWFkLCBwcmV2aW91c0NvbW1hbmQpIHtcblx0ICAgICAgICAgICAgICAgICAvLyBDaGVjayBmb3IgcmVtYWluaW5nIGNvb3JkaW5hdGVzIGluIHRoZSBjdXJyZW50IGNvbW1hbmQuXG5cdCAgICAgICAgICAgICAgICAgaWYgKChsb29rYWhlYWQgPT0gXCIrXCIgfHwgbG9va2FoZWFkID09IFwiLVwiIHx8IGxvb2thaGVhZCA9PSBcIi5cIiB8fCAobG9va2FoZWFkID49IFwiMFwiICYmIGxvb2thaGVhZCA8PSBcIjlcIikpICYmIHByZXZpb3VzQ29tbWFuZCAhPSBTVkdQYXRoU2VnLlBBVEhTRUdfQ0xPU0VQQVRIKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgIGlmIChwcmV2aW91c0NvbW1hbmQgPT0gU1ZHUGF0aFNlZy5QQVRIU0VHX01PVkVUT19BQlMpXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0xJTkVUT19BQlM7XG5cdCAgICAgICAgICAgICAgICAgICAgIGlmIChwcmV2aW91c0NvbW1hbmQgPT0gU1ZHUGF0aFNlZy5QQVRIU0VHX01PVkVUT19SRUwpXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0xJTkVUT19SRUw7XG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwcmV2aW91c0NvbW1hbmQ7XG5cdCAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfVU5LTk9XTjtcblx0ICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICBTb3VyY2UucHJvdG90eXBlLmluaXRpYWxDb21tYW5kSXNNb3ZlVG8gPSBmdW5jdGlvbigpIHtcblx0ICAgICAgICAgICAgICAgICAvLyBJZiB0aGUgcGF0aCBpcyBlbXB0eSBpdCBpcyBzdGlsbCB2YWxpZCwgc28gcmV0dXJuIHRydWUuXG5cdCAgICAgICAgICAgICAgICAgaWYgKCF0aGlzLmhhc01vcmVEYXRhKCkpXG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuXHQgICAgICAgICAgICAgICAgIHZhciBjb21tYW5kID0gdGhpcy5wZWVrU2VnbWVudFR5cGUoKTtcblx0ICAgICAgICAgICAgICAgICAvLyBQYXRoIG11c3Qgc3RhcnQgd2l0aCBtb3ZlVG8uXG5cdCAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbW1hbmQgPT0gU1ZHUGF0aFNlZy5QQVRIU0VHX01PVkVUT19BQlMgfHwgY29tbWFuZCA9PSBTVkdQYXRoU2VnLlBBVEhTRUdfTU9WRVRPX1JFTDtcblx0ICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICAvLyBQYXJzZSBhIG51bWJlciBmcm9tIGFuIFNWRyBwYXRoLiBUaGlzIHZlcnkgY2xvc2VseSBmb2xsb3dzIGdlbmVyaWNQYXJzZU51bWJlciguLi4pIGZyb20gU291cmNlL2NvcmUvc3ZnL1NWR1BhcnNlclV0aWxpdGllcy5jcHAuXG5cdCAgICAgICAgICAgICAvLyBTcGVjOiBodHRwOi8vd3d3LnczLm9yZy9UUi9TVkcxMS9zaW5nbGUtcGFnZS5odG1sI3BhdGhzLVBhdGhEYXRhQk5GXG5cdCAgICAgICAgICAgICBTb3VyY2UucHJvdG90eXBlLl9wYXJzZU51bWJlciA9IGZ1bmN0aW9uKCkge1xuXHQgICAgICAgICAgICAgICAgIHZhciBleHBvbmVudCA9IDA7XG5cdCAgICAgICAgICAgICAgICAgdmFyIGludGVnZXIgPSAwO1xuXHQgICAgICAgICAgICAgICAgIHZhciBmcmFjID0gMTtcblx0ICAgICAgICAgICAgICAgICB2YXIgZGVjaW1hbCA9IDA7XG5cdCAgICAgICAgICAgICAgICAgdmFyIHNpZ24gPSAxO1xuXHQgICAgICAgICAgICAgICAgIHZhciBleHBzaWduID0gMTtcblx0XG5cdCAgICAgICAgICAgICAgICAgdmFyIHN0YXJ0SW5kZXggPSB0aGlzLl9jdXJyZW50SW5kZXg7XG5cdFxuXHQgICAgICAgICAgICAgICAgIHRoaXMuX3NraXBPcHRpb25hbFNwYWNlcygpO1xuXHRcblx0ICAgICAgICAgICAgICAgICAvLyBSZWFkIHRoZSBzaWduLlxuXHQgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50SW5kZXggPCB0aGlzLl9lbmRJbmRleCAmJiB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPT0gXCIrXCIpXG5cdCAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJbmRleCsrO1xuXHQgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMuX2N1cnJlbnRJbmRleCA8IHRoaXMuX2VuZEluZGV4ICYmIHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSA9PSBcIi1cIikge1xuXHQgICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50SW5kZXgrKztcblx0ICAgICAgICAgICAgICAgICAgICAgc2lnbiA9IC0xO1xuXHQgICAg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gICAgdmFyIHNjYW5JbnRQYXJ0SW5kZXggPSB0aGlzLl9jdXJyZW50SW5kZXggLSAxO1xuXHQgICAgICAgICAgICAgICAgICAgICB2YXIgbXVsdGlwbGllciA9IDE7XG5cdCAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChzY2FuSW50UGFydEluZGV4ID49IHN0YXJ0SW50UGFydEluZGV4KSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlZ2VyICs9IG11bHRpcGxpZXIgKiAodGhpcy5fc3RyaW5nLmNoYXJBdChzY2FuSW50UGFydEluZGV4LS0pIC0gXCIwXCIpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGlwbGllciAqPSAxMDtcblx0ICAgICAgICAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICAgICAgLy8gUmVhZCB0aGUgZGVjaW1hbHMuXG5cdCAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRJbmRleCA8IHRoaXMuX2VuZEluZGV4ICYmIHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSA9PSBcIi5cIikge1xuXHQgICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50SW5kZXgrKztcblx0XG5cdCAgICAgICAgICAgICAgICAgICAgIC8vIFRoZXJlIG11c3QgYmUgYSBsZWFzdCBvbmUgZGlnaXQgZm9sbG93aW5nIHRoZSAuXG5cdCAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50SW5kZXggPj0gdGhpcy5fZW5kSW5kZXggfHwgdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpIDwgXCIwXCIgfHwgdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpID4gXCI5XCIpXG5cdCAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuXHQgICAgICAgICAgICAgICAgICAgICB3aGlsZSAodGhpcy5fY3VycmVudEluZGV4IDwgdGhpcy5fZW5kSW5kZXggJiYgdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpID49IFwiMFwiICYmIHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSA8PSBcIjlcIilcblx0ICAgICAgICAgICAgICAgICAgICAgICAgIGRlY2ltYWwgKz0gKHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KyspIC0gXCIwXCIpICogKGZyYWMgKj0gMC4xKTtcblx0ICAgICAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgICAgIC8vIFJlYWQgdGhlIGV4cG9uZW50IHBhcnQuXG5cdCAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRJbmRleCAhPSBzdGFydEluZGV4ICYmIHRoaXMuX2N1cnJlbnRJbmRleCArIDEgPCB0aGlzLl9lbmRJbmRleCAmJiAodGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpID09IFwiZVwiIHx8IHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSA9PSBcIkVcIikgJiYgKHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4ICsgMSkgIT0gXCJ4XCIgJiYgdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXggKyAxKSAhPSBcIm1cIikpIHtcblx0ICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEluZGV4Kys7XG5cdFxuXHQgICAgICAgICAgICAgICAgICAgICAvLyBSZWFkIHRoZSBzaWduIG9mIHRoZSBleHBvbmVudC5cblx0ICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSA9PSBcIitcIikge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEluZGV4Kys7XG5cdCAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpID09IFwiLVwiKSB7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50SW5kZXgrKztcblx0ICAgICAgICAgICAgICAgICAgICAgICAgIGV4cHNpZ24gPSAtMTtcblx0ICAgICAgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgICAgICAgICAgLy8gVGhlcmUgbXVzdCBiZSBhbiBleHBvbmVudC5cblx0ICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRJbmRleCA+PSB0aGlzLl9lbmRJbmRleCB8fCB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPCBcIjBcIiB8fCB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPiBcIjlcIilcblx0ICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG5cdFxuXHQgICAgICAgICAgICAgICAgICAgICB3aGlsZSAodGhpcy5fY3VycmVudEluZGV4IDwgdGhpcy5fZW5kSW5kZXggJiYgdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpID49IFwiMFwiICYmIHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSA8PSBcIjlcIikge1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgZXhwb25lbnQgKj0gMTA7XG5cdCAgICAgICAgICAgICAgICAgICAgICAgICBleHBvbmVudCArPSAodGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpIC0gXCIwXCIpO1xuXHQgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEluZGV4Kys7XG5cdCAgICAgICAgICAgICAgICAgICAgIH1cblx0ICAgICAgICAgICAgICAgICB9XG5cdFxuXHQgICAgICAgICAgICAgICAgIHZhciBudW1iZXIgPSBpbnRlZ2VyICsgZGVjaW1hbDtcblx0ICAgICAgICAgICAgICAgICBudW1iZXIgKj0gc2lnbjtcblx0XG5cdCAgICAgICAgICAgICAgICAgaWYgKGV4cG9uZW50KVxuXHQgICAgICAgICAgICAgICAgICAgICBudW1iZXIgKj0gTWF0aC5wb3coMTAsIGV4cHNpZ24gKiBleHBvbmVudCk7XG5cdFxuXHQgICAgICAgICAgICAgICAgIGlmIChzdGFydEluZGV4ID09IHRoaXMuX2N1cnJlbnRJbmRleClcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcblx0XG5cdCAgICAgICAgICAgICAgICAgdGhpcy5fc2tpcE9wdGlvbmFsU3BhY2VzT3JEZWxpbWl0ZXIoKTtcblx0XG5cdCAgICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlcjtcblx0ICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICBTb3VyY2UucHJvdG90eXBlLl9wYXJzZUFyY0ZsYWcgPSBmdW5jdGlvbigpIHtcblx0ICAgICAgICAgICAgICAgICBpZiAodGhpcy5fY3VycmVudEluZGV4ID49IHRoaXMuX2VuZEluZGV4KVxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuXHQgICAgICAgICAgICAgICAgIHZhciBmbGFnID0gZmFsc2U7XG5cdCAgICAgICAgICAgICAgICAgdmFyIGZsYWdDaGFyID0gdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgrKyk7XG5cdCAgICAgICAgICAgICAgICAgaWYgKGZsYWdDaGFyID09IFwiMFwiKVxuXHQgICAgICAgICAgICAgICAgICAgICBmbGFnID0gZmFsc2U7XG5cdCAgICAgICAgICAgICAgICAgZWxzZSBpZiAoZmxhZ0NoYXIgPT0gXCIxXCIpXG5cdCAgICAgICAgICAgICAgICAgICAgIGZsYWcgPSB0cnVlO1xuXHQgICAgICAgICAgICAgICAgIGVsc2Vcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcblx0XG5cdCAgICAgICAgICAgICAgICAgdGhpcy5fc2tpcE9wdGlvbmFsU3BhY2VzT3JEZWxpbWl0ZXIoKTtcblx0ICAgICAgICAgICAgICAgICByZXR1cm4gZmxhZztcblx0ICAgICAgICAgICAgIH1cblx0XG5cdCAgICAgICAgICAgICBTb3VyY2UucHJvdG90eXBlLnBhcnNlU2VnbWVudCA9IGZ1bmN0aW9uKCkge1xuXHQgICAgICAgICAgICAgICAgIHZhciBsb29rYWhlYWQgPSB0aGlzLl9zdHJpbmdbdGhpcy5fY3VycmVudEluZGV4XTtcblx0ICAgICAgICAgICAgICAgICB2YXIgY29tbWFuZCA9IHRoaXMuX3BhdGhTZWdUeXBlRnJvbUNoYXIobG9va2FoZWFkKTtcblx0ICAgICAgICAgICAgICAgICBpZiAoY29tbWFuZCA9PSBTVkdQYXRoU2VnLlBBVEhTRUdfVU5LTk9XTikge1xuXHQgICAgICAgICAgICAgICAgICAgICAvLyBQb3NzaWJseSBhbiBpbXBsaWNpdCBjb21tYW5kLiBOb3QgYWxsb3dlZCBpZiB0aGlzIGlzIHRoZSBmaXJzdCBjb21tYW5kLlxuXHQgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fcHJldmlvdXNDb21tYW5kID09IFNWR1BhdGhTZWcuUEFUSFNFR19VTktOT1dOKVxuXHQgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG5cdCAgICAgICAgICAgICAgICAgICAgIGNvbW1hbmQgPSB0aGlzLl9uZXh0Q29tbWFuZEhlbHBlcihsb29rYWhlYWQsIHRoaXMuX3ByZXZpb3VzQ29tbWFuZCk7XG5cdCAgICAgICAgICAgICAgICAgICAgIGlmIChjb21tYW5kID09IFNWR1BhdGhTZWcuUEFUSFNFR19VTktOT1dOKVxuXHQgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG5cdCAgICAgICAgICAgICAgICAgfSBlbHNlIHtcblx0ICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEluZGV4Kys7XG5cdCAgICAgICAgICAgICAgICAgfVxuXHRcblx0ICAgICAgICAgICAgICAgICB0aGlzLl9wcmV2aW91c0NvbW1hbmQgPSBjb21tYW5kO1xuXHRcblx0ICAgICAgICAgICAgICAgICBzd2l0Y2ggKGNvbW1hbmQpIHtcblx0ICAgICAgICAgICAgICAgICBjYXNlIFNWR1BhdGhTZWcuUEFUSFNFR19NT1ZFVE9fUkVMOlxuXHQgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFNWR1BhdGhTZWdNb3ZldG9SZWwob3duaW5nUGF0aFNlZ0xpc3QsIHRoaXMuX3BhcnNlTnVtYmVyKCksIHRoaXMuX3BhcnNlTnVtYmVyKCkpO1xuXHQgICAgICAgICAgICAgICAgIGNhc2UgU1ZHUGF0aFNlZy5QQVRIU0VHX01PVkVUT19BQlM6XG5cdCAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgU1ZHUGF0aFNlZ01vdmV0b0Ficyhvd25pbmdQYXRoU2VnTGlzdCwgdGhpcy5fcGFyc2VOdW1iZXIoKSwgdGhpcy5fcGFyc2VOdW1iZXIoKSk7XG5cdCAgICAgICAgICAgICAgICAgY2FzZSBTVkdQYXRoU2VnLlBBVEhTRUdfTElORVRPX1JFTDpcblx0ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBTVkdQYXRoU2VnTGluZXRvUmVsKG93bmluZ1BhdGhTZWdMaXN0LCB0aGlzLl9wYXJzZU51bWJlcigpLCB0aGlzLl9wYXJzZU51bWJlcigpKTtcblx0ICAgICAgICAgICAgICAgICBjYXN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ZXI6XG5cdCAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoICYmIHJlc3VsdC5sZW5ndGggPCBtYXhMZW5ndGgpIHtcblx0ICAgICAgICB2YXIgdmFsdWUgPSBhcnJheVtpbmRleF0sXG5cdCAgICAgICAgICAgIGNvbXB1dGVkID0gaXRlcmF0ZWUgPyBpdGVyYXRlZSh2YWx1ZSkgOiB2YWx1ZTtcblx0XG5cdCAgICAgICAgdmFsdWUgPSAoY29tcGFyYXRvciB8fCB2YWx1ZSAhPT0gMCkgPyB2YWx1ZSA6IDA7XG5cdCAgICAgICAgaWYgKCEoc2VlblxuXHQgICAgICAgICAgICAgID8gY2FjaGVIYXMoc2VlbiwgY29tcHV0ZWQpXG5cdCAgICAgICAgICAgICAgOiBpbmNsdWRlcyhyZXN1bHQsIGNvbXB1dGVkLCBjb21wYXJhdG9yKVxuXHQgICAgICAgICAgICApKSB7XG5cdCAgICAgICAgICBvdGhJbmRleCA9IG90aExlbmd0aDtcblx0ICAgICAgICAgIHdoaWxlICgtLW90aEluZGV4KSB7XG5cdCAgICAgICAgICAgIHZhciBjYWNoZSA9IGNhY2hlc1tvdGhJbmRleF07XG5cdCAgICAgICAgICAgIGlmICghKGNhY2hlXG5cdCAgICAgICAgICAgICAgICAgID8gY2FjaGVIYXMoY2FjaGUsIGNvbXB1dGVkKVxuXHQgICAgICAgICAgICAgICAgICA6IGluY2x1ZGVzKGFycmF5c1tvdGhJbmRleF0sIGNvbXB1dGVkLCBjb21wYXJhdG9yKSlcblx0ICAgICAgICAgICAgICAgICkge1xuXHQgICAgICAgICAgICAgIGNvbnRpbnVlIG91dGVyO1xuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgICBpZiAoc2Vlbikge1xuXHQgICAgICAgICAgICBzZWVuLnB1c2goY29tcHV0ZWQpO1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpO1xuXHQgICAgICAgIH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gICAgICAgICAgIG90aElzV3JhcHBlZCA9IG90aElzT2JqICYmIGhhc093blByb3BlcnR5LmNhbGwob3RoZXIsICdfX3dyYXBwZWRfXycpO1xuXHRcblx0ICAgICAgICBpZiAob2JqSXNXcmFwcGVkIHx8IG90aElzV3JhcHBlZCkge1xuXHQgICAgICAgICAgdmFyIG9ialVud3JhcHBlZCA9IG9iaklzV3JhcHBlZCA/IG9iamVjdC52YWx1ZSgpIDogb2JqZWN0LFxuXHQgICAgICAgICAgICAgIG90aFVud3JhcHBlZCA9IG90aElzV3JhcHBlZCA/IG90aGVyLnZhbHVlKCkgOiBvdGhlcjtcblx0XG5cdCAgICAgICAgICBzdGFjayB8fCAoc3RhY2sgPSBuZXcgU3RhY2spO1xuXHQgICAgICAgICAgcmV0dXJuIGVxdWFsRnVuYyhvYmpVbndyYXBwZWQsIG90aFVud3JhcHBlZCwgYml0bWFzaywgY3VzdG9taXplciwgc3RhY2spO1xuXHQgICAgICAgIH1cblx0ICAgICAgfVxuXHQgICAgICBpZiAoIWlzU2FtZVRhZykge1xuXHQgICAgICAgIHJldHVybiBmYWxzZTtcblx0ICAgICAgfVxuXHQgICAgICBzdGFjayB8fCAoc3RhY2sgPSBuZXcgU3RhY2spO1xuXHQgICAgICByZXR1cm4gZXF1YWxPYmplY3RzKG9iamVjdCwgb3RoZXIsIGJpdG1hc2ssIGN1c3RvbWl6ZXIsIGVxdWFsRnVuYywgc3RhY2spO1xuXHQgICAgfVxuXHRcblx0ICAgIC8qKlxuXHQgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8uaXNNYXBgIHdpdGhvdXQgTm9kZS5qcyBvcHRpbWl6YXRpb25zLlxuXHQgICAgICpcblx0ICAgICAqIEBwcml2YXRlXG5cdCAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0byBjaGVjay5cblx0ICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGB0cnVlYCBpZiBgdm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AgICAgICBub0N1c3RvbWl6ZXIgPSAhY3VzdG9taXplcjtcblx0XG5cdCAgICAgIGlmIChvYmplY3QgPT0gbnVsbCkge1xuXHQgICAgICAgIHJldHVybiAhbGVuZ3RoO1xuXHQgICAgICB9XG5cdCAgICAgIG9iamVjdCA9IE9iamVjdChvYmplY3QpO1xuXHQgICAgICB3aGlsZSAoaW5kZXgtLSkge1xuXHQgICAgICAgIHZhciBkYXRhID0gbWF0Y2hEYXRhW2luZGV4XTtcblx0ICAgICAgICBpZiAoKG5vQ3VzdG9taXplciAmJiBkYXRhWzJdKVxuXHQgICAgICAgICAgICAgID8gZGF0YVsxXSAhPT0gb2JqZWN0W2RhdGFbMF1dXG5cdCAgICAgICAgICAgICAgOiAhKGRhdGFbMF0gaW4gb2JqZWN0KVxuXHQgICAgICAgICAgICApIHtcblx0ICAgICAgICAgIHJldHVybiBmYWxzZTtcblx0ICAgICAgICB9XG5cdCAgICAgIH1cblx0ICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHtcblx0ICAgICAgICBkYXRhID0gbWF0Y2hEYXRhW2luZGV4XTtcblx0ICAgICAgICB2YXIga2V5ID0gZGF0YVswXSxcblx0ICAgICAgICAgICAgb2JqVmFsdWUgPSBvYmplY3Rba2V5XSxcblx0ICAgICAgICAgICAgc3JjVmFsdWUgPSBkYXRhWzFdO1xuXHRcblx0ICAgICAgICBpZiAobm9DdXN0b21pemVyICYmIGRhdGFbMl0pIHtcblx0ICAgICAgICAgIGlmIChvYmpWYWx1ZSA9PT0gdW5kZWZpbmVkICYmICEoa2V5IGluIG9iamVjdCkpIHtcblx0ICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgICB2YXIgc3RhY2sgPSBuZXcgU3RhY2s7XG5cdCAgICAgICAgICBpZiAoY3VzdG9taXplcikge1xuXHQgICAgICAgICAgICB2YXIgcmVzdWx0ID0gY3V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pO1xuXHQgICAgICB9XG5cdCAgICAgIHZhciByZXN1bHQgPSBbXTtcblx0ICAgICAgZm9yICh2YXIga2V5IGluIE9iamVjdChvYmplY3QpKSB7XG5cdCAgICAgICAgaWYgKGhhc093blByb3BlcnR5LmNhbGwob2JqZWN0LCBrZXkpICYmIGtleSAhPSAnY29uc3RydWN0b3InKSB7XG5cdCAgICAgICAgICByZXN1bHQucHVzaChrZXkpO1xuXHQgICAgICAgIH1cblx0ICAgICAgfVxuXHQgICAgICByZXR1cm4gcmVzdWx0O1xuXHQgICAgfVxuXHRcblx0ICAgIC8qKlxuXHQgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8ua2V5c0luYCB3aGljaCBkb2Vzbid0IHRyZWF0IHNwYXJzZSBhcnJheXMgYXMgZGVuc2UuXG5cdCAgICAgKlxuXHQgICAgICogQHByaXZhdGVcblx0ICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBxdWVyeS5cblx0ICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyB0aGUgYXJyYXkgb2YgcHJvcGVydHkgbmFtZXMuXG5cdCAgICAgKi9cblx0ICAgIGZ1bmN0aW9uIGJhc2VLZXlzSW4ob2JqZWN0KSB7XG5cdCAgICAgIGlmICghaXNPYmplY3Qob2JqZWN0KSkge1xuXHQgICAgICAgIHJldHVybiBuYXRpdmVLZXlzSW4ob2JqZWN0KTtcblx0ICAgICAgfVxuXHQgICAgICB2YXIgaXNQcm90byA9IGlzUHJvdG90eXBlKG9iamVjdCksXG5cdCAgICAgICAgICByZXN1bHQgPSBbXTtcblx0XG5cdCAgICAgIGZvciAodmFyIGtleSBpbiBvYmplY3QpIHtcblx0ICAgICAgICBpZiAoIShrZXkgPT0gJ2NvbnN0cnVjdG9yJyAmJiAoaXNQcm90byB8fCAhaGFzT3duUHJvcGVydHkuY2FsbChvYmplY3QsIGtleSkpKSkge1xuXHQgICAgICAgICAgcm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CBmdW5jdGlvbi5cblx0ICAgICAqL1xuXHQgICAgZnVuY3Rpb24gY3JlYXRlUm91bmQobWV0aG9kTmFtZSkge1xuXHQgICAgICB2YXIgZnVuYyA9IE1hdGhbbWV0aG9kTmFtZV07XG5cdCAgICAgIHJldHVybiBmdW5jdGlvbihudW1iZXIsIHByZWNpc2lvbikge1xuXHQgICAgICAgIG51bWJlciA9IHRvTnVtYmVyKG51bWJlcik7XG5cdCAgICAgICAgcHJlY2lzaW9uID0gcHJlY2lzaW9uID09IG51bGwgPyAwIDogbmF0aXZlTWluKHRvSW50ZWdlcihwcmVjaXNpb24pLCAyOTIpO1xuXHQgICAgICAgIGlmIChwcmVjaXNpb24pIHtcblx0ICAgICAgICAgIC8vIFNoaWZ0IHdpdGggZXhwb25lbnRpYWwgbm90YXRpb24gdG8gYXZvaWQgZmxvYXRpbmctcG9pbnQgaXNzdWVzLlxuXHQgICAgICAgICAgLy8gU2VlIFtNRE5dKGh0dHBzOi8vbWRuLmlvL3JvdW5kI0V4YW1wbGVzKSBmb3IgbW9yZSBkZXRhaWxzLlxuXHQgICAgICAgICAgdmFyIHBhaXIgPSAodG9TdHJpbmcobnVtYmVyKSArICdlJykuc3BsaXQoJ2UnKSxcblx0ICAgICAgICAgICAgICB2YWx1ZSA9IGZ1bmMocGFpclswXSArICdlJyArICgrcGFpclsxXSArIHByZWNpc2lvbikpO1xuXHRcblx0ICAgICAgICAgIHBhaXIgPSAodG9TdHJpbmcodmFsdWUpICsgJ2UnKS5zcGxpdCgnZScpO1xuXHQgICAgICAgICAgcmV0dXJuICsocGFpclswXSArICdlJyArICgrcGFpclsxXSAtIHByZWNpc2lvbikpO1xuXHQgICAgICAgIH1cblx0ICAgICAgICByZXR1cm4gZnVuYyhudW1iZXIpO1xuXHQgICAgICB9O1xuXHQgICAgfVxuXHRcblx0ICAgIC8qKlxuXHQgICAgICogQ3JlYXRlcyBhIHNldCBvYmplY3Qgb2YgYHZhbHVlc2AuXG5cdCAgICAgKlxu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yQvLCcnKTtcbiAgICB9XG4gICAgcmVxLmdldCgnL3Byb2plY3RzLycgKyBwcm9qZWN0ICsgJy9lcnJvcnMnLCB7XG4gICAgICAgIHBhcmFtczogcGFyYW1zXG4gICAgfSlcbiAgICAgICAgLnRoZW4oKHJlcykgPT4ge1xuICAgICAgICAgICAgY29uc3Qgc29ydGVkID0gXy5zb3J0QnkocmVzLmRhdGEuZXJyb3JzLCAoZXJyb3IpID0+IHtcbiAgICAgICAgICAgICAgICByZXR1cm4gLTEgKiBtb21lbnQoZXJyb3IubGFzdFVwZGF0ZWQpLnZhbHVlT2YoKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgcmlvdC5tb3VudCgnYXBwJywgJ2Vycm9ycycsIHtcbiAgICAgICAgICAgICAgICBwcm9qZWN0OiBkZWNvZGVVUklDb21wb25lbnQocHJvamVjdCksXG4gICAgICAgICAgICAgICAgZXJyb3JzOiBzb3J0ZWQsXG4gICAgICAgICAgICAgICAgbW9tZW50OiBtb21lbnQsXG4gICAgICAgICAgICAgICAgcmVxOiByZXEsXG4gICAgICAgICAgICAgICAgY29uZmlnOiBjb25maWdcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goKGVycikgPT4ge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGVycik7XG4gICAgICAgIH0pO1xufSk7XG5cbnJpb3Qucm91dGUoJy9wcm9qZWN0cy8qL2Vycm9ycy8qJywgKHByb2plY3QsIG1lc3NhZ2UpID0+IHtcbiAgICBjb25zdCBxID0gcmlvdC5yb3V0ZS5xdWVyeSgpO1xuICAgIGxldCBzdGFydCA9IG1vbWVudCgpLnN0YXJ0T2YoJ21vbnRoJykuZm9ybWF0KCk7XG4gICAgbGV0IGVuZCA9IG1vbWVudCgpLmVuZE9mKCdtb250aCcpLmZvcm1hdCgpO1xuXG4gICAgaWYgKHEuaGFzT3duUHJvcGVydHkoJ3N0YXJ0JykgJiYgcS5zdGFydCAmJiBxLmhhc093blByb3BlcnR5KCdlbmQnKSAmJiBxLmVuZCkge1xuICAgICAgICBzdGFydCA9IG1vbWVudChxLnN0YXJ0LnJlcGxhY2UoLyMuKyQvLCcnKSwgJ1lZWVktTU0tRERUSEg6bW06c3MnKS5mb3JtYXQoKTtcbiAgICAgICAgZW5kID0gbW9tZW50KHEuZW5kLnJlcGxhY2UoLyMuKyQvLCcnKSwgJ1lZWVktTU0tRERUSEg6bW06c3MnKS5mb3JtYXQoKTtcbiAgICB9XG5cbiAgICBQcm9taXNlLmFsbChbXG4gICAgICAgIHJlcS5nZXQoJy9wcm9qZWN0cy8nICsgcHJvamVjdCArICcvZXJyb3JzLycgKyBtZXNzYWdlLCB7XG4gICAgICAgICAgICBwYXJhbXM6IHtcbiAgICAgICAgICAgICAgICBzdGFydDogc3RhcnQsXG4gICAgICAgICAgICAgICAgZW5kOiBlbmRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSksXG4gICAgICAgIHJlcS5nZXQoJy9wcm9qZWN0cy8nICsgcHJvamVjdCArICcvZXJyb3JzLycgKyBtZXNzYWdlICsgJy9vY2N1cnJlbmNlcycsIHtcbiAgICAgICAgICAgIHBhcmFtczoge1xuICAgICAgICAgICAgICAgIGFmdGVyOiBudWxsLFxuICAgICAgICAgICAgICAgIGxpbWl0OiAxMFxuICAgICAgICAgICAgfVxuICAgICAgICB9KVxuICAgIF0pXG4gICAgICAgIC50aGVuKChyZXMpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGVycm9yID0gcmVzWzBdO1xuICAgICAgICAgICAgY29uc3Qgb2NjdXJyZW5jZXMgPSByZXNbMV0uZGF0YS5vY2N1cnJlbmNlcztcbiAgICAgICAgICAgIGNvbnN0IG9taXR0ZWQgPSBfLm9taXQoZXJyb3IuZGF0YS5tZXRhLCBbXG4gICAgICAgICAgICAgICAgJ3Byb2plY3QnLFxuICAgICAgICAgICAgICAgICdtZXNzYWdlJyxcbiAgICAgICAgICAgICAgICAndHlwZScsXG4gICAgICAgICAgICAgICAgJ2JhY2t0cmFjZScsXG4gICAgICAgICAgICAgICAgJ3RpbWVzdGFtcCcsXG4gICAgICAgICAgICAgICAgJ2V2ZW50JyxcbiAgICAgICAgICAgICAgICAnbm90aWZpY2F0aW9ucycsXG4gICAgICAgICAgICAgICAgJ3JldmVyc2VkVW5peHRpbWUnXG4gICAgICAgICAgICBdKTtcblxuICAgICAgICAgICAgcmlvdC5tb3VudCgnYXBwJywgJ292ZXJ2aWV3Jywge1xuICAgICAgICAgICAgICAgIHJlcTogcmVxLFxuICAgICAgICAgICAgICAgIHByb2plY3Q6IGVycm9yLmRhdGEubWV0YS5wcm9qZWN0LFxuICAgICAgICAgICAgICAgIG1lc3NhZ2U6IGVycm9yLmRhdGEubWV0YS5tZXNzYWdlLFxuICAgICAgICAgICAgICAgIHR5cGU6IGVycm9yLmRhdGEubWV0YS50eXBlLFxuICAgICAgICAgICAgICAgIG1ldGE6IG9taXR0ZWQsXG4gICAgICAgICAgICAgICAgYmFja3RyYWNlOiBlcnJvci5kYXRhLm1ldGEuYmFja3RyYWNlLFxuICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogZXJyb3IuZGF0YS5tZXRhLnRpbWVzdGFtcCxcbiAgICAgICAgICAgICAgICBvY2N1cnJlbmNlczogb2NjdXJyZW5jZXMsXG4gICAgICAgICAgICAgICAgd29vdGhlZTogd29vdGhlZSxcbiAgICAgICAgICAgICAgICBpdGVtczogZXJyb3IuZGF0YS50aW1lbGluZS5lcnJvcnMsXG4gICAgICAgICAgICAgICAgYzM6IGMzLFxuICAgICAgICAgICAgICAgIF86IF8sXG4gICAgICAgICAgICAgICAgbW9tZW50OiBtb21lbnQsXG4gICAgICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LFxuICAgICAgICAgICAgICAgIGVuZDogZW5kXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKChlcnIpID0+IHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihlcnIpO1xuICAgICAgICB9KTtcbn0pO1xuXG5yaW90LnJvdXRlKCcvcHJvamVjdHMvKi9lcnJvcnMvKi9vY2N1cnJlbmNlcy8qJywgKHByb2plY3QsIG1lc3NhZ2UsIHJldmVyc2VkVW5peHRpbWUpID0+IHtcbiAgICByZXEuZ2V0KCcvcHJvamVjdHMvJyArIHByb2plY3QgKyAnL2Vycm9ycy8nICsgbWVzc2FnZSArICcvb2NjdXJyZW5jZXMvJyArIHJldmVyc2VkVW5peHRpbWUsIHtcbiAgICB9KVxuICAgICAgICAudGhlbigocmVzKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBlcnJvciA9IHJlcztcbiAgICAgICAgICAgIGNvbnN0IG9taXR0ZWQgPSBfLm9taXQoZXJyb3IuZGF0YS5tZXRhLCBbXG4gICAgICAgICAgICAgICAgJ3Byb2plY3QnLFxuICAgICAgICAgICAgICAgICdtZXNzYWdlJyxcbiAgICAgICAgICAgICAgICAndHlwZScsXG4gICAgICAgICAgICAgICAgJ2JhY2t0cmFjZScsXG4gICAgICAgICAgICAgICAgJ3RpbWVzdGFtcCcsXG4gICAgICAgICAgICAgICAgJ2V2ZW50JyxcbiAgICAgICAgICAgICAgICAnbm90aWZpY2F0aW9ucycsXG4gICAgICAgICAgICAgICAgJ3JldmVyc2VkVW5peHRpbWUnXG4gICAgICAgICAgICBdKTtcblxuICAgICAgICAgICAgcmlvdC5tb3VudCgnYXBwJywgJ29jY3VycmVuY2UnLCB7XG4gICAgICAgICAgICAgICAgcHJvamVjdDogZXJyb3IuZGF0YS5tZXRhLnByb2plY3QsXG4gICAgICAgICAgICAgICAgbWVzc2FnZTogZXJyb3IuZGF0YS5tZXRhLm1lc3NhZ2UsXG4gICAgICAgICAgICAgICAgdHlwZTogZXJyb3IuZGF0YS5tZXRhLnR5cGUsXG4gICAgICAgICAgICAgICAgbWV0YTogb21pdHRlZCxcbiAgICAgICAgICAgICAgICBiYWNrdHJhY2U6IGVycm9yL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XG59IGVsc2Uge1xuICAgIHNvbWUgPSBmdW5jdGlvbiAoZnVuKSB7XG4gICAgICAgIHZhciB0ID0gT2JqZWN0KHRoaXMpO1xuICAgICAgICB2YXIgbGVuID0gdC5sZW5ndGggPj4+IDA7XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW47IGkrKykge1xuICAgICAgICAgICAgaWYgKGkgaW4gdCAmJiBmdW4uY2FsbCh0aGlzLCB0W2ldLCBpLCB0KSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH07XG59XG5cbnZhciBzb21lJDEgPSBzb21lO1xuXG5mdW5jdGlvbiBpc1ZhbGlkKG0pIHtcbiAgICBpZiAobS5faXNWYWxpZCA9PSBudWxsKSB7XG4gICAgICAgIHZhciBmbGFncyA9IGdldFBhcnNpbmdGbGFncyhtKTtcbiAgICAgICAgdmFyIHBhcnNlZFBhcnRzID0gc29tZSQxLmNhbGwoZmxhZ3MucGFyc2VkRGF0ZVBhcnRzLCBmdW5jdGlvbiAoaSkge1xuICAgICAgICAgICAgcmV0dXJuIGkgIT0gbnVsbDtcbiAgICAgICAgfSk7XG4gICAgICAgIHZhciBpc05vd1ZhbGlkID0gIWlzTmFOKG0uX2QuZ2V0VGltZSgpKSAmJlxuICAgICAgICAgICAgZmxhZ3Mub3ZlcmZsb3cgPCAwICYmXG4gICAgICAgICAgICAhZmxhZ3MuZW1wdHkgJiZcbiAgICAgICAgICAgICFmbGFncy5pbnZhbGlkTW9udGggJiZcbiAgICAgICAgICAgICFmbGFncy5pbnZhbGlkV2Vla2RheSAmJlxuICAgICAgICAgICAgIWZsYWdzLm51bGxJbnB1dCAmJlxuICAgICAgICAgICAgIWZsYWdzLmludmFsaWRGb3JtYXQgJiZcbiAgICAgICAgICAgICFmbGFncy51c2VySW52YWxpZGF0ZWQgJiZcbiAgICAgICAgIC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XG4gICAgZm9yIChpID0gMDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICAgIGlmICgoZG9udENvbnZlcnQgJiYgYXJyYXkxW2ldICE9PSBhcnJheTJbaV0pIHx8XG4gICAgICAgICAgICAoIWRvbnRDb252ZXJ0ICYmIHRvSW50KGFycmF5MVtpXSkgIT09IHRvSW50KGFycmF5MltpXSkpKSB7XG4gICAgICAgICAgICBkaWZmcysrO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBkaWZmcyArIGxlbmd0aERpZmY7XG59XG5cbmZ1bmN0aW9uIHdhcm4obXNnKSB7XG4gICAgaWYgKGhvb2tzLnN1cHByZXNzRGVwcmVjYXRpb25XYXJuaW5ncyA9PT0gZmFsc2UgJiZcbiAgICAgICAgICAgICh0eXBlb2YgY29uc29sZSAhPT0gICd1bmRlZmluZWQnKSAmJiBjb25zb2xlLndhcm4pIHtcbiAgICAgICAgY29uc29sZS53YXJuKCdEZXByZWNhdGlvbiB3YXJuaW5nOiAnICsgbXNnKTtcbiAgICB9XG59XG5cbmZ1bmN0aW9uIGRlcHJlY2F0ZShtc2csIGZuKSB7XG4gICAgdmFyIGZpcnN0VGltZSA9IHRydWU7XG5cbiAgICByZXR1cm4gZXh0ZW5kKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgaWYgKGhvb2tzLmRlcHJlY2F0aW9uSGFuZGxlciAhPSBudWxsKSB7XG4gICAgICAgICAgICBob29rcy5kZXByZWNhdGlvbkhhbmRsZXIobnVsbCwgbXNnKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoZmlyc3RUaW1lKSB7XG4gICAgICAgICAgICB2YXIgYXJncyA9IFtdO1xuICAgICAgICAgICAgdmFyIGFyZztcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYXJndW1lbnRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgYXJnID0gJyc7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBhcmd1bWVudHNbaV0gPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgICAgIGFyZyArPSAnXFxuWycgKyBpICsgJ10gJztcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIga2V5IGluIGFyZ3VtZW50c1swXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXJnICs9IGtleSArICc6ICcgKyBhcmd1bWVudHNbMF1ba2V5XSArICcsICc7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYXJnID0gYXJnLnNsaWNlKDAsIC0yKTsgLy8gUmVtb3ZlIHRyYWlsaW5nIGNvbW1hIGFuZCBzcGFjZVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGFyZyA9IGFyZ3VtZW50c1tpXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYXJncy5wdXNoKGFyZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB3YXJuKG1zZyArICdcXG5Bcmd1bWVudHM6ICcgKyBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmdzKS5qb2luKCcnKSArICdcXG4nICsgKG5ldyBFcnJvcigpKS5zdGFjayk7XG4gICAgICAgICAgICBmaXJzdFRpbWUgPSBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZm4uYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICB9LCBmbik7XG59XG5cbnZhciBkZXByZWNhdGlvbnMgPSB7fTtcblxuZnVuY3Rpb24gZGVwcmVjYXRlU2ltcGxlKG5hbWUsIG1zZykge1xuICAgIGlmIChob29rcy5kZXByZWNhdGlvbkhhbmRsZXIgIT0gbnVsbCkge1xuICAgICAgICBob29rcy5kZXByZWNhdGlvbkhhbmRsZXIobmFtZSwgbXNnKTtcbiAgICB9XG4gICAgaWYgKCFkZXByZWNhdGlvbnNbbmFtZV0pIHtcbiAgICAgICAgd2Fybihtc2cpO1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NlLnNvdXJjZSB8fCB0aGlzLl9vcmRpbmFsUGFyc2Uuc291cmNlKSArXG4gICAgICAgICAgICAnfCcgKyAoL1xcZHsxLDJ9Lykuc291cmNlKTtcbn1cblxuZnVuY3Rpb24gbWVyZ2VDb25maWdzKHBhcmVudENvbmZpZywgY2hpbGRDb25maWcpIHtcbiAgICB2YXIgcmVzID0gZXh0ZW5kKHt9LCBwYXJlbnRDb25maWcpLCBwcm9wO1xuICAgIGZvciAocHJvcCBpbiBjaGlsZENvbmZpZykge1xuICAgICAgICBpZiAoaGFzT3duUHJvcChjaGlsZENvbmZpZywgcHJvcCkpIHtcbiAgICAgICAgICAgIGlmIChpc09iamVjdChwYXJlbnRDb25maWdbcHJvcF0pICYmIGlzT2JqZWN0KGNoaWxkQ29uZmlnW3Byb3BdKSkge1xuICAgICAgICAgICAgICAgIHJlc1twcm9wXSA9IHt9O1xuICAgICAgICAgICAgICAgIGV4dGVuZChyZXNbcHJvcF0sIHBhcmVudENvbmZpZ1twcm9wXSk7XG4gICAgICAgICAgICAgICAgZXh0ZW5kKHJlc1twcm9wXSwgY2hpbGRDb25maWdbcHJvcF0pO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjaGlsZENvbmZpZ1twcm9wXSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgcmVzW3Byb3BdID0gY2hpbGRDb25maWdbcHJvcF07XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSByZXNbcHJvcF07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgZm9yIChwcm9wIGluIHBhcmVudENvbmZpZykge1xuICAgICAgICBpZiAoaGFzT3duUHJvcChwYXJlbnRDb25maWcsIHByb3ApICYmXG4gICAgICAgICAgICAgICAgIWhhc093blByb3AoY2hpbGRDb25maWcsIHByb3ApICYmXG4gICAgICAgICAgICAgICAgaXNPYmplY3QocGFyZW50Q29uZmlnW3Byb3BdKSkge1xuICAgICAgIC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H1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBub3JtYWxpemVkSW5wdXQ7XG59XG5cbnZhciBwcmlvcml0aWVzID0ge307XG5cbmZ1bmN0aW9uIGFkZFVuaXRQcmlvcml0eSh1bml0LCBwcmlvcml0eSkge1xuICAgIHByaW9yaXRpZXNbdW5pdF0gPSBwcmlvcml0eTtcbn1cblxuZnVuY3Rpb24gZ2V0UHJpb3JpdGl6ZWRVbml0cyh1bml0c09iaikge1xuICAgIHZhciB1bml0cyA9IFtdO1xuICAgIGZvciAodmFyIHUgaW4gdW5pdHNPYmopIHtcbiAgICAgICAgdW5pdHMucHVzaCh7dW5pdDogdSwgcHJpb3JpdHk6IHByaW9yaXRpZXNbdV19KTtcbiAgICB9XG4gICAgdW5pdHMuc29ydChmdW5jdGlvbiAoYSwgYikge1xuICAgICAgICByZXR1cm4gYS5wcmlvcml0eSAtIGIucHJpb3JpdHk7XG4gICAgfSk7XG4gICAgcmV0dXJuIHVuaXRzO1xufVxuXG5mdW5jdGlvbiBtYWtlR2V0U2V0ICh1bml0LCBrZWVwVGltZSkge1xuICAgIHJldHVybiBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgaWYgKHZhbHVlICE9IG51bGwpIHtcbiAgICAgICAgICAgIHNldCQxKHRoaXMsIHVuaXQsIHZhbHVlKTtcbiAgICAgICAgICAgIGhvb2tzLnVwZGF0ZU9mZnNldCh0aGlzLCBrZWVwVGltZSk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiBnZXQodGhpcywgdW5pdCk7XG4gICAgICAgIH1cbiAgICB9O1xufVxuXG5mdW5jdGlvbiBnZXQgKG1vbSwgdW5pdCkge1xuICAgIHJldHVybiBtb20uaXNWYWxpZCgpID9cbiAgICAgICAgbW9tLl9kWydnZXQnICsgKG1vbS5faXNVVEMgPyAnVVRDJyA6ICcnKSArIHVuaXRdKCkgOiBOYU47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SAwOyBpIDwgMTI7ICsraSkge1xuICAgICAgICAgICAgbW9tID0gY3JlYXRlVVRDKFsyMDAwLCBpXSk7XG4gICAgICAgICAgICB0aGlzLl9zaG9ydE1vbnRoc1BhcnNlW2ldID0gdGhpcy5tb250aHNTaG9ydChtb20sICcnKS50b0xvY2FsZUxvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgdGhpcy5fbG9uZ01vbnRoc1BhcnNlW2ldID0gdGhpcy5tb250aHMobW9tLCAnJykudG9Mb2NhbGVMb3dlckNhc2UoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGlmIChzdHJpY3QpIHtcbiAgICAgICAgaWYgKGZvcm1hdCA9PT0gJ01NTScpIHtcbiAgICAgICAgICAgIGlpID0gaW5kZXhPZiQxLmNhbGwodGhpcy5fc2hvcnRNb250aHNQYXJzZSwgbGxjKTtcbiAgICAgICAgICAgIHJldHVybiBpaSAhPT0gLTEgPyBpaSA6IG51bGw7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpaSA9IGluZGV4T2YkMS5jYWxsKHRoaXMuX2xvbmdNb250aHNQYXJzZSwgbGxjKTtcbiAgICAgICAgICAgIHJldHVybiBpaSAhPT0gLTEgPyBpaSA6IG51bGw7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoZm9ybWF0ID09PSAnTU1NJykge1xuICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl9zaG9ydE1vbnRoc1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgaWYgKGlpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpaTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlpID0gaW5kZXhPZiQxLmNhbGwodGhpcy5fbG9uZ01vbnRoc1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgcmV0dXJuIGlpICE9PSAtMSA/IGlpIDogbnVsbDtcbiAgICAgICAgfSBlbHNlIHtc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bnVsbDtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICAgIGlmIChmb3JtYXQgPT09ICdkZGRkJykge1xuICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl93ZWVrZGF5c1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgaWYgKGlpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpaTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlpID0gaW5kZXhPZiQxLmNhbGwodGhpcy5fc2hvcnRXZWVrZGF5c1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgaWYgKGlpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpaTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlpID0gaW5kZXhPZiQxLmNhbGwodGhpcy5fbWluV2Vla2RheXNQYXJzZSwgbGxjKTtcbiAgICAgICAgICAgIHJldHVybiBpaSAhPT0gLTEgPyBpaSA6IG51bGw7XG4gICAgICAgIH0gZWxzZSBpZiAoZm9ybWF0ID09PSAnZGRkJykge1xuICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl9zaG9ydFdlZWtkYXlzUGFyc2UsIGxsYyk7XG4gICAgICAgICAgICBpZiAoaWkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGlpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWkgPSBpbmRleE9mJDEuY2FsbCh0aGlzLl93ZWVrZGF5c1BhcnNlLCBsbGMpO1xuICAgICAgICAgICAgaWYgKGlpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpaTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlpID0gaW5kZXhPZiQxLmNhbGwodGhpcy5fbWluV2Vla2RheXNQYXJzZSwgbGxjKTtcbiAgICAgICAgICAgIHJldHVybiBpaSAhPT0gLTEgPyBpaSA6IG51bGw7XG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GUoJ2RlZmluZUxvY2FsZU92ZXJyaWRlJyxcbiAgICAgICAgICAgICAgICAgICAgJ3VzZSBtb21lbnQudXBkYXRlTG9jYWxlKGxvY2FsZU5hbWUsIGNvbmZpZykgdG8gY2hhbmdlICcgK1xuICAgICAgICAgICAgICAgICAgICAnYW4gZXhpc3RpbmcgbG9jYWxlLiBtb21lbnQuZGVmaW5lTG9jYWxlKGxvY2FsZU5hbWUsICcgK1xuICAgICAgICAgICAgICAgICAgICAnY29uZmlnKSBzaG91bGQgb25seSBiZSB1c2VkIGZvciBjcmVhdGluZyBhIG5ldyBsb2NhbGUgJyArXG4gICAgICAgICAgICAgICAgICAgICdTZWUgaHR0cDovL21vbWVudGpzLmNvbS9ndWlkZXMvIy93YXJuaW5ncy9kZWZpbmUtbG9jYWxlLyBmb3IgbW9yZSBpbmZvLicpO1xuICAgICAgICAgICAgcGFyZW50Q29uZmlnID0gbG9jYWxlc1tuYW1lXS5fY29uZmlnO1xuICAgICAgICB9IGVsc2UgaWYgKGNvbmZpZy5wYXJlbnRMb2NhbGUgIT0gbnVsbCkge1xuICAgICAgICAgICAgaWYgKGxvY2FsZXNbY29uZmlnLnBhcmVudExvY2FsZV0gIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHBhcmVudENvbmZpZyA9IGxvY2FsZXNbY29uZmlnLnBhcmVudExvY2FsZV0uX2NvbmZpZztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKCFsb2NhbGVGYW1pbGllc1tjb25maWcucGFyZW50TG9jYWxlXSkge1xuICAgICAgICAgICAgICAgICAgICBsb2NhbGVGYW1pbGllc1tjb25maWcucGFyZW50TG9jYWxlXSA9IFtdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsb2NhbGVGYW1pbGllc1tjb25maWcucGFyZW50TG9jYWxlXS5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogbmFtZSxcbiAgICAgICAgICAgICA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uICAgICAgICAvLyBNRVJHRVxuICAgICAgICBpZiAobG9jYWxlc1tuYW1lXSAhPSBudWxsKSB7XG4gICAgICAgICAgICBwYXJlbnRDb25maWcgPSBsb2NhbGVzW25hbWVdLl9jb25maWc7XG4gICAgICAgIH1cbiAgICAgICAgY29uZmlnID0gbWVyZ2VDb25maWdzKHBhcmVudENvbmZpZywgY29uZmlnKTtcbiAgICAgICAgbG9jYWxlID0gbmV3IExvY2FsZShjb25maWcpO1xuICAgICAgICBsb2NhbGUucGFyZW50TG9jYWxlID0gbG9jYWxlc1tuYW1lXTtcbiAgICAgICAgbG9jYWxlc1tuYW1lXSA9IGxvY2FsZTtcblxuICAgICAgICAvLyBiYWNrd2FyZHMgY29tcGF0IGZvciBub3c6IGFsc28gc2V0IHRoZSBsb2NhbGVcbiAgICAgICAgZ2V0U2V0R2xvYmFsTG9jYWxlKG5hbWUpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIHBhc3MgbnVsbCBmb3IgY29uZmlnIHRvIHVudXBkYXRlLCB1c2VmdWwgZm9yIHRlc3RzXG4gICAgICAgIGlmIChsb2NhbGVzW25hbWVdICE9IG51bGwpIHtcbiAgICAgICAgICAgIGlmIChsb2NhbGVzW25hbWVdLnBhcmVudExvY2FsZSAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgbG9jYWxlc1tuYW1lXSA9IGxvY2FsZXNbbmFtZV0ucGFyZW50TG9jYWxlO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChsb2NhbGVzW25hbWVdICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICBkZWxldGUgbG9jYWxlc1tuYW1lXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gbG9jYWxlc1tuYW1lXTtcbn1cblxuLy8gcmV0dXJucyBsb2NhbGUgZGF0YVxuZnVuY3Rpb24gZ2V0TG9jYWxlIChrZXkpIHtcbiAgICB2YXIgbG9jYWxlO1xuXG4gICAgaWYgKGtleSAmJiBrZXkuX2xvY2FsZSAmJiBrZXkuX2xvY2FsZS5fYWJicikge1xuICAgICAgICBrZXkgPSBrZXkuX2xvY2FsZS5fYWJicjtcbiAgICB9XG5cbiAgICBpZiAoIWtleSkge1xuICAgICAgICByZXR1cm4gZ2xvYmFsTG9jYWxlO1xuICAgIH1cblxuICAgIGlmICghaXNBcnJheShrZXkpKSB7XG4gICAgICAgIC8vc2hvcnQtY2lyY3VpdCBldmVyeXRoaW5nIGVsc2VcbiAgICAgICAgbG9jYWxlID0gbG9hZExvY2FsZShrZXkpO1xuICAgICAgICBpZiAobG9jYWxlKSB7XG4gICAgICAgICAgICByZXR1cm4gbG9jYWxlO1xuICAgICAgICB9XG4gICAgICAgIGtleSA9IFtrZXldO1xuICAgIH1cblxuICAgIHJldHVybiBjaG9vc2VMb2NhbGUoa2V5KTtcbn1cblxuZnVuY3Rpb24gbGlzdExvY2FsZXMoKSB7XG4gICAgcmV0dXJuIGtleXMkMShsb2NhbGVzKTtcbn1cblxuZnVuY3Rpb24gY2hlY2tPdmVyZmxvdyAobSkge1xuICAgIHZhciBvdmVyZmxvdztcbiAgICB2YXIgYSA9IG0uX2E7XG5cbiAgICBpZiAoYSAmJiBnZXRQYXJzaW5nRmxhZ3MobSkub3ZlcmZsb3cgPT09IC0yKSB7XG4gICAgICAgIG92ZXJmbG93ID1cbiAgICAgICAgICAgIGFbTU9OVEhdICAgICAgIDwgMCB8fCBhW01PTlRIXSAgICAgICA+IDExICA/IE1PTlRIIDpcbiAgICAgICAgICAgIGFbREFURV0gICAgICAgIDwgMSB8fCBhW0RBVEVdICAgICAgICA+IGRheXNJbk1vbnRoKGFbWUVBUl0sIGFbTU9OVEhdKSA/IERBVEUgOlxuICAgICAgICAgICAgYVtIT1VSXSAgICAgICAgPCAwIHx8IGFbSE9VUl0gICAgICAgID4gMjQgfHwgKGFbSE9VUl0gPT09IDI0ICYmIChhW01JTlVURV0gIT09IDAgfHwgYVtTRUNPTkRdICE9PSA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ZWMoc3RyaW5nKSxcbiAgICAgICAgYWxsb3dUaW1lLCBkYXRlRm9ybWF0LCB0aW1lRm9ybWF0LCB0ekZvcm1hdDtcblxuICAgIGlmIChtYXRjaCkge1xuICAgICAgICBnZXRQYXJzaW5nRmxhZ3MoY29uZmlnKS5pc28gPSB0cnVlO1xuXG4gICAgICAgIGZvciAoaSA9IDAsIGwgPSBpc29EYXRlcy5sZW5ndGg7IGkgPCBsOyBpKyspIHtcbiAgICAgICAgICAgIGlmIChpc29EYXRlc1tpXVsxXS5leGVjKG1hdGNoWzFdKSkge1xuICAgICAgICAgICAgICAgIGRhdGVGb3JtYXQgPSBpc29EYXRlc1tpXVswXTtcbiAgICAgICAgICAgICAgICBhbGxvd1RpbWUgPSBpc29EYXRlc1tpXVsyXSAhPT0gZmFsc2U7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGRhdGVGb3JtYXQgPT0gbnVsbCkge1xuICAgICAgICAgICAgY29uZmlnLl9pc1ZhbGlkID0gZmFsc2U7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1hdGNoWzNdKSB7XG4gICAgICAgICAgICBmb3IgKGkgPSAwLCBsID0gaXNvVGltZXMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzb1RpbWVzW2ldWzFdLmV4ZWMobWF0Y2hbM10pKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIG1hdGNoWzJdIHNob3VsZCBiZSAnVCcgb3Igc3BhY2VcbiAgICAgICAgICAgICAgICAgICAgdGltZUZvcm1hdCA9IChtYXRjaFsyXSB8fCAnICcpICsgaXNvVGltZXNbaV1bMF07XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0aW1lRm9ybWF0ID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBjb25maWcuX2lzVmFsaWQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFhbGxvd1RpbWUgJiYgdGltZUZvcm1hdCAhPSBudWxsKSB7XG4gICAgICAgICAgICBjb25maWcuX2lzVmFsaWQgPSBmYWxzZTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWF0Y2hbNF0pIHtcbiAgICAgICAgICAgIGlmICh0elJlZ2V4LmV4ZWMobWF0Y2hbNF0pKSB7XG4gICAgICAgICAgICAgICAgdHpGb3JtYXQgPSAnWic7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbmZpZy5faXNWYWxpZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBjb25maWcuX2YgPSBkYXRlRm9ybWF0ICsgKHRpbWVGb3JtYXQgfHwgJycpICsgKHR6Rm9ybWF0IHx8ICcnKTtcbiAgICAgICAgY29uZmlnRnJvbVN0cmluZ0FuZEZvcm1hdChjb25maWcpO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIGNvbmZpZy5faXNWYWxpZCA9IGZhbHNlO1xuICAgIH1cbn1cblxuLy8gUkZDIDI4MjIgcmVnZXg6IEZvciBkZXRhaWxzIHNlZSBodHRwczovL3Rvb2xzLmlldGYub3JnL2h0bWwvcmZjMjgyMiNzZWN0aW9uLTMuM1xudmFyIGJhc2ljUmZjUmVnZXggPSAvXigoPzpNb258VHVlfFdlZHxUaHV8RnJpfFNhdHxTdW4pLD9cXHMpPyhcXGQ/XFxkXFxzKD86SmFufEZlYnxNYXJ8QXByfE1heXxKdW58SnVsfEF1Z3xTZXB8T2N0fE5vdnxEZWMpXFxzKD86XFxkXFxkKT9cXGRcXGRcXHM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AgICAgICB9XG5cbiAgICAgICAgc3dpdGNoIChtYXRjaFs1XS5sZW5ndGgpIHtcbiAgICAgICAgICAgIGNhc2UgMjogLy8gbWlsaXRhcnlcbiAgICAgICAgICAgICAgICBpZiAodGltZXpvbmVJbmRleCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICB0aW1lem9uZSA9ICcgKzAwMDAnO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRpbWV6b25lSW5kZXggPSBtaWxpdGFyeS5pbmRleE9mKG1hdGNoWzVdWzFdLnRvVXBwZXJDYXNlKCkpIC0gMTI7XG4gICAgICAgICAgICAgICAgICAgIHRpbWV6b25lID0gKCh0aW1lem9uZUluZGV4IDwgMCkgPyAnIC0nIDogJyArJykgK1xuICAgICAgICAgICAgICAgICAgICAgICAgKCgnJyArIHRpbWV6b25lSW5kZXgpLnJlcGxhY2UoL14tPy8sICcwJykpLm1hdGNoKC8uLiQvKVswXSArICcwMCc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSA0OiAvLyBab25lXG4gICAgICAgICAgICAgICAgdGltZXpvbmUgPSB0aW1lem9uZXNbbWF0Y2hbNV1dO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgZGVmYXVsdDogLy8gVVQgb3IgKy8tOTk5OVxuICAgICAgICAgICAgICAgIHRpbWV6b25lID0gdGltZXpvbmVzWycgR01UJ107XG4gICAgICAgIH1cbiAgICAgICAgbWF0Y2hbNV0gPSB0aW1lem9uZTtcbiAgICAgICAgY29uZmlnLl9pID0gbWF0Y2guc3BsaWNlKDEpLmpvaW4oJycpO1xuICAgICAgICB0ekZvcm1hdCA9ICcgWlonO1xuICAgICAgICBjb25maWcuX2YgPSBkYXlGb3JtYXQgKyBkYXRlRm9ybWF0ICsgdGltZUZvcm1hdCArIHR6Rm9ybWF0O1xuICAgICAgICBjb25maW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RJbnB1dCkpO1xuICAgICAgICAgICAgaWYgKHNraXBwZWQubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIGdldFBhcnNpbmdGbGFncyhjb25maWcpLnVudXNlZElucHV0LnB1c2goc2tpcHBlZCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzdHJpbmcgPSBzdHJpbmcuc2xpY2Uoc3RyaW5nLmluZGV4T2YocGFyc2VkSW5wdXQpICsgcGFyc2VkSW5wdXQubGVuZ3RoKTtcbiAgICAgICAgICAgIHRvdGFsUGFyc2VkSW5wdXRMZW5ndGggKz0gcGFyc2VkSW5wdXQubGVuZ3RoO1xuICAgICAgICB9XG4gICAgICAgIC8vIGRvbid0IHBhcnNlIGlmIGl0J3Mgbm90IGEga25vd24gdG9rZW5cbiAgICAgICAgaWYgKGZvcm1hdFRva2VuRnVuY3Rpb25zW3Rva2VuXSkge1xuICAgICAgICAgICAgaWYgKHBhcnNlZElucHV0KSB7XG4gICAgICAgICAgICAgICAgZ2V0UGFyc2luZ0ZsYWdzKGNvbmZpZykuZW1wdHkgPSBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGdldFBhcnNpbmdGbGFncyhjb25maWcpLnVudXNlZFRva2Vucy5wdXNoKHRva2VuKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGFkZFRpbWVUb0FycmF5RnJvbVRva2VuKHRva2VuLCBwYXJzZWRJbnB1dCwgY29uZmlnKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChjb25maWcuX3N0cmljdCAmJiAhcGFyc2VkSW5wdXQpIHtcbiAgICAgICAgICAgIGdldFBhcnNpbmdGbGFncyhjb25maWcpLnVudXNlZFRva2Vucy5wdXNoKHRva2VuKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8vIGFkZCByZW1haW5pbmcgdW5wYXJzZWQgaW5wdXQgbGVuZ3RoIHRvIHRoZSBz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bMC05LC5dKilNKT8oPzooLT9bMC05LC5dKilTKT8pPyQvO1xuXG5mdW5jdGlvbiBjcmVhdGVEdXJhdGlvbiAoaW5wdXQsIGtleSkge1xuICAgIHZhciBkdXJhdGlvbiA9IGlucHV0LFxuICAgICAgICAvLyBtYXRjaGluZyBhZ2FpbnN0IHJlZ2V4cCBpcyBleHBlbnNpdmUsIGRvIGl0IG9uIGRlbWFuZFxuICAgICAgICBtYXRjaCA9IG51bGwsXG4gICAgICAgIHNpZ24sXG4gICAgICAgIHJldCxcbiAgICAgICAgZGlmZlJlcztcblxuICAgIGlmIChpc0R1cmF0aW9uKGlucHV0KSkge1xuICAgICAgICBkdXJhdGlvbiA9IHtcbiAgICAgICAgICAgIG1zIDogaW5wdXQuX21pbGxpc2Vjb25kcyxcbiAgICAgICAgICAgIGQgIDogaW5wdXQuX2RheXMsXG4gICAgICAgICAgICBNICA6IGlucHV0Ll9tb250aHNcbiAgICAgICAgfTtcbiAgICB9IGVsc2UgaWYgKGlzTnVtYmVyKGlucHV0KSkge1xuICAgICAgICBkdXJhdGlvbiA9IHt9O1xuICAgICAgICBpZiAoa2V5KSB7XG4gICAgICAgICAgICBkdXJhdGlvbltrZXldID0gaW5wdXQ7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBkdXJhdGlvbi5taWxsaXNlY29uZHMgPSBpbnB1dDtcbiAgICAgICAgfVxuICAgIH0gZWxzZSBpZiAoISEobWF0Y2ggPSBhc3BOZXRSZWdleC5leGVjKGlucHV0KSkpIHtcbiAgICAgICAgc2lnbiA9IChtYXRjaFsxXSA9PT0gJy0nKSA/IC0xIDogMTtcbiAgICAgICAgZHVyYXRpb24gPSB7XG4gICAgICAgICAgICB5ICA6IDAsXG4gICAgICAgICAgICBkICA6IHRvSW50KG1hdGNoW0RBVEVdKSAgICAgICAgICAgICAgICAgICAgICAgICAqIHNpZ24sXG4gICAgICAgICAgICBoICA6IHRvSW50KG1hdGNoW0hPVVJdKSAgICAgICAgICAgICAgICAgICAgICAgICAqIHNpZ24sXG4gICAgICAgICAgICBtICA6IHRvSW50KG1hdGNoW01JTlVURV0pICAgICAgICAgICAgICAgICAgICAgICAqIHNpZ24sXG4gICAgICAgICAgICBzICA6IHRvSW50KG1hdGNoW1NFQ09ORF0pICAgICAgICAgICAgICAgICAgICAgICAqIHNpZ24sXG4gICAgICAgICAgICBtcyA6IHRvSW50KGFic1JvdW5kKG1hdGNoW01JTExJU0VDT05EXSAqIDEwMDApKSAqIHNpZ24gLy8gdGhlIG1pbGxpc2Vjb25kIGRlY2ltYWwgcG9pbnQgaXMgaW5jbHVkZWQgaW4gdGhlIG1hdGNoXG4gICAgICAgIH07XG4gICAgfSBlbHNlIGlmICghIShtYXRjaCA9IGlzb1JlZ2V4LmV4ZWMoaW5wdXQpKSkge1xuICAgICAgICBzaWduID0gKG1hdGNoWzFdID09PSAnLScpID8gLTEgOiAxO1xuICAgICAgICBkdXJhdGlvbiA9IHtcbiAgICAgICAgICAgIHkgOiBwYXJzZUlzbyhtYXRjaFsyXSwgc2lnbiksXG4gICAgICAgICAgICBNIDogcGFyc2VJc28obWF0Y2hbM10sIHNpZ24pLFxuICAgICAgICAgICAgdyA6IHBhcnNlSXNvKG1hdGNoWzRdLCBzaWduKSxcbiAgICAgICAgICAgIGQgOiBwYXJzZUlzbyhtYXRjaFs1XSwgc2lnbiksXG4gICAgICAgICAgICBoIDogcGFyc2VJc28obWF0Y2hbNl0sIHNpZ24pLFxuICAgICAgICAgICAgbSA6IHBhcnNlSXNvKG1hdGNoWzddLCBzaWduKSxcbiAgICAgICAgICAgIHMgOiBwYXJzZUlzbyhtYXRjaFs4XSwgc2lnbilcbiAgICAgICAgfTtcbiAgICB9IGVsc2UgaWYgKGR1cmF0aW9uID09IG51bGwpIHsvLyBjaGVja3MgZm9yIG51bGwgb3IgdW5kZWZpbmVkXG4gICAgICAgIGR1cmF0aW9uID0ge307XG4gICAgfSBlbHNlIGlmICh0eXBlb2YgZHVyYXRpb24gPT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m1hbGl6ZVVuaXRzKHVuaXRzKTtcbiAgICAvLyB0aGUgZm9sbG93aW5nIHN3aXRjaCBpbnRlbnRpb25hbGx5IG9taXRzIGJyZWFrIGtleXdvcmRzXG4gICAgLy8gdG8gdXRpbGl6ZSBmYWxsaW5nIHRocm91Z2ggdGhlIGNhc2VzLlxuICAgIHN3aXRjaCAodW5pdHMpIHtcbiAgICAgICAgY2FzZSAneWVhcic6XG4gICAgICAgICAgICB0aGlzLm1vbnRoKDApO1xuICAgICAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqL1xuICAgICAgICBjYXNlICdxdWFydGVyJzpcbiAgICAgICAgY2FzZSAnbW9udGgnOlxuICAgICAgICAgICAgdGhpcy5kYXRlKDEpO1xuICAgICAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqL1xuICAgICAgICBjYXNlICd3ZWVrJzpcbiAgICAgICAgY2FzZSAnaXNvV2Vlayc6XG4gICAgICAgIGNhc2UgJ2RheSc6XG4gICAgICAgIGNhc2UgJ2RhdGUnOlxuICAgICAgICAgICAgdGhpcy5ob3VycygwKTtcbiAgICAgICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi9cbiAgICAgICAgY2FzZSAnaG91cic6XG4gICAgICAgICAgICB0aGlzLm1pbnV0ZXMoMCk7XG4gICAgICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovXG4gICAgICAgIGNhc2UgJ21pbnV0ZSc6XG4gICAgICAgICAgICB0aGlzLnNlY29uZHMoMCk7XG4gICAgICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovXG4gICAgICAgIGNhc2UgJ3NlY29uZCc6XG4gICAgICAgICAgICB0aGlzLm1pbGxpc2Vjb25kcygwKTtcbiAgICB9XG5cbiAgICAvLyB3ZWVrcyBhcmUgYSBzcGVjaWFsIGNhc2VcbiAgICBpZiAodW5pdHMgPT09ICd3ZWVrJykge1xuICAgICAgICB0aGlzLndlZWtkYXkoMCk7XG4gICAgfVxuICAgIGlmICh1bml0cyA9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AgICAgID0gZnJvbU5vdztcbnByb3RvLnRvICAgICAgICAgICAgICAgID0gdG87XG5wcm90by50b05vdyAgICAgICAgICAgICA9IHRvTm93O1xucHJvdG8uZ2V0ICAgICAgICAgICAgICAgPSBzdHJpbmdHZXQ7XG5wcm90by5pbnZhbGlkQXQgICAgICAgICA9IGludmFsaWRBdDtcbnByb3RvLmlzQWZ0ZXIgICAgICAgICAgID0gaXNBZnRlcjtcbnByb3RvLmlzQmVmb3JlICAgICAgICAgID0gaXNCZWZvcmU7XG5wcm90by5pc0JldHdlZW4gICAgICAgICA9IGlzQmV0d2VlbjtcbnByb3RvLmlzU2FtZSAgICAgICAgICAgID0gaXNTYW1lO1xucHJvdG8uaXNTYW1lT3JBZnRlciAgICAgPSBpc1NhbWVPckFmdGVyO1xucHJvdG8uaXNTYW1lT3JCZWZvcmUgICAgPSBpc1NhbWVPckJlZm9yZTtcbnByb3RvLmlzVmFsaWQgICAgICAgICAgID0gaXNWYWxpZCQyO1xucHJvdG8ubGFuZyAgICAgICAgICAgICAgPSBsYW5nO1xucHJvdG8ubG9jYWxlICAgICAgICAgICAgPSBsb2NhbGU7XG5wcm90by5sb2NhbGVEYXRhICAgICAgICA9IGxvY2FsZURhdGE7XG5wcm90by5tYXggICAgICAgICAgICAgICA9IHByb3RvdHlwZU1heDtcbnByb3RvLm1pbiAgICAgICAgICAgICAgID0gcHJvdG90eXBlTWluO1xucHJvdG8ucGFyc2luZ0ZsYWdzICAgICAgPSBwYXJzaW5nRmxhZ3M7XG5wcm90by5zZXQgICAgICAgICAgICAgICA9IHN0cmluZ1NldDtcbnByb3RvLnN0YXJ0T2YgICAgICAgICAgID0gc3RhcnRPZjtcbnByb3RvLnN1YnRyYWN0ICAgICAgICAgID0gc3VidHJhY3Q7XG5wcm90by50b0FycmF5ICAgICAgICAgICA9IHRvQXJyYXk7XG5wcm90by50b09iamVjdCAgICAgICAgICA9IHRvT2JqZWN0O1xucHJvdG8udG9EYXRlICAgICAgICAgICAgPSB0b0RhdGU7XG5wcm90by50b0lTT1N0cmluZyAgICAgICA9IHRvSVNPU3RyaW5nO1xucHJvdG8uaW5zcGVjdCAgICAgICAgICAgPSBpbnNwZWN0O1xucHJvdG8udG9KU09OICAgICAgICAgICAgPSB0b0pTT047XG5wcm90by50b1N0cmluZyAgICAgICAgICA9IHRvU3RyaW5nO1xucHJvdG8udW5peCAgICAgICAgICAgICAgPSB1bml4O1xucHJvdG8udmFsdWVPZiAgICAgICAgICAgPSB2YWx1ZU9mO1xucHJvdG8uY3JlYXRpb25EYXRhICAgICAgPSBjcmVhdGlvbkRhdGE7XG5cbi8vIFllYXJcbnByb3RvLnllYXIgICAgICAgPSBnZXRTZXRZZWFyO1xucHJvdG8uaXNMZWFwWWVhciA9IGdldElzTGVhcFllYXI7XG5cbi8vIFdlZWsgWWVhclxucHJvdG8ud2Vla1llYXIgICAgPSBnZXRTZXRXZWVrWWVhcjtcbnByb3RvLmlzb1dlZWtZZWFyID0gZ2V0U2V0SVNPV2Vla1llYXI7XG5cbi8vIFF1YXJ0ZXJcbnByb3RvLnF1YXJ0ZXIgPSBwcm90by5xdWFydGVycyA9IGdldFNldFF1YXJ0ZXI7XG5cbi8vIE1vbnRoXG5wcm90by5tb250aCAgICAgICA9IGdldFNldE1vbnRoO1xucHJvdG8uZGF5c0luTW9udGggPSBnZXREYXlzSW5Nb250aDtcblxuLy8gV2Vla1xucHJvdG8ud2VlayAgICAgICAgICAgPSBwcm90by53ZWVrcyAgICAgICAgPSBnZXRTZXRXZWVrO1xucHJvdG8uaXNvV2VlayAgICAgICAgPSBwcm90by5pc29XZWVrcyAgICAgPSBnZXRTZXRJU09XZWVrO1xucHJvdG8ud2Vla3NJblllYXIgICAgPSBnZXRXZWVrc0luWWVhcjtcbnByb3RvLmlzb1dlZWtzSW5ZZWFyID0gZ2V0SVNPV2Vla3NJblllYXI7XG5cbi8vIERheVxucHJvdG8uZGF0ZSAgICAgICA9IGdldFNldERheU9mTW9udGg7XG5wcm90by5kY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NcbiAgICBtb250aHNGcm9tRGF5cyA9IGFic0Zsb29yKGRheXNUb01vbnRocyhkYXlzKSk7XG4gICAgbW9udGhzICs9IG1vbnRoc0Zyb21EYXlzO1xuICAgIGRheXMgLT0gYWJzQ2VpbChtb250aHNUb0RheXMobW9udGhzRnJvbURheXMpKTtcblxuICAgIC8vIDEyIG1vbnRocyAtPiAxIHllYXJcbiAgICB5ZWFycyA9IGFic0Zsb29yKG1vbnRocyAvIDEyKTtcbiAgICBtb250aHMgJT0gMTI7XG5cbiAgICBkYXRhLmRheXMgICA9IGRheXM7XG4gICAgZGF0YS5tb250aHMgPSBtb250aHM7XG4gICAgZGF0YS55ZWFycyAgPSB5ZWFycztcblxuICAgIHJldHVybiB0aGlzO1xufVxuXG5mdW5jdGlvbiBkYXlzVG9Nb250aHMgKGRheXMpIHtcbiAgICAvLyA0MDAgeWVhcnMgaGF2ZSAxNDYwOTcgZGF5cyAodGFraW5nIGludG8gYWNjb3VudCBsZWFwIHllYXIgcnVsZXMpXG4gICAgLy8gNDAwIHllYXJzIGhhdmUgMTIgbW9udGhzID09PSA0ODAwXG4gICAgcmV0dXJuIGRheXMgKiA0ODAwIC8gMTQ2MDk3O1xufVxuXG5mdW5jdGlvbiBtb250aHNUb0RheXMgKG1vbnRocykge1xuICAgIC8vIHRoZSByZXZlcnNlIG9mIGRheXNUb01vbnRoc1xuICAgIHJldHVybiBtb250aHMgKiAxNDYwOTcgLyA0ODAwO1xufVxuXG5mdW5jdGlvbiBhcyAodW5pdHMpIHtcbiAgICBpZiAoIXRoaXMuaXNWYWxpZCgpKSB7XG4gICAgICAgIHJldHVybiBOYU47XG4gICAgfVxuICAgIHZhciBkYXlzO1xuICAgIHZhciBtb250aHM7XG4gICAgdmFyIG1pbGxpc2Vjb25kcyA9IHRoaXMuX21pbGxpc2Vjb25kcztcblxuICAgIHVuaXRzID0gbm9ybWFsaXplVW5pdHModW5pdHMpO1xuXG4gICAgaWYgKHVuaXRzID09PSAnbW9udGgnIH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c2Vjb25kc10gfHxcbiAgICAgICAgICAgIG1pbnV0ZXMgPD0gMSAgICAgICAgICAgICAmJiBbJ20nXSAgICAgICAgICAgfHxcbiAgICAgICAgICAgIG1pbnV0ZXMgPCB0aHJlc2hvbGRzLm0gICAmJiBbJ21tJywgbWludXRlc10gfHxcbiAgICAgICAgICAgIGhvdXJzICAgPD0gMSAgICAgICAgICAgICAmJiBbJ2gnXSAgICAgICAgICAgfHxcbiAgICAgICAgICAgIGhvdXJzICAgPCB0aHJlc2hvbGRzLmggICAmJiBbJ2hoJywgaG91cnNdICAgfHxcbiAgICAgICAgICAgIGRheXMgICAgPD0gMSAgICAgICAgICAgICAmJiBbJ2QnXSAgICAgICAgICAgfHxcbiAgICAgICAgICAgIGRheXMgICAgPCB0aHJlc2hvbGRzLmQgICAmJiBbJ2RkJywgZGF5c10gICAgfHxcbiAgICAgICAgICAgIG1vbnRocyAgPD0gMSAgICAgICAgICAgICAmJiBbJ00nXSAgICAgICAgICAgfHxcbiAgICAgICAgICAgIG1vbnRocyAgPCB0aHJlc2hvbGRzLk0gICAmJiBbJ01NJywgbW9udGhzXSAgfHxcbiAgICAgICAgICAgIHllYXJzICAgPD0gMSAgICAgICAgICAgICAmJiBbJ3knXSAgICAgICAgICAgfHwgWyd5eScsIHllYXJzXTtcblxuICAgIGFbMl0gPSB3aXRob3V0U3VmZml4O1xuICAgIGFbM10gPSArcG9zTmVnRHVyYXRpb24gPiAwO1xuICAgIGFbNF0gPSBsb2NhbGU7XG4gICAgcmV0dXJuIHN1YnN0aXR1dGVUaW1lQWdvLmFwcGx5KG51bGwsIGEpO1xufVxuXG4vLyBUaGlzIGZ1bmN0aW9uIGFsbG93cyB5b3UgdG8gc2V0IHRoZSByb3VuZGluZyBmdW5jdGlvbiBmb3IgcmVsYXRpdmUgdGltZSBzdHJpbmdzXG5mdW5jdGlvbiBnZXRTZXRSZWxhdGl2ZVRpbWVSb3VuZGluZyAocm91bmRpbmdGdW5jdGlvbikge1xuICAgIG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ICAoTSA/IE0gKyAnTScgOiAnJykgK1xuICAgICAgICAoRCA/IEQgKyAnRCcgOiAnJykgK1xuICAgICAgICAoKGggfHwgbSB8fCBzKSA/ICdUJyA6ICcnKSArXG4gICAgICAgIChoID8gaCArICdIJyA6ICcnKSArXG4gICAgICAgIChtID8gbSArICdNJyA6ICcnKSArXG4gICAgICAgIChzID8gcyArICdTJyA6ICcnKTtcbn1cblxudmFyIHByb3RvJDIgPSBEdXJhdGlvbi5wcm90b3R5cGU7XG5cbnByb3RvJDIuaXNWYWxpZCAgICAgICAgPSBpc1ZhbGlkJDE7XG5wcm90byQyLmFicyAgICAgICAgICAgID0gYWJzO1xucHJvdG8kMi5hZGQgICAgICAgICAgICA9IGFkZCQxO1xucHJvdG8kMi5zdWJ0cmFjdCAgICAgICA9IHN1YnRyYWN0JDE7XG5wcm90byQyLmFzICAgICAgICAgICAgID0gYXM7XG5wcm90byQyLmFzTWlsbGlzZWNvbmRzID0gYXNNaWxsaXNlY29uZHM7XG5wcm90byQyLmFzU2Vjb25kcyAgICAgID0gYXNTZWNvbmRzO1xucHJvdG8kMi5hc01pbnV0ZXMgICAgICA9IGFzTWludXRlcztcbnByb3RvJDIuYXNIb3VycyAgICAgICAgPSBhc0hvdXJzO1xucHJvdG8kMi5hc0RheXMgICAgICAgICA9IGFzRGF5cztcbnByb3RvJDIuYXNXZWVrcyAgICAgICAgPSBhc1dlZWtzO1xucHJvdG8kMi5hc01vbnRocyAgICAgICA9IGFzTW9udGhzO1xucHJvdG8kMi5hc1llYXJzICAgICAgICA9IGFzWWVhcnM7XG5wcm90byQyLnZhbHVlT2YgICAgICAgID0gdmFsdWVPZiQxO1xucHJvdG8kMi5fYnViYmxlICAgICAgICA9IGJ1YmJsZTtcbnByb3RvJDIuZ2V0ICAgICAgICAgICAgPSBnZXQkMjtcbnByb3RvJDIubWlsbGlzZWNvbmRzICAgPSBtaWxsaXNlY29uZHM7XG5wcm90byQyLnNlY29uZHMgICAgICAgID0gc2Vjb25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bignWCcsIGZ1bmN0aW9uIChpbnB1dCwgYXJyYXksIGNvbmZpZykge1xuICAgIGNvbmZpZy5fZCA9IG5ldyBEYXRlKHBhcnNlRmxvYXQoaW5wdXQsIDEwKSAqIDEwMDApO1xufSk7XG5hZGRQYXJzZVRva2VuKCd4JywgZnVuY3Rpb24gKGlucHV0LCBhcnJheSwgY29uZmlnKSB7XG4gICAgY29uZmlnLl9kID0gbmV3IERhdGUodG9JbnQoaW5wdXQpKTtcbn0pO1xuXG4vLyBTaWRlIGVmZmVjdCBpbXBvcnRzXG5cblxuaG9va3MudmVyc2lvbiA9ICcyLjE4LjEnO1xuXG5zZXRIb29rQ2FsbGJhY2soY3JlYXRlTG9jYWwpO1xuXG5ob29rcy5mbiAgICAgICAgICAgICAgICAgICAgPSBwcm90bztcbmhvb2tzLm1pbiAgICAgICAgICAgICAgICAgICA9IG1pbjtcbmhvb2tzLm1heCAgICAgICAgICAgICAgICAgICA9IG1heDtcbmhvb2tzLm5vdyAgICAgICAgICAgICAgICAgICA9IG5vdztcbmhvb2tzLnV0YyAgICAgICAgICAgICAgICAgICA9IGNyZWF0ZVVUQztcbmhvb2tzLnVuaXggICAgICAgICAgICAgICAgICA9IGNyZWF0ZVVuaXg7XG5ob29rcy5tb250aHMgICAgICAgICAgICAgICAgPSBsaXN0TW9udGhzO1xuaG9va3MuaXNEYXRlICAgICAgICAgICAgICAgID0gaXNEYXRlO1xuaG9va3MubG9jYWxlICAgICAgICAgICAgICAgID0gZ2V0U2V0R2xvYmFsTG9jYWxlO1xuaG9va3MuaW52YWxpZCAgICAgICAgICAgICAgID0gY3JlYXRlSW52YWxpZDtcbmhvb2tzLmR1cmF0aW9uICAgICAgICAgICAgICA9IGNyZWF0ZUR1cmF0aW9uO1xuaG9va3MuaXNNb21lbnQgICAgICAgICAgICAgID0gaXNNb21lbnQ7XG5ob29rcy53ZWVrZGF5cyAgICAgICAgICAgICAgPSBsaXN0V2Vla2RheXM7XG5ob29rcy5wYXJzZVpvb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ICBmb3IgKHZhciBpID0gMDsgaSA8IGFyZ2xlbjsgaSsrKSB7XG4gICAgICAgICAgYXJnc1tpXSA9IGFyZ3VtZW50c1tpICsgMV0gLy8gc2tpcCBmaXJzdCBhcmd1bWVudFxuICAgICAgICB9XG5cbiAgICAgICAgb25FYWNoRXZlbnQoZXZlbnRzLCBmdW5jdGlvbihuYW1lLCBwb3MpIHtcblxuICAgICAgICAgIGZucyA9IHNsaWNlLmNhbGwoY2FsbGJhY2tzW25hbWVdIHx8IFtdLCAwKVxuXG4gICAgICAgICAgZm9yICh2YXIgaSA9IDAsIGZuOyBmbiA9IGZuc1tpXTsgKytpKSB7XG4gICAgICAgICAgICBpZiAoZm4uYnVzeSkgY29udGludWVcbiAgICAgICAgICAgIGZuLmJ1c3kgPSAxXG4gICAgICAgICAgICBmbi5hcHBseShlbCwgZm4udHlwZWQgPyBbbmFtZV0uY29uY2F0KGFyZ3MpIDogYXJncylcbiAgICAgICAgICAgIGlmIChmbnNbaV0gIT09IGZuKSB7IGktLSB9XG4gICAgICAgICAgICBmbi5idXN5ID0gMFxuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChjYWxsYmFja3NbJyonXSAmJiBuYW1lICE9ICcqJylcbiAgICAgICAgICAgIGVsLnRyaWdnZXIuYXBwbHkoZWwsIFsnKicsIG5hbWVdLmNvbmNhdChhcmdzKSlcblxuICAgICAgICB9KVxuXG4gICAgICAgIHJldHVybiBlbFxuICAgICAgfSxcbiAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgd3JpdGFibGU6IGZhbHNlLFxuICAgICAgY29uZmlndXJhYmxlOiBmYWxzZVxuICAgIH1cbiAgfSlcblxuICByZXR1cm4gZWxcblxufVxuLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbjsoZnVuY3Rpb24ocmlvdCkge1xuXG4vKipcbiAqIFNpbXBsZSBjbGllbnQtc2lkZSByb3V0ZXJcbiAqIEBtb2R1bGUgcmlvdC1yb3V0ZVxuIC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HJlT3JJZHggaW5zdGFuY2VvZiBSZWdFeHAgPyBfcmVnZXgocmVPcklkeCkgOiBfY2FjaGVbcmVPcklkeF1cbiAgfVxuXG4gIF9icmFja2V0cy5zcGxpdCA9IGZ1bmN0aW9uIHNwbGl0IChzdHIsIHRtcGwsIF9icCkge1xuICAgIC8vIGlzdGFuYnVsIGlnbm9yZSBuZXh0OiBfYnAgaXMgZm9yIHRoZSBjb21waWxlclxuICAgIGlmICghX2JwKSBfYnAgPSBfY2FjaGVcblxuICAgIHZhclxuICAgICAgcGFydHMgPSBbXSxcbiAgICAgIG1hdGNoLFxuICAgICAgaXNleHByLFxuICAgICAgc3RhcnQsXG4gICAgICBwb3MsXG4gICAgICByZSA9IF9icFs2XVxuXG4gICAgaXNleHByID0gc3RhcnQgPSByZS5sYXN0SW5kZXggPSAwXG5cbiAgICB3aGlsZSAoKG1hdGNoID0gcmUuZXhlYyhzdHIpKSkge1xuXG4gICAgICBwb3MgPSBtYXRjaC5pbmRleFxuXG4gICAgICBpZiAoaXNleHByKSB7XG5cbiAgICAgICAgaWYgKG1hdGNoWzJdKSB7XG4gICAgICAgICAgcmUubGFzdEluZGV4ID0gc2tpcEJyYWNlcyhzdHIsIG1hdGNoWzJdLCByZS5sYXN0SW5kZXgpXG4gICAgICAgICAgY29udGludWVcbiAgICAgICAgfVxuICAgICAgICBpZiAoIW1hdGNoWzNdKSB7XG4gICAgICAgICAgY29udGludWVcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoIW1hdGNoWzFdKSB7XG4gICAgICAgIHVuZXNjYXBlU3RyKHN0ci5zbGljZShzdGFydCwgcG9zKSlcbiAgICAgICAgc3RhcnQgPSByZS5sYXN0SW5kZXhcbiAgICAgICAgcmUgPSBfYnBbNiArIChpc2V4cHIgXj0gMSldXG4gICAgICAgIHJlLmxhc3RJbmRleCA9IHN0YXJ0XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKHN0ciAmJiBzdGFydCA8IHN0ci5s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x1MjA1Ny9nLFxuICAgIFJFX1FCTUFSSyA9IC9cXHUyMDU3KFxcZCspfi9nXG5cbiAgZnVuY3Rpb24gX2dldFRtcGwgKHN0cikge1xuICAgIHZhclxuICAgICAgcXN0ciA9IFtdLFxuICAgICAgZXhwcixcbiAgICAgIHBhcnRzID0gYnJhY2tldHMuc3BsaXQoc3RyLnJlcGxhY2UoUkVfRFFVT1RFLCAnXCInKSwgMSlcblxuICAgIGlmIChwYXJ0cy5sZW5ndGggPiAyIHx8IHBhcnRzWzBdKSB7XG4gICAgICB2YXIgaSwgaiwgbGlzdCA9IFtdXG5cbiAgICAgIGZvciAoaSA9IGogPSAwOyBpIDwgcGFydHMubGVuZ3RoOyArK2kpIHtcblxuICAgICAgICBleHByID0gcGFydHNbaV1cblxuICAgICAgICBpZiAoZXhwciAmJiAoZXhwciA9IGkgJiAxXG5cbiAgICAgICAgICAgID8gX3BhcnNlRXhwcihleHByLCAxLCBxc3RyKVxuXG4gICAgICAgICAgICA6ICdcIicgKyBleHByXG4gICAgICAgICAgICAgICAgLnJlcGxhY2UoL1xcXFwvZywgJ1xcXFxcXFxcJylcbiAgICAgICAgICAgICAgICAucmVwbGFjZSgvXFxyXFxuP3xcXG4vZywgJ1xcXFxuJylcbiAgICAgICAgICAgICAgICAucmVwbGFjZSgvXCIvZywgJ1xcXFxcIicpICtcbiAgICAgICAgICAgICAgJ1wiJ1xuXG4gICAgICAgICAgKSkgbGlzdFtqKytdID0gZXhwclxuXG4gICAgICB9XG5cbiAgICAgIGV4cHIgPSBqIDwgMiA/IGxpc3RbMF1cbiAgICAgICAgICAgOiAnWycgKyBsaXN0LmpvaW4oJywnKSArICddLmpvaW4oXCJcIiknXG5cbiAgICB9IGVsc2Uge1xuXG4gICAgICBleHByID0gX3BhcnNlRXhwcihwYXJ0c1sxXSwgMCwgcXN0cilcbiAgICB9XG5cbiAgICBpZiAocXN0clswXSkge1xuICAgICAgZXhwciA9IGV4cHIucmVwbGFjZShSRV9RQk1BUkssIGZ1bmN0aW9uIChfLCBwb3MpIHtcbiAgICAgICAgcmV0dXJuIHFzdHJbcG9zXVxuICAgICAgICAgIC5yZXBsYWNlKC9cXHIvZywgJ1xcXFxyJylcbiAgICAgICAgICAucmVwbGFjZSgvXFxuL2csICdcXFxcbicpXG4gICAgICB9KVxuICAgIH1cbiAgICByZXR1cm4gZXhwclxuICB9XG5cbiAgdmFyXG4gICAgUkVfQlJFTkQgPSB7XG4gICAgICAnKCc6IC9bKCldL2csXG4gICAgICAnWyc6IC9bW1xcXV0vZyxcbiAgICAgICd7JzogL1t7fV0vZ1xuICAgIH1cblxuICBmdW5jdGlvbiBfcGFyc2VFeHByIChleHByLCBhc1RleHQsIHFzdHIpIHtcblxuICAgIGV4cHIgPSBleHByXG4gICAgICAgICAgLnJlcGxhY2UoUkVfUUJMT0NLLCBmdW5jdGlvbiAocywgZGl2KSB7XG4gICAgICAgICAgICByZXR1cm4gcy5sZW5ndGggPiAyICYmICFkaXYgPyBDSF9JREVYUFIgKyAocXN0ci5wdXNoKHMpIC0gMSkgKyAnficgOiBzXG4gICAgICAgICAgfSlcbiAgICAgICAgICAucmVwbGFjZSgvXFxzKy9nLCAnICcpLnRyaW0oKVxuICAgICAgICAgIC5yZXBsYWNlKC9cXCA/KFtbXFwoe30sP1xcLjpdKVxcID8vZywgJyQxJylcblxuICAgIGlmIChleHByKSB7XG4gICAgICB2YXJcbiAgICAgICAgbGlzdCA9IFtdLFxuICAgICAgICBjbnQgPSAwLFxuICAgICAgICBtYXRjaFxuXG4gICAgICB3aGlsZSAoZXhwciAmJlxuICAgICAgICAgICAgKG1hdGNoID0gZXhwci5tYXRjaChSRV9DU05BTUUpKSAmJlxuICAgICAgICAgICAgIW1hdGNoLmluZGV4XG4gICAgICAgICkge1xuICAgICAgICB2YXJcbiAgICAgICAgICBrZXksXG4gICAgICAgICAganNiLFxuICAgICAgICAgIHJlID0gLyx8KFtbeyhdKXwkL2dcblxuICAgICAgICBleHByID0gUmVnRXhwLn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R0ck5hbWUsIHZhbHVlLCBkb20sIHRhZylcblxuICAgIC8vIGlmLSBjb25kaXRpb25hbFxuICAgIH0gZWxzZSBpZiAoYXR0ck5hbWUgPT0gJ2lmJykge1xuICAgICAgdmFyIHN0dWIgPSBleHByLnN0dWIsXG4gICAgICAgIGFkZCA9IGZ1bmN0aW9uKCkgeyBpbnNlcnRUbyhzdHViLnBhcmVudE5vZGUsIHN0dWIsIGRvbSkgfSxcbiAgICAgICAgcmVtb3ZlID0gZnVuY3Rpb24oKSB7IGluc2VydFRvKGRvbS5wYXJlbnROb2RlLCBkb20sIHN0dWIpIH1cblxuICAgICAgLy8gYWRkIHRvIERPTVxuICAgICAgaWYgKHZhbHVlKSB7XG4gICAgICAgIGlmIChzdHViKSB7XG4gICAgICAgICAgYWRkKClcbiAgICAgICAgICBkb20uaW5TdHViID0gZmFsc2VcbiAgICAgICAgICAvLyBhdm9pZCB0byB0cmlnZ2VyIHRoZSBtb3VudCBldmVudCBpZiB0aGUgdGFncyBpcyBub3QgdmlzaWJsZSB5ZXRcbiAgICAgICAgICAvLyBtYXliZSB3ZSBjYW4gb3B0aW1pemUgdGhpcyBhdm9pZGluZyB0byBtb3VudCB0aGUgdGFnIGF0IGFsbFxuICAgICAgICAgIGlmICghaXNJblN0dWIoZG9tKSkge1xuICAgICAgICAgICAgd2Fsayhkb20sIGZ1bmN0aW9uKGVsKSB7XG4gICAgICAgICAgICAgIGlmIChlbC5fdGFnICYmICFlbC5fdGFnLmlzTW91bnRlZClcbiAgICAgICAgICAgICAgICBlbC5fdGFnLmlzTW91bnRlZCA9ICEhZWwuX3RhZy50cmlnZ2VyKCdtb3VudCcpXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgLy8gcmVtb3ZlIGZyb20gRE9NXG4gICAgICB9IGVsc2Uge1xuICAgICAgICBzdHViID0gZXhwci5zdHViID0gc3R1YiB8fCBkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZSgnJ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ldHVybiBlID8gdiArIGUgKiAodmFsdWVzW2hdIC0gdikgOiB2O1xuICB9O1xuICBkMy5tZWRpYW4gPSBmdW5jdGlvbihhcnJheSwgZikge1xuICAgIHZhciBudW1iZXJzID0gW10sIG4gPSBhcnJheS5sZW5ndGgsIGEsIGkgPSAtMTtcbiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgd2hpbGUgKCsraSA8IG4pIGlmIChkM19udW1lcmljKGEgPSBkM19udW1iZXIoYXJyYXlbaV0pKSkgbnVtYmVycy5wdXNoKGEpO1xuICAgIH0gZWxzZSB7XG4gICAgICB3aGlsZSAoKytpIDwgbikgaWYgKGQzX251bWVyaWMoYSA9IGQzX251bWJlcihmLmNhbGwoYXJyYXksIGFycmF5W2ldLCBpKSkpKSBudW1iZXJzLnB1c2goYSk7XG4gICAgfVxuICAgIGlmIChudW1iZXJzLmxlbmd0aCkgcmV0dXJuIGQzLnF1YW50aWxlKG51bWJlcnMuc29ydChkM19hc2NlbmRpbmcpLCAuNSk7XG4gIH07XG4gIGQzLnZhcmlhbmNlID0gZnVuY3Rpb24oYXJyYXksIGYpIHtcbiAgICB2YXIgbiA9IGFycmF5Lmxlbmd0aCwgbSA9IDAsIGEsIGQsIHMgPSAwLCBpID0gLTEsIGogPSAwO1xuICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAxKSB7XG4gICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICBpZiAoZDNfbnVtZXJpYyhhID0gZDNfbnVtYmVyKGFycmF5W2ldKSkpIHtcbiAgICAgICAgICBkID0gYSAtIG07XG4gICAgICAgICAgbSArPSBkIC8gKytqO1xuICAgICAgICAgIHMgKz0gZCAqIChhIC0gbSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgd2hpbGUgKCsraSA8IG4pIHtcbiAgICAgICAgaWYgKGQzX251bWVyaWMoYSA9IGQzX251bWJlcihmLmNhbGwoYX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wgaSkpKSkge1xuICAgICAgICAgICAgZW50ZXJOb2Rlc1tpXSA9IGQzX3NlbGVjdGlvbl9kYXRhTm9kZShub2RlRGF0YSk7XG4gICAgICAgICAgfSBlbHNlIGlmIChub2RlICE9PSB0cnVlKSB7XG4gICAgICAgICAgICB1cGRhdGVOb2Rlc1tpXSA9IG5vZGU7XG4gICAgICAgICAgICBub2RlLl9fZGF0YV9fID0gbm9kZURhdGE7XG4gICAgICAgICAgfVxuICAgICAgICAgIG5vZGVCeUtleVZhbHVlLnNldChrZXlWYWx1ZSwgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICAgICAgZm9yIChpID0gLTE7ICsraSA8IG47ICkge1xuICAgICAgICAgIGlmIChpIGluIGtleVZhbHVlcyAmJiBub2RlQnlLZXlWYWx1ZS5nZXQoa2V5VmFsdWVzW2ldKSAhPT0gdHJ1ZSkge1xuICAgICAgICAgICAgZXhpdE5vZGVzW2ldID0gZ3JvdXBbaV07XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBmb3IgKGkgPSAtMTsgKytpIDwgbjA7ICkge1xuICAgICAgICAgIG5vZGUgPSBncm91cFtpXTtcbiAgICAgICAgICBub2RlRGF0YSA9IGdyb3VwRGF0YVtpXTtcbiAgICAgICAgICBpZiAobm9kZSkge1xuICAgICAgICAgICAgbm9kZS5fX2RhdGFfXyA9IG5vZGVEYXRhO1xuICAgICAgICAgICAgdXBkYXRlTm9kZXNbaV0gPSBub2RlO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBlbnRlck5vZGVzW2ldID0gZDNfc2VsZWN0aW9uX2RhdGFOb2RlKG5vZGVEYXRhKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZm9yICg7aSA8IG07ICsraSkge1xuICAgICAgICAgIGVudGVyTm9kZXNbaV0gPSBkM19zZWxlY3Rpb25fZGF0YU5vZGUoZ3JvdXBEYXRhW2ldKTtcbiAgIC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gICAgICBpZiAob3JpZ2luKSB7XG4gICAgICAgICAgZHJhZ09mZnNldCA9IG9yaWdpbi5hcHBseSh0aGF0LCBhcmd1bWVudHMpO1xuICAgICAgICAgIGRyYWdPZmZzZXQgPSBbIGRyYWdPZmZzZXQueCAtIHBvc2l0aW9uMFswXSwgZHJhZ09mZnNldC55IC0gcG9zaXRpb24wWzFdIF07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgZHJhZ09mZnNldCA9IFsgMCwgMCBdO1xuICAgICAgICB9XG4gICAgICAgIGRpc3BhdGNoKHtcbiAgICAgICAgICB0eXBlOiBcImRyYWdzdGFydFwiXG4gICAgICAgIH0pO1xuICAgICAgICBmdW5jdGlvbiBtb3ZlZCgpIHtcbiAgICAgICAgICB2YXIgcG9zaXRpb24xID0gcG9zaXRpb24ocGFyZW50LCBkcmFnSWQpLCBkeCwgZHk7XG4gICAgICAgICAgaWYgKCFwb3NpdGlvbjEpIHJldHVybjtcbiAgICAgICAgICBkeCA9IHBvc2l0aW9uMVswXSAtIHBvc2l0aW9uMFswXTtcbiAgICAgICAgICBkeSA9IHBvc2l0aW9uMVsxXSAtIHBvc2l0aW9uMFsxXTtcbiAgICAgICAgICBkcmFnZ2VkIHw9IGR4IHwgZHk7XG4gICAgICAgICAgcG9zaXRpb24wID0gcG9zaXRpb24xO1xuICAgICAgICAgIGRpc3BhdGNoKHtcbiAgICAgICAgICAgIHR5cGU6IFwiZHJhZ1wiLFxuICAgICAgICAgICAgeDogcG9zaXRpb24xWzBdICsgZHJhZ09mZnNldFswXSxcbiAgICAgICAgICAgIHk6IHBvc2l0aW9uMVsxXSArIGRyYWdPZmZzZXRbMV0sXG4gICAgICAgICAgICBkeDogZHgsXG4gICAgICAgICAgICBkeTogZHlcbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiBlbmRlZCgpIHtcbiAgICAgICAgICBpZiAoIXBvc2l0aW9uKHBhcmVudCwgZHJhZ0lkKSkg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Wx0YSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR1cm4gZDMuZXZlbnQud2hlZWxEZWx0YTtcbiAgICAgIH0sIFwibW91c2V3aGVlbFwiKSA6IChkM19iZWhhdmlvcl96b29tRGVsdGEgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgcmV0dXJuIC1kMy5ldmVudC5kZXRhaWw7XG4gICAgICB9LCBcIk1vek1vdXNlUGl4ZWxTY3JvbGxcIik7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHpvb20oZykge1xuICAgICAgZy5vbihtb3VzZWRvd24sIG1vdXNlZG93bmVkKS5vbihkM19iZWhhdmlvcl96b29tV2hlZWwgKyBcIi56b29tXCIsIG1vdXNld2hlZWxlZCkub24oXCJkYmxjbGljay56b29tXCIsIGRibGNsaWNrZWQpLm9uKHRvdWNoc3RhcnQsIHRvdWNoc3RhcnRlZCk7XG4gICAgfVxuICAgIHpvb20uZXZlbnQgPSBmdW5jdGlvbihnKSB7XG4gICAgICBnLmVhY2goZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciBkaXNwYXRjaCA9IGV2ZW50Lm9mKHRoaXMsIGFyZ3VtZW50cyksIHZpZXcxID0gdmlldztcbiAgICAgICAgaWYgKGQzX3RyYW5zaXRpb25Jbmhlcml0SWQpIHtcbiAgICAgICAgICBkMy5zZWxlY3QodGhpcykudHJhbnNpdGlvbigpLmVhY2goXCJzdGFydC56b29tXCIsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgdmlldyA9IHRoaXMuX19jaGFydF9fIHx8IHtcbiAgICAgICAgICAgICAgeDogMCxcbiAgICAgICAgICAgICAgeTogMCxcbiAgICAgICAgICAgICAgazogMVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHpvb21zdGFydGVkKGRpc3BhdGNoKTtcbiAgICAgICAgICB9KS50d2VlbihcInpvb206em9vbVwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHZhciBkeCA9IHNpemVbMF0sIGR5ID0gc2l6ZVsxXSwgY3ggPSBjZW50ZXIwID8gY2VudGVyMFswXSA6IGR4IC8gMiwgY3kgPSBjZW50ZXIwID8gY2VudGVyMFsxXSA6IGR5IC8gMiwgaSA9IGQzLmludGVycG9sYXRlWm9vbShbIChjeCAtIHZpZXcueCkgLyB2aWV3LmssIChjeSAtIHZpZXcueSkgLyB2aWV3LmssIGR4IC8gdmlldy5rIF0sIFsgKGN4IC0gdmlldzEueCkgLyB2aWV3MS5rLCAoY3kgLSB2aWV3MS55KSAvIHZpZXcxLmssIGR4IC8gdmlldzEuayBdKTtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbih0KSB7XG4gICAgICAgICAgICAgIHZhciBsID0gaSh0KSwgayA9IGR4IC8gbFsyXTtcbiAgICAgICAgICAgICAgdGhpcy5fX2NoYXJ0X18gPSB2aWV3ID0ge1xuICAgICAgICAgICAgICAgIHg6IGN4IC0gbFswXSAqIGssXG4gICAgICAgICAgICAgICAgeTogY3kgLSBsWzFdICogayxcbiAgICAgICAgICAgICAgICBrOiBrXG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgIHpvb21lZChkaXNwYXRjaCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgIH0pLmVhY2goXCJpbnRlcnJ1cHQuem9vbVwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHpvb21lbmRlZChkaXNwYXRjaCk7XG4gICAgICAgICAgfSkuZWFjaChcImVuZC56b29tXCIsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgem9vbWVuZGVkKGRpc3BhdGNoKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0aGlzLl9fY2hhcnRfXyA9IHZpZXc7XG4gICAgICAgICAgem9vbXN0YXJ0ZWQoZGlzcGF0Y2gpO1xuICAgICAgICAgIHpvb21lZChkaXNwYXRjaCk7XG4gICAgICAgICAgem9vbWVuZGVkKGRpc3BhdGNoKTtcbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfTtcbiAgICB6b29tLnRyYW5zbGF0ZSA9IGZ1bmN0aW9uKF8pIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIFsgdmlldy54LCB2aWV3LnkgXTtcbiAgICAgIHZpZXcgPSB7XG4gICAgICAgIHg6ICtfWzBdLFxuICAgICAgICB5OiArX1sxXSxcbiAgICAgICAgazogdmlldy5rXG4gICAgICB9O1xuICAgICAgcmVzY2FsZSgpO1xuICAgICAgcmV0dXJuIHpvb207XG4gICAgfTtcbiAgICB6b29tLnNjYWxlID0gZnVuY3Rpb24oXykge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gdmlldy5rO1xuICAgICAgdmlldyA9IHtcbiAgICAgICAgeDogdmlldy54LFxuICAgICAgICB5OiB2aWV3LnksXG4gICAgICAgIGs6IG51bGxcbiAgICAgIH07XG4gICAgICBzY2FsZVRvKCtfKTtcbiAgICAgIHJlc2NhbGUoKTtcbiAgICAgIHJldHVybiB6b29tO1xuICAgIH07XG4gICAgem9vbS5zY2FsZUV4dGVudCA9IGZ1bmN0aW9uKF8pIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIHNjYWxlRXh0ZW50O1xuICAgICAgc2NhbGVFeHRlbnQgPSBfID09IG51bGwgPyBkM19iZWhhdmlvcl96b29tSW5maW5pdHkgOiBbICtfWzBdLCArX1sxXSBdO1xuICAgICAgcmV0dXJuIHpvb207XG4gICAgfTtcbiAgICB6b29tLmNlbnRlciA9IGZ1bmN0aW9uKF8pIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIGNlbnRlcjtcbiAgICAgIGNlbnRlciA9IF8gJiYgWyArX1swXSwgK19bMV0gXTtcbiAgICAgIHJldHVybiB6b29tO1xuICAgIH07XG4gICAgem9vbS5zaXplID0gZnVuY3Rpb24oXykge1xuICAgICAgaWYgKC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ybWF0Lmxlbmd0aCA9PT0gNykge1xuICAgICAgICByID0gKGNvbG9yICYgMTY3MTE2ODApID4+IDE2O1xuICAgICAgICBnID0gKGNvbG9yICYgNjUyODApID4+IDg7XG4gICAgICAgIGIgPSBjb2xvciAmIDI1NTtcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHJnYihyLCBnLCBiKTtcbiAgfVxuICBmdW5jdGlvbiBkM19yZ2JfaHNsKHIsIGcsIGIpIHtcbiAgICB2YXIgbWluID0gTWF0aC5taW4ociAvPSAyNTUsIGcgLz0gMjU1LCBiIC89IDI1NSksIG1heCA9IE1hdGgubWF4KHIsIGcsIGIpLCBkID0gbWF4IC0gbWluLCBoLCBzLCBsID0gKG1heCArIG1pbikgLyAyO1xuICAgIGlmIChkKSB7XG4gICAgICBzID0gbCA8IC41ID8gZCAvIChtYXggKyBtaW4pIDogZCAvICgyIC0gbWF4IC0gbWluKTtcbiAgICAgIGlmIChyID09IG1heCkgaCA9IChnIC0gYikgLyBkICsgKGcgPCBiID8gNiA6IDApOyBlbHNlIGlmIChnID09IG1heCkgaCA9IChiIC0gcikgLyBkICsgMjsgZWxzZSBoID0gKHIgLSBnKSAvIGQgKyA0O1xuICAgICAgaCAqPSA2MDtcbiAgICB9IGVsc2Uge1xuICAgICAgaCA9IE5hTjtcbiAgICAgIHMgPSBsID4gMCAmJiBsIDwgMSA/IDAgOiBoO1xuICAgIH1cbiAgICByZXR1cm4gbmV3IGQzX2hzbChoLCBzLCBsKTtcbiAgfVxuICBmdW5jdGlvbiBkM19yZ2JfbGFiKHIsIGcsIGIpIHtcbiAgICByID0gZDNfcmdiX3h5eihyKTtcbiAgICBnID0gZDNfcmdiX3h5eihnKTtcbiAgICBiID0gZDNfcmdiX3h5eihiKTtcbiAgICB2YXIgeCA9IGQzX3h5el9sYWIoKC40MTI0NTY0ICogciArIC4zNTc1NzYxICogZyArIC4xODA0Mzc1ICogYikgLyBkM19sYWJfWCksIHkgPSBkM194eXpfbGFiKC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EpO1xuICAgICAgICB2YXIgYSA9IG5ldyBGdW5jdGlvbihcImRcIiwgXCJyZXR1cm4ge1wiICsgcm93Lm1hcChmdW5jdGlvbihuYW1lLCBpKSB7XG4gICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KG5hbWUpICsgXCI6IGRbXCIgKyBpICsgXCJdXCI7XG4gICAgICAgIH0pLmpvaW4oXCIsXCIpICsgXCJ9XCIpO1xuICAgICAgICBvID0gZiA/IGZ1bmN0aW9uKHJvdywgaSkge1xuICAgICAgICAgIHJldHVybiBmKGEocm93KSwgaSk7XG4gICAgICAgIH0gOiBhO1xuICAgICAgfSk7XG4gICAgfTtcbiAgICBkc3YucGFyc2VSb3dzID0gZnVuY3Rpb24odGV4dCwgZikge1xuICAgICAgdmFyIEVPTCA9IHt9LCBFT0YgPSB7fSwgcm93cyA9IFtdLCBOID0gdGV4dC5sZW5ndGgsIEkgPSAwLCBuID0gMCwgdCwgZW9sO1xuICAgICAgZnVuY3Rpb24gdG9rZW4oKSB7XG4gICAgICAgIGlmIChJID49IE4pIHJldHVybiBFT0Y7XG4gICAgICAgIGlmIChlb2wpIHJldHVybiBlb2wgPSBmYWxzZSwgRU9MO1xuICAgICAgICB2YXIgaiA9IEk7XG4gICAgICAgIGlmICh0ZXh0LmNoYXJDb2RlQXQoaikgPT09IDM0KSB7XG4gICAgICAgICAgdmFyIGkgPSBqO1xuICAgICAgICAgIHdoaWxlIChpKysgPCBOKSB7XG4gICAgICAgICAgICBpZiAodGV4dC5jaGFyQ29kZUF0KGkpID09PSAzNCkge1xuICAgICAgICAgICAgICBpZiAodGV4dC5jaGFyQ29kZUF0KGkgKyAxKSAhPT0gMzQpIGJyZWFrO1xuICAgICAgICAgICAgICArK2k7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIEkgPSBpICsgMjtcbiAgICAgICAgICB2YXIgYyA9IHRleHQuY2hhckNvZGVBdChpICsgMSk7XG4gICAgICAgICAgaWYgKGMgPT09IDEzKSB7XG4gICAgICAgICAgICBlb2wgPSB0cnVlO1xuICAgICAgICAgICAgaWYgKHRleHQuY2hhckNvZGVBdChpICsgMikgPT09IDEwKSArK0k7XG4gICAgICAgICAgfSBlbHNlIGlmIChjID09PSAxMCkge1xuICAgICAgICAgICAgZW9sID0gdHJ1ZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHRleHQuc2xpY2UoaiArIDEsIGkpLnJlcGxhY2UoL1wiXCIvZywgJ1wiJyk7XG4gICAgICAgIH1cbiAgICAgICAgd2hpbGUgKEkgPCBOKSB7XG4gICAgICAgICAgdmFyIGMgPSB0ZXh0LmNoYXJDb2RlQXQoSSsrKSwgayA9IDE7XG4gICAgICAgICAgaWYgKGMgPT09IDEwKSBlb2wgPSB0cnVlOyBlbHNlIGlmIChjID09PSAxMykge1xuICAgICAgICAgICAgZW9sID0gdHJ1ZTtcbiAgICAgICAgICAgIGlmICh0ZXh0LmNoYXJDb2RlQXQoSSkgPT09IDEwKSArK0ksICsraztcbiAgICAgICAgICB9IGVsc2UgaWYgKGMgIT09IGRlbGltaXRlckNvZGUpIGNvbnRpbnVlO1xuICAgICAgICAgIHJldHVybiB0ZXh0LnNsaWNlKGosIEkgLSBrKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGV4dC5zbGljZShqKTtcbiAgICAgIH1cbiAgICAgIHdoaWxlICgodCA9IHRva2VuKCkpICE9PSBFT0YpIHtcbiAgICAgICAgdmFyIGEgPSBbXTtcbiAgICAgICAgd2hpbGUgKHQgIT09IEVPTCAmJiB0ICE9PSBFT0YpIHtcbiAgICAgICAgICBhLnB1c2godCk7XG4gICAgICAgICAgdCA9IHRva2VuKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGYgJiYgKGEgPSBmKGEsIG4rKykpID09IG51bGwpIGNvbnRpbnVlO1xuICAgICAgICByb3dzLnB1c2goYSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gcm93cztcbiAgICB9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gIGZ1bmN0aW9uIGZvcm1hdChkYXRlKSB7XG4gICAgICAgIHZhciBzdHJpbmcgPSBbXSwgaSA9IC0xLCBqID0gMCwgYywgcCwgZjtcbiAgICAgICAgd2hpbGUgKCsraSA8IG4pIHtcbiAgICAgICAgICBpZiAodGVtcGxhdGUuY2hhckNvZGVBdChpKSA9PT0gMzcpIHtcbiAgICAgICAgICAgIHN0cmluZy5wdXNoKHRlbXBsYXRlLnNsaWNlKGosIGkpKTtcbiAgICAgICAgICAgIGlmICgocCA9IGQzX3RpbWVfZm9ybWF0UGFkc1tjID0gdGVtcGxhdGUuY2hhckF0KCsraSldKSAhPSBudWxsKSBjID0gdGVtcGxhdGUuY2hhckF0KCsraSk7XG4gICAgICAgICAgICBpZiAoZiA9IGQzX3RpbWVfZm9ybWF0c1tjXSkgYyA9IGYoZGF0ZSwgcCA9PSBudWxsID8gYyA9PT0gXCJlXCIgPyBcIiBcIiA6IFwiMFwiIDogcCk7XG4gICAgICAgICAgICBzdHJpbmcucHVzaChjKTtcbiAgICAgICAgICAgIGogPSBpICsgMTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgc3RyaW5nLnB1c2godGVtcGxhdGUuc2xpY2UoaiwgaSkpO1xuICAgICAgICByZXR1cm4gc3RyaW5nLmpvaW4oXCJcIik7XG4gICAgICB9XG4gICAgICBmb3JtYXQucGFyc2UgPSBmdW5jdGlvbihzdHJpbmcpIHtcbiAgICAgICAgdmFyIGQgPSB7XG4gICAgICAgICAgeTogMTkwMCxcbiAgICAgICAgICBtOiAwLFxuICAgICAgICAgIGQ6IDEsXG4gICAgICAgICAgSDogMCxcbiAgICAgICAgICBNOiAwLFxuICAgICAgICAgIFM6IDAsXG4gICAgICAgICAgTDogMCxcbiAgICAgICAgICBaOiBudWxsXG4gICAgICAgIH0sIGkgPSBkM190aW1lX3BhcnNlKGQsIHRlbXBsYXRlLCBzdHJpbmcsIDApO1xuICAgICAgICBpZiAoaSAhPSBzdHJpbmcubG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E4MCwgYW50aW1lcmlkaWFuIF4gKHMgKiDOu18gPCDOu2kgJiYgzrtpIDwgcyAqIM67KSkge1xuICAgICAgICAgIHZhciDPhmkgPSAtaW5mbGVjdGlvblsxXSAqIGQzX2RlZ3JlZXM7XG4gICAgICAgICAgaWYgKM+GaSA8IM+GMCkgz4YwID0gz4ZpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmICjPhiA8IM+GMCkgz4YwID0gz4Y7XG4gICAgICAgICAgaWYgKM+GID4gz4YxKSDPhjEgPSDPhjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoYW50aW1lcmlkaWFuKSB7XG4gICAgICAgICAgaWYgKM67IDwgzrtfKSB7XG4gICAgICAgICAgICBpZiAoYW5nbGUozrswLCDOuykgPiBhbmdsZSjOuzAsIM67MSkpIM67MSA9IM67O1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoYW5nbGUozrssIM67MSkgPiBhbmdsZSjOuzAsIM67MSkpIM67MCA9IM67O1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpZiAozrsxID49IM67MCkge1xuICAgICAgICAgICAgaWYgKM67IDwgzrswKSDOuzAgPSDOuztcbiAgICAgICAgICAgIGlmICjOuyA+IM67MSkgzrsxID0gzrs7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmICjOuyA+IM67Xykge1xuICAgICAgICAgICAgICBpZiAoYW5nbGUozrswLCDOuykgPiBhbmdsZSjOuzAsIM67MSkpIM67MSA9IM67O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgaWYgKGFuZ2xlKM67LCDOuzEpID4gYW5nbGUozrswLCDOuzEpKSDOuzAgPSDOuztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHBvaW50KM67LCDPhik7XG4gICAgICB9XG4gICAgICBwM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mxpbmVFbmQoKTtcbiAgICAgICAgICBsaXN0ZW5lci5wb2x5Z29uRW5kKCk7XG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgICBmdW5jdGlvbiBwb2ludCjOuywgz4YpIHtcbiAgICAgICAgdmFyIHBvaW50ID0gcm90YXRlKM67LCDPhik7XG4gICAgICAgIGlmIChwb2ludFZpc2libGUozrsgPSBwb2ludFswXSwgz4YgPSBwb2ludFsxXSkpIGxpc3RlbmVyLnBvaW50KM67LCDPhik7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBwb2ludExpbmUozrssIM+GKSB7XG4gICAgICAgIHZhciBwb2ludCA9IHJvdGF0ZSjOuywgz4YpO1xuICAgICAgICBsaW5lLnBvaW50KHBvaW50WzBdLCBwb2ludFsxXSk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBsaW5lU3RhcnQoKSB7XG4gICAgICAgIGNsaXAucG9pbnQgPSBwb2ludExpbmU7XG4gICAgICAgIGxpbmUubGluZVN0YXJ0KCk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBsaW5lRW5kKCkge1xuICAgICAgICBjbGlwLnBvaW50ID0gcG9pbnQ7XG4gICAgICAgIGxpbmUubGluZUVuZCgpO1xuICAgICAgfVxuICAgICAgdmFyIHNlZ21lbnRzO1xuICAgICAgdmFyIGJ1ZmZlciA9IGQzX2dlb19jbGlwQnVmZmVyTGlzdGVuZXIoKSwgcmluZ0xpc3RlbmVyID0gY2xpcExpbmUoYnVmZmVyKSwgcG9seWdvblN0YXJ0ZWQgPSBmYWxzZSwgcG9seWdvbiwgcmluZztcbiAgICAgIGZ1bmN0aW9uIHBvaW50UmluZyjOuywgz4YpIHtcbiAgICAgICAgcmluZy5wdXNoKFsgzrssIM+GIF0pO1xuICAgICAgICB2YXIgcG9pbnQgPSByb3RhdGUozrssIM+GKTtcbiAgICAgICAgcmluZ0xpc3RlbmVyLnBvaW50KHBvaW50WzBdLCBwb2ludFsxXSk7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiByaW5nU3RhcnQoKSB7XG4gICAgICAgIHJpbmdMaXN0ZW5lci5saW5lU3RhcnQoKTtcbiAgICAgICAgcmluZyA9IFtdO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gcmluZ0VuZCgpIHtcbiAgICAgICAgcG9pbnRSaW5nKHJpbmdbMF1bMF0sIHJpbmdbMF1bMV0pO1xuICAgICAgICByaW5nTGlzdGVuZXIubGluZUVuZCgpO1xuICAgICAgICB2YXIgY2xlYW4gPSByaW5nTGlzdGVuZXIuY2xlYW4oKSwgcmluZ1NlZ21lbnRzID0gYnVmZmVyLmJ1ZmZlcigpLCBzZWdtZW50LCBuID0gcmluZ1NlZ21lbnRzLmxlbmd0aDtcbiAgICAgICAgcmluZy5wb3AoKTtcbiAgICAgICAgcG9seWdvbi5wdXNoKHJpbmcpO1xuICAgICAgICByaW5nID0gbnVsbDtcbiAgICAgICAgaWYgKCFuKSByZXR1cm47XG4gICAgICAgIGlmIChjbGVhbiAmIDEpIHtcbiAgICAgICAgICBzZWdtZW50ID0gcmluZ1NlZ21lbnRzWzBdO1xuICAgICAgICAgIHZhciBuID0gc2VnbWVudC5sZW5ndGggLSAxLCBpID0gLTEsIHBvaW50O1xuICAgICAgICAgIGlmIChuID4gMCkge1xuICAgICAgICAgICAgaWYgKCFwb2x5Z29uU3RhcnRlZCkgbGlzdGVuZXIucG9seWdvblN0YXJ0KCksIHBvbHlnb25TdGFydGVkID0gdHJ1ZTtcbiAgICAgICAgICAgIGxpc3RlbmVyLmxpbmVTdGFydCgpO1xuICAgICAgICAgICAgd2hpbGUgKCsraSA8IG4pIGxpc3RlbmVyLnBvaW50KChwb2ludCA9IHNlZ21lbnRbaV0pWzBdLCBwb2ludFsxXSk7XG4gICAgICAgICAgICBsaXN0ZW5lci5saW5lRW5kKCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAobiA+IDEgJiYgY2xlYW4g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IGxpc3RlbmVyLnBvaW50KM67MSwgz4YwKTtcbiAgICAgICAgICBjbGVhbiA9IDA7XG4gICAgICAgIH0gZWxzZSBpZiAoc867MCAhPT0gc867MSAmJiBkzrsgPj0gz4ApIHtcbiAgICAgICAgICBpZiAoYWJzKM67MCAtIHPOuzApIDwgzrUpIM67MCAtPSBzzrswICogzrU7XG4gICAgICAgICAgaWYgKGFicyjOuzEgLSBzzrsxKSA8IM61KSDOuzEgLT0gc867MSAqIM61O1xuICAgICAgICAgIM+GMCA9IGQzX2dlb19jbGlwQW50aW1lcmlkaWFuSW50ZXJzZWN0KM67MCwgz4YwLCDOuzEsIM+GMSk7XG4gICAgICAgICAgbGlzdGVuZXIucG9pbnQoc867MCwgz4YwKTtcbiAgICAgICAgICBsaXN0ZW5lci5saW5lRW5kKCk7XG4gICAgICAgICAgbGlzdGVuZXIubGluZVN0YXJ0KCk7XG4gICAgICAgICAgbGlzdGVuZXIucG9pbnQoc867MSwgz4YwKTtcbiAgICAgICAgICBjbGVhbiA9IDA7XG4gICAgICAgIH1cbiAgICAgICAgbGlzdGVuZXIucG9pbnQozrswID0gzrsxLCDPhjAgPSDPhjEpO1xuICAgICAgICBzzrswID0gc867MTtcbiAgICAgIH0sXG4gICAgICBsaW5lRW5kOiBmdW5jdGlvbigpIHtcbiAgICAgICAgbGlzdGVuZXIubGluZUVuZCgpO1xuICAgICAgICDOuzAgPSDPhjAgPSBOYU47XG4gICAgICB9LFxuICAgICAgY2xlYW46IGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR1cm4gMiAtIGNsZWFuO1xuICAgICAgfVxuICAgIH07XG4gIH1cbiAgZnVuY3Rpb24gZDNfZ2VvX2NsaXBBbnRpbWVyaWRpYW5JbnRlcnNlY3QozrswLCDPhjAsIM67MSwgz4YxKSB7XG4gICAgdmFyIGNvc8+GMCwgY29zz4YxLCBzaW7OuzBfzrsxID0gTWF0aC5zaW4ozrswIC0gzrsxKTtcbiAgICByZXR1cm4gYWJzKHNpb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+GKSwgYyA9IHNtYWxsUmFkaXVzID8gdiA/IDAgOiBjb2RlKM67LCDPhikgOiB2ID8gY29kZSjOuyArICjOuyA8IDAgPyDPgCA6IC3PgCksIM+GKSA6IDA7XG4gICAgICAgICAgaWYgKCFwb2ludDAgJiYgKHYwMCA9IHYwID0gdikpIGxpc3RlbmVyLmxpbmVTdGFydCgpO1xuICAgICAgICAgIGlmICh2ICE9PSB2MCkge1xuICAgICAgICAgICAgcG9pbnQyID0gaW50ZXJzZWN0KHBvaW50MCwgcG9pbnQxKTtcbiAgICAgICAgICAgIGlmIChkM19nZW9fc3BoZXJpY2FsRXF1YWwocG9pbnQwLCBwb2ludDIpIHx8IGQzX2dlb19zcGhlcmljYWxFcXVhbChwb2ludDEsIHBvaW50MikpIHtcbiAgICAgICAgICAgICAgcG9pbnQxWzBdICs9IM61O1xuICAgICAgICAgICAgICBwb2ludDFbMV0gKz0gzrU7XG4gICAgICAgICAgICAgIHYgPSB2aXNpYmxlKHBvaW50MVswXSwgcG9pbnQxWzFdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKHYgIT09IHYwKSB7XG4gICAgICAgICAgICBjbGVhbiA9IDA7XG4gICAgICAgICAgICBpZiAodikge1xuICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lU3RhcnQoKTtcbiAgICAgICAgICAgICAgcG9pbnQyID0gaW50ZXJzZWN0KHBvaW50MSwgcG9pbnQwKTtcbiAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQocG9pbnQyWzBdLCBwb2ludDJbMV0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcG9pbnQyID0gaW50ZXJzZWN0KHBvaW50MCwgcG9pbnQxKTtcbiAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQocG9pbnQyWzBdLCBwb2ludDJbMV0pO1xuICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lRW5kKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBwb2ludDAgPSBwb2ludDI7XG4gICAgICAgICAgfSBlbHNlIGlmIChub3RIZW1pc3BoZXJlICYmIHBvaW50MCAmJiBzbWFsbFJhZGl1cyBeIHYpIHtcbiAgICAgICAgICAgIHZhciB0O1xuICAgICAgICAgICAgaWYgKCEoYyAmIGMwKSAmJiAodCA9IGludGVyc2VjdChwb2ludDEsIHBvaW50MCwgdHJ1ZSkpKSB7XG4gICAgICAgICAgICAgIGNsZWFuID0gMDtcbiAgICAgICAgICAgICAgaWYgKHNtYWxsUmFkaXVzKSB7XG4gICAgICAgICAgICAgICAgbGlzdGVuZXIubGluZVN0YXJ0KCk7XG4gICAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQodFswXVswXSwgdFswXVsxXSk7XG4gICAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQodFsxXVswXSwgdFsxXVsxXSk7XG4gICAgICAgICAgICAgICAgbGlzdGVuZXIubGluZUVuZCgpO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGxpc3RlbmVyLnBvaW50KHRbMV1bMF0sIHRbMV1bMV0pO1xuICAgICAgICAgICAgICAgIGxpc3RlbmVyLmxpbmVFbmQoKTtcbiAgICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lU3RhcnQoKTtcbiAgICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludCh0WzBdWzBdLCB0WzBdWzFdKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAodiAmJiAoIXBvaW50MCB8fCAhZDNfZ2VvX3NwaGVyaWNhbEVxdWFsKHBvaW50MCwgcG9pbnQxKSkpIHtcbiAgICAgICAgICAgIGxpc3RlbmVyLnBvaW50KHBvaW50MVswXSwgcG9pbnQxWzFdKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcG9pbnQwID0gcG9pbnQxLCB2MCA9IHYsIGMwID0gYztcbiAgIC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H1cbiAgICB9XG4gICAgZnVuY3Rpb24gY29kZSjOuywgz4YpIHtcbiAgICAgIHZhciByID0gc21hbGxSYWRpdXMgPyByYWRpdXMgOiDPgCAtIHJhZGl1cywgY29kZSA9IDA7XG4gICAgICBpZiAozrsgPCAtcikgY29kZSB8PSAxOyBlbHNlIGlmICjOuyA+IHIpIGNvZGUgfD0gMjtcbiAgICAgIGlmICjPhiA8IC1yKSBjb2RlIHw9IDQ7IGVsc2UgaWYgKM+GID4gcikgY29kZSB8PSA4O1xuICAgICAgcmV0dXJuIGNvZGU7XG4gICAgfVxuICB9XG4gIGZ1bmN0aW9uIGQzX2dlb21fY2xpcExpbmUoeDAsIHkwLCB4MSwgeTEpIHtcbiAgICByZXR1cm4gZnVuY3Rpb24obGluZSkge1xuICAgICAgdmFyIGEgPSBsaW5lLmEsIGIgPSBsaW5lLmIsIGF4ID0gYS54LCBheSA9IGEueSwgYnggPSBiLngsIGJ5ID0gYi55LCB0MCA9IDAsIHQxID0gMSwgZHggPSBieCAtIGF4LCBkeSA9IGJ5IC0gYXksIHI7XG4gICAgICByID0geDAgLSBheDtcbiAgICAgIGlmICghZHggJiYgciA+IDApIHJldHVybjtcbiAgICAgIHIgLz0gZHg7XG4gICAgICBpZiAoZHggPCAwKSB7XG4gICAgICAgIGlmIChyIDwgdDApIHJldHVybjtcbiAgICAgICAgaWYgKHIgPCB0MSkgdDEgPSByO1xuICAgICAgfSBlbHNlIGlmIChkeCA+IDApIHtcbiAgICAgICAgaWYgKHIgPiB0MSkgcmV0dXJuO1xuICAgICAgICBpZiAociA+IHQwKSB0MCA9IHI7XG4gICAgICB9XG4gICAgICByID0geDEgLSBheDtcbiAgICAgIGlmICghZHggJiYgciA8IDApIHJldHVybjtcbiAgICAgIHIgLz0gZHg7XG4gICAgICBpZiAoZHggPCAwKSB7XG4gICAgICAgIGlmIChyID4gdDEpIHJldHVybjtcbiAgICAgICAgaWYgKHIgPiB0MCkgdDAgPSByO1xuICAgICAgfSBlbHNlIGlmIChkeCA+IDApIHtcbiAgICAgICAgaWYgKHIgPCB0MCkgcmV0dXJuO1xuICAgICAgICBpZiAociA8IHQxKSB0MSA9IHI7XG4gICAgICB9XG4gICAgICByID0geTAgLSBheTtcbiAgICAgIGlmICghZHkgJiYgciA+IDApIHJldHVybjtcbiAgICAgIHIgLz0gZHk7XG4gICAgICBpZiAoZHkgPCAwKSB7XG4gICAgICAgIGlmIChyIDwgdDApIHJldHVybjtcbiAgICAgICAgaWYgKHIgPCB0MSkgdDEgPSByO1xuICAgICAgfSBlbHNlIGlmIChkeSA+IDApIHtcbiAgICAgICAgaWYgKHIgPiB0MSkgcmV0dXJuO1xuICAgICAgICBpZiAociA+IHQwKSB0MCA9IHI7XG4gICAgICB9XG4gICAgICByID0geTEgLSBheTtcbiAgICAgIGlmICghZHkgJiYgciA8IDApIHJldHVybjtcbiAgICAgIHIgLz0gZHk7XG4gICAgICBpZiAoZHkgPCAwKSB7XG4gICAgICAgIGlmIChyID4gdDEpIHJldHVybjtcbiAgICAgICAgaWYgKHIgPiB0MCkgdDAgPSByO1xuICAgICAgfSBlbHNlIGlmIChkeSA+IDApIHtcbiAgICAgICAgaWYgKHIgPCB0MCkgcmV0dXJuO1xuICAgICAgICBpZiAociA8IHQxKSB0MSA9IHI7XG4gICAgICB9XG4gICAgICBpZiAodDAgPiAwKSBsaW5lLmEgPSB7XG4gICAgICAgIHg6IGF4ICsgdDAgKiBkeCxcbiAgICAgICAgeTogYXkgKyB0MCAqIGR5XG4gICAgICB9O1xuICAgICAgaWYgKHQxIDwgMSkgbGluZS5iID0ge1xuICAgICAgICB4OiBheCArIHQxICogZHgsXG4gICAgICAgIHk6IGF5ICsgdDEgKiBkeVxuICAgICAgfTtcbiAgICAgIHJldHVybiBsaW5lO1xuICAgIH07XG4gIH1cbiAgdmFyIGQzX2dlb19jbGlwRXh0ZW50TUFYID0gMWU5O1xuICBkMy5nZW8uY2xpcEV4dGVudCA9IGZ1bmN0aW9uKCkge1xuICAgIH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ZGUsIGludGVycG9sYXRlLCBsaXN0ZW5lcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBsaXN0ZW5lci5wb2x5Z29uRW5kKCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHNlZ21lbnRzID0gcG9seWdvbiA9IHJpbmcgPSBudWxsO1xuICAgICAgICB9XG4gICAgICB9O1xuICAgICAgZnVuY3Rpb24gaW5zaWRlUG9seWdvbihwKSB7XG4gICAgICAgIHZhciB3biA9IDAsIG4gPSBwb2x5Z29uLmxlbmd0aCwgeSA9IHBbMV07XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbjsgKytpKSB7XG4gICAgICAgICAgZm9yICh2YXIgaiA9IDEsIHYgPSBwb2x5Z29uW2ldLCBtID0gdi5sZW5ndGgsIGEgPSB2WzBdLCBiOyBqIDwgbTsgKytqKSB7XG4gICAgICAgICAgICBiID0gdltqXTtcbiAgICAgICAgICAgIGlmIChhWzFdIDw9IHkpIHtcbiAgICAgICAgICAgICAgaWYgKGJbMV0gPiB5ICYmIGQzX2Nyb3NzMmQoYSwgYiwgcCkgPiAwKSArK3duO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgaWYgKGJbMV0gPD0geSAmJiBkM19jcm9zczJkKGEsIGIsIHApIDwgMCkgLS13bjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGEgPSBiO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd24gIT09IDA7XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBpbnRlcnBvbGF0ZShmcm9tLCB0bywgZGlyZWN0aW9uLCBsaXN0ZW5lcikge1xuICAgICAgICB2YXIgYSA9IDAsIGExID0gMDtcbiAgICAgICAgaWYgKGZyb20gPT0gbnVsbCB8fCAoYSA9IGNvcm5lcihmcm9tLCBkaXJlY3Rpb24pKSAhPT0gKGExID0gY29ybmVyKHRvLCBkaXJlY3Rpb24pKSB8fCBjb21wY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WpvaW4oKTtcbiAgICAgICAgICBzZWdtZW50cy5wdXNoKGJ1ZmZlckxpc3RlbmVyLmJ1ZmZlcigpKTtcbiAgICAgICAgfVxuICAgICAgICBjbGlwLnBvaW50ID0gcG9pbnQ7XG4gICAgICAgIGlmICh2XykgbGlzdGVuZXIubGluZUVuZCgpO1xuICAgICAgfVxuICAgICAgZnVuY3Rpb24gbGluZVBvaW50KHgsIHkpIHtcbiAgICAgICAgeCA9IE1hdGgubWF4KC1kM19nZW9fY2xpcEV4dGVudE1BWCwgTWF0aC5taW4oZDNfZ2VvX2NsaXBFeHRlbnRNQVgsIHgpKTtcbiAgICAgICAgeSA9IE1hdGgubWF4KC1kM19nZW9fY2xpcEV4dGVudE1BWCwgTWF0aC5taW4oZDNfZ2VvX2NsaXBFeHRlbnRNQVgsIHkpKTtcbiAgICAgICAgdmFyIHYgPSBwb2ludFZpc2libGUoeCwgeSk7XG4gICAgICAgIGlmIChwb2x5Z29uKSByaW5nLnB1c2goWyB4LCB5IF0pO1xuICAgICAgICBpZiAoZmlyc3QpIHtcbiAgICAgICAgICB4X18gPSB4LCB5X18gPSB5LCB2X18gPSB2O1xuICAgICAgICAgIGZpcnN0ID0gZmFsc2U7XG4gICAgICAgICAgaWYgKHYpIHtcbiAgICAgICAgICAgIGxpc3RlbmVyLmxpbmVTdGFydCgpO1xuICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQoeCwgeSk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmICh2ICYmIHZfKSBsaXN0ZW5lci5wb2ludCh4LCB5KTsgZWxzZSB7XG4gICAgICAgICAgICB2YXIgbCA9IHtcbiAgICAgICAgICAgICAgYToge1xuICAgICAgICAgICAgICAgIHg6IHhfLFxuICAgICAgICAgICAgICAgIHk6IHlfXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIGI6IHtcbiAgICAgICAgICAgICAgICB4OiB4LFxuICAgICAgICAgICAgICAgIHk6IHlcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGlmIChjbGlwTGluZShsKSkge1xuICAgICAgICAgICAgICBpZiAoIXZfKSB7XG4gICAgICAgICAgICAgICAgbGlzdGVuZXIubGluZVN0YXJ0KCk7XG4gICAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQobC5hLngsIGwuYS55KTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBsaXN0ZW5lci5wb2ludChsLmIueCwgbC5iLnkpO1xuICAgICAgICAgICAgICBpZiAoIXYpIGxpc3RlbmVyLmxpbmVFbmQoKTtcbiAgICAgICAgICAgICAgY2xlYW4gPSBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodikge1xuICAgICAgICAgICAgICBsaXN0ZW5lci5saW5lU3RhcnQoKTtcbiAgICAgICAgICAgICAgbGlzdGVuZXIucG9pbnQoeCwgeSk7XG4gICAgICAgICAgICAgIGNsZWFuID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHhfID0geCwgeV8gPSB5LCB2XyA9IHY7XG4gICAgICB9XG4gICAgICByZXR1cm4gY2xpcDtcbiAgICB9O1xuICAgIGZ1bmN0aW9uIGNvcm5lcihwLCBkaXJlY3Rpb24pIHtcbiAgICAgIHJldHVybiBhYnMocFswXSAtIHgwKSA8IM61ID8gZGlyZWN0aW9uID4gMCA/IDAgOiAzIDogYWJzKHBbMF0gLSB4MSkgPCDOtSA/IGRpcmVjdGlvbiA+IDAgPyAyIDogMSA6IGFicyhwWzFdIC0geTApIDwgzrUgPyBkaXJlY3Rpb24gPiAwID8gMSA6IDAgOiBkaXJlY3Rpb24gPiAwID8gMyA6IDI7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGNvbXBhcmUoYSwgYikge1xuICAgICAgcmV0dXJuIGNvbXBhcmVQb2ludHMoYS54LCBiLngpO1xuICAgIH1cbiAgICBmdW5j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MV1bMF0sIHkwID0gZXh0ZW50WzBdWzFdLCB5MSA9IGV4dGVudFsxXVsxXSwgbFNpdGUgPSBlZGdlLmwsIHJTaXRlID0gZWRnZS5yLCBseCA9IGxTaXRlLngsIGx5ID0gbFNpdGUueSwgcnggPSByU2l0ZS54LCByeSA9IHJTaXRlLnksIGZ4ID0gKGx4ICsgcngpIC8gMiwgZnkgPSAobHkgKyByeSkgLyAyLCBmbSwgZmI7XG4gICAgaWYgKHJ5ID09PSBseSkge1xuICAgICAgaWYgKGZ4IDwgeDAgfHwgZnggPj0geDEpIHJldHVybjtcbiAgICAgIGlmIChseCA+IHJ4KSB7XG4gICAgICAgIGlmICghdmEpIHZhID0ge1xuICAgICAgICAgIHg6IGZ4LFxuICAgICAgICAgIHk6IHkwXG4gICAgICAgIH07IGVsc2UgaWYgKHZhLnkgPj0geTEpIHJldHVybjtcbiAgICAgICAgdmIgPSB7XG4gICAgICAgICAgeDogZngsXG4gICAgICAgICAgeTogeTFcbiAgICAgICAgfTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGlmICghdmEpIHZhID0ge1xuICAgICAgICAgIHg6IGZ4LFxuICAgICAgICAgIHk6IHkxXG4gICAgICAgIH07IGVsc2UgaWYgKHZhLnkgPCB5MCkgcmV0dXJuO1xuICAgICAgICB2YiA9IHtcbiAgICAgICAgICB4OiBmeCxcbiAgICAgICAgICB5OiB5MFxuICAgICAgICB9O1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBmbSA9IChseCAtIHJ4KSAvIChyeSAtIGx5KTtcbiAgICAgIGZiID0gZnkgLSBmbSAqIGZ4O1xuICAgICAgaWYgKGZtIDwgLTEgfHwgZm0gPiAxKSB7XG4gICAgICAgIGlmIChseCA+IHJ4KSB7XG4gICAgICAgICAgaWYgKCF2YSkgdmEgPSB7XG4gICAgICAgICAgICB4OiAoeTAgLSBmYikgLyBmbSxcbiAgICAgICAgICAgIHk6IHkwXG4gICAgICAgICAgfTsgZWxzZSBpZiAodmEueSA+PSB5MSkgcmV0dXJuO1xuICAgICAgICAgIHZiID0ge1xuICAgICAgICAgICAgeDogKHkxIC0gZmIpIC8gZm0sXG4gICAgICAgICAgICB5OiB5MVxuICAgICAgICAgIH07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKCF2YSkgdmEgPSB7XG4gICAgICAgICAgICB4OiAoeTEgLSBmYikgLyBmbSxcbiAgICAgICAgICAgIHk6IHkxXG4gICAgICAgICAgfTsgZWxzZSBpZiAodmEueSA8IHkwKSByZXR1cm47XG4gICAgICAgICAgdmIgPSB7XG4gICAgICAgICAgICB4OiAoeTAgLSBmYikgLyBmbSxcbiAgICAgICAgICAgIHk6IHkwXG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKGx5IDwgcnkpIHtcbiAgICAgICAgICBpZiAoIXZhKSB2YSA9IHtcbiAgICAgICAgICAgIHg6IHgwLFxuICAgICAgICAgICAgeTogZm0gKiB4MCArIGZiXG4gICAgICAgICAgfTsgZWxzZSBpZiAodmEueCA+PSB4MSkgcmV0dXJuO1xuICAgICAgICAgIHZiID0ge1xuICAgICAgICAgICAgeDogeDEsXG4gICAgICAgICAgICB5OiBmbSAqIHgxICsgZmJcbiAgICAgICAgICB9O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmICghdmEpIHZhID0ge1xuICAgICAgICAgICAgeDogeDEsXG4gICAgICAgICAgICB5OiBmbSAqIHgxICsgZmJcbiAgICAgICAgICB9OyBlbHNlIGlmICh2YS54IDwgeDApIHJldHVybjtcbiAgICAgICAgICB2YiA9IHtcbiAgICAgICAgICAgIHg6IHgwLFxuICAgICAgICAgICAgeTogZm0gKiB4MCArIGZiXG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgICBlZGdlLmEgPSB2YTtcbiAgICBlZGdlLmIgPSB2YjtcbiAgICByZXR1cm4gdHJ1ZT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Q7XG4gICAgICBpZiAocmVkKSByZXR1cm47XG4gICAgICBpZiAobm9kZSAmJiBub2RlLkMpIHtcbiAgICAgICAgbm9kZS5DID0gZmFsc2U7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cbiAgICAgIGRvIHtcbiAgICAgICAgaWYgKG5vZGUgPT09IHRoaXMuXykgYnJlYWs7XG4gICAgICAgIGlmIChub2RlID09PSBwYXJlbnQuTCkge1xuICAgICAgICAgIHNpYmxpbmcgPSBwYXJlbnQuUjtcbiAgICAgICAgICBpZiAoc2libGluZy5DKSB7XG4gICAgICAgICAgICBzaWJsaW5nLkMgPSBmYWxzZTtcbiAgICAgICAgICAgIHBhcmVudC5DID0gdHJ1ZTtcbiAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlTGVmdCh0aGlzLCBwYXJlbnQpO1xuICAgICAgICAgICAgc2libGluZyA9IHBhcmVudC5SO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc2libGluZy5MICYmIHNpYmxpbmcuTC5DIHx8IHNpYmxpbmcuUiAmJiBzaWJsaW5nLlIuQykge1xuICAgICAgICAgICAgaWYgKCFzaWJsaW5nLlIgfHwgIXNpYmxpbmcuUi5DKSB7XG4gICAgICAgICAgICAgIHNpYmxpbmcuTC5DID0gZmFsc2U7XG4gICAgICAgICAgICAgIHNpYmxpbmcuQyA9IHRydWU7XG4gICAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlUmlnaHQodGhpcywgc2libGluZyk7XG4gICAgICAgICAgICAgIHNpYmxpbmcgPSBwYXJlbnQuUjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNpYmxpbmcuQyA9IHBhcmVudC5DO1xuICAgICAgICAgICAgcGFyZW50LkMgPSBzaWJsaW5nLlIuQyA9IGZhbHNlO1xuICAgICAgICAgICAgZDNfZ2VvbV92b3Jvbm9pUmVkQmxhY2tSb3RhdGVMZWZ0KHRoaXMsIHBhcmVudCk7XG4gICAgICAgICAgICBub2RlID0gdGhpcy5fO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHNpYmxpbmcgPSBwYXJlbnQuTDtcbiAgICAgICAgICBpZiAoc2libGluZy5DKSB7XG4gICAgICAgICAgICBzaWJsaW5nLkMgPSBmYWxzZTtcbiAgICAgICAgICAgIHBhcmVudC5DID0gdHJ1ZTtcbiAgICAgICAgICAgIGQzX2dlb21fdm9yb25vaVJlZEJsYWNrUm90YXRlUmlnaHQodGhpcywgcGFyZW50KTtcbiAgICAgICAgICAgIHNpYmxpbmcgPSBwYXJlbnQuTDtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKHNpYmxpbmcuTCAmJiBzaWJsaW5nLkwuQyB8fCBzaWJsaW5nLlIgJiYgc2libGluZy5SLkMpIHtcbiAgICAgICAgICAgIGlmICghc2libGluZy5MIHx8ICFzaWJsaW5nLkwuQykge1xuICAgICAgICAgICAgICBzaWJsaW5nLlIuQyA9IGZhbHNlO1xuICAgICAgICAgICAgICBzaWJsaW5nLkMgPSB0cnVlO1xuICAgICAgICAgICAgICBkM19nZW9tX3Zvcm9ub2lSZWRCbGFja1JvdGF0ZUxlZnQodGhpcywgc2libGluZyk7XG4gICAgICAgICAgICAgIHNpYmxpbmcgPSBwYXJlbnQuTDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNpYmxpbmcuQyA9IHBhcmVudC5DO1xuICAgICAgICAgICAgcGFyZW50LkMgPSBzaWJsaW5nLkwuQyA9IGZhbHNlO1xuICAgICAgICAgICAgZDNfZ2VvbV92b3Jvbm9pUmVkQmxhY2tSb3RhdGVSaWdodCh0aGlzLCBwYXJlbnQpO1xuICAgICAgICAgICAgbm9kZSA9IHRoaXMuXztcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzaWJsaW5nLkMgPSB0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BlbHNlIHtcbiAgICAgICAgeDJfID0geTJfID0gLSh4MV8gPSB5MV8gPSBJbmZpbml0eSk7XG4gICAgICAgIHhzID0gW10sIHlzID0gW107XG4gICAgICAgIG4gPSBkYXRhLmxlbmd0aDtcbiAgICAgICAgaWYgKGNvbXBhdCkgZm9yIChpID0gMDsgaSA8IG47ICsraSkge1xuICAgICAgICAgIGQgPSBkYXRhW2ldO1xuICAgICAgICAgIGlmIChkLnggPCB4MV8pIHgxXyA9IGQueDtcbiAgICAgICAgICBpZiAoZC55IDwgeTFfKSB5MV8gPSBkLnk7XG4gICAgICAgICAgaWYgKGQueCA+IHgyXykgeDJfID0gZC54O1xuICAgICAgICAgIGlmIChkLnkgPiB5Ml8pIHkyXyA9IGQueTtcbiAgICAgICAgICB4cy5wdXNoKGQueCk7XG4gICAgICAgICAgeXMucHVzaChkLnkpO1xuICAgICAgICB9IGVsc2UgZm9yIChpID0gMDsgaSA8IG47ICsraSkge1xuICAgICAgICAgIHZhciB4XyA9ICtmeChkID0gZGF0YVtpXSwgaSksIHlfID0gK2Z5KGQsIGkpO1xuICAgICAgICAgIGlmICh4XyA8IHgxXykgeDFfID0geF87XG4gICAgICAgICAgaWYgKHlfIDwgeTFfKSB5MV8gPSB5XztcbiAgICAgICAgICBpZiAoeF8gPiB4Ml8pIHgyXyA9IHhfO1xuICAgICAgICAgIGlmICh5XyA+IHkyXykgeTJfID0geV87XG4gICAgICAgICAgeHMucHVzaCh4Xyk7XG4gICAgICAgICAgeXMucHVzaCh5Xyk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHZhciBkeCA9IHgyXyAtIHgxXywgZHkgPSB5Ml8gLSB5MV87XG4gICAgICBpZiAoZHggPiBkeSkgeTJfID0geTFfICsgZHg7IGVsc2UgeDJfID0geDFfICsgZHk7XG4gICAgICBmdW5jdGlvbiBpbnNlcnQobiwgZCwgeCwgeSwgeDEsIHkxLCB4MiwgeTIpIHtcbiAgICAgICAgaWYgKGlzTmFOKHgpIHx8IGlzTmFOKHkpKSByZXR1cm47XG4gICAgICAgIGlmIChuLmxlYWYpIHtcbiAgICAgICAgICB2YXIgbnggPSBuLngsIG55ID0gbi55O1xuICAgICAgICAgIGlmIChueCAhPSBudWxsKSB7XG4gICAgICAgICAgICBpZiAoYWJzKG54IC0geCkgKyBhYnMobnkgLSB5KSA8IC4wMSkge1xuICAgICAgICAgICAgICBpbnNlcnRDaGlsZChuLCBkLCB4LCB5LCB4MSwgeTEsIHgyLCB5Mik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgblBvaW50ID0gbi5wb2ludDtcbiAgICAgICAgICAgICAgbi54ID0gbi55ID0gbi5wb2ludCA9IG51bGw7XG4gICAgICAgICAgICAgIGluc2VydENoaWxkKG4sIG5Qb2ludCwgbngsIG55LCB4MSwgeTEsIHgyLCB5Mik7XG4gICAgICAgICAgICAgIGluc2VydENoaWxkKG4sIGQsIHgsIHksIHgxLCB5MSwgeDIsIHkyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbi54ID0geCwgbi55ID0geSwgbi5wb2ludCA9IGQ7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGluc2VydENoaWxkKG4sIGQsIHgsIHksIHgxLCB5MSwgeDIsIHkyKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgZnVuY3Rpb24gaW5zZXJ0Q2hpbGQobiwgZCwgeCwgeSwgeDEsIHkxLCB4MiwgeTIpIHtcbiAgICAgICAgdmFyIHhtID0gKHgxICsgeDIpICogLjUsIHltID0gKHkxICsgeTIpICogLjUsIHJpZ2h0ID0geCA+PSB4bSwgYmVsb3cgPSB5ID49IHltLCBpID0gYmVsb3cgPDwgMSB8IHJpZ2h0O1xuICAgICAgICBuLmxlYWYgPSBmYWxzZTtcbiAgICAgICAgbiA9IG4ubm9kZXNbaV0gfHwgKG4ubm9kZXNbaV0gPSB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FtpXVthXSwgbWF0cml4W2ldW2JdKTtcbiAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgICBrID0gKM+EIC0gcGFkZGluZyAqIG4pIC8gaztcbiAgICAgIHggPSAwLCBpID0gLTE7XG4gICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICB4MCA9IHgsIGogPSAtMTtcbiAgICAgICAgd2hpbGUgKCsraiA8IG4pIHtcbiAgICAgICAgICB2YXIgZGkgPSBncm91cEluZGV4W2ldLCBkaiA9IHN1Ymdyb3VwSW5kZXhbZGldW2pdLCB2ID0gbWF0cml4W2RpXVtkal0sIGEwID0geCwgYTEgPSB4ICs9IHYgKiBrO1xuICAgICAgICAgIHN1Ymdyb3Vwc1tkaSArIFwiLVwiICsgZGpdID0ge1xuICAgICAgICAgICAgaW5kZXg6IGRpLFxuICAgICAgICAgICAgc3ViaW5kZXg6IGRqLFxuICAgICAgICAgICAgc3RhcnRBbmdsZTogYTAsXG4gICAgICAgICAgICBlbmRBbmdsZTogYTEsXG4gICAgICAgICAgICB2YWx1ZTogdlxuICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgZ3JvdXBzW2RpXSA9IHtcbiAgICAgICAgICBpbmRleDogZGksXG4gICAgICAgICAgc3RhcnRBbmdsZTogeDAsXG4gICAgICAgICAgZW5kQW5nbGU6IHgsXG4gICAgICAgICAgdmFsdWU6IGdyb3VwU3Vtc1tkaV1cbiAgICAgICAgfTtcbiAgICAgICAgeCArPSBwYWRkaW5nO1xuICAgICAgfVxuICAgICAgaSA9IC0xO1xuICAgICAgd2hpbGUgKCsraSA8IG4pIHtcbiAgICAgICAgaiA9IGkgLSAxO1xuICAgICAgICB3aGlsZSAoKytqIDwgbikge1xuICAgICAgICAgIHZhciBzb3VyY2UgPSBzdWJncm91cHNbaSArIFwiLVwiICsgal0sIHRhcmdldCA9IHN1Ymdyb3Vwc1tqICsgXCItXCIgKyBpXTtcbiAgICAgICAgICBpZiAoc291cmNlLnZhbHVlIHx8IHRhcmdldC52YWx1ZSkge1xuICAgICAgICAgICAgY2hvcmRzLnB1c2goc291cmNlLnZhbHVlIDwgdGFyZ2V0LnZhbHVlID8ge1xuICAgICAgICAgICAgICBzb3VyY2U6IHRhcmdldCxcbiAgICAgICAgICAgICAgdGFyZ2V0OiBzb3VyY2VcbiAgICAgICAgICAgIH0gOiB7XG4gICAgICAgICAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgICAgICAgICB0YXJnZXQ6IHRhcmdldFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAoc29ydENob3JkcykgcmVzb3J0KCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlc29ydCgpIHtcbiAgICAgIGNob3Jkcy5zb3J0KGZ1bmN0aW9uKGEsIGIpIHtcbiAgICAgICAgcmV0dXJuIHNvcnRDaG9yZHMoKGEuc291cmNlLnZhbHVlICsgYS50YXJnZXQudmFsdWUpIC8gMiwgKGIuc291cmNlLnZhbHVlICsgYi50YXJnZXQudmFsdWUpIC8gMik7XG4gICAgICB9KTtcbiAgICB9XG4gICAgY2hvcmQubWF0cml4ID0gZnVuY3Rpb24oeCkge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4gbWF0cml4O1xuICAgICAgbiA9IChtYXRyaXggPSB4KSAmJiBtYXRyaXgubGVuZ3RoO1xuICAgICAgY2hvcmRzID0gZ3JvdXBzID0gbnVsbDtcbiAgICAgIHJldHVybiBjaG9yZDtcbiAgICB9O1xuICAgIGNob3JkLnBhZGRpbmcgPSBmdW5jdGlvbih4KSB7XG4gICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiBwYWRkaW5nO1xuICAgICAgcGFkZGluZyA9IHg7XG4gICAgICBjaG9yZHMgPSBncm91cHMgPSBudWxsO1xuICAgICAgcmV0dXJuIGNob3JkO1xuICAgIH07XG4gICAgY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nRDaGFyZ2UgLyBkbjtcbiAgICAgICAgICAgIG5vZGUucHggLT0gZHggKiBrO1xuICAgICAgICAgICAgbm9kZS5weSAtPSBkeSAqIGs7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAhcXVhZC5jaGFyZ2U7XG4gICAgICB9O1xuICAgIH1cbiAgICBmb3JjZS50aWNrID0gZnVuY3Rpb24oKSB7XG4gICAgICBpZiAoKGFscGhhICo9IC45OSkgPCAuMDA1KSB7XG4gICAgICAgIHRpbWVyID0gbnVsbDtcbiAgICAgICAgZXZlbnQuZW5kKHtcbiAgICAgICAgICB0eXBlOiBcImVuZFwiLFxuICAgICAgICAgIGFscGhhOiBhbHBoYSA9IDBcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfVxuICAgICAgdmFyIG4gPSBub2Rlcy5sZW5ndGgsIG0gPSBsaW5rcy5sZW5ndGgsIHEsIGksIG8sIHMsIHQsIGwsIGssIHgsIHk7XG4gICAgICBmb3IgKGkgPSAwOyBpIDwgbTsgKytpKSB7XG4gICAgICAgIG8gPSBsaW5rc1tpXTtcbiAgICAgICAgcyA9IG8uc291cmNlO1xuICAgICAgICB0ID0gby50YXJnZXQ7XG4gICAgICAgIHggPSB0LnggLSBzLng7XG4gICAgICAgIHkgPSB0LnkgLSBzLnk7XG4gICAgICAgIGlmIChsID0geCAqIHggKyB5ICogeSkge1xuICAgICAgICAgIGwgPSBhbHBoYSAqIHN0cmVuZ3Roc1tpXSAqICgobCA9IE1hdGguc3FydChsKSkgLSBkaXN0YW5jZXNbaV0pIC8gbDtcbiAgICAgICAgICB4ICo9IGw7XG4gICAgICAgICAgeSAqPSBsO1xuICAgICAgICAgIHQueCAtPSB4ICogKGsgPSBzLndlaWdodCArIHQud2VpZ2h0ID8gcy53ZWlnaHQgLyAocy53ZWlnaHQgKyB0LndlaWdodCkgOiAuNSk7XG4gICAgICAgICAgdC55IC09IHkgKiBrO1xuICAgICAgICAgIHMueCArPSB4ICogKGsgPSAxIC0gayk7XG4gICAgICAgICAgcy55ICs9IHkgKiBrO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAoayA9IGFscGhhICogZ3Jhdml0eSkge1xuICAgICAgICB4ID0gc2l6ZVswXSAvIDI7XG4gICAgICAgIHkgPSBzaXplWzFdIC8gMjtcbiAgICAgICAgaSA9IC0xO1xuICAgICAgICBpZiAoaykgd2hpbGUgKCsraSA8IG4pIHtcbiAgICAgICAgICBvID0gbm9kZXNbaV07XG4gICAgICAgICAgby54ICs9ICh4IC0gby54KSAqIGs7XG4gICAgICAgICAgby55ICs9ICh5IC0gby55KSAqIGs7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGlmIChjaGFyZ2UpIHtcbiAgICAgICAgZDNfbGF5b3V0X2ZvcmNlQWNjdW11bGF0ZShxID0gZDMuZ2VvbS5xdWFkdHJlZShub2RlcyksIGFscGhhLCBjaGFyZ2VzKTtcbiAgICAgICAgaSA9IC0xO1xuICAgICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICAgIGlmICghKG8gPSBub2Rlc1tpXSkuZml4ZWQpIHtcbiAgICAgICAgICAgIHEudmlzaXQocmVwdWxzZShvKSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpID0gLTE7XG4gICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICBvID0gbm9kZXNbaV07XG4gICAgICAgIGlmIChvLmZpeGVkKSB7XG4gICAgICAgICAgby54ID0gby5weDtcbiAgICAgICAgICBvLnkgPSBvLnB5O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIG8ueCAtPSAoby5weCAtIChvLnB4ID0gby54KSkgKiBmcmljdGlvbjtcbiAgICAgICAgICBvLnkgLT0gKG8ucHkgLSAoby5weSA9IG8ueSkpICogZnJpY3Rpb247XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGV2ZW50LnRpY2soe1xuICA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eCA9ICt4O1xuICAgICAgaWYgKGFscGhhKSB7XG4gICAgICAgIGlmICh4ID4gMCkge1xuICAgICAgICAgIGFscGhhID0geDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0aW1lci5jID0gbnVsbCwgdGltZXIudCA9IE5hTiwgdGltZXIgPSBudWxsO1xuICAgICAgICAgIGV2ZW50LmVuZCh7XG4gICAgICAgICAgICB0eXBlOiBcImVuZFwiLFxuICAgICAgICAgICAgYWxwaGE6IGFscGhhID0gMFxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKHggPiAwKSB7XG4gICAgICAgIGV2ZW50LnN0YXJ0KHtcbiAgICAgICAgICB0eXBlOiBcInN0YXJ0XCIsXG4gICAgICAgICAgYWxwaGE6IGFscGhhID0geFxuICAgICAgICB9KTtcbiAgICAgICAgdGltZXIgPSBkM190aW1lcihmb3JjZS50aWNrKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBmb3JjZTtcbiAgICB9O1xuICAgIGZvcmNlLnN0YXJ0ID0gZnVuY3Rpb24oKSB7XG4gICAgICB2YXIgaSwgbiA9IG5vZGVzLmxlbmd0aCwgbSA9IGxpbmtzLmxlbmd0aCwgdyA9IHNpemVbMF0sIGggPSBzaXplWzFdLCBuZWlnaGJvcnMsIG87XG4gICAgICBmb3IgKGkgPSAwOyBpIDwgbjsgKytpKSB7XG4gICAgICAgIChvID0gbm9kZXNbaV0pLmluZGV4ID0gaTtcbiAgICAgICAgby53ZWlnaHQgPSAwO1xuICAgICAgfVxuICAgICAgZm9yIChpID0gMDsgaSA8IG07ICsraSkge1xuICAgICAgICBvID0gbGlua3NbaV07XG4gICAgICAgIGlmICh0eXBlb2Ygby5zb3VyY2UgPT0gXCJudW1iZXJcIikgby5zb3VyY2UgPSBub2Rlc1tvLnNvdXJjZV07XG4gICAgICAgIGlmICh0eXBlb2Ygby50YXJnZXQgPT0gXCJudW1iZXJcIikgby50YXJnZXQgPSBub2R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gYi55IC0gYS55LCBkciA9IGEuciArIGIucjtcbiAgICByZXR1cm4gLjk5OSAqIGRyICogZHIgPiBkeCAqIGR4ICsgZHkgKiBkeTtcbiAgfVxuICBmdW5jdGlvbiBkM19sYXlvdXRfcGFja1NpYmxpbmdzKG5vZGUpIHtcbiAgICBpZiAoIShub2RlcyA9IG5vZGUuY2hpbGRyZW4pIHx8ICEobiA9IG5vZGVzLmxlbmd0aCkpIHJldHVybjtcbiAgICB2YXIgbm9kZXMsIHhNaW4gPSBJbmZpbml0eSwgeE1heCA9IC1JbmZpbml0eSwgeU1pbiA9IEluZmluaXR5LCB5TWF4ID0gLUluZmluaXR5LCBhLCBiLCBjLCBpLCBqLCBrLCBuO1xuICAgIGZ1bmN0aW9uIGJvdW5kKG5vZGUpIHtcbiAgICAgIHhNaW4gPSBNYXRoLm1pbihub2RlLnggLSBub2RlLnIsIHhNaW4pO1xuICAgICAgeE1heCA9IE1hdGgubWF4KG5vZGUueCArIG5vZGUuciwgeE1heCk7XG4gICAgICB5TWluID0gTWF0aC5taW4obm9kZS55IC0gbm9kZS5yLCB5TWluKTtcbiAgICAgIHlNYXggPSBNYXRoLm1heChub2RlLnkgKyBub2RlLnIsIHlNYXgpO1xuICAgIH1cbiAgICBub2Rlcy5mb3JFYWNoKGQzX2xheW91dF9wYWNrTGluayk7XG4gICAgYSA9IG5vZGVzWzBdO1xuICAgIGEueCA9IC1hLnI7XG4gICAgYS55ID0gMDtcbiAgICBib3VuZChhKTtcbiAgICBpZiAobiA+IDEpIHtcbiAgICAgIGIgPSBub2Rlc1sxXTtcbiAgICAgIGIueCA9IGIucjtcbiAgICAgIGIueSA9IDA7XG4gICAgICBib3VuZChiKTtcbiAgICAgIGlmIChuID4gMikge1xuICAgICAgICBjID0gbm9kZXNbMl07XG4gICAgICAgIGQzX2xheW91dF9wYWNrUGxhY2UoYSwgYiwgYyk7XG4gICAgICAgIGJvdW5kKGMpO1xuICAgICAgICBkM19sYXlvdXRfcGFja0luc2VydChhLCBjKTtcbiAgICAgICAgYS5fcGFja19wcmV2ID0gYztcbiAgICAgICAgZDNfbGF5b3V0X3BhY2tJbnNlcnQoYywgYik7XG4gICAgICAgIGIgPSBhLl9wYWNrX25leHQ7XG4gICAgICAgIGZvciAoaSA9IDM7IGkgPCBuOyBpKyspIHtcbiAgICAgICAgICBkM19sYXlvdXRfcGFja1BsYWNlKGEsIGIsIGMgPSBub2Rlc1tpXSk7XG4gICAgICAgICAgdmFyIGlzZWN0ID0gMCwgczEgPSAxLCBzMiA9IDE7XG4gICAgICAgICAgZm9yIChqID0gYi5fcGFja19uZXh0OyBqICE9PSBiOyBqID0gai5fcGFja19uZXh0LCBzMSsrKSB7XG4gICAgICAgICAgICBpZiAoZDNfbGF5b3V0X3BhY2tJbnRlcnNlY3RzKGosIGMpKSB7XG4gICAgICAgICAgICAgIGlzZWN0ID0gMTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChpc2VjdCA9PSAxKSB7XG4gICAgICAgICAgICBmb3IgKGsgPSBhLl9wYWNrX3ByZXY7IGsgIT09IGouX3BhY2tfcHJldjsgayA9IGsuX3BhY2tfcHJldiwgczIrKykge1xuICAgICAgICAgICAgICBpZiAoZDNfbGF5b3V0X3BhY2tJbnRlcnNlY3RzKGssIGMpKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGlzZWN0KSB7XG4gICAgICAgICAgICBpZiAoczEgPCBzMiB8fCBzMSA9PSBzMiAmJiBiLnIgPCBhLnIpIGQzX2xheW91dF9wYWNrU3BsaWNlKGEsIGIgPSBqKTsgZWxzZSBkM19sYXlvdXRfcGFja1NwbGljZShhID0gaywgYik7XG4gICAgICAgICAgICBpLS07XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGQzX2xheW91dF9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cmFwVHJlZShyb290MCk7XG4gICAgICBkM19sYXlvdXRfaGllcmFyY2h5VmlzaXRBZnRlcihyb290MSwgZmlyc3RXYWxrKSwgcm9vdDEucGFyZW50Lm0gPSAtcm9vdDEuejtcbiAgICAgIGQzX2xheW91dF9oaWVyYXJjaHlWaXNpdEJlZm9yZShyb290MSwgc2Vjb25kV2Fsayk7XG4gICAgICBpZiAobm9kZVNpemUpIGQzX2xheW91dF9oaWVyYXJjaHlWaXNpdEJlZm9yZShyb290MCwgc2l6ZU5vZGUpOyBlbHNlIHtcbiAgICAgICAgdmFyIGxlZnQgPSByb290MCwgcmlnaHQgPSByb290MCwgYm90dG9tID0gcm9vdDA7XG4gICAgICAgIGQzX2xheW91dF9oaWVyYXJjaHlWaXNpdEJlZm9yZShyb290MCwgZnVuY3Rpb24obm9kZSkge1xuICAgICAgICAgIGlmIChub2RlLnggPCBsZWZ0LngpIGxlZnQgPSBub2RlO1xuICAgICAgICAgIGlmIChub2RlLnggPiByaWdodC54KSByaWdodCA9IG5vZGU7XG4gICAgICAgICAgaWYgKG5vZGUuZGVwdGggPiBib3R0b20uZGVwdGgpIGJvdHRvbSA9IG5vZGU7XG4gICAgICAgIH0pO1xuICAgICAgICB2YXIgdHggPSBzZXBhcmF0aW9uKGxlZnQsIHJpZ2h0KSAvIDIgLSBsZWZ0LngsIGt4ID0gc2l6ZVswXSAvIChyaWdodC54ICsgc2VwYXJhdGlvbihyaWdodCwgbGVmdCkgLyAyICsgdHgpLCBreSA9IHNpemVbMV0gLyAoYm90dG9tLmRlcHRoIHx8IDEpO1xuICAgICAgICBkM19sYXlvdXRfaGllcmFyY2h5VmlzaXRCZWZvcmUocm9vdDAsIGZ1bmN0aW9uKG5vZGUpIHtcbiAgICAgICAgICBub2RlLnggPSAobm9kZS54ICsgdHgpICoga3g7XG4gICAgICAgICAgbm9kZS55ID0gbm9kZS5kZXB0aCAqIGt5O1xuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICAgIHJldHVybiBub2RlcztcbiAgICB9XG4gICAgZnVuY3Rpb24gd3JhcFRyZWUocm9vdDApIHtcbiAgICAgIHZhciByb290MSA9IHtcbiAgICAgICAgQTogbnVsbCxcbiAgICAgICAgY2hpbGRyZW46IFsgcm9vdDAgXVxuICAgICAgfSwgcXVldWUgPSBbIHJvb3QxIF0sIG5vZGUxO1xuICAgICAgd2hpbGUgKChub2RlMSA9IHF1ZXVlLnBvcCgpKSAhPSBudWxsKSB7XG4gICAgICAgIGZvciAodmFyIGNoaWxkcmVuID0gbm9kZTEuY2hpbGRyZW4sIGNoaWxkLCBpID0gMCwgbiA9IGNoaWxkcmVuLmxlbmd0aDsgaSA8IG47ICsraSkge1xuICAgICAgICAgIHF1ZXVlLnB1c2goKGNoaWxkcmVuW2ldID0gY2hpbGQgPSB7XG4gICAgICAgICAgICBfOiBjaGlsZHJlbltpXSxcbiAgICAgICAgICAgIHBhcmVudDogbm9kZTEsXG4gICAgICAgICAgICBjaGlsZHJlbjogKGNoaWxkID0gY2hpbGRyZW5baV0uY2hpbGRyZW4pICYmIGNoaWxkLnNsaWNlKCkgfHwgW10sXG4gICAgICAgICAgICBBOiBudWxsLFxuICAgICAgICAgICAgYTogbnVsbCxcbiAgICAgICAgICAgIHo6IDAsXG4gICAgICAgICAgICBtOiAwLFxuICAgICAgICAgICAgYzogMCxcbiAgICAgICAgICAgIHM6IDAsXG4gICAgICAgICAgICB0OiBudWxsLFxuICAgICAgICAgICAgaTogaVxuICAgICAgICAgIH0pLmEgPSBjaGlsZCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHJldHVybiByb290MS5jaGlsZHJlblswXTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZmlyc3RXYWxrKHYpIHtcbiAgICAgIHZhciBjaGlsZHJlbiA9IHYuY2hpbGRyZW4sIHNpYmxpbmdzID0gdi5wYXJlbnQuY2hpbGRyZW4sIHcgPSB2LmkgPyBzaWJsaW5nc1t2LmkgLSAxXSA6IG51bGw7XG4gICAg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ZWZ0KHZvbSk7XG4gICAgICAgICAgdm9wID0gZDNfbGF5b3V0X3RyZWVSaWdodCh2b3ApO1xuICAgICAgICAgIHZvcC5hID0gdjtcbiAgICAgICAgICBzaGlmdCA9IHZpbS56ICsgc2ltIC0gdmlwLnogLSBzaXAgKyBzZXBhcmF0aW9uKHZpbS5fLCB2aXAuXyk7XG4gICAgICAgICAgaWYgKHNoaWZ0ID4gMCkge1xuICAgICAgICAgICAgZDNfbGF5b3V0X3RyZWVNb3ZlKGQzX2xheW91dF90cmVlQW5jZXN0b3IodmltLCB2LCBhbmNlc3RvciksIHYsIHNoaWZ0KTtcbiAgICAgICAgICAgIHNpcCArPSBzaGlmdDtcbiAgICAgICAgICAgIHNvcCArPSBzaGlmdDtcbiAgICAgICAgICB9XG4gICAgICAgICAgc2ltICs9IHZpbS5tO1xuICAgICAgICAgIHNpcCArPSB2aXAubTtcbiAgICAgICAgICBzb20gKz0gdm9tLm07XG4gICAgICAgICAgc29wICs9IHZvcC5tO1xuICAgICAgICB9XG4gICAgICAgIGlmICh2aW0gJiYgIWQzX2xheW91dF90cmVlUmlnaHQodm9wKSkge1xuICAgICAgICAgIHZvcC50ID0gdmltO1xuICAgICAgICAgIHZvcC5tICs9IHNpbSAtIHNvcDtcbiAgICAgICAgfVxuICAgICAgICBpZiAodmlwICYmICFkM19sYXlvdXRfdHJlZUxlZnQodm9tKSkge1xuICAgICAgICAgIHZvbS50ID0gdmlwO1xuICAgICAgICAgIHZvbS5tICs9IHNpcCAtIHNvbTtcbiAgICAgICAgICBhbmNlc3RvciA9IHY7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHJldHVybiBhbmNlc3RvcjtcbiAgICB9XG4gICAgZnVuY3Rpb24gc2l6ZU5vZGUobm9kZSkge1xuICAgICAgbm9kZS54ICo9IHNpemVbMF07XG4gICAgICBub2RlLnkgPSBub2RlLmRlcHRoICogc2l6ZVsxXTtcbiAgICB9XG4gICAgdHJlZS5zZXBhcmF0aW9uID0g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ZiAobW9kZSAhPT0gXCJzcXVhcmlmeVwiIHx8IChzY29yZSA9IHdvcnN0KHJvdywgdSkpIDw9IGJlc3QpIHtcbiAgICAgICAgICAgIHJlbWFpbmluZy5wb3AoKTtcbiAgICAgICAgICAgIGJlc3QgPSBzY29yZTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcm93LmFyZWEgLT0gcm93LnBvcCgpLmFyZWE7XG4gICAgICAgICAgICBwb3NpdGlvbihyb3csIHUsIHJlY3QsIGZhbHNlKTtcbiAgICAgICAgICAgIHUgPSBNYXRoLm1pbihyZWN0LmR4LCByZWN0LmR5KTtcbiAgICAgICAgICAgIHJvdy5sZW5ndGggPSByb3cuYXJlYSA9IDA7XG4gICAgICAgICAgICBiZXN0ID0gSW5maW5pdHk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChyb3cubGVuZ3RoKSB7XG4gICAgICAgICAgcG9zaXRpb24ocm93LCB1LCByZWN0LCB0cnVlKTtcbiAgICAgICAgICByb3cubGVuZ3RoID0gcm93LmFyZWEgPSAwO1xuICAgICAgICB9XG4gICAgICAgIGNoaWxkcmVuLmZvckVhY2goc3F1YXJpZnkpO1xuICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBzdGlja2lmeShub2RlKSB7XG4gICAgICB2YXIgY2hpbGRyZW4gPSBub2RlLmNoaWxkcmVuO1xuICAgICAgaWYgKGNoaWxkcmVuICYmIGNoaWxkcmVuLmxlbmd0aCkge1xuICAgICAgICB2YXIgcmVjdCA9IHBhZChub2RlKSwgcmVtYWluaW5nID0gY2hpbGRyZW4uc2xpY2UoKSwgY2hpbGQsIHJvdyA9IFtdO1xuICAgICAgICBzY2FsZShyZW1haW5pbmcsIHJlY3QuZHggKiByZWN0LmR5IC8gbm9kZS52YWx1ZSk7XG4gICAgICAgIHJvdy5hcmVhID0gMDtcbiAgICAgICAgd2hpbGUgKGNoaWxkID0gcmVtYWluaW5nLnBvcCgpKSB7XG4gICAgICAgICAgcm93LnB1c2goY2hpbGQpO1xuICAgICAgICAgIHJvdy5hcmVhICs9IGNoaWxkLmFyZWE7XG4gICAgICAgICAgaWYgKGNoaWxkLnogIT0gbnVsbCkge1xuICAgICAgICAgICAgcG9zaXRpb24ocm93LCBjaGlsZC56ID8gcmVjdC5keCA6IHJlY3QuZHksIHJlY3QsICFyZW1haW5pbmcubGVuZ3RoKTtcbiAgICAgICAgICAgIHJvdy5sZW5ndGggPSByb3cuYXJlYSA9IDA7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGNoaWxkcmVuLmZvckVhY2goc3RpY2tpZnkpO1xuICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiB3b3JzdChyb3csIHUpIHtcbiAgICAgIHZhciBzID0gcm93LmFyZWEsIHIsIHJtYXggPSAwLCBybWluID0gSW5maW5pdHksIGkgPSAtMSwgbiA9IHJvdy5sZW5ndGg7XG4gICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICBpZiAoIShyID0gcm93W2ldLmFyZWEpKSBjb250aW51ZTtcbiAgICAgICAgaWYgKHIgPCBybWluKSBybWluID0gcjtcbiAgICAgICAgaWYgKHIgPiBybWF4KSBybWF4ID0gcjtcbiAgICAgIH1cbiAgICAgIHMgKj0gcztcbiAgICAgIHUgKj0gdTtcbiAgICAgIHJldHVybiBzID8gTWF0aC5tYXgodSAqIHJtYXggKiByYXRpbyAvIHMsIHMgLyAodSAqIHJtaW4gKiByYXRpbykpIDogSW5maW5pdHk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHBvc2l0aW9uKHJvdywgdSwgcmVjdCwgZmx1c2gpIHtcbiAgICAgIHZhciBpID0gLTEsIG4gPSByb3cubGVuZ3RoLCB4ID0gcmVjdC54LCB5ID0gcmVjdC55LCB2ID0gdSA/IHJvdW5kKHJvdy5hcmVhIC8gdSkgOiAwLCBvO1xuICAgICAgaWYgKHUgPT0gcmVjdC5keCkge1xuICAgICAgICBpZiAoZmx1c2ggfHwgdiA+IHJlY3QuZHkpIHYgPSByZWN0LmR5O1xuICAgICAgICB3aGlsZSAoKytpIDwgbikge1xuICAgICAgICAgIG8gPSByb3dbaV07XG4gICAgICAgICAgby54ID0geDtcbiAgICAgICAgICBvLnkgPSB5O1xuICAgICAgICAgIG8uZHkgPSB2O1xuICAgICAgICAgIHggKz0gby5keCA9IE1hdGgubWluKHJlY3QueCArIHJlY3QuZHggLSB4LCB2ID8gcm91bmQoby5hcmVhIC8gdikgOiAwKTtcbiAgICAgICAgfVxuICAgICAgICBvLnogPSB0cnVlO1xuICAgICAgICBvLmR4ICs9IHJlY3QueCArIHJlY3QuZHggLSB4O1xuICAgICAgICByZWN0LnkgKz0gdjtcbiAgICAgICAgcmVjdC5keSAtPSB2O1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKGZsdXNoIHx8IHYgPiByZWN0LmR4KSB2ID0gcmVjdC5keDtcbiAgICAgICAgd2hpbGUgKCsraSA8IG4pIHtcbiAgICAgICAgICBvID0gcm93W2ldO1xuICAgICAgICAgIG8ueCA9IHg7XG4gICAgICAgICAgby55ID0geTtcbiAgICAgICAgICBvLmR4ID0gdjtcbiAgICAgICAgICB5ICs9IG8uZHkgPSBNYXRoLm1pbihyZWN0LnkgKyByZWN0LmR5IC0geSwgdiA/IHJvdW5kKG8uYXJlYSAvIHYpIDogMCk7XG4gICAgICAgIH1cbiAgICAgICAgby56ID0gZmFsc2U7XG4gICAgICAgIG8uZHkgKz0gcmVjdC55ICsgcmVjdC5keSAtIHk7XG4gICAgICAgIHJlY3QueCArPSB2O1xuICAgICAgICByZWN0LmR4IC09IHY7XG4gICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIHRyZWVtYXAoZCkge1xuICAgICAgdmFyIG5vZGVzID0gc3RpY2tpZXMgfHwgaGllcmFyY2h5KGQpLCByb290ID0gbm9kZXNbMF07XG4gICAgICByb290LnggPSByb290LnkgPSAwO1xuICAgICAgaWYgKHJvb3Qud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jYWxlX25pY2UoZG9tYWluLm1hcChsb2cpLCBwb3NpdGl2ZSA/IE1hdGggOiBkM19zY2FsZV9sb2dOaWNlTmVnYXRpdmUpO1xuICAgICAgbGluZWFyLmRvbWFpbihuaWNlZCk7XG4gICAgICBkb21haW4gPSBuaWNlZC5tYXAocG93KTtcbiAgICAgIHJldHVybiBzY2FsZTtcbiAgICB9O1xuICAgIHNjYWxlLnRpY2tzID0gZnVuY3Rpb24oKSB7XG4gICAgICB2YXIgZXh0ZW50ID0gZDNfc2NhbGVFeHRlbnQoZG9tYWluKSwgdGlja3MgPSBbXSwgdSA9IGV4dGVudFswXSwgdiA9IGV4dGVudFsxXSwgaSA9IE1hdGguZmxvb3IobG9nKHUpKSwgaiA9IE1hdGguY2VpbChsb2codikpLCBuID0gYmFzZSAlIDEgPyAyIDogYmFzZTtcbiAgICAgIGlmIChpc0Zpbml0ZShqIC0gaSkpIHtcbiAgICAgICAgaWYgKHBvc2l0aXZlKSB7XG4gICAgICAgICAgZm9yICg7aSA8IGo7IGkrKykgZm9yICh2YXIgayA9IDE7IGsgPCBuOyBrKyspIHRpY2tzLnB1c2gocG93KGkpICogayk7XG4gICAgICAgICAgdGlja3MucHVzaChwb3coaSkpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRpY2tzLnB1c2gocG93KGkpKTtcbiAgICAgICAgICBmb3IgKDtpKysgPCBqOyApIGZvciAodmFyIGsgPSBuIC0gMTsgayA+IDA7IGstLSkgdGlja3MucHVzaChwb3coaSkgKiBrKTtcbiAgICAgICAgfVxuICAgICAgICBmb3IgKGkgPSAwOyB0aWNrc1tpXSA8IHU7IGkrKykge31cbiAgICAgICAgZm9yIChqID0gdGlja3MubGVuZ3RoOyB0aWNrc1tqIC0gMV0gPiB2OyBqLS0pIHt9XG4gICAgICAgIHRpY2tzID0gdGlja3Muc2xpY2UoaSwgaik7XG4gICAgICB9XG4gICAgICByZXR1cm4gdGlja3M7XG4gICAgfTtcbiAgICBzY2FsZS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kgOiArcGFkUmFkaXVzLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG4gICAgICAgIGlmICghY3cpIHAxICo9IC0xO1xuICAgICAgICBpZiAocjEpIHAxID0gZDNfYXNpbihycCAvIHIxICogTWF0aC5zaW4oYXApKTtcbiAgICAgICAgaWYgKHIwKSBwMCA9IGQzX2FzaW4ocnAgLyByMCAqIE1hdGguc2luKGFwKSk7XG4gICAgICB9XG4gICAgICBpZiAocjEpIHtcbiAgICAgICAgeDAgPSByMSAqIE1hdGguY29zKGEwICsgcDEpO1xuICAgICAgICB5MCA9IHIxICogTWF0aC5zaW4oYTAgKyBwMSk7XG4gICAgICAgIHgxID0gcjEgKiBNYXRoLmNvcyhhMSAtIHAxKTtcbiAgICAgICAgeTEgPSByMSAqIE1hdGguc2luKGExIC0gcDEpO1xuICAgICAgICB2YXIgbDEgPSBNYXRoLmFicyhhMSAtIGEwIC0gMiAqIHAxKSA8PSDPgCA/IDAgOiAxO1xuICAgICAgICBpZiAocDEgJiYgZDNfc3ZnX2FyY1N3ZWVwKHgwLCB5MCwgeDEsIHkxKSA9PT0gY3cgXiBsMSkge1xuICAgICAgICAgIHZhciBoMSA9IChhMCArIGExKSAvIDI7XG4gICAgICAgICAgeDAgPSByMSAqIE1hdGguY29zKGgxKTtcbiAgICAgICAgICB5MCA9IHIxICogTWF0aC5zaW4oaDEpO1xuICAgICAgICAgIHgxID0geTEgPSBudWxsO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB4MCA9IHkwID0gMDtcbiAgICAgIH1cbiAgICAgIGlmIChyMCkge1xuICAgICAgICB4MiA9IHIwICogTWF0aC5jb3MoYTEgLSBwMCk7XG4gICAgICAgIHkyID0gcjAgKiBNYXRoLnNpbihhMSAtIHAwKTtcbiAgICAgICAgeDMgPSByMCAqIE1hdGguY29zKGEwICsgcDApO1xuICAgICAgICB5MyA9IHIwICogTWF0aC5zaW4oYTAgKyBwMCk7XG4gICAgICAgIHZhciBs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biAgICAgIHgwID0geDEgPSBfO1xuICAgICAgcmV0dXJuIGFyZWE7XG4gICAgfTtcbiAgICBhcmVhLngwID0gZnVuY3Rpb24oXykge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4geDA7XG4gICAgICB4MCA9IF87XG4gICAgICByZXR1cm4gYXJlYTtcbiAgICB9O1xuICAgIGFyZWEueDEgPSBmdW5jdGlvbihfKSB7XG4gICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHJldHVybiB4MTtcbiAgICAgIHgxID0gXztcbiAgICAgIHJldHVybiBhcmVhO1xuICAgIH07XG4gICAgYXJlYS55ID0gZnVuY3Rpb24oXykge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4geTE7XG4gICAgICB5MCA9IHkxID0gXztcbiAgICAgIHJldHVybiBhcmVhO1xuICAgIH07XG4gICAgYXJlYS55MCA9IGZ1bmN0aW9uKF8pIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIHkwO1xuICAgICAgeTAgPSBfO1xuICAgICAgcmV0dXJuIGFyZWE7XG4gICAgfTtcbiAgICBhcmVhLnkxID0gZnVuY3Rpb24oXykge1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSByZXR1cm4geTE7XG4gICAgICB5MSA9IF87XG4gICAgICByZXR1cm4gYXJlYTtcbiAgICB9O1xuICAgIGFyZWEuZGVmaW5lZCA9IGZ1bmN0aW9uKF8pIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIGRlZmluZWQ7XG4gICAgICBkZWZpbmVkID0gXztcbiAgICAgIHJldHVybiBhcmVhO1xuICAgIH07XG4gICAgYXJlYS5pbnRlcnBvbGF0ZSA9IGZ1bmN0aW9uKF8pIHtcbiAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgcmV0dXJuIGludGVycG9sYXRlS2V5O1xuICAgICAgaWY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4gICAgICAgICAgcmFuZ2UgPSBkM19zY2FsZVJhbmdlKHgpO1xuICAgICAgICAgIGJhY2tncm91bmRVcGRhdGUuYXR0cihcInhcIiwgcmFuZ2VbMF0pLmF0dHIoXCJ3aWR0aFwiLCByYW5nZVsxXSAtIHJhbmdlWzBdKTtcbiAgICAgICAgICByZWRyYXdYKGdVcGRhdGUpO1xuICAgICAgICB9XG4gICAgICAgIGlmICh5KSB7XG4gICAgICAgICAgcmFuZ2UgPSBkM19zY2FsZVJhbmdlKHkpO1xuICAgICAgICAgIGJhY2tncm91bmRVcGRhdGUuYXR0cihcInlcIiwgcmFuZ2VbMF0pLmF0dHIoXCJoZWlnaHRcIiwgcmFuZ2VbMV0gLSByYW5nZVswXSk7XG4gICAgICAgICAgcmVkcmF3WShnVXBkYXRlKTtcbiAgICAgICAgfVxuICAgICAgICByZWRyYXcoZ1VwZGF0ZSk7XG4gICAgICB9KTtcbiAgICB9XG4gICAgYnJ1c2guZXZlbnQgPSBmdW5jdGlvbihnKSB7XG4gICAgICBnLmVhY2goZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciBldmVudF8gPSBldmVudC5vZih0aGlzLCBhcmd1bWVudHMpLCBleHRlbnQxID0ge1xuICAgICAgICAgIHg6IHhFeHRlbnQsXG4gICAgICAgICAgeTogeUV4dGVudCxcbiAgICAgICAgICBpOiB4RXh0ZW50RG9tYWluLFxuICAgICAgICAgIGo6IHlFeHRlbnREb21haW5cbiAgICAgICAgfSwgZXh0ZW50MCA9IHRoaXMuX19jaGFydF9fIHx8IGV4dGVudDE7XG4gICAgICAgIHRoaXMuX19jaGFydF9fID0gZXh0ZW50MTtcbiAgICAgICAgaWYgKGQzX3RyYW5zaXRpb25Jbmhlcml0SWQpIHtcbiAgICAgICAgICBkMy5zZWxlY3QodGhpcykudHJhbnNpdGlvbigpLmVhY2goXCJzdGFydC5icnVzaFwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHhFeHRlbnREb21haW4gPSBleHRlbnQwLmk7XG4gICAgICAgICAgICB5RXh0ZW50RG9tYWluID0gZXh0ZW50MC5qO1xuICAgICAgICAgICAgeEV4dGVudCA9IGV4dGVudDAueDtcbiAgICAgICAgICAgIHlFeHRlbnQgPSBleHRlbnQwLnk7XG4gICAgICAgICAgICBldmVudF8oe1xuICAgICAgICAgICAgICB0eXBlOiBcImJydXNoc3RhcnRcIlxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSkudHdlZW4oXCJicnVzaDpicnVzaFwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHZhciB4aSA9IGQzX2ludGVycG9sYXRlQXJyYXkoeEV4dGVudCwgZXh0ZW50MS54KSwgeWkgPSBkM19pbnRlcnBvbGF0ZUFycmF5KHlFeHRlbnQsIGV4dGVudDEueSk7XG4gICAgICAgICAgICB4RXh0ZW50RG9tYWluID0geUV4dGVudERvbWFpbiA9IG51bGw7XG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24odCkge1xuICAgICAgICAgICAgICB4RXh0ZW50ID0gZXh0ZW50MS54ID0geGkodCk7XG4gICAgICAgICAgICAgIHlFeHRlbnQgPSBleHRlbnQxLnkgPSB5aSh0KTtcbiAgICAgICAgICAgICAgZXZlbnRfKHtcbiAgICAgICAgICAgICAgICB0eXBlOiBcImJydXNoXCIsXG4gICAgICAgICAgICAgICAgbW9kZTogXCJyZXNpemVcIlxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgfSkuZWFjaChcImVuZC5icnVzaFwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHhFeHRlbnREb21haW4gPSBleHRlbnQxLmk7XG4gICAgICAgICAgICB5RXh0ZW50RG9tYWluID0gZXh0ZW50MS5qO1xuICAgICAgICAgICAgZXZlbnRfKHtcbiAgICAgICAgICAgICAgdHlwZTogXCJicnVzaFwiLFxuICAgICAgICAgICAgICBtb2RlOiBcInJlc2l6ZVwiXG4gICAgICAgICAgICB9KTt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ICBpZiAoIWRyYWdnaW5nKSB7XG4gICAgICAgICAgICBjZW50ZXIgPSBudWxsO1xuICAgICAgICAgICAgb3JpZ2luWzBdIC09IHhFeHRlbnRbMV07XG4gICAgICAgICAgICBvcmlnaW5bMV0gLT0geUV4dGVudFsxXTtcbiAgICAgICAgICAgIGRyYWdnaW5nID0gMjtcbiAgICAgICAgICB9XG4gICAgICAgICAgZDNfZXZlbnRQcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBrZXl1cCgpIHtcbiAgICAgICAgaWYgKGQzLmV2ZW50LmtleUNvZGUgPT0gMzIgJiYgZHJhZ2dpbmcgPT0gMikge1xuICAgICAgICAgIG9yaWdpblswXSArPSB4RXh0ZW50WzFdO1xuICAgICAgICAgIG9yaWdpblsxXSArPSB5RXh0ZW50WzFdO1xuICAgICAgICAgIGRyYWdnaW5nID0gMDtcbiAgICAgICAgICBkM19ldmVudFByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIGJydXNobW92ZSgpIHtcbiAgICAgICAgdmFyIHBvaW50ID0gZDMubW91c2UodGFyZ2V0KSwgbW92ZWQgPSBmYWxzZTtcbiAgICAgICAgaWYgKG9mZnNldCkge1xuICAgICAgICAgIHBvaW50WzBdICs9IG9mZnNldFswXTtcbiAgICAgICAgICBwb2ludFsxXSArPSBvZmZzZXRbMV07XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFkcmFnZ2luZykge1xuICAgICAgICAgIGlmIChkMy5ldmVudC5hbHRLZXkpIHtcbiAgICAgICAgICAgIGlmICghY2VudGVyKSBjZW50ZXIgPSBbICh4RXh0ZW50WzBdICsgeEV4dGVudFsxXSkgLyAyLCAoeUV4dGVudFswXSArIHlFeHRlbnRbMV0pIC8gMiBdO1xuICAgICAgICAgICAgb3JpZ2luWzBdID0geEV4dGVudFsrKHBvaW50WzBdIDwgY2VudGVyWzBdKV07XG4gICAgICAgICAgICBvcmlnaW5bMV0gPSB5RXh0ZW50WysocG9pbnRbMV0gPCBjZW50ZXJbMV0pXTtcbiAgICAgICAgICB9IGVsc2UgY2VudGVyID0gbnVsbDtcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzaXppbmdYICYmIG1vdmUxKHBvaW50LCB4LCAwKSkge1xuICAgICAgICAgIHJlZHJhd1goZyk7XG4gICAgICAgICAgbW92ZWQgPSB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChyZXNpemluZ1kgJiYgbW92ZTEocG9pbnQsIHksIDEpKSB7XG4gICAgICAgICAgcmVkcmF3WShnKTtcbiAgICAgICAgICBtb3ZlZCA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1vdmVkKSB7XG4gICAgICAgICAgcmVkcmF3KGcpO1xuICAgICAgICAgIGV2ZW50Xyh7XG4gICAgICAgICAgICB0eXBlOiBcImJydXNoXCIsXG4gICAgICAgICAgICBtb2RlOiBkcmFnZ2luZyA/IFwibW92ZVwiIDogXCJyZXNpemVcIlxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBtb3ZlMShwb2ludCwgc2NhbGUsIGkpIHtcbiAgICAgICAgdmFyIHJhbmdlID0gZDNfc2NhbGVSYW5nZShzY2FsZSksIHIwID0gcmFuZ2VbMF0sIHIxID0gcmFuZ2VbMV0sIHBvc2l0aW9uID0gb3JpZ2luW2ldLCBleHRlbnQgPSBpID8geUV4dGVudCA6IHhFeHRlbnQsIHNpemUgPSBleHRlbnRbMV0gLSBleHRlbnRbMF0sIG1pbiwgbWF4O1xuICAgICAgICBpZiAoZHJhZ2dpbmcpIHtcbiAgICAgICAgICByMCAtPSBwb3NpdGlvbjtcbiAgICAgICAgICByMSAtPSBzaXplICsgcG9zaXRpb247XG4gICAgICAgIH1cbiAgICAgICAgbWluID0gKGkgPyB5Q2xhbXAgOiB4Q2xhbXApID8gTWF0aC5tYXgocjAsIE1hdGgubWluKHIxLCBwb2ludFtpXSkpIDogcG9pbnRbaV07XG4gICAgICAgIGlmIChkcmFnZ2luZykge1xuICAgICAgICAgIG1heCA9IChtaW4gKz0gcG9zaXRpb24pICsgc2l6ZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpZiAoY2VudGVyKSBwb3NpdGlvbiA9IE1hdGgubWF4KHIwLCBNYXRoLm1pbihyMSwgMiAqIGNlbnRlcltpXSAtIG1pbikpO1xuICAgICAgICAgIGlmIChwb3NpdGlvbiA8IG1pbikge1xuICAgICAgICAgICAgbWF4ID0gbWluO1xuICAgICAgICAgICAgbWluID0gcG9zaXRpb247XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG1heCA9IHBvc2l0aW9uO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoZXh0ZW50WzBdICE9IG1pbiB8fCBleHRlbnRbMV0gIT0gbWF4KSB7XG4gICAgICAgICAgaWYgKGkpIHlFeHRlbnREb21haW4gPSBudWxsOyBlbHNlIHhFeHRlbnREb21haW4gPSBudWxsO1xuICAgICAgICAgIGV4dGVudFswXSA9IG1pbjtcbiAgICAgICAgICBleHRlbnRbMV0gPSBtYXg7XG4gICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIGJydXNoZW5kKCkge1xuICAgICAgICBicnVzaG1vdmUoKTtcbiAgICAgICAgZy5zdHlsZShcInBvaW50ZXItZXZlbnRzXCIsIFwiYWxsXCIpLnNlbGVjdEFsbChcIi5yZXNpemVcIikuc3R5bGUoXCJkaXNwbGF5XCIsIGJydXNoLmVtcHR5KCkgPyBcIm5vbmVcIiA6IG51bGwpO1xuICAgICAgICBkMy5zZWxlY3QoXCJib2R5XCIpLnN0eWxlKFwiY3Vyc29yXCIsIG51bGwpO1xuICAgICAgICB3Lm9uKFwibW91c2Vtb3ZlLmJydXNoXCIsI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gIH07XG4gICAgYnJ1c2guZXh0ZW50ID0gZnVuY3Rpb24oeikge1xuICAgICAgdmFyIHgwLCB4MSwgeTAsIHkxLCB0O1xuICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSB7XG4gICAgICAgIGlmICh4KSB7XG4gICAgICAgICAgaWYgKHhFeHRlbnREb21haW4pIHtcbiAgICAgICAgICAgIHgwID0geEV4dGVudERvbWFpblswXSwgeDEgPSB4RXh0ZW50RG9tYWluWzFdO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB4MCA9IHhFeHRlbnRbMF0sIHgxID0geEV4dGVudFsxXTtcbiAgICAgICAgICAgIGlmICh4LmludmVydCkgeDAgPSB4LmludmVydCh4MCksIHgxID0geC5pbnZlcnQoeDEpO1xuICAgICAgICAgICAgaWYgKHgxIDwgeDApIHQgPSB4MCwgeDAgPSB4MSwgeDEgPSB0O1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoeSkge1xuICAgICAgICAgIGlmICh5RXh0ZW50RG9tYWluKSB7XG4gICAgICAgICAgICB5MCA9IHlFeHRlbnREb21haW5bMF0sIHkxID0geUV4dGVudERvbWFpblsxXTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgeTAgPSB5RXh0ZW50WzBdLCB5MSA9IHlFeHRlbnRbMV07XG4gICAgICAgICAgICBpZiAoeS5pbnZlcnQpIHkwID0geS5pbnZlcnQoeTApLCB5MSA9IHkuaW52ZXJ0KHkxKTtcbiAgICAgICAgICAgIGlmICh5MSA8IHkwKSB0ID0geTAsIHkwID0geTEsIHkxID0gdDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHggJiYgeSA/IFsgWyB4MCwgeTAgXSwgWyB4MSwgeTEgXSBdIDogeCA/IFsgeDAsIHgxIF0gOiB5ICYmIFsgeTAsIHkxIF07XG4gICAgICB9XG4gICAgICBpZiAoeCkge1xuICAgICAgICB4MCA9IHpbMF0sIHgxID0gelsxXTtcbiAgICAgICAgaWYgKHkpIHgwID0geDBbMF0sIHgxID0geDFbMF07XG4gICAgICAgIHhFeHRlbnREb21haW4gPSBbIHgwLCB4MSBdO1xuICAgICAgICBpZiAoeC5pbnZlcnQpIHgwID0geCh4MCksIHgxID0geCh4MSk7XG4gICAgICAgIGlmICh4MSA8IHgwKSB0ID0geDAsIHgwID0geDEsIHgxID0gdDtcbiAgICAgICAgaWYgKHgwICE9IHhFeHRlbnRbMF0gfHwgeDEgIT0geEV4dGVudFsxXSkgeEV4dGVudCA9IFsgeDAsIHgxIF07XG4gICAgICB9XG4gICAgICBpZiAoeSkge1xuICAgICAgICB5MCA9IHpbMF0sIHkxID0gelsxXTtcbiAgICAgICAgaWYgKHgpIHkwID0geTBbMV0sIHkxID0geTFbMV07XG4gICAgICAgIHlFeHRlbnREb21haW4gPSBbIHkwLCB5MSBdO1xuICAgICAgICBpZiAoeS5pbnZlcnQpIHkwID0geSh5MCksIHkxID0geSh5MSk7XG4gICAgICAgIGlmICh5MSA8IHkwKSB0ID0geTAsIHkwID0geTEsIHkxID0gdDtcbiAgICAgICAgaWYgKHkwICE9IHlFeHRlbnRbMF0gfHwgeTEgIT0geUV4dGVudFsxXSkgeUV4dGVudCA9IFsgeTAsIHkxIF07XG4gICAgICB9XG4gICAgICByZXR1cm4gYnJ1c2g7XG4gICAgfTtcbiAgICBicnVzaC5jbGVhciA9IGZ1bmN0aW9uKCkge1xuICAgICAgaWYgKCFicnVzaC5lbXB0eSgpKSB7XG4gICAgICAgIHhFeHRlbnQgPSBbIDAsIDAgXSwgeUV4dGVudCA9IFsgMCwgMCBdO1xuICAgICAgICB4RXh0ZW50RG9tYWluID0geUV4dGVudERvbWFpbiA9IG51bGw7XG4gICAgICB9XG4gICAgICByZXR1cm4gYnJ1c2g7XG4gICAgfTtcbiAgICBicnVzaC5lbXB0eSA9IGZ1bmN0aW9uKCkge1xuICAgICAgcmV0dXJuICEheCAmJiB4RXh0ZW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WVknLFxuICAgICAgICBMTCA6ICdEIE1NTU0gWVlZWScsXG4gICAgICAgIExMTCA6ICdEIE1NTU0gWVlZWSBISDptbScsXG4gICAgICAgIExMTEwgOiAnZGRkZCBEIE1NTU0gWVlZWSBISDptbSdcbiAgICB9LFxuICAgIGNhbGVuZGFyIDoge1xuICAgICAgICBzYW1lRGF5OiAnW9in2YTZitmI2YUg2LnZhNmJINin2YTYs9in2LnYqV0gTFQnLFxuICAgICAgICBuZXh0RGF5OiAnW9i62K/YpyDYudmE2Ykg2KfZhNiz2KfYudipXSBMVCcsXG4gICAgICAgIG5leHRXZWVrOiAnZGRkZCBb2LnZhNmJINin2YTYs9in2LnYqV0gTFQnLFxuICAgICAgICBsYXN0RGF5OiAnW9ij2YXYsyDYudmE2Ykg2KfZhNiz2KfYudipXSBMVCcsXG4gICAgICAgIGxhc3RXZWVrOiAnZGRkZCBb2LnZhNmJINin2YTYs9in2LnYqV0gTFQnLFxuICAgICAgICBzYW1lRWxzZTogJ0wnXG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6ICfZgdmKICVzJyxcbiAgICAgICAgcGFzdCA6ICfZhdmG2LAgJXMnLFxuICAgICAgICBzIDogJ9ir2YjYp9mGJyxcbiAgICAgICAgbSA6ICfYr9mC2YrZgtipJyxcbiAgICAgICAgbW0gOiAnJWQg2K/Zgtin2KbZgicsXG4gICAgICAgIGggOiAn2LPYp9i52KknLFxuICAgICAgICBoaCA6ICclZCDYs9in2LnYp9iqJyxcbiAgICAgICAgZCA6ICfZitmI2YUnLFxuICAgICAgICBkZCA6ICclZCDYo9mK2KfZhScsXG4gICAgICAgIE0gOiAn2LTZh9ixJyxcbiAgICAgICAgTU0gOiAnJWQg2KPYtNmH2LEnLFxuICAgICAgICB5IDogJ9iz2YbYqScsXG4gICAgICAgIHl5IDogJyVkINiz2YbZiNin2KonXG4gICAgfSxcbiAgICB3ZWVrIDoge1xuICAgICAgICBkb3cg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Eg6bW0nXG4gICAgfSxcbiAgICBjYWxlbmRhciA6IHtcbiAgICAgICAgc2FtZURheTogJ1vYp9mE2YrZiNmFINi52YTZiSDYp9mE2LPYp9i52KldIExUJyxcbiAgICAgICAgbmV4dERheTogJ1vYutiv2Kcg2LnZhNmJINin2YTYs9in2LnYqV0gTFQnLFxuICAgICAgICBuZXh0V2VlazogJ2RkZGQgW9i52YTZiSDYp9mE2LPYp9i52KldIExUJyxcbiAgICAgICAgbGFzdERheTogJ1vYo9mF2LMg2LnZhNmJINin2YTYs9in2LnYqV0gTFQnLFxuICAgICAgICBsYXN0V2VlazogJ2RkZGQgW9i52YTZiSDYp9mE2LPYp9i52KldIExUJyxcbiAgICAgICAgc2FtZUVsc2U6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAn2YHZiiAlcycsXG4gICAgICAgIHBhc3QgOiAn2YXZhtiwICVzJyxcbiAgICAgICAgcyA6ICfYq9mI2KfZhicsXG4gICAgICAgIG0gOiAn2K/ZgtmK2YLYqScsXG4gICAgICAgIG1tIDogJyVkINiv2YLYp9im2YInLFxuICAgICAgICBoIDogJ9iz2KfYudipJyxcbiAgICAgICAgaGggOiAnJWQg2LPYp9i52KfYqicsXG4gICAgICAgIGQgOiAn2YrZiNmFJyxcbiAgICAgICAgZGQgOiAnJWQg2KPZitin2YUnLFxuICAgICAgICBNIDogJ9i02YfYsScsXG4gICAgICAgIE1NIDogJyVkINij2LTZh9ixJyxcbiAgICAgICAgeSA6ICfYs9mG2KknLFxuICAgICAgICB5eSA6ICclZCDYs9mG2YjYp9iqJ1xuICAgIH0sXG4gICAgd2VlayA6IHtcbiAgICAgICAgZG93IDogMCwgLy8gU3VuZGF5IGlzIHRoZSBmaXJzdCBkYXkgb2YgdGhlIHdlZWsuXG4gICAgICAgIGRveSA6IDEyICAvLyBUaGUgd2VlayB0aGF0IGNvbnRhaW5zIEphbiAxc3QgaXMgdGhlIGZpcn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yxcbiAgICAgICAgTExMIDogJ0QgTU1NTSBZWVlZINCzLiwgSEg6bW0nLFxuICAgICAgICBMTExMIDogJ2RkZGQsIEQgTU1NTSBZWVlZINCzLiwgSEg6bW0nXG4gICAgfSxcbiAgICBjYWxlbmRhciA6IHtcbiAgICAgICAgc2FtZURheTogJ1vQodGR0L3QvdGPINGeXSBMVCcsXG4gICAgICAgIG5leHREYXk6ICdb0JfQsNGe0YLRgNCwINGeXSBMVCcsXG4gICAgICAgIGxhc3REYXk6ICdb0KPRh9C+0YDQsCDRnl0gTFQnLFxuICAgICAgICBuZXh0V2VlazogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuICdb0KNdIGRkZGQgW9GeXSBMVCc7XG4gICAgICAgIH0sXG4gICAgICAgIGxhc3RXZWVrOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CjINC80ZbQvdGD0LvRg9GOXSBkZGRkIFvRnl0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQoyDQvNGW0L3Rg9C70YtdIGRkZGQgW9GeXSBMVCc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHNhbWVFbHNlOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJ9C/0YDQsNC3ICVzJyxcbiAgICAgICAgcGFzdCA6ICclcyDRgtCw0LzRgycsXG4gICAgICAgIHMgOiAn0L3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0dXJuICdb0JIg0LjQt9C80LjQvdCw0LvQsNGC0LBdIGRkZGQgW9CyXSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQkiDQuNC30LzQuNC90LDQu9C40Y9dIGRkZGQgW9CyXSBMVCc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHNhbWVFbHNlIDogJ0wnXG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6ICfRgdC70LXQtCAlcycsXG4gICAgICAgIHBhc3QgOiAn0L/RgNC10LTQuCAlcycsXG4gICAgICAgIHMgOiAn0L3Rj9C60L7Qu9C60L4g0YHQtdC60YPQvdC00LgnLFxuICAgICAgICBtIDogJ9C80LjQvdGD0YLQsCcsXG4gICAgICAgIG1tIDogJyVkINC80LjQvdGD0YLQuCcsXG4gICAgICAgIGggOiAn0YfQsNGBJyxcbiAgICAgICAgaGggOiAnJWQg0YfQsNGB0LAnLFxuICAgICAgICBkIDogJ9C00LXQvScsXG4gICAgICAgIGRkIDogJyVkINC00L3QuCcsXG4gICAgICAgIE0gOiAn0LzQtdGB0LXRhicsXG4gICAgICAgIE1NIDogJyVkINC80LXRgdC10YbQsCcsXG4gICAgICAgIHkgOiAn0LPQvtC00LjQvdCwJyxcbiAgICAgICAgeXkgOiAnJWQg0LPQvtC00LjQvdC4J1xuICAgIH0sXG4gICAgZGF5T2ZNb250aE9yZGluYWxQYXJzZTogL1xcZHsxLDJ9LSjQtdCyfNC10L180YLQuHzQstC4fNGA0Lh80LzQuCkvLFxuICAgIG9yZGluYWwgOiBmdW5jdGlvbiAobnVtYmVyKSB7XG4gICAgICAgIHZhciBsYXN0RGlnaXQgPSBudW1iZXIgJSAxMCxcbiAgICAgICAgICAgIGxhc3QyRGlnaXRzID0gbnVtYmVyICUgMTAwO1xuICAgICAgICBpZiAobnVtYmVyID09PSAwKSB7XG4gICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3QtdCyJztcbiAgICAgICAgfSBlbHNlIGlmIChsYXN0MkRpZ2l0cyA9PT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0LXQvSc7XG4gICAgICAgIH0gZWxzZSBpZiAobGFzdDJEaWdpdHMgPiAxMCAmJiBsYXN0MkRpZ2l0cyA8IDIwKSB7XG4gICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3RgtC4JztcbiAgICAgICAgfSBlbHNlIGlmIChsYXN0RGlnaXQgPT09IDEpIHtcbiAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnLdCy0LgnO1xuICAgICAgICB9IGVsc2UgaWYgKGxhc3REaWdpdCA9PT0gMikge1xuICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0YDQuCc7XG4gICAgICAgIH0gZWxzZSBpZiAobGFzdERpZ2l0ID09PSA3IHx8IGxhc3REaWdpdCA9PT0gOCkge1xuICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0LzQuCc7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3RgtC4JztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgd2VlayA6IHtcbiAgICAgICAgZG93IDogMSwgLy8gTW9uZGF5IGlzIHRoZSBmaXJzdCBkYXkgb2YgdGhlIHdlZWsuXG4gICAgICAgIGRveSA6IDcgIC8vIFRoZSB3ZWVrIHRoYXQgY29udGFpbnMgSmFuIDFzdCBpcyB0aGUgZmlyc3Qgd2VlayBvZiB0aGUgeWVhci5cbiAgICB9XG59KTtcblxucmV0dXJuIGJnO1xuXG59KSkpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gL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ICAgICAgaWYgKGhvdXIgPT09IDEyKSB7XG4gICAgICAgICAgICBob3VyID0gMDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoKG1lcmlkaWVtID09PSAn4Kaw4Ka+4KakJyAmJiBob3VyID49IDQpIHx8XG4gICAgICAgICAgICAgICAgKG1lcmlkaWVtID09PSAn4Kam4KeB4Kaq4KeB4KawJyAmJiBob3VyIDwgNSkgfHxcbiAgICAgICAgICAgICAgICBtZXJpZGllbSA9PT0gJ+CmrOCmv+CmleCmvuCmsicpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyICsgMTI7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gaG91cjtcbiAgICAgICAgfVxuICAgIH0sXG4gICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG4gICAgICAgIGlmIChob3VyIDwgNCkge1xuICAgICAgICAgICAgcmV0dXJuICfgprDgpr7gpqQnO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxMCkge1xuICAgICAgICAgICAgcmV0dXJuICfgprjgppXgpr7gprInO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxNykge1xuICAgICAgICAgICAgcmV0dXJuICfgpqbgp4Hgpqrgp4HgprAnO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAyMCkge1xuICAgICAgICAgICAgcmV0dXJuICfgpqzgpr/gppXgpr7gprInO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICfgprDgpr7gpqQnO1xuICAgICAgICB9XG4gICAgfSxcbiAgICB3ZWVrIDoge1xuICAgICAgICBkb3cgOiAwLCAvLyBTdW5kYXkgaXMgdGhlIGZpcnN0IGRheSBvZiB0aGUgd2Vlay5cbiAgICAgICAgZG95IDogNiAgLy8gVGhlIHdlZWsgdGhhdCBjb250YWlucyBKYW4gMXN0IGlzIHRoZSBmaXJzdCB3ZWVrIG9mI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C8i+C9mOC9vC8sXG4gICAgbWVyaWRpZW1Ib3VyIDogZnVuY3Rpb24gKGhvdXIsIG1lcmlkaWVtKSB7XG4gICAgICAgIGlmIChob3VyID09PSAxMikge1xuICAgICAgICAgICAgaG91ciA9IDA7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKChtZXJpZGllbSA9PT0gJ+C9mOC9muC9k+C8i+C9mOC9vCcgJiYgaG91ciA+PSA0KSB8fFxuICAgICAgICAgICAgICAgIChtZXJpZGllbSA9PT0gJ+C9ieC9suC9k+C8i+C9guC9tOC9hCcgJiYgaG91ciA8IDUpIHx8XG4gICAgICAgICAgICAgICAgbWVyaWRpZW0gPT09ICfgvZHgvYLgvbzgvYTgvIvgvZHgvYInKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXI7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIG1lcmlkaWVtIDogZnVuY3Rpb24gKGhvdXIsIG1pbnV0ZSwgaXNMb3dlcikge1xuICAgICAgICBpZiAoaG91ciA8IDQpIHtcbiAgICAgICAgICAgIHJldHVybiAn4L2Y4L2a4L2T4LyL4L2Y4L28JztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTApIHtcbiAgICAgICAgICAgIHJldHVybiAn4L2e4L284L2C4L2m4LyL4L2A4L2mJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTcpIHtcbiAgICAgICAgICAgIHJldHVybiAn4L2J4L2y4L2T4LyL4L2C4L204L2EJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMjApIHtcbiAgICAgICAgICAgIHJldHVybiAn4L2R4L2C4L284L2E4LyL4L2R4L2CJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAn4L2Y4L2a4L2T4LyL4L2Y4L28JztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgd2VlayA6IHtcbi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4LCBrZXkpIHtcbiAgICB2YXIgZm9ybWF0ID0ge1xuICAgICAgICAnbW0nOiAnbXVudXRlbm4nLFxuICAgICAgICAnTU0nOiAnbWl6JyxcbiAgICAgICAgJ2RkJzogJ2RldmV6aCdcbiAgICB9O1xuICAgIHJldHVybiBudW1iZXIgKyAnICcgKyBtdXRhdGlvbihmb3JtYXRba2V5XSwgbnVtYmVyKTtcbn1cbmZ1bmN0aW9uIHNwZWNpYWxNdXRhdGlvbkZvclllYXJzKG51bWJlcikge1xuICAgIHN3aXRjaCAobGFzdE51bWJlcihudW1iZXIpKSB7XG4gICAgICAgIGNhc2UgMTpcbiAgICAgICAgY2FzZSAzOlxuICAgICAgICBjYXNlIDQ6XG4gICAgICAgIGNhc2UgNTpcbiAgICAgICAgY2FzZSA5OlxuICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICcgYmxvYXonO1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICcgdmxvYXonO1xuICAgIH1cbn1cbmZ1bmN0aW9uIGxhc3ROdW1iZXIobnVtYmVyKSB7XG4gICAgaWYgKG51bWJlciA+IDkpIHtcbiAgICAgICAgcmV0dXJuIGxhc3ROdW1iZXIobnVtYmVyICUgMTApO1xuICAgIH1cbiAgICByZXR1cm4gbnVtYmVyO1xufVxuZnVuY3Rpb24gbXV0YXRpb24odGV4dCwgbnVtYmVyKSB7XG4gICAgaWYgKG51bWJlciA9PT0gMikge1xuICAgICAgICByZXR1cm4gc29mdE11dGF0aW9uKHRleHQpO1xuICAgIH1cbiAgICByZXR1cm4gdGV4dDtcbn1cbmZ1bmN0aW9uIHNvZnRNdXRhdGlvbih0ZXh0KSB7XG4gICAgdmFyIG11dGF0aW9uVGFibGUgPSB7XG4gICAgICAgICdtJzogJ3YnLFxuICAgICAgICAnYic6ICd2JyxcbiAgICAgICAgJ2QnOiAneidcbiAgICB9O1xuICAgIGlmIChtdXRhdGlvblRhYmxlW3RleHQuY2hhckF0K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bnQpXG59KHRoaXMsIChmdW5jdGlvbiAobW9tZW50KSB7ICd1c2Ugc3RyaWN0JztcblxuXG5mdW5jdGlvbiB0cmFuc2xhdGUobnVtYmVyLCB3aXRob3V0U3VmZml4LCBrZXkpIHtcbiAgICB2YXIgcmVzdWx0ID0gbnVtYmVyICsgJyAnO1xuICAgIHN3aXRjaCAoa2V5KSB7XG4gICAgICAgIGNhc2UgJ20nOlxuICAgICAgICAgICAgcmV0dXJuIHdpdGhvdXRTdWZmaXggPyAnamVkbmEgbWludXRhJyA6ICdqZWRuZSBtaW51dGUnO1xuICAgICAgICBjYXNlICdtbSc6XG4gICAgICAgICAgICBpZiAobnVtYmVyID09PSAxKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtaW51dGEnO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChudW1iZXIgPT09IDIgfHwgbnVtYmVyID09PSAzIHx8IG51bWJlciA9PT0gNCkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnbWludXRlJztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtaW51dGEnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgY2FzZSAnaCc6XG4gICAgICAgICAgICByZXR1cm4gd2l0aG91dFN1ZmZpeCA/ICdqZWRhbiBzYXQnIDogJ2plZG5vZyBzYXRhJztcbiAgICAgICAgY2FzZSAnaGgnOlxuICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnc2F0JztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyID09PSAyIHx8IG51bWJlciA9PT0gMyB8fCBudW1iZXIgPT09IDQpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ3NhdGEnO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ3NhdGknO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgY2FzZSAnZGQnOlxuICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnZGFuJztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdkYW5hJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIGNhc2UgJ01NJzpcbiAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ21qZXNlYyc7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMiB8fCBudW1iZXIgPT09IDMgfHwgbnVtYmVyID09PSA0KSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtamVzZWNhJztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtamVzZWNpJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIGNhc2UgJ3l5JzpcbiAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ2dvZGluYSc7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMiB8fCBudW1iZXIgPT09IDMgfHwgbnVtYmVyID09PSA0KSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdnb2RpbmUnO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ2dvZGluYSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cbn1cblxudmFyIGJzID0gbW9t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FdlZWsgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIFtuZWRqZWxqdV0gW3VdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIFtzcmlqZWR1XSBbdV0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gW3N1Ym90dV0gW3VdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIGRkZGQgW3VdIExUJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgbGFzdERheSAgOiAnW2p1xI1lciB1XSBMVCcsXG4gICAgICAgIGxhc3RXZWVrIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbcHJvxaFsdV0gZGRkZCBbdV0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbcHJvxaFsZV0gW3N1Ym90ZV0gW3VdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3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aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiAnW2F2dWkgYSAnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ2xlcycgOiAnbGEnKSArICddIExUJztcbiAgICAgICAgfSxcbiAgICAgICAgbmV4dERheSA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiAnW2RlbcOgIGEgJyArICgodGhpcy5ob3VycygpICE9PSAxKSA/ICdsZXMnIDogJ2xhJykgKyAnXSBMVCc7XG4gICAgICAgIH0sXG4gICAgICAgIG5leHRXZWVrIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuICdkZGRkIFthICcgKyAoKHRoaXMuaG91cnMoKSAhPT0gMSkgPyAnbGVzJyA6ICdsYScpICsgJ10gTFQnO1xuICAgICAgICB9LFxuICAgICAgICBsYXN0RGF5IDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuICdbYWhpciBhICcgKyAoKHRoaXMuaG91cnMoKSAhPT0gMSkgPyAnbGVzJyA6ICdsYScpICsgJ10gTFQnO1xuICAgICAgICB9LFxuICAgICAgICBsYXN0V2VlayA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiAnW2VsXSBkZGRkIFtwYXNzYXQgYSAnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ2xlcycgOiAnbGEnKSArICddIExUJztcbiAgICAgICAgfSxcbiAgICAgICAgc2FtZUVsc2UgOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJ2RcXCdhcXXDrSAlcycsXG4gICAgICAgIHBhc3QgOiAnZmEgJXMnLFxuICAgICAgICBzIDogJ3VucyBzZWdvbnMnLFxuICAgICAgICBtIDogJ3VuIG1pbnV0JyxcbiAgICAgICAgbW0gOiAnJWQgbWludXRzJyxcbiAgICAgICAgaCA6ICd1bmEgaG9yYScsXG4gICAgICAgIGhoIDogJyVkIGhvcmVzJyxcbiAgICAgICAgZCA6ICd1biBkaWEnLFxuICAgICAgICBkZCA6ICclZCBkaWVzJyxcbiAgICAgICAgTSA6ICd1biBtZXMnLFxuICAgICAgICBNTSA6ICclZCBtZXNvcycsXG4gICAgICAgIHkgOiAndW4gYW55JyxcbiAgICAgICAgeXkgOiAnJWQgYW55cydcbiAgICB9LFxuICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2U6IC9cXGR7MSwyfShyfG58dHzDqHxhKS8sXG4gICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIsIHBlcmlvZCkge1xuICAgICAgICB2YXIgb3V0cHV0ID0gKG51bWJlciA9PT0gMSkgPyAncicgOlxuICAgICAgICAgICAgKG51bWJlciA9PT0gMikgPyAnbicgOlxuICAgICAgICAgICAgKG51bWJlciA9PT0gMykgPyAncicgOlxuICAgICAgICAgICAgKG51bWJlciA9PT0gNCkgPyAndCcgOiAnw6gnO1xuICAgICAgICBpZiAocGVyaW9kID09PSAndycgfHwgcGVyaW9kID09PSAnVycpIHtcbiAgICAgICAgICAgIG91dHB1dCA9ICdhJztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbnVtYmVyICsgb3V0cHV0O1xuICAgIH0sXG4gICAgd2VlayA6IHtcbiAgICAgICAgZG93IDogMSwgLy8gTW9uZGF5IGlzIHRoZSBmaXJzdCBkYXkgb2YgdGhlIHdlZWsuXG4gICAgICAgIGRveSA6IDQgIC8vIFRoZSB3ZWVrIHRoYXQgY29udGFpbnMgSmFuIDR0aCBpcyB0aGUgZmlyc3Qgd2VlayBvZiB0aGUgeWVhci5cbiAgICB9XG59KTtcblxucmV0dXJuIGNhO1xuXG59KSkpO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9+L21vbWVudC9sb2NhbGUvY2EuanNcbi8vIG1vZHVsZSBpZCA9IDI0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCIs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aWYgKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHBsdXJhbChudW1iZXIpID8gJ2hvZGlueScgOiAnaG9kaW4nKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdob2RpbmFtaSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAnZCc6ICAvLyBhIGRheSAvIGluIGEgZGF5IC8gYSBkYXkgYWdvXG4gICAgICAgICAgICByZXR1cm4gKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpID8gJ2RlbicgOiAnZG5lbSc7XG4gICAgICAgIGNhc2UgJ2RkJzogLy8gOSBkYXlzIC8gaW4gOSBkYXlzIC8gOSBkYXlzIGFnb1xuICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHBsdXJhbChudW1iZXIpID8gJ2RueScgOiAnZG7DrScpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ2RueSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAnTSc6ICAvLyBhIG1vbnRoIC8gaW4gYSBtb250aCAvIGEgbW9udGggYWdvXG4gICAgICAgICAgICByZXR1cm4gKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpID8gJ23Em3PDrWMnIDogJ23Em3PDrWNlbSc7XG4gICAgICAgIGNhc2UgJ01NJzogLy8gOSBtb250aHMgLyBpbiA5IG1vbnRocyAvIDkgbW9udGhzIGFnb1xuICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHBsdXJhbChudW1iZXIpID8gJ23Em3PDrWNlJyA6ICdtxJtzw61jxa8nKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdtxJtzw61jaSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAneSc6ICAvLyBhIHllYXIgLyBpbiBhIHllYXIgLyBhIHllYXIgYWdvXG4gICAgICAgICAgICByZXR1cm4gKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpID8gJ3JvaycgOiAncm9rZW0nO1xuICAgICAgICBjYXNlICd5eSc6IC8vIDkgeWVhcnMgLyBpbiA5IHllYXJzIC8gOSB5ZWFycyBhZ29cbiAgICAgICAgICAgIGlmICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArIChwbHVyYWwobnVtYmVyKSA/ICdyb2t5JyA6ICdsZXQnKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdsZXR5JztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgIH1cbn1cblxudmFyIGNzID0gbW9tZW50LmRlZmluZUxvY2FsZSgnY3MnLCB7XG4gICAgbW9udGhzIDogbW9udGhzLFxuICAgIG1vbnRoc1Nob3J0IDogbW9udGhzU2hvcnQsXG4gICAgbW9udGhzUGFyc2UgOiAoZnVuY3Rpb24gKG1vbnRocywgbW9udGhzU2hvcnQpIHtcbiAgICAgICAgdmFyIGksIF9tb250aHNQYXJzZSA9IFtdO1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgMTI7IGkrKykge1xuICAgICAgICAgICAgLy8gdXNlIGN1c3RvbSBwYXJzZXIgdG8gc29sdmUgcHJvYmxlbSB3aXRoIEp1bHkgKMSNZXJ2ZW5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yksXG4gICAgd2Vla2RheXNNaW4gOiAnbmVfcG9fw7p0X3N0X8SNdF9ww6Ffc28nLnNwbGl0KCdfJyksXG4gICAgbG9uZ0RhdGVGb3JtYXQgOiB7XG4gICAgICAgIExUOiAnSDptbScsXG4gICAgICAgIExUUyA6ICdIOm1tOnNzJyxcbiAgICAgICAgTCA6ICdERC5NTS5ZWVlZJyxcbiAgICAgICAgTEwgOiAnRC4gTU1NTSBZWVlZJyxcbiAgICAgICAgTExMIDogJ0QuIE1NTU0gWVlZWSBIOm1tJyxcbiAgICAgICAgTExMTCA6ICdkZGRkIEQuIE1NTU0gWVlZWSBIOm1tJyxcbiAgICAgICAgbCA6ICdELiBNLiBZWVlZJ1xuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXk6ICdbZG5lcyB2XSBMVCcsXG4gICAgICAgIG5leHREYXk6ICdbesOtdHJhIHZdIExUJyxcbiAgICAgICAgbmV4dFdlZWs6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdiBuZWTEm2xpIHZdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2XSBkZGRkIFt2XSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2ZSBzdMWZZWR1IHZdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ZlIMSNdHZydGVrIHZdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3YgcMOhdGVrIHZdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3Ygc29ib3R1IHZdIExUJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgbGFzdERheTogJ1t2xI1lcmEgdl0gTFQnLFxuICAgICAgICBsYXN0V2VlazogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1ttaW51bG91IG5lZMSbbGkgdl0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW21pbnVsw6ldIGRkZGQgW3ZdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW21pbnVsb3Ugc3TFmWVkdSB2XSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbbWludWzDvV0gZGRkZCBbdl0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbbWludWxvdSBzb2JvdHUgdl0gTFQnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBzYW1lRWxzZTogJ0wnXG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6ICd6YSAlcycsXG4gICAgICAgIHBhc3QgOiAncMWZZWQgJXMnLFxuICAgICAgICBzIDogdHJhbnNsYXRlLFxuICAgICAgICBtIDogdHJhbnNsYXRlLFxuICAgICAgICBtbSA6IHRyYW5zbGF0ZSxcbiAgICAgICAgaCA6IHRyYW5zbGF0ZSxcbiAgICAgICAga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CBtdW51ZCcsXG4gICAgICAgIGg6ICdhd3InLFxuICAgICAgICBoaDogJyVkIGF3cicsXG4gICAgICAgIGQ6ICdkaXdybm9kJyxcbiAgICAgICAgZGQ6ICclZCBkaXdybm9kJyxcbiAgICAgICAgTTogJ21pcycsXG4gICAgICAgIE1NOiAnJWQgbWlzJyxcbiAgICAgICAgeTogJ2Jsd3lkZHluJyxcbiAgICAgICAgeXk6ICclZCBmbHluZWRkJ1xuICAgIH0sXG4gICAgZGF5T2ZNb250aE9yZGluYWxQYXJzZTogL1xcZHsxLDJ9KGZlZHxhaW58YWZ8aWx8eWRkfGVkfGVnKS8sXG4gICAgLy8gdHJhZGl0aW9uYWwgb3JkaW5hbCBudW1iZXJzIGFib3ZlIDMxIGFyZSBub3QgY29tbW9ubHkgdXNlZCBpbiBjb2xsb3F1aWFsIFdlbHNoXG4gICAgb3JkaW5hbDogZnVuY3Rpb24gKG51bWJlcikge1xuICAgICAgICB2YXIgYiA9IG51bWJlcixcbiAgICAgICAgICAgIG91dHB1dCA9ICcnLFxuICAgICAgICAgICAgbG9va3VwID0gW1xuICAgICAgICAgICAgICAgICcnLCAnYWYnLCAnaWwnLCAneWRkJywgJ3lkZCcsICdlZCcsICdlZCcsICdlZCcsICdmZWQnLCAnZmVkJywgJ2ZlZCcsIC8vIDFhZiB0byAxMGZlZFxuICAgICAgICAgICAgICAgICdlZycsICdmZWQnLCAnZWcnLCAnZWcnLCAnZmVkJywgJ2VnJywgJ2VnJywgJ2ZlZCcsICdlZycsICdmZWQnIC8vIDExZWcgdG8gMjBmZWRcbiAgICAgICAgICAgIF07XG4gICAgICAgIGlmIChiID4gMjApIHtcbiAgICAgICAgICAgIGlmIChiID09PSA0MCB8fCBiID09PSA1MCB8fCBiID09PSA2MCB8fCBiID09PSA4MCB8fCBiID09PSAxMDApIHtcbiAgICAgICAgICAgICAgICBvdXRwdXQgPSAnZmVkJzsgLy8gbm90IDMwYWluLCA3MGFpbiBvciA5MGFpblxuICAgICAgICA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4gICAgJ96E3qreg96n3pDesN6K3qbejN6oJyxcbiAgICAn3oDeqt6G3qreg96qJyxcbiAgICAn3oDert6C3qjegN6o3oPeqidcbl07XG5cbnZhciBkdiA9IG1vbWVudC5kZWZpbmVMb2NhbGUoJ2R2Jywge1xuICAgIG1vbnRocyA6IG1vbnRocyxcbiAgICBtb250aHNTaG9ydCA6IG1vbnRocyxcbiAgICB3ZWVrZGF5cyA6IHdlZWtkYXlzLFxuICAgIHdlZWtkYXlzU2hvcnQgOiB3ZWVrZGF5cyxcbiAgICB3ZWVrZGF5c01pbiA6ICfeh96n3oveqF/egN6v3onepl/eh96m3oLesF/ehN6q3ovepl/ehN6q3oPep1/egN6q3obeql/egN6u3oLeqCcuc3BsaXQoJ18nKSxcbiAgICBsb25nRGF0ZUZvcm1hdCA6IHtcblxuICAgICAgICBMVCA6ICdISDptbScsXG4gICAgICAgIExUUyA6ICdISDptbTpzcycsXG4gICAgICAgIEwgOiAnRC9NL1lZWVknLFxuICAgICAgICBMTCA6ICdEIE1NTU0gWVlZWScsXG4gICAgICAgIExMTCA6ICdEIE1NTU0gWVlZWSBISDptbScsXG4gICAgICAgIExMTEwgOiAnZGRkZCBEIE1NTU0gWVlZWSBISDptbSdcbiAgICB9LFxuICAgIG1lcmlkaWVtUGFyc2U6IC/eid6GfN6J3oovLFxuICAgIGlzUE0gOiBmdW5jdGlvbiAoaW5wdXQpIHtcbiAgICAgICAgcmV0dXJuICfeid6KJyA9PT0gaW5wdXQ7XG4gICAgfSxcbiAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcbiAgICAgICAgaWYgKGhvdXIgPCAxMikge1xuICAgICAgICAgICAgcmV0dXJuICfeid6GJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAn3oneiic7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIGNhbGVuZGFyIDoge1xuICAgICAgICBzYW1lRGF5IDogJ1veid6o3ofept6L3qpdIExUJyxcbiAgICAgICAgbmV4dERheSA6ICdb3onep96L3qbeid6nXSBMVCcsXG4gICAgICAgIG5leHRXZWVrIDogJ2RkZGQgTFQnLFxuICAgICAgICBsYXN0RGF5IDogJ1veh96o3ofesN6U3qxdIExUJyxcbiAgICAgICAgbGFzdFdlZWsgOiAnW96K3qfeh96o3ozeqt6I3qhdIGRkZGQgTFQnLFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAn3ozerN6D3q3ejt6m3ofeqCAlcycsXG4gICAgICAgIHBhc3QgOiAn3obeqt6D3qjegt6wICVzJyxcbiAgICAgICAgcyA6ICfekN6o3obeqt6C3rDejN6q3obert6F3qzeh96wJyxcbiAgICAgICAgbSA6ICfeid6o3oLeqN6T3qzeh96wJyxcbiAgICAgICAgbW0gOiAn3oneqN6C3qjek96qICVkJyxcbiAgICAgICAgaCA6ICfejt6m3pHeqN6H3qjeg96s3ofesCcsXG4gICAgICAgIGhoIDogJ96O3qbekd6o3ofeqN6D3qogJWQnLFxuICAgICAgICBkIDogJ96L3qreiN6m3oDerN6H3rAnLFxuICAgICAgICBkZCA6ICfei96q3ojept6Q3rAgJWQnLFxuICAgICAgICBNIDogJ96J3qbegN6s3ofesCcsXG4gICAgICAgIE1NIDogJ96J3qbekN6wICVkJyxcbiAgICAgICAgeSA6ICfeh96m3oDept6D3qzeh96wJyxcbiAgICAgICAgeXkgOiAn3ofept6A3qbeg96qICVkJ1xuICAgIH0sXG4gICAgcHJlcGFyc2U6IGZ1bmN0aW9uIChzdHJpbmcpIHtcbiAgICAgICAgcmV0dXJuIHN0cmluZy5yZXBsYWNlKC/YjC9nLCAnLCcpO1xuICAgIH0sXG4gICAgcG9zdGZvcm1hdDogZnVuY3Rpb24gKHN0cmluZykge1xuICAgICAgICByZXR1cm4gc3RyaW5nLnJlcGxhY2UoLywvZywgJ9iMJyk7X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R1cm4gaXNMb3dlciA/ICfPgM68JyA6ICfOoM6cJztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgaXNQTSA6IGZ1bmN0aW9uIChpbnB1dCkge1xuICAgICAgICByZXR1cm4gKChpbnB1dCArICcnKS50b0xvd2VyQ2FzZSgpWzBdID09PSAnzrwnKTtcbiAgICB9LFxuICAgIG1lcmlkaWVtUGFyc2UgOiAvW86gzpxdXFwuP86cP1xcLj8vaSxcbiAgICBsb25nRGF0ZUZvcm1hdCA6IHtcbiAgICAgICAgTFQgOiAnaDptbSBBJyxcbiAgICAgICAgTFRTIDogJ2g6bW06c3MgQScsXG4gICAgICAgIEwgOiAnREQvTU0vWVlZWScsXG4gICAgICAgIExMIDogJ0QgTU1NTSBZWVlZJyxcbiAgICAgICAgTExMIDogJ0QgTU1NTSBZWVlZIGg6bW0gQScsXG4gICAgICAgIExMTEwgOiAnZGRkZCwgRCBNTU1NIFlZWVkgaDptbSBBJ1xuICAgIH0sXG4gICAgY2FsZW5kYXJFbCA6IHtcbiAgICAgICAgc2FtZURheSA6ICdbzqPOrs68zrXPgc6xIHt9XSBMVCcsXG4gICAgICAgIG5leHREYXkgOiAnW86Rz43Pgc65zr8ge31dIExUJyxcbiAgICAgICAgbmV4dFdlZWsgOiAnZGRkZCBbe31dIExUJyxcbiAgICAgICAgbGFzdERheSA6ICdbzqfOuM61z4Ige31dIExUJyxcbiAgICAgICAgbGFzdFdlZWsgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW8+Ezr8gz4DPgc6/zrfOs86/z43OvM61zr3Ov10gZGRkZCBbe31dIExUJztcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vPhM63zr0gz4DPgc6/zrfOs86/z43OvM61zr3Ot10gZGRkZ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XRdIExUJyxcbiAgICAgICAgc2FtZUVsc2UgOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJ2luICVzJyxcbiAgICAgICAgcGFzdCA6ICclcyBhZ28nLFxuICAgICAgICBzIDogJ2EgZmV3IHNlY29uZHMnLFxuICAgICAgICBtIDogJ2EgbWludXRlJyxcbiAgICAgICAgbW0gOiAnJWQgbWludXRlcycsXG4gICAgICAgIGggOiAnYW4gaG91cicsXG4gICAgICAgIGhoIDogJyVkIGhvdXJzJyxcbiAgICAgICAgZCA6ICdhIGRheScsXG4gICAgICAgIGRkIDogJyVkIGRheXMnLFxuICAgICAgICBNIDogJ2EgbW9udGgnLFxuICAgICAgICBNTSA6ICclZCBtb250aHMnLFxuICAgICAgICB5IDogJ2EgeWVhcicsXG4gICAgICAgIHl5IDogJyVkIHllYXJzJ1xuICAgIH0sXG4gICAgZGF5T2ZNb250aE9yZGluYWxQYXJzZTogL1xcZHsxLDJ9KHN0fG5kfHJkfHRoKS8sXG4gICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIpIHtcbiAgICAgICAgdmFyIGIgPSBudW1iZXIgJSAxMCxcbiAgICAgICAgICAgIG91dHB1dCA9ICh+fihudW1iZXIgJSAxMDAgLyAxMCkgPT09IDEpID8gJ3RoJyA6XG4gICAgICAgICAgICAoYiA9PT0gMSkgPyAnc3QnIDpcbiAgICAgICAgICAgIChiID09PSAyKSA/ICduZCcgOlxuICAgICAgICAgICAgKGIgPT09IDMpID8gJ3JkJyA6ICd0aCc7XG4gICAgICAgIHJldHVybiBudW1iZXIgKyBvdXRwdXQ7XG4gICAgfSxcbiAgICB3ZWVrIDoge1xuICAgICAgICBkb3cgOiAxLCAvLyBNb25kYXkgaXMgdGhlIGZpcnN0IGRheSBvZiB0aGUgd2Vlay5cbiAgICAgICAgZG95IDogNCAgLy8gVGhlIHdlZWsgdGhhdCBjb250YWlucyBKYW4gNHRoIGl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ByZXR1cm4gJ2RkZGQgW2EgbGEnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ3MnIDogJycpICsgJ10gTFQnO1xuICAgICAgICB9LFxuICAgICAgICBsYXN0RGF5IDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuICdbYXllciBhIGxhJyArICgodGhpcy5ob3VycygpICE9PSAxKSA/ICdzJyA6ICcnKSArICddIExUJztcbiAgICAgICAgfSxcbiAgICAgICAgbGFzdFdlZWsgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gJ1tlbF0gZGRkZCBbcGFzYWRvIGEgbGEnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ3MnIDogJycpICsgJ10gTFQnO1xuICAgICAgICB9LFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAnZW4gJXMnLFxuICAgICAgICBwYXN0IDogJ2hhY2UgJXMnLFxuICAgICAgICBzIDogJ3Vub3Mgc2VndW5kb3MnLFxuICAgICAgICBtIDogJ3VuIG1pbnV0bycsXG4gICAgICAgIG1tIDogJyVkIG1pbnV0b3MnLFxuICAgICAgICBoIDogJ3VuYSBob3JhJyxcbiAgICAgICAgaGggOiAnJWQgaG9yYXMnLFxuICAgICAgICBkIDogJ3VuIGTDrWEnLFxuICAgICAgICBkZCA6ICclZCBkw61hcycsXG4gICAgICAgIE0gOiAndW4gbWVzJyxcbiAgICAgICAgTU0gOiAnJWQgbWVzZXMnLFxuICAgICAgICB5IDogJ3VuIGHDsW8nLFxuICAgICAgICB5eSA6ICclZCBhw7FvcydcbiAgICB9LFxuICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2UgOiAvXFxkezEsMn3Cui8sXG4gICAgb3JkaW5hbCA6ICclZMK6JyxcbiAgICB3ZWVrIDoge1xuICAgICAgICBkb3cgOiAxLCAvLyBNb25kYXkgaXM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OiAnSDptbScsXG4gICAgICAgIExUUyA6ICdIOm1tOnNzJyxcbiAgICAgICAgTCA6ICdERC9NTS9ZWVlZJyxcbiAgICAgICAgTEwgOiAnRCBbZGVdIE1NTU0gW2RlXSBZWVlZJyxcbiAgICAgICAgTExMIDogJ0QgW2RlXSBNTU1NIFtkZV0gWVlZWSBIOm1tJyxcbiAgICAgICAgTExMTCA6ICdkZGRkLCBEIFtkZV0gTU1NTSBbZGVdIFlZWVkgSDptbSdcbiAgICB9LFxuICAgIGNhbGVuZGFyIDoge1xuICAgICAgICBzYW1lRGF5IDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuICdbaG95IGEgbGEnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ3MnIDogJycpICsgJ10gTFQnO1xuICAgICAgICB9LFxuICAgICAgICBuZXh0RGF5IDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuICdbbWHDsWFuYSBhIGxhJyArICgodGhpcy5ob3VycygpICE9PSAxKSA/ICdzJyA6ICcnKSArICddIExUJztcbiAgICAgICAgfSxcbiAgICAgICAgbmV4dFdlZWsgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gJ2RkZGQgW2EgbGEnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ3MnIDogJycpICsgJ10gTFQnO1xuICAgICAgICB9LFxuICAgICAgICBsYXN0RGF5IDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuICdbYXllciBhIGxhJyArICgodGhpcy5ob3VycygpICE9PSAxKSA/ICdzJyA6ICcnKSArICddIExUJztcbiAgICAgICAgfSxcbiAgICAgICAgbGFzdFdlZWsgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gJ1tlbF0gZGRkZCBbcGFzYWRvIGEgbGEnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ3MnIDogJycpICsgJ10gTFQnO1xuICAg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Rpb24gKGhvdXIsIG1pbnV0ZSwgaXNMb3dlcikge1xuICAgICAgICBpZiAoaG91ciA8IDEyKSB7XG4gICAgICAgICAgICByZXR1cm4gJ9mC2KjZhCDYp9iyINi42YfYsSc7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gJ9io2LnYryDYp9iyINi42YfYsSc7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIGNhbGVuZGFyIDoge1xuICAgICAgICBzYW1lRGF5IDogJ1vYp9mF2LHZiNiyINiz2KfYudiqXSBMVCcsXG4gICAgICAgIG5leHREYXkgOiAnW9mB2LHYr9inINiz2KfYudiqXSBMVCcsXG4gICAgICAgIG5leHRXZWVrIDogJ2RkZGQgW9iz2KfYudiqXSBMVCcsXG4gICAgICAgIGxhc3REYXkgOiAnW9iv24zYsdmI2LIg2LPYp9i52KpdIExUJyxcbiAgICAgICAgbGFzdFdlZWsgOiAnZGRkZCBb2b7bjNi0XSBb2LPYp9i52KpdIExUJyxcbiAgICAgICAgc2FtZUVsc2UgOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJ9iv2LEgJXMnLFxuICAgICAgICBwYXN0IDogJyVzINm+24zYtCcsXG4gICAgICAgIHMgOiAn2obZhtivINir2KfZhtuM2YcnLFxuICAgICAgICBtIDogJ9uM2qkg2K/ZgtuM2YLZhycsXG4gICAgICAgIG1tIDogJyVkINiv2YLbjNmC2YcnLFxuICAgICAgICBoIDogJ9uM2qkg2LPYp9i52KonLFxuICAgICAgICBoaCA6ICclZCDYs9in2LnYqicsXG4gICAgICAgIGQgOiAn24zaqSDYsdmI2LInLFxuICAgICAgICBkZCA6ICclZCDYsdmI2LInLFxuICAgICAgICBNIDogJ9uM2qkg2YXYp9mHJyxcbiAgICAgICAgTU0gOiAnJWQg2YXYp9mHJyxcbiAgICAgICAgeSA6ICfbjNqpINiz2KfZhCcsXG4gICAgICAgIHl5IDogJyV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ZWt1bm5pbicgOiAnbXV1dGFtYSBzZWt1bnRpJztcbiAgICAgICAgY2FzZSAnbSc6XG4gICAgICAgICAgICByZXR1cm4gaXNGdXR1cmUgPyAnbWludXV0aW4nIDogJ21pbnV1dHRpJztcbiAgICAgICAgY2FzZSAnbW0nOlxuICAgICAgICAgICAgcmVzdWx0ID0gaXNGdXR1cmUgPyAnbWludXV0aW4nIDogJ21pbnV1dHRpYSc7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAnaCc6XG4gICAgICAgICAgICByZXR1cm4gaXNGdXR1cmUgPyAndHVubmluJyA6ICd0dW50aSc7XG4gICAgICAgIGNhc2UgJ2hoJzpcbiAgICAgICAgICAgIHJlc3VsdCA9IGlzRnV0dXJlID8gJ3R1bm5pbicgOiAndHVudGlhJztcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICdkJzpcbiAgICAgICAgICAgIHJldHVybiBpc0Z1dHVyZSA/ICdww6RpdsOkbicgOiAncMOkaXbDpCc7XG4gICAgICAgIGNhc2UgJ2RkJzpcbiAgICAgICAgICAgIHJlc3VsdCA9IGlzRnV0dXJlID8gJ3DDpGl2w6RuJyA6ICdww6RpdsOkw6QnO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgJ00nOlxuICAgICAgICAgICAgcmV0dXJuIGlzRnV0dXJlID8gJ2t1dWthdWRlbicgOiAna3V1a2F1c2knO1xuICAgICAgICBjYXNlICdNTSc6XG4gICAgICAgICAgICByZXN1bHQgPSBpc0Z1dHVyZSA/ICdrdXVrYXVkZW4nIDogJ2t1dWthdXR0YSc7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAneSc6XG4gICAgICAgICAgICByZXR1cm4gaXNGdXR1cmUgPyAndnVvZGVuJyA6ICd2dW9zaSc7XG4gICAgICAgIGNhc2UgJ3l5JzpcbiAgICAgICAgICAgIHJlc3VsdCA9IGlzRnV0dXJlID8gJ3Z1b2Rlbicg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bWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6ICdkYW5zICVzJyxcbiAgICAgICAgcGFzdCA6ICdpbCB5IGEgJXMnLFxuICAgICAgICBzIDogJ3F1ZWxxdWVzIHNlY29uZGVzJyxcbiAgICAgICAgbSA6ICd1bmUgbWludXRlJyxcbiAgICAgICAgbW0gOiAnJWQgbWludXRlcycsXG4gICAgICAgIGggOiAndW5lIGhldXJlJyxcbiAgICAgICAgaGggOiAnJWQgaGV1cmVzJyxcbiAgICAgICAgZCA6ICd1biBqb3VyJyxcbiAgICAgICAgZGQgOiAnJWQgam91cnMnLFxuICAgICAgICBNIDogJ3VuIG1vaXMnLFxuICAgICAgICBNTSA6ICclZCBtb2lzJyxcbiAgICAgICAgeSA6ICd1biBhbicsXG4gICAgICAgIHl5IDogJyVkIGFucydcbiAgICB9LFxuICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2U6IC9cXGR7MSwyfShlcnxlKS8sXG4gICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIsIHBlcmlvZCkge1xuICAgICAgICBzd2l0Y2ggKHBlcmlvZCkge1xuICAgICAgICAgICAgLy8gV29yZHMgd2l0aCBtYXNjdWxpbmUgZ3JhbW1hdGljYWwgZ2VuZGVyOiBtb2lzLCB0cmltZXN0cmUsIGpvdXJcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICBjYXNlICdNJzpcbiAgICAgICAgICAgIGNhc2UgJ1EnOlxuICAgICAgICAgICAgY2FzZSAnRCc6XG4gICAgICAgICAgICBjYXNlICdEREQnOlxuICAgICAgICAgICAgY2FzZSAnZCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArIChudW1iZXIgPT09IDEgPyAnZXInIDogJ2UnKTtcblxuICAgICAgICAgICAgLy8gV29yZHMgd2l0aCBmZW1pbmluZSBncmFtbWF0aWNhbCBnZW5kZXI6IHNlbWFpbmVcbiAgICAgICAgICAgIGNhc2UgJ3cnOlxuICAgIC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gbGFzdFdlZWsgOiAnZGRkZCBbZGVybmllciDDoF0gTFQnLFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAnZGFucyAlcycsXG4gICAgICAgIHBhc3QgOiAnaWwgeSBhICVzJyxcbiAgICAgICAgcyA6ICdxdWVscXVlcyBzZWNvbmRlcycsXG4gICAgICAgIG0gOiAndW5lIG1pbnV0ZScsXG4gICAgICAgIG1tIDogJyVkIG1pbnV0ZXMnLFxuICAgICAgICBoIDogJ3VuZSBoZXVyZScsXG4gICAgICAgIGhoIDogJyVkIGhldXJlcycsXG4gICAgICAgIGQgOiAndW4gam91cicsXG4gICAgICAgIGRkIDogJyVkIGpvdXJzJyxcbiAgICAgICAgTSA6ICd1biBtb2lzJyxcbiAgICAgICAgTU0gOiAnJWQgbW9pcycsXG4gICAgICAgIHkgOiAndW4gYW4nLFxuICAgICAgICB5eSA6ICclZCBhbnMnXG4gICAgfSxcbiAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn0oZXJ8ZSkvLFxuICAgIG9yZGluYWwgOiBmdW5jdGlvbiAobnVtYmVyLCBwZXJpb2QpIHtcbiAgICAgICAgc3dpdGNoIChwZXJpb2QpIHtcbiAgICAgICAgICAgIC8vIFdvcmRzIHdpdGggbWFzY3VsaW5lIGdyYW1tYXRpY2FsIGdlbmRlcjogbW9pcywgdHJpbWVzdHJlLCBqb3VyXG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgY2FzZSAnTSc6XG4gICAgICAgICAgICBjYXNlICdRJzpcbiAgICAgICAgICAgIGNhc2UgJ0QnOlxuICAgICAgICAgICAgY2FzZSAnREREJzpcbiAgICAgICAgICAgIGNhc2UgJ2QnOlxuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAobnVtYmVyID09PSAxID8gJ2VyJyA6ICdlJyk7XG5cbiAgICA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dEIE1NTU0gWVlZWScsXG4gICAgICAgIExMTCA6ICdEIE1NTU0gWVlZWSBISDptbScsXG4gICAgICAgIExMTEwgOiAnZGRkZCBEIE1NTU0gWVlZWSBISDptbSdcbiAgICB9LFxuICAgIGNhbGVuZGFyIDoge1xuICAgICAgICBzYW1lRGF5OiAnW2hqb2VkIG9tXSBMVCcsXG4gICAgICAgIG5leHREYXk6ICdbbW9hcm4gb21dIExUJyxcbiAgICAgICAgbmV4dFdlZWs6ICdkZGRkIFtvbV0gTFQnLFxuICAgICAgICBsYXN0RGF5OiAnW2p1c3RlciBvbV0gTFQnLFxuICAgICAgICBsYXN0V2VlazogJ1vDtGZyw7tuZV0gZGRkZCBbb21dIExUJyxcbiAgICAgICAgc2FtZUVsc2U6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAnb2VyICVzJyxcbiAgICAgICAgcGFzdCA6ICclcyBseW4nLFxuICAgICAgICBzIDogJ2luIHBlYXIgc2Vrb25kZW4nLFxuICAgICAgICBtIDogJ2llbiBtaW7DunQnLFxuICAgICAgICBtbSA6ICclZCBtaW51dGVuJyxcbiAgICAgICAgaCA6ICdpZW4gb2VyZScsXG4gICAgICAgIGhoIDogJyVkIG9lcmVuJyxcbiAgICAgICAgZCA6ICdpZW4gZGVpJyxcbiAgICAgICAgZGQgOiAnJWQgZGFnZW4nLFxuICAgICAgICBNIDogJ2llbiBtb2FubmUnLFxuICAgICAgICBNTSA6ICclZCBtb2FubmVuJyxcbiAgICAgICAgeSA6ICdpZW4gamllcicsXG4gICAgICAgIHl5IDogJyVkIGppZXJyZW4nXG4gICAgfSxcbiAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn0oc3RlfGRlKS8sXG4gICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIpIHtcbiAgICAgICAgcmV0dXJuIG51bWJlciArICgobnVtYmVyID09PSAxIHx8IG51bWJl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gICAgICBMTEwgOiAnRCBbZGVdIE1NTU0gW2RlXSBZWVlZIEg6bW0nLFxuICAgICAgICBMTExMIDogJ2RkZGQsIEQgW2RlXSBNTU1NIFtkZV0gWVlZWSBIOm1tJ1xuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXkgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gJ1tob3hlICcgKyAoKHRoaXMuaG91cnMoKSAhPT0gMSkgPyAnw6FzJyA6ICfDoScpICsgJ10gTFQnO1xuICAgICAgICB9LFxuICAgICAgICBuZXh0RGF5IDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuICdbbWHDscOhICcgKyAoKHRoaXMuaG91cnMoKSAhPT0gMSkgPyAnw6FzJyA6ICfDoScpICsgJ10gTFQnO1xuICAgICAgICB9LFxuICAgICAgICBuZXh0V2VlayA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiAnZGRkZCBbJyArICgodGhpcy5ob3VycygpICE9PSAxKSA/ICfDoXMnIDogJ2EnKSArICddIExUJztcbiAgICAgICAgfSxcbiAgICAgICAgbGFzdERheSA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiAnW29udGUgJyArICgodGhpcy5ob3VycygpICE9PSAxKSA/ICfDoScgOiAnYScpICsgJ10gTFQnO1xuICAgICAgICB9LFxuICAgICAgICBsYXN0V2VlayA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiAnW29dIGRkZGQgW3Bhc2FkbyAnICsgKCh0aGlzLmhvdXJzKCkgIT09IDEpID8gJ8OhcycgOiAnYScpICsgJ10gTFQnO1xuICAgICAgICB9LFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiBmdW5jdGlvbiAoc3RyKSB7XG4gICAgICAgICAgICBp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4gICAgbWVyaWRpZW1QYXJzZTogL3JhdGl8c29rYWxsaXxkb25wYXJhbXxzYW5qZS8sXG4gICAgbWVyaWRpZW1Ib3VyIDogZnVuY3Rpb24gKGhvdXIsIG1lcmlkaWVtKSB7XG4gICAgICAgIGlmIChob3VyID09PSAxMikge1xuICAgICAgICAgICAgaG91ciA9IDA7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lcmlkaWVtID09PSAncmF0aScpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyIDwgNCA/IGhvdXIgOiBob3VyICsgMTI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICdzb2thbGxpJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICdkb25wYXJhbScpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyID4gMTIgPyBob3VyIDogaG91ciArIDEyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAnc2FuamUnKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcbiAgICAgICAgaWYgKGhvdXIgPCA0KSB7XG4gICAgICAgICAgICByZXR1cm4gJ3JhdGknO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxMikge1xuICAgICAgICAgICAgcmV0dXJuICdzb2thbGxpJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTYpIHtcbiAgICAgICAgICAgIHJldHVybiAnZG9ucGFyYW0nO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAyMCkge1xuICAgICAgICAgICAgcmV0dXJuICdzYW5qZSc7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gJ3JhdGknO1xuICAgICAgICB9XG4gICAgf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xf157XkNeZX9eZ15XXoNeZX9eZ15XXnNeZX9eQ15XXkteV16HXmF/Xodek15jXnteR16hf15DXlden15jXldeR16hf16DXldeR157XkdeoX9eT16bXnteR16gnLnNwbGl0KCdfJyksXG4gICAgbW9udGhzU2hvcnQgOiAn15nXoNeV17Nf16TXkdeo17Nf157XqNelX9eQ16TXqNezX9ee15DXmV/XmdeV16DXmV/XmdeV15zXmV/XkNeV15LXs1/Xodek15jXs1/XkNeV16fXs1/XoNeV15HXs1/Xk9em157Xsycuc3BsaXQoJ18nKSxcbiAgICB3ZWVrZGF5cyA6ICfXqNeQ16nXldefX9ep16DXmV/Xqdec15nXqdeZX9eo15HXmdei15lf15fXnteZ16nXmV/XqdeZ16nXmV/XqdeR16onLnNwbGl0KCdfJyksXG4gICAgd2Vla2RheXNTaG9ydCA6ICfXkNezX9eR17Nf15LXs1/Xk9ezX9eU17Nf15XXs1/XqdezJy5zcGxpdCgnXycpLFxuICAgIHdlZWtkYXlzTWluIDogJ9eQX9eRX9eSX9eTX9eUX9eVX9epJy5zcGxpdCgnXycpLFxuICAgIGxvbmdEYXRlRm9ybWF0IDoge1xuICAgICAgICBMVCA6ICdISDptbScsXG4gICAgICAgIExUUyA6ICdISDptbTpzcycsXG4gICAgICAgIEwgOiAnREQvTU0vWVlZWScsXG4gICAgICAgIExMIDogJ0QgW9eRXU1NTU0gWVlZWScsXG4gICAgICAgIExMTCA6ICdEIFvXkV1NTU1NIFlZWVkgSEg6bW0nLFxuICAgICAgICBMTExMIDogJ2RkZGQsIEQgW9eRXU1NTU0gWVlZWSBISDptbScsXG4gICAgICAgIGwgOiAnRC9NL1lZWVknLFxuICAgICAgICBsbCA6ICdEIE1NTSBZWVlZJyxcbiAgICAgICAgbGxsIDogJ0QgTU1NIFlZWVkgSEg6bW0nLFxuICAgICAgICBsbGxsIDogJ2RkZCwgRCBNTU0gWVlZWSBISDptbSdcbiAgICB9LFxuICAgIGNhbGVuZGFyIDoge1xuICAgICAgICBzYW1lRGF5IDogJ1vXlNeZ15XXnSDXkda+XUxUJyxcbiAgICAgICAgbmV4dERheSA6ICdb157Xl9eoINeR1r5dTFQnLFxuICAgICAgICBuZXh0V2VlayA6ICdkZGRkIFvXkdep16LXlF0gTFQnLFxuICAgICAgICBsYXN0RGF5IDogJ1vXkNeq157XldecINeR1r5dTFQnLFxuICAgICAgICBsYXN0V2VlayA6ICdb15HXmdeV151dIGRkZGQgW9eU15DXl9eo15XXnyDXkdep16LXlF0gTFQnLFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAn15HXoteV15MgJXMnLFxuICAgICAgICBwYXN0IDogJ9ec16TXoNeZICVzJyxcbiAgICAgICAgcyA6ICfXnteh16TXqCDXqdeg15nXldeqJyxcbiAgICAgICAgbSA6ICfXk9en15QnLFxuICAgICAgICBtbSA6ICclZCDXk9en15XXqicsXG4gICAgICAgIGggOiAn16nXoteUJyxcbiAgICAgICAgaGggOiBmdW5jdGlvbiAobnVtYmVyKSB7XG4gICAgICAgICAgICBpZiAobnVtYmVyID09PSAyKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICfXqdei16rXmdeZ150nO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICcg16nXoteV16onO1xuICAgICAgICB9LFxuICAgICAgICBkIDogJ9eZ15XXnScsXG4gICAgICAgIGRkIDogZnVuY3Rpb24gKG51bWJlcikge1xuICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMikge1xuICAgICAgICAgICAgICAgIHJldHVybiAn15nXldee15nXmdedJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnINeZ157XmdedJztcbiAgICAgICAgfSxcbiAgICAgICAgTSA6ICfXl9eV15PXqScsXG4gICAgICAgIE1NIDogZnVuY3Rpb24gKG51bWJlcikge1xuICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMikge1xuICAgICAgICAgICAgICAgIHJldHVybiAn15fXldeT16nXmdeZ150nO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICcg15fXldeT16nXmdedJztcbiAgICAgICAgfSxcbiAgICAgICAgeSA6ICfXqdeg15QnLFxuICAgICAgICB5eSA6IGZ1bmN0aW9uIChudW1iZXIpIHtcbiAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gJ9ep16DXqteZ15nXnSc7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciAlIDEwID09PSAwICYmIG51bWJlciAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJyDXqdeg15QnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICcg16nXoNeZ150nO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBtZXJpZGllbVBhcnNlOiAv15DXl9eUXCLXpnzXnNek16DXlFwi16Z815DXl9eo15kg15TXpteU16jXmdeZ151815zXpNeg15kg15TXpteU16jXmdeZ151815zXpNeg15XXqiDXkdeV16fXqHzXkdeR15XXp9eofNeR16LXqNeRL2ksXG4gICAgaXNQTSA6IGZ1bmN0aW9uIChpbnB1dCkge1xuICAgICAgICByZXR1cm4gL14o15DXl9eUXCLXpnzXkNeX16jXmSDXlNem15TXqNeZ15nXnXzXkdei16jXkSkkLy50ZXN0KGlucHV0KTtcbiAgICB9LFxuICAgIG1lcmlkaWVtIDogZnVuY3Rpb24gKGhvdXIsIG1pbnV0ZSwgaXNMb3dlcikge1xuICAgICAgICBpZiAoaG91ciA8IDUpIHtcbiAgICAgICAgICAgIHJldHVybiAn15zXpNeg15XXqiDXkdeV16fXqCc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDEwKSB7XG4gICAgICAgICAgICByZXR1cm4gJ9eR15HXlden16gnO1xuICAgICAgIC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ICAgIGxhc3REYXkgOiAnW+CkleCksl0gTFQnLFxuICAgICAgICBsYXN0V2VlayA6ICdb4KSq4KS/4KSb4KSy4KWHXSBkZGRkLCBMVCcsXG4gICAgICAgIHNhbWVFbHNlIDogJ0wnXG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6ICclcyDgpK7gpYfgpIInLFxuICAgICAgICBwYXN0IDogJyVzIOCkquCkueCksuClhycsXG4gICAgICAgIHMgOiAn4KSV4KWB4KSbIOCkueClgCDgpJXgpY3gpLfgpKMnLFxuICAgICAgICBtIDogJ+Ckj+CklSDgpK7gpL/gpKjgpJ8nLFxuICAgICAgICBtbSA6ICclZCDgpK7gpL/gpKjgpJ8nLFxuICAgICAgICBoIDogJ+Ckj+CklSDgpJjgpILgpJ/gpL4nLFxuICAgICAgICBoaCA6ICclZCDgpJjgpILgpJ/gpYcnLFxuICAgICAgICBkIDogJ+Ckj+CklSDgpKbgpL/gpKgnLFxuICAgICAgICBkZCA6ICclZCDgpKbgpL/gpKgnLFxuICAgICAgICBNIDogJ+Ckj+CklSDgpK7gpLngpYDgpKjgpYcnLFxuICAgICAgICBNTSA6ICclZCDgpK7gpLngpYDgpKjgpYcnLFxuICAgICAgICB5IDogJ+Ckj+CklSDgpLXgpLDgpY3gpLcnLFxuICAgICAgICB5eSA6ICclZCDgpLXgpLDgpY3gpLcnXG4gICAgfSxcbiAgICBwcmVwYXJzZTogZnVuY3Rpb24gKHN0cmluZykge1xuICAgICAgICByZXR1cm4gc3RyaW5nLnJlcGxhY2UoL1vgpafgpajgpangpargpavgpazgpa3gpa7gpa/gpaZdL2csIGZ1bmN0aW9uIChtYXRjaCkge1xuICAgICAgICAgICAgcmV0dXJuIG51bWJlck1hcFttYXRjaF07XG4gICAgICAgIH0pO1xuICAgIH0sXG4gICAgcG9zdGZvcm1hdDogZnVuY3Rpb24gKHN0cmluZykge1xuICAgICAgICByZXR1cm4gc3RyaW5nLnJlcGx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9ydHMgPT09ICdvYmplY3QnICYmIHR5cGVvZiBtb2R1bGUgIT09ICd1bmRlZmluZWQnXG4gICAgICAgJiYgdHlwZW9mIHJlcXVpcmUgPT09ICdmdW5jdGlvbicgPyBmYWN0b3J5KHJlcXVpcmUoJy4uL21vbWVudCcpKSA6XG4gICB0eXBlb2YgZGVmaW5lID09PSAnZnVuY3Rpb24nICYmIGRlZmluZS5hbWQgPyBkZWZpbmUoWycuLi9tb21lbnQnXSwgZmFjdG9yeSkgOlxuICAgZmFjdG9yeShnbG9iYWwubW9tZW50KVxufSh0aGlzLCAoZnVuY3Rpb24gKG1vbWVudCkgeyAndXNlIHN0cmljdCc7XG5cblxuZnVuY3Rpb24gdHJhbnNsYXRlKG51bWJlciwgd2l0aG91dFN1ZmZpeCwga2V5KSB7XG4gICAgdmFyIHJlc3VsdCA9IG51bWJlciArICcgJztcbiAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICBjYXNlICdtJzpcbiAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4ID8gJ2plZG5hIG1pbnV0YScgOiAnamVkbmUgbWludXRlJztcbiAgICAgICAgY2FzZSAnbW0nOlxuICAgICAgICAgICAgaWYgKG51bWJlciA9PT0gMSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnbWludXRhJztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyID09PSAyIHx8IG51bWJlciA9PT0gMyB8fCBudW1iZXIgPT09IDQpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ21pbnV0ZSc7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnbWludXRhJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIGNhc2UgJ2gnOlxuICAgICAgICAgICAgcmV0dXJuIHdpdGhvdXRTdWZmaXggPyAnamVkYW4gc2F0JyA6ICdqZWRub2cgc2F0YSc7XG4gICAgICAgIGNhc2UgJ2hoJzpcbiAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ3NhdCc7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMiB8fCBudW1iZXIgPT09IDMgfHwgbnVtYmVyID09PSA0KSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdzYXRhJztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdzYXRpJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIGNhc2UgJ2RkJzpcbiAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gJ2Rhbic7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnZGFuYSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICBjYXNlICdNTSc6XG4gICAgICAgICAgICBpZiAobnVtYmVyID09PSAxKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdtamVzZWMnO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChudW1iZXIgPT09IDIgfHwgbnVtYmVyID09PSAzIHx8IG51bWJlciA9PT0gNCkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnbWplc2VjYSc7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnbWplc2VjaSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICBjYXNlICd5eSc6XG4gICAgICAgICAgICBpZiAobnVtYmVyID09PSAxKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9ICdnb2RpbmEnO1xuICA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B3ZWVrZGF5c01pbiA6ICduZV9wb191dF9zcl/EjWVfcGVfc3UnLnNwbGl0KCdfJyksXG4gICAgd2Vla2RheXNQYXJzZUV4YWN0IDogdHJ1ZSxcbiAgICBsb25nRGF0ZUZvcm1hdCA6IHtcbiAgICAgICAgTFQgOiAnSDptbScsXG4gICAgICAgIExUUyA6ICdIOm1tOnNzJyxcbiAgICAgICAgTCA6ICdERC5NTS5ZWVlZJyxcbiAgICAgICAgTEwgOiAnRC4gTU1NTSBZWVlZJyxcbiAgICAgICAgTExMIDogJ0QuIE1NTU0gWVlZWSBIOm1tJyxcbiAgICAgICAgTExMTCA6ICdkZGRkLCBELiBNTU1NIFlZWVkgSDptbSdcbiAgICB9LFxuICAgIGNhbGVuZGFyIDoge1xuICAgICAgICBzYW1lRGF5ICA6ICdbZGFuYXMgdV0gTFQnLFxuICAgICAgICBuZXh0RGF5ICA6ICdbc3V0cmEgdV0gTFQnLFxuICAgICAgICBuZXh0V2VlayA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gW25lZGplbGp1XSBbdV0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gW3NyaWplZHVdIFt1XSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBbc3Vib3R1XSBbdV0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gZGRkZCBbdV0gTFQnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBsYXN0RGF5ICA6ICdbanXEjWVyIHVdIExUJyxcbiAgICAgICAgbGFzdFdlZWsgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1twcm/FoWx1XSBkZGRkIFt1XSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1twcm/FoWxlXSBbc3Vib3RlXSBbdV0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbcHJvxaFsaV0gZGRkZCBbdV0gTFQnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAnemEgJXMnLFxuICAgICAgICBwYXN0ICAgOiAncHJpamUgJXMnLFxuICAgICAgICBzICAgICAgOiAncGFyIHNla3VuZGknLFxuICAgICAgICBtICAgICAgOiB0cmFuc2xhdGUsXG4gICAgICAgIG1tICAgICA6IHRyYW5zbGF0ZSxcbiAgICAgICAgaCAgICAgIDogdHJhbnNsYXRlLFxuICAgICAgICBoaCAgICAgOiB0cmFuc2xhdGUsXG4gICAgICAgIGQgICAgICA6ICdkYW4nLFxuICAgICAgICBkZCAgICAgOiB0cmFuc2xhdGUsXG4gICAgICAgIE0gICAgICA6ICdtamVzZWMnLFxuICAgICAgICBNTSAgICAgOiB0cmFuc2xhdGUsXG4gICAgICAgIHkgICAgICA6ICdn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lJyxcbiAgICAgICAgaCA6ICfVqtWh1bQnLFxuICAgICAgICBoaCA6ICclZCDVqtWh1bQnLFxuICAgICAgICBkIDogJ9aF1oAnLFxuICAgICAgICBkZCA6ICclZCDWhdaAJyxcbiAgICAgICAgTSA6ICfVodW01avVvScsXG4gICAgICAgIE1NIDogJyVkINWh1bTVq9W9JyxcbiAgICAgICAgeSA6ICfVv9Wh1oDVqycsXG4gICAgICAgIHl5IDogJyVkINW/1aHWgNWrJ1xuICAgIH0sXG4gICAgbWVyaWRpZW1QYXJzZTogL9Wj1avVt9Wl1oDVvtWhfNWh1bzVodW+1bjVv9W+1aF81oHVpdaA1aXVr9W+1aF81aXWgNWl1a/VuNW11aHVti8sXG4gICAgaXNQTTogZnVuY3Rpb24gKGlucHV0KSB7XG4gICAgICAgIHJldHVybiAvXijWgdWl1oDVpdWv1b7VoXzVpdaA1aXVr9W41bXVodW2KSQvLnRlc3QoaW5wdXQpO1xuICAgIH0sXG4gICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91cikge1xuICAgICAgICBpZiAoaG91ciA8IDQpIHtcbiAgICAgICAgICAgIHJldHVybiAn1aPVq9W31aXWgNW+1aEnO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxMikge1xuICAgICAgICAgICAgcmV0dXJuICfVodW81aHVvtW41b/VvtWhJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTcpIHtcbiAgICAgICAgICAgIHJldHVybiAn1oHVpdaA1aXVr9W+1aEnO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICfVpdaA1aXVr9W41bXVodW2JztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgZGF5T2ZNb250aE9yZGluYWxQYXJzZTogL1xcZHsxLDJ9fFxcZHsxLDJ9LSjVq9W2fNaA1aQpLyxcbiAgICBvcmRpbmFsOiBmdW5jdGlvbiAobnVtYmVyLCBwZXJpb2QpIHtcbiAgICAgICAgc3dpdGNoICh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AgICAgICAgTFQgOiAnSEgubW0nLFxuICAgICAgICBMVFMgOiAnSEgubW0uc3MnLFxuICAgICAgICBMIDogJ0REL01NL1lZWVknLFxuICAgICAgICBMTCA6ICdEIE1NTU0gWVlZWScsXG4gICAgICAgIExMTCA6ICdEIE1NTU0gWVlZWSBbcHVrdWxdIEhILm1tJyxcbiAgICAgICAgTExMTCA6ICdkZGRkLCBEIE1NTU0gWVlZWSBbcHVrdWxdIEhILm1tJ1xuICAgIH0sXG4gICAgbWVyaWRpZW1QYXJzZTogL3BhZ2l8c2lhbmd8c29yZXxtYWxhbS8sXG4gICAgbWVyaWRpZW1Ib3VyIDogZnVuY3Rpb24gKGhvdXIsIG1lcmlkaWVtKSB7XG4gICAgICAgIGlmIChob3VyID09PSAxMikge1xuICAgICAgICAgICAgaG91ciA9IDA7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lcmlkaWVtID09PSAncGFnaScpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAnc2lhbmcnKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciA+PSAxMSA/IGhvdXIgOiBob3VyICsgMTI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICdzb3JlJyB8fCBtZXJpZGllbSA9PT0gJ21hbGFtJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXIgKyAxMjtcbiAgICAgICAgfVxuICAgIH0sXG4gICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91cnMsIG1pbnV0ZXMsIGlzTG93ZXIpIHtcbiAgICAgICAgaWYgKGhvdXJzIDwgMTEpIHtcbiAgICAgICAgICAgIHJldHVybiAncGFnaSc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG91cnMgPCAxNSkge1xuICAgICAgICAgICAgcmV0dXJuICdzaWFuZyc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG91cnMgPCAxOSkge1xuICAgICAg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ZShudW1iZXIsIHdpdGhvdXRTdWZmaXgsIGtleSwgaXNGdXR1cmUpIHtcbiAgICB2YXIgcmVzdWx0ID0gbnVtYmVyICsgJyAnO1xuICAgIHN3aXRjaCAoa2V5KSB7XG4gICAgICAgIGNhc2UgJ3MnOlxuICAgICAgICAgICAgcmV0dXJuIHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnbm9ra3JhciBzZWvDum5kdXInIDogJ25va2tydW0gc2Vrw7puZHVtJztcbiAgICAgICAgY2FzZSAnbSc6XG4gICAgICAgICAgICByZXR1cm4gd2l0aG91dFN1ZmZpeCA/ICdtw61uw7p0YScgOiAnbcOtbsO6dHUnO1xuICAgICAgICBjYXNlICdtbSc6XG4gICAgICAgICAgICBpZiAocGx1cmFsKG51bWJlcikpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnbcOtbsO6dHVyJyA6ICdtw61uw7p0dW0nKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAod2l0aG91dFN1ZmZpeCkge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAnbcOtbsO6dGEnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdtw61uw7p0dSc7XG4gICAgICAgIGNhc2UgJ2hoJzpcbiAgICAgICAgICAgIGlmIChwbHVyYWwobnVtYmVyKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdrbHVra3VzdHVuZGlyJyA6ICdrbHVra3VzdHVuZHVtJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ2tsdWtrdXN0dW5kJztcbiAgICAgICAgY2FzZSAnZCc6XG4gICAgICAgICAgICBpZiAod2l0aG91dFN1ZmZpeCkge1xuICAgICAgICAgICAgICAgIHJldHVybiAnZGFndXInO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGlzRnV0dXJlID8gJ2RhZycgOiAnZGVnaSc7XG4gICAgICAgIGNhc2UgJ2RkJzpcbiAgICAgICAgICAgIGlmIChwbHVyYWwobnVtYmVyKSkge1xuICAgICAgICAgICAgICAgIGlmICh3aXRob3V0U3VmZml4KSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAnZGFnYXInO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKGlzRnV0dXJlID8gJ2RhZ2EnIDogJ2TDtmd1bScpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh3aXRob3V0U3VmZml4KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdkYWd1cic7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKGlzRnV0dXJlID8gJ2RhZycgOiAnZGVnaScpO1xuICAgICAgICBjYXNlICdNJzpcbiAgICAgICAgICAgIGlmICh3aXRob3V0U3VmZml4KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICdtw6FudcOwdXInO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGlzRnV0dXJlID8gJ23DoW51w7AnIDogJ23DoW51w7BpJztcbiAgICAgICAgY2FzZSAnTU0nOlxuICAgICAgICAgICAgaWYgKHBsdXJhbChudW1iZXIpKSB7XG4gICAgICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArICdtw6FudcOwaXInO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKGlzRnV0dXJlID8gJ23DoW51w7BpJyA6ICdtw6FudcOwdW0nKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAod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NTU1NIFlZWVkgSEg6bW0nLFxuICAgICAgICBMTExMIDogJ2RkZGQsIEQgTU1NTSBZWVlZIEhIOm1tJ1xuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXk6ICdbT2dnaSBhbGxlXSBMVCcsXG4gICAgICAgIG5leHREYXk6ICdbRG9tYW5pIGFsbGVdIExUJyxcbiAgICAgICAgbmV4dFdlZWs6ICdkZGRkIFthbGxlXSBMVCcsXG4gICAgICAgIGxhc3REYXk6ICdbSWVyaSBhbGxlXSBMVCcsXG4gICAgICAgIGxhc3RXZWVrOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW2xhIHNjb3JzYV0gZGRkZCBbYWxsZV0gTFQnO1xuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW2xvIHNjb3Jzb10gZGRkZCBbYWxsZV0gTFQnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBzYW1lRWxzZTogJ0wnXG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6IGZ1bmN0aW9uIChzKSB7XG4gICAgICAgICAgICByZXR1cm4gKCgvXlswLTldLiskLykudGVzdChzKSA/ICd0cmEnIDogJ2luJykgKyAnICcgKyBzO1xuICAgICAgICB9LFxuICAgICAgICBwYXN0IDogJyVzIGZhJyxcbiAgICAgICAgcyA6ICdhbGN1bmkgc2Vjb25kaScsXG4gICAgICAgIG0gOiAndW4gbWludXRvJyxcbiAgICAgICAgbW0gOiAnJWQgbWludXRpJyxcbiAgICAgICAgaCA6ICd1blxcJ29yYScsXG4gICAgICAgIGhoIDogJyVkIG9yZScsXG4gICAgICAgIGQgOiAndW4gZ2lvcm5vJyx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NTU1NIFlZWVkgW3B1a3VsXSBISC5tbScsXG4gICAgICAgIExMTEwgOiAnZGRkZCwgRCBNTU1NIFlZWVkgW3B1a3VsXSBISC5tbSdcbiAgICB9LFxuICAgIG1lcmlkaWVtUGFyc2U6IC9lbmppbmd8c2l5YW5nfHNvbnRlbnxuZGFsdS8sXG4gICAgbWVyaWRpZW1Ib3VyIDogZnVuY3Rpb24gKGhvdXIsIG1lcmlkaWVtKSB7XG4gICAgICAgIGlmIChob3VyID09PSAxMikge1xuICAgICAgICAgICAgaG91ciA9IDA7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lcmlkaWVtID09PSAnZW5qaW5nJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICdzaXlhbmcnKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciA+PSAxMSA/IGhvdXIgOiBob3VyICsgMTI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICdzb250ZW4nIHx8IG1lcmlkaWVtID09PSAnbmRhbHUnKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VycywgbWludXRlcywgaXNMb3dlcikge1xuICAgICAgICBpZiAoaG91cnMgPCAxMSkge1xuICAgICAgICAgICAgcmV0dXJuICdlbmppbmcnO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXJzIDwgMTUpIHtcbiAgICAgICAgICAgIHJldHVybiAnc2l5YW5nJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VycyA8IDE5KSB7XG4gICAgICAgICAgICByZXR1cm4gJ3NvbnRlbic7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gJ25kYWx1JztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbW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N0RGF5IDogJ1vgsqjgsr/gsqjgs43gsqjgs4ZdIExUJyxcbiAgICAgICAgbGFzdFdlZWsgOiAnW+CyleCzhuCzguCyqOCzhuCyr10gZGRkZCwgTFQnLFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAnJXMg4LKo4LKC4LKk4LKwJyxcbiAgICAgICAgcGFzdCA6ICclcyDgsrngsr/gsoLgsqbgs4YnLFxuICAgICAgICBzIDogJ+CyleCzhuCysuCyteCzgSDgspXgs43gsrfgsqPgspfgsrPgs4EnLFxuICAgICAgICBtIDogJ+CykuCyguCypuCzgSDgsqjgsr/gsq7gsr/gsrcnLFxuICAgICAgICBtbSA6ICclZCDgsqjgsr/gsq7gsr/gsrcnLFxuICAgICAgICBoIDogJ+CykuCyguCypuCzgSDgspfgsoLgsp/gs4YnLFxuICAgICAgICBoaCA6ICclZCDgspfgsoLgsp/gs4YnLFxuICAgICAgICBkIDogJ+CykuCyguCypuCzgSDgsqbgsr/gsqgnLFxuICAgICAgICBkZCA6ICclZCDgsqbgsr/gsqgnLFxuICAgICAgICBNIDogJ+CykuCyguCypuCzgSDgsqTgsr/gsoLgspfgsrPgs4EnLFxuICAgICAgICBNTSA6ICclZCDgsqTgsr/gsoLgspfgsrPgs4EnLFxuICAgICAgICB5IDogJ+CykuCyguCypuCzgSDgsrXgsrDgs43gsrcnLFxuICAgICAgICB5eSA6ICclZCDgsrXgsrDgs43gsrcnXG4gICAgfSxcbiAgICBwcmVwYXJzZTogZnVuY3Rpb24gKHN0cmluZykge1xuICAgICAgICByZXR1cm4gc3RyaW5nLnJlcGxhY2UoL1vgs6fgs6jgs6ngs6rgs6vgs6zgs63gs67gs6/gs6ZdL2csIGZ1bmN0aW9uIChtYXRjaCkge1xuICAgICAgICAgICAgcmV0dXJuIG51bWJlck1hcFttYXRjaF07XG4gICAgICAgIH0pO1xuICAgIH0sXG4gICAgcG9zdGZvcm1hdDogZnVuY3Rpb24gKHN0cmluZykge1xuICAgICAgICByZXR1cm4gc3RyaW5nLnJlcGxhY2UoL1xcZC9nLCBmdW5jdGlvbiAobWF0Y2gpIHtcbiAgICAgICAgICAgIHJldHVybiBzeW1ib2xNYXBbbWF0Y2hdO1xuICAgICAgICB9KTtcbiAgICB9LFxuICAgIG1lcmlkaWVtUGFyc2U6IC/gsrDgsr7gsqTgs43gsrDgsr984LKs4LOG4LKz4LK/4LKX4LON4LKX4LOGfOCyruCyp+CzjeCyr+CyvuCyueCzjeCyqHzgsrjgsoLgspzgs4YvLFxuICAgIG1lcmlkaWVtSG91ciA6IGZ1bmN0aW9uIChob3VyLCBtZXJpZGllbSkge1xuICAgICAgICBpZiAoaG91ciA9PT0gMTIpIHtcbiAgICAgICAgICAgIGhvdXIgPSAwO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXJpZGllbSA9PT0gJ+CysOCyvuCypOCzjeCysOCyvycpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyIDwgNCA/IGhvdXIgOiBob3VyICsgMTI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfgsqzgs4bgsrPgsr/gspfgs43gspfgs4YnKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91cjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+CyruCyp+CzjeCyr+CyvuCyueCzjeCyqCcpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyID49IDEwID8gaG91ciA6IGhvdXIgKyAxMjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+CyuOCyguCynOCzhicpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyICsgMTI7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIG1lcmlkaWVtIDogZnVuY3Rpb24gKGhvdXIsIG1pbnV0ZSwgaXNMb3dlcikge1xuICAgICAgICBpZiAoaG91ciA8IDQpIHtcbiA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NTSBZWVlZIEhIOm1tJ1xuICAgIH0sXG4gICAgbWVyaWRpZW1QYXJzZTogL+C6leC6reC6meC7gOC6iuC6u+C7ieC6snzgupXguq3gupngu4HguqXguocvLFxuICAgIGlzUE06IGZ1bmN0aW9uIChpbnB1dCkge1xuICAgICAgICByZXR1cm4gaW5wdXQgPT09ICfgupXguq3gupngu4HguqXguocnO1xuICAgIH0sXG4gICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG4gICAgICAgIGlmIChob3VyIDwgMTIpIHtcbiAgICAgICAgICAgIHJldHVybiAn4LqV4Lqt4LqZ4LuA4LqK4Lq74LuJ4LqyJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAn4LqV4Lqt4LqZ4LuB4Lql4LqHJztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXkgOiAnW+C6oeC6t+C7ieC6meC6teC7ieC7gOC6p+C6peC6sl0gTFQnLFxuICAgICAgICBuZXh0RGF5IDogJ1vguqHgurfgu4nguq3gurfgu4jgupngu4DguqfguqXgurJdIExUJyxcbiAgICAgICAgbmV4dFdlZWsgOiAnW+C6p+C6seC6mV1kZGRkW+C7nOC7ieC6suC7gOC6p+C6peC6sl0gTFQnLFxuICAgICAgICBsYXN0RGF5IDogJ1vguqHgurfgu4nguqfgurLgupngupngurXgu4ngu4DguqfguqXgurJdIExUJyxcbiAgICAgICAgbGFzdFdlZWsgOiAnW+C6p+C6seC6mV1kZGRkW+C7geC6peC7ieC6p+C6meC6teC7ieC7gOC6p+C6peC6sl0gTFQnLFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAn4Lqt4Lq14LqBICVzJyxcbiAgICAgICAgcGFzdCA6ICclc+C6nOC7iOC6suC6meC6oeC6s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ldC5fcGV0Ll9zdWIuJy5zcGxpdCgnXycpLFxuICAgIHdlZWtkYXlzTWluOiAnbmVfcG9fdXRfc3JfxI1lX3BlX3N1Jy5zcGxpdCgnXycpLFxuICAgIHdlZWtkYXlzUGFyc2VFeGFjdCA6IHRydWUsXG4gICAgbG9uZ0RhdGVGb3JtYXQ6IHtcbiAgICAgICAgTFQ6ICdIOm1tJyxcbiAgICAgICAgTFRTIDogJ0g6bW06c3MnLFxuICAgICAgICBMOiAnREQuTU0uWVlZWScsXG4gICAgICAgIExMOiAnRC4gTU1NTSBZWVlZJyxcbiAgICAgICAgTExMOiAnRC4gTU1NTSBZWVlZIEg6bW0nLFxuICAgICAgICBMTExMOiAnZGRkZCwgRC4gTU1NTSBZWVlZIEg6bW0nXG4gICAgfSxcbiAgICBjYWxlbmRhcjoge1xuICAgICAgICBzYW1lRGF5OiAnW2RhbmFzIHVdIExUJyxcbiAgICAgICAgbmV4dERheTogJ1tzanV0cmEgdV0gTFQnLFxuXG4gICAgICAgIG5leHRXZWVrOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIFtuZWRqZWxqdV0gW3VdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIFtzcmlqZWR1XSBbdV0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gW3N1Ym90dV0gW3VdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3VdIGRkZGQgW3VdIExUJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgbGFzdERheSAgOiAnW2p1xI1lIHVdIExUJyxcbiAgICAgICAgbGFzdFdlZWsgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgbGFzdFdlZWtEYXlzID0gW1xuICAgICAgICAgICAgICAgICdbcHJvxaFsZV0gW25lZGplbGplXSBbdV0gTFQnLFxuICAgICAgICAgICAgICAgICdbcHJvxaFsb2ddIFtwb25lZGplbGprYV0gW3VdIExUJyxcbiAgICAgICAgICAgICAgICAnW3Byb8WhbG9nXSBbdXRvcmthXSBbdV0gTFQnLFxuICAgICAgICAgICAgICAgICdbcHJvxaFsZV0gW3NyaWplZGVdIFt1XSBMVCcsXG4gICAgICAgICAgICAgICAgJ1twcm/FoWxvZ10gW8SNZXR2cnRrYV0gW3VdIExUJyxcbiAgICAgICAgICAgICAgICAnW3Byb8WhbG9nXSBbcGV0a2FdIFt1XSBMVCcsXG4gICAgICAgICAgICAgICAgJ1twcm/FoWxlXSBbc3Vib3RlXSBbdV0gTFQnXG4gICAgICAgICAgICBdO1xuICAgICAgICAgICAgcmV0dXJuIGxhc3RXZWVrRGF5c1t0aGlzLmRheSgpXTtcbiAgICAgICAgfSxcbiAgICAgICAgc2FtZUVsc2UgOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJ3phICVzJyxcbiAgICAgICAgcGFzdCAgIDogJ3ByaWplICVzJyxcbiAgICAgICAgcyAgICAgIDogJ25la29saWtvIHNla3VuZGknLFxuICAgICAgICBtICAgICAgOiB0cmFuc2xhdG9yLnRyYW5zbGF0ZSxcbiAgICAgICAgbW0gICAgIDogdHJhbnNsYXRvci50cmFuc2xhdGUsXG4gICAgICAgIGggICAgICA6IHRyYW5zbGF0b3IudHJhbnNsYXRlLFxuICAgICAgICBoaCAgICAgOiB0cmFuc2xhdG9yLnRyYW5zbGF0ZSxcbiAgIC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AX9GH0LVf0L/QtV/RgWEnLnNwbGl0KCdfJyksXG4gICAgbG9uZ0RhdGVGb3JtYXQgOiB7XG4gICAgICAgIExUIDogJ0g6bW0nLFxuICAgICAgICBMVFMgOiAnSDptbTpzcycsXG4gICAgICAgIEwgOiAnRC5NTS5ZWVlZJyxcbiAgICAgICAgTEwgOiAnRCBNTU1NIFlZWVknLFxuICAgICAgICBMTEwgOiAnRCBNTU1NIFlZWVkgSDptbScsXG4gICAgICAgIExMTEwgOiAnZGRkZCwgRCBNTU1NIFlZWVkgSDptbSdcbiAgICB9LFxuICAgIGNhbGVuZGFyIDoge1xuICAgICAgICBzYW1lRGF5IDogJ1vQlNC10L3QtdGBINCy0L5dIExUJyxcbiAgICAgICAgbmV4dERheSA6ICdb0KPRgtGA0LUg0LLQvl0gTFQnLFxuICAgICAgICBuZXh0V2VlayA6ICdb0JLQvl0gZGRkZCBb0LLQvl0gTFQnLFxuICAgICAgICBsYXN0RGF5IDogJ1vQktGH0LXRgNCwINCy0L5dIExUJyxcbiAgICAgICAgbGFzdFdlZWsgOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHRoaXMuZGF5KCkpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0JjQt9C80LjQvdCw0YLQsNGC0LBdIGRkZGQgW9Cy0L5dIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CY0LfQvNC40L3QsNGC0LjQvtGCXSBkZGRkIFvQstC+XSBMVCc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHNhbWV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ldHVybiBzdHJpbmcucmVwbGFjZSgvXFxkL2csIGZ1bmN0aW9uIChtYXRjaCkge1xuICAgICAgICAgICAgcmV0dXJuIHN5bWJvbE1hcFttYXRjaF07XG4gICAgICAgIH0pO1xuICAgIH0sXG4gICAgbWVyaWRpZW1QYXJzZTogL+CksOCkvuCkpOCljeCksOClgHzgpLjgpJXgpL7gpLPgpYB84KSm4KWB4KSq4KS+4KSw4KWAfOCkuOCkvuCkr+CkguCkleCkvuCks+ClgC8sXG4gICAgbWVyaWRpZW1Ib3VyIDogZnVuY3Rpb24gKGhvdXIsIG1lcmlkaWVtKSB7XG4gICAgICAgIGlmIChob3VyID09PSAxMikge1xuICAgICAgICAgICAgaG91ciA9IDA7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lcmlkaWVtID09PSAn4KSw4KS+4KSk4KWN4KSw4KWAJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXIgPCA0ID8gaG91ciA6IGhvdXIgKyAxMjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+CkuOCkleCkvuCks+ClgCcpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4KSm4KWB4KSq4KS+4KSw4KWAJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXIgPj0gMTAgPyBob3VyIDogaG91ciArIDEyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4KS44KS+4KSv4KSC4KSV4KS+4KSz4KWAJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXIgKyAxMjtcbiAgICAgICAgfVxuICAgIH0sXG4gICAgbWVyaWRpZW06IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcbiAgICAgICAgaWYgKGhvdXIgPCA0KSB7XG4gICAgICAgICAgICByZXR1cm4gJ+CksOCkvuCkpOCljeCksOClgCc7XG4gICAgICAgIH0gZWx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EIE1NTU0gWVlZWScsXG4gICAgICAgIExMTCA6ICdEIE1NTU0gWVlZWSBbcHVrdWxdIEhILm1tJyxcbiAgICAgICAgTExMTCA6ICdkZGRkLCBEIE1NTU0gWVlZWSBbcHVrdWxdIEhILm1tJ1xuICAgIH0sXG4gICAgbWVyaWRpZW1QYXJzZTogL3BhZ2l8dGVuZ2FoYXJpfHBldGFuZ3xtYWxhbS8sXG4gICAgbWVyaWRpZW1Ib3VyOiBmdW5jdGlvbiAoaG91ciwgbWVyaWRpZW0pIHtcbiAgICAgICAgaWYgKGhvdXIgPT09IDEyKSB7XG4gICAgICAgICAgICBob3VyID0gMDtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVyaWRpZW0gPT09ICdwYWdpJykge1xuICAgICAgICAgICAgcmV0dXJuIGhvdXI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICd0ZW5nYWhhcmknKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciA+PSAxMSA/IGhvdXIgOiBob3VyICsgMTI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICdwZXRhbmcnIHx8IG1lcmlkaWVtID09PSAnbWFsYW0nKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VycywgbWludXRlcywgaXNMb3dlcikge1xuICAgICAgICBpZiAoaG91cnMgPCAxMSkge1xuICAgICAgICAgICAgcmV0dXJuICdwYWdpJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VycyA8IDE1KSB7XG4gICAgICAgICAgICByZXR1cm4gJ3RlbmdhaGFyaSc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG91cnMgPCAxOSkge1xuICAgICAgICAgICAgcmV0dXJuICdwZXRhbmcnO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICdtYWxhbSc7XG4gICAgICAgI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sXG4gICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91cnMsIG1pbnV0ZXMsIGlzTG93ZXIpIHtcbiAgICAgICAgaWYgKGhvdXJzIDwgMTEpIHtcbiAgICAgICAgICAgIHJldHVybiAncGFnaSc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG91cnMgPCAxNSkge1xuICAgICAgICAgICAgcmV0dXJuICd0ZW5nYWhhcmknO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXJzIDwgMTkpIHtcbiAgICAgICAgICAgIHJldHVybiAncGV0YW5nJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAnbWFsYW0nO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBjYWxlbmRhciA6IHtcbiAgICAgICAgc2FtZURheSA6ICdbSGFyaSBpbmkgcHVrdWxdIExUJyxcbiAgICAgICAgbmV4dERheSA6ICdbRXNvayBwdWt1bF0gTFQnLFxuICAgICAgICBuZXh0V2VlayA6ICdkZGRkIFtwdWt1bF0gTFQnLFxuICAgICAgICBsYXN0RGF5IDogJ1tLZWxtYXJpbiBwdWt1bF0gTFQnLFxuICAgICAgICBsYXN0V2VlayA6ICdkZGRkIFtsZXBhcyBwdWt1bF0gTFQnLFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAnZGFsYW0gJXMnLFxuICAgICAgICBwYXN0IDogJyVzIHlhbmcgbGVwYXMnLFxuICAgICAgICBzIDogJ2JlYmVyYXBhIHNhYXQnLFxuICAgICAgICBtIDogJ3NlbWluaXQnLFxuICAgICAgICBtbSA6ICclZCBtaW5pdCcsXG4gICAgICAgIGggOiAnc2VqYW0nLFxuICAgICAgICBoaCA6ICclZCBqYW0nLFxuICAgICAgICBkIDogJ3NlaGFyaScsXG4gICAgICAgIGRkIDogJyVkIGhhcmknLFxuICAgICAgICBNIDogJ3NlYnVsYW4nLF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uY3Rpb24gKHN0cmluZykge1xuICAgICAgICByZXR1cm4gc3RyaW5nLnJlcGxhY2UoL1vgpafgpajgpangpargpavgpazgpa3gpa7gpa/gpaZdL2csIGZ1bmN0aW9uIChtYXRjaCkge1xuICAgICAgICAgICAgcmV0dXJuIG51bWJlck1hcFttYXRjaF07XG4gICAgICAgIH0pO1xuICAgIH0sXG4gICAgcG9zdGZvcm1hdDogZnVuY3Rpb24gKHN0cmluZykge1xuICAgICAgICByZXR1cm4gc3RyaW5nLnJlcGxhY2UoL1xcZC9nLCBmdW5jdGlvbiAobWF0Y2gpIHtcbiAgICAgICAgICAgIHJldHVybiBzeW1ib2xNYXBbbWF0Y2hdO1xuICAgICAgICB9KTtcbiAgICB9LFxuICAgIG1lcmlkaWVtUGFyc2U6IC/gpLDgpL7gpKTgpL984KSs4KS/4KS54KS+4KSofOCkpuCkv+CkieCkgeCkuOCli3zgpLjgpL7gpIHgpJ0vLFxuICAgIG1lcmlkaWVtSG91ciA6IGZ1bmN0aW9uIChob3VyLCBtZXJpZGllbSkge1xuICAgICAgICBpZiAoaG91ciA9PT0gMTIpIHtcbiAgICAgICAgICAgIGhvdXIgPSAwO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXJpZGllbSA9PT0gJ+CksOCkvuCkpOCkvycpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyIDwgNCA/IGhvdXIgOiBob3VyICsgMTI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfgpKzgpL/gpLngpL7gpKgnKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91cjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+CkpuCkv+CkieCkgeCkuOCliycpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyID49IDEwID8gaG91ciA6IGhvdXIgKyAxMjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+CkuOCkvuCkgeCknScpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyICsgMTI7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIG1lcmlkaWVtIDogZnVuY3Rpb24gKGhvdXIsIG1pbnV0ZSwgaXNMb3dlcikge1xuICAgICAgICBpZiAoaG91ciA8IDMpIHtcbiAgICAgICAgICAgIHJldHVybiAn4KSw4KS+4KSk4KS/JztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTIpIHtcbiAgICAgICAgICAgIHJldHVybiAn4KSs4KS/4KS54KS+4KSoJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTYpIHtcbiAgICAgICAgICAgIHJldHVybiAn4KSm4KS/4KSJ4KSB4KS44KWLJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMjApIHtcbiAgICAgICAgICAgIHJldHVybiAn4KS44KS+4KSB4KSdJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAn4KSw4KS+4KSk4KS/JztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXkgOiAnW+CkhuCknF0gTFQnLFxuICAgICAgICBuZXh0RGF5IDogJ1vgpK3gpYvgpLLgpL9dIExUJyxcbiAgICAgICAgbmV4dFdlZWsgOiAnW+CkhuCkieCkgeCkpuCli10gZGRkZFssXSBMVCcsXG4gICAgICAgIGxhc3REYXkgOiAnW+CkueCkv+CknOCli10gTFQnLFxuICAgICAgICBsYXN0V2VlayA6ICdb4KSX4KSP4KSV4KWLXSBkZGRkWyxdIExUJyxcbiAgICAgICAgc2FtZUVsc2UgOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJyVz4KSu4KS+JyxcbiAgICAgICAgcGFzdCA6ICclcyDgpIXgpJfgpL7gpKHgpL8nLFxuICAgICAgICBzIDogJ+CkleClh+CkueClgCDgpJXgpY3gpLfgpKMnLFxuICAgICAgICBtIDogJ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lcmlkaWVtSG91ciA6IGZ1bmN0aW9uIChob3VyLCBtZXJpZGllbSkge1xuICAgICAgICBpZiAoaG91ciA9PT0gMTIpIHtcbiAgICAgICAgICAgIGhvdXIgPSAwO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXJpZGllbSA9PT0gJ+CosOCovuCopCcpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyIDwgNCA/IGhvdXIgOiBob3VyICsgMTI7XG4gICAgICAgIH0gZWxzZSBpZiAobWVyaWRpZW0gPT09ICfgqLjgqLXgqYfgqLAnKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91cjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+CopuCpgeCoquCoueCov+CosCcpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyID49IDEwID8gaG91ciA6IGhvdXIgKyAxMjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+CouOCovOCovuCoricpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyICsgMTI7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIG1lcmlkaWVtIDogZnVuY3Rpb24gKGhvdXIsIG1pbnV0ZSwgaXNMb3dlcikge1xuICAgICAgICBpZiAoaG91ciA8IDQpIHtcbiAgICAgICAgICAgIHJldHVybiAn4Kiw4Ki+4KikJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTApIHtcbiAgICAgICAgICAgIHJldHVybiAn4Ki44Ki14KmH4KiwJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTcpIHtcbiAgICAgICAgICAgIHJldHVybiAn4Kim4KmB4Kiq4Ki54Ki/4KiwJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMjApIHtcbiAgICAgICAgICAgIHJldHVybiAn4Ki44Ki84Ki+4KiuJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAn4Kiw4Ki+4KikJztcbiAgICAgICA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biAgICBtb250aHNTaG9ydCA6ICdzdHlfbHV0X21hcl9rd2lfbWFqX2N6ZV9saXBfc2llX3dyel9wYcW6X2xpc19ncnUnLnNwbGl0KCdfJyksXG4gICAgd2Vla2RheXMgOiAnbmllZHppZWxhX3BvbmllZHppYcWCZWtfd3RvcmVrX8Wbcm9kYV9jendhcnRla19wacSFdGVrX3NvYm90YScuc3BsaXQoJ18nKSxcbiAgICB3ZWVrZGF5c1Nob3J0IDogJ25kel9wb25fd3RfxZtyX2N6d19wdF9zb2InLnNwbGl0KCdfJyksXG4gICAgd2Vla2RheXNNaW4gOiAnTmRfUG5fV3RfxZpyX0N6X1B0X1NvJy5zcGxpdCgnXycpLFxuICAgIGxvbmdEYXRlRm9ybWF0IDoge1xuICAgICAgICBMVCA6ICdISDptbScsXG4gICAgICAgIExUUyA6ICdISDptbTpzcycsXG4gICAgICAgIEwgOiAnREQuTU0uWVlZWScsXG4gICAgICAgIExMIDogJ0QgTU1NTSBZWVlZJyxcbiAgICAgICAgTExMIDogJ0QgTU1NTSBZWVlZIEhIOm1tJyxcbiAgICAgICAgTExMTCA6ICdkZGRkLCBEIE1NTU0gWVlZWSBISDptbSdcbiAgICB9LFxuICAgIGNhbGVuZGFyIDoge1xuICAgICAgICBzYW1lRGF5OiAnW0R6acWbIG9dIExUJyxcbiAgICAgICAgbmV4dERheTogJ1tKdXRybyBvXSBMVCcsXG4gICAgICAgIG5leHRXZWVrOiAnW1ddIGRkZGQgW29dIExUJyxcbiAgICAgICAgbGFzdERheTogJ1tXY3pvcmFqIG9dIExUJyxcbiAgICAgICAgbGFzdFdlZWs6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbVyB6ZXN6xYLEhSBuaWVkemllbMSZIG9dIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW1cgemVzesWCxIUgxZtyb2TEmSBvXSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1tXIHplc3rFgsSFIHNvYm90xJkgb10gTFQnO1xuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW1cgemVzesWCeV0gZGRkZCBbb10gTFQnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBzYW1lRWxzZTogJ0wnXG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6ICd6YSAlcycsXG4gICAgICAgIHBhc3QgOiAnJXMgdGVtdScsXG4gICAgICAgIHMgOiAna2lsa2Egc2VrdW5kJyxcbiAgICAgICAgbSA6IHRyYW5zbGF0ZSxcbiAgICAgICAgbW0gOiB0cmFuc2xhdGUsXG4gICAgICAgIGggOiB0cmFuc2xhdGUsXG4gICAgICAgIGhoIDogdHJhbnNsYXRlLFxuICAgICAgICBkIDogJzEgZHppZcWEJyxcbiAgICAgICAgZGQgOiAnJWQgZG5pJyxcbiAgICAgICAgTSA6ICdtaWVzacSFYycsXG4gICAgICAgIE1NIDogdHJhbnNsYXRlLFxuICAgICAgICB5IDogJ3JvaycsXG4gICAgICAgIHl5IDogdHJhbnNsYXRlXG4gICAgfSxcbiAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn1cXC4vLFxuICAgIG9yZGluYWwgOiAnJWQuJyxcbiAgICB3ZWVrIDoge1xuICAgICAgICBkb3cgOiAxLCAvLyBNb25kYXkgaXMgdGhlIGZpcnN0IGRheSBvZiB0aGUgd2Vlay5cbiAgICAgICAgZG95IDogNCAgLy8gVGhlIHdlZWsgdGhhdCBjb250YWlucyBKYW4gNHRoIGlzIHRoZSBmaXJzdCB3ZWVrIG9mIHRoZSB5ZWFyLl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c3MnLFxuICAgICAgICBMIDogJ0RELk1NLllZWVknLFxuICAgICAgICBMTCA6ICdEIE1NTU0gWVlZWSDQsy4nLFxuICAgICAgICBMTEwgOiAnRCBNTU1NIFlZWVkg0LMuLCBISDptbScsXG4gICAgICAgIExMTEwgOiAnZGRkZCwgRCBNTU1NIFlZWVkg0LMuLCBISDptbSdcbiAgICB9LFxuICAgIGNhbGVuZGFyIDoge1xuICAgICAgICBzYW1lRGF5OiAnW9Ch0LXQs9C+0LTQvdGPINCyXSBMVCcsXG4gICAgICAgIG5leHREYXk6ICdb0JfQsNCy0YLRgNCwINCyXSBMVCcsXG4gICAgICAgIGxhc3REYXk6ICdb0JLRh9C10YDQsCDQsl0gTFQnLFxuICAgICAgICBuZXh0V2VlazogZnVuY3Rpb24gKG5vdykge1xuICAgICAgICAgICAgaWYgKG5vdy53ZWVrKCkgIT09IHRoaXMud2VlaygpKSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CSINGB0LvQtdC00YPRjtGJ0LXQtV0gZGRkZCBb0LJdIExUJztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CSINGB0LvQtdC00YPRjtGJ0LjQuV0gZGRkZCBb0LJdIExUJztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CSINGB0LvQtdC00YPRjtGJ0YPRjl0gZGRkZCBb0LJdIExUJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmRheSgpID09PSAyKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CS0L5dIGRkZGQgW9CyXSBMVCc7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0JJdIGRkZGQgW9CyXSBMVCc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBsYXN0V2VlazogZnVuY3Rpb24gKG5vdykge1xuICAgICAgICAgICAgaWYgKG5vdy53ZWVrKCkgIT09IHRoaXMud2VlaygpKSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CSINC/0YDQvtGI0LvQvtC1XSBkZGRkIFvQsl0gTFQnO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0JIg0L/RgNC+0YjQu9GL0LldIGRkZGQgW9CyXSBMVCc7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vQkiDQv9GA0L7RiNC70YPRjl0gZGRkZCBb0LJdIExUJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmRheSgpID09PSAyKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW9CS0L5dIGRkZGQgW9CyXSBMVCc7XG4gICAgIC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iAoaG91ciA8IDQpIHtcbiAgICAgICAgICAgIHJldHVybiAn0L3QvtGH0LgnO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxMikge1xuICAgICAgICAgICAgcmV0dXJuICfRg9GC0YDQsCc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDE3KSB7XG4gICAgICAgICAgICByZXR1cm4gJ9C00L3Rjyc7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gJ9Cy0LXRh9C10YDQsCc7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2U6IC9cXGR7MSwyfS0o0Ll80LPQvnzRjykvLFxuICAgIG9yZGluYWw6IGZ1bmN0aW9uIChudW1iZXIsIHBlcmlvZCkge1xuICAgICAgICBzd2l0Y2ggKHBlcmlvZCkge1xuICAgICAgICAgICAgY2FzZSAnTSc6XG4gICAgICAgICAgICBjYXNlICdkJzpcbiAgICAgICAgICAgIGNhc2UgJ0RERCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0LknO1xuICAgICAgICAgICAgY2FzZSAnRCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICct0LPQvic7XG4gICAgICAgICAgICBjYXNlICd3JzpcbiAgICAgICAgICAgIGNhc2UgJ1cnOlxuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAnLdGPJztcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlcjtcbiAgICAgICAgfVxuICAgIH0sXG4gICAgd2VlayA6IHtcbiAgICAgICAgZG93IDogMSwgLy8gTW9uZGF5IGlzIHRoZSBmaXJzdCBkYXkgb2YgdGhlIHdlZWsuXG4gICAgICAgIGRveSA6IDcgIC8vIFRoZSB3ZWVrIHRoYXQgY29udGFpbnMgSmFuIDFzdCBpcyB0aGUgZmlyc3Qgd2VlayBvZiB0aGUgeWV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nMgLyA5IGhvdXJzIGFnb1xuICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHBsdXJhbChudW1iZXIpID8gJ2hvZGlueScgOiAnaG9kw61uJyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAnaG9kaW5hbWknO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgJ2QnOiAgLy8gYSBkYXkgLyBpbiBhIGRheSAvIGEgZGF5IGFnb1xuICAgICAgICAgICAgcmV0dXJuICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlKSA/ICdkZcWIJyA6ICdkxYhvbSc7XG4gICAgICAgIGNhc2UgJ2RkJzogLy8gOSBkYXlzIC8gaW4gOSBkYXlzIC8gOSBkYXlzIGFnb1xuICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHBsdXJhbChudW1iZXIpID8gJ2RuaScgOiAnZG7DrScpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ2TFiGFtaSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAnTSc6ICAvLyBhIG1vbnRoIC8gaW4gYSBtb250aCAvIGEgbW9udGggYWdvXG4gICAgICAgICAgICByZXR1cm4gKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpID8gJ21lc2lhYycgOiAnbWVzaWFjb20nO1xuICAgICAgICBjYXNlICdNTSc6IC8vIDkgbW9udGhzIC8gaW4gOSBtb250aHMgLyA5IG1vbnRocyBhZ29cbiAgICAgICAgICAgIGlmICh3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdCArIChwbHVyYWwobnVtYmVyKSA/ICdtZXNpYWNlJyA6ICdtZXNpYWNvdicpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgJ21lc2lhY21pJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICd5JzogIC8vIGEgeWVhciAvIGluIGEgeWVhciAvIGEgeWVhciBhZ29cbiAgICAgICAgICAgIHJldHVybiAod2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSkgPyAncm9rJyA6ICdyb2tvbSc7XG4gICAgICAgIGNhc2UgJ3l5JzogLy8gOSB5ZWFycyAvIGluIDkgeWVhcnMgLyA5IHllYXJzIGFnb1xuICAgICAgICAgICAgaWYgKHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0ICsgKHBsdXJhbChudW1iZXIpID8gJ3Jva3knIDogJ3Jva292Jyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQgKyAncm9rbWknO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgfVxufVxuXG52YXIgc2sgPSBtb21lbnQuZGVmaW5lTG9jYWxlKCdzaycsIHtcbiAgICBtb250aHMgOiBtb250aHMsXG4gICAgbW9udGhzU2hvcnQgOiBtb250aHNTaG9ydCxcbiAgICB3ZWVrZGF5cyA6ICduZWRlxL5hX3BvbmRlbG9rX3V0b3Jva19zdHJlZGFfxaF0dnJ0b2tfcGlhdG9rX3NvYm90YScuc3BsaXQoJ18nKSxcbiAgICB3ZWVrZGF5c1Nob3J0IDogJ25lX3BvX3V0X3N0X8WhdF9waV9zbycuc3BsaXQoJ18nKSxcbiAgICB3ZWVrZGF5c01pbiA6ICduZV9wb191dF9zdF/FoXRfcGlfc28nLnNwbGl0KCdfJyksXG4gICAgbG9uZ0RhdGVGb3JtYXQgOiB7XG4gICAgICAgIExUOiAnSDptbScsXG4gICAgICAgIExUUyA6ICdIOm1tOnNzJyxcbiAgICAgICAgTCA6ICdERC5NTS5ZWVlZJyxcbiAgICAgICAgTEwgOiAnRC4gTU1NTSBZWVlZJyxcbiAgICAgICAgTExMIDogJ0QuIE1NTU0gWVlZWSBIOm1tJyxcbiAgICAgICAgTExMTCA6ICdkZGRkIEQuIE1NTU0gWVlZWSBIOm1tJ1xuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXk6ICdbZG5lcyBvXSBMVCcsXG4gICAgICAgIG5leHREYXk6ICdbemFqdHJhIG9dIExUJyxcbiAgICAgICAgbmV4dFdlZWs6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdiBuZWRlxL51IG9dIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2XSBkZGRkIFtvXSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2IHN0cmVkdSBvXSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2byDFoXR2cnRvayBvXSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2IHBpYXRvayBvXSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2IHNvYm90dSBvXSBMVCc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGxhc3REYXk6ICdbdsSNZXJhIG9dIExUJyxcbiAgICAgICAgbGFzdFdlZWs6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbbWludWzDuiBuZWRlxL51IG9dIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1ttaW51bMO9XSBkZGRkIFtvXSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1ttaW51bMO6IHN0cmVkdSBvXSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbbWludWzDvV0gZGRkZCBbb10gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbbWludWzDuiBzb2JvdHUgb10gTFQnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBzYW1lRWxzZTogJ0wnXG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6ICd6YSAlcycsXG4gICAgICAgIHBhc3QgOiAncHJlZCAlcycsXG4gICAgICAgIHMgOiB0cmFuc2xhdGUsXG4gICAgICAgIG0gOiB0cmFuc2xhdGUsXG4gICAgICAgIG1tIDogdHJhbnNsYXRlLFxuICAgICAgICBoIDogdHJhbnNsYXRlLFxuICAgICAgICBoaCA6IHRyYW5zbGF0ZSxcbiAgICAgICAgZCA6IHRyYW5zbGF0ZSxcbiAgICAgICAgZ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bmUgPT09ICdmdW5jdGlvbicgJiYgZGVmaW5lLmFtZCA/IGRlZmluZShbJy4uL21vbWVudCddLCBmYWN0b3J5KSA6XG4gICBmYWN0b3J5KGdsb2JhbC5tb21lbnQpXG59KHRoaXMsIChmdW5jdGlvbiAobW9tZW50KSB7ICd1c2Ugc3RyaWN0JztcblxuXG5mdW5jdGlvbiBwcm9jZXNzUmVsYXRpdmVUaW1lKG51bWJlciwgd2l0aG91dFN1ZmZpeCwga2V5LCBpc0Z1dHVyZSkge1xuICAgIHZhciByZXN1bHQgPSBudW1iZXIgKyAnICc7XG4gICAgc3dpdGNoIChrZXkpIHtcbiAgICAgICAgY2FzZSAncyc6XG4gICAgICAgICAgICByZXR1cm4gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICduZWthaiBzZWt1bmQnIDogJ25la2FqIHNla3VuZGFtaSc7XG4gICAgICAgIGNhc2UgJ20nOlxuICAgICAgICAgICAgcmV0dXJuIHdpdGhvdXRTdWZmaXggPyAnZW5hIG1pbnV0YScgOiAnZW5vIG1pbnV0byc7XG4gICAgICAgIGNhc2UgJ21tJzpcbiAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gd2l0aG91dFN1ZmZpeCA/ICdtaW51dGEnIDogJ21pbnV0byc7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG51bWJlciA9PT0gMikge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ21pbnV0aScgOiAnbWludXRhbWEnO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChudW1iZXIgPCA1KSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggfHwgaXNGdXR1cmUgPyAnbWludXRlJyA6ICdtaW51dGFtaSc7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ21pbnV0JyA6ICdtaW51dGFtaSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICBjYXNlICdoJzpcbiAgICAgICAgICAgIHJldHVybiB3aXRob3V0U3VmZml4ID8gJ2VuYSB1cmEnIDogJ2VubyB1cm8nO1xuICAgICAgICBjYXNlICdoaCc6XG4gICAgICAgICAgICBpZiAobnVtYmVyID09PSAxKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ICs9IHdpdGhvdXRTdWZmaXggPyAndXJhJyA6ICd1cm8nO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChudW1iZXIgPT09IDIpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICd1cmknIDogJ3VyYW1hJztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobnVtYmVyIDwgNSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCArPSB3aXRob3V0U3VmZml4IHx8IGlzRnV0dXJlID8gJ3VyZScgOiAndXJhbWknO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICd1cicgOiAndXJhbWknO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgY2FzZSAnZCc6XG4gICAgICAgICAgICByZXR1cm4gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdlbiBkYW4nIDogJ2VuaW0gZG5lbSc7XG4gICAgICAgIGNhc2UgJ2RkJzpcbiAgICAgICAgICAgIGlmIChudW1iZXIgPT09IDEpIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgKz0gd2l0aG91dFN1ZmZpeCB8fCBpc0Z1dHVyZSA/ICdkYW4nIDogJ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2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t2XSBbc29ib3RvXSBbb2JdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ZdIGRkZGQgW29iXSBMVCc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGxhc3REYXkgIDogJ1t2xI1lcmFqIG9iXSBMVCcsXG4gICAgICAgIGxhc3RXZWVrIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1twcmVqxaFuam9dIFtuZWRlbGpvXSBbb2JdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ByZWrFoW5qb10gW3NyZWRvXSBbb2JdIExUJztcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnW3ByZWrFoW5qb10gW3NvYm90b10gW29iXSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1twcmVqxaFuamldIGRkZGQgW29iXSBMVCc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIHNhbWVFbHNlIDogJ0wnXG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6ICfEjWV6ICVzJyxcbiAgICAgICAgcGFzdCAgID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db0YHRg9GC0YDQsCDRg10gTFQnLFxuICAgICAgICBuZXh0V2VlazogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgc3dpdGNoICh0aGlzLmRheSgpKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vRg10gW9C90LXQtNC10ZnRg10gW9GDXSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1vRg10gW9GB0YDQtdC00YNdIFvRg10gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0YNdIFvRgdGD0LHQvtGC0YNdIFvRg10gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdb0YNdIGRkZGQgW9GDXSBMVCc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGxhc3REYXkgIDogJ1vRmNGD0YfQtSDRg10gTFQnLFxuICAgICAgICBsYXN0V2VlayA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBsYXN0V2Vla0RheXMgPSBbXG4gICAgICAgICAgICAgICAgJ1vQv9GA0L7RiNC70LVdIFvQvdC10LTQtdGZ0LVdIFvRg10gTFQnLFxuICAgICAgICAgICAgICAgICdb0L/RgNC+0YjQu9C+0LNdIFvQv9C+0L3QtdC00LXRmdC60LBdIFvRg10gTFQnLFxuICAgICAgICAgICAgICAgICdb0L/RgNC+0YjQu9C+0LNdIFvRg9GC0L7RgNC60LBdIFvRg10gTFQnLFxuICAgICAgICAgICAgICAgICdb0L/RgNC+0YjQu9C1XSBb0YHRgNC10LTQtV0gW9GDXSBMVCcsXG4gICAgICAgICAgICAgICAgJ1vQv9GA0L7RiNC70L7Qs10gW9GH0LXRgtCy0YDRgtC60LBdIFvRg10gTFQnLFxuICAgICAgICAgICAgICAgICdb0L/RgNC+0YjQu9C+0LNdIFvQv9C10YLQutCwXSBb0YNdIExUJyxcbiAgICAgICAgICAgICAgICAnW9C/0YDQvtGI0LvQtV0gW9GB0YPQsdC+0YLQtV0gW9GDXSBMVCdcbiAgICAgICAgICAgIF07XG4gICAgICAgICAgICByZXR1cm4gbGFzdFdlZWtEYXlzW3RoaXMuZGF5KCldO1xuICAgICAgICB9LFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgcmVsYXRpdmVUaW1lIDoge1xuICAgICAgICBmdXR1cmUgOiAn0LfQsCAlcycsXG4gICAgICAgIHBhc3QgICA6ICfQv9GA0LUgJXMnLFxuICAgICAgICBzICAgICAgOiAn0L3QtdC60L7Qu9C40LrQviDRgdC10LrRg9C90LTQuCcsXG4gICAgICAgIG0gICAgICA6IHRyYW5zbGF0b3IudHJhbnNsYXRlLFxuICAgICAgICBtbSAgICAgOiB0cmFuc2xhdG9yLnRyYW5zbGF0ZSxcbiAgICAgICAgaCAgICAgIDogdHJhbnNsYXRvci50cmFuc2xhdGUsXG4gICAgICAgIGhoICAgICA6IHRyYW5zbGF0b3IudHJhbnNsYXRlLFxuICAgICAgICBkICAgICAgOiAn0LTQsNC9JyxcbiAgICAgICAgZGQgICAgIDogdHJhbnNsYXRvci50cmFuc2xhdGUsXG4gICAgICAgIE0gICAgICA6ICfQvNC10YHQtdGGJyxcbiAgICAgICAgTU0gICAgIDogdHJhbnNsYXRvci50cmFuc2xhdGUsXG4gICAgICAgIHkgICAgICA6ICfQs9C+0LTQuNC90YMnLFxuICAgICAgICB5eSAgICAgOiB0cmFuc2xhdG9yLnRyYW5zbGF0ZVxuICAgIH0sXG4gICAgZGF5T2ZNb250aE9yZGluYWxQYXJzZTogL1xcZHsxLDJ9XFwuLyxcbiAgICBvcmR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FdlZWs6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHN3aXRjaCAodGhpcy5kYXkoKSkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gW25lZGVsanVdIFt1XSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBbc3JlZHVdIFt1XSBMVCc7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1t1XSBbc3Vib3R1XSBbdV0gTFQnO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdbdV0gZGRkZCBbdV0gTFQnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBsYXN0RGF5ICA6ICdbanXEjWUgdV0gTFQnLFxuICAgICAgICBsYXN0V2VlayA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBsYXN0V2Vla0RheXMgPSBbXG4gICAgICAgICAgICAgICAgJ1twcm/FoWxlXSBbbmVkZWxqZV0gW3VdIExUJyxcbiAgICAgICAgICAgICAgICAnW3Byb8WhbG9nXSBbcG9uZWRlbGprYV0gW3VdIExUJyxcbiAgICAgICAgICAgICAgICAnW3Byb8WhbG9nXSBbdXRvcmthXSBbdV0gTFQnLFxuICAgICAgICAgICAgICAgICdbcHJvxaFsZV0gW3NyZWRlXSBbdV0gTFQnLFxuICAgICAgICAgICAgICAgICdbcHJvxaFsb2ddIFvEjWV0dnJ0a2FdIFt1XSBMVCcsXG4gICAgICAgICAgICAgICAgJ1twcm/FoWxvZ10gW3BldGthXSBbdV0gTFQnLFxuICAgICAgICAgICAgICAgICdbcH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JzogJ+CvqicsXG4gICAgJzUnOiAn4K+rJyxcbiAgICAnNic6ICfgr6wnLFxuICAgICc3JzogJ+CvrScsXG4gICAgJzgnOiAn4K+uJyxcbiAgICAnOSc6ICfgr68nLFxuICAgICcwJzogJ+Cvpidcbn07XG52YXIgbnVtYmVyTWFwID0ge1xuICAgICfgr6cnOiAnMScsXG4gICAgJ+CvqCc6ICcyJyxcbiAgICAn4K+pJzogJzMnLFxuICAgICfgr6onOiAnNCcsXG4gICAgJ+Cvqyc6ICc1JyxcbiAgICAn4K+sJzogJzYnLFxuICAgICfgr60nOiAnNycsXG4gICAgJ+Cvric6ICc4JyxcbiAgICAn4K+vJzogJzknLFxuICAgICfgr6YnOiAnMCdcbn07XG5cbnZhciB0YSA9IG1vbWVudC5kZWZpbmVMb2NhbGUoJ3RhJywge1xuICAgIG1vbnRocyA6ICfgrpzgrqngrrXgrrDgrr9f4K6q4K6/4K6q4K+N4K6w4K614K6w4K6/X+CuruCuvuCusOCvjeCumuCvjV/gro/grqrgr43grrDgrrLgr41f4K6u4K+HX+CunOCvguCuqeCvjV/grpzgr4LgrrLgr4hf4K6G4K6V4K644K+N4K6f4K+NX+CumuCvhuCuquCvjeCun+CvhuCuruCvjeCuquCusOCvjV/groXgrpXgr43grp/gr4fgrr7grqrgrrDgr41f4K6o4K614K6u4K+N4K6q4K6w4K+NX+Cun+Cuv+CumuCuruCvjeCuquCusOCvjScuc3BsaXQoJ18nKSxcbiAgICBtb250aHNTaG9ydCA6ICfgrpzgrqngrrXgrrDgrr9f4K6q4K6/4K6q4K+N4K6w4K614K6w4K6/X+CuruCuvuCusOCvjeCumuCvjV/gro/grqrgr43grrDgrrLgr41f4K6u4K+HX+CunOCvguCuqeCvjV/grpzgr4LgrrLgr4hf4K6G4K6V4K644K+N4K6f4K+NX+CumuCvhuCuquCvjeCun+CvhuCuruCvjeCuquCusOCvjV/groXgrpXgr43grp/gr4fgrr7grqrgrrDgr41f4K6o4K614K6u4K+N4K6q4K6w4K+NX+Cun+Cuv+CumuCuruCvjeCuquCusOCvjScuc3BsaXQoJ18nKSxcbiAgICB3ZWVrZGF5cyA6ICfgrp7grr7grq/grr/grrHgr43grrHgr4HgrpXgr43grpXgrr/grrTgrq7gr4hf4K6k4K6/4K6Z4K+N4K6V4K6f4K+N4K6V4K6/4K604K6u4K+IX+CumuCvhuCuteCvjeCuteCuvuCur+CvjeCuleCuv+CutOCuruCviF/grqrgr4HgrqTgrqngr43grpXgrr/grrTgrq7gr4hf4K614K6/4K6v4K6+4K604K6V4K+N4K6V4K6/4K604K6u4K+IX+CuteCvhuCus+CvjeCus+Cuv+CuleCvjeCuleCuv+CutOCuruCviF/grprgrqngrr/grpXgr43grpXgrr/grrTgrq7gr4gnLnNwbGl0KCdfJyksXG4gICAgd2Vla2RheXNTaG9ydCA6ICfgrp7grr7grq/grr/grrHgr4Ff4K6k4K6/4K6Z4K+N4K6V4K6z4K+NX+CumuCvhuCuteCvjeCuteCuvuCur+CvjV/grqrgr4HgrqTgrqngr41f4K614K6/4K6v4K6+4K604K6p4K+NX+CuteCvhuCus+CvjeCus+Cuv1/grprgrqngrr8nLnNwbGl0KCdfJyksXG4gICAgd2Vla2RheXNNaW4gOiAn4K6e4K6+X+CupOCuv1/grprgr4Zf4K6q4K+BX+CuteCuv1/grrXgr4Zf4K6aJy5zcGxpdCgnXycpLFxuICAgIGxvbmdEYXRlRm9ybWF0IDoge1xuICAgICAgICBMVCA6ICdISDptbScsXG4gICAgICAgIExUUyA6ICdISDptbTpzcycsXG4gICAgICAgIEwgOiAnREQvTU0vWVlZWScsXG4gICAgICAgIExMIDogJ0QgTU1NTSBZWVlZJyxcbiAgICAgICAgTExMIDogJ0QgTU1NTSBZWVlZLCBISDptbScsXG4gICAgICAgIExMTEwgOiAnZGRkZCwgRCBNTU1NIFlZWVksIEhIOm1tJ1xuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXkgOiAnW+Cuh+CuqeCvjeCuseCv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B4K6V4K6z4K+NJ1xuICAgIH0sXG4gICAgZGF5T2ZNb250aE9yZGluYWxQYXJzZTogL1xcZHsxLDJ94K614K6k4K+BLyxcbiAgICBvcmRpbmFsIDogZnVuY3Rpb24gKG51bWJlcikge1xuICAgICAgICByZXR1cm4gbnVtYmVyICsgJ+CuteCupOCvgSc7XG4gICAgfSxcbiAgICBwcmVwYXJzZTogZnVuY3Rpb24gKHN0cmluZykge1xuICAgICAgICByZXR1cm4gc3RyaW5nLnJlcGxhY2UoL1vgr6fgr6jgr6ngr6rgr6vgr6zgr63gr67gr6/gr6ZdL2csIGZ1bmN0aW9uIChtYXRjaCkge1xuICAgICAgICAgICAgcmV0dXJuIG51bWJlck1hcFttYXRjaF07XG4gICAgICAgIH0pO1xuICAgIH0sXG4gICAgcG9zdGZvcm1hdDogZnVuY3Rpb24gKHN0cmluZykge1xuICAgICAgICByZXR1cm4gc3RyaW5nLnJlcGxhY2UoL1xcZC9nLCBmdW5jdGlvbiAobWF0Y2gpIHtcbiAgICAgICAgICAgIHJldHVybiBzeW1ib2xNYXBbbWF0Y2hdO1xuICAgICAgICB9KTtcbiAgICB9LFxuICAgIC8vIHJlZmVyIGh0dHA6Ly90YS53aWtpcGVkaWEub3JnL3MvMWVyMVxuICAgIG1lcmlkaWVtUGFyc2U6IC/grq/grr7grq7grq7gr4184K614K+I4K6V4K6x4K+IfOCuleCuvuCusuCviHzgrqjgrqPgr43grqrgrpXgrrLgr4184K6O4K6x4K+N4K6q4K6+4K6f4K+BfOCuruCuvuCusuCviC8sXG4gICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG4gICAgICAgIGlmIChob3VyIDwgMikge1xuICAgICAgICAgICAgcmV0dXJuICcg4K6v4K6+4K6u4K6u4K+NJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgNikge1xuICAgICAgICAgICAgcmV0dXJuICcg4K614K+I4K6V4K6x4K+IJzsgIC8vIOCuteCviOCuleCuseCviFxuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxMCkge1xuICAgICAgICAgICAgcmV0dXJuICcg4K6V4K6+4K6y4K+IJzsgLy8g4K6V4K6+4K6y4K+IXG4gICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDE0KSB7XG4gICAgICAgICAgICByZXR1cm4gJyDgrqjgrqPgr43grqrgrpXgrrLgr40nOyAvLyDgrqjgrqPgr43grqrgrpXgrrLgr41cbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTgpIHtcbiAgICAgICAgICAgIHJldHVybiAnIOCujuCuseCvjeCuquCuvuCun+CvgSc7IC8vIOCujuCuseCvjeCuquCuvuCun+CvgVxuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAyMikge1xuICAgICAgICAgICAgcmV0dXJuICcg4K6u4K6+4K6y4K+IJzsgLy8g4K6u4K6+4K6y4K+IXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gJyDgrq/grr7grq7grq7gr40nO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBtZXJpZGllbUhvdXIgOiBmdW5jdGlvbiAoaG91ciwgbWVyaWRpZW0pIHtcbiAgICAgICAgaWYgKGhvdXIgPT09IDEyKSB7XG4gICAgICAgICAgICBob3VyID0gMDtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVyaWRpZW0gPT09ICfgrq/grr7grq7grq7gr40nKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciA8IDIgPyBob3VyIDogaG91ciArIDEyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4K614K+I4K6V4K6x4K+IJyB8fCBtZXJpZGllbSA9PT0gJ+CuleCuvuCusuCviCcpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyO1xuICAgICAgICB9IGVsc2UgaWYgKG1lcmlkaWVtID09PSAn4K6o4K6j4K+N4K6q4K6V4K6y4K+NJykge1xuICAgICAgICAgICAgcmV0dX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cjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+CwruCwp+CxjeCwr+CwvuCwueCxjeCwqOCwgicpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyID49IDEwID8gaG91ciA6IGhvdXIgKyAxMjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+CwuOCwvuCwr+CwguCwpOCxjeCwsOCwgicpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyICsgMTI7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIG1lcmlkaWVtIDogZnVuY3Rpb24gKGhvdXIsIG1pbnV0ZSwgaXNMb3dlcikge1xuICAgICAgICBpZiAoaG91ciA8IDQpIHtcbiAgICAgICAgICAgIHJldHVybiAn4LCw4LC+4LCk4LGN4LCw4LC/JztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTApIHtcbiAgICAgICAgICAgIHJldHVybiAn4LCJ4LCm4LCv4LCCJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMTcpIHtcbiAgICAgICAgICAgIHJldHVybiAn4LCu4LCn4LGN4LCv4LC+4LC54LGN4LCo4LCCJztcbiAgICAgICAgfSBlbHNlIGlmIChob3VyIDwgMjApIHtcbiAgICAgICAgICAgIHJldHVybiAn4LC44LC+4LCv4LCC4LCk4LGN4LCw4LCCJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAn4LCw4LC+4LCk4LGN4LCw4LC/JztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgd2VlayA6IHtcbiAgICAgICAgZG93IDogMCwgLy8gU3VuZGF5IGlzIHRoZSBmaXJzdCBkYXkgb2YgdGhlIHdlZWsuXG4gICAgICAgIGRveSA6IDYgIC8vIFRoZSB3ZWVrIHRoYXQgY29udGFpbnMgSmFuIDFzdCBpcyB0aGUgZmlyc3Qgd2VlayBvZiB0aGUgeWVhci5cbiAgICB9XG59KTtcblxucmV0dXJuIHRlO1x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ZWVlZIOC5gOC4p+C4peC4siBIOm1tJyxcbiAgICAgICAgTExMTCA6ICfguKfguLHguJlkZGRk4LiX4Li14LmIIEQgTU1NTSBZWVlZIOC5gOC4p+C4peC4siBIOm1tJ1xuICAgIH0sXG4gICAgbWVyaWRpZW1QYXJzZTogL+C4geC5iOC4reC4meC5gOC4l+C4teC5iOC4ouC4h3zguKvguKXguLHguIfguYDguJfguLXguYjguKLguIcvLFxuICAgIGlzUE06IGZ1bmN0aW9uIChpbnB1dCkge1xuICAgICAgICByZXR1cm4gaW5wdXQgPT09ICfguKvguKXguLHguIfguYDguJfguLXguYjguKLguIcnO1xuICAgIH0sXG4gICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG4gICAgICAgIGlmIChob3VyIDwgMTIpIHtcbiAgICAgICAgICAgIHJldHVybiAn4LiB4LmI4Lit4LiZ4LmA4LiX4Li14LmI4Lii4LiHJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAn4Lir4Lil4Lix4LiH4LmA4LiX4Li14LmI4Lii4LiHJztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXkgOiAnW+C4p+C4seC4meC4meC4teC5iSDguYDguKfguKXguLJdIExUJyxcbiAgICAgICAgbmV4dERheSA6ICdb4Lie4Lij4Li44LmI4LiH4LiZ4Li14LmJIOC5gOC4p+C4peC4sl0gTFQnLFxuICAgICAgICBuZXh0V2VlayA6ICdkZGRkW+C4q+C4meC5ieC4siDguYDguKfguKXguLJdIExUJyxcbiAgICAgICAgbGFzdERheSA6ICdb4LmA4Lih4Li34LmI4Lit4Lin4Liy4LiZ4LiZ4Li14LmJIOC5gOC4p+C4peC4sl0gTFQnLFxuICAgICAgICBsYXN0V2VlayA6ICdb4Lin4Lix4LiZXWRkZGRb4LiX4Li14LmI4LmB4Lil4LmJ4LinIOC5gOC4p+C4peC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m91biA9IG51bWJlckFzTm91bihudW1iZXIpO1xuICAgIHN3aXRjaCAoc3RyaW5nKSB7XG4gICAgICAgIGNhc2UgJ21tJzpcbiAgICAgICAgICAgIHJldHVybiBudW1iZXJOb3VuICsgJyB0dXAnO1xuICAgICAgICBjYXNlICdoaCc6XG4gICAgICAgICAgICByZXR1cm4gbnVtYmVyTm91biArICcgcmVwJztcbiAgICAgICAgY2FzZSAnZGQnOlxuICAgICAgICAgICAgcmV0dXJuIG51bWJlck5vdW4gKyAnIGphaic7XG4gICAgICAgIGNhc2UgJ01NJzpcbiAgICAgICAgICAgIHJldHVybiBudW1iZXJOb3VuICsgJyBqYXInO1xuICAgICAgICBjYXNlICd5eSc6XG4gICAgICAgICAgICByZXR1cm4gbnVtYmVyTm91biArICcgRElTJztcbiAgICB9XG59XG5cbmZ1bmN0aW9uIG51bWJlckFzTm91bihudW1iZXIpIHtcbiAgICB2YXIgaHVuZHJlZCA9IE1hdGguZmxvb3IoKG51bWJlciAlIDEwMDApIC8gMTAwKSxcbiAgICB0ZW4gPSBNYXRoLmZsb29yKChudW1iZXIgJSAxMDApIC8gMTApLFxuICAgIG9uZSA9IG51bWJlciAlIDEwLFxuICAgIHdvcmQgPSAnJztcbiAgICBpZiAoaHVuZHJlZCA+IDApIHtcbiAgICAgICAgd29yZCArPSBudW1iZXJzTm91bnNbaHVuZHJlZF0gKyAndmF0bGgnO1xuICAgIH1cbiAgICBpZiAodGVuID4gMCkge1xuICAgICAgICB3b3JkICs9ICgod29yZCAhPT0gJycpID8gJyAnIDogJycpICsgbnVtYmVyc05vdW5zW3Rlbl0gKyAnbWFIJztcbiAgICB9XG4gICAgaWYgKG9uZSA+IDApIHtcbiAgICAgICAgd29yZCArPSAoKHdvcmQgIT09ICcnKSA/ICcgJyA6ICcnKSArIG51bWJlcnNOb3Vuc1tvbmVdO1xuICAgIH1cbiAgICByZXR1cm4gKHdvcmQgPT09ICcnKSA/ICdwYWdoJyA6IHdvcmQ7XG59XG5cbnZhciB0bGggPSBtb21lbnQuZGVmaW5lTG9jYWxlKCd0bGgnLCB7XG4gICAgbW9udGhzIDogJ3RlcmHigJkgamFyIHdh4oCZX3RlcmHigJkgamFyIGNoYeKAmV90ZXJh4oCZIGphciB3ZWpfdGVyYeKAmSBqYXIgbG9TX3RlcmHigJkgamFyIHZhZ2hfdGVyYeKAmSBqYXIgamF2X3RlcmHigJkgamFyIFNvY2hfdGVyYeKAmSBqYXIgY2hvcmdoX3RlcmHigJkgamFyIEh1dF90ZXJh4oCZIGphciB3YeKAmW1hSF90ZXJh4oCZIGphciB3YeKAmW1hSCB3YeKAmV90ZXJh4oCZIGphciB3YeKAmW1hSCBjaGHigJknLnNwbGl0KCdfJyksXG4gICAgbW9udGhzU2hvcnQgOiAnamFyIHdh4oCZX2phciBjaGHigJlfamFyIHdlal9qYXIgbG9TX2phciB2YWdoX2phciBqYXZfamFyIFNvY2hfamFyIGNob3JnaF9qYXIgSHV0X2phciB3YeKAmW1hSF9qYXIgd2HigJltYUggd2HigJlfamFyIHdh4oCZbWFIIGNoYeKAmScuc3BsaXQoJ18nKSxcbiAgICBtb250aHNQYXJzZUV4YWN0IDogdHJ1ZSxcbiAgICB3ZWVrZGF5cyA6ICdsb2ptSXRqYWpfRGFTamFqX3Bvdmphal9naEl0bGhqYWpfbG9naGphal9idXFqYWpfZ2hJbmphaicuc3BsaXQoJ18nKSxcbiAgICB3ZWVrZGF5c1Nob3J0IDogJ2xvam1JdGphal9EYVNqYWpfcG92amFqX2doSXRsaGphal9sb2doamFqX2J1cWphal9naEluamFqJy5zcGxpdCgnXycpLFxuICAgIHdlZWtkYXlzTWluIDogJ2xvam1JdGphal9EYVNqYWpfcG92amFqX2doSXRsaGphal9sb2doamFqX2J1cWphal9naEluamFqJy5zcGxpdCgnXycpLFxuICAgIGxvbmdEYXRlRm9ybWF0IDoge1xuICAgICAgICBMVCA6ICdISDptbScsXG4gICAgICAgIExUUyA6ICdISDptbTpzcycsXG4gICAgICAgIEwgOiA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itLDitY7itLDitZlf4rSw4rWi4rWP4rSw4rWZX+K0sOK1meK1ieK1j+K0sOK1mV/itLDitL3itZTitLDitZlf4rSw4rS94rWh4rSw4rWZX+K0sOK1meK1ieK1juK1oeK0sOK1mV/itLDitZnitYnitLnitaLitLDitZknLnNwbGl0KCdfJyksXG4gICAgd2Vla2RheXNTaG9ydCA6ICfitLDitZnitLDitY7itLDitZlf4rSw4rWi4rWP4rSw4rWZX+K0sOK1meK1ieK1j+K0sOK1mV/itLDitL3itZTitLDitZlf4rSw4rS94rWh4rSw4rWZX+K0sOK1meK1ieK1juK1oeK0sOK1mV/itLDitZnitYnitLnitaLitLDitZknLnNwbGl0KCdfJyksXG4gICAgd2Vla2RheXNNaW4gOiAn4rSw4rWZ4rSw4rWO4rSw4rWZX+K0sOK1ouK1j+K0sOK1mV/itLDitZnitYnitY/itLDitZlf4rSw4rS94rWU4rSw4rWZX+K0sOK0veK1oeK0sOK1mV/itLDitZnitYnitY7itaHitLDitZlf4rSw4rWZ4rWJ4rS54rWi4rSw4rWZJy5zcGxpdCgnXycpLFxuICAgIGxvbmdEYXRlRm9ybWF0IDoge1xuICAgICAgICBMVCA6ICdISDptbScsXG4gICAgICAgIExUUzogJ0hIOm1tOnNzJyxcbiAgICAgICAgTCA6ICdERC9NTS9ZWVlZJyxcbiAgICAgICAgTEwgOiAnRCBNTU1NIFlZWVknLFxuICAgICAgICBMTEwgOiAnRCBNTU1NIFlZWVkgSEg6bW0nLFxuICAgICAgICBMTExMIDogJ2RkZGQgRCBNTU1NIFlZWVkgSEg6bW0nXG4gICAgfSxcbiAgICBjYWxlbmRhciA6IHtcbiAgICAgICAgc2FtZURheTogJ1vitLDitZnitLfitYUg4rS0XSBMVCcsXG4gICAgICAgIG5leHREYXk6ICdb4rSw4rWZ4rS94rSwIOK0tF0gTFQnLFxuICAgICAgICBuZXh0V2VlazogJ2RkZGQgW+K0tF0gTFQnLFxuICAgICAgICBsYXN0RGF5OiAnW+K0sOK1muK0sOK1j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gKGlucHV0KSB7XG4gICAgICAgIHJldHVybiAvXijQtNC90Y980LLQtdGH0L7RgNCwKSQvLnRlc3QoaW5wdXQpO1xuICAgIH0sXG4gICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG4gICAgICAgIGlmIChob3VyIDwgNCkge1xuICAgICAgICAgICAgcmV0dXJuICfQvdC+0YfRlic7XG4gICAgICAgIH0gZWxzZSBpZiAoaG91ciA8IDEyKSB7XG4gICAgICAgICAgICByZXR1cm4gJ9GA0LDQvdC60YMnO1xuICAgICAgICB9IGVsc2UgaWYgKGhvdXIgPCAxNykge1xuICAgICAgICAgICAgcmV0dXJuICfQtNC90Y8nO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuICfQstC10YfQvtGA0LAnO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBkYXlPZk1vbnRoT3JkaW5hbFBhcnNlOiAvXFxkezEsMn0tKNC5fNCz0L4pLyxcbiAgICBvcmRpbmFsOiBmdW5jdGlvbiAobnVtYmVyLCBwZXJpb2QpIHtcbiAgICAgICAgc3dpdGNoIChwZXJpb2QpIHtcbiAgICAgICAgICAgIGNhc2UgJ00nOlxuICAgICAgICAgICAgY2FzZSAnZCc6XG4gICAgICAgICAgICBjYXNlICdEREQnOlxuICAgICAgICAgICAgY2FzZSAndyc6XG4gICAgICAgICAgICBjYXNlICdXJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3QuSc7XG4gICAgICAgICAgICBjYXNlICdEJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJy3Qs9C+JztcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlcjtcbiAgICAgICAgfVxuICAgIH0sXG4gICAgd2VlayA6IHtcbiAgICAgICAgZG93IDogMSwgLy8gTW9uZGF5IGlzIHRoZSBmaXJzdCBkYXkgb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ZSwgaXNMb3dlcikge1xuICAgICAgICBpZiAoaG91ciA8IDEyKSB7XG4gICAgICAgICAgICByZXR1cm4gJ9i12KjYrSc7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuICfYtNin2YUnO1xuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXkgOiAnW9ii2Kwg2KjZiNmC2KpdIExUJyxcbiAgICAgICAgbmV4dERheSA6ICdb2qnZhCDYqNmI2YLYql0gTFQnLFxuICAgICAgICBuZXh0V2VlayA6ICdkZGRkIFvYqNmI2YLYql0gTFQnLFxuICAgICAgICBsYXN0RGF5IDogJ1var9iw2LTYqtuBINix2YjYsiDYqNmI2YLYql0gTFQnLFxuICAgICAgICBsYXN0V2VlayA6ICdb2q/YsNi02KrbgV0gZGRkZCBb2KjZiNmC2KpdIExUJyxcbiAgICAgICAgc2FtZUVsc2UgOiAnTCdcbiAgICB9LFxuICAgIHJlbGF0aXZlVGltZSA6IHtcbiAgICAgICAgZnV0dXJlIDogJyVzINio2LnYrycsXG4gICAgICAgIHBhc3QgOiAnJXMg2YLYqNmEJyxcbiAgICAgICAgcyA6ICfahtmG2K8g2LPbjNqp2YbaiCcsXG4gICAgICAgIG0gOiAn2KfbjNqpINmF2YbZuScsXG4gICAgICAgIG1tIDogJyVkINmF2YbZuScsXG4gICAgICAgIGggOiAn2KfbjNqpINqv2r7Zhtm524EnLFxuICAgICAgICBoaCA6ICclZCDar9q+2YbZuduSJyxcbiAgICAgICAgZCA6ICfYp9uM2qkg2K/ZhicsXG4gICAgICAgIGRkIDogJyVkINiv2YYnLFxuICAgICAgICBNIDogJ9in24zaqSDZhdin24EnLFxuICAgICAgICBNTSA6ICclZCDZhdin24EnLFxuICAgICAgICB5IDogJ9in24zaqSDYs9in2YQnLFxuICAgICAgICB5eSA6ICclZCDYs9in2YQnXG4gICAgfSxcbiAgICBwcmVwYXJzZTogZnVuY3Rpb24gKHN0cmluZykge1xuICAgICAgICByZXR1c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1NROaXpScsXG4gICAgICAgIGxsbCA6ICdZWVlZ5bm0TU1NROaXpSBISDptbScsXG4gICAgICAgIGxsbGwgOiAnWVlZWeW5tE1NTUTml6VkZGRkIEhIOm1tJ1xuICAgIH0sXG4gICAgbWVyaWRpZW1QYXJzZTogL+WHjOaZqHzml6nkuIp85LiK5Y2IfOS4reWNiHzkuIvljYh85pma5LiKLyxcbiAgICBtZXJpZGllbUhvdXI6IGZ1bmN0aW9uIChob3VyLCBtZXJpZGllbSkge1xuICAgICAgICBpZiAoaG91ciA9PT0gMTIpIHtcbiAgICAgICAgICAgIGhvdXIgPSAwO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXJpZGllbSA9PT0gJ+WHjOaZqCcgfHwgbWVyaWRpZW0gPT09ICfml6nkuIonIHx8XG4gICAgICAgICAgICAgICAgbWVyaWRpZW0gPT09ICfkuIrljYgnKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91cjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+S4i+WNiCcgfHwgbWVyaWRpZW0gPT09ICfmmZrkuIonKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gJ+S4reWNiCdcbiAgICAgICAgICAgIHJldHVybiBob3VyID49IDExID8gaG91ciA6IGhvdXIgKyAxMjtcbiAgICAgICAgfVxuICAgIH0sXG4gICAgbWVyaWRpZW0gOiBmdW5jdGlvbiAoaG91ciwgbWludXRlLCBpc0xvd2VyKSB7XG4gICAgICAgIHZhciBobSA9IGhvdXIgKiAxMDAgKyBtaW51dGU7XG4gICAgICAgIGlmIChobSA8IDYwMCkge1xuICAgICAgICAgICAgcmV0dXJuICflh4zmmagnO1xuICAgICAgICB9IGVsc2UgaWYgKGhtIDwgOTAwKSB7XG4gICAgICAgICAgICByZXR1cm4gJ+aXqeS4iic7XG4gICAgICAgIH0gZWxzZSBpZiAoaG0gPCAxMTMwKSB7XG4gICAgICAgICAgICByZXR1cm4gJ+S4iuWNiCc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG0gPCAxMjMwKSB7XG4gICAgICAgICAgICByZXR1cm4gJ+S4reWNiCc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG0gPCAxODAwKSB7XG4gICAgICAgICAgICByZXR1cm4gJ+S4i+WNiCc7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gJ+aZmuS4iic7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIGNhbGVuZGFyIDoge1xuICAgICAgICBzYW1lRGF5IDogJ1vku4rlpKldTFQnLFxuICAgICAgICBuZXh0RGF5IDogJ1vmmI7lpKldTFQnLFxuICAgICAgICBuZXh0V2VlayA6ICdb5LiLXWRkZGRMVCcsXG4gICAgICAgIGxhc3REYXkgOiAnW+aYqOWkqV1MVCcsXG4gICAgICAgIGxhc3RXZWVrIDogJ1vkuIpdZGRkZExUJyxcbiAgICAgICAgc2FtZUVsc2UgOiAnTCdcbiAgICB9LFxuICAgIGRheU9mTW9udGhPcmRpbmFsUGFyc2U6IC9cXGR7MSwyfSjml6V85pyIfOWRqCkvLFxuICAgIG9yZGluYWwgOiBmdW5jdGlvbiAobnVtYmVyLCBwZXJpb2QpIHtcbiAgICAgICAgc3dpdGNoIChwZXJpb2QpIHtcbiAgICAgICAgICAgIGNhc2UgJ2QnOlxuICAgICAgICAgICAgY2FzZSAnRCc6XG4gICAgICAgICAgICBjYXNlICdEREQnOlxuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAn5pelJztcbiAgICAgICAgICAgIGNhc2UgJ00nOlxuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAn5pyIJztcbiAgICAgICAgICAgIGNhc2UgJ3cnOlxuICAgICAgICAgICAgY2FzZSAnVyc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICflkagnO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAg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JyB8fCBtZXJpZGllbSA9PT0gJ+aXqeS4iicgfHwgbWVyaWRpZW0gPT09ICfkuIrljYgnKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91cjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+S4reWNiCcpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyID49IDExID8gaG91ciA6IGhvdXIgKyAxMjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+S4i+WNiCcgfHwgbWVyaWRpZW0gPT09ICfmmZrkuIonKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcbiAgICAgICAgdmFyIGhtID0gaG91ciAqIDEwMCArIG1pbnV0ZTtcbiAgICAgICAgaWYgKGhtIDwgNjAwKSB7XG4gICAgICAgICAgICByZXR1cm4gJ+WHjOaZqCc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG0gPCA5MDApIHtcbiAgICAgICAgICAgIHJldHVybiAn5pep5LiKJztcbiAgICAgICAgfSBlbHNlIGlmIChobSA8IDExMzApIHtcbiAgICAgICAgICAgIHJldHVybiAn5LiK5Y2IJztcbiAgICAgICAgfSBlbHNlIGlmIChobSA8IDEyMzApIHtcbiAgICAgICAgICAgIHJldHVybiAn5Lit5Y2IJztcbiAgICAgICAgfSBlbHNlIGlmIChobSA8IDE4MDApIHtcbiAgICAgICAgICAgIHJldHVybiAn5LiL5Y2IJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAn5pma5LiKJztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXkgOiAnW+S7iuWkqV1MVCcsXG4gICAgICAgIG5leHREYXkgOiAnW+aYjuWkqV1MVCcsXG4gICAgICAgIG5leHRXZWVrIDogJ1vkuItdZGRkZExUJyxcbiAgICAgICAgbGFzdERheSA6ICdb5pio5aSpXUxUJyxcbiAgICAgICAgbGFzdFdlZWsgOiAnW+S4il1kZGRkTFQnLFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgZGF5T2ZNb250aE9yZGluYWxQYXJzZTogL1xcZHsxLDJ9KOaXpXzmnIh86YCxKS8sXG4gICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIsIHBlcmlvZCkge1xuICAgICAgICBzd2l0Y2ggKHBlcmlvZCkge1xuICAgICAgICAgICAgY2FzZSAnZCcgOlxuICAgICAgICAgICAgY2FzZSAnRCcgOlxuICAgICAgICAgICAgY2FzZSAnREREJyA6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICfml6UnO1xuICAgICAgICAgICAgY2FzZSAnTScgOlxuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAn5pyIJztcbiAgICAgICAgICAgIGNhc2UgJ3cnIDpcbiAgICAgICAgICAgIGNhc2UgJ1cnIDpcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJ+mAsSc7XG4gICAgICAgICAgICBkZWZhdWx0IDpcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyO1xuICAgICAgICB9XG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6ICclc+WFpycsXG4gICAgICAgIHBhc3QgOiAnJXPliY0nLFxuICAgICAgICBzIDogJ+W5vuenkicsXG4gICAgICAgIG0gOiAnMSDliIbpkJgnLFxuICAgICAgICBtbSA6ICclZCDliIbpkJgnLFxuICAgICAgICBoIDogJzEg5bCP5pmCJyxcbiAgICAgICAgaGggOiAnJWQg5bCP5pmCJyxcbiAgICAgICAgZCA6ICcxIOWkqScsXG4gICAgICAgIGRkIDogJyVkIOWkqScsXG4gICAgICAgIE0gOiAnMSDlgIvmnIgnLF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6IC/lh4zmmah85pep5LiKfOS4iuWNiHzkuK3ljYh85LiL5Y2IfOaZmuS4ii8sXG4gICAgbWVyaWRpZW1Ib3VyIDogZnVuY3Rpb24gKGhvdXIsIG1lcmlkaWVtKSB7XG4gICAgICAgIGlmIChob3VyID09PSAxMikge1xuICAgICAgICAgICAgaG91ciA9IDA7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lcmlkaWVtID09PSAn5YeM5pmoJyB8fCBtZXJpZGllbSA9PT0gJ+aXqeS4iicgfHwgbWVyaWRpZW0gPT09ICfkuIrljYgnKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91cjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+S4reWNiCcpIHtcbiAgICAgICAgICAgIHJldHVybiBob3VyID49IDExID8gaG91ciA6IGhvdXIgKyAxMjtcbiAgICAgICAgfSBlbHNlIGlmIChtZXJpZGllbSA9PT0gJ+S4i+WNiCcgfHwgbWVyaWRpZW0gPT09ICfmmZrkuIonKSB7XG4gICAgICAgICAgICByZXR1cm4gaG91ciArIDEyO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBtZXJpZGllbSA6IGZ1bmN0aW9uIChob3VyLCBtaW51dGUsIGlzTG93ZXIpIHtcbiAgICAgICAgdmFyIGhtID0gaG91ciAqIDEwMCArIG1pbnV0ZTtcbiAgICAgICAgaWYgKGhtIDwgNjAwKSB7XG4gICAgICAgICAgICByZXR1cm4gJ+WHjOaZqCc7XG4gICAgICAgIH0gZWxzZSBpZiAoaG0gPCA5MDApIHtcbiAgICAgICAgICAgIHJldHVybiAn5pep5LiKJztcbiAgICAgICAgfSBlbHNlIGlmIChobSA8IDExMzApIHtcbiAgICAgICAgICAgIHJldHVybiAn5LiK5Y2IJztcbiAgICAgICAgfSBlbHNlIGlmIChobSA8IDEyMzApIHtcbiAgICAgICAgICAgIHJldHVybiAn5Lit5Y2IJztcbiAgICAgICAgfSBlbHNlIGlmIChobSA8IDE4MDApIHtcbiAgICAgICAgICAgIHJldHVybiAn5LiL5Y2IJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAn5pma5LiKJztcbiAgICAgICAgfVxuICAgIH0sXG4gICAgY2FsZW5kYXIgOiB7XG4gICAgICAgIHNhbWVEYXkgOiAnW+S7iuWkqV1MVCcsXG4gICAgICAgIG5leHREYXkgOiAnW+aYjuWkqV1MVCcsXG4gICAgICAgIG5leHRXZWVrIDogJ1vkuItdZGRkZExUJyxcbiAgICAgICAgbGFzdERheSA6ICdb5pio5aSpXUxUJyxcbiAgICAgICAgbGFzdFdlZWsgOiAnW+S4il1kZGRkTFQnLFxuICAgICAgICBzYW1lRWxzZSA6ICdMJ1xuICAgIH0sXG4gICAgZGF5T2ZNb250aE9yZGluYWxQYXJzZTogL1xcZHsxLDJ9KOaXpXzmnIh86YCxKS8sXG4gICAgb3JkaW5hbCA6IGZ1bmN0aW9uIChudW1iZXIsIHBlcmlvZCkge1xuICAgICAgICBzd2l0Y2ggKHBlcmlvZCkge1xuICAgICAgICAgICAgY2FzZSAnZCcgOlxuICAgICAgICAgICAgY2FzZSAnRCcgOlxuICAgICAgICAgICAgY2FzZSAnREREJyA6XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlciArICfml6UnO1xuICAgICAgICAgICAgY2FzZSAnTScgOlxuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXIgKyAn5pyIJztcbiAgICAgICAgICAgIGNhc2UgJ3cnIDpcbiAgICAgICAgICAgIGNhc2UgJ1cnIDpcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyICsgJ+mAsSc7XG4gICAgICAgICAgICBkZWZhdWx0IDpcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyO1xuICAgICAgICB9XG4gICAgfSxcbiAgICByZWxhdGl2ZVRpbWUgOiB7XG4gICAgICAgIGZ1dHVyZSA6ICclc+WFpycsXG4gICAgICAgIHBhc3QgOiAnJXPliY0nLFxuICAg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xuXG4gICAgZnVuY3Rpb24gQVBJKG93bmVyKSB7XG4gICAgICAgIHRoaXMub3duZXIgPSBvd25lcjtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBpbmhlcml0KGJhc2UsIGRlcml2ZWQpIHtcblxuICAgICAgICBpZiAoT2JqZWN0LmNyZWF0ZSkge1xuICAgICAgICAgICAgZGVyaXZlZC5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKGJhc2UucHJvdG90eXBlKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBmID0gZnVuY3Rpb24gZigpIHt9O1xuICAgICAgICAgICAgZi5wcm90b3R5cGUgPSBiYXNlLnByb3RvdHlwZTtcbiAgICAgICAgICAgIGRlcml2ZWQucHJvdG90eXBlID0gbmV3IGYoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGRlcml2ZWQucHJvdG90eXBlLmNvbnN0cnVjdG9yID0gZGVyaXZlZDtcblxuICAgICAgICByZXR1cm4gZGVyaXZlZDtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBDaGFydChjb25maWcpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcy5pbnRlcm5hbCA9IG5ldyBDaGFydEludGVybmFsKHRoaXMpO1xuICAgICAgICAkJC5sb2FkQ29uZmlnKGNvbmZpZyk7XG5cbiAgICAgICAgJCQuYmVmb3JlSW5pdChjb25maWcpO1xuICAgICAgICAkJC5pbml0KCk7XG4gICAgICAgICQkLmFmdGVySW5pdChjb25maWcpO1xuXG4gICAgICAgIC8vIGJpbmQgXCJ0aGlzXCIgdG8gbmVzdGVkIEFQSVxuICAgICAgICAoZnVuY3Rpb24gYmluZFRoaXMoZm4sIHRhcmdldCwgYXJnVGhpcykge1xuICAgICAgICAgICAgT2JqZWN0LmtleXMoZm4pLmZvckVhY2goZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgICAgIHRhcmdldFtrZXldID0gZm5ba2V5XS5iaW5kKGFyZ1RoaXMpO1xuICAgICAgICAgICAgICAgIGlmIChPYmplY3Qua2V5cyhmbltrZXldKS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGJpbmRUaGlzKGZuW2tleV0sIHRhcmdldFtrZXldLCBhcmdUaGlzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSkoYzNfY2hhcnRfZm4sIHRoaXMsIHRoaXMpO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIENoYXJ0SW50ZXJuYWwoYXBpKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXM7XG4gICAgICAgICQkLmQzID0gd2luZG93LmQzID8gd2luZG93LmQzIDogdHlwZW9mIHJlcXVpcmUgIT09ICd1bmRlZmluZWQnID8gcmVxdWlyZShcImQzXCIpIDogdW5kZWZpbmVkO1xuICAgICAgICAkJC5hcGkgPSBhcGk7XG4gICAgICAgICQkLmNvbmZpZyA9ICQkLmdldERlZmF1bHRDb25maWcoKTtcbiAgICAgICAgJCQuZGF0YSA9IHt9O1xuICAgICAgICAkJC5jYWNoZSA9IHt9O1xuICAgICAgICAkJC5heGVzID0ge307XG4gICAgfVxuXG4gICAgYzMuZ2VuZXJhdGUgPSBmdW5jdGlvbiAoY29uZmlnKSB7XG4gICAgICAgIHJldHVybiBuZXcgQ2hhcnQoY29uZmlnKTtcbiAgICB9O1xuXG4gICAgYzMuY2hhcnQgPSB7XG4gICAgICAgIGZuOiBDaGFydC5wcm90b3R5cGUsXG4gICAgICAgIGludGVybmFsOiB7XG4gICAgICAgICAgICBmbjogQ2hhcnRJbnRlcm5hbC5wcm90b3R5cGUsXG4gICAgICAgICAgICBheGlzOiB7XG4gICAgICAgICAgICAgICAgZm46IEF4aXMucHJvdG90eXBlXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ZuID0gYzMuY2hhcnQuZm47XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4gPSBjMy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Z2V0WURvbWFpbigkJC5kYXRhLnRhcmdldHMsICd5MicpKTtcbiAgICAgICAgJCQuc3ViWC5kb21haW4oJCQueC5kb21haW4oKSk7XG4gICAgICAgICQkLnN1YlkuZG9tYWluKCQkLnkuZG9tYWluKCkpO1xuICAgICAgICAkJC5zdWJZMi5kb21haW4oJCQueTIuZG9tYWluKCkpO1xuXG4gICAgICAgIC8vIFNhdmUgb3JpZ2luYWwgeCBkb21haW4gZm9yIHpvb20gdXBkYXRlXG4gICAgICAgICQkLm9yZ1hEb21haW4gPSAkJC54LmRvbWFpbigpO1xuXG4gICAgICAgIC8vIFNldCBpbml0aWFsaXplZCBzY2FsZXMgdG8gYnJ1c2ggYW5kIHpvb21cbiAgICAgICAgaWYgKCQkLmJydXNoKSB7ICQkLmJydXNoLnNjYWxlKCQkLnN1YlgpOyB9XG4gICAgICAgIGlmIChjb25maWcuem9vbV9lbmFibGVkKSB7ICQkLnpvb20uc2NhbGUoJCQueCk7IH1cblxuICAgICAgICAvKi0tIEJhc2ljIEVsZW1lbnRzIC0tKi9cblxuICAgICAgICAvLyBEZWZpbmUgc3Znc1xuICAgICAgICAkJC5zdmcgPSAkJC5zZWxlY3RDaGFydC5hcHBlbmQoXCJzdmdcIilcbiAgICAgICAgICAgIC5zdHlsZShcIm92ZXJmbG93XCIsIFwiaGlkZGVuXCIpXG4gICAgICAgICAgICAub24oJ21vdXNlZW50ZXInLCBmdW5jdGlvbiAoKSB7IHJldHVybiBjb25maWcub25tb3VzZW92ZXIuY2FsbCgkJCk7IH0pXG4gICAgICAgICAgICAub24oJ21vdXNlbGVhdmUnLCBmdW5jdGlvbiAoKSB7IHJldHVybiBjb25maWcub25tb3VzZW91dC5jYWxsKCQkKTsgfSk7XG5cbiAgICAgICAgaWYgKCQkLmNvbmZpZy5zdmdfY2xhc3NuYW1lKSB7XG4gICAgICAgICAgICAkJC5zdmcuYXR0cignY2xhc3MnLCAkJC5jb25maWcuc3ZnX2NsYXNzbmFtZSk7XG4gIC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RvIGZvcmVmcm9udFxuICAgICAgICAvLyBUT0RPOiBpcyB0aGlzIG5lZWRlZD9cbiAgICAgICAgbWFpbi5pbnNlcnQoJ3JlY3QnLCBjb25maWcuem9vbV9wcml2aWxlZ2VkID8gbnVsbCA6ICdnLicgKyBDTEFTUy5yZWdpb25zKVxuICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgQ0xBU1Muem9vbVJlY3QpXG4gICAgICAgICAgICAuYXR0cignd2lkdGgnLCAkJC53aWR0aClcbiAgICAgICAgICAgIC5hdHRyKCdoZWlnaHQnLCAkJC5oZWlnaHQpXG4gICAgICAgICAgICAuc3R5bGUoJ29wYWNpdHknLCAwKVxuICAgICAgICAgICAgLm9uKFwiZGJsY2xpY2suem9vbVwiLCBudWxsKTtcblxuICAgICAgICAvLyBTZXQgZGVmYXVsdCBleHRlbnQgaWYgZGVmaW5lZFxuICAgICAgICBpZiAoY29uZmlnLmF4aXNfeF9leHRlbnQpIHsgJCQuYnJ1c2guZXh0ZW50KCQkLmdldERlZmF1bHRFeHRlbnQoKSk7IH1cblxuICAgICAgICAvLyBBZGQgQXhpc1xuICAgICAgICAkJC5heGlzLmluaXQoKTtcblxuICAgICAgICAvLyBTZXQgdGFyZ2V0c1xuICAgICAgICAkJC51cGRhdGVUYXJnZXRzKCQkLmRhdGEudGFyZ2V0cyk7XG5cbiAgICAgICAgLy8gRHJhdyB3aXRoIHRhcmdldHNcbiAgICAgICAgaWYgKGJpbmRpbmcpIHtcbiAgICAgICAgICAgICQkLnVwZGF0ZURpbWVuc2lvbigpO1xuICAgICAgICAgICAgJCQuY29uZmlnLm9uaW5pdC5jYWxsKCQkKTtcbiAgICAgICAgICAgICQkLnJlZHJhdyh7XG4gICAgICAgICAgICAgICAgd2l0aFRyYW5zaXRpb246IGZhbHNlLFxuICAgICAgICAgICAgICAgIHdpdGhUcmFuc2Zvcm06IHRydWUsXG4gICAgICAgICAgICAgICAgd2l0aFVwZGF0ZVhEb21haW46IHRydWUsXG4gICAgICAgICAgICAgICAgd2l0aFVwZGF0ZU9yZ1hEb21haW46IHRydWUsXG4gICAgICAgICAgICAgICAgd2l0aFRyYW5zaXRpb25Gb3JBeGlzOiBmYWxzZVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBCaW5kIHJlc2l6ZSBldmVudFxuICAgICAgICAkJC5iaW5kUmVzaXplKCk7XG5cbiAgICAgICAgLy8gZXhwb3J0IGVsZW1lbnQgb2YgdGhlIGNoYXJ0XG4gICAgICAgICQkLmFwaS5lbGVtZW50ID0gJCQuc2VsZWN0Q2hhcnQubm9kZSgpO1xuICAgIH07XG5cbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5zbW9vdGhMaW5lcyA9IGZ1bmN0aW9uIChlbCwgdHlwZSkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzO1xuICAgICAgICBpZiAodHlwZSA9PT0gJ2dyaWQnKSB7XG4gICAgICAgICAgICBlbC5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICB2YXIgZyA9ICQkLmQzLnNlbGVjdCh0aGlzKSxcbiAgICAgICAgICAgICAgICAgICAgeDEgPSBnLmF0dHIoJ3gxJyksXG4gICAgICAgICAgICAgICAgICAgIHgyID0gZy5hdHRyKCd4MicpLFxuICAgICAgICAgICAgICAgICAgICB5MSA9IGcuYXR0cigneTEnKSxcbiAgICAgICAgICAgICAgICAgICAgeTIgPSBnLmF0dHIoJ3kyJyk7XG4gICAgICAgICAgICAgICAgZy5hdHRyKHtcbiAgICAgICAgICAgICAgICAgICAgJ3gxJzogTWF0aC5jZWlsKHgxKSxcbiAgICAgICAgICAgICAgICAgICAgJ3gyJzogTWF0aC5jZWlsKHgyKSxcbiAgICAgICAgICAgICAgICAgICAgJ3kxJzogTWF0aC5jZWlsKHkxKSxcbiAgICAgICAgICAgICAgICAgICAgJ3kyJzogTWF0aC5jZWlsKHkyKVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgIC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TaG93Lmxlbmd0aCkge1xuICAgICAgICAgICAgaWYgKGNvbmZpZy5heGlzX3hfdGlja19jdWxsaW5nICYmIHRpY2tWYWx1ZXMpIHtcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSAxOyBpIDwgdGlja1ZhbHVlcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGlja1ZhbHVlcy5sZW5ndGggLyBpIDwgY29uZmlnLmF4aXNfeF90aWNrX2N1bGxpbmdfbWF4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpbnRlcnZhbEZvckN1bGxpbmcgPSBpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgJCQuc3ZnLnNlbGVjdEFsbCgnLicgKyBDTEFTUy5heGlzWCArICcgLnRpY2sgdGV4dCcpLmVhY2goZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGluZGV4ID0gdGlja1ZhbHVlcy5pbmRleE9mKGUpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggPj0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZDMuc2VsZWN0KHRoaXMpLnN0eWxlKCdkaXNwbGF5JywgaW5kZXggJSBpbnRlcnZhbEZvckN1bGxpbmcgPyAnbm9uZScgOiAnYmxvY2snKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAkJC5zdmcuc2VsZWN0QWxsKCcuJyArIENMQVNTLmF4aXNYICsgJyAudGljayB0ZXh0Jykuc3R5bGUoJ2Rpc3BsYXknLCAnYmxvY2snKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHNldHVwIGRyYXdlciAtIE1FTU86IHRoZXNlIG11c3Qg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8gJCQuY2lyY2xlWSA6ICQkLmNpcmNsZVgpLmJpbmQoJCQpO1xuICAgICAgICBjeSA9ICgkJC5jb25maWcuYXhpc19yb3RhdGVkID8gJCQuY2lyY2xlWCA6ICQkLmNpcmNsZVkpLmJpbmQoJCQpO1xuXG4gICAgICAgIGlmIChvcHRpb25zLmZsb3cpIHtcbiAgICAgICAgICAgIGZsb3cgPSAkJC5nZW5lcmF0ZUZsb3coe1xuICAgICAgICAgICAgICAgIHRhcmdldHM6IHRhcmdldHNUb1Nob3csXG4gICAgICAgICAgICAgICAgZmxvdzogb3B0aW9ucy5mbG93LFxuICAgICAgICAgICAgICAgIGR1cmF0aW9uOiBvcHRpb25zLmZsb3cuZHVyYXRpb24sXG4gICAgICAgICAgICAgICAgZHJhd0JhcjogZHJhd0JhcixcbiAgICAgICAgICAgICAgICBkcmF3TGluZTogZHJhd0xpbmUsXG4gICAgICAgICAgICAgICAgZHJhd0FyZWE6IGRyYXdBcmVhLFxuICAgICAgICAgICAgICAgIGN4OiBjeCxcbiAgICAgICAgICAgICAgICBjeTogY3ksXG4gICAgICAgICAgICAgICAgeHY6IHh2LFxuICAgICAgICAgICAgICAgIHhGb3JUZXh0OiB4Rm9yVGV4dCxcbiAgICAgICAgICAgICAgICB5Rm9yVGV4dDogeUZvclRleHRcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKChkdXJhdGlvbiB8fCBmbG93KSAmJiAkJC5pc1RhYlZpc2libGUoKSkgeyAvLyBPbmx5IHVzZSB0cmFuc2l0aW9uIGlmIHRhYiB2aXNpYmxlLiBTZWUgIzkzOC5cbiAgICAgICAgICAgIC8vIHRyYW5zaXRpb24gc2hvdWxkIGJlIGRlcml2ZWQgZnJvbSBvbmUgdHJhbnNpdGlvblxuICAgICAgICAgICAgZDMudHJhbnNpdGlvbigpLmR1cmF0aW9uKGR1cmF0aW9uKS5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICB2YXIgdHJhbnNpdGlvbnNUb1dhaXQgPSBbXTtcblxuICAgICAgICAgICAgICAgIC8vIHJlZHJhdyBhbmQgZ2F0aGVyIHRyYW5zaXRpb25zXG4gICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAkJC5yZWRyYXdCYXIoZHJhd0JhciwgdHJ1ZSksXG4gICAgICAgICAgICAgICAgICAgICQkLnJlZHJhd0xpbmUoZHJhd0xpbmUsIHRydWUpLFxuICAgICAgICAgICAgICAgICAgICAkJC5yZWRyYXdBcmVhKGRyYXdBcmVhLCB0cnVlKSxcbiAgICAgICAgICAgICAgICAgICAgJCQucmVkcmF3Q2lyY2xlKGN4LCBjeSwgdHJ1ZSksXG4gICAgICAgICAgICAgICAgICAgICQkLnJlZHJhd1RleHQoeEZvclRleHQsIHlGb3JUZXh0LCBvcHRpb25zLmZsb3csIHRydWUpLFxuICAgICAgICAgICAgICAgICAgICAkJC5yZWRyYXdSZWdpb24odHJ1ZSksXG4gICAgICAgICAgICAgICAgICAgICQkLnJlZHJhd0dyaWQodHJ1ZSksXG4gICAgICAgICAgICAgICAgXS5mb3JFYWNoKGZ1bmN0aW9uICh0cmFuc2l0aW9ucykge1xuICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9ucy5mb3JFYWNoKGZ1bmN0aW9uICh0cmFuc2l0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9uc1RvV2FpdC5wdXNoKHRyYW5zaXRpb24pO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIFdhaXQgZm9yIGVuZCBvZiB0cmFuc2l0aW9ucyB0byBjYWxsIGZsb3cgYW5kIG9ucmVuZGVyZWQgY2FsbGJhY2tcbiAgICAgICAgICAgICAgICB3YWl0Rm9yRHJhdyA9ICQkLmdlbmVyYXRlV2FpdCgpO1xuICAgICAgICAgICAgICAgIHRyYW5zaXRpb25zVG9XYWl0LmZvckVhY2goZnVuY3Rpb24gKHQpIHtcbiAgICAgICAgICAgICAgICAgICAgd2FpdEZvckRyYXcuYWRkKHQpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5jYWxsKHdhaXRGb3JEcmF3LCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgaWYgKGZsb3cpIHtcbiAgICAgICAgICAgICAgICAgICAgZmxvdygpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLm9ucmVuZGVyZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLm9ucmVuZGVyZWQuY2FsbCgkJCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAkJC5yZWRyYXdCYXIoZHJhd0Jhcik7XG4gICAgICAgICAgICAkJC5yZWRyYXdMaW5lKGRyYXdMaW5lKTtcbiAgICAgICAgICAgICQkLnJlZHJhd0FyZWEoZHJhd0FyZWEpO1xuICAgICAgICAgICAgJCQucmVkcmF3Q2lyY2xlKGN4LCBjeSk7XG4gICAgICAgICAgICAkJC5yZWRyYXdUZXh0KHhGb3JUZXh0LCB5Rm9yVGV4dCwgb3B0aW9ucy5mbG93KTtcbiAgICAgICAgICAgICQkLnJlZHJhd1JlZ2lvbigpO1xuICAgICAgICAgICAgJCQucmVkcmF3R3JpZCgpO1xuICAgICAgICAgICAgaWYgKGNvbmZpZy5vbnJlbmRlcmVkKSB7XG4gICAgICAgICAgICAgICAgY29uZmlnLm9ucmVuZGVyZWQuY2FsbCgkJCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyB1cGRhdGUgZmFkZWluIGNvbmRpdGlvblxuICAgICAgICAkJC5tYXBUb0lkcygkJC5kYXRhLnRhcmdldHMpLmZvckVhY2goZnVuY3Rpb24g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ICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZWN0aW9uLm5vZGUoKS5wYXJlbnROb2RlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmNsZWFySW50ZXJ2YWwoJCQuaW50ZXJ2YWxGb3JPYnNlcnZlSW5zZXJ0ZWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQkLnVwZGF0ZURpbWVuc2lvbigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkJC5icnVzaCkgeyAkJC5icnVzaC51cGRhdGUoKTsgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQkLmNvbmZpZy5vbmluaXQuY2FsbCgkJCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQucmVkcmF3KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aFRyYW5zZm9ybTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aFVwZGF0ZVhEb21haW46IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhVcGRhdGVPcmdYRG9tYWluOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoVHJhbnNpdGlvbjogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhUcmFuc2l0aW9uRm9yVHJhbnNmb3JtOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aExlZ2VuZDogdHJ1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbi50cmFuc2l0aW9uKCkuc3R5bGUoJ29wYWNpdHknLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgMTApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0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XJ0X2ludGVybmFsX2ZuLmVuZGFsbCA9IGZ1bmN0aW9uICh0cmFuc2l0aW9uLCBjYWxsYmFjaykge1xuICAgICAgICB2YXIgbiA9IDA7XG4gICAgICAgIHRyYW5zaXRpb25cbiAgICAgICAgICAgIC5lYWNoKGZ1bmN0aW9uICgpIHsgKytuOyB9KVxuICAgICAgICAgICAgLmVhY2goXCJlbmRcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGlmICghLS1uKSB7IGNhbGxiYWNrLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7IH1cbiAgICAgICAgICAgIH0pO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2VuZXJhdGVXYWl0ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgdHJhbnNpdGlvbnNUb1dhaXQgPSBbXSxcbiAgICAgICAgICAgIGYgPSBmdW5jdGlvbiAodHJhbnNpdGlvbiwgY2FsbGJhY2spIHtcbiAgICAgICAgICAgICAgICB2YXIgdGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBkb25lID0gMDtcbiAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbnNUb1dhaXQuZm9yRWFjaChmdW5jdGlvbiAodCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHQuZW1wdHkoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQudHJhbnNpdGlvbigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvbmUgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChkb25lID09PSB0cmFuc2l0aW9uc1RvV2FpdC5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNhbGxiYWNrKSB7IGNhbGxiYWNrKCk7IH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0sIDEwKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgIGYuYWRkID0gZnVuY3Rpb24gKHRyYW5zaXRpb24pIHtcbiAgICAgICAgICAgIHRyYW5zaXRpb25zVG9XYWl0LnB1c2godHJhbnNpdGlvbik7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBmO1xuICAgIH07XG5cbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5wYXJzZURhdGUgPSBmdW5jdGlvbiAoZGF0ZSkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBwYXJzZWREYXRlO1xuICAgICAgICBpZiAoZGF0ZSBpbnN0YW5jZW9mIERhdGUpIHtcbiAgICAgICAgICAgIHBhcnNlZERhdGUgPSBkYXRlO1xuICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBkYXRlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgcGFyc2VkRGF0ZSA9ICQkLmRhdGFUaW1lRm9ybWF0KCQkLmNvbmZpZy5kYXRhX3hGb3JtYXQpLnBhcnNlKGRhdGUpO1xuICAgICAgICB9IGVsc2UgaWYgKHR5cGVvZiBkYXRlID09PSAnbnVtYmVyJyAmJiAhaXNOYU4oZGF0ZSkpIHtcbiAgICAgICAgICAgIHBhcnNlZERhdGUgPSBuZXcgRGF0ZSgrZGF0ZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFwYXJzZWREYXRlIHx8IGlzTmFOKCtwYXJ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gICAgICAgICAgYmluZHRvOiAnI2NoYXJ0JyxcbiAgICAgICAgICAgIHN2Z19jbGFzc25hbWU6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIHNpemVfd2lkdGg6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIHNpemVfaGVpZ2h0OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBwYWRkaW5nX2xlZnQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIHBhZGRpbmdfcmlnaHQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIHBhZGRpbmdfdG9wOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBwYWRkaW5nX2JvdHRvbTogdW5kZWZpbmVkLFxuICAgICAgICAgICAgcmVzaXplX2F1dG86IHRydWUsXG4gICAgICAgICAgICB6b29tX2VuYWJsZWQ6IGZhbHNlLFxuICAgICAgICAgICAgem9vbV9leHRlbnQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIHpvb21fcHJpdmlsZWdlZDogZmFsc2UsXG4gICAgICAgICAgICB6b29tX3Jlc2NhbGU6IGZhbHNlLFxuICAgICAgICAgICAgem9vbV9vbnpvb206IGZ1bmN0aW9uICgpIHt9LFxuICAgICAgICAgICAgem9vbV9vbnpvb21zdGFydDogZnVuY3Rpb24gKCkge30sXG4gICAgICAgICAgICB6b29tX29uem9vbWVuZDogZnVuY3Rpb24gKCkge30sXG4gICAgICAgICAgICB6b29tX3hfbWluOiB1bmRlZmluZWQsXG4gICAgICAgICAgICB6b29tX3hfbWF4OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBpbnRlcmFjdGlvbl9icmlnaHRlbjogdHJ1ZSxcbiAgICAgICAgICAgIGludGVyYWN0aW9uX2VuYWJsZWQ6IHRydWUsXG4gICAgICAgICAgICBvbm1vdXNlb3ZlcjogZnVuY3Rpb24gKCkge30sXG4gICAgICAgICAgICBvbm1vdXNlb3V0OiBmdW5jdGlvbiAoKSB7fSxcbiAgICAgICAgICAgIG9ucmVzaXplOiBmdW5jdGlvbiAoKSB7fSxcbiAgICAgICAgICAgIG9ucmVzaXplZDogZnVuY3Rpb24gKCkge30sXG4gICAgICAgICAgICBvbmluaXQ6IGZ1bmN0aW9uICgpIHt9LFxuICAgICAgICAgICAgb25yZW5kZXJlZDogZnVuY3Rpb24gKCkge30sXG4gICAgICAgICAgICB0cmFuc2l0aW9uX2R1cmF0aW9uOiAzNTAsXG4gICAgICAgICAgICBkYXRhX3g6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGRhdGFfeHM6IHt9LFxuICAgICAgICAgICAgZGF0YV94Rm9ybWF0OiAnJVktJW0tJWQnLFxuICAgICAgICAgICAgZGF0YV94TG9jYWx0aW1lOiB0cnVlLFxuICAgICAgICAgICAgZGF0YV94U29ydDogdHJ1ZSxcbiAgICAgICAgICAgIGRhdGFfaWRDb252ZXJ0ZXI6IGZ1bmN0aW9uIChpZCkgeyByZXR1cm4gaWQ7IH0sXG4gICAgICAgICAgICBkYXRhX25hbWVzOiB7fSxcbiAgICAgICAgICAgIGRhdGFfY2xhc3Nlczoge30sXG4gICAgICAgICAgICBkYXRhX2dyb3VwczogW10sXG4gICAgICAgICAgICBkYXRhX2F4ZXM6IHt9LFxuICAgICAgICAgICAgZGF0YV90eXBlOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBkYXRhX3R5cGVzOiB7fSxcbiAgICAgICAgICAgIGRhdGFfbGFiZWxzOiB7fSxcbiAgICAgICAgICAgIGRhdGFfb3JkZXI6ICdkZXNjJyxcbiAgICAgICAgICAgIGRhdGFfcmVnaW9uczoge30sXG4gICAgICAgICAgICBkYXRhX2NvbG9yOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBkYXRhX2NvbG9yczoge30sXG4gICAgICAgICAgICBkYXRhX2hpZGU6IGZhbHNlLFxuICAgICAgICAgICAgZGF0YV9maWx0ZXI6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGRhdGFfc2VsZWN0aW9uX2VuYWJsZWQ6IGZ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gc3ViY2hhcnRfc2hvdzogZmFsc2UsXG4gICAgICAgICAgICBzdWJjaGFydF9zaXplX2hlaWdodDogNjAsXG4gICAgICAgICAgICBzdWJjaGFydF9heGlzX3hfc2hvdzogdHJ1ZSxcbiAgICAgICAgICAgIHN1YmNoYXJ0X29uYnJ1c2g6IGZ1bmN0aW9uICgpIHt9LFxuICAgICAgICAgICAgLy8gY29sb3JcbiAgICAgICAgICAgIGNvbG9yX3BhdHRlcm46IFtdLFxuICAgICAgICAgICAgY29sb3JfdGhyZXNob2xkOiB7fSxcbiAgICAgICAgICAgIC8vIGxlZ2VuZFxuICAgICAgICAgICAgbGVnZW5kX3Nob3c6IHRydWUsXG4gICAgICAgICAgICBsZWdlbmRfaGlkZTogZmFsc2UsXG4gICAgICAgICAgICBsZWdlbmRfcG9zaXRpb246ICdib3R0b20nLFxuICAgICAgICAgICAgbGVnZW5kX2luc2V0X2FuY2hvcjogJ3RvcC1sZWZ0JyxcbiAgICAgICAgICAgIGxlZ2VuZF9pbnNldF94OiAxMCxcbiAgICAgICAgICAgIGxlZ2VuZF9pbnNldF95OiAwLFxuICAgICAgICAgICAgbGVnZW5kX2luc2V0X3N0ZXA6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGxlZ2VuZF9pdGVtX29uY2xpY2s6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGxlZ2VuZF9pdGVtX29ubW91c2VvdmVyOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBsZWdlbmRfaXRlbV9vbm1vdXNlb3V0OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBsZWdlbmRfZXF1YWxseTogZmFsc2UsXG4gICAgICAgICAgICBsZWdlbmRfcGFkZGluZzogMCxcbiAgICAgICAgICAgIGxlZ2VuZF9pdGVtX3RpbGVfd2lkdGg6IDEwLFxuICAgICAgICAgICAgbGVnZW5kX2l0ZW1fdGlsZV9oZWlnaHQ6IDEwLFxuICAgICAgICAgICAgLy8gYXhpc1xuICAgICAgICAgICAgYXhpc19yb3RhdGVkOiBmYWxzZSxcbiAgICAgICAgICAgIGF4aXNfeF9zaG93OiB0cnVlLFxuICAgICAgICAgICAgYXhpc194X3R5cGU6ICdpbmRleGVkJyxcbiAgICAgICAgICAgIGF4aXNfeF9sb2NhbHRpbWU6IHRydWUsXG4gICAgICAgICAgICBheGlzX3hfY2F0ZWdvcmllczogW10sXG4gICAgICAgICAgICBheGlzX3hfdGlja19jZW50ZXJlZDogZmFsc2UsXG4gICAgICAgICAgICBheGlzX3hfdGlja19mb3JtYXQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGF4aXNfeF90aWNrX2N1bGxpbmc6IHt9LFxuICAgICAgICAgICAgYXhpc194X3RpY2tfY3VsbGluZ19tYXg6IDEwLFxuICAgICAgICAgICAgYXhpc194X3RpY2tfY291bnQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGF4aXNfeF90aWNrX2ZpdDogdHJ1ZSxcbiAgICAgICAgICAgIGF4aXNfeF90aWNrX3ZhbHVlczogbnVsbCxcbiAgICAgICAgICAgIGF4aXNfeF90aWNrX3JvdGF0ZTogMCxcbiAgICAgICAgICAgIGF4aXNfeF90aWNrX291dGVyOiB0cnVlLFxuICAgICAgICAgICAgYXhpc194X3RpY2tfbXVsdGlsaW5lOiB0cnVlLFxuICAgICAgICAgICAgYXhpc194X3RpY2tfd2lkdGg6IG51bGwsXG4gICAgICAgICAgICBheGlzX3hfbWF4OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3hfbWluOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3hfcGFkZGluZzoge30sXG4gICAgICAgICAgICBheGlzX3hfaGVpZ2h0OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3hfZXh0ZW50OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3hfbGFiZWw6IHt9LFxuICAgICAgICAgICAgYXhpc195X3Nob3c6IHRydWUsXG4gICAgICAgICAgICBheGlzX3lfdHlwZTogdW5kZWZpbmVkLFxuICAgICAgICAgICAgYXhpc195X21heDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgYXhpc195X21pbjogdW5kZWZpbmVkLFxuICAgICAgICAgICAgYXhpc195X2ludmVydGVkOiBmYWxzZSxcbiAgICAgICAgICAgIGF4aXNfeV9jZW50ZXI6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGF4aXNfeV9pbm5lcjogdW5kZWZpbmVkLFxuICAgICAgICAgICAgYXhpc195X2xhYmVsOiB7fSxcbiAgICAgICAgICAgIGF4aXNfeV90aWNrX2Zvcm1hdDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgYXhpc195X3RpY2tfb3V0ZXI6IHRydWUsXG4gICAgICAgICAgICBheGlzX3lfdGlja192YWx1ZXM6IG51bGwsICAgICAgICBcbiAgICAgICAgICAgIGF4aXNfeV90aWNrX3JvdGF0ZTogMCxcbiAgICAgICAgICAgIGF4aXNfeV90aWNrX2NvdW50OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3lfdGlja190aW1lX3ZhbHVlOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3lfdGlja190aW1lX2ludGVydmFsOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3lfcGFkZGluZzoge30sXG4gICAgICAgICAgICBheGlzX3lfZGVmYXVsdDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgYXhpc195Ml9zaG93OiBmYWxzZSxcbiAgICAgICAgICAgIGF4aXNfeTJfbWF4OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3kyX21pbjogdW5kZWZpbmVkLFxuICAgICAgICAgICAgYXhpc195Ml9pbnZlcnRlZDogZmFsc2UsXG4gICAgICAgICAgICBheGlzX3kyX2NlbnRlcjogdW5kZWZpbmVkLFxuICAgICAgICAgICAgYXhpc195Ml9pbm5lcjogdW5kZWZpbmVkLFxuICAgICAgICAgICAgYXhpc195Ml9sYWJlbDoge30sXG4gICAgICAgICAgICBheGlzX3kyX3RpY2tfZm9ybWF0OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3kyX3RpY2tfb3V0ZXI6IHRydWUsXG4gICAgICAgICAgICBheGlzX3kyX3RpY2tfdmFsdWVzOiBudWxsLFxuICAgICAgICAgICAgYXhpc195Ml90aWNrX2NvdW50OiB1bmRlZmluZWQsXG4gICAgICAgICAgICBheGlzX3kyX3BhZGRpbmc6IHt9LFxuICAgICAgICAgICAgYXhpc195Ml9kZWZhdWx0OiB1bmRlZmluZWQsXG4gICAgICAgICAgICAvLyBncmlkXG4gICAgICAgICAgICBncmlkX3hfc2hvdzogZmFsc2UsXG4gICAgICAgICAgICBncmlkX3hfdHlwZTogJ3RpY2snLFxuICAgICAgICAgICAgZ3JpZF94X2xpbmVzOiBbXSxcbiAgICAgICAgICAgIGdyaWRfeV9zaG93OiBmYWxzZSxcbiAgICAgICAgICAgIC8vIG5vdCB1c2VkXG4gICAgICAgICAgICAvLyBncmlkX3lfdHlwZTogJ3RpY2snLFxuICAgICAgICAgICAgZ3JpZF95X2xpbmVzOiBbXSxcbiAgICAgICAgICAgIGdyaWRfeV90aWNrczogMTAsXG4gICAgICAgICAgICBncmlkX2ZvY3VzX3Nob3c6IHRydWUsXG4gICAgICAgICAgICBncmlkX2xpbmVzX2Zyb250OiB0cnVlLFxuICAgICAgICAgICAgLy8gcG9pbnQgLSBwb2ludCBvZiBlYWNoIGRhdGFcbiAgICAgICAgICAgIHBvaW50X3Nob3c6IHRydWUsXG4gICAgICAgICAgICBwb2ludF9yOiAyLjUsXG4gICAgICAgICAgICBwb2ludF9zZW5zaXRpdml0eTogMTAsXG4gICAgICAgICAgICBwb2ludF9mb2N1c19leHBhbmRfZW5hYmxlZDogdHJ1ZSxcbiAgICAgICAgICAgIHBvaW50X2ZvY3VzX2V4cGFuZF9yOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBwb2ludF9zZWxlY3RfcjogdW5kZWZpbmVkLFxuICAgICAgICAgICAgLy8gbGluZVxuICAgICAgICAgICAgbGluZV9jb25uZWN0TnVsbDogZmFsc2UsXG4gICAgICAgICAgICBsaW5lX3N0ZXBfdHlwZTogJ3N0ZXAnLFxuICAgICAgICAgICAgLy8gYmFyXG4gICAgICAgICAgICBiYXJfd2lkdGg6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGJhcl93aWR0aF9yYXRpbzogMC42LFxuICAgICAgICAgICAgYmFyX3dpZHRoX21heDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgYmFyX3plcm9iYXNlZDogdHJ1ZSxcbiAgICAgICAgICAgIC8vIGFyZWFcbiAgICAgICAgICAgIGFyZWFfemVyb2Jhc2VkOiB0cnVlLFxuICAgICAgICAgICAgYXJlYV9hYm92ZTogZmFsc2UsXG4gICAgICAgICAgICAvLyBwaWVcbiAgICAgICAgICAgIHBpZV9sYWJlbF9zaG93OiB0cnVlLFxuICAgICAgICAgICAgcGllX2xhYmVsX2Zvcm1hdDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgcGllX2xhYmVsX3RocmVzaG9sZDogMC4wNSxcbiAgICAgICAgICAgIHBpZV9sYWJlbF9yYXRpbzogdW5kZWZpbmVkLFxuICAgICAgICAgICAgcGllX2V4cGFuZDoge30sXG4gICAgICAgICAgICBwaWVfZXhwYW5kX2R1cmF0aW9uOiA1MCxcbiAgICAgICAgICAgIC8vIGdhdWdlXG4gICAgICAgICAgICBnYXVnZV9mdWxsQ2lyY2xlOiBmYWxzZSxcbiAgICAgICAgICAgIGdhdWdlX2xhYmVsX3Nob3c6IHRydWUsXG4gICAgICAgICAgICBnYXVnZV9sYWJlbF9mb3JtYXQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGdhdWdlX21pbjogMCxcbiAgICAgICAgICAgIGdhdWdlX21heDogMTAwLFxuICAgICAgICAgICAgZ2F1Z2Vfc3RhcnRpbmdBbmdsZTogLTEgKiBNYXRoLlBJLzIsXG4gICAgICAgICAgICBnYXVnZV91bml0czogdW5kZWZpbmVkLFxuICAgICAgICAgICAgZ2F1Z2Vfd2lkdGg6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGdhdWdlX2V4cGFuZDoge30sXG4gICAgICAgICAgICBnYXVnZV9leHBhbmRfZHVyYXRpb246IDUwLFxuICAgICAgICAgICAgLy8gZG9udXRcbiAgICAgICAgICAgIGRvbnV0X2xhYmVsX3Nob3c6IHRydWUsXG4gICAgICAgICAgICBkb251dF9sYWJlbF9mb3JtYXQ6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGRvbnV0X2xhYmVsX3RocmVzaG9sZDogMC4wNSxcbiAgICAgICAgICAgIGRvbnV0X2xhYmVsX3JhdGlvOiB1bmRlZmluZWQsXG4gICAgICAgICAgICBkb251dF93aWR0aDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgZG9udXRfdGl0bGU6IFwiXCIsXG4gICAgICAgICAgICBkb251dF9leHBhbmQ6IHt9LFxuICAgICAgICAgICAgZG9udXRfZXhwYW5kX2R1cmF0aW9uOiA1MCxcbiAgICAgICAgICAgIC8vIHNwbGluZVxuICAgICAgICAgICAgc3BsaW5lX2ludGVycG9sYXRpb25fdHlwZTogJ2NhcmRpbmFsJyxcbiAgICAgICAgICAgIC8vIHJlZ2lvbiAtIHJlZ2lvbiB0byBjaGFuZ2Ugc3R5bGVcbiAgICAgICAgICAgIHJlZ2lvbnM6IFtdLFxuICAgICAgICAgICAgLy8gdG9vbHRpcCAtIHNob3cgd2hlbiBtb3VzZW92ZXIgb24gZWFjaCBkYXRhXG4gICAgICAgICAgICB0b29sdGlwX3Nob3c6IHRydWUsXG4gICAgICAgICAgICB0b29sdGlwX2dyb3VwZWQ6IHRydWUsXG4gICAgICAgICAgICB0b29sdGlwX2Zvcm1hdF90aXRsZTogdW5kZWZpbmVkLFxuICAgICAgICAgICAgdG9vbHRpcF9mb3JtYXRfbmFtZTogdW5kZWZpbmVkLFxuICAgICAgICAgICAgdG9vbHRpcF9mb3JtYXRfdmFsdWU6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KGtleSkge1xuICAgICAgICAgICAgY29uZmlnW2tleV0gPSB0aGlzLmFkZGl0aW9uYWxDb25maWdba2V5XTtcbiAgICAgICAgfSwgdGhpcyk7XG5cbiAgICAgICAgcmV0dXJuIGNvbmZpZztcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmFkZGl0aW9uYWxDb25maWcgPSB7fTtcblxuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmxvYWRDb25maWcgPSBmdW5jdGlvbiAoY29uZmlnKSB7XG4gICAgICAgIHZhciB0aGlzX2NvbmZpZyA9IHRoaXMuY29uZmlnLCB0YXJnZXQsIGtleXMsIHJlYWQ7XG4gICAgICAgIGZ1bmN0aW9uIGZpbmQoKSB7XG4gICAgICAgICAgICB2YXIga2V5ID0ga2V5cy5zaGlmdCgpO1xuICAgIC8vICAgICAgICBjb25zb2xlLmxvZyhcImtleSA9PlwiLCBrZXksIFwiLCB0YXJnZXQgPT5cIiwgdGFyZ2V0KTtcbiAgICAgICAgICAgIGlmIChrZXkgJiYgdGFyZ2V0ICYmIHR5cGVvZiB0YXJnZXQgPT09ICdvYmplY3QnICYmIGtleSBpbiB0YXJnZXQpIHtcbiAgICAgICAgICAgICAgICB0YXJnZXQgPSB0YXJnZXRba2V5XTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmluZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoIWtleSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0YXJnZXQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIE9iamVjdC5rZXlzKHRoaXNfY29uZmlnKS5mb3JFYWNoKGZ1bmN0aW9uIChrZXkpIHtcbiAgICAgICAgICAgIHRhcmdldCA9IGNvbmZpZztcbiAgICAgICAgICAgIGtleXMg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3NjYWxlKGQpICsgb2Zmc2V0KGQpO1xuICAgICAgICAgICAgICAgIHJldHVybiByYXcgPyB2IDogTWF0aC5jZWlsKHYpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHNjYWxlID0gZnVuY3Rpb24gKGQsIHJhdykge1xuICAgICAgICAgICAgICAgIHZhciB2ID0gX3NjYWxlKGQpO1xuICAgICAgICAgICAgICAgIHJldHVybiByYXcgPyB2IDogTWF0aC5jZWlsKHYpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICAvLyBkZWZpbmUgZnVuY3Rpb25zXG4gICAgICAgIGZvciAoa2V5IGluIF9zY2FsZSkge1xuICAgICAgICAgICAgc2NhbGVba2V5XSA9IF9zY2FsZVtrZXldO1xuICAgICAgICB9XG4gICAgICAgIHNjYWxlLm9yZ0RvbWFpbiA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiBfc2NhbGUuZG9tYWluKCk7XG4gICAgICAgIH07XG4gICAgICAgIC8vIGRlZmluZSBjdXN0b20gZG9tYWluKCkgZm9yIGNhdGVnb3JpemVkIGF4aXNcbiAgICAgICAgaWYgKCQkLmlzQ2F0ZWdvcml6ZWQoKSkge1xuICAgICAgICAgICAgc2NhbGUuZG9tYWluID0gZnVuY3Rpb24gKGRvbWFpbikge1xuICAgICAgICAgICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBkb21haW4gPSB0aGlzLm9yZ0RvbWFpbigpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gW2RvbWFpblswXSwgZG9tYWluWzFdICsgMV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIF9zY2FsZS5kb21haW4oZG9tYWluKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gc2NhbGU7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBzY2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N0aW9uIChpZCkgeyByZXR1cm4gaWRzLmluZGV4T2YoaWQpID49IDA7IH0pO1xuICAgICAgICAgICAgICAgIGlmIChpZHNJbkdyb3VwLmxlbmd0aCA9PT0gMCkgeyBjb250aW51ZTsgfVxuICAgICAgICAgICAgICAgIGJhc2VJZCA9IGlkc0luR3JvdXBbMF07XG4gICAgICAgICAgICAgICAgLy8gQ29uc2lkZXIgbmVnYXRpdmUgdmFsdWVzXG4gICAgICAgICAgICAgICAgaWYgKGhhc05lZ2F0aXZlVmFsdWUgJiYgeXNbYmFzZUlkXSkge1xuICAgICAgICAgICAgICAgICAgICB5c1tiYXNlSWRdLmZvckVhY2goZnVuY3Rpb24gKHYsIGkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHlzW2Jhc2VJZF1baV0gPSB2IDwgMCA/IHYgOiAwO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gQ29tcHV0ZSBtaW5cbiAgICAgICAgICAgICAgICBmb3IgKGsgPSAxOyBrIDwgaWRzSW5Hcm91cC5sZW5ndGg7IGsrKykge1xuICAgICAgICAgICAgICAgICAgICBpZCA9IGlkc0luR3JvdXBba107XG4gICAgICAgICAgICAgICAgICAgIGlmICghIHlzW2lkXSkgeyBjb250aW51ZTsgfVxuICAgICAgICAgICAgICAgICAgICB5c1tpZF0uZm9yRWFjaChmdW5jdGlvbiAodiwgaSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCQkLmF4aXMuZ2V0SWQoaWQpID09PSAkJC5heGlzLmdldElkKGJhc2VJZCkgJiYgeXNbYmFzZUlkXSAmJiAhKGhhc05lZ2F0aXZlVmFsdWUgJiYgK3YgPiAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHlzW2Jhc2VJZF1baV0gKz0gK3Y7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAg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lciBwb3NpdGl2ZSB2YWx1ZXNcbiAgICAgICAgICAgICAgICBpZiAoaGFzUG9zaXRpdmVWYWx1ZSAmJiB5c1tiYXNlSWRdKSB7XG4gICAgICAgICAgICAgICAgICAgIHlzW2Jhc2VJZF0uZm9yRWFjaChmdW5jdGlvbiAodiwgaSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgeXNbYmFzZUlkXVtpXSA9IHYgPiAwID8gdiA6IDA7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBDb21wdXRlIG1heFxuICAgICAgICAgICAgICAgIGZvciAoayA9IDE7IGsgPCBpZHNJbkdyb3VwLmxlbmd0aDsgaysrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlkID0gaWRzSW5Hcm91cFtrXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEgeXNbaWRdKSB7IGNvbnRpbnVlOyB9XG4gICAgICAgICAgICAgICAgICAgIHlzW2lkXS5mb3JFYWNoKGZ1bmN0aW9uICh2LCBpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoJCQuYXhpcy5nZXRJZChpZCkgPT09ICQkLmF4aXMuZ2V0SWQoYmFzZUlkKSAmJiB5c1tiYXNlSWRdICYmICEoaGFzUG9zaXRpdmVWYWx1ZSAmJiArdiA8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeXNbYmFzZUlkXVtpXSArPSArdjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAkJC5kMy5tYXgoT2JqZWN0LmtleXMoeXMpLm1hcChmdW5jdGlvbiAoa2V5KSB7IHJldHVybiAkJC5kMy5tYXgoeXNba2V5XSk7IH0pKTtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldFlEb21haW4gPSBmdW5jdGlvbiAodGFyZ2V0cywgYXhpc0lkLCB4RG9tYWluKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZyxcbiAgICAgICAgICAgIHRhcmdldHNCeUF4aXNJZCA9IHRhcmdldHMuZmlsdGVyKGZ1bmN0aW9uICh0KSB7IHJldHVybiAkJC5heGlzLmdldElkKHQuaWQpID09PSBheGlzSWQ7IH0pLFxuICAgICAgICAgICAgeVRhcmdldHMgPSB4RG9tYWluID8gJCQuZmlsdGVyQnlYRG9tYWluKHRhcmdldHNCeUF4aXNJZCwgeERvbWFpbikgOiB0YXJnZXRzQnlBeGlzSWQsXG4gICAgICAgICAgICB5TWluID0gYXhpc0lkID09PSAneTInID8gY29uZmlnLmF4aXNfeTJfbWluIDogY29uZmlnLmF4aXNfeV9taW4sXG4gICAgICAgICAgICB5TWF4ID0gYXhpc0lkID09PSAneTInID8gY29uZmlnLmF4aXNfeTJfbWF4IDogY29uZmlnLmF4aXNfeV9tYXgsXG4gICAgICAgICAgICB5RG9tYWluTWluID0gJCQuZ2V0WURvbWFpbk1pbih5VGFyZ2V0cyksXG4gICAgICAgICAgICB5RG9tYWluTWF4ID0gJCQuZ2V0WURvbWFpbk1heCh5VGFyZ2V0cyksXG4gICAgICAgICAgICBkb21haW4sIGRvbWFpbkxlbmd0aCwgcGFkZGluZywgcGFkZGluZ190b3AsIHBhZGRpbmdfYm90dG9tLFxuICAgICAgICAgICAgY2VudGVyID0gYXhpc0lkID09PSAneTInID8gY29uZmlnLmF4aXNfeTJfY2VudGVyIDogY29uZmlnLmF4aXNfeV9jZW50ZXIsXG4gICAgICAgICAgICB5RG9tYWluQWJzLCBsZW5ndGhzLCBkaWZmLCByYXRpbywgaXNBbGxQb3NpdGl2ZSwgaXNBbGxOZWdhdGl2ZSxcbiAgICAgICAgICAgIGlzWmVyb0Jhc2VkID0gKCQkLmhhc1R5cGUoJ2JhcicsIH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gICBpZiAoaXNOYU4oeURvbWFpbk1pbikpIHsgLy8gc2V0IG1pbmltdW0gdG8gemVybyB3aGVuIG5vdCBudW1iZXJcbiAgICAgICAgICAgIHlEb21haW5NaW4gPSAwO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpc05hTih5RG9tYWluTWF4KSkgeyAvLyBzZXQgbWF4aW11bSB0byBoYXZlIHNhbWUgdmFsdWUgYXMgeURvbWFpbk1pblxuICAgICAgICAgICAgeURvbWFpbk1heCA9IHlEb21haW5NaW47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHlEb21haW5NaW4gPT09IHlEb21haW5NYXgpIHtcbiAgICAgICAgICAgIHlEb21haW5NaW4gPCAwID8geURvbWFpbk1heCA9IDAgOiB5RG9tYWluTWluID0gMDtcbiAgICAgICAgfVxuICAgICAgICBpc0FsbFBvc2l0aXZlID0geURvbWFpbk1pbiA+PSAwICYmIHlEb21haW5NYXggPj0gMDtcbiAgICAgICAgaXNBbGxOZWdhdGl2ZSA9IHlEb21haW5NaW4gPD0gMCAmJiB5RG9tYWluTWF4IDw9IDA7XG5cbiAgICAgICAgLy8gQ2FuY2VsIHplcm9iYXNlZCBpZiBheGlzXypfbWluIC8gYXhpc18qX21heCBzcGVjaWZpZWRcbiAgICAgICAgaWYgKChpc1ZhbHVlKHlNaW4pICYmIGlzQWxsUG9zaXRpdmUpIHx8IChpc1ZhbHVlKHlNYXgpICYmIGlzQWxsTmVnYXRpdmUpKSB7XG4gICAgICAgICAgICBpc1plcm9CYXNlZCA9IGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gQmFyL0FyZWEgY2hhcnQgc2hvdWxkIGJlIDAtYmFzZWQgaWYgYWxsIHBvc2l0aXZlfG5lZ2F0aXZlXG4gICAgICAgIGlmIChpc1plcm9CYXNlZCkge1xuICAgICAgICAgICAgaWYgKGlzQWxsUG9zaXRpdmUpIHsgeURvbWFpbk1pbiA9IDA7IH1cbiAgICAgICAgICAgIGlmIChpc0FsbE5lZ2F0aXZlKSB7IHlEb21haW5NYXggPSAwOyB9XG4gICAgICAgIH1cblxuICAgICAgICBkb21haW5MZW5ndGggPSBNYXRoLmFicyh5RG9tYWluTWF4IC0geURvbWFpbk1pbik7XG4gICAgICAgIHBhZGRpbmcgPSBwYWRkaW5nX3RvcCA9IHBhZGRpbmdfYm90dG9tID0gZG9tYWluTGVuZ3RoICogMC4xO1xuXG4gICAgICAgIGlmICh0eXBlb2YgY2VudGVyICE9PSAndW5kZWZpbmVkJykge1xuICAgICAgICAgICAgeURvbWFpbkFicyA9IE1hdGgubWF4KE1hdGguYWJzKHlEb21haW5NaW4pLCBNYXRoLmFicyh5RG9tYWluTWF4KSk7XG4gICAgICAgICAgICB5RG9tYWluTWF4ID0gY2VudGVyICsgeURvbWFpbkFicztcbiAgICAgICAgICAgIHlEb21haW5NaW4gPSBjZW50ZXIgLSB5RG9tYWluQWJzO1xuICAgICAgICB9XG4gICAgICAgIC8vIGFkZCBwYWRkaW5nIGZvciBkYXRhIGxhYmVsXG4gICAgICAgIGlmIChzaG93SG9yaXpvbnRhbERhdGFMYWJlbCkge1xuICAgICAgICAgICAgbGVuZ3RocyA9ICQkLmdldERhdGFMYWJlbExlbmd0aCh5RG9tYWluTWluLCB5RG9tYWluTWF4LCAnd2lkdGgnKTtcbiAgICAgICAgICAgIGRpZmYgPSBkaWZmRG9tYWluKCQkLnkucmFuZ2UoKSk7XG4gICAgICAgICAgICByYXRpbyA9IFtsZW5ndGhzWzBdIC8gZGlmZiwgbGVuZ3Roc1sxXSAvIGRpZmZdO1xuICAgICAgICAgICAgcGFkZGluZ190b3AgKz0gZG9tYWluTGVuZ3RoICogKHJhdGlvWzFdIC8gKDEgLSByYXRpb1swXSAtIHJhdGlvWzFdKSk7XG4gICAgICAgICAgICBwYWRkaW5nX2JvdHRvbSArPSBkb21haW5MZW5ndGggKiAocmF0aW9bMF0gLyAoMSAtIHJhdGlvWzBdIC0gcmF0aW9bMV0pKTtcbiAgICAgICAgfS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mltKSB7ICQkLnguZG9tYWluKCQkLnRyaW1YRG9tYWluKCQkLngub3JnRG9tYWluKCkpKTsgfVxuXG4gICAgICAgIHJldHVybiAkJC54LmRvbWFpbigpO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4udHJpbVhEb21haW4gPSBmdW5jdGlvbiAoZG9tYWluKSB7XG4gICAgICAgIHZhciB6b29tRG9tYWluID0gdGhpcy5nZXRab29tRG9tYWluKCksXG4gICAgICAgICAgICBtaW4gPSB6b29tRG9tYWluWzBdLCBtYXggPSB6b29tRG9tYWluWzFdO1xuICAgICAgICBpZiAoZG9tYWluWzBdIDw9IG1pbikge1xuICAgICAgICAgICAgZG9tYWluWzFdID0gK2RvbWFpblsxXSArIChtaW4gLSBkb21haW5bMF0pO1xuICAgICAgICAgICAgZG9tYWluWzBdID0gbWluO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtYXggPD0gZG9tYWluWzFdKSB7XG4gICAgICAgICAgICBkb21haW5bMF0gPSArZG9tYWluWzBdIC0gKGRvbWFpblsxXSAtIG1heCk7XG4gICAgICAgICAgICBkb21haW5bMV0gPSBtYXg7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGRvbWFpbjtcbiAgICB9O1xuXG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uaXNYID0gZnVuY3Rpb24gKGtleSkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWc7XG4gICAgICAgIHJldHVybiAoY29uZmlnLmRhdGFfeCAmJiBrZXkgPT09IGNvbmZpZy5kYXRhX3gpIHx8IChub3RFbXB0eShjb25maWcuZGF0YV94cykgJiYgaGFzVmFsdWUoY29uZmlnLmRhdGFfeHMsIGtleSkpO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uaXNOb3RYID0gZnVuY3Rpb24gKGtleSkge1xuICAgICAgICByZXR1cm4gIXRoaXMuaXNYKGtleSk7XG4gICA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gIHJldHVybiB4O1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uY2xvbmVUYXJnZXQgPSBmdW5jdGlvbiAodGFyZ2V0KSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBpZCA6IHRhcmdldC5pZCxcbiAgICAgICAgICAgIGlkX29yZyA6IHRhcmdldC5pZF9vcmcsXG4gICAgICAgICAgICB2YWx1ZXMgOiB0YXJnZXQudmFsdWVzLm1hcChmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB7eDogZC54LCB2YWx1ZTogZC52YWx1ZSwgaWQ6IGQuaWR9O1xuICAgICAgICAgICAgfSlcbiAgICAgICAgfTtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnVwZGF0ZVhzID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzO1xuICAgICAgICBpZiAoJCQuZGF0YS50YXJnZXRzLmxlbmd0aCkge1xuICAgICAgICAgICAgJCQueHMgPSBbXTtcbiAgICAgICAgICAgICQkLmRhdGEudGFyZ2V0c1swXS52YWx1ZXMuZm9yRWFjaChmdW5jdGlvbiAodikge1xuICAgICAgICAgICAgICAgICQkLnhzW3YuaW5kZXhdID0gdi54O1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldFByZXZYID0gZnVuY3Rpb24gKGkpIHtcbiAgICAgICAgdmFyIHggPSB0aGlzLnhzW2kgLSAxXTtcbiAgICAgICAgcmV0dXJuIHR5cGVvZiB4ICE9PSAndW5kZWZpbmVkJyA/IHggOiBudWxsO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0TmV4dFggPSBmdW5jdGlvbiAoaSkge1xuICAgICAgICB2YXIgeCA9IHRoaXMueHNbaSArIDFdO1xuICAgICAgICByZXR1cm4gdHlwZW9mIHggIT09ICd1bmRlZmluZWQnID8geCA6IG51bGw7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRNYXhEYXRhQ291bnQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXM7XG4gICAgICAgIHJldHVybiAkJC5kMy5tYXgoJCQuZGF0YS50YXJnZXRzLCBmdW5jdGlvbiAodCkgeyByZXR1cm4gdC52YWx1ZXMubGVuZ3RoOyB9KTtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldE1heERhdGFDb3VudFRhcmdldCA9IGZ1bmN0aW9uICh0YXJnZXRzKSB7XG4gICAgICAgIHZhciBsZW5ndGggPSB0YXJnZXRzLmxlbmd0aCwgbWF4ID0gMCwgbWF4VGFyZ2V0O1xuICAgICAgICBpZiAobGVuZ3RoID4gMSkge1xuICAgICAgICAgICAgdGFyZ2V0cy5mb3JFYWNoKGZ1bmN0aW9uICh0KSB7XG4gICAgICAgICAgICAgICAgaWYgKHQudmFsdWVzLmxlbmd0aCA+IG1heCkge1xuICAgICAgICAgICAgICAgICAgICBtYXhUYXJnZXQgPSB0O1xuICAgICAgICAgICAgICAgICAgICBtYXggPSB0LnZhbHVlcy5sZW5ndGg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBtYXhUYXJnZXQgPSBsZW5ndGggPyB0YXJnZXRzWzBdIDogbnVsbDtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWF4VGFyZ2V0O1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0RWRnZVggPSBmdW5jdGlvbiAodGFyZ2V0cykge1xuICAgICAgICB2YXIgJCQgPSB0aGlzO1xuICAgICAgICByZXR1cm4gIXRhcmdldHMubGVuZ3RoID8gWzAsIDBdIDogW1xuICAgICAgICAgICAgJCQuZDMubWluKHRhcmdld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ZSh2LmlkKTsgfSkuZm9yRWFjaChmdW5jdGlvbiAodikge1xuICAgICAgICAgICAgdmFyIHNoYXBlID0gJCQubWFpbi5zZWxlY3QoJy4nICsgQ0xBU1MuYmFycyArICQkLmdldFRhcmdldFNlbGVjdG9yU3VmZml4KHYuaWQpICsgJyAuJyArIENMQVNTLmJhciArICctJyArIHYuaW5kZXgpLm5vZGUoKTtcbiAgICAgICAgICAgIGlmICghY2xvc2VzdCAmJiAkJC5pc1dpdGhpbkJhcihzaGFwZSkpIHtcbiAgICAgICAgICAgICAgICBjbG9zZXN0ID0gdjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgLy8gZmluZCBjbG9zZXN0IHBvaW50IGZyb20gbm9uLWJhclxuICAgICAgICB2YWx1ZXMuZmlsdGVyKGZ1bmN0aW9uICh2KSB7IHJldHVybiB2ICYmICEkJC5pc0JhclR5cGUodi5pZCk7IH0pLmZvckVhY2goZnVuY3Rpb24gKHYpIHtcbiAgICAgICAgICAgIHZhciBkID0gJCQuZGlzdCh2LCBwb3MpO1xuICAgICAgICAgICAgaWYgKGQgPCBtaW5EaXN0KSB7XG4gICAgICAgICAgICAgICAgbWluRGlzdCA9IGQ7XG4gICAgICAgICAgICAgICAgY2xvc2VzdCA9IHY7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBjbG9zZXN0O1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZGlzdCA9IGZ1bmN0aW9uIChkYXRhLCBwb3MpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLFxuICAgICAgICAgICAgeEluZGV4ID0gY29uZmlnLmF4aXNfcm90YXRlZCA/IDEgOiAwLFxuICAgICAgICAgICAgeUluZGV4ID0gY29uZmlnLmF4aXNfcm90YXRlZCA/IDAgOiAxLFxuICAgICAgICAgICAgeSA9ICQkLmNpcmNsZVkoZGF0Y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AgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGVycm9yLnJlc3BvbnNlVVJMICsgJyAnICsgZXJyb3Iuc3RhdHVzICsgJyAoJyArIGVycm9yLnN0YXR1c1RleHQgKyAnKScpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHR5cGUgPT09ICdqc29uJykge1xuICAgICAgICAgICAgICAgIGQgPSAkJC5jb252ZXJ0SnNvblRvRGF0YShKU09OLnBhcnNlKGRhdGEucmVzcG9uc2UpLCBrZXlzKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZSA9PT0gJ3RzdicpIHtcbiAgICAgICAgICAgICAgICBkID0gJCQuY29udmVydFRzdlRvRGF0YShkYXRhLnJlc3BvbnNlKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZCA9ICQkLmNvbnZlcnRDc3ZUb0RhdGEoZGF0YS5yZXNwb25zZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkb25lLmNhbGwoJCQsIGQpO1xuICAgICAgICB9KTtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmNvbnZlcnRYc3ZUb0RhdGEgPSBmdW5jdGlvbiAoeHN2LCBwYXJzZXIpIHtcbiAgICAgICAgdmFyIHJvd3MgPSBwYXJzZXIucGFyc2VSb3dzKHhzdiksIGQ7XG4gICAgICAgIGlmIChyb3dzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgZCA9IFt7fV07XG4gICAgICAgICAgICByb3dzWzBdLmZvckVhY2goZnVuY3Rpb24gKGlkKSB7XG4gICAgICAgICAgICAgICAgZFswXVtpZF0gPSBudWxsO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBkID0gcGFyc2VyLnBhcnNlKHhzdik7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGQ7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5jb252ZXJ0Q3N2VG9EYXRhID0gZnVuY3Rpb24gKGNzdikge1xuICAgICAgICByZXR1cm4gdGhpcy5jb252ZXJ0WHN2VG9EYXRhKGNzdiwgdGhpcy5kMy5jc3YpO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uY29udmVydFRzdlRvRGF0YSA9IGZ1bmN0aW9uICh0c3YpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuY29udmVydFhzdlRvRGF0YSh0c3YsIHRoaXMuZDMudHN2KTtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmNvbnZlcnRKc29uVG9EYXRhID0gZnVuY3Rpb24gKGpzb24sIGtleXMpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcyxcbiAgICAgICAgICAgIG5ld19yb3dzID0gW10sIHRhcmdldEtleXMsIGRhdGE7XG4gICAgICAgIGlmIChrZXlzKSB7IC8vIHdoZW4ga2V5cyBzcGVjaWZpZWQsIGpzb24gd291bGQgYmUgYW4gYXJyYXkgdGhhdCBpbmNsdWRlcyBvYmplY3RzXG4gICAgICAgICAgICBpZiAoa2V5cy54KSB7XG4gICAgICAgICAgICAgICAgdGFyZ2V0S2V5cyA9IGtleXMudmFsdWUuY29uY2F0KGtleXMueCk7XG4gICAgICAgICAgICAgICAgJCQuY29uZmlnLmRhdGFfeCA9IGtleXMueDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGFyZ2V0S2V5cyA9IGtleXMudmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBuZXdfcm93cy5wdXNoKHRhcmdldEtleXMpO1xuICAgICAgICAgICAganNvbi5mb3JFYWNoKGZ1bmN0aW9uIChvKSB7XG4gICAgICAgICAgICAgICAgdmFyIG5ld19yb3cgPSBbXTtcbiAgICAgICAgICAgICAgICB0YXJnZXRLZXlzLmZvckVhY2goZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBjb252ZXJ0IHVuZGVmaW5lZCB0byBudWxsIGJlY2F1c2UgdW5kZWZpbmVkIGRhdGEgd2lsbCBiZSByZW1vdmVkIGluIGNvbnZlcnREYXRhVG9UYXJnZXRzKClcbiAgICAgICAgICAgICAgICAgICAgdmFyIHYgPSAkJC5maW5kVmFsdWVJbkpzb24obywga2V5KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzVW5kZWZpbmVkKHYpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2ID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBuZXdfcm93LnB1c2godik7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgbmV3X3Jvd3MucHVzaChuZXdfcm93KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgZGF0YSA9ICQkLmNvbnZlcnRSb3dzVG9EYXRhKG5ld19yb3dzKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIE9iamVjdC5rZXlzKGpzb24pLmZvckVhY2goZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgICAgIG5ld19yb3dzLnB1c2goW2tleV0uY29uY2F0KGpzb25ba2V5XSkpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBkYXRhID0gJCQuY29udmVydENvbHVtbnNUb0RhdGEobmV3X3Jvd3MpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBkYXRhO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZmluZFZhbHVlSW5Kc29uID0gZnVuY3Rpb24gKG9iamVjdCwgcGF0aCkge1xuICAgICAgICBwYXRoID0gcGF0aC5yZXBsYWNlKC9cXFsoXFx3KylcXF0vZywgJy4kMScpOyAvLyBjb252ZXJ0IGluZGV4ZXMgdG8gcHJvcGVydGllcyAocmVwbGFjZSBbXSB3aXRoIC4pXG4gICAgICAgIHBhdGggPSBwYXRoLnJlcGxhY2UoL15cXC4vLCAnJyk7ICAgICAgICAgICAvLyBzdHJpcCBhIGxlYWRpbmcgZG90XG4gICAgICAgIHZhciBwYXRoQXJyYXkgPSBwYXRoLnNwbGl0KCcuJyk7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgcGF0aEFycmF5Lmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICB2YXIgayA9IHBhdGhBcnJheVtpXTtcbiAgICAgICAgICAgIGlmIChrIGluIG9iamVjdCkge1xuICAgICAgICAgICAgICAgIG9iamVjdCA9IG9iamVjdFtrXTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvYmplY3Q7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5jb252ZXJ0Um93c1RvRGF0YSA9IGZ1bmN0aW9uIChyb3dzKSB7XG4gICAgICAgIHZhciBrZXlzID0gcm93c1swXSwgbmV3X3JvdyA9IHt9LCBuZXdfcm93cyA9IFtdLCBpLCBqO1xuICAgICAgICBmb3IgKGkgPSAxOyBpIDwgcm93cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgbmV3X3JvdyA9IHt9O1xuICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IHJvd3NbaV0ubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoaXNVbmRlZmluZWQocm93c1tpXVtqXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiU291cmNlIGRhdGEgaXMgbWlzc2luZyBhIGNvbXBvbmVudCBhdCAoXCIgKyBpICsgXCIsXCIgKyBqICsgXCIpIVwiKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbmV3X3Jvd1trZXlzW2pdXSA9IHJvd3NbaV1bal07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBuZXdfcm93cy5wdXNoKG5ld19yb3cpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBuZXdfcm93cztcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmNvbnZlcnRDb2x1bW5zVG9EYXRhID0gZnVuY3Rpb24gKGNvbHVtbnMpIHtcbiAgICAgICAgdmFyIG5ld19yb3dzID0gW10sIGksIGosIGtleTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGNvbHVtbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGtleSA9IGNvbHVtbnNbaV1bMF07XG4gICAgICAgICAgICBmb3IgKGogPSAxOyBqIDwgY29sdW1uc1tpXS5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIGlmIChpc1VuZGVmaW5lZChuZXdfcm93c1tqIC0gMV0pKSB7XG4gICAgICAgICAgICAgICAgICAgIG5ld19yb3dzW2ogLSAxXSA9IHt9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoaXNVbmRlZmluZWQoY29sdW1uc1tpXVtqXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiU291cmNlIGRhdGEgaXMgbWlzc2luZyBhIGNvbXBvbmVudCBhdCAoXCIgKyBpICsgXCIsXCIgKyBqICsgXCIpIVwiKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbmV3X3Jvd3NbaiAtIDFdW2tleV0gPSBjb2x1bW5zW2ldW2pdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBuZXdfcm93cztcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmNvbnZlcnREYXRhVG9UYXJnZXRzID0gZnVuY3Rpb24gKGRhdGEsIGFwcGVuZFhzKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZyxcbiAgICAgICAgICAgIGlkcyA9ICQkLmQzLmtleXMoZGF0YVswXSkuZmlsdGVyKCQkLmlzTm90WCwgJCQpLFxuICAgICAgICAgICAgeHMgPSAkJC5kMy5rZXlzKGRhdGFbMF0pLmZpbHRlcigkJC5pc1gsICQkKSxcbiAgICAgICAgICAgIHRhcmdldHM7XG5cbiAgICAgICAgLy8gc2F2ZSB4IGZvciB1cGRhdGUgZGF0YSBieSBsb2FkIHdoZW4gY3VzdG9tIHggYW5kIGMzLnggQVBJXG4gICAgICAgIGlkcy5mb3JFYWNoKGZ1bmN0aW9uIChpZCkge1xuICAgICAgICAgICAgdmFyIHhLZXkgPSAkJC5nZXRYS2V5KGlkKTtcblxuICAgICAgICAgICAgaWYgKCQkLmlzQ3VzdG9tWCgpIHx8ICQkLmlzVGltZVNlcmllcygpKSB7XG4gICAgICAgICAgICAgICAgLy8gaWYgaW5jbHVkZWQgaW4gaW5wdXQgZGF0YVxuICAgICAgICAgICAgICAgIGlmICh4cy5pbmRleE9mKHhLZXkpID49IDApIHtcbiAgICAgICAgICAgICAgICAgICAgJCQuZGF0YS54c1tpZF0gPSAoYXBwZW5kWHMgJiYgJCQuZGF0YS54c1tpZF0gPyAkJC5kYXRhLnhzW2lkXSA6IFtdKS5jb25jYXQoXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLm1hcChmdW5jdGlvbiAoZCkgeyByZXR1cm4gZFt4S2V5XTsgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKGlzVmFsdWUpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAocmF3WCwgaSkgeyByZXR1cm4gJCQuZ2VuZXJhdGVUYXJnZXRYKHJhd1gsIGlkLCBpKTsgfSlcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gaWYgbm90IGluY2x1ZGVkIGluIGlucHV0IGRhdGEsIGZpbmQgZnJvbSBwcmVsb2FkZWQgZGF0YSBvZiBvdGhlciBpZCdzIHhcbiAgICAgICAgICAgICAgICBlbHNlIGlmIChjb25maWcuZGF0YV94KSB7XG4gICAgICAgICAgICAgICAgICAgICQkLmRhdGEueHNbaWRdID0gJCQuZ2V0T3RoZXJUYXJnZXRYcygpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBpZiBub3QgaW5jbHVkZWQgaW4gaW5wdXQgZGF0YSwgZmluZCBmcm9tIHByZWxvYWRlZCBkYXRhXG4gICAgICAgICAgICAgICAgZWxzZSBpZiAobm90RW1wdHkoY29uZmlnLmRhdGFfeHMpKSB7XG4gICAgICAgICAgICAgICAgICAgICQkLmRhdGEueHNbaWRdID0gJCQuZ2V0WFZhbHVlc09mWEtleSh4S2V5LCAkJC5kYXRhLnRhcmdldHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBNRU1POiBpZiBubyB4IGluY2x1ZGVkLCB1c2Ugc2FtZSB4IG9mIGN1cnJlbnQgd2lsbCBiZSB1c2VkXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICQkLmRhdGEueHNbaWRdID0gZGF0YS5tYXAoZnVuY3Rpb24gKGQsIGkpIHsgcmV0dXJuIGk7IH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuXG4gICAgICAgIC8vIGNoZWNrIHggaXMgZGVmaW5lZFxuICAgICAgICBpZHMuZm9yRWFjaChmdW5jdGlvbiAoaWQpIHtcbiAgICAgICAgICAgIGlmICghJCQuZGF0YS54c1tpZF0pIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ3ggaXMgbm90IGRlZmluZWQgZm9yIGlkID0gXCInICsgaWQgKyAnXCIuJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIC8vIGNvbnZlcnQgdG8gdGFyZ2V0XG4gICAgICAgIHRhcmdldHMgPSBpZHMubWFwKGZ1bmN0aW9uIChpZCwgaW5kZXgpIHtcbiAgICAgICAgICAgIHZhciBjb252ZXJ0ZWRJZCA9IGNvbmZpZy5kYXRhX2lkQ29udmVydGVyKGlkKTtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgaWQ6IGNvbnZlcnRlZElkLFxuICAgICAgICAgICAgICAgIGlkX29yZzogaWQsXG4gICAgICAgICAgICAgICAgdmFsdWVzOiBkYXRhLm1hcChmdW5jdGlvbiAoZCwgaSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgeEtleSA9ICQkLmdldFhLZXkoaWQpLCByYXdYID0gZFt4S2V5XSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlID0gZFtpZF0gIT09IG51bGwgJiYgIWlzTmFOKGRbaWRdKSA/ICtkW2lkXSA6IG51bGwsIHg7XG4gICAgICAgICAgICAgICAgICAgIC8vIHVzZSB4IGFzIGNhdGVnb3JpZXMgaWYgY3VzdG9tIHggYW5kIGNhdGVnb3JpemVkXG4gICAgICAgICAgICAgICAgICAgIGlmICgkJC5pc0N1c3RvbVgoKSAmJiAkJC5pc0NhdGVnb3JpemVkKCkgJiYgaW5kZXggPT09IDAgJiYgIWlzVW5kZWZpbmVkKHJhd1gpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggPT09IDAgJiYgaSA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5heGlzX3hfY2F0ZWdvcmllcyA9IFtdO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgeCA9IGNvbmZpZy5heGlzX3hfY2F0ZWdvcmllcy5pbmRleE9mKHJhd1gpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHggPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeCA9IGNvbmZpZy5heGlzX3hfY2F0ZWdvcmllcy5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmF4aXNfeF9jYXRlZ29yaWVzLnB1c2gocmF3WCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB4ICA9ICQkLmdlbmVyYXRlVGFyZ2V0WChyYXdYLCBpZCwgaSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgLy8gbWFyayBhcyB4ID0gdW5kZWZpbmVkIGlmIHZhbHVlIGlzIHVuZGVmaW5lZCBhbmQgZmlsdGVyIHRvIHJlbW92ZSBhZnRlciBtYXBwZWRcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzVW5kZWZpbmVkKGRbaWRdKSB8fCAkJC5kYXRhLnhzW2lkXS5sZW5ndGggPD0gaSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgeCA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge3g6IHgsIHZhbHVlOiB2YWx1ZSwgaWQ6IGNvbnZlcnRlZElkfTtcbiAgICAgICAgICAgICAgICB9KS5maWx0ZXIoZnVuY3Rpb24gKHYpIHsgcmV0dXJuIGlzRGVmaW5lZCh2LngpOyB9KVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgLy8gZmluaXNoIHRhcmdldHNcbiAgICAgICAgdGFyZ2V0cy5mb3JFYWNoKGZ1bmN0aW9uICh0KSB7XG4gICAgICAgICAgICB2YXIgaTtcbiAgICAgICAgICAgIC8vIHNvcnQgdmFsdWVzIGJ5IGl0cyB4XG4gICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFfeFNvcnQpIHtcbiAgICAgICAgICAgICAgICB0LnZhbHVlcyA9IHQudmFsdWVzLnNvcnQoZnVuY3Rpb24gKHYxLCB2Mikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgeDEgPSB2MS54IHx8IHYxLnggPT09IDAgPyB2MS54IDogSW5maW5pdHksXG4gICAgICAgICAgICAgICAgICAgICAgICB4MiA9IHYyLnggfHwgdjIueCA9PT0gMCA/IHYyLnggOiBJbmZpbml0eTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHgxIC0geDI7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBpbmRleGluZyBlYWNoIHZhbHVlXG4gICAgICAgICAgICBpID0gMDtcbiAgICAgICAgICAgIHQudmFsdWVzLmZvckVhY2goZnVuY3Rpb24gKHYpIHtcbiAgICAgICAgICAgICAgICB2LmluZGV4ID0gaSsrO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAvLyB0aGlzIG5lZWRzIHRvIGJlIHNvcnRlZCBiZWNhdXNlIGl0cyBpbmRleCBhbmQgdmFsdWUuaW5kZXggaXMgaWRlbnRpY2FsXG4gICAgICAgICAgICAkJC5kYXRhLnhzW3QuaWRdLnNvcnQoZnVuY3Rpb24gKHYxLCB2Mikge1xuICAgICAgICAgICAgICAgIHJldHVybiB2MSAtIHYyO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIC8vIGNhY2hlIGluZm9ybWF0aW9uIGFib3V0IHZhbHVlc1xuICAgICAgICAkJC5oYXNOZWdhdGl2ZVZhbHVlID0gJCQuaGFzTmVnYXRpdmVWYWx1ZUluVGFyZ2V0cyh0YXJnZXRzKTtcbiAgICAgICAgJCQuaGFzUG9zaXRpdmVWYWx1ZSA9ICQkLmhhc1Bvc2l0aXZlVmFsdWVJblRhcmdldHModGFyZ2V0cyk7XG5cbiAgICAgICAgLy8gc2V0IHRhcmdldCB0eXBlc1xuICAgICAgICBpZiAoY29uZmlnLmRhdGFfdHlwZSkge1xuICAgICAgICAgICAgJCQuc2V0VGFyZ2V0VHlwZSgkJC5t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CB0eXBlKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIFVwZGF0ZS9BZGQgZGF0YVxuICAgICAgICAgICAgJCQuZGF0YS50YXJnZXRzLmZvckVhY2goZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRhcmdldHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGQuaWQgPT09IHRhcmdldHNbaV0uaWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQudmFsdWVzID0gdGFyZ2V0c1tpXS52YWx1ZXM7XG4gICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXRzLnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAkJC5kYXRhLnRhcmdldHMgPSAkJC5kYXRhLnRhcmdldHMuY29uY2F0KHRhcmdldHMpOyAvLyBhZGQgcmVtYWluZWRcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFNldCB0YXJnZXRzXG4gICAgICAgICQkLnVwZGF0ZVRhcmdldHMoJCQuZGF0YS50YXJnZXRzKTtcblxuICAgICAgICAvLyBSZWRyYXcgd2l0aCBuZXcgdGFyZ2V0c1xuICAgICAgICAkJC5yZWRyYXcoe3dpdGhVcGRhdGVPcmdYRG9tYWluOiB0cnVlLCB3aXRoVXBkYXRlWERvbWFpbjogdHJ1ZSwgd2l0aExlZ2VuZDogdHJ1ZX0pO1xuXG4gICAgICAgIGlmIChhcmdzLmRvbmUpIHsgYXJncy5kb25lKCk7IH1cbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmxvYWRGcm9tQXJncyA9IGZ1bmN0aW9uIChhcmdzKSB7XG4gICAgICAgIHZhciAkJCA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N0aW9uICh0YXJnZXRJZHMsIGRvbmUpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcztcbiAgICAgICAgaWYgKCFkb25lKSB7XG4gICAgICAgICAgICBkb25lID0gZnVuY3Rpb24gKCkge307XG4gICAgICAgIH1cbiAgICAgICAgLy8gZmlsdGVyIGV4aXN0aW5nIHRhcmdldFxuICAgICAgICB0YXJnZXRJZHMgPSB0YXJnZXRJZHMuZmlsdGVyKGZ1bmN0aW9uIChpZCkgeyByZXR1cm4gJCQuaGFzVGFyZ2V0KCQkLmRhdGEudGFyZ2V0cywgaWQpOyB9KTtcbiAgICAgICAgLy8gSWYgbm8gdGFyZ2V0LCBjYWxsIGRvbmUgYW5kIHJldHVyblxuICAgICAgICBpZiAoIXRhcmdldElkcyB8fCB0YXJnZXRJZHMubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICBkb25lKCk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgJCQuc3ZnLnNlbGVjdEFsbCh0YXJnZXRJZHMubWFwKGZ1bmN0aW9uIChpZCkgeyByZXR1cm4gJCQuc2VsZWN0b3JUYXJnZXQoaWQpOyB9KSlcbiAgICAgICAgICAgIC50cmFuc2l0aW9uKClcbiAgICAgICAgICAgIC5zdHlsZSgnb3BhY2l0eScsIDApXG4gICAgICAgICAgICAucmVtb3ZlKClcbiAgICAgICAgICAgIC5jYWxsKCQkLmVuZGFsbCwgZG9uZSk7XG4gICAgICAgIHRhcmdldElkcy5mb3JFYWNoKGZ1bmN0aW9uIChpZCkge1xuICAgICAgICAgICAgLy8gUmVzZXQgZmFkZWluIGZvciBmdXR1cmUgbG9hZFxuICAgICAgICAgICAgJCQud2l0aG91dEZhZGVJbltpZF0gPSBmYWxzZTtcbiAgICAgICAgICAgIC8vIFJlbW92ZSB0YXJnZXQncyBlbGVtZW50c1xuICAgICAgICAgICAgaWYgKCQkLmxlZ2VuZCkge1xuICAgICAgICAgICAgICAgICQkLmxlZ2VuZ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AgICAgICAgICBpZiAocHJldlggPT09IG51bGwgJiYgbmV4dFggPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjb25maWcuYXhpc19yb3RhdGVkID8gJCQuaGVpZ2h0IDogJCQud2lkdGg7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAocHJldlggPT09IG51bGwpIHsgcHJldlggPSAkJC54LmRvbWFpbigpWzBdOyB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChuZXh0WCA9PT0gbnVsbCkgeyBuZXh0WCA9ICQkLnguZG9tYWluKClbMV07IH1cblxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gTWF0aC5tYXgoMCwgKCQkLngobmV4dFgpIC0gJCQueChwcmV2WCkpIC8gMik7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICByZWN0WCA9IGZ1bmN0aW9uIChkKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwcmV2WCA9ICQkLmdldFByZXZYKGQuaW5kZXgpLCBuZXh0WCA9ICQkLmdldE5leHRYKGQuaW5kZXgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1ggPSAkJC5kYXRhLnhzW2QuaWRdW2QuaW5kZXhdO1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIGlmIHRoZXJlIHRoaXMgaXMgYSBzaW5nbGUgZGF0YSBwb2ludCBwb3NpdGlvbiB0aGUgZXZlbnRSZWN0IGF0IDBcbiAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZYID09PSBudWxsICYmIG5leHRYID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmIChwcmV2WCA9PT0gbnVsbCkgeyBwcmV2WCA9ICQkLnguZG9tYWluKClbMF07IH1cblxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gKCQkLngodGhpc1gpICsgJCQueChwcmV2WCkpIC8gMjtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZWN0VyA9ICQkLmdldEV2ZW50UmVjdFdpZHRoKCk7XG4gICAgICAgICAgICAgICAgcmVjdFggPSBmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCQueChkLngpIC0gKHJlY3RXIC8gMik7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHggPSBjb25maWcuYXhpc19yb3RhdGVkID8gMCA6IHJlY3RYO1xuICAgICAgICAgICAgeSA9IGNvbmZpZy5heGlzX3JvdGF0ZWQgPyByZWN0WCA6IDA7XG4gICAgICAgICAgICB3ID0gY29uZmlnLmF4aXNfcm90YXRlZCA/ICQkLndpZHRoIDogcmVjdFc7XG4gICAgICAgICAgICBoID0gY29uZmlnLmF4aXNfcm90YXRlZCA/IHJlY3RXIDogJCQuaGVpZ2h0O1xuICAgICAgICB9XG5cbiAgICAgICAgZXZlbnRSZWN0VXBkYXRlXG4gICAgICAgICAgICAuYXR0cignY2xhc3MnLCAkJC5jbGFzc0V2ZW50LmJpbmQoJCQpKVxuICAgICAgICAgICAgLmF0dHIoXCJ4XCIsIHgpXG4gICAgICAgICAgICAuYXR0cihcInlcIiwgeSlcbiAgICAgICAgICAgIC5hdHRyKFwid2lkdGhcIiwgdylcbiAgICAgICAgICAgIC5hdHRyKFwiaGVpZ2h0XCIsIGgpO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2VuZXJhdGVFdmVudFJlY3RzRm9yU2luZ2xlWCA9IGZ1bmN0aW9uIChldmVudFJlY3RFbnRlcikge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBkMyA9ICQkLmQzLCBjb25maWcgPSAkJC5jb25maWc7XG4gICAgICAgIGV2ZW50UmVjdEVudGVyLmFwcG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XG4gICAgICAgICAgICAub24oJ21vdXNlb3V0JywgZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICB2YXIgaW5kZXggPSBkLmluZGV4O1xuICAgICAgICAgICAgICAgIGlmICghJCQuY29uZmlnKSB7IHJldHVybjsgfSAvLyBjaGFydCBpcyBkZXN0cm95ZWRcbiAgICAgICAgICAgICAgICBpZiAoJCQuaGFzQXJjVHlwZSgpKSB7IHJldHVybjsgfVxuICAgICAgICAgICAgICAgICQkLmhpZGVYR3JpZEZvY3VzKCk7XG4gICAgICAgICAgICAgICAgJCQuaGlkZVRvb2x0aXAoKTtcbiAgICAgICAgICAgICAgICAvLyBVbmRvIGV4cGFuZGVkIHNoYXBlc1xuICAgICAgICAgICAgICAgICQkLnVuZXhwYW5kQ2lyY2xlcygpO1xuICAgICAgICAgICAgICAgICQkLnVuZXhwYW5kQmFycygpO1xuICAgICAgICAgICAgICAgIC8vIENhbGwgZXZlbnQgaGFuZGxlclxuICAgICAgICAgICAgICAgICQkLm1haW4uc2VsZWN0QWxsKCcuJyArIENMQVNTLnNoYXBlICsgJy0nICsgaW5kZXgpLmVhY2goZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFfb25tb3VzZW91dC5jYWxsKCQkLmFwaSwgZCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLm9uKCdtb3VzZW1vdmUnLCBmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgIHZhciBzZWxlY3RlZERhdGEsIGluZGV4ID0gZC5pbmRleCxcbiAgICAgICAgICAgICAgICAgICAgZXZlbnRSZWN0ID0gJCQuc3ZnLnNlbGVjdCgnLicgKyBDTEFTUy5ldmVudFJlY3QgKyAnLScgKyBpbmRleCk7XG5cbiAgICAgICAgICAgICAgICBpZiAoJCQuZHJhZ2dpbmcgfHwgJCQuZmxvd2luZykgeyByZXR1cm47IH0gLy8gZG8gbm90aGluZyB3aGlsZSBkcmFnZ2luZy9mbG93aW5nXG4gICAgICAgICAgICAgICAgaWYgKCQkLmhhc0FyY1R5cGUoKSkgeyByZXR1cm47IH1cblxuICAgICAgICAgICAgICAgIGlmICgkJC5pc1N0ZXBUeXBlKGQpICYmICQkLmNvbmZpZy5saW5lX3N0ZXBfdHlwZSA9PT0gJ3N0ZXAtYWZ0ZXInICYmIGQzLm1vdXNlKHRoaXMpWzBdIDwgJCQueCgkJC5nZXRYVmFsdWUoZC5pZCwgaW5kZXgpKSkge1xuICAgICAgICAgICAgICAgICAgICBpbmRleCAtPSAxO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIFNob3cgdG9vbHRpcFxuICAgICAgICAgICAgICAgIHNlbGVjdGVkRGF0YSA9ICQkLmZpbHRlclRhcmdldHNUb1Nob3coJCQuZGF0YS50YXJnZXRzKS5tYXAoZnVuY3Rpb24gKHQpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQkLmFkZE5hbWUoJCQuZ2V0VmFsdWVPbkluZGV4KHQudmFsdWVzLCBpbmRleCkpO1xuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgaWYgKGNvbmZpZy50b29sdGlwX2dyb3VwZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgJCQuc2hvd1Rvb2x0aXAoc2VsZWN0ZWREYXRhLCB0aGlzKTtcbiAgICAgICAgICAgICAgICAgICAgJCQuc2hvd1hHcmlkRm9jdXMoc2VsZWN0ZWREYXRhKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLnRvb2x0aXBfZ3JvdXBlZCAmJiAoIWNvbmZpZy5kYXRhX3NlbGVjdGlvbl9lbmFibGVkIHx8IGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9ncm91cGVkKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgJCQubWFpbi5zZWxlY3RBbGwoJy4nICsgQ0xBU1Muc2hhcGUgKyAnLScgKyBpbmRleClcbiAgICAgICAgICAgICAgICAgICAgLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZDMuc2VsZWN0KHRoaXMpLmNsYXNzZWQoQ0xBU1MuRVhQQU5ERUQsIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9lbmFibGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZlbnRSZWN0LnN0eWxlKCdjdXJzb3InLCBjb25maWcuZGF0YV9zZWxlY3Rpb25fZ3JvdXBlZCA/ICdwb2ludGVyJyA6IG51bGwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFjb25maWcudG9vbHRpcF9ncm91cGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQuaGlkZVhHcmlkRm9jdXMoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJC5oaWRlVG9vbHRpcCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghY29uZmlnLmRhdGFfc2VsZWN0aW9uX2dyb3VwZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQudW5leHBhbmRDaXJjbGVzKGluZGV4KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQudW5leHBhbmRCYXJzKGluZGV4KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkJC5pc1dpdGhpblNoYXBlKHRoaXMsIGQpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9lbmFibGVkICYmIChjb25maWcuZGF0YV9zZWxlY3Rpb25fZ3JvdXBlZCB8fCBjb25maWcuZGF0YV9zZWxlY3Rpb25faXNzZWxlY3RhYmxlKGQpKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50UmVjdC5zdHlsZSgnY3Vyc29yJywgJ3BvaW50ZXInKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghY29uZmlnLnRvb2x0aXBfZ3JvdXBlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQkLnNob3dUb29sdGlwKFtkXSwgdGhpcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQuc2hvd1hHcmlkRm9jdXMoW2RdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLnBvaW50X2ZvY3VzX2V4cGFuZF9lbmFibGVkKSB7ICQkLmV4cGFuZENpcmNsZXMoaW5kZXgsIGQuaWQsIHRydWUpOyB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQuZXhwYW5kQmFycyhpbmRleCwgZC5pZCwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbignY2xpY2snLCBmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgIHZhciBpbmRleCA9IGQuaW5kZXg7XG4gICAgICAgICAgICAgICAgaWYgKCQkLmhhc0FyY1R5cGUoKSB8fCAhJCQudG9nZ2xlU2hhcGUpIHsgcmV0dXJuOyB9XG4gICAgICAgICAgICAgICAgaWYgKCQkLmNhbmNlbENsaWNrKSB7XG4gICAgICAgICAgICAgICAgICAgICQkLmNhbmNlbENsaWNrID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCQkLmlzU3RlcFR5cGUoZCkgJiYgY29uZmlnLmxpbmVfc3RlcF90eXBlID09PSAnc3RlcC1hZnRlcicgJiYgZDMubW91c2UodGhpcylbMF0gPCAkJC54KCQkLmdldFhWYWx1ZShkLmlkLCBpbmRleCkpKSB7XG4gICAgICAgICAgICAgICAgICAgIGluZGV4IC09IDE7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICQkLm1haW4uc2VsZWN0QWxsKCcuJyArIENMQVNTLnNoYXBlICsgJy0nICsgaW5kZXgpLmVhY2goZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhX3NlbGVjdGlvbl9ncm91cGVkIHx8ICQkLmlzV2l0aGluU2hhcGUodGhpcywgZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICQkLnRvZ2dsZVNoYXBlKHRoaXMsIGQsIGluZGV4KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICQkLmNvbmZpZy5kYXRhX29uY2xpY2suY2FsbCgkJC5hcGksIGQsIHRoaXMpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmNhbGwoXG4gICAgICAgICAgICAgICAgY29uZmlnLmRhdGFfc2VsZWN0aW9uX2RyYWdnYWJsZSAmJiAkJC5kcmFnID8gKFxuICAgICAgICAgICAgICAgICAgICBkMy5iZWhhdmlvci5kcmFnKCkub3JpZ2luKE9iamVjdClcbiAgICAgICAgICAgICAgICAgICAgICAgIC5vbignZHJhZycsIGZ1bmN0aW9uICgpIHsgJCQuZHJhZyhkMy5tb3VzZSh0aGlzKSk7IH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAub24oJ2RyYWdzdGFydCcsIGZ1bmN0aW9uICgpIHsgJCQuZHJhZ3N0YXJ0KGQzLm1vdXNlKHRoaXMpKTsgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgIC5vbignZHJhZ2VuZCcsIGZ1bmN0aW9uICgpIHsgJCQuZHJhZ2VuZCgpOyB9KVxuICAgICAgICAgICAgICAgICkgOiBmdW5jdGlvbiAoKSB7fVxuICAgICAgICAgICAgKTtcbiAgICB9O1xuXG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2VuZXJhdGVFdmVudFJlY3RzRm9yTXVsdGlwbGVYcyA9IGZ1bmN0aW9uIChldmVudFJlY3RFbnRlcikge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBkMyA9ICQkLmQzLCBjb25maWcgPSAkJC5jb25maWc7XG5cbiAgICAgICAgZnVuY3Rpb24gbW91c2VvdXQoKSB7XG4gICAgICAgICAgICAkJC5zdmcuc2VsZWN0KCcuJyArIENMQVNTLmV2ZW50UmVjdCkuc3R5bGUoJ2N1cnNvcicsIG51bGwpO1xuICAgICAgICAgICAgJCQuaGlkZVhHcmlkRm9jdXMoKTtcbiAgICAgICAgICAgICQkLmhpZGVUb29sdGlwKCk7XG4gICAgICAgICAgICAkJC51bmV4cGFuZENpcmNsZXMoKTtcbiAgICAgICAgICAgICQkLnVuZXhwYW5kQmFycygpO1xuICAgICAgICB9XG5cbiAgICAgICAgZXZlbnRSZWN0RW50ZXIuYXBwZW5kKCdyZWN0JylcbiAgICAgICAgICAgIC5hdHRyKCd4JywgMClcbiAgICAgICAgICAgIC5hdHRyKCd5JywgMClcbiAgICAgICAgICAgIC5hdHRyKCd3aWR0aCcsICQkLndpZHRoKVxuICAgICAgICAgICAgLmF0dHIoJ2hlaWdodCcsICQkLmhlaWdodClcbiAgICAgICAgICAgIC5hdHRyKCdjbGFzcycsIENMQVNTLmV2ZW50UmVjdClcbiAgICAgICAgICAgIC5vbignbW91c2VvdXQnLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgaWYgKCEkJC5jb25maWcpIHsgcmV0dXJuOyB9IC8vIGNoYXJ0IGlzIGRlc3Ryb3llZFxuICAgICAgICAgICAgICAgIGlmICgkJC5oYXNBcmNUeXBlKCkpIHsgcmV0dXJuOyB9XG4gICAgICAgICAgICAgICAgbW91c2VvdXQoKTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAub24oJ21vdXNlbW92ZScsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICB2YXIgdGFyZ2V0c1RvU2hvdyA9ICQkLmZpbHRlclRhcmdldHNUb1Nob3coJCQuZGF0YS50YXJnZXRzKTtcbiAgICAgICAgICAgICAgICB2YXIgbW91c2UsIGNsb3Nlc3QsIHNhbWVYRGF0YSwgc2VsZWN0ZWREYXRhO1xuXG4gICAgICAgICAgICAgICAgaWYgKCQkLmRyYWdnaW5nKSB7IHJldHVybjsgfSAvLyBkbyBub3RoaW5nIHdoZW4gZHJhZ2dpbmdcbiAgICAgICAgICAgICAgICBpZiAoJCQuaGFzQXJjVHlwZSh0YXJnZXRzVG9TaG93KSkgeyByZXR1cm47IH1cblxuICAgICAgICAgICAgICAgIG1vdXNlID0gZDMubW91c2UodGhpcyk7XG4gICAgICAgICAgICAgICAgY2xvc2VzdCA9ICQkLmZpbmRDbG9zZXN0RnJvbVRhcmdldHModGFyZ2V0c1RvU2hvdywgbW91c2UpO1xuXG4gICAgICAgICAgICAgICAgaWYgKCQkLm1vdXNlb3ZlciAmJiAoIWNsb3Nlc3QgfHwgY2xvc2VzdC5pZCAhPT0gJCQubW91c2VvdmVyLmlkKSkge1xuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YV9vbm1vdXNlb3V0LmNhbGwoJCQuYXBpLCAkJC5tb3VzZW92ZXIpO1xuICAgICAgICAgICAgICAgICAgICAkJC5tb3VzZW92ZXIgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKCEgY2xvc2VzdCkge1xuICAgICAgICAgICAgICAgICAgICBtb3VzZW91dCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKCQkLmlzU2NhdHRlclR5cGUoY2xvc2VzdCkgfHwgIWNvbmZpZy50b29sdGlwX2dyb3VwZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgc2FtZVhEYXRhID0gW2Nsb3Nlc3RdO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHNhbWVYRGF0YSA9ICQkLmZpbHRlckJ5WCh0YXJnZXRzVG9TaG93LCBjbG9zZXN0LngpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIHNob3cgdG9vbHRpcCB3aGVuIGN1cnNvciBpcyBjbG9zZSB0byBzb21lIHBvaW50XG4gICAgICAgICAgICAgICAgc2VsZWN0ZWREYXRhID0gc2FtZVhEYXRhLm1hcChmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCQuYWRkTmFtZShkKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAkJC5zaG93VG9vbHRpcChzZWxlY3RlZERhdGEsIHRoaXMpO1xuXG4gICAgICAgICAgICAgICAgLy8gZXhwYW5kIHBvaW50c1xuICAgICAgICAgICAgICAgIGlmIChjb25maWcucG9pbnRfZm9jdXNfZXhwYW5kX2VuYWJsZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgJCQuZXhwYW5kQ2lyY2xlcyhjbG9zZXN0LmluZGV4LCBjbG9zZXN0LmlkLCB0cnVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgJCQuZXhwYW5kQmFycyhjbG9zZXN0LmluZGV4LCBjbG9zZXN0LmlkLCB0cnVlKTtcblxuICAgICAgICAgICAgICAgIC8vIFNob3cgeGdyaWQgZm9jdXMgbGluZVxuICAgICAgICAgICAgICAgICQkLnNob3dYR3JpZEZvY3VzKHNlbGVjdGVkRGF0YSk7XG5cbiAgICAgICAgICAgICAgICAvLyBTaG93IGN1cnNvciBhcyBwb2ludGVyIGlmIHBvaW50IGlzIGNsb3NlIHRvIG1vdXNlIHBvc2l0aW9uXG4gICAgICAgICAgICAgICAgaWYgKCQkLmlzQmFyVHlwZShjbG9zZXN0LmlkKSB8fCAkJC5kaXN0KGNsb3Nlc3QsIG1vdXNlKSA8IGNvbmZpZy5wb2ludF9zZW5zaXRpdml0eSkge1xuICAgICAgICAgICAgICAgICAgICAkJC5zdmcuc2VsZWN0KCcuJyArIENMQVNTLmV2ZW50UmVjdCkuc3R5bGUoJ2N1cnNvcicsICdwb2ludGVyJyk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghJCQubW91c2VvdmVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YV9vbm1vdXNlb3Zlci5jYWxsKCQkLmFwaSwgY2xvc2VzdCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAkJC5tb3VzZW92ZXIgPSBjbG9zZXN0O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbignY2xpY2snLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgdmFyIHRhcmdldHNUb1Nob3cgPSAkJC5maWx0ZXJUYXJnZXRzVG9TaG93KCQkLmRhdGEudGFyZ2V0cyk7XG4gICAgICAgICAgICAgICAgdmFyIG1vdXNlLCBjbG9zZXN0O1xuICAgICAgICAgICAgICAgIGlmICgkJC5oYXNBcmNUeXBlKHRhcmdldHNUb1Nob3cpKSB7IHJldHVybjsgfVxuXG4gICAgICAgICAgICAgICAgbW91c2UgPSBkMy5tb3VzZSh0aGlzKTtcbiAgICAgICAgICAgICAgICBjbG9zZXN0ID0gJCQuZmluZENsb3Nlc3RGcm9tVGFyZ2V0cyh0YXJnZXRzVG9TaG93LCBtb3VzZSk7XG4gICAgICAgICAgICAgICAgaWYgKCEgY2xvc2VzdCkgeyByZXR1cm47IH1cbiAgICAgICAgICAgICAgICAvLyBzZWxlY3QgaWYgc2VsZWN0aW9uIGVuYWJsZWRcbiAgICAgICAgICAgICAgICBpZiAoJCQuaXNCYXJUeXBlKGNsb3Nlc3QuaWQpIHx8ICQkLmRpc3QoY2xvc2VzdCwgbW91c2UpIDwgY29uZmlnLnBvaW50X3NlbnNpdGl2aXR5KSB7XG4gICAgICAgICAgICAgICAgICAgICQkLm1haW4uc2VsZWN0QWxsKCcuJyArIENMQVNTLnNoYXBlcyArICQkLmdldFRhcmdldFNlbGVjdG9yU3VmZml4KGNsb3Nlc3QuaWQpKS5zZWxlY3RBbGwoJy4nICsgQ0xBU1Muc2hhcGUgKyAnLScgKyBjbG9zZXN0LmluZGV4KS5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YV9zZWxlY3Rpb25fZ3JvdXBlZCB8fCAkJC5pc1dpdGhpblNoYXBlKHRoaXMsIGNsb3Nlc3QpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQudG9nZ2xlU2hhcGUodGhpcywgY2xvc2VzdCwgY2xvc2VzdC5pbmRleCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCQuY29uZmlnLmRhdGFfb25jbGljay5jYWxsKCQkLmFwaSwgY2xvc2VzdCwgdGhpcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAuY2FsbChcbiAgICAgICAgICAgICAgICBjb25maWcuZGF0YV9zZWxlY3Rpb25fZHJhZ2dhYmxlICYmICQkLmRyYWcgPyAoXG4gICAgICAgICAgICAgICAgICAgIGQzLmJlaGF2aW9yLmRyYWcoKS5vcmlnaW4oT2JqZWN0KVxuICAgICAgICAgICAgICAgICAgICAgICAgLm9uKCdkcmFnJywgZnVuY3Rpb24gKCkgeyAkJC5kcmFnKGQzLm1vdXNlKHRoaXMpKTsgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgIC5vbignZHJhZ3N0YXJ0JywgZnVuY3Rpb24gKCkgeyAkJC5kcmFnc3RhcnQoZDMubW91c2UodGhpcykpOyB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgLm9uKCdkcmFnZW5kJywgZnVuY3Rpb24gKCkgeyAkJC5kcmFnZW5kKCk7IH0pXG4gICAgICAgICAgICAgICAgKSA6IGZ1bmN0aW9uICgpIHt9XG4gICAgICAgICAgICApO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZGlzcGF0Y2hFdmVudCA9IGZ1bmN0aW9uICh0eXBlLCBpbmRleCwgbW91c2UpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcyxcbiAgICAgICAgICAgIHNlbGVjdG9yID0gJy4nICsgQ0xBU1MuZXZlbnRSZWN0ICsgKCEkJC5pc011bHRpcGxlWCgpID8gJy0nICsgaW5kZXggOiAnJyksXG4gICAgICAgICAgICBldmVudFJlY3QgPSAkJC5tYWluLnNlbGVjdChzZWxlY3Rvcikubm9kZSgpLFxuICAgICAgICAgICAgYm94ID0gZXZlbnRSZWN0LmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpLFxuICAgICAgICAgICAgeCA9IGJveC5sZWZ0ICsgKG1vdXNlID8gbW91c2VbMF0gOiAwKSxcbiAgICAgICAgICAgIHkgPSBib3gudG9wICsgKG1vdXNlID8gbW91c2VbMV0gOiAwKSxcbiAgICAgICAgICAgIGV2ZW50ID0gZG9jdW1lbnQuY3JlYXRlRXZlbnQoXCJNb3VzZUV2ZW50c1wiKTtcblxuICAgICAgICBldmVudC5pbml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kLmdldEF4aXNXaWR0aEJ5QXhpc0lkKCd5MicpKSArIGxlZ2VuZFdpZHRoT25SaWdodDtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRQYXJlbnRSZWN0VmFsdWUgPSBmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgIHZhciBwYXJlbnQgPSB0aGlzLnNlbGVjdENoYXJ0Lm5vZGUoKSwgdjtcbiAgICAgICAgd2hpbGUgKHBhcmVudCAmJiBwYXJlbnQudGFnTmFtZSAhPT0gJ0JPRFknKSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHYgPSBwYXJlbnQuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KClba2V5XTtcbiAgICAgICAgICAgIH0gY2F0Y2goZSkge1xuICAgICAgICAgICAgICAgIGlmIChrZXkgPT09ICd3aWR0aCcpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gSW4gSUUgaW4gY2VydGFpbiBjYXNlcyBnZXRCb3VuZGluZ0NsaWVudFJlY3RcbiAgICAgICAgICAgICAgICAgICAgLy8gd2lsbCBjYXVzZSBhbiBcInVuc3BlY2lmaWVkIGVycm9yXCJcbiAgICAgICAgICAgICAgICAgICAgdiA9IHBhcmVudC5vZmZzZXRXaWR0aDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodikge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcGFyZW50ID0gcGFyZW50LnBhcmVudE5vZGU7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHY7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRQYXJlbnRXaWR0aCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuZ2V0UGFyZW50UmVjdFZhbHVlKCd3aWR0aCcpO1xuICAgIH07X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InICYmICFjb25maWcuYXhpc195Ml9zaG93KSB7IHJldHVybiAkJC5yb3RhdGVkX3BhZGRpbmdfdG9wOyB9XG4gICAgICAgIC8vIENhbGN1bGF0ZSB4IGF4aXMgaGVpZ2h0IHdoZW4gdGljayByb3RhdGVkXG4gICAgICAgIGlmIChheGlzSWQgPT09ICd4JyAmJiAhY29uZmlnLmF4aXNfcm90YXRlZCAmJiBjb25maWcuYXhpc194X3RpY2tfcm90YXRlKSB7XG4gICAgICAgICAgICBoID0gMzAgKyAkJC5heGlzLmdldE1heFRpY2tXaWR0aChheGlzSWQpICogTWF0aC5jb3MoTWF0aC5QSSAqICg5MCAtIGNvbmZpZy5heGlzX3hfdGlja19yb3RhdGUpIC8gMTgwKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBDYWxjdWxhdGUgeSBheGlzIGhlaWdodCB3aGVuIHRpY2sgcm90YXRlZFxuICAgICAgICBpZiAoYXhpc0lkID09PSAneScgJiYgY29uZmlnLmF4aXNfcm90YXRlZCAmJiBjb25maWcuYXhpc195X3RpY2tfcm90YXRlKSB7XG4gICAgICAgICAgICBoID0gMzAgKyAkJC5heGlzLmdldE1heFRpY2tXaWR0aChheGlzSWQpICogTWF0aC5jb3MoTWF0aC5QSSAqICg5MCAtIGNvbmZpZy5heGlzX3lfdGlja19yb3RhdGUpIC8gMTgwKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gaCArICgkJC5heGlzLmdldExhYmVsUG9zaXRpb25CeUlkKGF4aXNJZCkuaXNJbm5lciA/IDAgOiAxMCkgKyAoYXhpc0lkID09PSAneTInID8gLTEwIDogMCk7XG4gICAgfTtcblxuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldEV2ZW50UmVjdFdpZHRoID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gTWF0aC5tYXgoMCwgdGhpcy54QXhpcy50aWNrSW50ZXJ2YWwoKSk7XG4gICAgfTtcblxuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldFNoYXBlSW5kaWNlcyA9IGZ1bmN0aW9uICh0eXBlRmlsdGVyKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZyxcbiAgICAgICAgICAgIGluZGljZXMgPSB7fSwgaSA9IDAsIGosIGs7XG4gICAgICAgICQkLmZpbHRlclRhcmdldHNUb1Nob3coJCQuZGF0YS50YXJnZXRzLmZpbHRlcih0eXBlRmlsdGVyLCAkJCkpLmZvckVhY2goZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBjb25maWcuZGF0YV9ncm91cHMubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFfZ3JvdXBzW2pdLmluZGV4T2YoZC5pZCkgPCAwKSB7IGNvbnRpbnVlOyB9XG4gICAgICAgICAgICAgICAgZm9yIChrID0gMDsgayA8IGNvbmZpZy5kYXRhX2dyb3Vwc1tqXS5sZW5ndGg7IGsrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFfZ3JvdXBzW2pdW2tdIGluIGluZGljZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGljZXNbZC5pZF0gPSBpbmRpY2VzW2NvbmZpZy5kYXRhX2dyb3Vwc1tqXVtrXV07XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChpc1VuZGVmaW5lZChpbmRpY2VzW2QuaWRdKSkgeyBpbmRpY2VzW2QuaWRdID0gaSsrOyB9XG4gICAgICAgIH0pO1xuICAgICAgICBpbmRpY2VzLl9fbWF4X18gPSBpIC0gMTtcbiAgICAgICAgcmV0dXJuIGluZGljZXM7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRTa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G4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSBqO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChpIGluIHZhbHVlcyAmJiB2YWx1ZXNbaV0udmFsdWUgKiBkLnZhbHVlID49IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9mZnNldCArPSBzY2FsZSh2YWx1ZXNbaV0udmFsdWUpIC0geTA7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiBvZmZzZXQ7XG4gICAgICAgIH07XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5pc1dpdGhpblNoYXBlID0gZnVuY3Rpb24gKHRoYXQsIGQpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcyxcbiAgICAgICAgICAgIHNoYXBlID0gJCQuZDMuc2VsZWN0KHRoYXQpLCBpc1dpdGhpbjtcbiAgICAgICAgaWYgKCEkJC5pc1RhcmdldFRvU2hvdyhkLmlkKSkge1xuICAgICAgICAgICAgaXNXaXRoaW4gPSBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0aGF0Lm5vZGVOYW1lID09PSAnY2lyY2xlJykge1xuICAgICAgICAgICAgaXNXaXRoaW4gPSAkJC5pc1N0ZXBUeXBlKGQpID8gJCQuaXNXaXRoaW5TdGVwKHRoYXQsICQkLmdldFlTY2FsZShkLmlkKShkLnZhbHVlKSkgOiAkJC5pc1dpdGhpbkNpcmNsZSh0aGF0LCAkJC5wb2ludFNlbGVjdFIoZCkgKiAxLjUpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKHRoYXQubm9kZU5hbWUgPT09ICdwYXRoJykge1xuICAgICAgICAgICAgaXNXaXRoaW4gPS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Agc1dpdGhSZWdpb24gPSBmdW5jdGlvbiAoZDAsIGQxLCBqLCBkaWZmKSB7XG4gICAgICAgICAgICAgICAgdmFyIHgwID0gZDAueC5nZXRUaW1lKCksIHhfZGlmZiA9IGQxLnggLSBkMC54LFxuICAgICAgICAgICAgICAgICAgICB4djAgPSBuZXcgRGF0ZSh4MCArIHhfZGlmZiAqIGopLFxuICAgICAgICAgICAgICAgICAgICB4djEgPSBuZXcgRGF0ZSh4MCArIHhfZGlmZiAqIChqICsgZGlmZikpLFxuICAgICAgICAgICAgICAgICAgICBwb2ludHM7XG4gICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5heGlzX3JvdGF0ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgcG9pbnRzID0gW1t5KHlwKGopKSwgeCh4djApXSwgW3koeXAoaiArIGRpZmYpKSwgeCh4djEpXV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcG9pbnRzID0gW1t4KHh2MCksIHkoeXAoaikpXSwgW3goeHYxKSwgeSh5cChqICsgZGlmZikpXV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBnZW5lcmF0ZU0ocG9pbnRzKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBzV2l0aFJlZ2lvbiA9IGZ1bmN0aW9uIChkMCwgZDEsIGosIGRpZmYpIHtcbiAgICAgICAgICAgICAgICB2YXIgcG9pbnRzO1xuICAgICAgICAgICAgICAgIGlmIChjb25maWcuYXhpc19yb3RhdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIHBvaW50cyA9IFtbeSh5cChqKSwgdHJ1ZSksIHgoeHAoaikpXSwgW3koeXAoaiArIGRpZmYpLCB0cnVlKSwgeCh4cChqICsgZGlmZikpXV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcG9pbnRzID0gW1t4KHhwKGopLCB0cnVlKSwgeSh5cChqKSldLCBbeCh4cChqICsgZGlmZiksIHRydWUpLCB5KHlwKGogKyBkaWZmKSldXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIGdlbmVyYXRlTShwb2ludHMpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEdlbmVyYXRlXG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBkLmxlbmd0aDsgaSsrKSB7XG5cbiAgICAgICAgICAgIC8vIERyYXcgYXMgbm9ybWFsXG4gICAgICAgICAgICBpZiAoaXNVbmRlZmluZWQocmVnaW9ucykgfHwgISBpc1dpdGhpblJlZ2lvbnMoZFtpXS54LCByZWdpb25zKSkge1xuICAgICAgICAgICAgICAgIHMgKz0gXCIgXCIgKyB4VmFsdWUoZFtpXSkgKyBcIiBcIiArIHlWYWx1ZShkW2ldKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIERyYXcgd2l0aCByZWdpb24gLy8gVE9ETzogRml4IGZvciBob3Jpem90YWwgY2hhcnRzXG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICB4cCA9ICQkLmdldFNjYWxlKGRbaSAtIDFdLnggKyB4T2Zmc2V0LCBkW2ldLnggKyB4T2Zmc2V0LCAkJC5pc1RpbWVTZXJpZXMoKSk7XG4gICAgICAgICAgICAgICAgeXAgPSAkJC5nZXRTY2FsZShkW2kgLSAxXS52YWx1ZSwgZFtpXS52YWx1ZSk7XG5cbiAgICAgICAgICAgICAgICBkeCA9IHgoZFtpXS54KSAtIHgoZFtpIC0gMV0ueCk7XG4gICAgICAgICAgICAgICAgZHkgPSB5KGRbaV0udmFsdWUpIC0geShkW2kgLSAxXS52YWx1ZSk7XG4gICAgICAgICAgICAgICAgZGQgPSBNYXRoLnNxcnQoTWF0aC5wb3coZHgsIDIpICsgTWF0aC5wb3coZHksIDIpKTtcbiAgICAgICAgICAgICAgICBk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DAsIHBhdGg7XG4gICAgICAgICAgICBpZiAoJCQuaXNBcmVhVHlwZShkKSkge1xuICAgICAgICAgICAgICAgIGlmICgkJC5pc1N0ZXBUeXBlKGQpKSB7IHZhbHVlcyA9ICQkLmNvbnZlcnRWYWx1ZXNUb1N0ZXAodmFsdWVzKTsgfVxuICAgICAgICAgICAgICAgIHBhdGggPSBhcmVhLmludGVycG9sYXRlKCQkLmdldEludGVycG9sYXRlKGQpKSh2YWx1ZXMpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAodmFsdWVzWzBdKSB7XG4gICAgICAgICAgICAgICAgICAgIHgwID0gJCQueCh2YWx1ZXNbMF0ueCk7XG4gICAgICAgICAgICAgICAgICAgIHkwID0gJCQuZ2V0WVNjYWxlKGQuaWQpKHZhbHVlc1swXS52YWx1ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHBhdGggPSBjb25maWcuYXhpc19yb3RhdGVkID8gXCJNIFwiICsgeTAgKyBcIiBcIiArIHgwIDogXCJNIFwiICsgeDAgKyBcIiBcIiArIHkwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHBhdGggPyBwYXRoIDogXCJNIDAgMFwiO1xuICAgICAgICB9O1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZ2V0QXJlYUJhc2VWYWx1ZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZW5lcmF0ZUdldEFyZWFQb2ludHMgPSBmdW5jdGlvbiAoYXJlYUluZGljZXMsIGlzU3ViKSB7IC8vIHBhcnRpYWwgZHVwbGljYXRpb24gb2YgZ2VuZXJhdGVHZXRCYXJQb2ludHNcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLFxuICAgICAgICAgICAgYXJlYVRhcmdld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24gKGQsIGkpIHtcbiAgICAgICAgICAgIC8vIDQgcG9pbnRzIHRoYXQgbWFrZSBhIGJhclxuICAgICAgICAgICAgdmFyIHBvaW50cyA9IGdldFBvaW50cyhkLCBpKTtcblxuICAgICAgICAgICAgLy8gc3dpdGNoIHBvaW50cyBpZiBheGlzIGlzIHJvdGF0ZWQsIG5vdCBhcHBsaWNhYmxlIGZvciBzdWIgY2hhcnRcbiAgICAgICAgICAgIHZhciBpbmRleFggPSBjb25maWcuYXhpc19yb3RhdGVkID8gMSA6IDA7XG4gICAgICAgICAgICB2YXIgaW5kZXhZID0gY29uZmlnLmF4aXNfcm90YXRlZCA/IDAgOiAxO1xuXG4gICAgICAgICAgICB2YXIgcGF0aCA9ICdNICcgKyBwb2ludHNbMF1baW5kZXhYXSArICcsJyArIHBvaW50c1swXVtpbmRleFldICsgJyAnICtcbiAgICAgICAgICAgICAgICAgICAgJ0wnICsgcG9pbnRzWzFdW2luZGV4WF0gKyAnLCcgKyBwb2ludHNbMV1baW5kZXhZXSArICcgJyArXG4gICAgICAgICAgICAgICAgICAgICdMJyArIHBvaW50c1syXVtpbmRleFhdICsgJywnICsgcG9pbnRzWzJdW2luZGV4WV0gKyAnICcgK1xuICAgICAgICAgICAgICAgICAgICAnTCcgKyBwb2ludHNbM11baW5kZXhYXSArICcsJyArIHBvaW50c1szXVtpbmRleFldICsgJyAnICtcbiAgICAgICAgICAgICAgICAgICAgJ3onO1xuXG4gICAgICAgICAgICByZXR1cm4gcGF0aDtcbiAgICAgICAgfTtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdlbmVyYXRlR2V0QmFyUG9pbnRzID0gZnVuY3Rpb24gKGJhckluZGljZXMsIGlzU3ViKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsXG4gICAgICAgICAgICBheGlzID0gaXNTdWIgPyAkJC5zdWJYQXhpcyA6ICQkLnhBeGlzLFxuICAgICAgICAgICAgYmFyVGFyZ2V0c051bSA9I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PT09IG51bGwpIHtcbiAgICAgICAgICAgIGlmICh4UG9zID4gJCQud2lkdGgpIHtcbiAgICAgICAgICAgICAgICB4UG9zID0gJCQud2lkdGggLSBib3gud2lkdGg7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHhQb3MgPCAwKSB7XG4gICAgICAgICAgICAgICAgeFBvcyA9IDQ7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHhQb3M7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZXRZRm9yVGV4dCA9IGZ1bmN0aW9uIChwb2ludHMsIGQsIHRleHRFbGVtZW50KSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsXG4gICAgICAgICAgICBib3ggPSB0ZXh0RWxlbWVudC5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKSxcbiAgICAgICAgICAgIHlQb3M7XG4gICAgICAgIGlmICgkJC5jb25maWcuYXhpc19yb3RhdGVkKSB7XG4gICAgICAgICAgICB5UG9zID0gKHBvaW50c1swXVswXSArIHBvaW50c1syXVswXSArIGJveC5oZWlnaHQgKiAwLjYpIC8gMjtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHlQb3MgPSBwb2ludHNbMl1bMV07XG4gICAgICAgICAgICBpZiAoZC52YWx1ZSA8IDAgIHx8IChkLnZhbHVlID09PSAwICYmICEkJC5oYXNQb3NpdGl2ZVZhbHVlKSkge1xuICAgICAgICAgICAgICAgIHlQb3MgKz0gYm94LmhlaWdodDtcbiAgICAgICAgICAgICAgICBpZiAoJCQuaXNCYXJUeXBlKGQpICYmICQkLmlzU2FmYXJpKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgeVBvcyAtPSAzO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmICghJCQuaXNCYXJUeXBlKGQpICYmICQkLmlzQ2hyb21lKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgeVBvcyArPSAzO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgeVBvcyArPSAkJC5pc0JhclR5cGUoZCkgPyAtMyA6IC02O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIHNob3cgbGFiZWxzIHJlZ2FyZGxlc3Mgb2YgdGhlIGRvbWFpbiBpZiB2YWx1ZSBpcyBudWxsXG4gICAgICAgIGlmIChkLnZhbHVlID09PSBudWxsICYmICEkJC5jb25maWcuYXhpc19yb3RhdGVkKSB7XG4gICAgICAgICAgICBpZiAoeVBvcyA8IGJveC5oZWlnaHQpIHtcbiAgICAgICAgICAgICAgICB5UG9zID0gYm94LmhlaWdodDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoeVBvcyA+IHRoaXMuaGVpZ2h0KSB7XG4gICAgICAgICAgICAgICAgeVBvcyA9IHRoaXMuaGVpZ2h0IC0gNDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4geVBvcztcbiAgICB9O1xuXG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uc2V0VGFyZ2V0VHlwZSA9IGZ1bmN0aW9uICh0YXJnZXRJZHMsIHR5cGUpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnO1xuICAgICAgICAkJC5tYXBUb1RhcmdldElkcyh0YXJnZXRJZHMpLmZvckVhY2goZnVuY3Rpb24gKGlkKSB7XG4gICAgICAgICAgICAkJC53aXRob3V0RmFkZUluW2lkXSA9ICh0eXBlID09PSBjb25maWcuZGF0YV90eXBlc1tpZF0pO1xuICAgICAgICAgICAgY29uZmlnLmRhdGFfdHlwZXNbaWRdID0gdHlwZTtcbiAgICAgICAgfSk7XG4gICAgICAgIGlmICghdGFyZ2V0SWRzKSB7XG4gICAgICAgICAgICBjb25maWcuZGF0YV90eXBlID0gdHlwZTtcbiAgICAgICAgfVxuICAgIH07XG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X2ZuLnVwZGF0ZVhHcmlkID0gZnVuY3Rpb24gKHdpdGhvdXRVcGRhdGUpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLCBkMyA9ICQkLmQzLFxuICAgICAgICAgICAgeGdyaWREYXRhID0gJCQuZ2VuZXJhdGVHcmlkRGF0YShjb25maWcuZ3JpZF94X3R5cGUsICQkLngpLFxuICAgICAgICAgICAgdGlja09mZnNldCA9ICQkLmlzQ2F0ZWdvcml6ZWQoKSA/ICQkLnhBeGlzLnRpY2tPZmZzZXQoKSA6IDA7XG5cbiAgICAgICAgJCQueGdyaWRBdHRyID0gY29uZmlnLmF4aXNfcm90YXRlZCA/IHtcbiAgICAgICAgICAgICd4MSc6IDAsXG4gICAgICAgICAgICAneDInOiAkJC53aWR0aCxcbiAgICAgICAgICAgICd5MSc6IGZ1bmN0aW9uIChkKSB7IHJldHVybiAkJC54KGQpIC0gdGlja09mZnNldDsgfSxcbiAgICAgICAgICAgICd5Mic6IGZ1bmN0aW9uIChkKSB7IHJldHVybiAkJC54KGQpIC0gdGlja09mZnNldDsgfVxuICAgICAgICB9IDoge1xuICAgICAgICAgICAgJ3gxJzogZnVuY3Rpb24gKGQpIHsgcmV0dXJuICQkLngoZCkgKyB0aWNrT2Zmc2V0OyB9LFxuICAgICAgICAgICAgJ3gyJzogZnVuY3Rpb24gKGQpIHsgcmV0dXJuICQkLngoZCkgKyB0aWNrT2Zmc2V0OyB9LFxuICAgICAgICAgICAgJ3kxJzogMCxcbiAgICAgICAgICAgICd5Mic6ICQkLmhlaWdodFxuICAgICAgICB9O1xuXG4gICAgICAgICQkLnhncmlkID0gJCQubWFpbi5zZWxlY3QoJy4nICsgQ0xBU1MueGdyaWRzKS5zZWxlY3RBbGwoJy4nICsgQ0xBU1MueGdyaWQpXG4gICAgICAgICAgICAuZGF0YSh4Z3JpZERhdGEpO1xuICAgICAgICAkJC54Z3JpZC5lbnRlcigpLmFwcGVuZCgnbGluZSc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aWRMaW5lICsgKGRbJ2NsYXNzJ10gPyAnICcgKyBkWydjbGFzcyddIDogJycpOyB9KTtcbiAgICAgICAgeWdyaWRMaW5lLmFwcGVuZCgnbGluZScpXG4gICAgICAgICAgICAuc3R5bGUoXCJvcGFjaXR5XCIsIDApO1xuICAgICAgICB5Z3JpZExpbmUuYXBwZW5kKCd0ZXh0JylcbiAgICAgICAgICAgIC5hdHRyKFwidGV4dC1hbmNob3JcIiwgJCQuZ3JpZFRleHRBbmNob3IpXG4gICAgICAgICAgICAuYXR0cihcInRyYW5zZm9ybVwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gXCJyb3RhdGUoLTkwKVwiIDogXCJcIilcbiAgICAgICAgICAgIC5hdHRyKCdkeCcsICQkLmdyaWRUZXh0RHgpXG4gICAgICAgICAgICAuYXR0cignZHknLCAtNSlcbiAgICAgICAgICAgIC5zdHlsZShcIm9wYWNpdHlcIiwgMCk7XG4gICAgICAgIC8vIHVwZGF0ZVxuICAgICAgICB5diA9ICQkLnl2LmJpbmQoJCQpO1xuICAgICAgICAkJC55Z3JpZExpbmVzLnNlbGVjdCgnbGluZScpXG4gICAgICAgICAgLnRyYW5zaXRpb24oKS5kdXJhdGlvbihkdXJhdGlvbilcbiAgICAgICAgICAgIC5hdHRyKFwieDFcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/IHl2IDogMClcbiAgICAgICAgICAgIC5hdHRyKFwieDJcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/IHl2IDogJCQud2lkdGgpXG4gICAgICAgICAgICAuYXR0cihcInkxXCIsIGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAwIDogeXYpXG4gICAgICAgICAgICAuYXR0cihcInkyXCIsIGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAkJC5oZWlnaHQgOiB5dilcbiAgICAgICAgICAgIC5zdHlsZShcIm9wYWNpdHlcIiwgMSk7XG4gICAgICAgICQkLnlncmlkTGluZXMuc2VsZWN0KCd0ZXh0JylcbiAgICAgICAgICAudHJhbnNpdGlvbigpLmR1cmF0aW9uKGR1cmF0aW9uKVxuICAgICAgICAgICAgLmF0dHIoXCJ4XCIsIGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAkJC54R3JpZFRleHRYLmJpbmQoJCQpIDogJCQueUdyaWRUZXh0WC5iaW5kKCQkKSlcbiAgICAgICAgICAgIC5hdHRyKFwieVwiLCB5dilcbiAgICAgICAgICAgIC50ZXh0KGZ1bmN0aW9uIChkKSB7IHJldHVybiBkLnRleHQ7IH0pXG4gICAgICAgICAgICAuc3R5bGUoXCJvcGFjaXR5XCIsIDEpO1xuICAgICAgICAvLyBleGl0XG4gICAgICAgICQkLnlncmlkTGluZXMuZXhpdCgpLnRyYW5zaXRpb24oKS5kdXJhdGlvbihkdXJhdGlvbilcbiAgICAgICAgICAgIC5zdHlsZShcIm9wYWNpdHlcIiwgMClcbiAgICAgICAgICAgIC5yZW1vdmUoKTtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnJlZHJhd0dyaWQgPSBmdW5jdGlvbiAod2l0aFRyYW5zaXRpb24pIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLCB4diA9ICQkLnh2LmJpbmQoJCQpLFxuICAgICAgICAgICAgbGluZXMgPSAkJC54Z3JpZExpbmVzLnNlbGVjdCgnbGluZScpLFxuICAgICAgICAgICAgdGV4dHMgPSAkJC54Z3JpZExpbmVzLnNlbGVjdCgndGV4dCcpO1xuICAgICAgICByZXR1cm4gW1xuICAgICAgICAgICAgKHdpdGhUcmFuc2l0aW9uID8gbGluZXMudHJhbnNpdGlvbigpIDogbGluZXMpXG4gICAgICAgICAgICAgICAgLmF0dHIoXCJ4MVwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gMCA6IHh2KVxuICAgICAgICAgICAgICAgIC5hdHRyKFwieDJcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/ICQkLndpZHRoIDogeHYpXG4gICAgICAgICAgICAgICAgLmF0dHIoXCJ5MVwiLCBjb25maWcuYXhpc19yb3RhdGVkID8geHYgOiAwKVxuICAgICAgICAgICAgICAgIC5hdHRyKFwieTJcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/IHh2IDogJCQuaGVpZ2h0KVxuICAgICAgICAgICAgICAgIC5zdHlsZShcIm9wYWNpdHlcIiwgMSksXG4gICAgICAgICAgICAod2l0aFRyYW5zaXRpb24gPyB0ZXh0cy50cmFuc2l0aW9uKCkgOiB0ZXh0cylcbiAgICAgICAgICAgICAgICAuYXR0cihcInhcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/ICQkLnlHcmlkVGV4dFguYmluZCgkJCkgOiAkJC54R3JpZFRleHRYLmJpbmQoJCQpKVxuICAgICAgICAgICAgICAgIC5hdHRyKFwieVwiLCB4dilcbiAgICAgICAgICAgICAgICAudGV4dChmdW5jdGlvbiAoZCkgeyByZXR1cm4gZC50ZXh0OyB9KVxuICAgICAgICAgICAgICAgIC5zdHlsZShcIm9wYWNpdHlcIiwgMSlcbiAgICAgICAgXTtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnNob3dYR3JpZEZvY3VzID0gZnVuY3Rpb24gKHNlbGVjdGVkRGF0YSkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWcsXG4gICAgICAgICAgICBkYXRhVG9TaG93ID0gc2VsZWN0ZWREYXRhLmZpbHRlcihmdW5jdGlvbiAoZCkgeyByZXR1cm4gZCAmJiBpc1ZhbHVlKGQudmFsdWUpOyB9KSxcbiAgICAgICAgICAgIGZvY3VzRWwgPSAkJC5tYWluLnNlbGVjdEFsbCgnbGluZS4nICsgQ0xBU1MueGdyaWRGb2N1cyksXG4gICAgICAgICAgICB4eCA9ICQkLnh4LmJpbmQoJCQpO1xuICAgICAgICBpZiAoISBjb25maWcudG9vbHRpcF9zaG93KSB7IHJldHVybjsgfVxuICAgICAgICAv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c19yb3RhdGVkID8gLTEwIDogMClcbiAgICAgICAgICAgIC5hdHRyKFwieTJcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/IC0xMCA6ICQkLmhlaWdodCk7XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5nZW5lcmF0ZUdyaWREYXRhID0gZnVuY3Rpb24gKHR5cGUsIHNjYWxlKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsXG4gICAgICAgICAgICBncmlkRGF0YSA9IFtdLCB4RG9tYWluLCBmaXJzdFllYXIsIGxhc3RZZWFyLCBpLFxuICAgICAgICAgICAgdGlja051bSA9ICQkLm1haW4uc2VsZWN0KFwiLlwiICsgQ0xBU1MuYXhpc1gpLnNlbGVjdEFsbCgnLnRpY2snKS5zaXplKCk7XG4gICAgICAgIGlmICh0eXBlID09PSAneWVhcicpIHtcbiAgICAgICAgICAgIHhEb21haW4gPSAkJC5nZXRYRG9tYWluKCk7XG4gICAgICAgICAgICBmaXJzdFllYXIgPSB4RG9tYWluWzBdLmdldEZ1bGxZZWFyKCk7XG4gICAgICAgICAgICBsYXN0WWVhciA9IHhEb21haW5bMV0uZ2V0RnVsbFllYXIoKTtcbiAgICAgICAgICAgIGZvciAoaSA9IGZpcnN0WWVhcjsgaSA8PSBsYXN0WWVhcjsgaSsrKSB7XG4gICAgICAgICAgICAgICAgZ3JpZERhdGEucHVzaChuZXcgRGF0ZShpICsgJy0wMS0wMSAwMDowMDowMCcpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGdyaWREYXRhID0gc2NhbGUudGlja3MoMTApO1xuICAgICAgICAgICAgaWYgKGdyaWREYXRhLmxlbmd0aCA+IHRpY2tOdW0pIHsgLy8gdXNlIG9ubHkgaW50XG4gICAgICAgICAgICAgICAgZ3JpZERhdGEgPSBncmlkRGF0YS5maWx0ZXIoZnVuY3Rpb24gKGQpIHsgcmV0dXJuIChcIlwiICsgZCkuaW5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aW50ZXItZXZlbnRzXCIsIFwibm9uZVwiKVxuICAgICAgICAgICAgLnN0eWxlKFwiZGlzcGxheVwiLCBcIm5vbmVcIik7XG4gICAgICAgIC8vIFNob3cgdG9vbHRpcCBpZiBuZWVkZWRcbiAgICAgICAgaWYgKGNvbmZpZy50b29sdGlwX2luaXRfc2hvdykge1xuICAgICAgICAgICAgaWYgKCQkLmlzVGltZVNlcmllcygpICYmIGlzU3RyaW5nKGNvbmZpZy50b29sdGlwX2luaXRfeCkpIHtcbiAgICAgICAgICAgICAgICBjb25maWcudG9vbHRpcF9pbml0X3ggPSAkJC5wYXJzZURhdGUoY29uZmlnLnRvb2x0aXBfaW5pdF94KTtcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgJCQuZGF0YS50YXJnZXRzWzBdLnZhbHVlcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKCQkLmRhdGEudGFyZ2V0c1swXS52YWx1ZXNbaV0ueCAtIGNvbmZpZy50b29sdGlwX2luaXRfeCkgPT09IDApIHsgYnJlYWs7IH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uZmlnLnRvb2x0aXBfaW5pdF94ID0gaTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgICQkLnRvb2x0aXAuaHRtbChjb25maWcudG9vbHRpcF9jb250ZW50cy5jYWxsKCQkLCAkJC5kYXRhLnRhcmdldHMubWFwKGZ1bmN0aW9uIChkKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICQkLmFkZE5hbWUoZC52YWx1ZXNbY29uZmlnLnRvb2x0aXBfaW5pdF94XSk7XG4gICAgICAgICAgICB9KSwgJCQuYXhpcy5nZXRYQXhpc1RpY2tGb3JtYXQoKSwgJCQuZ2V0WUZvcm1hdCgkJC5oYXNBcmNUeXBlKCkpLCAkJC5jb2xvcikpO1xuICAgICAgICAgICAgJCQudG9vbHRpcC5zdHlsZShcInRvcFwiLCBjb25maW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AgcmV0dXJuIG9yZGVyQXNjID8gdjEgLSB2MiA6IHYyIC0gdjE7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBpZHMgPSAkJC5vcmRlclRhcmdldHMoJCQuZGF0YS50YXJnZXRzKS5tYXAoZnVuY3Rpb24gKGkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaS5pZDtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgZC5zb3J0KGZ1bmN0aW9uKGEsIGIpIHtcbiAgICAgICAgICAgICAgICB2YXIgdjEgPSBhID8gYS52YWx1ZSA6IG51bGwsIHYyID0gYiA/IGIudmFsdWUgOiBudWxsO1xuICAgICAgICAgICAgICAgIGlmICh2MSA+IDAgJiYgdjIgPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHYxID0gYSA/IGlkcy5pbmRleE9mKGEuaWQpIDogbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgdjIgPSBiID8gaWRzLmluZGV4T2YoYi5pZCkgOiBudWxsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gb3JkZXJBc2MgPyB2MSAtIHYyIDogdjIgLSB2MTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGQubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGlmICghIChkW2ldICYmIChkW2ldLnZhbHVlIHx8IGRbaV0udmFsdWUgPT09IDApKSkgeyBjb250aW51ZTsgfVxuXG4gICAgICAgICAgICBpZiAoISB0ZXh0KSB7XG4gICAgICAgICAgICAgICAgdGl0bGUgPSBzYW5pdGlzZSh0aXRsZUZvcm1hdCA/IHRpdGxlRm9ybWF0KGRbaV0ueCkgOiBkW2ldLngpO1xuICAgICAgICAgICAgICAgIHRleHQgPSBcIjx0YWJsZSBjbGFzcz0nXCIgKyAkJC5DTEFTUy50b29sdGlwICsgXCInPl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dlbmRJbnNldCA/IG1heEhlaWdodCA6IG1heFdpZHRoO1xuXG4gICAgICAgICAgICBpZiAoY29uZmlnLmxlZ2VuZF9lcXVhbGx5KSB7XG4gICAgICAgICAgICAgICAgT2JqZWN0LmtleXMod2lkdGhzKS5mb3JFYWNoKGZ1bmN0aW9uIChpZCkgeyB3aWR0aHNbaWRdID0gbWF4V2lkdGg7IH0pO1xuICAgICAgICAgICAgICAgIE9iamVjdC5rZXlzKGhlaWdodHMpLmZvckVhY2goZnVuY3Rpb24gKGlkKSB7IGhlaWdodHNbaWRdID0gbWF4SGVpZ2h0OyB9KTtcbiAgICAgICAgICAgICAgICBtYXJnaW4gPSAoYXJlYUxlbmd0aCAtIG1heExlbmd0aCAqIHRhcmdldElkcy5sZW5ndGgpIC8gMjtcbiAgICAgICAgICAgICAgICBpZiAobWFyZ2luIDwgcG9zTWluKSB7XG4gICAgICAgICAgICAgICAgICAgIHRvdGFsTGVuZ3RoID0gMDtcbiAgICAgICAgICAgICAgICAgICAgc3RlcCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHRhcmdldElkcy5mb3JFYWNoKGZ1bmN0aW9uIChpZCkgeyB1cGRhdGVWYWx1ZXMoaWQpOyB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZVZhbHVlcyhpZCwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB1cGRhdGVWYWx1ZXMoaWQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCQkLmlzTGVnZW5kSW5zZXQpIHtcbiAgICAgICAgICAgIHN0ZXAgPSBjb25maWcubGVnZW5kX2luc2V0X3N0ZXAgPyBjb25maWcubGVnZW5kX2luc2V0X3N0ZXAgOiB0YXJnZXRJZHMubGVuZ3RoO1xuICAgICAgICAgICAgJC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c29yJywgJ3BvaW50ZXInKVxuICAgICAgICAgICAgLm9uKCdjbGljaycsIGZ1bmN0aW9uIChpZCkge1xuICAgICAgICAgICAgICAgIGlmIChjb25maWcubGVnZW5kX2l0ZW1fb25jbGljaykge1xuICAgICAgICAgICAgICAgICAgICBjb25maWcubGVnZW5kX2l0ZW1fb25jbGljay5jYWxsKCQkLCBpZCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCQkLmQzLmV2ZW50LmFsdEtleSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgJCQuYXBpLmhpZGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICQkLmFwaS5zaG93KGlkKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICQkLmFwaS50b2dnbGUoaWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgJCQuaXNUYXJnZXRUb1Nob3coaWQpID8gJCQuYXBpLmZvY3VzKGlkKSA6ICQkLmFwaS5yZXZlcnQoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAub24oJ21vdXNlb3ZlcicsIGZ1bmN0aW9uIChpZCkge1xuICAgICAgICAgICAgICAgIGlmIChjb25maWcubGVnZW5kX2l0ZW1fb25tb3VzZW92ZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmxlZ2VuZF9pdGVtX29ubW91c2VvdmVyLmNhbGwoJCQsIGlkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICQkLmQzLnNlbGVjdCh0aGlzKS5jbGFzc2VkKENMQVNTLmxlZ2VuZEl0ZW1Gb2N1c2VkLCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEkJC50cmFuc2l0aW5nICYmICQkLmlzVGFyZ2V0VG9TaG93KGlkKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgJCQuYXBpLmZvY3VzKGlkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAub24oJ21vdXNlb3V0JywgZnVuY3Rpb24gKGlkKSB7XG4gICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5sZWdlbmRfaXRlbV9vbm1vdXNlb3V0KSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5sZWdlbmRfaXRlbV9vbm1vdXNlb3V0LmNhbGwoJCQsIGlkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICQkLmQzLnNlbGVjdCh0aGlzKS5jbGFzc2VkKENMQVNTLmxlZ2VuZEl0ZW1Gb2N1c2VkLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgICQkLmFwaS5yZXZlcnQoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgbC5hcHBlbmQoJ3RleHQnKVxuICAgICAgICAgICAgLnRleHQoZnVuY3Rpb24gKGlkKSB7IHJldHVybiBpc0RlZmluZWQoY29uZmlnLmRhdGFfbmFtZXNbaWRdKSA/IGNvbmZpZy5kYXRhX25hbWVzW2lkXSA6IGlkOyB9KVxuICAgICAgICAgICAgLmVhY2goZnVuY3Rpb24gKGlkLCBpKSB7IHVwZGF0ZVBvc2l0aW9ucyh0aGlzLCBpZCwgaSk7IH0pXG4gICAgICAgICAgICAuc3R5bGUoXCJwb2ludGVyLWV2ZW50c1wiLCBcIm5vbmVcIilcbiAgICAgICAgICAgIC5hdHRyKCd4JywgJCQuaXNMZWdlbmRSaWdodCB8fCAkJC5pc0xlZ2VuZEluc2V0ID8geEZvckxlZ2VuZFRleHQgOiAtMjAwKVxuICAgICAgICAgICAgLmF0dHIoJ3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25maWcgPSAkJC5jb25maWcsIG1haW4gPSAkJC5tYWluO1xuICAgICAgICAkJC5heGVzLnggPSBtYWluLmFwcGVuZChcImdcIilcbiAgICAgICAgICAgIC5hdHRyKFwiY2xhc3NcIiwgQ0xBU1MuYXhpcyArICcgJyArIENMQVNTLmF4aXNYKVxuICAgICAgICAgICAgLmF0dHIoXCJjbGlwLXBhdGhcIiwgJCQuY2xpcFBhdGhGb3JYQXhpcylcbiAgICAgICAgICAgIC5hdHRyKFwidHJhbnNmb3JtXCIsICQkLmdldFRyYW5zbGF0ZSgneCcpKVxuICAgICAgICAgICAgLnN0eWxlKFwidmlzaWJpbGl0eVwiLCBjb25maWcuYXhpc194X3Nob3cgPyAndmlzaWJsZScgOiAnaGlkZGVuJyk7XG4gICAgICAgICQkLmF4ZXMueC5hcHBlbmQoXCJ0ZXh0XCIpXG4gICAgICAgICAgICAuYXR0cihcImNsYXNzXCIsIENMQVNTLmF4aXNYTGFiZWwpXG4gICAgICAgICAgICAuYXR0cihcInRyYW5zZm9ybVwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gXCJyb3RhdGUoLTkwKVwiIDogXCJcIilcbiAgICAgICAgICAgIC5zdHlsZShcInRleHQtYW5jaG9yXCIsIHRoaXMudGV4dEFuY2hvckZvclhBeGlzTGFiZWwuYmluZCh0aGlzKSk7XG4gICAgICAgICQkLmF4ZXMueSA9IG1haW4uYXBwZW5kKFwiZ1wiKVxuICAgICAgICAgICAgLmF0dHIoXCJjbGFzc1wiLCBDTEFTUy5heGlzICsgJyAnICsgQ0xBU1MuYXhpc1kpXG4gICAgICAgICAgICAuYXR0cihcImNsaXAtcGF0aFwiLCBjb25maWcuYXhpc195X2lubmVyID8gXCJcIiA6ICQkLmNsaXBQYXRoRm9yWUF4aXMpXG4gICAgICAgICAgICAuYXR0cihcInRyYW5zZm9ybVwiLCAkJC5nZXRUcmFuc2xhdGUoJ3knKSlcbiAgICAgICAgICAgIC5zdHlsZShcInZpc2liaWxpdHlcIiw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HJpbmcob3B0aW9uKSkge1xuICAgICAgICAgICAgaWYgKGF4aXNJZCA9PT0gJ3knKSB7XG4gICAgICAgICAgICAgICAgY29uZmlnLmF4aXNfeV9sYWJlbCA9IHRleHQ7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGF4aXNJZCA9PT0gJ3kyJykge1xuICAgICAgICAgICAgICAgIGNvbmZpZy5heGlzX3kyX2xhYmVsID0gdGV4dDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoYXhpc0lkID09PSAneCcpIHtcbiAgICAgICAgICAgICAgICBjb25maWcuYXhpc194X2xhYmVsID0gdGV4dDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChvcHRpb24pIHtcbiAgICAgICAgICAgIG9wdGlvbi50ZXh0ID0gdGV4dDtcbiAgICAgICAgfVxuICAgIH07XG4gICAgQXhpcy5wcm90b3R5cGUuZ2V0TGFiZWxQb3NpdGlvbiA9IGZ1bmN0aW9uIGdldExhYmVsUG9zaXRpb24oYXhpc0lkLCBkZWZhdWx0UG9zaXRpb24pIHtcbiAgICAgICAgdmFyIG9wdGlvbiA9IHRoaXMuZ2V0TGFiZWxPcHRpb25CeUF4aXNJZChheGlzSWQpLFxuICAgICAgICAgICAgcG9zaXRpb24gPSAob3B0aW9uICYmIHR5cGVvZiBvcHRpb24gPT09ICdvYmplY3QnICYmIG9wdGlvbi5wb3NpdGlvbikgPyBvcHRpb24ucG9zaXRpb24gOiBkZWZhdWx0UG9zaXRpb247XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBpc0lubmVyOiBwb3NpdGlvbi5pbmRleE9mKCdpbm5lcicpID49IDAsXG4gICAgICAgICAgICBpc091dGVyOiBwb3NpdGlvbi5pbmRleE9mKCdvdXRlcicpID49IDAsXG4gICAgICAgICAgICBpc0xlZnQ6IHBvc2l0aW9uLmluZGV4T2YoJ2xlZnQnKSA+PSAwLFxuICAgICAgICAgICAgaXNDZW50ZXI6IHBvc2l0aW9uL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KCQkLnRyYW5zaXRpbmcpIHtcbiAgICAgICAgICAgIGludGVydmFsID0gd2luZG93LnNldEludGVydmFsKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBpZiAoISQkLnRyYW5zaXRpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LmNsZWFySW50ZXJ2YWwoaW50ZXJ2YWwpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoJCQubGVnZW5kLnNlbGVjdEFsbCgnLmMzLWxlZ2VuZC1pdGVtLWZvY3VzZWQnKS5zaXplKCkgPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAkJC5leHBhbmRBcmModGFyZ2V0SWRzKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sIDEwKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHRhcmdldElkcyA9ICQkLm1hcFRvVGFyZ2V0SWRzKHRhcmdldElkcyk7XG5cbiAgICAgICAgJCQuc3ZnLnNlbGVjdEFsbCgkJC5zZWxlY3RvclRhcmdldHModGFyZ2V0SWRzLCAnLicgKyBDTEFTUy5jaGFydEFyYykpLmVhY2goZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgIGlmICghICQkLnNob3VsZEV4cGFuZChkLmRhdGEuaWQpKSB7IHJldHVybjsgfVxuICAgICAgICAgICAgJCQuZDMuc2VsZWN0KHRoaXMpLnNlbGVjdEFsbCgncGF0aCcpXG4gICAgICAgICAgICAgICAgLnRyYW5zaXRpb24oKS5kdXJhdGlvbigkJC5leHBhbmREdXJhdGlvbihkLmRhdGEuaWQpKVxuICAgICAgICAgICAgICAgIC5hdHRyKFwiZFwiLCAkJC5zdmdBcmNFeHBhbmRlZClcbiAgICAgICAgICAgICAgICAudHJhbnNpdGlvbigpLmR1cmF0aW9uKCQkLmV4cGFuZER1cmF0aW9uKGQuZGF0YS5pZCkgKiAyKVxuICAgICAgICAgICAgICAgIC5hdHRyKFwiZFwiLCAkJC5zdmdBcmNFeHBhbmRlZFN1YilcbiAgICAgICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoJCQuaXNEb251dFR5cGUoZC5kYXRhKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gY2FsbGJhY2sgaGVyZVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH07XG5cbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi51bmV4cGFuZEFyYyA9IGZ1bmN0aW9uICh0YXJnZXRJZHMpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcztcblxuICAgICAgICBpZiAoJCQudHJhbnNpdGluZykgeyByZXR1cm47IH1cblxuICAgICAgICB0YXJnZXRJZHMgPSAkJC5tYXBUb1RhcmdldElkcyh0YXJnZXRJZHMpO1xuXG4gICAgICAgICQkLnN2Zy5zZWxlY3RBbGwoJCQuc2VsZWN0b3JUYXJnZXRzKHRhcmdldElkcywgJy4nICsgQ0xBU1MuY2hhcnRBcmMpKS5zZWxlY3RBbGwoJ3BhdGgnKVxuICAgICAgICAgICAgLnRyYW5zaXRpb24oKS5kdXJhdGlvbihmdW5jdGlvbihkKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICQkLmV4cGFuZER1cmF0aW9uKGQuZGF0YS5pZCk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmF0dHIoXCJkXCIsICQkLnN2Z0FyYyk7XG4gICAgICAgICQkLnN2Zy5zZWxlY3RBbGwoJy4nICsgQ0xBU1MuYXJjKVxuICAgICAgICAgICAgLnN0eWxlKFwib3BhY2l0eVwiLCAxKTtcbiAgICB9O1xuXG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uZXhwYW5kRHVyYXRpb24gPSBmdW5jdGlvbiAoaWQpIHtcbiAgICAgICAgdmFyICQ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J0aW5nQW5nbGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnQgPSBkO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIG1haW5BcmNcbiAgICAgICAgICAgIC5hdHRyKFwidHJhbnNmb3JtXCIsIGZ1bmN0aW9uIChkKSB7IHJldHVybiAhJCQuaXNHYXVnZVR5cGUoZC5kYXRhKSAmJiB3aXRoVHJhbnNmb3JtID8gXCJzY2FsZSgwKVwiIDogXCJcIjsgfSlcbiAgICAgICAgICAgIC5zdHlsZShcIm9wYWNpdHlcIiwgZnVuY3Rpb24gKGQpIHsgcmV0dXJuIGQgPT09IHRoaXMuX2N1cnJlbnQgPyAwIDogMTsgfSlcbiAgICAgICAgICAgIC5vbignbW91c2VvdmVyJywgY29uZmlnLmludGVyYWN0aW9uX2VuYWJsZWQgPyBmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgIHZhciB1cGRhdGVkLCBhcmNEYXRhO1xuICAgICAgICAgICAgICAgIGlmICgkJC50cmFuc2l0aW5nKSB7IC8vIHNraXAgd2hpbGUgdHJhbnNpdGluZ1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHVwZGF0ZWQgPSAkJC51cGRhdGVBbmdsZShkKTtcbiAgICAgICAgICAgICAgICBpZiAodXBkYXRlZCkge1xuICAgICAgICAgICAgICAgICAgICBhcmNEYXRhID0gJCQuY29udmVydFRvQXJjRGF0YSh1cGRhdGVkKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gdHJhbnNpdGlvbnNcbiAgICAgICAgICAgICAgICAgICAgJCQuZXhwYW5kQXJjKHVwZGF0ZWQuZGF0YS5pZCk7XG4gICAgICAgICAgICAgICAgICAgICQkLmFwaS5mb2N1cyh1cGRhdGVkLmRhdGEuaWQpO1xuICAgICAgICAgICAgICAgICAgICAkJC50b2dnbGVGb2N1c0xlZ2VuZCh1cGRhdGVkLmRhdGEuaWQsIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAkJC5jb25maWcuZGF0YV9vbm1vdXNlb3ZlcihhcmNEYXRhLCB0aGlzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IDogbnVsbClcbiAgICAgICAgICAgIC5vbignbW91c2Vtb3ZlJywgY29uZmlnLmludGVyYWN0aW9uX2VuYWJsZWQgPyBmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgICAgIHZhciB1cGRhdGVkID0gJCQudXBkYXRlQW5nbGUoZCksIGFyY0RhdGEsIHNlbGVjdGVkRGF0YTtcbiAgICAgICAgICAgICAgICBpZiAodXBkYXRlZCkge1xuICAgICAgICAgICAgICAgICAgICBhcmNEYXRhID0gJCQuY29udmVydFRvQXJjRGF0YSh1cGRhdGVkKSxcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWREYXRhID0gW2FyY0RhdGFdO1xuICAgICAgICAgICAgICAgICAgICAkJC5zaG93VG9vbHRpcChzZWxlY3RlZERhdGEsIHRoaXMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gOiBudWxsKVxuICAgICAgICAgICAgLm9uKCdtb3VzZW91dCcsIGNvbmZpZy5pbnRlcmFjdGlvbl9lbmFibGVkID8gZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICB2YXIgdXBkYXRlZCwgYXJjRGF0YTtcbiAgICAgICAgICAgICAgICBpZiAoJCQudHJhbnNpdGluZykgeyAvLyBza2lwIHdoaWxlIHRyYW5zaXRpbmdcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB1cGRhdGVkID0gJCQudXBkYXRlQW5nbGUoZCk7XG4gICAgICAgICAgICAgICAgaWYgKHVwZGF0ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgYXJjRGF0YSA9ICQkLmNvbnZlcnRUb0FyY0RhdGEodXBkYXRlZCk7XG4gICAgICAgICAgICAgICAgICAgIC8vIHRyYW5zaXRpb25zXG4gICAgICAgICAgICAgICAgICAgICQkLnVuZXhwYW5kQXJjKHVwZGF0ZWQuZGF0YS5pZCk7XG4gICAgICAgICAgICAgICAgICAgICQkLmFwaS5yZXZlcnQoKTtcbiAgICAgICAgICAgICAgICAgICAgJCQucmV2ZXJ0TGVnZW5kKCk7XG4gICAgICAgICAgICAgICAgICAgICQkLmhpZGVUb29sdGlwKCk7XG4gICAgICAgICAgICAgICAgICAgICQkLmNvbmZpZy5kYXRhX29ubW91c2VvdXQoYXJjRGF0YSwgdGhpcyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSA6IG51bGwpXG4gICAgICAgICAgICAub24oJ2NsaWNrJywgY29uZmlnLmludGVyYWN0aW9uX2VuYWJsZWQgPyBmdW5jdGlvbiAoZCwgaSkge1xuICAgICAgICAgICAgICAgIHZhciB1cGRhdGVkID0gJCQudXBkYXRlQW5nbGUoZCksIGFyY0RhdGE7XG4gICAgICAgICAgICAgICAgaWYgKHVwZGF0ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgYXJjRGF0YSA9ICQkLmNvbnZlcnRUb0FyY0RhdGEodXBkYXRlZCk7XG4gICAgICAgICAgICAgICAgICAgIGlmICgkJC50b2dnbGVTaGFwZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgJCQudG9nZ2xlU2hhcGUodGhpcywgYXJjRGF0YSwgaSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgJCQuY29uZmlnLmRhdGFfb25jbGljay5jYWxsKCQkLmFwaSwgYXJjRGF0YSwgdGhpcyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSA6IG51bGwpXG4gICAgICAgICAgICAuZWFjaChmdW5jdGlvbiAoKSB7ICQkLnRyYW5zaXRpbmcgPSB0cnVlOyB9KVxuICAgICAgICAgICAgLnRyYW5zaXRpb24oKS5kdXJhdGlvbihkdXJhdGlvbilcbiAgICAgICAgICAgIC5hdHRyVHdlZW4oXCJkXCIsIGZ1bmN0aW9uIChkKSB7XG4gICAgICAgICAgICAgICAgdmFyIHVwZGF0ZWQgPSAkJC51cGRhdGVBbmdsZShkKSwgaW50ZXJwb2xhdGU7XG4gICAgICAgICAgICAgICAgaWYgKCEgdXBkYXRlZCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKCkgeyByZXR1cm4gXCJNIDAgMFwiOyB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICBpZiAodGhpcy5fY3VycmVudCA9PT0gZCkge1xuICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50ID0ge1xuICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRBbmdsZTogTWF0aC5QSSoyLFxuICAgICAgICAgICAgICAgIC8vICAgICAgICAgICAgICAgICAgICAgICAgZW5kQW5nbGU6IE1hdGguUEkqMixcbiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAvLyAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGlzTmFOKHRoaXMuX2N1cnJlbnQuc3RhcnRBbmdsZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudC5zdGFydEFuZ2xlID0gMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGlzTmFOKHRoaXMuX2N1cnJlbnQuZW5kQW5nbGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnQuZW5kQW5nbGUgPSB0aGlzLl9jdXJyZW50LnN0YXJ0QW5nbGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGludGVycG9sYXRlID0gZDMuaW50ZXJwb2xhdGUodGhpcy5fY3VycmVudCwgdXBkYXRlZCk7XG4gICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudCA9IGludGVycG9sYXRlKDApO1xuICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAodCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgaW50ZXJwb2xhdGVkID0gaW50ZXJwb2xhdGUodCk7XG4gICAgICAgICAgICAgICAgICAgIGludGVycG9sYXRlZC5kYXRhID0gZC5kYXRhOyAvLyBkYXRhLmlkIHdpbGwgYmUgdXBkYXRlZCBieSBpbnRlcnBvcmF0b3JcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQkLmdldEFyYyhpbnRlcnBvbGF0ZWQsIHRydWUpO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgLmF0dHIoXCJ0cmFuc2Zvcm1cIiwgd2l0aFRyYW5zZm9ybSA/IFwic2NhbGUoMSlcIiA6IFwiXCIpXG4gICAgICAgICAgICAuc3R5bGUoXCJmaWxsXCIsIGZ1bmN0aW9uIChkKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICQkLmxldmVsQ29sb3IgPyAkJC5sZXZlbENvbG9yKGQuZGF0YS52YWx1ZXNbMF0udmFsdWUpIDogJCQuY29sb3IoZC5kYXRhLmlkKTtcbiAgICAgICAgICAgIH0pIC8vIFdoZXJlIGdhdWdlIHJlYWRpbmcgY29sb3Igd291bGQgcmVjZWl2ZSBjdXN0b21pemF0aW9uLlxuICAgICAgICAgICAgLnN0eWxlKFwib3BhY2l0eVwiLCAxKVxuICAgICAgICAgICAgLmNhbGwoJCQuZW5kYWxsLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgJCQudHJhbnNpdGluZyA9IGZhbHNlO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIG1haW5BcmMuZXhpdCgpLnRyYW5zaXRpb24oKS5kdXJhdGlvbihkdXJhdGlvbkZvckV4aX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VHlwZSgnZ2F1Z2UnKSkge1xuICAgICAgICAgICAgJCQuYXJjcy5zZWxlY3QoJy4nICsgQ0xBU1MuY2hhcnRBcmNzQmFja2dyb3VuZClcbiAgICAgICAgICAgICAgICAuYXR0cihcImRcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgZCA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IFt7dmFsdWU6IGNvbmZpZy5nYXVnZV9tYXh9XSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0QW5nbGU6IGNvbmZpZy5nYXVnZV9zdGFydGluZ0FuZ2xlLFxuICAgICAgICAgICAgICAgICAgICAgICAgZW5kQW5nbGU6IC0xICogY29uZmlnLmdhdWdlX3N0YXJ0aW5nQW5nbGVcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQkLmdldEFyYyhkLCB0cnVlLCB0cnVlKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICQkLmFyY3Muc2VsZWN0KCcuJyArIENMQVNTLmNoYXJ0QXJjc0dhdWdlVW5pdClcbiAgICAgICAgICAgICAgICAuYXR0cihcImR5XCIsIFwiLjc1ZW1cIilcbiAgICAgICAgICAgICAgICAudGV4dChjb25maWcuZ2F1Z2VfbGFiZWxfc2hvdyA/IGNvbmZpZy5nYXVnZV91bml0cyA6ICcnKTtcbiAgICAgICAgICAgICQkLmFyY3Muc2VsZWN0KCcuJyArIENMQVNTLmNoYXJ0QXJjc0dhdWdlTWluKVxuICAgICAgICAgICAgICAgIC5hdHRyKFwiZHhcIiwgLTEgKiAoJCQuaW5uZXJSYWRpdXMgKyAoKCQkLnJhZGl1cyAtICQkLmlubmVyUmFkaXVzKSAvIChjb25maWcuZ2F1Z2VfZnVsbENpcmNsZSA/IDEgOiAyKSkpICsgXCJweFwiKVxuICAgICAgICAgICAgICAgIC5hdHRyKFwiZHlcIiwgXCIxLj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YID0gZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnLFxuICAgICAgICAgICAgeFBvcywgeVNjYWxlID0gZC5heGlzID09PSAneScgPyAkJC55IDogJCQueTI7XG4gICAgICAgIGlmIChkLmF4aXMgPT09ICd5JyB8fCBkLmF4aXMgPT09ICd5MicpIHtcbiAgICAgICAgICAgIHhQb3MgPSBjb25maWcuYXhpc19yb3RhdGVkID8gKCdzdGFydCcgaW4gZCA/IHlTY2FsZShkLnN0YXJ0KSA6IDApIDogMDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHhQb3MgPSBjb25maWcuYXhpc19yb3RhdGVkID8gMCA6ICgnc3RhcnQnIGluIGQgPyAkJC54KCQkLmlzVGltZVNlcmllcygpID8gJCQucGFyc2VEYXRlKGQuc3RhcnQpIDogZC5zdGFydCkgOiAwKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4geFBvcztcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLnJlZ2lvblkgPSBmdW5jdGlvbiAoZCkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCBjb25maWcgPSAkJC5jb25maWcsXG4gICAgICAgICAgICB5UG9zLCB5U2NhbGUgPSBkLmF4aXMgPT09ICd5JyA/ICQkLnkgOiAkJC55MjtcbiAgICAgICAgaWYgKGQuYXhpcyA9PT0gJ3knIHx8IGQuYXhpcyA9PT0gJ3kyJykge1xuICAgICAgICAgICAgeVBvcyA9IGNvbmZpZy5heGlzX3JvdGF0ZWQgPyAwIDogKCdlbmQnIGluIGQgPyB5U2NhbGUoZC5lbmQpIDogMCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB5UG9zID0gY29uZmlnLmF4aXNfcm90YXRlZCA/ICgnc3RhcnQnIGluIGQgPyAkJC54KCQkLmlzVGltZVNlcmllcygpID8gJCQucGFyc2VEYXRlKGQuc3RhcnQpID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ihmdW5jdGlvbiAoZCkgeyByZXR1cm4gY29uZmlnLmRhdGFfc2VsZWN0aW9uX2lzc2VsZWN0YWJsZShkKTsgfSlcbiAgICAgICAgICAgIC5lYWNoKGZ1bmN0aW9uIChkLCBpKSB7XG4gICAgICAgICAgICAgICAgdmFyIHNoYXBlID0gZDMuc2VsZWN0KHRoaXMpLFxuICAgICAgICAgICAgICAgICAgICBpc1NlbGVjdGVkID0gc2hhcGUuY2xhc3NlZChDTEFTUy5TRUxFQ1RFRCksXG4gICAgICAgICAgICAgICAgICAgIGlzSW5jbHVkZWQgPSBzaGFwZS5jbGFzc2VkKENMQVNTLklOQ0xVREVEKSxcbiAgICAgICAgICAgICAgICAgICAgX3gsIF95LCBfdywgX2gsIHRvZ2dsZSwgaXNXaXRoaW4gPSBmYWxzZSwgYm94O1xuICAgICAgICAgICAgICAgIGlmIChzaGFwZS5jbGFzc2VkKENMQVNTLmNpcmNsZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgX3ggPSBzaGFwZS5hdHRyKFwiY3hcIikgKiAxO1xuICAgICAgICAgICAgICAgICAgICBfeSA9IHNoYXBlLmF0dHIoXCJjeVwiKSAqIDE7XG4gICAgICAgICAgICAgICAgICAgIHRvZ2dsZSA9ICQkLnRvZ2dsZVBvaW50O1xuICAgICAgICAgICAgICAgICAgICBpc1dpdGhpbiA9IG1pblggPCBfeCAmJiBfeCA8IG1heFggJiYgbWluWSA8IF95ICYmIF95IDwgbWF4WTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoc2hhcGUuY2xhc3NlZChDTEFTUy5iYXIpKSB7XG4gICAgICAgICAgICAgICAgICAgIGJveCA9IGdldFBhdGhCb3godGhpcyk7XG4gICAgICAgICAgICAgICAgICAgIF94ID0gYm94Lng7XG4gICAgICAgICAgICAgICAgICAgIF95ID0gYm94Lnk7XG4gICAgICAgICAgICAgICAgICAgIF93ID0gYm94LndpZHRoO1xuICAgICAgICAgICAgICAgICAgICBfaCA9IGJveC5oZWlnaHQ7XG4gICAgICAgICAgICAgICAgICAgIHRvZ2dsZSA9ICQkLnRvZ2dsZVBhdGg7XG4gICAgICAgICAgICAgICAgICAgIGlzV2l0aGluID0gIShtYXhYIDwgX3ggfHwgX3ggKyBfdyA8IG1pblgpICYmICEobWF4WSA8IF95IHx8IF95ICsgX2ggPCBtaW5ZKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBsaW5lL2FyZWEgc2VsZWN0aW9uIG5vdCBzdXBwb3J0ZWQgeWV0XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGlzV2l0aGluIF4gaXNJbmNsdWRlZCkge1xuICAgICAgICAgICAgICAgICAgICBzaGFwZS5jbGFzc2VkKENMQVNTLklOQ0xVREVELCAhaXNJbmNsdWRlZCk7XG4gICAgICAgICAgICAgICAgICAgIC8vIFRPRE86IGluY2x1ZGVkL3VuaW5jbHVkZWQgY2FsbGJhY2sgaGVyZVxuICAgICAgICAgICAgICAgICAgICBzaGFwZS5jbGFzc2VkKENMQVNTLlNFTEVDVEVELCAhaXNTZWxlY3RlZCk7XG4gICAgICAgICAgICAgICAgICAgIHRvZ2dsZS5jYWxsKCQkLCAhaXNTZWxlY3RlZCwgc2hhcGUsIGQsIGkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgIH07XG5cbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5kcmFnc3RhcnQgPSBmdW5jdGlvbiAobW91c2UpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgY29uZmlnID0gJCQuY29uZmlnO1xuICAgICAgICBpZiAoJCQuaGFzQXJjVHlwZSgpKSB7IHJldHVybjsgfVxuICAgICAgICBpZiAoISBjb25maWcuZGF0YV9zZWxlY3Rpb25fZW5hYmxlZCkgeyByZXR1cm47IH0gLy8gZG8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ydCA9IGZ1bmN0aW9uICh0YXJnZXRzKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbnRleHQgPSAkJC5jb250ZXh0LCBjb25maWcgPSAkJC5jb25maWcsXG4gICAgICAgICAgICBjb250ZXh0TGluZUVudGVyLCBjb250ZXh0TGluZVVwZGF0ZSwgY29udGV4dEJhckVudGVyLCBjb250ZXh0QmFyVXBkYXRlLFxuICAgICAgICAgICAgY2xhc3NDaGFydEJhciA9ICQkLmNsYXNzQ2hhcnRCYXIuYmluZCgkJCksXG4gICAgICAgICAgICBjbGFzc0JhcnMgPSAkJC5jbGFzc0JhcnMuYmluZCgkJCksXG4gICAgICAgICAgICBjbGFzc0NoYXJ0TGluZSA9ICQkLmNsYXNzQ2hhcnRMaW5lLmJpbmQoJCQpLFxuICAgICAgICAgICAgY2xhc3NMaW5lcyA9ICQkLmNsYXNzTGluZXMuYmluZCgkJCksXG4gICAgICAgICAgICBjbGFzc0FyZWFzID0gJCQuY2xhc3NBcmVhcy5iaW5kKCQkKTtcblxuICAgICAgICBpZiAoY29uZmlnLnN1YmNoYXJ0X3Nob3cpIHtcbiAgICAgICAgICAgIC8vLS0gQmFyIC0tLy9cbiAgICAgICAgICAgIGNvbnRleHRCYXJVcGRhdGUgPSBjb250ZXh0LnNlbGVjdCgnLicgKyBDTEFTUy5jaGFydEJhcnMpLnNlbGVjdEFsbCgnLicgKyBDTEFTUy5jaGFydEJhcilcbiAgICAgICAgICAgICAgICAuZGF0YSh0YXJnZXRzKVxuICAgICAgICAgICAgICAgIC5hdHRyKCdjbGFzcycsIGNsYXNzQ2hhcnRCYXIpO1xuICAgICAgICAgICAgY29udGV4dEJhckVudGVyID0gY29udGV4dEJhclVwZGF0ZS5lbnRlcigpLmFwcGVuZCgnZycpXG4gICAgICAgICAgICAgICAgLnN0eWxlKCdvcGFjaXR5JywgMClcbiAgICAgICAgICAgICAgICAuYXR0cignY2xhc3MnLCBjbGFzc0NoYXJ0QmFyKTtcbiAgICAgICAgICAgIC8vIEJhcnMgZm9yIGVhY2ggZGF0YVxuICAgICAgICAgICAgY29udGV4dEJhckVudGVyLmFwcGVuZCgnZycpXG4gICAgICAgICAgICAgICAgLmF0dHIoXCJjbGFzc1wiLCBjbGFzc0JhcnMpO1xuXG4gICAgICAgICAgICAvLy0tIExpbmUgLS0vL1xuICAgICAgICAgICAgY29udGV4dExpbmVVcGRhdGUgPSBjb250ZXh0LnNlbGVjdCgnLicgKyBDTEFTUy5jaGFydExpbmVzKS5zZWxlY3RBbGwoJy4nICsgQ0xBU1MuY2hhcnRMaW5lKVxuICAgICAgICAgICAgICAgIC5kYXRhKHRhcmdldHMpXG4gICAgICAgICAgICAgICAgLmF0dHIoJ2NsYXNzJywgY2xhc3NDaGFydExpbmUpO1xuICAgICAgICAgICAgY29udGV4dExpbmVFbnRlciA9IGNvbnRleHRMaW5lVXBkYXRlLmVudGVyKCkuYXBwZW5kKCdnJylcbiAgICAgICAgICAgICAgICAuc3R5bGUoJ29wYWNpdHknLCAwKVxuICAgICAgICAgICAgICAgIC5hdHRyKCdjbGFzcycsIGNsYXNzQ2hhcnRMaW5lKTtcbiAgICAgICAgICAgIC8vIExpbmVzIGZvciBlYWNoIGRhdGFcbiAgICAgICAgICAgIGNvbnRleHRMaW5lRW50ZXIuYXBwZW5kKFwiZ1wiKVxuICAgICAgICAgICAgICAgIC5hdHRyKFwiY2xhc3NcIiwgY2xhc3NMaW5lcyk7XG4gICAgICAgICAgICAvLyBBcmVhXG4gICAgICAgICAgICBjb250ZXh0TGluZUVudGVyLmFwcGVuZChcImdcIilcbiAgICAgICAgICAgICAgICAuYXR0cihcImNsYXNzXCIsIGNsYXNzQXJlYXMpO1xuXG4gICAgICAgICAgICAvLy0tIEJydXNoIC0tLy9cbiAgICAgICAgICAgIGNvbnRleHQuc2VsZWN0QWxsKCcuJyArIENMQVNTLmJydXNoICsgJyByZWN0JylcbiAgICAgICAgICAgICAgICAuYXR0cihjb25maWcuYXhpc19yb3RhdGVkID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ZXR1cm4gZXh0ZW50O1xuICAgIH07XG5cbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi5pbml0Wm9vbSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgZDMgPSAkJC5kMywgY29uZmlnID0gJCQuY29uZmlnLCBzdGFydEV2ZW50O1xuXG4gICAgICAgICQkLnpvb20gPSBkMy5iZWhhdmlvci56b29tKClcbiAgICAgICAgICAgIC5vbihcInpvb21zdGFydFwiLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgc3RhcnRFdmVudCA9IGQzLmV2ZW50LnNvdXJjZUV2ZW50O1xuICAgICAgICAgICAgICAgICQkLnpvb20uYWx0RG9tYWluID0gZDMuZXZlbnQuc291cmNlRXZlbnQuYWx0S2V5ID8gJCQueC5vcmdEb21haW4oKSA6IG51bGw7XG4gICAgICAgICAgICAgICAgY29uZmlnLnpvb21fb256b29tc3RhcnQuY2FsbCgkJC5hcGksIGQzLmV2ZW50LnNvdXJjZUV2ZW50KTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAub24oXCJ6b29tXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAkJC5yZWRyYXdGb3Jab29tLmNhbGwoJCQpO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIC5vbignem9vbWVuZCcsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICB2YXIgZXZlbnQgPSBkMy5ldmVudC5zb3VyY2VFdmVudDtcbiAgICAgICAgICAgICAgICAvLyBpZiBjbGljaywgZG8gbm90aGluZy4gb3RoZXJ3aXNlLCBjbGljayBpbnRlcmFjdGlvbiB3aWxsIGJlIGNhbmNlbGVkLlxuICAgICAgICAgICAgICAgIGlmIChldmVudCAmJiBzdGFydEV2ZW50LmNsaWVudFggPT09IGV2ZW50LmNsaWVudFggJiYgc3RhcnRFdmVudC5jbGllbnRZID09PSBldmVudC5jbGllbnRZKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgJCQucmVkcmF3RXZlbnRSZWN0KCk7XG4gICAgICAgICAgICAgICAgJCQudXBkYXRlWm9vbSgpO1xuICAgICAgICAgICAgICAgIGNvbmZpZy56b29tX29uem9vbWVuZC5jYWxsKCQkLmFwaSwgJCQueC5vcmdEb21haW4oKSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgJCQuem9vbS5zY2FsZSA9IGZ1bmN0aW9uIChzY2FsZSkge1xuICAgICAgICAgICAgcmV0dXJuIGNvbmZpZy5heGlzX3JvdGF0ZWQgPyB0aGlzLnkoc2NhbGUpIDogdGhpcy54KHNjYWxlKTtcbiAgICAgICAgfTtcbiAgICAgICAgJCQuem9vbS5vcmdTY2FsZUV4dGVudCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBleHRlbnQgPSBjb25maWcuem9vbV9leHRlbnQgPyBjb25maWcuem9vbV9leHRlbnQgOiBbMSwgMTBdO1xuICAgICAgICAgICAgcmV0dXJuIFtleHRlbnRbMF0sIE1hdGgubWF4KCQkLmdldE1heERhdGFDb3VudCgpIC8gZXh0ZW50WzFdLCBleHRlbnRbMV0pXTtcbiAgICAgICAgfTtcbiAgICAgICAgJCQuem9vbS51cGRhdGVTY2FsZUV4dGVudCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciByYXRpbyA9IGRpZmZEb21haW4oJCQueC5vcmdEb21haW4oKSkgLyBkaWZmRG9tYWluKCQkLmdldFpvb21Eb21haW4oKSksXG4gICAgICAgICAgICAgICAgZXh0ZW50ID0gdGhpcy5vcmdTY2FsZUV4dGVudCgpO1xuICAgICAgICAgICAgdGhpcy5zY2FsZUV4dGVudChbZXh0ZW50WzBdICogcmF0aW8sIGV4dGVudFsxXSAqIHJhdGlvXSk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfTtcbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdldFpvb21Eb21haW4gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZywgZDMgPSAkJC5kMyxcbiAgICAgICAgICAgIG1pbiA9IGQzLm1pbihbJCQub3JnWERvbWFpblswXSwgY29uZmlnLnpvb21feF9taW5dKSxcbiAgICAgICAgICAgIG1heCA9IGQzLm1heChbJCQub3JnWERvbWFpblsxXSwgY29uZmlnLnpvb21feF9tYXhdKTtcbiAgICAgICAgcmV0dXJuIFttaW4sIG1heF07XG4gICAgfTtcbiAgICBjM19jaGFydF9pbnRlcm5hbF9mbi51cGRhdGVab29tID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLCB6ID0gJCQuY29uZmlnLnpvb21fZW5hYmxlZCA/ICQkLnpvb20gOiBmdW5jdGlvbiAoKSB7fTtcbiAgICAgICAgJCQubWFpbi5zZWxlY3QoJy4nICsgQ0xBU1Muem9vbVJlY3QpLmNhbGwoeikub24oXCJkYmxjbGljay56b29tXCIsIG51bGwpO1xuICAgICAgICAkJC5tYWluLnNlbGVjdEFsbCgnLicgKyBDTEFTUy5ldmVudFJlY3QpLmNhbGwoeikub24oXCJkYmxjbGljay56b29tXCIsIG51bGwpO1xuICAgIH07XG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4ucmVkcmF3Rm9yWm9vbSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcywgZDMgPSAkJC5kMywgY29uZmlnID0gJCQuY29uZmlnLCB6b29tID0gJCQuem9vbSwgeCA9ICQkLng7XG4gICAgICAgIGlmICghY29uZmlnLnpvb21fZW5hYmxlZCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGlmICgkJC5maWx0ZXJUYXJnZXRzVG9TaG93KCQkLmRhdGEudGFyZ2V0cykub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ICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZywgZDMgPSAkJC5kMyxcbiAgICAgICAgICAgIGNvbG9ycyA9IGNvbmZpZy5kYXRhX2NvbG9ycyxcbiAgICAgICAgICAgIHBhdHRlcm4gPSBub3RFbXB0eShjb25maWcuY29sb3JfcGF0dGVybikgPyBjb25maWcuY29sb3JfcGF0dGVybiA6IGQzLnNjYWxlLmNhdGVnb3J5MTAoKS5yYW5nZSgpLFxuICAgICAgICAgICAgY2FsbGJhY2sgPSBjb25maWcuZGF0YV9jb2xvcixcbiAgICAgICAgICAgIGlkcyA9IFtdO1xuXG4gICAgICAgIHJldHVybiBmdW5jdGlvbiAoZCkge1xuICAgICAgICAgICAgdmFyIGlkID0gZC5pZCB8fCAoZC5kYXRhICYmIGQuZGF0YS5pZCkgfHwgZCwgY29sb3I7XG5cbiAgICAgICAgICAgIC8vIGlmIGNhbGxiYWNrIGZ1bmN0aW9uIGlzIHByb3ZpZGVkXG4gICAgICAgICAgICBpZiAoY29sb3JzW2lkXSBpbnN0YW5jZW9mIEZ1bmN0aW9uKSB7XG4gICAgICAgICAgICAgICAgY29sb3IgPSBjb2xvcnNbaWRdKGQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gaWYgc3BlY2lmaWVkLCBjaG9vc2UgdGhhdCBjb2xvclxuICAgICAgICAgICAgZWxzZSBpZiAoY29sb3JzW2lkXSkge1xuICAgICAgICAgICAgICAgIGNvbG9yID0gY29sb3JzW2lkXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIGlmIG5vdCBzcGVjaWZpZWQsIGNob29zZSBmcm9tIHBhdHRlcm5cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChpZHMuaW5kZXhPZihpZCkgPCAwKSB7IGlkcy5wdXNoKGlkKTsgfVxuICAgICAgICAgICAgICAgIGNvbG9yID0gcGF0dGVybltpZHMuaW5kZXhPZihpZCkg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AgICAgICBpZiAobWF4ID09PSAwIHx8IG1heCkge1xuICAgICAgICAgICAgY29uZmlnLnpvb21feF9tYXggPSBkMy5tYXgoWyQkLm9yZ1hEb21haW5bMV0sIG1heF0pO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIGNvbmZpZy56b29tX3hfbWF4O1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIGMzX2NoYXJ0X2ZuLnpvb20ubWluID0gZnVuY3Rpb24gKG1pbikge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLmludGVybmFsLCBjb25maWcgPSAkJC5jb25maWcsIGQzID0gJCQuZDM7XG4gICAgICAgIGlmIChtaW4gPT09IDAgfHwgbWluKSB7XG4gICAgICAgICAgICBjb25maWcuem9vbV94X21pbiA9IGQzLm1pbihbJCQub3JnWERvbWFpblswXSwgbWluXSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gY29uZmlnLnpvb21feF9taW47XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgYzNfY2hhcnRfZm4uem9vbS5yYW5nZSA9IGZ1bmN0aW9uIChyYW5nZSkge1xuICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCkge1xuICAgICAgICAgICAgaWYgKGlzRGVmaW5lZChyYW5nZS5tYXgpKSB7IHRoaXMuZG9tYWluLm1heChyYW5nZS5tYXgpOyB9XG4gICAgICAgICAgICBpZiAoaXNEZWZpbmVkKHJhbmdlLm1pbikpIHsgdGhpcy5kb21haW4ubWluKHJhbmdlLm1pbik7IH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgbWF4OiB0aGlzLmRvbWFpbi5tYXgoKSxcbiAgICAgICAgICAgICAgICBtaW46IHRoaXMuZG9tYWluLm1pbigpXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIGMzX2NoY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oYXJncy5qc29uKSB7XG4gICAgICAgICAgICBkYXRhID0gJCQuY29udmVydEpzb25Ub0RhdGEoYXJncy5qc29uLCBhcmdzLmtleXMpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGFyZ3Mucm93cykge1xuICAgICAgICAgICAgZGF0YSA9ICQkLmNvbnZlcnRSb3dzVG9EYXRhKGFyZ3Mucm93cyk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoYXJncy5jb2x1bW5zKSB7XG4gICAgICAgICAgICBkYXRhID0gJCQuY29udmVydENvbHVtbnNUb0RhdGEoYXJncy5jb2x1bW5zKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICB0YXJnZXRzID0gJCQuY29udmVydERhdGFUb1RhcmdldHMoZGF0YSwgdHJ1ZSk7XG5cbiAgICAgICAgLy8gVXBkYXRlL0FkZCBkYXRhXG4gICAgICAgICQkLmRhdGEudGFyZ2V0cy5mb3JFYWNoKGZ1bmN0aW9uICh0KSB7XG4gICAgICAgICAgICB2YXIgZm91bmQgPSBmYWxzZSwgaSwgajtcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCB0YXJnZXRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKHQuaWQgPT09IHRhcmdldHNbaV0uaWQpIHtcbiAgICAgICAgICAgICAgICAgICAgZm91bmQgPSB0cnVlO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICh0LnZhbHVlc1t0LnZhbHVlcy5sZW5ndGggLSAxXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGFpbCA9IHQudmFsdWVzW3QudmFsdWVzLmxlbmd0aCAtIDFdLmluZGV4ICsgMTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBsZW5ndGggPSB0YXJnZXRzW2ldLnZhbHVlcy5sZW5ndGg7XG5cbiAgICAgICAgICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IGxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXRzW2ldLnZhbHVlc1tqXS5pbmRleCA9IHRhaWwgKyBqO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEkJC5pc1RpbWVTZXJpZXMoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldHNbaV0udmFsdWVzW2pdLnggPSB0YWlsICsgajtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0LnZhbHVlcyA9IHQudmFsdWVzLmNvbmNhdCh0YXJnZXRzW2ldLnZhbHVlcyk7XG5cbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0cy5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghZm91bmQpIHsgbm90Zm91bmRJZHMucHVzaCh0LmlkKTsgfVxuICAgICAgICB9KTtcblxuICAgICAgICAvLyBBcHBlbmQgbnVsbCBmb3Igbm90IGZvdW5kIHRhcmdldHNcbiAgICAgICAgJCQuZGF0YS50YXJnZXRzLmZvckVhY2goZnVuY3Rpb24gKHQpIHtcbiAgICAgICAgICAgIHZhciBpLCBqO1xuICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IG5vdGZvdW5kSWRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKHQuaWQgPT09IG5vdGZvdW5kSWRzW2ldKSB7XG4gICAgICAgICAgICAgICAgICAgIHRhaWwgPSB0LnZhbHVlc1t0LnZhbHVlcy5sZW5ndGggLSAxXS5pbmRleCArIDE7XG4gICAgICAgICAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBsZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdC52YWx1ZXMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHQuaWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IHRhaWwgKyBqLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHg6ICQkLmlzVGltZVNlcmllcygpID8gJCQuZ2V0T3RoZXJUYXJnZXRYKHRhaWwgKyBqKSA6IHRhaWwgKyBqLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBudWxsXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgLy8gR2VuZXJhdGUgbnVsbCB2YWx1ZXMgZm9yIG5ldyB0YXJnZXRcbiAgICAgICAgaWYgKCQkLmRhdGEudGFyZ2V0cy5sZW5ndGgpIHtcbiAgICAgICAgICAgIHRhcmdldHMuZm9yRWFjaChmdW5jdGlvbiAodCkge1xuICAgICAgICAgICAgICAgIHZhciBpLCBtaXNzaW5nID0gW107XG4gICAgICAgICAgICAgICAgZm9yIChpID0gJCQuZGF0YS50YXJnZXRzWzBdLnZhbHVlc1swXS5pbmRleDsgaSA8IHRhaWw7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBtaXNzaW5nLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHQuaWQsXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHg6ICQkLmlzVGltZVNlcmllcygpID8gJCQuZ2V0T3RoZXJUYXJnZXRYKGkpIDogaSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBudWxsXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0LnZhbHVlcy5mb3JFYWNoKGZ1bmN0aW9uICh2KSB7XG4gICAgICAgICAgICAgICAgICAgIHYuaW5kZXggKz0gdGFpbDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEkJC5pc1RpbWVTZXJpZXMoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdi54ICs9IHRhaWw7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB0LnZhbHVlcyA9IG1pc3NpbmcuY29uY2F0KHQudmFsdWVzKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgICQkLmRhdGEudGFyZ2V0cyA9ICQkLmRhdGEudGFyZ2V0cy5jb25jYXQodGFyZ2V0cyk7IC8vIGFkZCByZW1haW5lZFxuXG4gICAgICAgIC8vIGNoZWNrIGRhdGEgY291bnQgYmVjYXVzZSBiZWhhdmlvciBuZWVkcyB0byBjaGFuZ2Ugd2hlbiBpdCdzIG9ubHkgb25lXG4gICAgICAgIGRhdGFDb3VudCA9ICQkLmdldE1heERhdGFDb3VudCgpO1xuICAgICAgICBiYXNlVGFyZ2V0ID0gJCQuZGF0YS50YXJnZXRzWzBdO1xuICAgICAgICBiYXNlVmFsdWUgPSBiYXNlVGFyZ2V0LnZhbHVlc1swXTtcblxuICAgICAgICAvLyBVcGRhdGUgbGVuZ3RoIHRvIGZsb3cgaWYgbmVlZGVkXG4gICAgICAgIGlmIChpc0RlZmluZWQoYXJncy50bykpIHtcbiAgICAgICAgICAgIGxlbmd0aCA9IDA7XG4gICAgICAgICAgICB0byA9ICQkLmlzVGltZVNlcmllcygpID8gJCQucGFyc2VEYXRlKGFyZ3MudG8pIDogYXJncy50bztcbiAgICAgICAgICAgIGJhc2VUYXJnZXQudmFsdWVzLmZvckVhY2goZnVuY3Rpb24gKHYpIHtcbiAgICAgICAgICAgICAgICBpZiAodi54IDwgdG8pIHsgbGVuZ3RoKys7IH1cbiAgICAgICAgICAgIH0pO1xuICAgIC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AxXS54IC0gYmFzZVZhbHVlLngpIC8gMjtcbiAgICAgICAgICAgICAgICBkb21haW4gPSBbbmV3IERhdGUoK2Jhc2VWYWx1ZS54IC0gZGlmZiksIG5ldyBEYXRlKCtiYXNlVmFsdWUueCArIGRpZmYpXTtcbiAgICAgICAgICAgICAgICAkJC51cGRhdGVYRG9tYWluKG51bGwsIHRydWUsIHRydWUsIGZhbHNlLCBkb21haW4pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gU2V0IHRhcmdldHNcbiAgICAgICAgJCQudXBkYXRlVGFyZ2V0cygkJC5kYXRhLnRhcmdldHMpO1xuXG4gICAgICAgIC8vIFJlZHJhdyB3aXRoIG5ldyB0YXJnZXRzXG4gICAgICAgICQkLnJlZHJhdyh7XG4gICAgICAgICAgICBmbG93OiB7XG4gICAgICAgICAgICAgICAgaW5kZXg6IGJhc2VWYWx1ZS5pbmRleCxcbiAgICAgICAgICAgICAgICBsZW5ndGg6IGxlbmd0aCxcbiAgICAgICAgICAgICAgICBkdXJhdGlvbjogaXNWYWx1ZShhcmdzLmR1cmF0aW9uKSA/IGFyZ3MuZHVyYXRpb24gOiAkJC5jb25maWcudHJhbnNpdGlvbl9kdXJhdGlvbixcbiAgICAgICAgICAgICAgICBkb25lOiBhcmdzLmRvbmUsXG4gICAgICAgICAgICAgICAgb3JnRGF0YUNvdW50OiBvcmdEYXRhQ291bnQsXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgd2l0aExlZ2VuZDogdHJ1ZSxcbiAgICAgICAgICAgIHdpdGhUcmFuc2l0aW9uOiBvcmdEYXRhQ291bnQgPiAxLFxuICAgICAgICAgICAgd2l0aFRyaW1YRG9tYWluOiBmYWxzZSxcbiAgICAgICAgICAgIHdpdGhVcGRhdGVYQXhpczogdHJ1ZSxcbiAgICAgICAgfSk7XG4gICAgfTtcblxuICAgIGMzX2NoYXJ0X2ludGVybmFsX2ZuLmdlbmVyYXRlRmxvdyA9IGZ1bmN0aW9uIChhcmdzKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMsIGNvbmZpZyA9ICQkLmNvbmZpZywgZDMgPSAkJC5kMztcblxuICAgICAgICByZXR1cm4gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIHRhcmdldHMgPSBhcmdzLnRhcmdldHMsXG4gICAgICAgICAgICAgICAgZmxvdyA9IGFyZ3MuZmxvdyxcbiAgICAgICAgICAgICAgICBkcmF3QmFyID0gYXJncy5kcmF3QmFyLFxuICAgICAgICAgICAgICAgIGRyYXdMaW5lID0gYXJncy5kcmF3TGluZSxcbiAgICAgICAgICAgICAgICBkcmF3QXJlYSA9IGFyZ3MuZHJhd0FyZWEsXG4gICAgICAgICAgICAgICAgY3ggPSBhcmdzLmN4LFxuICAgICAgICAgICAgICAgIGN5ID0gYXJncy5jeSxcbiAgICAgICAgICAgICAgICB4diA9IGFyZ3MueHYsXG4gICAgICAgICAgICAgICAgeEZvclRleHQgPSBhcmdzLnhGb3JUZXh0LFxuICAgICAgICAgICAgICAgIHlGb3JUZXh0ID0gYXJncy55Rm9yVGV4dCxcbiAgICAgICAgICAgICAgICBkdXJhdGlvbiA9IGFyZ3MuZHVyYXRpb247XG5cbiAgICAgICAgICAgIHZhciB0cmFuc2xhdGVYLCBzY2FsZVggPSAxLCB0cmFuc2Zvcm0sXG4gICAgICAgICAgICAgICAgZmxvd0luZGV4ID0gZmxvdy5pbmRleCxcbiAgICAgICAgICAgICAgICBmbG93TGVuZ3RoID0gZmxvdy5sZW5ndGgsXG4gICAgICAgICAgICAgICAgZmxvd1N0YXJ0ID0gJCQuZ2V0VmFsdWVPbkluZGV4KCQkLmRhdGEudGFyZ2V0c1swXS52YWx1ZXMsIGZsb3dJbmRleCksXG4gICAgICAgICAgICAgICAgZmxvd0VuZCA9ICQkLmdldFZhbHVlT25JbmRleCgkJC5kYXRhLnRhcmdldHNbMF0udmFsdWVzLCBmbG93SW5kZXggKyBmbG93TGVuZ3RoKSxcbiAgICAgICAgICAgICAgICBvcmdEb21haW4gPSAkJC54LmRvbWFpbigpLCBkb21haW4sXG4gICAgICAgICAgICAgICAgZHVyYXRpb25Gb3JGbG93ID0gZmxvdy5kdXJhdGlvbiB8fCBkdXJhdGlvbixcbiAgICAgICAgICAgICAgICBkb25lID0gZmxvdy5kb25lIHx8IGZ1bmN0aW9uICgpIHt9LFxuICAgICAgICAgICAgICAgIHdhaXQgPSAkJC5nZW5lcmF0ZVdhaXQoKTtcblxuICAgICAgICAgICAgdmFyIHhncmlkID0gJCQueGdyaWQgfHwgZDMuc2VsZWN0QWxsKFtdKSxcbiAgICAgICAgICAgICAgICB4Z3JpZExpbmVzID0gJCQueGdyaWRMaW5lcyB8fCBkMy5zZWxlY3RBbGwoW10pLFxuICAgICAgICAgICAgICAgIG1haW5SZWdpb24gPSAkJC5tYWluUmVnaW9uIHx8IGQzLnNlbGVjdEFsbChbXSksXG4gICAgICAgICAgICAgICAgbWFpblRleHQgPSAkJC5tYWluVGV4dCB8fCBkMy5zZWxlY3RBbGwoW10pLFxuICAgICAgICAgICAgICAgIG1haW5CYXIgPSAkJC5tYWluQmFyIHx8IGQzLnNlbGVjdEFsbChbXSksXG4gICAgICAgICAgICAgICAgbWFpbkxpbmUgPSAkJC5tYWluTGluZSB8fCBkMy5zZWxlY3RBbGwoW10pLFxuICAgICAgICAgICAgICAgIG1haW5BcmVhID0gJCQubWFpbkFyZWEgfHwgZDMuc2VsZWN0QWxsKFtdKSxcbiAgICAgICAgICAgICAgICBtYWluQ2lyY2xlID0gJCQubWFpbkNpcmNsZSB8fCBkMy5zZWxlY3RBbGwoW10pO1xuXG4gICAgICAgICAgICAvLyBzZXQgZmxhZ1xuICAgICAgICAgICAgJCQuZmxvd2luZyA9IHRydWU7XG5cbiAgICAgICAgICAgIC8vIHJlbW92ZSBoZWFkIGRhdGEgYWZ0ZXIgcmVuZGVyZWRcbiAgICAgICAgICAgICQkLmRhdGEudGFyZ2V0cy5mb3JFYWNoKGZ1bmN0aW9uIChkKSB7XG4gICAgICAgICAgICAgICAgZC52YWx1ZXMuc3BsaWNlKDAsIGZsb3dMZW5ndGgpO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIC8vIHVwZGF0ZSB4IGRvbWFpbiB0byBnZW5lcmF0ZSBheGlzIGVsZW1lbnRzIGZvciBmbG93XG4gICAgICAgICAgICBkb21haW4gPSAkJC51cGRhdGVYRG9tYWluKHRhcmdldHMsIHRydWUsIHRydWUpO1xuICAgICAgICAgICAgLy8gdXBkYXRlIGVsZW1lbnRzIHJlbGF0ZWQgdG8geCBzY2FsZVxuICAgICAgICAgICAgaWYgKCQkLnVwZGF0ZVhHcmlkKSB7ICQkLnVwZGF0ZVhHcmlkKHRydWUpOyB9XG5cbiAgICAgICAgICAgIC8vIGdlbmVyYXRlIHRyYW5zZm9ybSB0byBmbG93XG4gICAgICAgICAgICBpZiAoIWZsb3cub3JnRGF0YUNvdW50KSB7IC8vIGlmIGVtcHR5XG4gICAgICAgICAgICAgICAgaWYgKCQkLmRhdGEudGFyZ2V0c1swXS52YWx1ZXMubGVuZ3RoICE9PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIHRyYW5zbGF0ZVggPSAkJC54KG9yZ0RvbWFpblswXSkgLSAkJC54KGRvbWFpblswXSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCQkLmlzVGltZVNlcmllcygpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmbG93U3RhcnQgPSAkJC5nZXRWYWx1ZU9uSW5kZXgoJCQuZGF0YS50YXJnZXRzWzBdLnZhbHVlcywgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBmbG93RW5kID0gJCQuZ2V0VmFsdWVPbkluZGV4KCQkLmRhdGEudGFyZ2V0c1swXS52YWx1ZXMsICQkLmRhdGEudGFyZ2V0c1swXS52YWx1ZXMubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2xhdGVYID0gJCQueChmbG93U3RhcnQueCkgLSAkJC54KGZsb3dFbmQueCk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2xhdGVYID0gZGlmZkRvbWFpbihkb21haW4pIC8gMjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZmxvdy5vcmdEYXRhQ291bnQgPT09IDEgfHwgKGZsb3dTdGFydCAmJiBmbG93U3RhcnQueCkgPT09IChmbG93RW5kICYmIGZsb3dFbmQueCkpIHtcbiAgICAgICAgICAgICAgICB0cmFuc2xhdGVYID0gJCQueChvcmdEb21haW5bMF0pIC0gJCQueChkb21haW5bMF0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoJCQuaXNUaW1lU2VyaWVzKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdHJhbnNsYXRlWCA9ICgkJC54KG9yZ0RvbWFpblswXSkgLSAkJC54KGRvbWFpblswXSkpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRyYW5zbGF0ZVggPSAoJCQueChmbG93U3RhcnQueCkgLSAkJC54KGZsb3dFbmQueCkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNjYWxlWCA9IChkaWZmRG9tYWluKG9yZ0RvbWFpbikgLyBkaWZmRG9tYWluKGRvbWFpbikpO1xuICAgICAgICAgICAgdHJhbnNmb3JtID0gJ3RyYW5zbGF0ZSgnICsgdHJhbnNsYXRlWCArICcsMCkgc2NhbGUoJyArIHNjYWxlWCArICcsMSknO1xuXG4gICAgICAgICAgICAkJC5oaWRlWEdyaWRGb2N1cygpO1xuXG4gICAgICAgICAgICBkMy50cmFuc2l0aW9uKCkuZWFzZSgnbGluZWFyJykuZH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gICAgICAgICAgICAgdmFyIGksIHNoYXBlcyA9IFtdLCB0ZXh0cyA9IFtdLCBldmVudFJlY3RzID0gW107XG5cbiAgICAgICAgICAgICAgICAvLyByZW1vdmUgZmxvd2VkIGVsZW1lbnRzXG4gICAgICAgICAgICAgICAgaWYgKGZsb3dMZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGZsb3dMZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2hhcGVzLnB1c2goJy4nICsgQ0xBU1Muc2hhcGUgKyAnLScgKyAoZmxvd0luZGV4ICsgaSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dHMucHVzaCgnLicgKyBDTEFTUy50ZXh0ICsgJy0nICsgKGZsb3dJbmRleCArIGkpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50UmVjdHMucHVzaCgnLicgKyBDTEFTUy5ldmVudFJlY3QgKyAnLScgKyAoZmxvd0luZGV4ICsgaSkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICQkLnN2Zy5zZWxlY3RBbGwoJy4nICsgQ0xBU1Muc2hhcGVzKS5zZWxlY3RBbGwoc2hhcGVzKS5yZW1vdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgJCQuc3ZnLnNlbGVjdEFsbCgnLicgKyBDTEFTUy50ZXh0cykuc2VsZWN0QWxsKHRleHRzKS5yZW1vdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgJCQuc3ZnLnNlbGVjdEFsbCgnLicgKyBDTEFTUy5ldmVudFJlY3RzKS5zZWxlY3RBbGwoZXZlbnRSZWN0cykucmVtb3ZlKCk7XG4gICAgICAgICAgICAgICAgICAgICQkLnN2Zy5zZWxlY3QoJy4nICsgQ0xBU1MueGdyaWQpLnJlbW92ZSgpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIC8vIGRyYXcgYWdhaW4gZm9yIHJlbW92aW5nIGZsb3dlZCBlbGVtZW50cyBhbmQgcmV2ZXJ0aW5nIGF0dHJcbiAgICAgICAgICAgICAgICB4Z3JpZFxuICAgICAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgbnVsbClcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoJCQueGdyaWRBdHRyKTtcbiAgICAgICAgICAgICAgICB4Z3JpZExpbmVzXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCBudWxsKTtcbiAgICAgICAgICAgICAgICB4Z3JpZExpbmVzLnNlbGVjdCgnbGluZScpXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKFwieDFcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/IDAgOiB4dilcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJ4MlwiLCBjb25maWcuYXhpc19yb3RhdGVkID8gJCQud2lkdGggOiB4dik7XG4gICAgICAgICAgICAgICAgeGdyaWRMaW5lcy5zZWxlY3QoJ3RleHQnKVxuICAgICAgICAgICAgICAgICAgICAuYXR0cihcInhcIiwgY29uZmlnLmF4aXNfcm90YXRlZCA/ICQkLndpZHRoIDogMClcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJ5XCIsIHh2KTtcbiAgICAgICAgICAgICAgICBtYWluQmFyXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKCd0cmFuc2Zvcm0nLCBudWxsKVxuICAgICAgICAgICAgICAgICAgICAuYXR0cihcImRcIiwgZHJhd0Jhcik7XG4gICAgICAgICAgICAgICAgbWFpbkxpbmVcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIG51bGwpXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKFwiZFwiLCBkcmF3TGluZSk7XG4gICAgICAgICAgICAgICAgbWFpbkFyZWFcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIG51bGwpXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKFwiZFwiLCBkcmF3QXJlYSk7XG4gICAgICAgICAgICAgICAgbWFpbkNpcmNsZVxuICAgICAgICAgICAgICAgICAgICAuYXR0cigndHJhbnNmb3JtJywgbnVsbClcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJjeFwiLCBjeClcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJjeVwiLCBjeSk7XG4gICAgICAgICAgICAgICAgbWFpblRleHRcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIG51bGwpXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKCd4JywgeEZvclRleHQpXG4gICAgICAgICAgICAgICAgICAgIC5hdHRyKCd5JywgeUZvclRleHQpXG4gICAgICAgICAgICAgICAgICAgIC5zdHlsZSgnZmlsbC1vcGFjaXR5JywgJCQub3BhY2l0eUZvclRleHQuYmluZCgkJCkpO1xuICAgICAgICAgICAgICAgIG1haW5SZWdpb25cbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoJ3RyYW5zZm9ybScsIG51bGwpO1xuICAgICAgICAgICAgICAgIG1haW5SZWdpb24uc2VsZWN0KCdyZWN0JykuZmlsdGVyKCQkLmlzUmVnaW9uT25YKVxuICAgICAgICAgICAgICAgICAgICAuYXR0cihcInhcIiwgJCQucmVnaW9uWC5iaW5kKCQkKSlcbiAgICAgICAgICAgICAgICAgICAgLmF0dHIoXCJ3aWR0aFwiLCAkJC5yZWdpb25XaWR0aC5iaW5kKCQkKSk7XG5cbiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmludGVyYWN0aW9uX2VuYWJsZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgJCQucmVkcmF3RXZlbnRSZWN0KCk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gY2FsbGJhY2sgZm9yIGVuZCBvZiBmbG93XG4gICAgICAgICAgICAgICAgZG9uZSgpO1xuXG4gICAgICAg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G4gICAgYzNfY2hhcnRfZm4uYXhpcyA9IGZ1bmN0aW9uICgpIHt9O1xuICAgIGMzX2NoYXJ0X2ZuLmF4aXMubGFiZWxzID0gZnVuY3Rpb24gKGxhYmVscykge1xuICAgICAgICB2YXIgJCQgPSB0aGlzLmludGVybmFsO1xuICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCkge1xuICAgICAgICAgICAgT2JqZWN0LmtleXMobGFiZWxzKS5mb3JFYWNoKGZ1bmN0aW9uIChheGlzSWQpIHtcbiAgICAgICAgICAgICAgICAkJC5heGlzLnNldExhYmVsVGV4dChheGlzSWQsIGxhYmVsc1theGlzSWRdKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgJCQuYXhpcy51cGRhdGVMYWJlbHMoKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBUT0RPOiByZXR1cm4gc29tZSB2YWx1ZXM/XG4gICAgfTtcbiAgICBjM19jaGFydF9mbi5heGlzLm1heCA9IGZ1bmN0aW9uIChtYXgpIHtcbiAgICAgICAgdmFyICQkID0gdGhpcy5pbnRlcm5hbCwgY29uZmlnID0gJCQuY29uZmlnO1xuICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCkge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBtYXggPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzVmFsdWUobWF4LngpKSB7IGNvbmZpZy5heGlzX3hfbWF4ID0gbWF4Lng7IH1cbiAgICAgICAgICAgICAgICBpZiAoaXNWYWx1ZShtYXgueSkpIHsgY29uZmlnLmF4aXNfeV9tYXggPSBtYXgueTsgfVxuICAgICAgICAgICAgICAgIGlmIChpc1ZhbHVlKG1heC55MikpIHsgY29uZmlnLmF4aXNfeTJfbWF4ID0gbWF4LnkyOyB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbmZpZy5heGlzX3lfbWF4ID0gY29uZmlnLmF4aXNfeTJfbWF4ID0gbWF4O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgJCQucmVkcmF3KHt3aXRoVXBkYXRlT3JnWERvbWFpbjogdHJ1ZSwgd2l0aFVwZGF0ZVhEb21haW46IHRydWV9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgeDogY29uZmlnLmF4aXNfeF9tYXgsXG4gICAgICAgICAgICAgICAgeTogY29uZmlnLmF4aXNfeV9tYXgsXG4gICAgICAgICAgICAgICAgeTI6IGNvbmZpZy5heGlzX3kyX21heFxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgYzNfY2hhcnRfZm4uYXhpcy5taW4gPSBmdW5jdGlvbiAobWluKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMuaW50ZXJuYWwsIGNvbmZpZyA9ICQkLmNvbmZpZztcbiAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGgpIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgbWluID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgICAgIGlmIChpc1ZhbHVlKG1pbi54KSkgeyBjb25maWcuYXhpc194X21pbiA9IG1pbi54OyB9XG4gICAgICAgICAgICAgICAgaWYgKGlzVmFsdWUobWluLnkpKSB7IGNvbmZpZy5heGlzX3lfbWluID0gbWluLnk7IH1cbiAgICAgICAgICAgICAgICBpZiAoaXNWYWx1ZShtaW4ueTIpKSB7IGNvbmZpZy5heGlzX3kyX21pbiA9IG1pbi55MjsgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb25maWcuYXhpc195X21pbiA9IGNvbmZpZy5heGlzX3kyX21pbiA9IG1pbjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgICQkLnJlZHJhdyh7d2l0aFVwZGF0ZU9yZ1hEb21haW46IHRydWUsIHdpdGhVcGRhdGVYRG9tYWluOiB0cnVlfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHg6IGNvbmZpZy5heGlzX3hfbWluLFxuICAgICAgICAgICAgICAgIHk6IGNvbmZpZy5heGlzX3lfbWluLFxuICAgICAgICAgICAgICAgIHkyOiBjb25maWcuYXhpc195Ml9taW5cbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICB9O1xuICAgIGMzX2NoYXJ0X2ZuLmF4aXMucmFuZ2UgPSBmdW5jdGlvbiAocmFuZ2UpIHtcbiAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGgpIHtcbiAgICAgICAgICAgIGlmIChpc0RlZmluZWQocmFuZ2UubWF4KSkgeyB0aGlzLmF4aXMubWF4KHJhbmdlLm1heCk7IH1cbiAgICAgICAgICAgIGlmIChpc0RlZmluZWQocmFuZ2UubWluKSkgeyB0aGlzLmF4aXMubWluKHJhbmdlLm1pbik7IH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgbWF4OiB0aGlzLmF4aXMubWF4KCksXG4gICAgICAgICAgICAgICAgbWluOiB0aGlzLmF4aXMubWluKClcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgYzNfY2hhcnRfZm4ubGVnZW5kID0gZnVuY3Rpb24gKCkge307XG4gICAgYzNfY2hhcnRfZm4ubGVnZW5kLnNob3cgPSBmdW5jdGlvbiAodGFyZ2V0SWRzKSB7XG4gICAgICAgIHZhciAkJCA9IHRoaXMuaW50ZXJuYWw7XG4gICAgICAgICQkLnNob3dMZWdlbmQoJCQubWFwVG9UYXJnZXRJZHModGFyZ2V0SWRzKSk7XG4gICAgICAgICQkLnVwZGF0ZUFuZFJlZHJhdyh7d2l0aExlZ2VuZDogdHJ1ZX0pO1xuICAgIH07XG4gICAgYzNfY2hhcnRfZm4ubGVnZW5kLmhpZGUgPSBmdW5jdGlvbiAodGFyZ2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Ck7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAod2luZG93LmRldGFjaEV2ZW50KSB7XG4gICAgICAgICAgICB3aW5kb3cuZGV0YWNoRXZlbnQoJ29ucmVzaXplJywgJCQucmVzaXplRnVuY3Rpb24pO1xuICAgICAgICB9IGVsc2UgaWYgKHdpbmRvdy5yZW1vdmVFdmVudExpc3RlbmVyKSB7XG4gICAgICAgICAgICB3aW5kb3cucmVtb3ZlRXZlbnRMaXN0ZW5lcigncmVzaXplJywgJCQucmVzaXplRnVuY3Rpb24pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIHdyYXBwZXIgPSB3aW5kb3cub25yZXNpemU7XG4gICAgICAgICAgICAvLyBjaGVjayBpZiBubyBvbmUgZWxzZSByZW1vdmVkIG91ciB3cmFwcGVyIGFuZCByZW1vdmUgb3VyIHJlc2l6ZUZ1bmN0aW9uIGZyb20gaXRcbiAgICAgICAgICAgIGlmICh3cmFwcGVyICYmIHdyYXBwZXIuYWRkICYmIHdyYXBwZXIucmVtb3ZlKSB7XG4gICAgICAgICAgICAgICAgd3JhcHBlci5yZW1vdmUoJCQucmVzaXplRnVuY3Rpb24pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgJCQuc2VsZWN0Q2hhcnQuY2xhc3NlZCgnYzMnLCBmYWxzZSkuaHRtbChcIlwiKTtcblxuICAgICAgICAvLyBNRU1POiB0aGlzIGlzIG5lZWRlZCBiZWNhdXNlIHRoZSByZWZlcmVuY2Ugb2Ygc29tZSBlbGVtZW50cyB3aWxsIG5vdCBiZSByZWxlYXNlZCwgdGhlbiBtZW1vcnkgbGVhayB3aWxsIGhhcHBlbi5cbiAgICAgICAgT2JqZWN0LmtleXMoJCQpLmZvckVhY2goZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgJCRba2V5XSA9IG51bGw7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH07XG5cbiAg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BdIDogWyBzdG9wLCBzdGFydCBdO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIGdlbmVyYXRlVGlja3Moc2NhbGUpIHtcbiAgICAgICAgICAgIHZhciBpLCBkb21haW4sIHRpY2tzID0gW107XG4gICAgICAgICAgICBpZiAoc2NhbGUudGlja3MpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gc2NhbGUudGlja3MuYXBwbHkoc2NhbGUsIHRpY2tBcmd1bWVudHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZG9tYWluID0gc2NhbGUuZG9tYWluKCk7XG4gICAgICAgICAgICBmb3IgKGkgPSBNYXRoLmNlaWwoZG9tYWluWzBdKTsgaSA8IGRvbWFpblsxXTsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdGlja3MucHVzaChpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0aWNrcy5sZW5ndGggPiAwICYmIHRpY2tzWzBdID4gMCkge1xuICAgICAgICAgICAgICAgIHRpY2tzLnVuc2hpZnQodGlja3NbMF0gLSAodGlja3NbMV0gLSB0aWNrc1swXSkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHRpY2tzO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIGNvcHlTY2FsZSgpIHtcbiAgICAgICAgICAgIHZhciBuZXdTY2FsZSA9IHNjYWxlLmNvcHkoKSwgZG9tYWluO1xuICAgICAgICAgICAgaWYgKHBhcmFtcy5pc0NhdGVnb3J5KSB7XG4gICAgICAgICAgICAgICAgZG9tYWluID0gc2NhbGUuZG9tYWluKCk7XG4gICAgICAgICAgICAgICAgbmV3U2NhbGUuZG9tYWluKFtkb21haW5bMF0sIGRvbWFpblsxXSAtIDFdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBuZXdTY2FsZTtcbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiB0ZXh0Rm9ybWF0dGVkKHYpIHtcbiAgICAgICAgICAgIHZhciBmb3JtYXR0ZWQgPSB0aWNrRm9ybWF0ID8gdGlja0Zvcm1hdCh2KSA6IHY7XG4gICAgICAgICAgICByZXR1cm4gdHlwZW9mIGZvcm1hdHRlZCAhPT0gJ3VuZGVmaW5lZCcgPyBmb3JtYXR0ZWQgOiAnJztcbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiBnZXRTaXplRm9yMUNoYXIodGljaykge1xuICAgICAgICAgICAgaWYgKHRpY2tUZXh0Q2hhclNpemUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGlja1RleHRDaGFyU2l6ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBzaXplID0ge1xuICAgICAgICAgICAgICAgIGg6IDExLjUsXG4gICAgICAgICAgICAgICAgdzogNS41XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdGljay5zZWxlY3QoJ3RleHQnKS50ZXh0KHRleHRGb3JtYXR0ZWQpLmVhY2goZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICB2YXIgYm94ID0gdGhpcy5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKSxcbiAgICAgICAgICAgICAgICAgICAgdGV4dCA9IHRleHRGb3JtYXR0ZWQoZCksXG4gICAgICAgICAgICAgICAgICAgIGggPSBib3guaGVpZ2h0LFxuICAgICAgICAgICAgICAgICAgICB3ID0gdGV4dCA/IChib3gud2lkdGggLyB0ZXh0Lmxlbmd0aCkgOiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgaWYgKGggJiYgdykge1xuICAgICAgICAgICAgICAgICAgICBzaXplLmggPSBoO1xuICAgICAgICAgICAgICAgICAgICBzaXplLncgPSB3O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pLnRleHQoJycpO1xuICAgICAgICAgICAgdGlja1RleHRDaGFyU2l6ZSA9IHNpemU7XG4gICAgICAgICAgICByZXR1cm4gc2l6ZTtcbiAgICAgICAgf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2FsZTEoMSkgLSBzY2FsZTEoMCkpIC8gMik7XG4gICAgICAgICAgICAgICAgICAgIHRpY2tYID0gdGlja0NlbnRlcmVkID8gMCA6IHRpY2tPZmZzZXQ7XG4gICAgICAgICAgICAgICAgICAgIHRpY2tZID0gdGlja0NlbnRlcmVkID8gdGlja09mZnNldCA6IDA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGlja09mZnNldCA9IHRpY2tYID0gMDtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB2YXIgdGV4dCwgdHNwYW4sIHNpemVGb3IxQ2hhciA9IGdldFNpemVGb3IxQ2hhcihnLnNlbGVjdCgnLnRpY2snKSksIGNvdW50cyA9IFtdO1xuICAgICAgICAgICAgICAgIHZhciB0aWNrTGVuZ3RoID0gTWF0aC5tYXgoaW5uZXJUaWNrU2l6ZSwgMCkgKyB0aWNrUGFkZGluZyxcbiAgICAgICAgICAgICAgICAgICAgaXNWZXJ0aWNhbCA9IG9yaWVudCA9PT0gJ2xlZnQnIHx8IG9yaWVudCA9PT0gJ3JpZ2h0JztcblxuICAgICAgICAgICAgICAgIC8vIHRoaXMgc2hvdWxkIGJlIGNhbGxlZCBvbmx5IHdoZW4gY2F0ZWdvcnkgYXhpc1xuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHNwbGl0VGlja1RleHQoZCwgbWF4V2lkdGgpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpY2tUZXh0ID0gdGV4dEZvcm1hdHRlZChkKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN1YnRleHQsIHNwYWNlSW5kZXgsIHRleHRXaWR0aCwgc3BsaXR0ZWQgPSBbXTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZy5jYWxsKHRpY2tUZXh0KSA9PT0gXCJbb2JqZWN0IEFycmF5XVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGlja1RleHQ7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAoIW1heFdpZHRoIHx8IG1heFdpZHRoIDw9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1heFdpZHRoID0gaXNWZXJ0aWNhbCA/IDk1IDogcGFyYW1zLmlzQ2F0ZWdvcnkgPyAoTWF0aC5jZWlsKHNjYWxlMSh0aWNrc1sxXSkgLSBzY2FsZTEodGlja3NbMF0pKSAtIDEyKSA6IDExMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHNwbGl0KHNwbGl0dGVkLCB0ZXh0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzcGFjZUluZGV4ID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDE7IGkgPCB0ZXh0Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRleHQuY2hhckF0KGkpID09PSAnICcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3BhY2VJbmRleCA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1YnRleHQgPSB0ZXh0LnN1YnN0cigwLCBpICsgMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFdpZHRoID0gc2l6ZUZvcjFDaGFyLncgKiBzdWJ0ZXh0Lmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpZiB0ZXh0IHdpZHRoIGdldHMgb3ZlciB0aWNrIHdpZHRoLCBzcGxpdCBieSBzcGFjZSBpbmRleCBvciBjcnJlbnQgaW5kZXhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobWF4V2lkdGggPCB0ZXh0V2lkdGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNwbGl0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3BsaXR0ZWQuY29uY2F0KHRleHQuc3Vic3RyKDAsIHNwYWNlSW5kZXggPyBzcGFjZUluZGV4IDogaSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dC5zbGljZShzcGFjZUluZGV4ID8gc3BhY2VJbmRleCArIDEgOiBpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzcGxpdHRlZC5jb25jYXQodGV4dCk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3BsaXQoc3BsaXR0ZWQsIHRpY2tUZXh0ICsgXCJcIik7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gdHNwYW5EeShkLCBpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBkeSA9IHNpemVGb3IxQ2hhci5oO1xuICAgICAgICAgICAgICAgICAgICBpZiAoaSA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9yaWVudCA9PT0gJ2xlZnQnIHx8IG9yaWVudCA9PT0gJ3JpZ2h0Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGR5ID0gLSgoY291bnRzW2QuaW5kZXhdIC0gMSkgKiAoc2l6ZUZvcjFDaGFyLmggLyAyKSAtIDMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkeSA9IFwiLjcxZW1cIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZHk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gdGlja1NpemUoZCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdGlja1Bvc2l0aW9uID0gc2NhbGUoZCkgKyAodGlja0NlbnRlcmVkID8gMCA6IHRpY2tPZmZzZXQpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmFuZ2VbMF0gPCB0aWNrUG9zaXRpb24gJiYgdGlja1Bvc2l0aW9uIDwgcmFuZ2VbMV0gPyBpbm5lclRpY2tTaXplIDogMDtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0ZXh0ID0gdGljay5zZWxlY3QoXCJ0ZXh0XCIpO1xuICAgICAgICAgICAgICAgIHRzcGFuID0gdGV4dC5zZWxlY3RBbGwoJ3RzcGFuJylcbiAgICAgICAgICAgICAgICAgICAgLmRhdGEoZnVuY3Rpb24gKGQsIGkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzcGxpdHRlZCA9IHBhcmFtcy50aWNrTXVsdGlsaW5lID8gc3BsaXRUaWNrVGV4dChkLCBwYXJhbXMudGlja1dpZHRoKSA6IFtdLmNvbmNhdCh0ZXh0Rm9ybWF0dGVkKGQpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50c1tpXSA9IHNwbGl0dGVkLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzcGxpdHRlZC5tYXAoZnVuY3Rpb24gKHMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBpbmRleDogaSwgc3BsaXR0ZWQ6IHMgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB0c3Bhbi5lbnRlcigpLmFwcGVuZCgndHNwYW4nKTtcbiAgICAgICAgICAgICAgICB0c3Bhbi5leGl0KCkucmVtb3ZlKCk7XG4gICAgICAgICAgICAgICAgdHNwYW4udGV4dChmdW5jdGlvbiAoZCkgeyByZXR1cm4gZC5zcGxpdHRlZDsgfSk7XG5cbiAgICAgICAgICAgICAgICB2YXIgcm90YXRlID0gcGFyYW1zLnRpY2tUZXh0Um90YXRlO1xuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gdGV4dEFuY2hvckZvclRleHQocm90YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghcm90YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ21pZGRsZSc7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJvdGF0ZSA+IDAgPyBcInN0YXJ0XCIgOiBcImVuZFwiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB0ZXh0VHJhbnNmb3JtKHJvdGF0ZSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXJvdGF0ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICcnO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcInJvdGF0ZShcIiArIHJvdGF0ZSArIFwiKVwiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBkeEZvclRleHQocm90YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghcm90YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gOCAqIE1hdGguc2luKE1hdGguUEkgKiAocm90YXRlIC8gMTgwKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHlGb3JUZXh0KHJvdGF0ZSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXJvdGF0ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRpY2tMZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDExLjUgLSAyLjUgKiAocm90YXRlIC8gMTUpICogKHJvdGF0ZSA+IDAgPyAxIDogLTEpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHN3aXRjaCAob3JpZW50KSB7XG4gICAgICAgICAgICAgICAgY2FzZSBcImJvdHRvbVwiOlxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aWNrVHJhbnNmb3JtID0gYXhpc1g7XG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lRW50ZXIuYXR0cihcInkyXCIsIGlubmVyVGlja1NpemUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dEVudGVyLmF0dHIoXCJ5XCIsIHRpY2tMZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGluZVVwZGF0ZS5hdHRyKFwieDFcIiwgdGlja1gpLmF0dHIoXCJ4MlwiLCB0aWNrWCkuYXR0cihcInkyXCIsIHRpY2tTaXplKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRVcGRhdGUuYXR0cihcInhcIiwgMCkuYXR0cihcInlcIiwgeUZvclRleHQocm90YXRlKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc3R5bGUoXCJ0ZXh0LWFuY2hvclwiLCB0ZXh0QW5jaG9yRm9yVGV4dChyb3RhdGUpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5hdHRyKFwidHJhbnNmb3JtXCIsIHRleHRUcmFuc2Zvcm0ocm90YXRlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0c3Bhbi5hdHRyKCd4JywgMCkuYXR0cihcImR5XCIsIHRzcGFuRHkpLmF0dHIoJ2R4JywgZHhGb3JUZXh0KHJvdGF0ZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcGF0aFVwZGF0ZS5hdHRyKFwiZFwiLCBcIk1cIiArIHJhbmdlWzBdICsgXCIsXCIgKyBvdXRlclRpY2tTaXplICsgXCJWMEhcIiArIHJhbmdlWzFdICsgXCJWXCIgKyBvdXRlclRpY2tTaXplKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY2FzZSBcInRvcFwiOlxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBUT0RPOiByb3RhdGVkIHRpY2sgdGV4dFxuICAgICAgICAgICAgICAgICAgICAgICAgdGlja1RyYW5zZm9ybSA9IGF4aXNYO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGluZUVudGVyLmF0dHIoXCJ5MlwiLCAtaW5uZXJUaWNrU2l6ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0RW50ZXIuYXR0cihcInlcIiwgLXRpY2tMZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGluZVVwZGF0ZS5hdHRyKFwieDJcIiwgMCkuYXR0cihcInkyXCIsIC1pbm5lclRpY2tTaXplKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRVcGRhdGUuYXR0cihcInhcIiwgMCkuYXR0cihcInlcIiwgLXRpY2tMZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dC5zdHlsZShcInRleHQtYW5jaG9yXCIsIFwibWlkZGxlXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdHNwYW4uYXR0cigneCcsIDApLmF0dHIoXCJkeVwiLCBcIjBlbVwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhVcGRhdGUuYXR0cihcImRcIiwgXCJNXCIgKyByYW5nZVswXSArIFwiLFwiICsgLW91dGVyVGlja1NpemUgKyBcIlYwSFwiICsgcmFuZ2VbMV0gKyBcIlZcIiArIC1vdXRlclRpY2tTaXplKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY2FzZSBcImxlZnRcIjpcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGlja1RyYW5zZm9ybSA9IGF4aXNZO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGluZUVudGVyLmF0dHIoXCJ4MlwiLCAtaW5uZXJUaWNrU2l6ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0RW50ZXIuYXR0cihcInhcIiwgLXRpY2tMZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGluZVVwZGF0ZS5hdHRyKFwieDJcIiwgLWlubmVyVGlja1NpemUpLmF0dHIoXCJ5MVwiLCB0aWNrWSkuYXR0cihcInkyXCIsIHRpY2tZKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRVcGRhdGUuYXR0cihcInhcIiwgLXRpY2tMZW5ndGgpLmF0dHIoXCJ5XCIsIHRpY2tPZmZzZXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dC5zdHlsZShcInRleHQtYW5jaG9yXCIsIFwiZW5kXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdHNwYW4uYXR0cigneCcsIC10aWNrTGVuZ3RoKS5hdHRyKFwiZHlcIiwgdHNwYW5EeSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBwYXRoVXBkYXRlLmF0dHIoXCJkXCIsIFwiTVwiICsgLW91dGVyVGlja1NpemUgKyBcIixcIiArIHJhbmdlWzBdICsgXCJIMFZcIiArIHJhbmdlWzFdICsgXCJIXCIgKyAtb3V0ZXJUaWNrU2l6ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNhc2UgXCJyaWdodFwiOlxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aWNrVHJhbnNmb3JtID0gYXhpc1k7XG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lRW50ZXIuYXR0cihcIngyXCIsIGlubmVyVGlja1NpemUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dEVudGVyLmF0dHIoXCJ4XCIsIHRpY2tMZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGluZVVwZGF0ZS5hdHRyKFwieDJcIiwgaW5uZXJUaWNrU2l6ZSkuYXR0cihcInkyXCIsIDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFVwZGF0ZS5hdHRyKFwieFwiLCB0aWNrTGVuZ3RoKS5hdHRyKFwieVwiLCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHQuc3R5bGUoXCJ0ZXh0LWFuY2hvclwiLCBcInN0YXJ0XCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdHNwYW4uYXR0cigneCcsIHRpY2tMZW5ndGgpLmF0dHIoXCJkeVwiLCB0c3BhbkR5KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhVcGRhdGUuYXR0cihcImRcIiwgXCJNXCIgKyBvdXRlclRpY2tTaXplICsgXCIsXCIgKyByYW5nZVswXSArIFwiSDBWXCIgKyByYW5nZVsxXSArIFwiSFwiICsgb3V0ZXJUaWNrU2l6ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc2NhbGUxLnJhbmdlQmFuZCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgeCA9IHNjYWxlMSwgZHggPSB4LnJhbmdlQmFuZCgpIC8gMjtcbiAgICAgICAgICAgICAgICAgICAgc2NhbGUwID0gc2NhbGUxID0gZnVuY3Rpb24gKGQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB4KGQpICsgZHg7XG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzY2FsZTAucmFuZ2VCYW5kKSB7XG4gICAgICAgICAgICAgICAgICAgIHNjYWxlMCA9IHNjYWxlMTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aWNrRXhpdC5jYWxsKHRpY2tUcmFuc2Zvcm0sIHNjYWxlMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRpY2tFbnRlci5jYWxsKHRpY2tUcmFuc2Zvcm0sIHNjYWxlMCk7XG4gICAgICAgICAgICAgICAgdGlja1VwZGF0ZS5jYWxsKHRpY2tUcmFuc2Zvcm0sIHNjYWxlMSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICBheGlzLnNjYWxlID0gZnVuY3Rpb24gKHgpIHtcbiAgICAgICAgICAgIGlmICghYXJndW1lbnRzLmxlbmd0aCkgeyByZXR1cm4gc2NhbGU7IH1cbiAgICAgICAgICAgIHNjYWxlID0geDtcbiAgICAgICAgICAgIHJldHVybiBheGlzO1xuICAgICAgICB9O1xuICAgICAgICBheGlzLm9yaWVudCA9IGZ1bmN0aW9uICh4KSB7XG4gICAgICAgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHsgcmV0dXJuIG9yaWVudDsgfVxuICAgICAgICAgICAgb3JpZW50ID0geCBpbiB7dG9wOiAxLCByaWdodDogMSwgYm90dG9tOiAxLCBsZWZ0OiAxfSA/IHggKyBcIlwiIDogXCJib3R0b21cIjtcbiAgICAgICAgICAgIHJldHVybiBheGlzO1xuICAgICAgICB9O1xuICAgICAgICBheGlzLnRpY2tGb3JtYXQgPSBmdW5jdGlvbiAoZm9ybWF0KSB7XG4gICAgICAgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHsgcmV0dXJuIHRpY2tGb3JtYXQ7IH1cbiAgICAgICAgICAgIHRpY2tGb3JtYXQgPSBmb3JtYXQ7XG4gICAgICAgICAgICByZXR1cm4gYXhpcztcbiAgICAgICAgfTtcbiAgICAgICAgYXhpcy50aWNrQ2VudGVyZWQgPSBmdW5jdGlvbiAoaXNDZW50ZXJlZCkge1xuICAgICAgICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSB7IHJldHVybiB0aWNrQ2VudGVyZWQ7IH1cbiAgICAgICAgICAgIHRpY2tDZW50ZXJlZCA9IGlzQ2VudGVyZWQ7XG4gICAgICAgICAgICByZXR1cm4gYXhpcztcbiAgICAgICAgfTtcbiAgICAgICAgYXhpcy50aWNrT2Zmc2V0ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRpY2tPZmZzZXQ7XG4gICAgICAgIH07XG4gICAgICAgIGF4aXMudGlja0ludGVydmFsID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGludGVydmFsLCBsZW5ndGg7XG4gICAgICAgICAgICBpZiAocGFyYW1zLmlzQ2F0ZWdvcnkpIHtcbiAgICAgICAgICAgICAgICBpbnRlcnZhbCA9IHRpY2tPZmZzZXQgKiAyO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgbGVuZ3RoID0gYXhpcy5nLnNlbGVjdCgncGF0aC5kb21haW4nKS5ub2RlKCkuZ2V0VG90YWxMZW5ndGgoKSAtIG91dGVyVGlja1NpemUgKiAyO1xuICAgICAgICAgICAgICAgIGludGVydmFsID0gbGVuZ3RoIC8gYXhpcy5nLnNlbGVjdEFsbCgnbGluZScpLnNpemUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBpbnRlcnZhbCA9PT0gSW5maW5pdHkgPyAwIDogaW50ZXJ2YWw7XG4gICAgICAgIH07XG4gICAgICAgIGF4aXMudGlja3MgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHsgcmV0dXJuIHRpY2tBcmd1bWVudHM7IH1cbiAgICAgICAgICAgIHRpY2tBcmd1bWVudHMgPSBhcmd1bWVudHM7XG4gICAgICAgICAgICByZXR1cm4gYXhpcztcbiAgICAgICAgfTtcbiAgICAgICAgYXhpcy50aWNrQ3VsbGluZyA9IGZ1bmN0aW9uIChjdWxsaW5nKSB7XG4gICAgICAgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHsgcmV0dXJuIHRpY2tDdWxsaW5nOyB9XG4gICAgICAgICAgICB0aWNrQ3VsbGluZyA9IGN1bGxpbmc7XG4gICAgICAgICAgICByZXR1cm4gYXhpcztcbiAgICAgICAgfTtcbiAgICAgICAgYXhpcy50aWNrVmFsdWVzID0gZnVuY3Rpb24gKHgpIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgeCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICAgIHRpY2tWYWx1ZXMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB4KHNjYWxlLmRvbWFpbigpKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKCFhcmd1bWVudHMubGVuZ3RoKSB7IHJldHVybiB0aWNrVmFsdWVzOyB9XG4gICAgICAgICAgICAgICAgdGlja1ZhbHVlcyA9IHg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gYXhpcztcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIGF4aXM7XG4gICAgfVxuXG4gICAgYzNfY2hhcnRfaW50ZXJuYWxfZm4uaXNTYWZhcmkgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciB1YSA9IHdpbmRvdy5uYXZpZ2F0b3IudXNlckFnZW50O1xuICAgICA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0aGlzLm51bWJlck9mSXRlbXM7XG4gICAgICAgICAgICAgaWYgKG5ld0l0ZW0uX293bmluZ1BhdGhTZWdMaXN0KSB7XG4gICAgICAgICAgICAgICAgIC8vIFNWRzIgc3BlYyBzYXlzIHRvIG1ha2UgYSBjb3B5LlxuICAgICAgICAgICAgICAgICBuZXdJdGVtID0gbmV3SXRlbS5jbG9uZSgpO1xuICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICB0aGlzLl9saXN0LnNwbGljZShpbmRleCwgMCwgbmV3SXRlbSk7XG4gICAgICAgICAgICAgbmV3SXRlbS5fb3duaW5nUGF0aFNlZ0xpc3QgPSB0aGlzO1xuICAgICAgICAgICAgIHRoaXMuX3dyaXRlTGlzdFRvUGF0aCgpO1xuICAgICAgICAgICAgIHJldHVybiBuZXdJdGVtO1xuICAgICAgICAgfVxuXG4gICAgICAgICBTVkdQYXRoU2VnTGlzdC5wcm90b3R5cGUucmVwbGFjZUl0ZW0gPSBmdW5jdGlvbihuZXdJdGVtLCBpbmRleCkge1xuICAgICAgICAgICAgIHRoaXMuX2NoZWNrUGF0aFN5bmNocm9uaXplZFRvTGlzdCgpO1xuXG4gICAgICAgICAgICAgaWYgKG5ld0l0ZW0uX293bmluZ1BhdGhTZWdMaXN0KSB7XG4gICAgICAgICAgICAgICAgIC8vIFNWRzIgc3BlYyBzYXlzIHRvIG1ha2UgYSBjb3B5LlxuICAgICAgICAgICAgICAgICBuZXdJdGVtID0gbmV3SXRlbS5jbG9uZSgpO1xuICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICB0aGlzLl9jaGVja1ZhbGlkSW5kZXgoaW5kZXgpO1xuICAgICAgICAgICAgIHRoaXMuX2xpc3RbaW5kZXhdID0gbmV3SXRlbTtcbiAgICAgICAgICAgICBuZXdJdGVtLl9vd25pbmdQYXRoU2VnTGlzdCA9IHRoaXM7XG4gICAgICAgICAgICAgdGhpcy5fd3JpdGVMaXN0VG9QYXRoKCk7XG4gICAgICAgICAgICAgcmV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goKTtcbiAgICAgICAgICAgICByZXR1cm4gbmV3SXRlbTtcbiAgICAgICAgIH1cblxuICAgICAgICAgU1ZHUGF0aFNlZ0xpc3QuX3BhdGhTZWdBcnJheUFzU3RyaW5nID0gZnVuY3Rpb24ocGF0aFNlZ0FycmF5KSB7XG4gICAgICAgICAgICAgdmFyIHN0cmluZyA9IFwiXCI7XG4gICAgICAgICAgICAgdmFyIGZpcnN0ID0gdHJ1ZTtcbiAgICAgICAgICAgICBwYXRoU2VnQXJyYXkuZm9yRWFjaChmdW5jdGlvbihwYXRoU2VnKSB7XG4gICAgICAgICAgICAgICAgIGlmIChmaXJzdCkge1xuICAgICAgICAgICAgICAgICAgICAgZmlyc3QgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBwYXRoU2VnLl9hc1BhdGhTdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBcIiBcIiArIHBhdGhTZWcuX2FzUGF0aFN0cmluZygpO1xuICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgcmV0dXJuIHN0cmluZztcbiAgICAgICAgIH1cblxuICAgICAgICAgLy8gVGhpcyBjbG9zZWx5IGZvbGxvd3MgU1ZHUGF0aFBhcnNlcjo6cGFyc2VQYXRoIGZyb20gU291cmNlL2NvcmUvc3ZnL1NWR1BhdGhQYXJzZXIuY3BwLlxuICAgICAgICAgU1ZHUGF0aFNlZ0xpc3QucHJvdG90eXBlLl9wYXJzZVBhdGggPSBmdW5jdGlvbihzdHJpbmcpIHtcbiAgICAgICAgICAgICBpZiAoIXN0cmluZyB8fCBzdHJpbmcubGVuZ3RoID09IDApXG4gICAgICAgICAgICAgICAgIHJldHVybiBbXTtcblxuICAgICAgICAgICAgIHZhciBvd25pbmdQYXRoU2VnTGlzdCA9IHRoaXM7XG5cbiAgICAgICAgICAgICB2YXIgQnVpbGRlciA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICB0aGlzLnBhdGhTZWdMaXN0ID0gW107XG4gICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgQnVpbGRlci5wcm90b3R5cGUuYXBwZW5kU2VnbWVudCA9IGZ1bmN0aW9uKHBhdGhTZWcpIHtcbiAgICAgICAgICAgICAgICAgdGhpcy5wYXRoU2VnTGlzdC5wdXNoKHBhdGhTZWcpO1xuICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgIHZhciBTb3VyY2UgPSBmdW5jdGlvbihzdHJpbmcpIHtcbiAgICAgICAgICAgICAgICAgdGhpcy5fc3RyaW5nID0gc3RyaW5nO1xuICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50SW5kZXggPSAwO1xuICAgICAgICAgICAgICAgICB0aGlzLl9lbmRJbmRleCA9IHRoaXMuX3N0cmluZy5sZW5ndGg7XG4gICAgICAgICAgICAgICAgIHRoaXMuX3ByZXZpb3VzQ29tbWFuZCA9IFNWR1BhdGhTZWcuUEFUSFNFR19VTktOT1dOO1xuXG4gICAgICAgICAgICAgICAgIHRoaXMuX3NraXBPcHRpb25hbFNwYWNlcygpO1xuICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUuX2lzQ3VycmVudFNwYWNlID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgIHZhciBjaGFyYWN0ZXIgPSB0aGlzLl9zdHJpbmdbdGhpcy5fY3VycmVudEluZGV4XTtcbiAgICAgICAgICAgICAgICAgcmV0dXJuIGNoYXJhY3RlciA8PSBcIiBcIiAmJiAoY2hhcmFjdGVyID09IFwiIFwiIHx8IGNoYXJhY3RlciA9PSBcIlxcblwiIHx8IGNoYXJhY3RlciA9PSBcIlxcdFwiIHx8IGNoYXJhY3RlciA9PSBcIlxcclwiIHx8IGNoYXJhY3RlciA9PSBcIlxcZlwiKTtcbiAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICBTb3VyY2UucHJvdG90eXBlLl9za2lwT3B0aW9uYWxTcGFjZXMgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgd2hpbGUgKHRoaXMuX2N1cnJlbnRJbmRleCA8IHRoaXMuX2VuZEluZGV4ICYmIHRoaXMuX2lzQ3VycmVudFNwYWNlKCkpXG4gICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50SW5kZXgrKztcbiAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2N1cnJlbnRJbmRleCA8IHRoaXMuX2VuZEluZGV4O1xuICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUuX3NraXBPcHRpb25hbFNwYWNlc09yRGVsaW1pdGVyID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50SW5kZXggPCB0aGlzLl9lbmRJbmRleCAmJiAhdGhpcy5faXNDdXJyZW50U3BhY2UoKSAmJiB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgIT0gXCIsXCIpXG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgIGlmICh0aGlzLl9za2lwT3B0aW9uYWxTcGFjZXMoKSkge1xuICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2N1cnJlbnRJbmRleCA8IHRoaXMuX2VuZEluZGV4ICYmIHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSA9PSBcIixcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJbmRleCsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NraXBPcHRpb25hbFNwYWNlcygpO1xuICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9jdXJyZW50SW5kZXggPCB0aGlzLl9lbmRJbmRleDtcbiAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICBTb3VyY2UucHJvdG90eXBlLmhhc01vcmVEYXRhID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9jdXJyZW50SW5kZXggPCB0aGlzLl9lbmRJbmRleDtcbiAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICBTb3VyY2UucHJvdG90eXBlLnBlZWtTZWdtZW50VHlwZSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICB2YXIgbG9va2FoZWFkID0gdGhpcy5fc3RyaW5nW3RoaXMuX2N1cnJlbnRJbmRleF07XG4gICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9wYXRoU2VnVHlwZUZyb21DaGFyKGxvb2thaGVhZCk7XG4gICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgU291cmNlLnByb3RvdHlwZS5fcGF0aFNlZ1R5cGVGcm9tQ2hhciA9IGZ1bmN0aW9uKGxvb2thaGVhZCkge1xuICAgICAgICAgICAgICAgICBzd2l0Y2ggKGxvb2thaGVhZCkge1xuICAgICAgICAgICAgICAgICBjYXNlIFwiWlwiOlxuICAgICAgICAgICAgICAgICBjYXNlIFwielwiOlxuICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19DTE9TRVBBVEg7XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJNXCI6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX01PVkVUT19BQlM7XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJtXCI6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX01PVkVUT19SRUw7XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJMXCI6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0xJTkVUT19BQlM7XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJsXCI6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0xJTkVUT19SRUw7XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJDXCI6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0NVUlZFVE9fQ1VCSUNfQUJTO1xuICAgICAgICAgICAgICAgICBjYXNlIFwiY1wiOlxuICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19DVVJWRVRPX0NVQklDX1JFTDtcbiAgICAgICAgICAgICAgICAgY2FzZSBcIlFcIjpcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfQ1VSVkVUT19RVUFEUkFUSUNfQUJTO1xuICAgICAgICAgICAgICAgICBjYXNlIFwicVwiOlxuICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19DVVJWRVRPX1FVQURSQVRJQ19SRUw7XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJBXCI6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0FSQ19BQlM7XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJhXCI6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0FSQ19SRUw7XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJIXCI6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0xJTkVUT19IT1JJWk9OVEFMX0FCUztcbiAgICAgICAgICAgICAgICAgY2FzZSBcImhcIjpcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfTElORVRPX0hPUklaT05UQUxfUkVMO1xuICAgICAgICAgICAgICAgICBjYXNlIFwiVlwiOlxuICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19MSU5FVE9fVkVSVElDQUxfQUJTO1xuICAgICAgICAgICAgICAgICBjYXNlIFwidlwiOlxuICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19MSU5FVE9fVkVSVElDQUxfUkVMO1xuICAgICAgICAgICAgICAgICBjYXNlIFwiU1wiOlxuICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19DVVJWRVRPX0NVQklDX1NNT09USF9BQlM7XG4gICAgICAgICAgICAgICAgIGNhc2UgXCJzXCI6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0NVUlZFVE9fQ1VCSUNfU01PT1RIX1JFTDtcbiAgICAgICAgICAgICAgICAgY2FzZSBcIlRcIjpcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfQ1VSVkVUT19RVUFEUkFUSUNfU01PT1RIX0FCUztcbiAgICAgICAgICAgICAgICAgY2FzZSBcInRcIjpcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfQ1VSVkVUT19RVUFEUkFUSUNfU01PT1RIX1JFTDtcbiAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfVU5LTk9XTjtcbiAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUuX25leHRDb21tYW5kSGVscGVyID0gZnVuY3Rpb24obG9va2FoZWFkLCBwcmV2aW91c0NvbW1hbmQpIHtcbiAgICAgICAgICAgICAgICAgLy8gQ2hlY2sgZm9yIHJlbWFpbmluZyBjb29yZGluYXRlcyBpbiB0aGUgY3VycmVudCBjb21tYW5kLlxuICAgICAgICAgICAgICAgICBpZiAoKGxvb2thaGVhZCA9PSBcIitcIiB8fCBsb29rYWhlYWQgPT0gXCItXCIgfHwgbG9va2FoZWFkID09IFwiLlwiIHx8IChsb29rYWhlYWQgPj0gXCIwXCIgJiYgbG9va2FoZWFkIDw9IFwiOVwiKSkgJiYgcHJldmlvdXNDb21tYW5kICE9IFNWR1BhdGhTZWcuUEFUSFNFR19DTE9TRVBBVEgpIHtcbiAgICAgICAgICAgICAgICAgICAgIGlmIChwcmV2aW91c0NvbW1hbmQgPT0gU1ZHUGF0aFNlZy5QQVRIU0VHX01PVkVUT19BQlMpXG4gICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNWR1BhdGhTZWcuUEFUSFNFR19MSU5FVE9fQUJTO1xuICAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZpb3VzQ29tbWFuZCA9PSBTVkdQYXRoU2VnLlBBVEhTRUdfTU9WRVRPX1JFTClcbiAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU1ZHUGF0aFNlZy5QQVRIU0VHX0xJTkVUT19SRUw7XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHJldmlvdXNDb21tYW5kO1xuICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgIHJldHVybiBTVkdQYXRoU2VnLlBBVEhTRUdfVU5LTk9XTjtcbiAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICBTb3VyY2UucHJvdG90eXBlLmluaXRpYWxDb21tYW5kSXNNb3ZlVG8gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgLy8gSWYgdGhlIHBhdGggaXMgZW1wdHkgaXQgaXMgc3RpbGwgdmFsaWQsIHNvIHJldHVybiB0cnVlLlxuICAgICAgICAgICAgICAgICBpZiAoIXRoaXMuaGFzTW9yZURhdGEoKSlcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgICB2YXIgY29tbWFuZCA9IHRoaXMucGVla1NlZ21lbnRUeXBlKCk7XG4gICAgICAgICAgICAgICAgIC8vIFBhdGggbXVzdCBzdGFydCB3aXRoIG1vdmVUby5cbiAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbW1hbmQgPT0gU1ZHUGF0aFNlZy5QQVRIU0VHX01PVkVUT19BQlMgfHwgY29tbWFuZCA9PSBTVkdQYXRoU2VnLlBBVEhTRUdfTU9WRVRPX1JFTDtcbiAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAvLyBQYXJzZSBhIG51bWJlciBmcm9tIGFuIFNWRyBwYXRoLiBUaGlzIHZlcnkgY2xvc2VseSBmb2xsb3dzIGdlbmVyaWNQYXJzZU51bWJlciguLi4pIGZyb20gU291cmNlL2NvcmUvc3ZnL1NWR1BhcnNlclV0aWxpdGllcy5jcHAuXG4gICAgICAgICAgICAgLy8gU3BlYzogaHR0cDovL3d3dy53My5vcmcvVFIvU1ZHMTEvc2luZ2xlLXBhZ2UuaHRtbCNwYXRocy1QYXRoRGF0YUJORlxuICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUuX3BhcnNlTnVtYmVyID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgIHZhciBleHBvbmVudCA9IDA7XG4gICAgICAgICAgICAgICAgIHZhciBpbnRlZ2VyID0gMDtcbiAgICAgICAgICAgICAgICAgdmFyIGZyYWMgPSAxO1xuICAgICAgICAgICAgICAgICB2YXIgZGVjaW1hbCA9IDA7XG4gICAgICAgICAgICAgICAgIHZhciBzaWduID0gMTtcbiAgICAgICAgICAgICAgICAgdmFyIGV4cHNpZ24gPSAxO1xuXG4gICAgICAgICAgICAgICAgIHZhciBzdGFydEluZGV4ID0gdGhpcy5fY3VycmVudEluZGV4O1xuXG4gICAgICAgICAgICAgICAgIHRoaXMuX3NraXBPcHRpb25hbFNwYWNlcygpO1xuXG4gICAgICAgICAgICAgICAgIC8vIFJlYWQgdGhlIHNpZ24uXG4gICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50SW5kZXggPCB0aGlzLl9lbmRJbmRleCAmJiB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPT0gXCIrXCIpXG4gICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50SW5kZXgrKztcbiAgICAgICAgICAgICAgICAgZWxzZSBpZiAodGhpcy5fY3VycmVudEluZGV4IDwgdGhpcy5fZW5kSW5kZXggJiYgdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpID09IFwiLVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50SW5kZXgrKztcbiAgICAgICAgICAgICAgICAgICAgIHNpZ24gPSAtMTtcbiAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50SW5kZXggPT0gdGhpcy5fZW5kSW5kZXggfHwgKCh0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPCBcIjBcIiB8fCB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPiBcIjlcIikgJiYgdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpICE9IFwiLlwiKSlcbiAgICAgICAgICAgICAgICAgICAgIC8vIFRoZSBmaXJzdCBjaGFyYWN0ZXIgb2YgYSBudW1iZXIgbXVzdCBiZSBvbmUgb2YgWzAtOSstLl0uXG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuXG4gICAgICAgICAgICAgICAgIC8vIFJlYWQgdGhlIGludGVnZXIgcGFydCwgYnVpbGQgcmlnaHQtdG8tbGVmdC5cbiAgICAgICAgICAgICAgICAgdmFyIHN0YXJ0SW50UGFydEluZGV4ID0gdGhpcy5fY3VycmVudEluZGV4O1xuICAgICAgICAgICAgICAgICB3aGlsZSAodGhpcy5fY3VycmVudEluZGV4IDwgdGhpcy5fZW5kSW5kZXggJiYgdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpID49IFwiMFwiICYmIHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSA8PSBcIjlcIilcbiAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJbmRleCsrOyAvLyBBZHZhbmNlIHRvIGZpcnN0IG5vbi1kaWdpdC5cblxuICAgICAgICAgICAgICAgICBpZiAodGhpcy5fY3VycmVudEluZGV4ICE9IHN0YXJ0SW50UGFydEluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgICB2YXIgc2NhbkludFBhcnRJbmRleCA9IHRoaXMuX2N1cnJlbnRJbmRleCAtIDE7XG4gICAgICAgICAgICAgICAgICAgICB2YXIgbXVsdGlwbGllciA9IDE7XG4gICAgICAgICAgICAgICAgICAgICB3aGlsZSAoc2NhbkludFBhcnRJbmRleCA+PSBzdGFydEludFBhcnRJbmRleCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgIGludGVnZXIgKz0gbXVsdGlwbGllciAqICh0aGlzLl9zdHJpbmcuY2hhckF0KHNjYW5JbnRQYXJ0SW5kZXgtLSkgLSBcIjBcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgbXVsdGlwbGllciAqPSAxMDtcbiAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgIC8vIFJlYWQgdGhlIGRlY2ltYWxzLlxuICAgICAgICAgICAgICAgICBpZiAodGhpcy5fY3VycmVudEluZGV4IDwgdGhpcy5fZW5kSW5kZXggJiYgdGhpcy5fc3RyaW5nLmNoY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mVudEluZGV4KSA9PSBcImVcIiB8fCB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPT0gXCJFXCIpICYmICh0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCArIDEpICE9IFwieFwiICYmIHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4ICsgMSkgIT0gXCJtXCIpKSB7XG4gICAgICAgICAgICAgICAgICAgICB0aGlzLl9jdXJyZW50SW5kZXgrKztcblxuICAgICAgICAgICAgICAgICAgICAgLy8gUmVhZCB0aGUgc2lnbiBvZiB0aGUgZXhwb25lbnQuXG4gICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpID09IFwiK1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY3VycmVudEluZGV4Kys7XG4gICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSA9PSBcIi1cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJbmRleCsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgIGV4cHNpZ24gPSAtMTtcbiAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgLy8gVGhlcmUgbXVzdCBiZSBhbiBleHBvbmVudC5cbiAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50SW5kZXggPj0gdGhpcy5fZW5kSW5kZXggfHwgdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpIDwgXCIwXCIgfHwgdGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpID4gXCI5XCIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcblxuICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHRoaXMuX2N1cnJlbnRJbmRleCA8IHRoaXMuX2VuZEluZGV4ICYmIHRoaXMuX3N0cmluZy5jaGFyQXQodGhpcy5fY3VycmVudEluZGV4KSA+PSBcIjBcIiAmJiB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCkgPD0gXCI5XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICBleHBvbmVudCAqPSAxMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICBleHBvbmVudCArPSAodGhpcy5fc3RyaW5nLmNoYXJBdCh0aGlzLl9jdXJyZW50SW5kZXgpIC0gXCIwXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJbmRleCsrO1xuICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgdmFyIG51bWJlciA9IGludGVnZXIgKyBkZWNpbWFsO1xuICAgICAgICAgICAgICAgICBudW1iZXIgKj0gc2lnbjtcblxuICAgICAgICAgICAgICAgICBpZiAoZXhwb25lbnQpXG4gICAgICAgICAgICAgICAgICAgICBudW1iZXIgKj0gTWF0aC5wb3coMTAsIGV4cHNpZ24gKiBleHBvbmVudCk7XG5cbiAgICAgICAgICAgICAgICAgaWYgKHN0YXJ0SW5kZXggPT0gdGhpcy5fY3VycmVudEluZGV4KVxuICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcblxuICAgICAgICAgICAgICAgICB0aGlzLl9za2lwT3B0aW9uYWxTcGFjZXNPckRlbGltaXRlcigpO1xuXG4gICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXI7XG4gICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgU291cmNlLnByb3RvdHlwZS5fcGFyc2VBcmNGbGFnID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jdXJyZW50SW5kZXggPj0gdGhpcy5fZW5kSW5kZXgpXG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICB2YXIgZmxhZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICB2YXIgZmxhZ0NoYXIgPSB0aGlzLl9zdHJpbmcuY2hhckF0KHRoaXMuX2N1cnJlbnRJbmRleCsrKTtcbiAgICAgICAgICAgICAgICAgaWYgKGZsYWdDaGFyID09IFwiMFwiKVxuICAgICAgICAgICAgICAgICAgICAgZmxhZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICBlbHNlIGlmIChmbGFnQ2hhciA9PSBcIjFcIilcbiAgICAgICAgICAgICAgICAgICAgIGZsYWcgPSB0cnVlO1xuICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuXG4gICAgICAgICAgICAgICAgIHRoaXMuX3NraXBPcHRpb25hbFNwYWNlc09yRGVsaW1pdGVyKCk7XG4gICAgICAgICAgICAgICAgIHJldHVybiBmbGFnO1xuICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgIFNvdXJjZS5wcm90b3R5cGUucGFyc2VTZWdtZW50ID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgIHZhciBsb29rYWhlYWQgPSB0aGlzLl9zdHJpbmdbdGhpcy5fY3VycmVudEluZGV4XTtcbiAgICAgICAgICAgICAgICAgdmFyIGNvbW1hbmQgPSB0aGlzLl9wYXRoU2VnVHlwZUZyb21DaGFyKGxvb2thaGVhZCk7XG4gICAgICAgICAgICAgICAgIGlmIChjb21tYW5kID09IFNWR1BhdGhTZWcuUEFUSFNFR19VTktOT1dOKSB7XG4gICAgICAgICAgICAgICAgICAgICAvLyBQb3NzaWJseSBhbiBpbXBsaWNpdCBjb21tYW5kLiBOb3QgYWxsb3dlZCBpZiB0aGlzIGlzIHRoZSBmaXJzdCBjb21tYW5kLlxuICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX3ByZXZpb3VzQ29tbWFuZCA9PSBTVkdQYXRoU2VnLlBBVEhTRUdfVU5LTk9XTilcbiAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgIGNvbW1hbmQgPSB0aGlzLl9uZXh0Q29tbWFuZEhlbHBlcihsb29rYWhlYWQsIHRoaXMuX3ByZXZpb3VzQ29tbWFuZCk7XG4gICAgICAgICAgICAgICAgICAgICBpZiAoY29tbWFuZCA9PSBTVkdQYXRoU2VnLlBBVEhTRUdfVU5LTk9XTilcbiAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2N1cnJlbnRJbmRleCsrO1xuICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgdGhpcy5fcHJldmlvdXNDb21tYW5kID0gY29tbWFuZDtcblxuICAgICAgICAgICAgICAgICBzd2l0Y2ggKGNvbW1hbmQpIHtcbiAgICAgICAgICAgICAgICAgY2FzZSBTVkdQYXRoU2VnLlBBVEhTRUdfTU9WRVRPX1JFTDpcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXcgU1ZHUGF0aFNlZ01vdmV0b1JlbChvd25pbmdQYXRoU2VnTGlzdCwgdGhpcy5fcGFyc2VOdW1iZXIoKSwgdGhpcy5fcGFyc2VOdW1iZXIoKSk7XG4gICAgICAgICAgICAgICAgIGNhc2UgU1ZHUGF0aFNlZy5QQVRIU0VHX01PVkVUT19BQlM6XG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFNWR1BhdGhTZWdNb3ZldG9BYnMob3duaW5nUGF0aFNlZ0xpc3QsIHRoaXMuX3BhcnNlTnVtYmVyKCksIHRoaXMuX3BhcnNlTnVt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bWl6ZXIgPSAhY3VzdG9taXplcjtcblxuICAgICAgaWYgKG9iamVjdCA9PSBudWxsKSB7XG4gICAgICAgIHJldHVybiAhbGVuZ3RoO1xuICAgICAgfVxuICAgICAgb2JqZWN0ID0gT2JqZWN0KG9iamVjdCk7XG4gICAgICB3aGlsZSAoaW5kZXgtLSkge1xuICAgICAgICB2YXIgZGF0YSA9IG1hdGNoRGF0YVtpbmRleF07XG4gICAgICAgIGlmICgobm9DdXN0b21pemVyICYmIGRhdGFbMl0pXG4gICAgICAgICAgICAgID8gZGF0YVsxXSAhPT0gb2JqZWN0W2RhdGFbMF1dXG4gICAgICAgICAgICAgIDogIShkYXRhWzBdIGluIG9iamVjdClcbiAgICAgICAgICAgICkge1xuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgZGF0YSA9IG1hdGNoRGF0YVtpbmRleF07XG4gICAgICAgIHZhciBrZXkgPSBkYXRhWzBdLFxuICAgICAgICAgICAgb2JqVmFsdWUgPSBvYmplY3Rba2V5XSxcbiAgICAgICAgICAgIHNyY1ZhbHVlID0gZGF0YVsxXTtcblxuICAgICAgICBpZiAobm9DdXN0b21pemVyICYmIGRhdGFbMl0pIHtcbiAgICAgICAgICBpZiAob2JqVmFsdWUgPT09IHVuZGVmaW5lZCAmJiAhKGtleSBpbiBvYmplY3QpKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHZhciBzdGFjayA9IG5ldyBTdGFjaztcbiAgICAgICAgICBpZiAoY3VzdG9taXplcikge1xuICAgICAgICAgICAgdmFyIHJlc3VsdCA9IGN1c3RvbWl6ZXIob2JqVmFsdWUsIHNyY1ZhbHVlLCBrZXksIG9iamVjdCwgc291cmNlLCBzdGFjayk7XG4gICAgICAgICAgfVxuICAgICAgICAgI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dChhcnJheSwgaW5kZXhlcykge1xuICAgICAgdmFyIGxlbmd0aCA9IGFycmF5ID8gaW5kZXhlcy5sZW5ndGggOiAwLFxuICAgICAgICAgIGxhc3RJbmRleCA9IGxlbmd0aCAtIDE7XG5cbiAgICAgIHdoaWxlIChsZW5ndGgtLSkge1xuICAgICAgICB2YXIgaW5kZXggPSBpbmRleGVzW2xlbmd0aF07XG4gICAgICAgIGlmIChsZW5ndGggPT0gbGFzdEluZGV4IHx8IGluZGV4ICE9PSBwcmV2aW91cykge1xuICAgICAgICAgIHZhciBwcmV2aW91cyA9IGluZGV4O1xuICAgICAgICAgIGlmIChpc0luZGV4KGluZGV4KSkge1xuICAgICAgICAgICAgc3BsaWNlLmNhbGwoYXJyYXksIGluZGV4LCAxKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgYmFzZVVuc2V0KGFycmF5LCBpbmRleCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gYXJyYXk7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRpb24gb2YgYF8ucmFuZG9tYCB3aXRob3V0IHN1cHBvcnQgZm9yIHJldHVybmluZ1xuICAgICAqIGZsb2F0aW5nLXBvaW50IG51bWJlcnMuXG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqIEBwYXJhbSB7bnVtYmVyfSBsb3dlciBUaGUgbG93ZXIgYm91bmQuXG4gICAgICogQHBhcmFtIHtudW1iZXJ9IHVwcGVyIFRoZSB1cHBlciBib3VuZC5cbiAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSByYW5kb20gbnVtYmVyLlxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGJhc2VSYW5kb20obG93ZXIsIHVwcGVyKSB7XG4gICAgICByZXR1cm4gbG93ZXIgKyBuYXRpdmVGbG9vcihuYXRpdmVSYW5kb20oKSAqICh1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ICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHJldHVybiBvYmplY3Q7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQ29waWVzIG93biBzeW1ib2xzIG9mIGBzb3VyY2VgIHRvIGBvYmplY3RgLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gc291cmNlIFRoZSBvYmplY3QgdG8gY29weSBzeW1ib2xzIGZyb20uXG4gICAgICogQHBhcmFtIHtPYmplY3R9IFtvYmplY3Q9e31dIFRoZSBvYmplY3QgdG8gY29weSBzeW1ib2xzIHRvLlxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgYG9iamVjdGAuXG4gICAgICovXG4gICAgZnVuY3Rpb24gY29weVN5bWJvbHMoc291cmNlLCBvYmplY3QpIHtcbiAgICAgIHJldHVybiBjb3B5T2JqZWN0KHNvdXJjZSwgZ2V0U3ltYm9scyhzb3VyY2UpLCBvYmplY3QpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIENvcGllcyBvd24gYW5kIGluaGVyaXRlZCBzeW1ib2xzIG9mIGBzb3VyY2VgIHRvIGBvYmplY3RgLlxuICAgICAqXG4gICAgICogQHByaXZhdGVcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gc291cmNlIFRoZSBvYmplY3QgdG8gY29weSBzeW1ib2xzIGZyb20uXG4gICAgICogQHBhcmFtIHtPYmplY3R9IFtvYmplY3Q9e31dIFRoZSBvYmplY3QgdG8gY29weSBzeW1ib2xzIHRvLlxuICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgYG9iamVjdGAuXG4gICAgICovXG4gICAgZnVuY3Rpb24gY29weVN5bWJvbHNJbihzb3VyY2UsIG9iamVjdCkge1xuICAgICAgcmV0dXJuIGNvcHlPYmplY3Qoc291cmNlLCBnZXRTeW1ib2xzSW4oc291cmNlKSwgb2JqZWN0KTtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBDc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JyA/IGdldERhdGEoZnVuYykgOiB1bmRlZmluZWQ7XG5cbiAgICAgICAgICBpZiAoZGF0YSAmJiBpc0xhemlhYmxlKGRhdGFbMF0pICYmXG4gICAgICAgICAgICAgICAgZGF0YVsxXSA9PSAoV1JBUF9BUllfRkxBRyB8IFdSQVBfQ1VSUllfRkxBRyB8IFdSQVBfUEFSVElBTF9GTEFHIHwgV1JBUF9SRUFSR19GTEFHKSAmJlxuICAgICAgICAgICAgICAgICFkYXRhWzRdLmxlbmd0aCAmJiBkYXRhWzldID09IDFcbiAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICB3cmFwcGVyID0gd3JhcHBlcltnZXRGdW5jTmFtZShkYXRhWzBdKV0uYXBwbHkod3JhcHBlciwgZGF0YVszXSk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHdyYXBwZXIgPSAoZnVuYy5sZW5ndGggPT0gMSAmJiBpc0xhemlhYmxlKGZ1bmMpKVxuICAgICAgICAgICAgICA/IHdyYXBwZXJbZnVuY05hbWVdKClcbiAgICAgICAgICAgICAgOiB3cmFwcGVyLnRocnUoZnVuYyk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmdW5jdGlvbigpIHtcbiAgICAgICAgICB2YXIgYXJncyA9IGFyZ3VtZW50cyxcbiAgICAgICAgICAgICAgdmFsdWUgPSBhcmdzWzBdO1xuXG4gICAgICAgICAgaWYgKHdyYXBwZXIgJiYgYXJncy5sZW5ndGggPT0gMSAmJiBpc0FycmF5KHZhbHVlKSkge1xuICAgICAgICAgICAgcmV0dXJuIHdyYXBwZXIucGxhbnQodmFsdWUpLnZhbHVlKCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHZhciBpbmRleCA9IDAsXG4gICAgICAgICAgICAgIHJlc3VsdCA9IGxlbmd0aCA/IGZ1bmNzW2luZGV4XS5hcHBseSh0aGlzLCBhcmdzKSA6IHZhbHVlO1xuXG4gICAgICAgICAgd2hpbG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gPSBvdGhlcltpbmRleF07XG5cbiAgICAgICAgaWYgKGN1c3RvbWl6ZXIpIHtcbiAgICAgICAgICB2YXIgY29tcGFyZWQgPSBpc1BhcnRpYWxcbiAgICAgICAgICAgID8gY3VzdG9taXplcihvdGhWYWx1ZSwgYXJyVmFsdWUsIGluZGV4LCBvdGhlciwgYXJyYXksIHN0YWNrKVxuICAgICAgICAgICAgOiBjdXN0b21pemVyKGFyclZhbHVlLCBvdGhWYWx1ZSwgaW5kZXgsIGFycmF5LCBvdGhlciwgc3RhY2spO1xuICAgICAgICB9XG4gICAgICAgIGlmIChjb21wYXJlZCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgaWYgKGNvbXBhcmVkKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmVzdWx0ID0gZmFsc2U7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgLy8gUmVjdXJzaXZlbHkgY29tcGFyZSBhcnJheXMgKHN1c2NlcHRpYmxlIHRvIGNhbGwgc3RhY2sgbGltaXRzKS5cbiAgICAgICAgaWYgKHNlZW4pIHtcbiAgICAgICAgICBpZiAoIWFycmF5U29tZShvdGhlciwgZnVuY3Rpb24ob3RoVmFsdWUsIG90aEluZGV4KSB7XG4gICAgICAgICAgICAgICAgaWYgKCFjYWNoZUhhcyhzZWVuLCBvdGhJbmRleCkgJiZcbiAgICAgICAgICAgICAgICAgICAgKGFyclZhbHVlID09PSBvdGhWYWx1ZSB8fCBlcXVhbEZ1bmMoYXJyVmFsdWUsIG90aFZhbHVlLCBiaXRtYXNrLCBjdXN0b21pemVyLCBzdGFjaykpKSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4gc2Vlbi5wdXNoKG90aEluZGV4KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pKSB7XG4gICAgICAgICAgICByZXN1bHQgPSBmYWxzZTtcbiAgICAgICAgICAgIGJyZW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lxuICAgICAgICAgIHZhciBjb252ZXJ0ID0gbWFwVG9BcnJheTtcblxuICAgICAgICBjYXNlIHNldFRhZzpcbiAgICAgICAgICB2YXIgaXNQYXJ0aWFsID0gYml0bWFzayAmIENPTVBBUkVfUEFSVElBTF9GTEFHO1xuICAgICAgICAgIGNvbnZlcnQgfHwgKGNvbnZlcnQgPSBzZXRUb0FycmF5KTtcblxuICAgICAgICAgIGlmIChvYmplY3Quc2l6ZSAhPSBvdGhlci5zaXplICYmICFpc1BhcnRpYWwpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICB9XG4gICAgICAgICAgLy8gQXNzdW1lIGN5Y2xpYyB2YWx1ZXMgYXJlIGVxdWFsLlxuICAgICAgICAgIHZhciBzdGFja2VkID0gc3RhY2suZ2V0KG9iamVjdCk7XG4gICAgICAgICAgaWYgKHN0YWNrZWQpIHtcbiAgICAgICAgICAgIHJldHVybiBzdGFja2VkID09IG90aGVyO1xuICAgICAgICAgIH1cbiAgICAgICAgICBiaXRtYXNrIHw9IENPTVBBUkVfVU5PUkRFUkVEX0ZMQUc7XG5cbiAgICAgICAgICAvLyBSZWN1cnNpdmVseSBjb21wYXJlIG9iamVjdHMgKHN1c2NlcHRpYmxlIHRvIGNhbGwgc3RhY2sgbGltaXRzKS5cbiAgICAgICAgICBzdGFjay5zZXQob2JqZWN0LCBvdGhlcik7XG4gICAgICAgICAgdmFyIHJlc3VsdCA9IGVxdWFsQXJyYXlzKGNvbnZlcnQob2JqZWN0KSwgY29udmVydChvdGhlciksIGJpdG1hc2ssIGN1c3RvbWl6ZXIsIGVxdWFsRnVuYywgc3RhY2spO1xuICAgICAgICAgIHN0YWNrWydkZWxldGUnXShvYmplY3QpO1xuICAgICAgICAgIHJldHVybiByZXN1bHQ7XG5cbiAgICAgICAgY2FzZSBzeW1ib2xUYWc6XG4gICAgICAgICAgaWYgKHN5bWJvbFZhbHVlT2YpIHtcbiAgICAgICAgICAgIHJldHVybiBzeW1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b3IgPSBpc1BhcnRpYWw7XG4gICAgICB3aGlsZSAoKytpbmRleCA8IG9iakxlbmd0aCkge1xuICAgICAgICBrZXkgPSBvYmpQcm9wc1tpbmRleF07XG4gICAgICAgIHZhciBvYmpWYWx1ZSA9IG9iamVjdFtrZXldLFxuICAgICAgICAgICAgb3RoVmFsdWUgPSBvdGhlcltrZXldO1xuXG4gICAgICAgIGlmIChjdXN0b21pemVyKSB7XG4gICAgICAgICAgdmFyIGNvbXBhcmVkID0gaXNQYXJ0aWFsXG4gICAgICAgICAgICA/IGN1c3RvbWl6ZXIob3RoVmFsdWUsIG9ialZhbHVlLCBrZXksIG90aGVyLCBvYmplY3QsIHN0YWNrKVxuICAgICAgICAgICAgOiBjdXN0b21pemVyKG9ialZhbHVlLCBvdGhWYWx1ZSwga2V5LCBvYmplY3QsIG90aGVyLCBzdGFjayk7XG4gICAgICAgIH1cbiAgICAgICAgLy8gUmVjdXJzaXZlbHkgY29tcGFyZSBvYmplY3RzIChzdXNjZXB0aWJsZSB0byBjYWxsIHN0YWNrIGxpbWl0cykuXG4gICAgICAgIGlmICghKGNvbXBhcmVkID09PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgPyAob2JqVmFsdWUgPT09IG90aFZhbHVlIHx8IGVxdWFsRnVuYyhvYmpWYWx1ZSwgb3RoVmFsdWUsIGJpdG1hc2ssIGN1c3RvbWl6ZXIsIHN0YWNrKSlcbiAgICAgICAgICAgICAgOiBjb21wYXJlZFxuICAgICAgICAgICAgKSkge1xuICAgICAgICAgIHJlc3VsdCA9IGZhbHNlO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIHNraXBDdG9yIHx8IChza2lwQ3RvciA9IGtleSA9PSAnY29uc3RydWN0b3InKTtcbiAgICAgIH1cbiAgICAgIGlmIChyZXN1bHQgJiYgIXNraXBDdG9yKSB7XG4gICAgICAgIHZhciBvYmpDdG9yID0gb2JqZWN0LmNvbnN0cnVjdG9yLFxuICAgICAgICA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bmN0aW9uIGludm9rZWQgcGVyIGl0ZXJhdGlvbi5cbiAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG5ldyBhcnJheSBvZiByZW1vdmVkIGVsZW1lbnRzLlxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiB2YXIgYXJyYXkgPSBbMSwgMiwgMywgNF07XG4gICAgICogdmFyIGV2ZW5zID0gXy5yZW1vdmUoYXJyYXksIGZ1bmN0aW9uKG4pIHtcbiAgICAgKiAgIHJldHVybiBuICUgMiA9PSAwO1xuICAgICAqIH0pO1xuICAgICAqXG4gICAgICogY29uc29sZS5sb2coYXJyYXkpO1xuICAgICAqIC8vID0+IFsxLCAzXVxuICAgICAqXG4gICAgICogY29uc29sZS5sb2coZXZlbnMpO1xuICAgICAqIC8vID0+IFsyLCA0XVxuICAgICAqL1xuICAgIGZ1bmN0aW9uIHJlbW92ZShhcnJheSwgcHJlZGljYXRlKSB7XG4gICAgICB2YXIgcmVzdWx0ID0gW107XG4gICAgICBpZiAoIShhcnJheSAmJiBhcnJheS5sZW5ndGgpKSB7XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICB9XG4gICAgICB2YXIgaW5kZXggPSAtMSxcbiAgICAgICAgICBpbmRleGVzID0gW10sXG4gICAgICAgICAgbGVuZ3RoID0gYXJyYXkubGVuZ3RoO1xuXG4gICAgICBwcmVkaWNhdGUgPSBnZXRJdGVyYXRlZShwcmVkaWNhdGUsIDMpO1xuICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHtcbiAgICAgICAgdmFyIHZhbHVlID0gYXJyYXlbaW5kZXhdO1xuICAgICAgICBpZiAocHJlZGljYXRlKHZhbHVlLCBpbmRleCwgYXJyYXkpKSB7XG4gICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpO1xuICAgICAgICAgIGluZGV4ZXMucHVzaChpbmRleCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGJhc2VQd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b259IFJldHVybnMgdGhlIG5ldyBib3VuZCBmdW5jdGlvbi5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogdmFyIG9iamVjdCA9IHtcbiAgICAgKiAgICd1c2VyJzogJ2ZyZWQnLFxuICAgICAqICAgJ2dyZWV0JzogZnVuY3Rpb24oZ3JlZXRpbmcsIHB1bmN0dWF0aW9uKSB7XG4gICAgICogICAgIHJldHVybiBncmVldGluZyArICcgJyArIHRoaXMudXNlciArIHB1bmN0dWF0aW9uO1xuICAgICAqICAgfVxuICAgICAqIH07XG4gICAgICpcbiAgICAgKiB2YXIgYm91bmQgPSBfLmJpbmRLZXkob2JqZWN0LCAnZ3JlZXQnLCAnaGknKTtcbiAgICAgKiBib3VuZCgnIScpO1xuICAgICAqIC8vID0+ICdoaSBmcmVkISdcbiAgICAgKlxuICAgICAqIG9iamVjdC5ncmVldCA9IGZ1bmN0aW9uKGdyZWV0aW5nLCBwdW5jdHVhdGlvbikge1xuICAgICAqICAgcmV0dXJuIGdyZWV0aW5nICsgJ3lhICcgKyB0aGlzLnVzZXIgKyBwdW5jdHVhdGlvbjtcbiAgICAgKiB9O1xuICAgICAqXG4gICAgICogYm91bmQoJyEnKTtcbiAgICAgKiAvLyA9PiAnaGl5YSBmcmVkISdcbiAgICAgKlxuICAgICAqIC8vIEJvdW5kIHdpdGggcGxhY2Vob2xkZXJzLlxuICAgICAqIHZhciBib3VuZCA9IF8uYmluZEtleShvYmplY3QsICdncmVldCcsIF8sICchJyk7XG4gICAgICogYm91bmQoJ2hpJyk7XG4gICAgICogLy8gPT4gJ2hpeWEgZnJlZCEnXG4gICAgICovXG4gICAgdmFyIGJpbmRLZXkgPSBiYXNlUmVzdChmdW5jdGlvbihvYmplY3QsIGtleSwgcGFydGlhbHMpIHtcbiAgICAgIHZhciBiaXRtYXNrID0gV1JBUF9CSU5EX0ZMQUcgfCBXUkFQX0JJTkRfS0VZX0ZMQUc7XG4gICAgICBpZiAocGFydGlhbHMubGVu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RlZmluZWQgPyByZXN1bHQgOiB0cmFpbGluZ0VkZ2Uobm93KCkpO1xuICAgICAgfVxuXG4gICAgICBmdW5jdGlvbiBkZWJvdW5jZWQoKSB7XG4gICAgICAgIHZhciB0aW1lID0gbm93KCksXG4gICAgICAgICAgICBpc0ludm9raW5nID0gc2hvdWxkSW52b2tlKHRpbWUpO1xuXG4gICAgICAgIGxhc3RBcmdzID0gYXJndW1lbnRzO1xuICAgICAgICBsYXN0VGhpcyA9IHRoaXM7XG4gICAgICAgIGxhc3RDYWxsVGltZSA9IHRpbWU7XG5cbiAgICAgICAgaWYgKGlzSW52b2tpbmcpIHtcbiAgICAgICAgICBpZiAodGltZXJJZCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICByZXR1cm4gbGVhZGluZ0VkZ2UobGFzdENhbGxUaW1lKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKG1heGluZykge1xuICAgICAgICAgICAgLy8gSGFuZGxlIGludm9jYXRpb25zIGluIGEgdGlnaHQgbG9vcC5cbiAgICAgICAgICAgIHRpbWVySWQgPSBzZXRUaW1lb3V0KHRpbWVyRXhwaXJlZCwgd2FpdCk7XG4gICAgICAgICAgICByZXR1cm4gaW52b2tlRnVuYyhsYXN0Q2FsbFRpbWUpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAodGltZXJJZCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgdGltZXJJZCA9IHNldFRpbWVvdXQodGltZXJFeHBpcmVkLCB3YWl0KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgfVxuICAgICAgZGVib3VuY2VkLmNhbmNlbCA9IGNhbmNlbDtcbiAgICAgIGRlYm91bmNlZC5mbHVzaCA9IGZsdXNoO1xuICAgICAgcmV0dXJuIGRlYm91bmNlZDtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBEZWZlcnMgaW52b2tpbmcgdGhlIGBmdW5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GlvbiBGb28oKSB7XG4gICAgICogICB0aGlzLmEgPSAxO1xuICAgICAqICAgdGhpcy5iID0gMjtcbiAgICAgKiB9XG4gICAgICpcbiAgICAgKiBGb28ucHJvdG90eXBlLmMgPSAzO1xuICAgICAqXG4gICAgICogXy5mb3JPd25SaWdodChuZXcgRm9vLCBmdW5jdGlvbih2YWx1ZSwga2V5KSB7XG4gICAgICogICBjb25zb2xlLmxvZyhrZXkpO1xuICAgICAqIH0pO1xuICAgICAqIC8vID0+IExvZ3MgJ2InIHRoZW4gJ2EnIGFzc3VtaW5nIGBfLmZvck93bmAgbG9ncyAnYScgdGhlbiAnYicuXG4gICAgICovXG4gICAgZnVuY3Rpb24gZm9yT3duUmlnaHQob2JqZWN0LCBpdGVyYXRlZSkge1xuICAgICAgcmV0dXJuIG9iamVjdCAmJiBiYXNlRm9yT3duUmlnaHQob2JqZWN0LCBnZXRJdGVyYXRlZShpdGVyYXRlZSwgMykpO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIENyZWF0ZXMgYW4gYXJyYXkgb2YgZnVuY3Rpb24gcHJvcGVydHkgbmFtZXMgZnJvbSBvd24gZW51bWVyYWJsZSBwcm9wZXJ0aWVzXG4gICAgICogb2YgYG9iamVjdGAuXG4gICAgICpcbiAgICAgKiBAc3RhdGljXG4gICAgICogQHNpbmNlIDAuMS4wXG4gICAgICogQG1lbWJlck9mIF9cbiAgICAgKiBAY2F0ZWdvcnkgT2JqZWN0XG4gICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIGluc3BlY3QuXG4gICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBmdW5jdGlvbiBuYW1lcy5cbiAgICAgKiBAc2VlIF8uZnVuY3Rpb25zSW5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogZnVuY3Rpb24gRm9vKCkge1xuICAgICAqICAgdGhpcy5hID0gXy5jb25zdGFudCgnYScpO1xuICAgICAq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bmRlZmluZWQ7XG4gICAgICB9XG4gICAgICBpZiAoZmxvYXRpbmcgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAodHlwZW9mIHVwcGVyID09ICdib29sZWFuJykge1xuICAgICAgICAgIGZsb2F0aW5nID0gdXBwZXI7XG4gICAgICAgICAgdXBwZXIgPSB1bmRlZmluZWQ7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAodHlwZW9mIGxvd2VyID09ICdib29sZWFuJykge1xuICAgICAgICAgIGZsb2F0aW5nID0gbG93ZXI7XG4gICAgICAgICAgbG93ZXIgPSB1bmRlZmluZWQ7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGlmIChsb3dlciA9PT0gdW5kZWZpbmVkICYmIHVwcGVyID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgbG93ZXIgPSAwO1xuICAgICAgICB1cHBlciA9IDE7XG4gICAgICB9XG4gICAgICBlbHNlIHtcbiAgICAgICAgbG93ZXIgPSB0b0Zpbml0ZShsb3dlcik7XG4gICAgICAgIGlmICh1cHBlciA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgdXBwZXIgPSBsb3dlcjtcbiAgICAgICAgICBsb3dlciA9IDA7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdXBwZXIgPSB0b0Zpbml0ZSh1cHBlcik7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGlmIChsb3dlciA+IHVwcGVyKSB7XG4gICAgICAgIHZhciB0ZW1wID0gbG93ZXI7XG4gICAgICAgIGxvd2VyID0gdXBwZXI7XG4gICAgICAgIHVwcGVyID0gdGVtcDtcbiAgICAgIH1cbiAgICAgIGlmIChmbG9hdGluZyB8fCBsb3dlciAlIDEgfHwgdXBwZXIgJSAxKSB7XG4gICAgICAgIHZhciByYW5kID0gbmF0aXZlUmFuZG9tKCk7XG4gICAgICAgIHJldHVybiBuYXRpdmVNaW4obG93ZXIgKyAocmFuZCAqICh1cHBlciAtI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IChvYmopIHtcXG4nICsgc291cmNlICsgJ1xcbn1cXG4nO1xuICAgICAgfVxuICAgICAgLy8gQ2xlYW51cCBjb2RlIGJ5IHN0cmlwcGluZyBlbXB0eSBzdHJpbmdzLlxuICAgICAgc291cmNlID0gKGlzRXZhbHVhdGluZyA/IHNvdXJjZS5yZXBsYWNlKHJlRW1wdHlTdHJpbmdMZWFkaW5nLCAnJykgOiBzb3VyY2UpXG4gICAgICAgIC5yZXBsYWNlKHJlRW1wdHlTdHJpbmdNaWRkbGUsICckMScpXG4gICAgICAgIC5yZXBsYWNlKHJlRW1wdHlTdHJpbmdUcmFpbGluZywgJyQxOycpO1xuXG4gICAgICAvLyBGcmFtZSBjb2RlIGFzIHRoZSBmdW5jdGlvbiBib2R5LlxuICAgICAgc291cmNlID0gJ2Z1bmN0aW9uKCcgKyAodmFyaWFibGUgfHwgJ29iaicpICsgJykge1xcbicgK1xuICAgICAgICAodmFyaWFibGVcbiAgICAgICAgICA/ICcnXG4gICAgICAgICAgOiAnb2JqIHx8IChvYmogPSB7fSk7XFxuJ1xuICAgICAgICApICtcbiAgICAgICAgXCJ2YXIgX190LCBfX3AgPSAnJ1wiICtcbiAgICAgICAgKGlzRXNjYXBpbmdcbiAgICAgICAgICAgPyAnLCBfX2UgPSBfLmVzY2FwZSdcbiAgICAgICAgICAgOiAnJ1xuICAgICAgICApICtcbiAgICAgICAgKGlzRXZhbHVhdGluZ1xuICAgICAgICAgID8gJywgX19qID0gQXJyYXkucHJvdG90eXBlLmpvaW47XFxuJyArXG4gICAgICAgICAgICBcImZ1bmN0aW9uIHByaW50KCkgeyBfX3AgKz0gX19qLmNhbGwoYXJndW1lbnRzLCAnJykgfVxcblwiXG4gICAgICAgICAgOiAnO1xcbidcbiAgICAgICAgKSArXG4gICAgICAgIHNvdXJjZSArXG4gICAgICAgICdyZXR1cm4gX19wXFxufSc7XG5cbiAgICAgIHZhciByZXN1bHQgPSBhdHRlbXB0KGZ1bmN0aW9uKCkge1xuICAgIC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G5cbiAgICAgIGFycmF5RWFjaChtZXRob2ROYW1lcywgZnVuY3Rpb24obWV0aG9kTmFtZSkge1xuICAgICAgICB2YXIgZnVuYyA9IHNvdXJjZVttZXRob2ROYW1lXTtcbiAgICAgICAgb2JqZWN0W21ldGhvZE5hbWVdID0gZnVuYztcbiAgICAgICAgaWYgKGlzRnVuYykge1xuICAgICAgICAgIG9iamVjdC5wcm90b3R5cGVbbWV0aG9kTmFtZV0gPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHZhciBjaGFpbkFsbCA9IHRoaXMuX19jaGFpbl9fO1xuICAgICAgICAgICAgaWYgKGNoYWluIHx8IGNoYWluQWxsKSB7XG4gICAgICAgICAgICAgIHZhciByZXN1bHQgPSBvYmplY3QodGhpcy5fX3dyYXBwZWRfXyksXG4gICAgICAgICAgICAgICAgICBhY3Rpb25zID0gcmVzdWx0Ll9fYWN0aW9uc19fID0gY29weUFycmF5KHRoaXMuX19hY3Rpb25zX18pO1xuXG4gICAgICAgICAgICAgIGFjdGlvbnMucHVzaCh7ICdmdW5jJzogZnVuYywgJ2FyZ3MnOiBhcmd1bWVudHMsICd0aGlzQXJnJzogb2JqZWN0IH0pO1xuICAgICAgICAgICAgICByZXN1bHQuX19jaGFpbl9fID0gY2hhaW5BbGw7XG4gICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZnVuYy5hcHBseShvYmplY3QsIGFycmF5UHVzaChbdGhpcy52YWx1ZSgpXSwgYXJndW1lbnRzKSk7XG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIHJldHVybiBvYmplY3Q7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmV2ZXJ0cyB0aGUgYF9gIHZhcmlhYmxlIHRvIGl0cyBwcmV2aW91cyB2YWx1ZSBhbmQgcmV0dXJucyBhIHJlZmVyZW5jZSB0b1xuICAgICAqIHRoZSBgbG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wXVxuICAgICAqXG4gICAgICogXy5yYW5nZVJpZ2h0KC00KTtcbiAgICAgKiAvLyA9PiBbLTMsIC0yLCAtMSwgMF1cbiAgICAgKlxuICAgICAqIF8ucmFuZ2VSaWdodCgxLCA1KTtcbiAgICAgKiAvLyA9PiBbNCwgMywgMiwgMV1cbiAgICAgKlxuICAgICAqIF8ucmFuZ2VSaWdodCgwLCAyMCwgNSk7XG4gICAgICogLy8gPT4gWzE1LCAxMCwgNSwgMF1cbiAgICAgKlxuICAgICAqIF8ucmFuZ2VSaWdodCgwLCAtNCwgLTEpO1xuICAgICAqIC8vID0+IFstMywgLTIsIC0xLCAwXVxuICAgICAqXG4gICAgICogXy5yYW5nZVJpZ2h0KDEsIDQsIDApO1xuICAgICAqIC8vID0+IFsxLCAxLCAxXVxuICAgICAqXG4gICAgICogXy5yYW5nZVJpZ2h0KDApO1xuICAgICAqIC8vID0+IFtdXG4gICAgICovXG4gICAgdmFyIHJhbmdlUmlnaHQgPSBjcmVhdGVSYW5nZSh0cnVlKTtcblxuICAgIC8qKlxuICAgICAqIFRoaXMgbWV0aG9kIHJldHVybnMgYSBuZXcgZW1wdHkgYXJyYXkuXG4gICAgICpcbiAgICAgKiBAc3RhdGljXG4gICAgICogQG1lbWJlck9mIF9cbiAgICAgKiBAc2luY2UgNC4xMy4wXG4gICAgICogQGNhdGVnb3J5IFV0aWxcbiAgICAgKiBAcmV0dXJucyB7QXJyYXl9IFJldHVybnMgdGhlIG5ldyBlbXB0eSBhcnJheS5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogdmFyIGFycmF5cyA9IF8udGltZXMoMiwgXy5zdHViQXJyYXkpO1xuICAgICAqXG4gICAgICogY29uc29sZS5sb2coYXJyYXlzKTtcbiAgICAgKiAvLyA9PiBbW10sIFtdXVxuICAgICAqXG4gICAgICogY29uc29sZS5sb2coYXJyYXlzWzBdID09PSBhcnJheXNbMV0pO1xuICAgICAqIC8vID0+IGZhbHNlXG4gICAgICovXG4gICAgZnVuY3Rpb24gc3R1YkFycmF5KCkge1xuICAgICAgcmV0dXJuIFtdO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRoaXMgbWV0aG9kIHJldHVybnMgYGZhbHNlYC5cbiAgICAgKlxuICAgICAqIEBzdGF0aWNcbiAgICAgKiBAbWVtYmVyT2YgX1xuICAgICAqIEBzaW5jZSA0LjEzLjBcbiAgICAgKiBAY2F0ZWdvcnkgVXRpbFxuICAgICAqIEByZXR1cm5zIHtib29sZWFufSBSZXR1cm5zIGBmYWxzZWAuXG4gICAgICogQGV4YW1wbGVcbiAgICAgKlxuICAgICAqIF8udGltZXMoMiwgXy5zdHViRmFsc2UpO1xuICAgICAqIC8vID0+IFtmYWxzZSwgZmFsc2VdXG4gICAgICovXG4gICAgZnVuY3Rpb24gc3R1YkZhbHNlKCkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRoaXMgbWV0aG9kIHJldHVybnMgYSBuZXcgZW1wdHkgb2JqZWN0LlxuICAgICAqXG4gICAgICogQHN0YXRpY1xuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQHNpbmNlIDQuMTMuMFxuICAgICAqIEBjYXRlZ29yeSBVdGlsXG4gICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgbmV3IGVtcHR5IG9iamVjdC5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogdmFyIG9iamVjdHMgPSBfLnRpbWVzKDIsIF8uc3R1Yk9iamVjdCk7XG4gICAgICpcbiAgICAgKiBjb25zb2xlLmxvZyhvYmplY3RzKTtcbiAgICAgKiAvLyA9PiBbe30sIHt9XVxuICAgICAqXG4gICAgICogY29uc29sZS5sb2cob2JqZWN0c1swXSA9PT0gb2JqZWN0c1sxXSk7XG4gICAgICogLy8gPT4gZmFsc2VcbiAgICAgKi9cbiAgICBmdW5jdGlvbiBzdHViT2JqZWN0KCkge1xuICAgICAgc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gdGFzay5hcmdzO1xuICAgICAgICBzd2l0Y2ggKGFyZ3MubGVuZ3RoKSB7XG4gICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgIGNhbGxiYWNrKCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgY2FsbGJhY2soYXJnc1swXSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgY2FsbGJhY2soYXJnc1swXSwgYXJnc1sxXSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgY2FsbGJhY2soYXJnc1swXSwgYXJnc1sxXSwgYXJnc1syXSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIGNhbGxiYWNrLmFwcGx5KHVuZGVmaW5lZCwgYXJncyk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIHJ1bklmUHJlc2VudChoYW5kbGUpIHtcbiAgICAgICAgLy8gRnJvbSB0aGUgc3BlYzogXCJXYWl0IHVudGlsIGFueSBpbnZvY2F0aW9ucyBvZiB0aGlzIGFsZ29yaXRobSBzdGFydGVkIGJlZm9yZSB0aGlzIG9uZSBoYXZlIGNvbXBsZXRlZC5cIlxuICAgICAgICAvLyBTbyBpZiB3ZSdyZSBjdXJyZW50bHkgcnVubmluZyBhIHRhc2ssIHdlJ2xsIG5lZWQgdG8gZGVsYXkgdGhpcyBpbnZvY2F0aW9uLlxuICAgICAgICBpZiAoY3VycmVudGx5UnVubmluZ0FUYXNrKSB7XG4gICAgICAgICAgICAvLyBEZWxheSBieSBkb2luZyBhIHNldFRpbWVvdXQuIHNldEltbWVkaWF0ZSB3YXMgdHJpZWQgaW5zdGVhZCwgYnV0IGluIEZpcmVmb3ggNyBpdCBnZW5lcmF0ZWQgYVxuICAgICAgICAgICAgLy8gXCJ0b28gbXVjaCByZWN1cnNpb25cIiBlcnJvci5cbiAgICAgICAgICAgIHNldFRpbWVvdXQocnVuSWZQcmVzZW50LCAwLCBoYW5kbGUpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIHRhc2sgPSB0YXNrc0J5SGFuZGxlW2hhbmRsZV07XG4gICAgICAgICAgICBpZiAodGFzaykge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRseVJ1bm5pbmdBVGFzayA9IHRydWU7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgcnVuKHRhc2spO1xuICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIGNsZWFySW1tZWRpYXRlKGhhbmRsZSk7XG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnRseVJ1bm5pbmdBVGFzayA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIGluc3RhbGxOZXh0VGlja0ltcGxlbWVudGF0aW9uKCkge1xuICAgICAgICByZWdpc3RlckltbWVkaWF0ZSA9IGZ1bmN0aW9uKGhhbmRsZSkge1xuICAgICAgICAgICAgcHJvY2Vzcy5uZXh0VGljayhmdW5jdGlvbiAoKSB7IHJ1bklmUHJlc2VudChoYW5kbGUpOyB9KTtcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBjYW5Vc2VQb3N0TWVzc2FnZSgpIHtcbiAgICAgICAgLy8gVGhlIHRlc3QgYWdhaW5zdCBgaW1wb3J0U2NyaXB0c2AgcHJldmVudHMgdGhpcyBpbXBsZW1lbnRhdGlvbiBmcm9tIGJlaW5nIGluc3RhbGxlZCBpbnNpZGUgYSB3ZWIgd29ya2VyLFxuICAgICAgICAvLyB3aGVyZSBgZ2xvYmFsLnBvc3RNZXNzYWdlYCBtZWFucyBzb21ldGhpbm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Oi8vaGVscC5uYXZlci5jb20vcm9ib3RzJykgPj0gMCkge1xuICAgICAgICAgIHVwZGF0ZU1hcChyZXN1bHQsIGRhdGFzZXQuZ2V0KCdZZXRpJykpO1xuICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAodWEuaW5kZXhPZignRmVlZEJ1cm5lci8nKSA+PSAwKSB7XG4gICAgICAgIHVwZGF0ZU1hcChyZXN1bHQsIGRhdGFzZXQuZ2V0KCdGZWVkQnVybmVyJykpO1xuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgIH1cbiAgICAgIGlmICh1YS5pbmRleE9mKCdmYWNlYm9va2V4dGVybmFsaGl0JykgPj0gMCkge1xuICAgICAgICB1cGRhdGVNYXAocmVzdWx0LCBkYXRhc2V0LmdldCgnZmFjZWJvb2snKSk7XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfVxuICAgICAgaWYgKHVhLmluZGV4T2YoJ1R3aXR0ZXJib3QvJykgPj0gMCkge1xuICAgICAgICB1cGRhdGVNYXAocmVzdWx0LCBkYXRhc2V0LmdldCgndHdpdHRlcicpKTtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICB9XG4gICAgICBpZiAodWEuaW5kZXhPZignaWNoaXJvJykgPj0gMCkge1xuICAgICAgICBpZiAodWEuaW5kZXhPZignaHR0cDovL2hlbHAuZ29vLm5lLmpwL2Rvb3IvY3Jhd2xlci5odG1sJykgPj0gMCB8fFxuICAgICAgICAgICAgdWEuaW5kZXhPZignY29tcGF0aWJsZTsgaWNoaXJvL21vYmlsZSBnb287JykgPj0gMCkge1xuICAgICAgICAgIHVwZGF0ZU1hcChyZXN1bHQsIGRhdGFzZXQuZ2V0KCdnb28nKSk7XG4gICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGlmICh1YS5pbmRleE9mKCdnb29ibG9nc2VhcmNoLycpID49IDApIHtcb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