.error-404[data-v-6708da39]{background:url("") no-repeat 100%/cover;background-position:top;height:650px}.home-button[data-v-6708da39]{box-sizing:content-box;display:block;padding-left:20px;padding-right:20px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:36px;line-height:36px;border:1px solid rgba(90,90,90,.3);background-color:rgba(30,30,30,.3);border-radius:5px;margin:470px auto;text-align:center;color:#e6e6e6;cursor:pointer}.nuxt-progress{position:fixed;top:0;left:0;right:0;height:2px;width:0;opacity:1;transition:width .1s,opacity .4s;background-color:#fff;z-index:999999}.nuxt-progress.nuxt-progress-notransition{transition:none}.nuxt-progress-failed{background-color:red}.download-main{height:600px;overflow:hidden}.download-main .wrap{width:100%;display:flex}.download-main .wrap .left{flex:1;position:relative}.download-main .wrap .left .bg-image{position:relative;top:70px;width:441px}.download-main .wrap .left .bg-image-pc{top:140px;width:500px}.download-main .wrap .right{flex:2;margin-left:115px;margin-top:125px;color:#3a3b3d}.download-main .wrap .right .title{font-size:44px}.download-main .wrap .right .text{margin-top:50px;font-size:16px;line-height:32px}.download-main .wrap .right .download-wraps{margin-top:50px;display:flex;align-items:center}.download-main .wrap .right .download-wraps .download-btn-wrap .download-btn{display:flex;align-items:center;justify-content:center;background:#3a3b3d;box-shadow:0 2px 5px 0 rgba(0,0,0,.5);color:#fff;font-size:18px;width:200px;height:56px;line-height:56px;border-radius:28px;font-weight:400}.download-main .wrap .right .download-wraps .download-btn-wrap .download-btn:last-child{margin-top:20px}.download-main .wrap .right .download-wraps .download-btn-wrap .download-rec{margin-left:5px;display:inline-block;padding:0 10px;font-style:normal;color:#3a3b3d;background:#f2f2f2;height:20px;line-height:20px;border-radius:10px;font-size:12px}.download-main .wrap .right .download-wraps .download-qr-code{margin-left:53px;position:relative}.download-main .wrap .right .download-wraps .download-qr-code span{display:inline-block;width:135px;height:135px;padding:8px;background:#fff;border-radius:10px}.download-main .wrap .right .download-wraps .download-qr-code span img{width:100%}.download-qr-scan{position:absolute;margin:0;padding-left:8px;min-width:300px}@media screen and (max-width:960px){.download-main{height:auto;padding:40px 0}.download-main .wrap{align-items:center}.download-main .wrap .left .bg-image{width:320px;position:inherit;top:inherit;height:inherit}.download-main .wrap .right{margin:0 0 0 50px}.download-main .wrap .right .title{font-size:30px}.download-main .wrap .right .text{margin-top:30px}.download-main .wrap .right .download-wraps{margin-top:20px}}@media screen and (max-width:767px){.download-main{padding:40px}.download-main .wrap .left{display:none}.download-main .wrap .right{margin:0}}@media screen and (max-width:420px){.download-main .wrap .right .title{font-size:20px}.download-main .wrap .right .download-wraps{display:block;text-align:center}.download-main .wrap .right .download-wraps .download-btn-wrap .download-btn{display:inline-block}.download-main .wrap .right .download-wraps .download-qr-code{margin:30px 0 0;text-align:center}.download-qr-scan{position:inherit;padding-left:0}}:root{--max-content-width:1200px;--color-2:#7a7a7a;--color-3:#bbb;--color-4:#fff;--color-5:hsla(0,0%,100%,0.6);--color-6:#6f7174;--color-7:#9ea0a5;--color-8:#1a202c;--color-9:#666;--color-10:#232323;--color-11:#d5d8db;--color-12:#fff;--color-13:#101010;--color-14:#999;--color-15:#2980fe;--color-16:#2980fe;--color-17:#c0c3c6;--color-18:#898a8f;--color-19:#000;--color-20:#e55036;--color-21:#777;--color-22:#7a7a7a;--color-23:#3a3b3d;--color-24:#3a3b3d;--bg-1:#fff;--bg-2:#3d8cfe;--bg-5:#f8fafc;--bg-6:#121212;--bg-7:#ebfaf1;--bg-8:#ffecec;--bg-9:#fff;--bg-10:#f0f0f0;--bg-11:#f7f7f7;--bg-12:#fff;--bg-13:#f7f7f7;--bg-14:#f9f9f9;--bg-15:#f9fbff;--bg-16:#06459f;--bg-17:#fff;--bg-18:#fff;--bg-19:#fff;--bg-20:#eee;--bg-21:#eef4ff;--bg-22:#f5f6f7;--bg-23:#ebf4ff;--bg-24:#fff;--bg-25:#f5f8fa;--bg-26:#f5f6f7;--bg-27:#f2f3f7;--bg-28:#f2f4f7;--bg-29:#f2f4f7;--bg-30:#f2f4f7;--bg-31:#161616;--bg-32:#fff6f4;--bg-33:#fff;--bg-34:#ebf4ff;--bg-35:linear-gradient(180deg,#edeef0,#f7f8fa 100%);--bg-36:#fff;--bg-37:#f7f8fa;--bg-38:#f6f7f9;--bg-39:#fff;--bg-40:#f7f8fa;--bg-41:#fff;--bg-42:#ebf4ff;--box-shadow-1:rgba(0,0,0,0.06);--box-shadow-2:rgba(0,0,0,0.12);--box-shadow-3:rgba(0,0,0,0.1);--border-1:#cbd5e1;--border-2:#e6e8ea;--border-3:#e6e8ea;--border-4:#eee;--border-5:#dcdfe6;--border-6:#d7d7d7;--border-7:#fff;--border-8:#eee;--border-9:#a8cbff;--border-10:#f1f3f5;--border-11:#e6e8ea;--border-12:#eceef0;--border-13:#cfe1fc;--border-14:#e6e8ea;--border-15:#979797;--border-16:#d5d8db;--border-17:#eee;--card-bg:#f9fbfc;--card-border:#f1f3f5;--dividing-line-bg-1:#eee;--dividing-line-bg-2:#d8d8d8;--dividing-line-bg-3:#e6e8ea;--header-nav-arrow-color:#bbbfc6;--header-nav-title-color:#101010;--footer-bg:#1c1c1f;--footer-nav-title-color:#6f7174;--footer-nav-option-color:hsla(0,0%,100%,0.88);--copyright-color:#6f7174;--button-border:#6f7174;--message-box-border:#d7d7d7;--navbar-wrap-child-container-bg:rgba(212,220,229,0.6);--navbar-wrap-child-language-bg:#fff;--navbar-wrap-child-language-border:#f1f3f5;--platform-bg:#eee;--platform-item-bg:#fff;--platform-item-color:#101010;--recruiting-about-img:url("about.1ddd2c0.png");--recruiting-about-m-img:url("about-m.6e27610.png");--recruiting-mission-img:url("mission.e65c095.png");--recruiting-mission-m-img:url("mission-m.a3674f4.png");--switch-bg:#dfdfdf;--switch-border:#dfdfdf;--switch-before-bg:#f6f6f6;--switch-on:#06b37f;--spinner-loading-bg:#333}:root,:root[theme=dark]{--color-25:#7e838f;--bg-3:#000;--bg-4:#00040b;--tag-color-1:rgba(240,245,255,0.77);--tag-color-2:rgba(240,245,255,0.55);--tag-color-3:#f0f5ff;--tag-bg:#02132c}:root[theme=dark]{--color-2:rgba(240,245,255,0.7);--color-3:rgba(240,245,255,0.44);--color-4:#f0f5ff;--color-5:rgba(240,245,255,0.7);--color-6:rgba(240,245,255,0.7);--color-7:rgba(240,245,255,0.7);--color-8:#f0f5ff;--color-9:rgba(240,245,255,0.8);--color-10:rgba(240,245,255,0.7);--color-11:rgba(0,9,22,0.7);--color-12:#000916;--color-13:#f0f5ff;--color-14:rgba(240,245,255,0.7);--color-15:#3286fd;--color-16:#f0f5ff;--color-17:rgba(240,245,255,0.44);--color-18:rgba(240,245,255,0.7);--color-19:#f0f5ff;--color-20:#f0f5ff;--color-21:rgba(240,245,255,0.7);--color-22:#f0f5ff;--color-23:#d7dae0;--color-24:#fff;--bg-1:#000916;--bg-2:#003889;--bg-5:#000;--bg-6:#f0f5ff;--bg-7:rgba(22,165,122,0.22);--bg-8:rgba(245,100,89,0.22);--bg-9:#011b41;--bg-10:#0e1b2f;--bg-11:#152946;--bg-12:#152946;--bg-13:#02132c;--bg-14:#11233d;--bg-15:#00040b;--bg-16:#001635;--bg-17:#000a16;--bg-18:#1c355a;--bg-19:#02132c;--bg-20:#02132c;--bg-21:#2980fe;--bg-22:#152946;--bg-23:#152946;--bg-24:#152946;--bg-25:#152946;--bg-26:#02132c;--bg-27:#000916;--bg-28:#011b41;--bg-29:#152946;--bg-30:#02132c;--bg-31:#525b7b;--bg-32:#e55036;--bg-33:#152946;--bg-34:#02132c;--bg-35:linear-gradient(180deg,#323945,#1d212a 100%);--bg-36:#4a5466;--bg-37:#272b33;--bg-38:#061326;--bg-39:#253752;--bg-40:#253752;--bg-41:#19243c;--bg-42:#19243c;--box-shadow-1:rgba(0,0,0,0.25);--box-shadow-2:rgba(0,0,0,0.25);--box-shadow-3:rgba(0,0,0,0.7);--border-1:rgba(240,245,255,0.22);--border-2:#002f75;--border-3:#22416c;--border-4:#2c4466;--border-5:#2c4466;--border-6:#2c4466;--border-7:#2c4466;--border-8:#6a7996;--border-9:#4f82cf;--border-10:#2c4466;--border-11:#bdbdbd;--border-12:rgba(240,245,255,0.22);--border-13:rgba(240,245,255,0.7);--border-14:#2c4466;--border-15:rgba(240,245,255,0.7);--border-16:#3e4347;--border-17:rgba(240,245,255,0.2);--card-bg:#152946;--card-border:#2c4466;--dividing-line-bg-1:rgba(240,245,255,0.22);--dividing-line-bg-2:rgba(240,245,255,0.22);--dividing-line-bg-3:rgba(240,245,255,0.22);--header-nav-arrow-color:#555d6f;--header-nav-title-color:#f0f5ff;--footer-bg:#000916;--footer-nav-title-color:rgba(240,245,255,0.3);--footer-nav-option-color:rgba(240,245,255,0.88);--copyright-color:rgba(240,245,255,0.44);--button-border:#f0f5ff;--message-box-border:rgba(240,245,255,0.44);--navbar-wrap-child-container-bg:rgba(0,0,0,0.7);--navbar-wrap-child-language-bg:#152946;--navbar-wrap-child-language-border:#2c4466;--platform-bg:#011b41;--platform-item-bg:#f0f5ff;--platform-item-color:#f0f5ff;--recruiting-about-img:url("");--recruiting-about-m-img:url("");--recruiting-mission-img:url("");--recruiting-mission-m-img:url("");--switch-bg:#18191c;--switch-border:#2d2f33;--switch-before-bg:#18191c;--switch-on:#03c288;--spinner-loading-bg:#d7dae0}:root{--color-1:#3a3b3d}:root[theme=dark]{--color-1:#f0f5ff}div::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}div::-webkit-scrollbar{width:4px;height:8px;background-color:transparent}div::-webkit-scrollbar-thumb{border-radius:10px;background-color:hsla(0,0%,78.4%,.2)}html{box-sizing:border-box!important;background:#fff;background:var(--bg-1)}#app,body,html{color:#101010;color:var(--color-13);line-height:1.5;-webkit-overflow-scrolling:touch;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Helvetica,Arial;padding-right:0!important}a{text-decoration:none}.el-popper{background:#fff;background:var(--bg-12);border:1px solid #fff;border:1px solid var(--bg-12)}.el-select-dropdown__item{color:#3a3b3d;color:var(--color-1)}.el-select-dropdown__item.hover{background:#f0f0f0;background:var(--bg-10)}.ya-hei-bold{font-weight:700}.ya-hei-normal{font-weight:400}.border-box{box-sizing:border-box}.c-115CE8{color:#115ce8!important}.bg-color-F6F8FA{background:#f6f8fa}.c-fff{color:#fff}.c-333{color:#333}.c-999{color:#999}.c-2760E7{color:#2760e7}.c-2760E7,.c-2980fe{font-size:14px;text-decoration:underline}.c-2980fe{color:#2980fe}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.text-hidden{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ft-bold{font-weight:700}.ft-12{font-size:12px}.ft-14{font-size:14px}.ft-16{font-size:16px}.ft-18{font-size:18px}.ft-20{font-size:20px}.ft-22{font-size:22px}.ft-24{font-size:24px}.ft-32{font-size:32px}.ft-45{font-size:45px}.pointer{cursor:pointer}.news-detail-title-bg{background:#f6f8f9;border:1px solid #dae2eb;border-radius:4px;padding:10px 20px}.container-layout{max-width:1170px;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.icon-right{display:inline-block;position:relative;width:14px;height:14px}.icon-right:after{content:"";position:absolute;top:0;left:2px;width:8px;height:8px;border-top:2px solid #bbbfc6;border-top:2px solid var(--header-nav-arrow-color);border-right:2px solid #bbbfc6;border-right:2px solid var(--header-nav-arrow-color);transform:rotate(45deg)}.icon-down-333{display:inline-block;position:relative;width:14px;height:12px;transform:scale(.8)}.icon-down-333:after{content:"";position:absolute;top:5%;left:2px;width:8px;height:8px;border-top:2px solid #101010;border-top:2px solid var(--header-nav-title-color);border-right:2px solid #101010;border-right:2px solid var(--header-nav-title-color);transform:rotate(135deg)}.icon-up-333{display:inline-block;position:relative;width:14px;height:12px;transform:scale(.8)}.icon-up-333:after{content:"";position:absolute;top:-3px;left:2px;width:10px;height:10px;border-top:2px solid #2980fe;border-right:2px solid #2980fe;transform:rotate(135deg)}.icon-down-fff{display:inline-block;position:relative;width:14px;height:12px;transform:scale(.8)}.icon-down-fff:after{content:"";position:absolute;top:-3px;left:2px;width:10px;height:10px;border-top:2px solid #fff;border-right:2px solid #fff;transform:rotate(135deg)}.icon-menu{background:url("") no-repeat center 100%/cover!important}.icon-close,.icon-menu{display:inline-block;width:25px;height:25px;vertical-align:middle}.icon-close{background:url("") no-repeat center 100%/cover!important}.icon-earth{background:url("") no-repeat center 100%/cover!important;position:relative;top:-2px}.icon-earth,.icon-earth-mini{display:inline-block;width:20px;height:20px;vertical-align:middle}.icon-earth-mini{background:url("") no-repeat center 100%/cover!important;margin-top:-2px}.submit-bg{width:100%;padding:8em 0;border-radius:20px;color:#fff;text-align:center}.token-submit-en-bg{background:url("") no-repeat}.token-submit-zh-bg{background:url("") no-repeat}.nft-submit-en-bg{background:url("") no-repeat}.nft-submit-zh-bg{background:url("") no-repeat}.dapp-submit-en-bg{background:url("") no-repeat}.dapp-submit-zh-bg{background:url("") no-repeat}.hidden-scrollbar{scrollbar-width:none}.hidden-scrollbar::-webkit-scrollbar{display:none}@-webkit-keyframes enter-animation{0%{opacity:1;transform:translateY(60px)}to{opacity:1;transform:translateY(0)}}@keyframes enter-animation{0%{opacity:1;transform:translateY(60px)}to{opacity:1;transform:translateY(0)}}@-webkit-keyframes enter-animation-mobile{0%{opacity:1;transform:translateY(40px)}to{opacity:1;transform:translateY(0)}}@keyframes enter-animation-mobile{0%{opacity:1;transform:translateY(40px)}to{opacity:1;transform:translateY(0)}}.enter-animation{-webkit-animation:enter-animation .8s cubic-bezier(.28,0,.32,1) forwards;animation:enter-animation .8s cubic-bezier(.28,0,.32,1) forwards}.d-flex{display:flex}.flex-column{flex-direction:column}.flex-wrap{flex-wrap:wrap}.jc-start{justify-content:flex-start}.jc-end{justify-content:flex-end}.jc-center{justify-content:center}.jc-between{justify-content:space-between}.jc-around{justify-content:space-around}.jc-evenly{justify-content:space-evenly}.ai-start{align-items:flex-start}.ai-end{align-items:flex-end}.ai-center{align-items:center}.ai-between{align-items:space-between}.ai-around{align-items:space-around}.ai-evenly{align-items:space-evenly}.flex-1{flex:1}.flex-grow-1{flex-grow:1}.content{max-width:1200px;margin:0 auto}.content .title{font-size:36px;font-weight:600;color:#3a3b3d;color:var(--color-1);line-height:44px;letter-spacing:-.09px}.content .desc{font-size:18px;font-weight:400;color:#6f7174;color:var(--color-6);line-height:26px;letter-spacing:-.02px}@media screen and (max-width:1300px){.content{padding:0 20px}}@media screen and (max-width:1200px){.content{padding:0 20px;flex-direction:column}.content .desc,.content .title{text-align:center}}@media screen and (min-width:769px){.container-layout{width:1170px}}@media screen and (max-width:768px){.ft-22{font-size:20px}.ft-32{font-size:28px}.ft-45{font-size:40px}.enter-animation{-webkit-animation:enter-animation-mobile .8s cubic-bezier(.28,0,.32,1) forwards;animation:enter-animation-mobile .8s cubic-bezier(.28,0,.32,1) forwards}.content{padding:0}.content .title{padding:0 28px;font-size:24px;text-align:left;font-weight:700}.content .desc{padding:0 28px;font-size:15px;text-align:left;line-height:22px}}@media screen and (max-width:420px){.ft-18{font-size:14px}.ft-20{font-size:16px}.ft-22{font-size:20px}.ft-32{font-size:26px}.submit-bg{background-size:100%;padding:2.3rem 0;border-radius:2px}}@font-face{font-family:TP-Iconfont;src:url("");src:url("") format("embedded-opentype"),url("") format("woff2"),url("") format("woff"),url("") format("truetype"),url("") format("svg")}.TP-Iconfont{font-family:TP-Iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.tp-icon-arrow:before{content:"\e64d"}.tp-icon-eos:before{content:"\e602"}.tp-icon-chat:before{content:"\e603"}.tp-icon-assetsx:before{content:"\e604"}.tp-icon-dqppsx:before{content:"\e605"}.tp-icon-settingsx:before{content:"\e606"}.tp-icon-searchx:before{content:"\e607"}.tp-icon-dropdownx:before{content:"\e608"}.tp-icon-retractx:before{content:"\e609"}.tp-icon-memberx:before{content:"\e60a"}.tp-icon-maillistx:before{content:"\e60b"}.tp-icon-followx:before{content:"\e60c"}.tp-icon-aboutx:before{content:"\e60d"}.tp-icon-passwoerx:before{content:"\e60e"}.tp-icon-notificationsx:before{content:"\e60f"}.tp-icon-networkx:before{content:"\e611"}.tp-icon-languagex:before{content:"\e610"}.tp-icon-deletex:before{content:"\e612"}@font-face{font-family:Helvetica2;font-weight:400;font-style:normal;src:url("") format("truetype")}.requirement-item[data-v-16db2e47]{position:relative;margin-left:10px;font-size:12px;font-weight:400;color:var(--color-9);line-height:17px;word-break:break-word}.requirement-item[data-v-16db2e47]:before{content:"";position:absolute;left:-8px;top:6px;width:4px;height:4px;background:#2980fe;border-radius:50%}@media screen and (max-width:776px){.requirement-item[data-v-16db2e47]{font-size:13px}}.donate-item[data-v-dd2c86ca]{display:flex;align-items:center;justify-content:space-between}.donate-item .donate-left[data-v-dd2c86ca]{position:relative;font-size:12px;color:var(--color-9)}.donate-item .donate-left.dot[data-v-dd2c86ca]{margin-left:10px}.donate-item .donate-left.dot[data-v-dd2c86ca]:before{content:"";position:absolute;left:-8px;top:6px;width:4px;height:4px;background:#2980fe;border-radius:50%}.donate-item .donate-right[data-v-dd2c86ca]{margin-left:30px;flex:1;display:flex;align-items:center;justify-content:flex-end;grid-gap:0 4px;gap:0 4px}.donate-item .donate-right.type-2 span[data-v-dd2c86ca]{order:1}.donate-item .donate-right.type-2 img[data-v-dd2c86ca]{order:2;width:16px;height:16px;cursor:pointer}.donate-item .donate-right span[data-v-dd2c86ca]{order:2;font-size:12px;font-weight:500;color:var(--color-1)}.donate-item .donate-right img[data-v-dd2c86ca]{order:1;width:12px;height:12px}.donate-box .title[data-v-2db85096]{font-size:13px;font-weight:500;color:var(--color-1)}.donate-box .donate-desc[data-v-2db85096]{font-size:13px;color:var(--color-9);word-break:break-word}.donate-box .donate-tutorial[data-v-2db85096]{margin-top:3px}.donate-box .donate-tutorial-content[data-v-2db85096]{position:relative;margin-top:8px;background:var(--bg-13);border-radius:12px;padding:20px;display:grid;grid-template-columns:1fr;grid-gap:8px 0;gap:8px 0}.donate-box .donate-tutorial-content .line[data-v-2db85096],.donate-box .donate-tutorial-content .title[data-v-2db85096]{display:none}.donate-box .donate-tutorial-content .donate-token-info[data-v-2db85096]{position:absolute;top:-28px;left:50%;transform:translateX(-50%);display:grid;grid-gap:8px 0;gap:8px 0;background:var(--bg-12);border:1px solid var(--border-4);border-radius:12px;box-shadow:0 5px 20px 0 rgba(0,0,0,.2);padding:9px}.donate-box .donate-qr-code[data-v-2db85096]{font-size:0;margin-top:16px;display:flex;flex-direction:column;align-items:center;background:var(--bg-12);border:1px solid var(--border-4);border-radius:12px;padding:16px}.donate-box .donate-qr-code .donate-amount[data-v-2db85096]{height:34px;line-height:34px;padding:0 28px;background:var(--bg-19);border-radius:8px;box-shadow:0 5px 20px 0 rgba(0,0,0,.1)}.donate-box .donate-qr-code .donate-amount span[data-v-2db85096]{font-size:13px;color:var(--color-9)}.donate-box .donate-qr-code .donate-amount[data-v-2db85096] :nth-child(2){color:var(--color-1)}.donate-box .donate-qr-code .qr-code-img[data-v-2db85096]{margin-top:16px;width:148px;height:148px}.donate-box .donate-qr-code .donate-qr-code-list[data-v-2db85096]{margin-top:16px;display:grid;grid-gap:8px 0;gap:8px 0}.donate-box .donate-hash[data-v-2db85096]{margin-top:16px}.donate-box .donate-hash-link[data-v-2db85096]{margin-top:8px;height:48px;padding:0 12px;background:var(--bg-13);border:1px solid var(--border-4);border-radius:12px}.donate-box .donate-hash-link input[data-v-2db85096]{width:100%;background:none;border:none;outline:none;height:48px;color:var(--color-1)}.donate-box .donate-hash-link input[data-v-2db85096]::-moz-placeholder{color:var(--color-3);font-size:12px}.donate-box .donate-hash-link input[data-v-2db85096]:-ms-input-placeholder{color:var(--color-3);font-size:12px}.donate-box .donate-hash-link input[data-v-2db85096]::placeholder{color:var(--color-3);font-size:12px}.donate-box .button[data-v-2db85096]{width:452px;margin:16px auto 0;height:44px;line-height:44px;background:#2980fe;border-radius:8px;font-size:12px;font-weight:500;text-align:center;color:#fff;cursor:pointer}@media screen and (max-width:767px){.donate-box[data-v-2db85096]{margin-top:20px}.donate-box .title[data-v-2db85096]{font-size:13px;font-weight:500}.donate-box .donate-desc[data-v-2db85096]{text-align:left}.donate-box .donate-tutorial[data-v-2db85096]{display:none}.donate-box .donate-tutorial-content[data-v-2db85096]{grid-gap:10px 0;gap:10px 0}.donate-box .donate-tutorial-content .title[data-v-2db85096]{display:block}.donate-box .donate-tutorial-content .line[data-v-2db85096]{display:block;height:1px;background:var(--dividing-line-bg-1)}.donate-box .donate-tutorial-content .donate-token-info[data-v-2db85096]{position:static;transform:none;border:none;box-shadow:none;background:none;padding:0}.donate-box .donate-qr-code[data-v-2db85096]{font-size:0;margin-top:16px;display:flex;flex-direction:column;align-items:center;border-radius:12px;padding:16px}.donate-box .donate-qr-code .donate-amount[data-v-2db85096]{height:34px;line-height:34px;padding:0 28px;border-radius:8px;box-shadow:0 5px 20px 0 rgba(0,0,0,.1)}.donate-box .donate-qr-code .donate-amount span[data-v-2db85096]{font-size:13px}.donate-box .donate-qr-code .donate-amount[data-v-2db85096] :nth-child(2){margin-left:8px}.donate-box .donate-qr-code .qr-code-img[data-v-2db85096]{margin-top:28px;width:134px;height:134px}.donate-box .donate-qr-code .donate-qr-code-list[data-v-2db85096]{margin-top:27px;grid-gap:16px 0;gap:16px 0;width:100%}.donate-box .donate-hash[data-v-2db85096]{margin-top:16px}.donate-box .donate-hash-link input[data-v-2db85096]::-moz-placeholder{font-size:12px}.donate-box .donate-hash-link input[data-v-2db85096]:-ms-input-placeholder{font-size:12px}.donate-box .donate-hash-link input[data-v-2db85096]::placeholder{font-size:12px}.donate-box .button[data-v-2db85096]{width:100%}}.modal[data-v-39aa751a]{position:fixed;z-index:9998;left:50%;top:50%;transform:translate(-50%,-50%);width:100vw;height:100vh;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center}.modal .modal-content[data-v-39aa751a]{position:relative;background:#fff;width:440px;border-radius:8px}.modal .modal-content .content[data-v-39aa751a]{border-radius:8px;display:flex;flex-direction:column;align-items:center;margin:6px;padding:32px 32px 36px;background:linear-gradient(180deg,#e8f4ff,hsla(0,0%,100%,0) 100%)}.modal .modal-content .content img[data-v-39aa751a]{width:171px;height:97px}.modal .modal-content .content .desc1[data-v-39aa751a]{margin:25px 0 8px;font-size:24px;font-weight:700;text-align:center;color:#eb5757}.modal .modal-content .content .desc2[data-v-39aa751a]{font-size:14px;font-weight:400;text-align:center;color:#828282}.modal .modal-content .content .button[data-v-39aa751a]{margin-top:40px;padding:16px 76px;background:#2980fe;border-radius:8px;font-size:14px;text-align:center;color:#fff;cursor:pointer}.modal .modal-content .close[data-v-39aa751a]{position:absolute;top:16px;right:16px;width:20px;height:20px;cursor:pointer}@media screen and (max-width:767px){.modal .modal-content[data-v-39aa751a]{width:75%;border-radius:8px}.modal .modal-content .content[data-v-39aa751a]{border-radius:8px}.modal .modal-content .content img[data-v-39aa751a]{width:120px;height:74px}.modal .modal-content .content .desc1[data-v-39aa751a]{font-size:16px}.modal .modal-content .content .desc2[data-v-39aa751a]{font-size:14px}.modal .modal-content .content .button[data-v-39aa751a]{margin-top:20px;padding:8px 38px;background:#2980fe;border-radius:4px;font-size:15px}.modal .modal-content .close[data-v-39aa751a]{width:14px;height:14px}}.footer-follow-1[data-v-8a788154]{background:url("d3084fd6ccf43bca82d2ac12aaabff3450c938d7.png") no-repeat 100%/contain;cursor:pointer}.footer-follow-1[data-v-8a788154]:hover{background:url("840f769e65930fa732bc15086cc93f62ddb2c29e.png") no-repeat 100%/contain}.footer-follow-2[data-v-8a788154]{background:url("b4f6f9371f15eb263f26d201b9158a2b23c468d3.png") no-repeat 100%/contain;cursor:pointer}.footer-follow-2[data-v-8a788154]:hover{background:url("4735d1d0540bffe2a4a08d2327ab19d76c2dff2e.png") no-repeat 100%/contain}.footer-follow-3[data-v-8a788154]{background:url("d9fae872ac688cd3bc8ea41feb86f15477414d39.png") no-repeat 100%/contain;cursor:pointer}.footer-follow-3[data-v-8a788154]:hover{background:url("d5291f5effc4aa65a5acb3f01e15ed1716c4e26f.png") no-repeat 100%/contain}.footer-follow-4[data-v-8a788154]{background:url("f88012c9f238fa4a7689f577fc17790f2a3a69a7.png") no-repeat 100%/contain;cursor:pointer}.footer-follow-4[data-v-8a788154]:hover{background:url("f0f9eaa488c8dbc2b487260232904d845cdb2642.png") no-repeat 100%/contain}.footer-follow-5[data-v-8a788154]{background:url("c2eca8c3c1262b316c7de43a89c3301650ac6ffc.png") no-repeat 100%/contain;cursor:pointer}.footer-follow-5[data-v-8a788154]:hover{background:url("a63949d53bb9d447ac689592c54e5dc943c53320.png") no-repeat 100%/contain}.footer-follow-6[data-v-8a788154]{background:url("2d82225174785a64fedca89f013ccdfb5ad2bc3f.png") no-repeat 100%/contain;cursor:pointer}.footer-follow-6[data-v-8a788154]:hover{background:url("38269b6ac95fd166fb15256d7e69a9ff29343965.png") no-repeat 100%/contain}.footer-follow-7[data-v-8a788154]{background:url("704ee9c10a2eb3f00017ab0a993156ae65ee127e.png") no-repeat 100%/contain;cursor:pointer}.footer-follow-7[data-v-8a788154]:hover{background:url("82d3b7142caf2facaafba636068f7edafa2ea19c.png") no-repeat 100%/contain}.footer-follow-8[data-v-8a788154]{background:url("294de82dff8da6e5713a0a1051c80d4987f767b4.png") no-repeat 100%/contain;cursor:pointer}.footer-follow-8[data-v-8a788154]:hover{background:url("2b5f0473abe82072b0e74ca84e885e54926fafec.png") no-repeat 100%/contain}.FooterLayout[data-v-8a788154]{background:var(--footer-bg)}.FooterLayout .content[data-v-8a788154]{padding:80px 0 164px}.FooterLayout .content .follow-wrap .logo[data-v-8a788154]{width:225px}.FooterLayout .content .follow-wrap .footer-follows[data-v-8a788154]{margin:32px 0 16px;max-width:200px;display:flex;flex-wrap:wrap;grid-gap:10px;gap:10px}.FooterLayout .content .follow-wrap .footer-follows .footer-follow[data-v-8a788154]{width:32px;height:32px}.FooterLayout .content .follow-wrap .copyright[data-v-8a788154]{font-size:12px;font-weight:400;color:var(--copyright-color);line-height:20px}.FooterLayout .content .footer-wrap[data-v-8a788154]{margin-left:131px}.FooterLayout .content .footer-wrap h3[data-v-8a788154]{margin-top:0;margin-bottom:30px}.FooterLayout .content .footer-wrap .footer-list[data-v-8a788154]{padding:0 10px}.FooterLayout .content .footer-wrap .footer-list.lang-wrap[data-v-8a788154]{width:30%}.FooterLayout .content .footer-wrap .footer-list.lang-wrap[data-v-8a788154]:nth-child(n+4){margin-top:20px}.FooterLayout .content .footer-wrap .footer-list .footer-item[data-v-8a788154]:nth-child(n+2){margin-top:30px}.FooterLayout .content .footer-wrap .footer-list .footer-item .title[data-v-8a788154]{font-size:14px;font-weight:300;color:var(--footer-nav-title-color);line-height:20px}.FooterLayout .content .footer-wrap .footer-list .footer-item .title img[data-v-8a788154]{display:none}.FooterLayout .content .footer-wrap .footer-list .footer-item .footer-link-wrap[data-v-8a788154]{margin-top:24px}.FooterLayout .content .footer-wrap .footer-list .footer-item .footer-link-wrap .footer-link a[data-v-8a788154]{display:inline-block;margin-bottom:15px;font-size:14px;font-weight:300;color:var(--footer-nav-option-color);line-height:18px;word-break:break-word;max-width:100px}.FooterLayout .content .footer-wrap .footer-list .footer-item .footer-link-wrap .footer-link a[data-v-8a788154]:hover{color:#2980fe}.footer-email[data-v-8a788154]{position:absolute;border:1px solid #2980fe;border-radius:4px;display:flex;align-items:center;height:32px;font-size:14px}.footer-email input[data-v-8a788154]{outline:none;border:0;color:#101010;width:160px;height:100%;margin:0 0 0 10px}.footer-email input[data-v-8a788154]::-webkit-input-placeholder{color:#b1b1b1}.footer-email input[data-v-8a788154]::-moz-placeholder{color:#b1b1b1}.footer-email input[data-v-8a788154]::-ms-placeholder{color:#b1b1b1}.footer-email span[data-v-8a788154]{display:flex;justify-content:center;align-items:center;text-align:center;font-size:12px;font-weight:400;width:80px;height:32px;line-height:32px;color:#fff;background:#2980fe;position:relative;border-radius:0 4px 4px 0}.email-icon-right[data-v-8a788154]{display:inline-block;position:relative;margin-left:5px;width:6px;height:6px}.email-icon-right[data-v-8a788154]:after{content:"";position:absolute;top:0;left:2px;width:6px;height:6px;border-top:1px solid #fff;border-right:1px solid #fff;transform:rotate(45deg)}@media screen and (max-width:1300px){.FooterLayout .content[data-v-8a788154]{padding:80px 20px 164px}}@media screen and (max-width:1200px){.FooterLayout .content[data-v-8a788154]{padding:80px 20px 164px}.FooterLayout .content .follow-wrap .footer-follows[data-v-8a788154]{max-width:none}.FooterLayout .content .footer-wrap[data-v-8a788154]{margin-left:0;margin-top:40px}.FooterLayout .content .footer-wrap .footer-list[data-v-8a788154]{padding:0}.FooterLayout .content .footer-wrap .footer-list .footer-item .title[data-v-8a788154]{text-align:left}}@media screen and (max-width:768px){.footer-follow-1[data-v-8a788154]{cursor:pointer}.footer-follow-1[data-v-8a788154],.footer-follow-1[data-v-8a788154]:hover{background:url("d3084fd6ccf43bca82d2ac12aaabff3450c938d7.png") no-repeat 100%/contain}.footer-follow-2[data-v-8a788154]{cursor:pointer}.footer-follow-2[data-v-8a788154],.footer-follow-2[data-v-8a788154]:hover{background:url("b4f6f9371f15eb263f26d201b9158a2b23c468d3.png") no-repeat 100%/contain}.footer-follow-3[data-v-8a788154]{cursor:pointer}.footer-follow-3[data-v-8a788154],.footer-follow-3[data-v-8a788154]:hover{background:url("d9fae872ac688cd3bc8ea41feb86f15477414d39.png") no-repeat 100%/contain}.footer-follow-4[data-v-8a788154]{cursor:pointer}.footer-follow-4[data-v-8a788154],.footer-follow-4[data-v-8a788154]:hover{background:url("f88012c9f238fa4a7689f577fc17790f2a3a69a7.png") no-repeat 100%/contain}.footer-follow-5[data-v-8a788154]{cursor:pointer}.footer-follow-5[data-v-8a788154],.footer-follow-5[data-v-8a788154]:hover{background:url("c2eca8c3c1262b316c7de43a89c3301650ac6ffc.png") no-repeat 100%/contain}.footer-follow-6[data-v-8a788154]{cursor:pointer}.footer-follow-6[data-v-8a788154],.footer-follow-6[data-v-8a788154]:hover{background:url("2d82225174785a64fedca89f013ccdfb5ad2bc3f.png") no-repeat 100%/contain}.footer-follow-7[data-v-8a788154]{cursor:pointer}.footer-follow-7[data-v-8a788154],.footer-follow-7[data-v-8a788154]:hover{background:url("704ee9c10a2eb3f00017ab0a993156ae65ee127e.png") no-repeat 100%/contain}.footer-follow-8[data-v-8a788154]{cursor:pointer}.footer-follow-8[data-v-8a788154],.footer-follow-8[data-v-8a788154]:hover{background:url("294de82dff8da6e5713a0a1051c80d4987f767b4.png") no-repeat 100%/contain}.FooterLayout .content[data-v-8a788154]{padding:68px 28px 60px}.FooterLayout .content .follow-wrap .logo[data-v-8a788154]{width:199px}.FooterLayout .content .follow-wrap .footer-follows[data-v-8a788154]{margin:41px 0 21px}.FooterLayout .content .follow-wrap .copyright[data-v-8a788154]{font-size:13px}.FooterLayout .content .footer-wrap[data-v-8a788154]{margin:32px 0 0}.FooterLayout .content .footer-wrap .footer-list[data-v-8a788154]{padding:0;width:100%;margin-bottom:28px}.FooterLayout .content .footer-wrap .footer-list.lang-wrap[data-v-8a788154]{width:100%}.FooterLayout .content .footer-wrap .footer-list.lang-wrap[data-v-8a788154]:nth-child(n+4){margin-top:0}.FooterLayout .content .footer-wrap .footer-list .footer-item[data-v-8a788154]:nth-child(n+2){margin-top:28px}.FooterLayout .content .footer-wrap .footer-list .footer-item .title[data-v-8a788154]{padding:0;font-size:17px;display:flex;align-items:center;justify-content:space-between;color:var(--footer-nav-option-color)}.FooterLayout .content .footer-wrap .footer-list .footer-item .title span[data-v-8a788154]{font-weight:600}.FooterLayout .content .footer-wrap .footer-list .footer-item .title img[data-v-8a788154]{display:inline-block;width:12px;height:12px}.FooterLayout .content .footer-wrap .footer-list .footer-item .footer-link-wrap[data-v-8a788154]{margin-top:12px;margin-left:20px}.FooterLayout .content .footer-wrap .footer-list .footer-item .footer-link-wrap .footer-link[data-v-8a788154]{width:100%}.FooterLayout .content .footer-wrap .footer-list .footer-item .footer-link-wrap .footer-link a[data-v-8a788154]{margin-bottom:8px;line-height:21px;max-width:none;color:var(--footer-nav-title-color);font-size:16px}}@media screen and (max-width:575px){.footer-link-wrap[data-v-8a788154]{display:flex;flex-wrap:wrap}.footer-link-wrap .footer-link[data-v-8a788154]{width:33%}.footer-link-wrap .footer-link.width0[data-v-8a788154]{width:0}.footer-list[data-v-8a788154]{margin-bottom:10px}.footer-link a[data-v-8a788154],.footer-link h3[data-v-8a788154]{margin-bottom:0}.footer-email input[data-v-8a788154]{width:200px}}.weui-switch{display:block;position:relative;width:28px;height:16px;border:1px solid var(--switch-border);outline:0;border-radius:8px;box-sizing:border-box;background-color:var(--switch-bg);transition:background-color .1s,border .1s;cursor:pointer}.weui-switch:before{width:26px;border-radius:15px;background-color:var(--switch-before-bg);transition:transform .35s cubic-bezier(.45,1,.4,1)}.weui-switch:after,.weui-switch:before{content:" ";position:absolute;top:0;left:0;height:14px}.weui-switch:after{width:14px;border-radius:7px;background-color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.4);transition:transform .35s cubic-bezier(.4,.4,.25,1.35)}.weui-switch-on,.weui-switch-on:before{border-color:var(--switch-on);background-color:var(--switch-on)}.weui-switch-on:after{transform:translateX(12px)}.big.weui-switch{width:65px;height:36px;border-radius:18px}.big.weui-switch:before{width:63px;height:34px;border-radius:32.5px}.big.weui-switch:after{width:34px;height:34px;border-radius:17px}.big.weui-switch-on:after{transform:translateX(29px)}@media screen and (max-width:680px){.big.weui-switch{width:50px;height:28px;border-radius:14px}.big.weui-switch:before{width:48px;height:26px;border-radius:25px}.big.weui-switch:after{width:26px;height:26px;border-radius:13px}.big.weui-switch-on:after{transform:translateX(22px)}}.brand-kit-item .nav-icon-1[data-v-0d102f48]{width:32px;height:32px;background:url("") no-repeat 100%/contain}.brand-kit-item .nav-icon-1-dark[data-v-0d102f48]{width:32px;height:32px;background:url("") no-repeat 100%/contain}.brand-kit-item:hover .nav-icon-1-dark[data-v-0d102f48],.brand-kit-item:hover .nav-icon-1[data-v-0d102f48]{background:url("") no-repeat 100%/contain}.brand-kit-item .nav-icon-2[data-v-0d102f48]{width:32px;height:32px;background:url("") no-repeat 100%/contain}.brand-kit-item .nav-icon-2-dark[data-v-0d102f48]{width:32px;height:32px;background:url("") no-repeat 100%/contain}.brand-kit-item:hover .nav-icon-2-dark[data-v-0d102f48],.brand-kit-item:hover .nav-icon-2[data-v-0d102f48]{background:url("") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-1[data-v-0d102f48]{width:20px;height:20px;background:url("65856ed4259b4a2b336e292320340c43124bb6a0.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-1-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-1-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-1[data-v-0d102f48]{background:url("eeede2ebda74610ab99a54fc8ec8c6a0edefe251.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-2[data-v-0d102f48]{width:20px;height:20px;background:url("64162be48120e4650efdbd450e2a64140f5fab29.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-2-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-2-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-2[data-v-0d102f48]{background:url("b60cd2ed6e4b3c19a51fd00595b576366d957b95.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-3[data-v-0d102f48]{width:20px;height:20px;background:url("9fc3bef5b0ae600f089a1f5256dc31f1355bfa41.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-3-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-3-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-3[data-v-0d102f48]{background:url("d5742584c6dbc86fa062331d167beb6acaa2224b.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-4[data-v-0d102f48]{width:20px;height:20px;background:url("e965c35a19f5d3802759a8871bff0137fe86164f.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-4-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-4-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-4[data-v-0d102f48]{background:url("f702a685c640cb3aed9b271fdf70e6f51a70de24.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-5[data-v-0d102f48]{width:20px;height:20px;background:url("3f071c9c54f83e5adcbd7243539972d0da2d8536.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-5-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-5-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-5[data-v-0d102f48]{background:url("fcd1867c2d0f9a6a900b2af814ff4b2b2d96d714.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-6[data-v-0d102f48]{width:20px;height:20px;background:url("a7ea695fec77c4db2b23263ce2608eae5bba39dc.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-6-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-6-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-6[data-v-0d102f48]{background:url("3fbfdbe2d5671e6eada848915059e863ace73a6b.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-7[data-v-0d102f48]{width:20px;height:20px;background:url("1d9cd32a971a2a17f1f7423128710893b1430040.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-7-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-7-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-7[data-v-0d102f48]{background:url("edda16b9580e0d0cea0c9019a221be1ff4f21192.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-8[data-v-0d102f48]{width:20px;height:20px;background:url("d9df47fd321f04018de3d171bf95301171eb4a03.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-8-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-8-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-8[data-v-0d102f48]{background:url("59230dde0f70ca076652e6678eed578635b04753.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-9[data-v-0d102f48]{width:20px;height:20px;background:url("cfbb6791b2fe48fd77fcd9935f3ac0c8d81a8bd3.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-9-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-9-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-9[data-v-0d102f48]{background:url("2957753ac0d298cb5a7d989cb45def230f64fa60.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-10[data-v-0d102f48]{width:20px;height:20px;background:url("e44053d68a08b5d0c8d5882e50923133ce7f184a.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-10-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-10-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-10[data-v-0d102f48]{background:url("a83b2bee396de41a20245256bdcbbcef85ccb0cc.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-11[data-v-0d102f48]{width:20px;height:20px;background:url("814f8904f29445e280f12d08cb2550f932d56f09.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-11-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-11-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-11[data-v-0d102f48]{background:url("a57e7e24f30ef10fa8f0401a60838f36d3effad9.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-12[data-v-0d102f48]{width:20px;height:20px;background:url("263b3dcb891165580e3d7d0969b3d92f1f509a4d.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-12-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-12-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-12[data-v-0d102f48]{background:url("16599e27ae0268ad7d8bbae24e55d39bf64ba79f.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-13[data-v-0d102f48]{width:20px;height:20px;background:url("a54801e1be11085a88de10eeff0c88583d07dd2f.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-13-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-13-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-13[data-v-0d102f48]{background:url("e0cbd5c159ffc5d3ffae7fbf57408b22dabfa107.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-14[data-v-0d102f48]{width:20px;height:20px;background:url("15bcc310a3d844d67e17b67432b63fd0f5f595ed.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-14-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-14-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-14[data-v-0d102f48]{background:url("2346f4850a958ab2566146a3c6a34f4cb621b6c9.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-15[data-v-0d102f48]{width:20px;height:20px;background:url("61e36b44286ce5a2e3ecbaee6b648365d4001e06.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-15-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-15-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-15[data-v-0d102f48]{background:url("c7276f7879df423fd3dadc79569a68e7f01f89ba.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-16[data-v-0d102f48]{width:20px;height:20px;background:url("f066ae98a02a99e58b2d771dc8e13d84daf3cb9c.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-16-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-16-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-16[data-v-0d102f48]{background:url("32704b7ec114fbf6e9ce9b588156006a18713976.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-17[data-v-0d102f48]{width:20px;height:20px;background:url("438b34784d2584192f0d5c0647f8df62de9db6de.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-17-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-17-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-17[data-v-0d102f48]{background:url("b506dd3b81012c9e7f9a1ad63b71493b373fc2c1.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-18[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-18-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-18-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-18[data-v-0d102f48]{background:url("") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-19[data-v-0d102f48]{width:20px;height:20px;background:url("cd700a19e565069fd828126fec1b5f645c5a94dc.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-19-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-19-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-19[data-v-0d102f48]{background:url("43b9b28d2683eac340994be8e1951aeb07204275.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-20[data-v-0d102f48]{width:20px;height:20px;background:url("79316790e18db0a745e2be1718edec2278893304.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-20-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-20-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-20[data-v-0d102f48]{background:url("e9e31816e4dd199cd29627fe7b65c8031fea7a83.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-21[data-v-0d102f48]{width:20px;height:20px;background:url("2a08f86317bdb40fc33915923bcb0ee46b5fa95a.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-21-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-21-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-21[data-v-0d102f48]{background:url("6cbdf315a7ae21bb47eb732395311e7a7308559a.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-22[data-v-0d102f48]{width:20px;height:20px;background:url("8a777c9c7c4fc43c7547f749ee3dc39002ea5c56.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-22-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-22-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-22[data-v-0d102f48]{background:url("c659edd88e864834210e1f9d0fc4952e837314ca.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-23[data-v-0d102f48]{width:20px;height:20px;background:url("d7f711cb7f4e06b0513c8213725890d14c636320.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-23-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-23-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-23[data-v-0d102f48]{background:url("4e6c6cec8cb4a048f998b6b193ee29b400043593.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-24[data-v-0d102f48]{width:20px;height:20px;background:url("a217ade29a1006b910426d8c6f594b8df0c1849e.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-24-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-24-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-24[data-v-0d102f48]{background:url("b7e6a99e0538a72ddcb1d99871cfeb17de41c312.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-25[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-25-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-icon-25-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-25[data-v-0d102f48]{background:url("") no-repeat 100%/contain}.nav-children-item .nav-children-header[data-v-0d102f48]{display:flex;align-items:center}.nav-children-item .nav-children-header .nav-icon-26[data-v-0d102f48]{width:20px;height:20px;background:url("47eb997256a3962c47fcc31533bb8c75b1db7a71.png") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-icon-26-dark[data-v-0d102f48]{width:20px;height:20px;background:url("") no-repeat 100%/contain}.nav-children-item .nav-children-header .nav-text[data-v-0d102f48]{margin-left:16px;font-size:16px;font-weight:600;color:var(--color-1);word-break:break-word;border-bottom:1px solid transparent}.nav-children-item:hover .nav-children-header .nav-icon-26-dark[data-v-0d102f48],.nav-children-item:hover .nav-children-header .nav-icon-26[data-v-0d102f48]{background:url("d637e80a6d44c1427182801c8e605b4070f28728.png") no-repeat 100%/contain}.nav-children-item:hover .nav-children-header .nav-text[data-v-0d102f48]{color:#2980fe}.normal-nav .navbar-wrap[data-v-0d102f48]{position:relative;z-index:10}.normal-nav .navbar-wrap-child-container[data-v-0d102f48]{width:100vw;height:100vh;background:var(--navbar-wrap-child-container-bg);position:absolute;z-index:5;left:0;top:0;visibility:hidden;opacity:0;transition:all .5s cubic-bezier(.4,0,.2,1)}.normal-nav .navbar-wrap-child-container.chinese[data-v-0d102f48]{height:calc(100vh - 52px);top:52px}.normal-nav .navbar-wrap-child-container.show[data-v-0d102f48]{visibility:visible;opacity:1}.normal-nav .navbar-wrap-child-container .navbar-wrap-child-content-wrap[data-v-0d102f48]{transition:all .5s cubic-bezier(.4,0,.2,1);background:var(--bg-1);height:380px;transform:translateY(-460px)}.normal-nav .navbar-wrap-child-container .navbar-wrap-child-content-wrap .navbar-wrap-child-content[data-v-0d102f48]{position:relative;max-width:1200px;margin:0 auto;height:100%}.normal-nav .navbar-wrap-child-container .navbar-wrap-child-content-wrap .navbar-wrap-child-content .navbar-wrap-child-item[data-v-0d102f48]{display:flex;visibility:hidden;height:0;width:100%;position:absolute;left:0;top:90px;height:auto}.normal-nav .navbar-wrap-child-container .navbar-wrap-child-content-wrap .navbar-wrap-child-content .navbar-wrap-child-item .nav-child-left[data-v-0d102f48]{font-size:0}.normal-nav .navbar-wrap-child-container .navbar-wrap-child-content-wrap .navbar-wrap-child-content .navbar-wrap-child-item .nav-child-left img[data-v-0d102f48]{width:256px;height:256px}.normal-nav .navbar-wrap-child-container .navbar-wrap-child-content-wrap .navbar-wrap-child-content .navbar-wrap-child-item .nav-child-right[data-v-0d102f48]{margin-left:100px;display:grid;grid-template-columns:300px 300px;grid-gap:24px 80px;gap:24px 80px;height:100%}.normal-nav .navbar-wrap-child-container .navbar-wrap-child-content-wrap .navbar-wrap-child-content .navbar-wrap-child-item .nav-child-right .nav-children-item[data-v-0d102f48]{cursor:pointer}.normal-nav .navbar-wrap-child-container .navbar-wrap-child-content-wrap .navbar-wrap-child-content .navbar-wrap-child-item .nav-child-right .nav-children-item .nav-children-desc[data-v-0d102f48]{margin:2px 0 0 36px;font-size:14px;color:var(--color-7);word-break:break-word}.normal-nav .navbar-wrap-child-container .navbar-wrap-child-content-wrap .navbar-wrap-child-content .navbar-wrap-child-item .nav-child-right.display-type-3[data-v-0d102f48]{grid-template-columns:300px 300px 300px;grid-gap:24px 10px;gap:24px 10px;margin-left:48px}.normal-nav .navbar-wrap-child-container .navbar-wrap-child-content-wrap.ani-down[data-v-0d102f48]{transform:translateY(0)}.normal-nav .navbar-wrap-child-container .navbar-wrap-child-content-wrap.ani-down .navbar-wrap-child-content .navbar-wrap-child-item.show[data-v-0d102f48]{visibility:visible}.navbar-wrap[data-v-0d102f48]{margin:0 auto}.navbar-logo[data-v-0d102f48],.navbar-wrap[data-v-0d102f48]{display:flex;align-items:center}.navbar-logo[data-v-0d102f48]{height:60px;position:relative}.navbar-logo img[data-v-0d102f48]{width:175px}.navbar-logo .brand-kit-wrap[data-v-0d102f48]{position:absolute;left:0;top:60px;background:var(--navbar-wrap-child-language-bg);border:1px solid var(--navbar-wrap-child-language-border);border-radius:12px;box-shadow:0 6px 16px 0 rgba(45,54,86,.05);padding:24px 0;display:flex;flex-direction:column;grid-gap:24px 0;gap:24px 0}.navbar-logo .brand-kit-wrap .brand-kit-item[data-v-0d102f48]{display:flex;align-items:center;grid-gap:0 24px;gap:0 24px;padding:0 24px;cursor:pointer}.navbar-logo .brand-kit-wrap .brand-kit-item img[data-v-0d102f48]{width:32px;height:32px}.navbar-logo .brand-kit-wrap .brand-kit-item span[data-v-0d102f48]{font-size:16px;font-weight:500;color:var(--color-1);white-space:nowrap}.navbar-logo .brand-kit-wrap .brand-kit-item:hover span[data-v-0d102f48]{color:#2980fe}.navbar-tab-list[data-v-0d102f48]{margin-left:20px;display:flex;flex:1}.navbar-tab-list .nav-title[data-v-0d102f48]{display:inline-block;position:relative;height:60px;line-height:60px;color:var(--color-1);padding:0 13px}.navbar-tab-list .nav-title.active .title[data-v-0d102f48]{opacity:.7;color:#2980fe;position:relative}.navbar-tab-list .nav-title.active .title .icon-down-333[data-v-0d102f48]:after{border-top:2px solid #2980fe;border-right:2px solid #2980fe}.navbar-tab-list .nav-title.active .title .nav-title-border-bottom[data-v-0d102f48]{position:absolute;left:0;bottom:0;width:100%;height:2px;background:#2980fe}.navbar-tab-list .nav-title .title-left[data-v-0d102f48]{margin-right:4px;font-size:15px}.navbar-tab-list .nav-title .language-content[data-v-0d102f48]{display:flex;align-items:center}.navbar-tab-list .nav-title .language-content .language-img[data-v-0d102f48]{width:24px}.navbar-tab-list .nav-title .language-content .language-title[data-v-0d102f48]{margin-left:10px}.navbar-tab-list .null[data-v-0d102f48]{flex:1;cursor:default;padding:0}.navbar-tab-list .nav-language[data-v-0d102f48]{margin-right:0}.navbar-tab-list .nav-dark-mode[data-v-0d102f48]{display:flex;align-items:center;justify-content:flex-end}.navbar-tab-list .nav-dark-mode .dark-mode-content[data-v-0d102f48]{display:flex;cursor:pointer}.navbar-tab-list .nav-dark-mode .dark-mode-content img[data-v-0d102f48]{width:24px;height:24px}.navbar-tab-list .nav-children-wrap[data-v-0d102f48]{display:grid;grid-template-columns:1fr;position:absolute;top:60px;left:50%;transform:translateX(-50%);padding:24px 24px 0;background:var(--navbar-wrap-child-language-bg);transition:all .3s linear;z-index:10;border:1px solid var(--navbar-wrap-child-language-border);border-radius:12px;box-shadow:0 6px 16px 0 rgba(45,54,86,.05)}.navbar-tab-list .nav-children-wrap .svg[data-v-0d102f48]{position:absolute;z-index:0;top:-25px;left:15px}.navbar-tab-list .nav-children-wrap .triangle[data-v-0d102f48]{fill:#fff;stroke:#fff;stroke-width:70}.navbar-tab-list .nav-children-wrap a[data-v-0d102f48]{padding-bottom:24px}.navbar-tab-list .nav-children-wrap a .nav-children[data-v-0d102f48]{display:flex;align-items:center}.navbar-tab-list .nav-children-wrap a .nav-children img[data-v-0d102f48]{margin-left:38px;width:44px;height:44px}.navbar-tab-list .nav-children-wrap a .nav-children .detail[data-v-0d102f48]{flex:1;display:flex;flex-direction:column;margin-left:24px}.navbar-tab-list .nav-children-wrap a .nav-children .detail.lang[data-v-0d102f48]{margin-left:0}.navbar-tab-list .nav-children-wrap a .nav-children .detail.leftDis[data-v-0d102f48]{margin-left:16px}.navbar-tab-list .nav-children-wrap a .nav-children .detail .child-title[data-v-0d102f48]{font-size:16px;font-weight:400;text-align:left;color:var(--color-1);line-height:20px;white-space:nowrap}.navbar-tab-list .nav-children-wrap a .nav-children .detail .desc[data-v-0d102f48]{white-space:normal;font-size:14px;display:block;margin-top:5px;color:#9ea0a5;color:#7a7a7a;font-weight:300}.navbar-tab-list .nav-children-wrap a .line[data-v-0d102f48]{margin-top:10px;margin-left:68px;height:1px;background:#eee}.navbar-tab-list .nav-children-wrap a:hover .nav-children .detail .child-title[data-v-0d102f48]{color:#2980fe}@media screen and (max-width:1024px){.navbar-logo[data-v-0d102f48]{display:none}}.isFixed[data-v-2ac481d2]{position:fixed;top:0;left:0;width:100%;z-index:99999;background:var(--bg-41);height:100vh}.icon-right[data-v-2ac481d2]:after{border-top:2px solid var(--header-nav-arrow-color);border-right:2px solid var(--header-nav-arrow-color)}.mini-navbar-header[data-v-2ac481d2]{display:flex;padding:15px;height:60px}.mini-navbar-header.route-dappstore[data-v-2ac481d2]{padding:15px 16px}.mini-navbar-header div[data-v-2ac481d2]{flex:1}.mini-navbar-header .mini-navbar-logo[data-v-2ac481d2]{width:156px;margin-top:5px}.mini-menu[data-v-2ac481d2]{height:calc(100vh - 68px);overflow-x:auto}.menu-item[data-v-2ac481d2]{display:flex;align-items:center;height:52px;padding:0 15px}.menu-item div[data-v-2ac481d2]{flex:1}.menu-item .menu-item-title[data-v-2ac481d2]{display:flex;align-items:center;grid-gap:0 12px;gap:0 12px;color:var(--color-13);font-size:17px;font-weight:600}.menu-item .menu-item-title img[data-v-2ac481d2]{width:22px;height:22px}.menu-item .dark-mode-switch[data-v-2ac481d2] .switch-wrap{display:flex;justify-content:flex-end}.menu-item .dark-mode-switch[data-v-2ac481d2] .switch-wrap .weui-switch{width:34px;height:20px;border-radius:20px}.menu-item .dark-mode-switch[data-v-2ac481d2] .switch-wrap .weui-switch:before{width:32px;height:18px;border-radius:20px}.menu-item .dark-mode-switch[data-v-2ac481d2] .switch-wrap .weui-switch:after{width:18px;height:18px;border-radius:20px}.menu-item .dark-mode-switch[data-v-2ac481d2] .switch-wrap .weui-switch-on:after{transform:translateX(13px)}.menu-item.active[data-v-2ac481d2]{background:var(--bg-42)}.mini-menu-children[data-v-2ac481d2]{display:flex;flex-direction:column;padding:6px 0 6px 54px}.mini-menu-children-title[data-v-2ac481d2]{display:block;height:44px;line-height:44px;color:var(--color-25);font-size:15px}.menu-status[data-v-2ac481d2]{display:flex;align-items:center;justify-content:flex-end}.menu-status img[data-v-2ac481d2]{width:20px;height:20px}.mini-navbar-language[data-v-2ac481d2]{font-size:18px;margin-right:20px}.icon-dropdown[data-v-2ac481d2]{transform:rotate(90deg)}@media screen and (max-width:1300px){.menu-status img[data-v-2ac481d2]{width:26px;height:26px}}@media screen and (max-width:420px){.navbar-logo img[data-v-2ac481d2]{width:auto;height:24px;max-height:32px}.menu-status span[data-v-2ac481d2]{display:inline-block;width:30px;text-align:center;margin-right:10px}.menu-status img[data-v-2ac481d2]{width:24px;height:24px}.menu-status .menu-img[data-v-2ac481d2]{width:28px;height:28px}.mini-menu[data-v-2ac481d2]{height:calc(100vh - 60px);overflow-x:auto}.mini-navbar-language[data-v-2ac481d2]{font-size:16px}}.warn-container{height:57px;padding:10px 0;background:#2980fe;display:flex;justify-content:center;align-items:center}.warn-container img{width:12px;margin-right:10px}.warn-container span{font-size:14px;font-family:PingFangSC,PingFangSC-Regular;font-weight:500;text-align:left;color:#fff}.warn-container .learn{padding:7px 35px;border-radius:15px;background:#fff;font-size:12px;font-family:PingFang SC,PingFang SC-Medium;font-weight:500;color:#2980fe;margin-left:16px;cursor:pointer;white-space:nowrap}.warn-container .bold{font-weight:700}@media screen and (max-width:768px){.warn-container{height:auto;padding:10px;word-break:break-all}.warn-container .learn{padding:8px 15px;display:block;white-space:nowrap}.warn-container img{width:18px;margin-right:10px}}@media screen and (max-width:380px){.warn-container{height:auto;transform:scale(.75);transform-origin:0 0;width:133.3%}}@media screen and (max-width:300px){.warn-container{height:auto;transform:scale(.666);transform-origin:0 0;width:150%}}.tips[data-v-22a48f07]{position:relative;z-index:10;padding:12px 0;background:#fef5ee;display:flex;align-items:center;justify-content:center}.tips .tips-text[data-v-22a48f07]{font-size:14px;font-family:PingFang SC,PingFang SC-Regular;color:#ff7114;font-weight:500}.tips .tips-button[data-v-22a48f07]{padding:5px 10px;margin-left:16px;display:flex;align-items:center;justify-content:center;background:#ff7114;border-radius:7px;cursor:pointer}.tips .tips-button span[data-v-22a48f07]{font-size:12px;font-family:PingFang SC,PingFang SC-Medium;font-weight:500;color:#fff}.tips .tips-button img[data-v-22a48f07]{margin-left:4px;width:7px}@media screen and (max-width:767px){.tips[data-v-22a48f07]{padding:16px 24px;flex-direction:column;align-items:flex-start}.tips .tips-text[data-v-22a48f07]{font-size:14px;font-family:PingFang SC,PingFang SC-Regular;line-height:21px}.tips .tips-button[data-v-22a48f07]{padding:8px 12px;margin-left:0;margin-top:8px}.tips .tips-button span[data-v-22a48f07]{font-size:12px}.tips .tips-button img[data-v-22a48f07]{margin-left:4px;width:6px}}.HeaderLayout[data-v-17cd0f8a]{width:100%;position:fixed;top:0;z-index:998;background:var(--bg-1)}.HeaderLayout.scrollBg[data-v-17cd0f8a]{filter:drop-shadow(0 2px 5px rgba(0,0,0,.05))}.HeaderLayout.mobile-donate-layout[data-v-17cd0f8a]{background:var(--bg-33)}.mini-header[data-v-17cd0f8a]{display:none}@media screen and (max-width:1300px){.container[data-v-17cd0f8a]{max-width:1200px;padding:0 20px}.normal-header[data-v-17cd0f8a]{display:none}.mini-header[data-v-17cd0f8a]{display:block}}@media(min-width:1200px){.container[data-v-17cd0f8a]{max-width:1200px;padding:0;margin:0 auto}}@media screen and (max-width:1300px){.container[data-v-17cd0f8a]{padding:0 20px}}[data-v-c5a892b4] .icon-down-fff:after{border-color:#000!important}

         .vue-cropper[data-v-01ee97ad] {
         position: relative;
         width: 100%;
         height: 100%;
         box-sizing: border-box;
         user-select: none;
         -webkit-user-select: none;
         -moz-user-select: none;
         -ms-user-select: none;
         direction: ltr;
         touch-action: none;
         text-align: left;
         background-image: url("");
         }
         .cropper-box[data-v-01ee97ad],
         .cropper-box-canvas[data-v-01ee97ad],
         .cropper-drag-box[data-v-01ee97ad],
         .cropper-crop-box[data-v-01ee97ad],
         .cropper-face[data-v-01ee97ad] {
         position: absolute;
         top: 0;
         right: 0;
         bottom: 0;
         left: 0;
         user-select: none;
         }
         .cropper-box-canvas img[data-v-01ee97ad] {
         position: relative;
         text-align: left;
         user-select: none;
         transform: none;
         max-width: none;
         max-height: none;
         }
         .cropper-box[data-v-01ee97ad] {
         overflow: hidden;
         }
         .cropper-move[data-v-01ee97ad] {
         cursor: move;
         }
         .cropper-crop[data-v-01ee97ad] {
         cursor: crosshair;
         }
         .cropper-modal[data-v-01ee97ad] {
         background: rgba(0, 0, 0, 0.5);
         }
         .cropper-crop-box[data-v-01ee97ad] {
         /*border: 2px solid #39f;*/
         }
         .cropper-view-box[data-v-01ee97ad] {
         display: block;
         overflow: hidden;
         width: 100%;
         height: 100%;
         outline: 1px solid #39f;
         outline-color: rgba(51, 153, 255, 0.75);
         user-select: none;
         }
         .cropper-view-box img[data-v-01ee97ad] {
         user-select: none;
         text-align: left;
         max-width: none;
         max-height: none;
         }
         .cropper-face[data-v-01ee97ad] {
         top: 0;
         left: 0;
         background-color: #fff;
         opacity: 0.1;
         }
         .crop-info[data-v-01ee97ad] {
         position: absolute;
         left: 0px;
         min-width: 65px;
         text-align: center;
         color: white;
         line-height: 20px;
         background-color: rgba(0, 0, 0, 0.8);
         font-size: 12px;
         }
         .crop-line[data-v-01ee97ad] {
         position: absolute;
         display: block;
         width: 100%;
         height: 100%;
         opacity: 0.1;
         }
         .line-w[data-v-01ee97ad] {
         top: -3px;
         left: 0;
         height: 5px;
         cursor: n-resize;
         }
         .line-a[data-v-01ee97ad] {
         top: 0;
         left: -3px;
         width: 5px;
         cursor: w-resize;
         }
         .line-s[data-v-01ee97ad] {
         bottom: -3px;
         left: 0;
         height: 5px;
         cursor: s-resize;
         }
         .line-d[data-v-01ee97ad] {
         top: 0;
         right: -3px;
         width: 5px;
         cursor: e-resize;
         }
         .crop-point[data-v-01ee97ad] {
         position: absolute;
         width: 8px;
         height: 8px;
         opacity: 0.75;
         background-color: #39f;
         border-radius: 100%;
         }
         .point1[data-v-01ee97ad] {
         top: -4px;
         left: -4px;
         cursor: nw-resize;
         }
         .point2[data-v-01ee97ad] {
         top: -5px;
         left: 50%;
         margin-left: -3px;
         cursor: n-resize;
         }
         .point3[data-v-01ee97ad] {
         top: -4px;
         right: -4px;
         cursor: ne-resize;
         }
         .point4[data-v-01ee97ad] {
         top: 50%;
         left: -4px;
         margin-top: -3px;
         cursor: w-resize;
         }
         .point5[data-v-01ee97ad] {
         top: 50%;
         right: -4px;
         margin-top: -3px;
         cursor: e-resize;
         }
         .point6[data-v-01ee97ad] {
         bottom: -5px;
         left: -4px;
         cursor: sw-resize;
         }
         .point7[data-v-01ee97ad] {
         bottom: -5px;
         left: 50%;
         margin-left: -3px;
         cursor: s-resize;
         }
         .point8[data-v-01ee97ad] {
         bottom: -5px;
         right: -4px;
         cursor: se-resize;
         }
         @media screen and (max-width: 500px) {
         .crop-point[data-v-01ee97ad] {
         position: absolute;
         width: 20px;
         height: 20px;
         opacity: 0.45;
         background-color: #39f;
         border-radius: 100%;
         }
         .point1[data-v-01ee97ad] {
         top: -10px;
         left: -10px;
         }
         .point2[data-v-01ee97ad],
         .point4[data-v-01ee97ad],
         .point5[data-v-01ee97ad],
         .point7[data-v-01ee97ad] {
         display: none;
         }
         .point3[data-v-01ee97ad] {
         top: -10px;
         right: -10px;
         }
         .point4[data-v-01ee97ad] {
         top: 0;
         left: 0;
         }
         .point6[data-v-01ee97ad] {
         bottom: -10px;
         left: -10px;
         }
         .point8[data-v-01ee97ad] {
         bottom: -10px;
         right: -10px;
         }
         }
         /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8uL3NyYy92dWUtY3JvcHBlci52dWUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQTYrREE7RUFDQSxrQkFBQTtFQUNBLFdBQUE7RUFDQSxZQUFBO0VBQ0Esc0JBQUE7RUFDQSxpQkFBQTtFQUNBLHlCQUFBO0VBQ0Esc0JBQUE7RUFDQSxxQkFBQTtFQUNBLGNBQUE7RUFDQSxrQkFBQTtFQUNBLGdCQUFBO0VBQ0EseURBQUE7QUFDQTtBQUVBOzs7OztFQUtBLGtCQUFBO0VBQ0EsTUFBQTtFQUNBLFFBQUE7RUFDQSxTQUFBO0VBQ0EsT0FBQTtFQUNBLGlCQUFBO0FBQ0E7QUFFQTtFQUNBLGtCQUFBO0VBQ0EsZ0JBQUE7RUFDQSxpQkFBQTtFQUNBLGVBQUE7RUFDQSxlQUFBO0VBQ0EsZ0JBQUE7QUFDQTtBQUVBO0VBQ0EsZ0JBQUE7QUFDQTtBQUVBO0VBQ0EsWUFBQTtBQUNBO0FBRUE7RUFDQSxpQkFBQTtBQUNBO0FBRUE7RUFDQSw4QkFBQTtBQUNBO0FBRUE7RUFDQSwwQkFBQTtBQUNBO0FBRUE7RUFDQSxjQUFBO0VBQ0EsZ0JBQUE7RUFDQSxXQUFBO0VBQ0EsWUFBQTtFQUNBLHVCQUFBO0VBQ0EsdUNBQUE7RUFDQSxpQkFBQTtBQUNBO0FBRUE7RUFDQSxpQkFBQTtFQUNBLGdCQUFBO0VBQ0EsZUFBQTtFQUNBLGdCQU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YXRvci51c2VyQWdlbnQudG9Mb3dlckNhc2UoKS5tYXRjaCgvY3B1IGlwaG9uZSBvcyAoLio/KSBsaWtlIG1hYyBvcy8pXG4gICAgICAgICBpZiAoaXNJb3MpIHtcbiAgICAgICAgICAgbGV0IHZlcnNpb24gPSBpc0lvc1sxXVxuICAgICAgICAgICB2ZXJzaW9uID0gdmVyc2lvbi5zcGxpdCgnXycpXG4gICAgICAgICAgIGlmICh2ZXJzaW9uWzBdID4gMTMgfHwgICh2ZXJzaW9uWzBdID49IDEzICYmIHZlcnNpb25bMV0gPj0gNCkpIHtcbiAgICAgICAgICAgICBvcmllbnRhdGlvbiA9IC0xXG4gICAgICAgICAgIH1cbiAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgXG4gICAgICAvLyBhbGVydChg5b2T5YmN5aSE55CG55qEb3JpZW50YXRpb24ke29yaWVudGF0aW9ufWApXG4gICAgICBsZXQgY2FudmFzID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChcImNhbnZhc1wiKTtcbiAgICAgIGxldCBjdHggPSBjYW52YXMuZ2V0Q29udGV4dChcIjJkXCIpO1xuICAgICAgY3R4LnNhdmUoKTtcbiAgICAgIFxuICAgICAgc3dpdGNoIChvcmllbnRhdGlvbikge1xuICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgY2FudmFzLndpZHRoID0gd2lkdGg7XG4gICAgICAgICAgY2FudmFzLmhlaWdodCA9IGhlaWdodDtcbiAgICAgICAgICAvLyBob3Jpem9udGFsIGZsaXBcbiAgICAgICAgICBjdHgudHJhbnNsYXRlKHdpZHRoLCAwKTtcbiAgICAgICAgICBjdHguc2NhbGUoLTEsIDEpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgY2FudmFzLndpZHRoID0gd2lkdGg7XG4gICAgICAgICAgY2FudmFzLmhlaWdodCA9IGhlaWdodDtcbiAgICAgICAgICAvLzE4MCBncmF1c1xuICAgICAgICAgIGN0eC50cmFuc2xhdGUod2lkdGggLyAyLCBoZWlnaHQgLyAyKTtcbiAgICAgICAgICBjdHgucm90YXRlKCgxODAgKiBNYXRoLlBJKSAvIDE4MCk7XG4gICAgICAgICAgY3R4LnRyYW5zbGF0ZSgtd2lkdGggLyAyLCAtaGVpZ2h0IC8gMik7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgNDpcbiAgICAgICAgICBjYW52YXMud2lkdGggPSB3aWR0aDtcbiAgICAgICAgICBjYW52YXMuaGVpZ2h0ID0gaGVpZ2h0O1xuICAgICAgICAgIC8vIHZlcnRpY2FsIGZsaXBcbiAgICAgICAgICBjdHgudHJhbnNsYXRlKDAsIGhlaWdodCk7XG4gICAgICAgICAgY3R4LnNjYWxlKDEsIC0xKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSA1OlxuICAgICAgICAgIC8vIHZlcnRpY2FsIGZsaXAgKyA5MCByb3RhdGUgcmlnaHRcbiAgICAgICAgICBjYW52YXMuaGVpZ2h0ID0gd2lkdGg7XG4gICAgICAgICAgY2FudmFzLndpZHRoID0gaGVpZ2h0O1xuICAgICAgICAgIGN0eC5yb3RhdGUoMC41ICogTWF0aC5QSSk7XG4gICAgICAgICAgY3R4LnNjYWxlKDEsIC0xKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSA2OlxuICAgICAgICAgIGNhbnZhcy53aWR0aCA9IGhlaWdodDtcbiAgICAgICAgICBjYW52YXMuaGVpZ2h0ID0gd2lkdGg7XG4gICAgICAgICAgLy85MCBncmF1c1xuICAgICAgICAgIGN0eC50cmFuc2xhdGUoaGVpZ2h0IC8gMiwgd2lkdGggLyAyKTtcbiAgICAgICAgICBjdHgucm90YXRlKCg5MCAqIE1hdGguUEkpIC8gMTgwKTtcbiAgICAgICAgICBjdHgudHJhbnNsYXRlKC13aWR0aCAvIDIsIC1oZWlnaHQgLyAyKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgIC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3MgPSBkYXRhO1xuICAgICAgICB9LFxuICAgICAgICBcImltYWdlL1wiICsgdGhpcy5vdXRwdXRUeXBlLFxuICAgICAgICAxXG4gICAgICApO1xuICAgIH0sXG5cbiAgICAvLyBjaGVja291dCBpbWdcbiAgICBjaGVja2VkSW1nKCkge1xuICAgICAgaWYgKHRoaXMuaW1nID09PSBudWxsIHx8IHRoaXMuaW1nID09PSAnJykge1xuICAgICAgICB0aGlzLmltZ3MgPSAnJ1xuICAgICAgICB0aGlzLmNsZWFyQ3JvcCgpXG4gICAgICAgIHJldHVyblxuICAgICAgfVxuICAgICAgdGhpcy5sb2FkaW5nID0gdHJ1ZTtcbiAgICAgIHRoaXMuc2NhbGUgPSAxO1xuICAgICAgdGhpcy5yb3RhdGUgPSAwO1xuICAgICAgdGhpcy5jbGVhckNyb3AoKTtcbiAgICAgIGxldCBpbWcgPSBuZXcgSW1hZ2UoKTtcbiAgICAgIGltZy5vbmxvYWQgPSAoKSA9PiB7XG4gICAgICAgIGlmICh0aGlzLmltZyA9PT0gXCJcIikge1xuICAgICAgICAgIHRoaXMuJGVtaXQoXCJpbWdMb2FkXCIsIFwiZXJyb3JcIik7XG4gICAgICAgICAgdGhpcy4kZW1pdChcImltZy1sb2FkXCIsIFwiZXJyb3JcIik7XG4gICAgICAgICAgdGhpcy4kZW1pdChcImltZy1sb2FkXCIsIG5ldyBFcnJvcign5Zu+54mH5LiN6IO95Li656m6JykpO1xuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGxldCB3aWR0aCA9IGltZy53aWR0aDtcbiAgICAgICAgbGV0IGhlaWdodCA9IGltZy5oZWlnaHQ7XG4gICAgICAgIGV4aWZtaW4uZ2V0RGF0YShpbWcpLnRoZW4oZGF0YSA9PiB7XG4gICAgICAgICAgdGhpcy5vcmllbnRhdGlvbiA9IGRhdGEub3JpZW50YXRpb24gfHwgMTtcbiAgICAgICAgICBsZXQgbWF4ID0gTnVtYmVyKHRoaXMubWF4SW1nU2l6ZSk7XG4gICAgICAgICAgaWYgKCF0aGlzLm9yaWVudGF0aW9uICYmICh3aWR0aCA8IG1heCkgJiAoaGVpZ2h0IDwgbWF4KSkge1xuICAgICAgICAgICAgdGhpcy5pbWdzID0gdGhpcy5pbWc7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHdpZHRoID4gbWF4KSB7XG4gICAgICAgICAgICBoZWlnaHQgPSAoaGVpZ2h0IC8gd2lkdGgpICogbWF4O1xuICAgICAgICAgICAgd2lkdGggPSBtYXg7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGhlaWdodCA+IG1heCkge1xuICAgICAgICAgICAgd2lkdGggPSAod2lkdGggLyBoZWlnaHQpICogbWF4O1xuICAgICAgICAgICAgaGVpZ2h0ID0gbWF4O1xuICAgICAgICAgIH1cbiAgICAgICAgICB0aGlzLmNoZWNrT3JpZW50YXRpb25JbWFnZShpbWcsIHRoaXMub3JpZW50YXRpb24sIHdpZHRoLCBoZWlnaHQpO1xuICAgICAgICB9KS5jYXRjaChlcnJvciA9PiB7XG4gICAgICAgICAgdGhpcy4kZW1pdChcImltZy1sb2FkXCIsIFwiZXJyb3JcIik7XG4gICAgICAgICAgdGhpcy4kZW1pdChcImltZy1sb2FkLWVycm9yXCIsIGVycm9yKTtcbiAgICAgICAgfSk7XG4gICAgICB9O1xuXG4gICAgICBpbWcub25lcnJvciA9ICgpID0+IHtcbiAgICAgICAgdGhpcy4kZW1pdChcImltZ0xvYWRcIiwgXCJlcnJvclwiKTtcbiAgICAgICAgdGhpcy4kZW1pdChcImltZy1sb2FkXCIsIFwiZXJyb3JcIik7XG4gICAgICAgIHRoaXMuJGVtaXQoXCJpbWctbG9hZC1lcnJvclwiLCBlcnJvcik7XG4gICAgICB9O1xuXG4gICAgICAvLyDliKTmlq3lpoLmnpzkuI3mmK9iYXNlNjTlm77niYcg5YaN5re75YqgY3Jvc3NPcmlnaW7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KFxuICAgICAgICBNYXRoLnBvdyhvbGRUb3VjaDEueCAtIG9sZFRvdWNoMi54LCAyKSArXG4gICAgICAgICAgTWF0aC5wb3cob2xkVG91Y2gxLnkgLSBvbGRUb3VjaDIueSwgMilcbiAgICAgICk7XG4gICAgICB2YXIgbmV3TCA9IE1hdGguc3FydChcbiAgICAgICAgTWF0aC5wb3cobmV3VG91Y2gxLnggLSBuZXdUb3VjaDIueCwgMikgK1xuICAgICAgICAgIE1hdGgucG93KG5ld1RvdWNoMS55IC0gbmV3VG91Y2gyLnksIDIpXG4gICAgICApO1xuICAgICAgdmFyIGNoYSA9IG5ld0wgLSBvbGRMO1xuICAgICAgLy8g5qC55o2u5Zu+54mH5pys6Lqr5aSn5bCPIOWGs+Wumuavj+asoeaUueWPmOWkp+Wwj+eahOezu+aVsCwg5Zu+54mH6LaK5aSn57O75pWw6LaK5bCPXG4gICAgICAvLyAxcHggLSAwLjJcbiAgICAgIHZhciBjb2UgPSAxO1xuICAgICAgY29lID1cbiAgICAgICAgY29lIC8gdGhpcy50cnVlV2lkdGggPiBjb2UgLyB0aGlzLnRydWVIZWlnaHRcbiAgICAgICAgICA/IGNvZSAvIHRoaXMudHJ1ZUhlaWdodFxuICAgICAgICAgIDogY29lIC8gdGhpcy50cnVlV2lkdGg7XG4gICAgICBjb2UgPSBjb2UgPiAwLjEgPyAwLjEgOiBjb2U7XG4gICAgICB2YXIgbnVtID0gY29lICogY2hhO1xuICAgICAgaWYgKCF0aGlzLnRvdWNoTm93KSB7XG4gICAgICAgIHRoaXMudG91Y2hOb3cgPSB0cnVlO1xuICAgICAgICBpZiAoY2hhID4gMCkge1xuICAgICAgICAgIHNjYWxlICs9IE1hdGguYWJzKG51bSk7XG4gICAgICAgIH0gZWxzZSBpZiAoY2hhIDwgMCkge1xuICAgICAgICAgIHNjYWxlID4gTWF0aC5hYnMobnVtKSA/IChzY2FsZSAtPSBNYXRoLmFicyhudW0pKSA6IHNjYWxlO1xuICAgICAgICB9XG4gIC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ICAgICAgICAodGhpcy50cnVlSGVpZ2h0ICogKDEgLSB0aGlzLnNjYWxlKSkgLyAyICtcbiAgICAgICAgICAgICAgICAoaW1nSCAtIGltZ1cpIC8gMjtcbiAgICAgICAgICAgICAgbWF4UmlnaHQgPSBtYXhMZWZ0IC0gaW1nVyArIHRoaXMuY3JvcFc7XG4gICAgICAgICAgICAgIG1heEJvdHRvbSA9IG1heFRvcCAtIGltZ0ggKyB0aGlzLmNyb3BIO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgIG1heExlZnQgPVxuICAgICAgICAgICAgICAgIHRoaXMuY3JvcE9mZnNlcnRYIC0gKHRoaXMudHJ1ZVdpZHRoICogKDEgLSB0aGlzLnNjYWxlKSkgLyAyO1xuICAgICAgICAgICAgICBtYXhUb3AgPVxuICAgICAgICAgICAgICAgIHRoaXMuY3JvcE9mZnNlcnRZIC0gKHRoaXMudHJ1ZUhlaWdodCAqICgxIC0gdGhpcy5zY2FsZSkpIC8gMjtcbiAgICAgICAgICAgICAgbWF4UmlnaHQgPSBtYXhMZWZ0IC0gaW1nSCArIHRoaXMuY3JvcFc7XG4gICAgICAgICAgICAgIG1heEJvdHRvbSA9IG1heFRvcCAtIGltZ1cgKyB0aGlzLmNyb3BIO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICAvLyDlm77niYflt6bovrkg5Zu+54mH5LiN6IO96LaF6L+H5oiq5Zu+5qGGXG4gICAgICAgICAgaWYgKGF4aXMueDEgPj0gY3JvcEF4aXMueDEpIHtcbiAgICAgICAgICAgIGNoYW5nZVggPSBtYXhMZWZ0O1xuICAgICAgICAgIH1cblxuICAgICAgICAgIC8vIOWbvueJh+S4iui+uSDlm77niYfkuI3og73otoXov4fmiKrlm77moYZcbiAgICAgICAgICBpZiAoYXhpcy55MSA+PSBjcm9wQXhpcy55MSkge1xuICAgICAgICAgICAgY2hhbmdlWSA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y+Y5aSn5bCP55qE57O75pWwLCDlm77niYfotorlpKfns7vmlbDotorlsI9cbiAgICAgIHZhciBpc0ZpcmVmb3ggPSBuYXZpZ2F0b3IudXNlckFnZW50LmluZGV4T2YoXCJGaXJlZm94XCIpO1xuICAgICAgY2hhbmdlID0gaXNGaXJlZm94ID4gMCA/IGNoYW5nZSAqIDMwIDogY2hhbmdlO1xuICAgICAgLy8g5L+u5aSNaWXnmoTmu5rliqjnvKnmlL5cbiAgICAgIGlmICh0aGlzLmlzSUUpIHtcbiAgICAgICAgY2hhbmdlID0gLWNoYW5nZTtcbiAgICAgIH1cbiAgICAgIC8vIDFweCAtIDAuMlxuICAgICAgdmFyIGNvZSA9IHRoaXMuY29lO1xuICAgICAgY29lID1cbiAgICAgICAgY29lIC8gdGhpcy50cnVlV2lkdGggPiBjb2UgLyB0aGlzLnRydWVIZWlnaHRcbiAgICAgICAgICA/IGNvZSAvIHRoaXMudHJ1ZUhlaWdodFxuICAgICAgICAgIDogY29lIC8gdGhpcy50cnVlV2lkdGg7XG4gICAgICB2YXIgbnVtID0gY29lICogY2hhbmdlO1xuICAgICAgbnVtIDwgMFxuICAgICAgICA/IChzY2FsZSArPSBNYXRoLmFicyhudW0pKVxuICAgICAgICA6IHNjYWxlID4gTWF0aC5hYnMobnVtKVxuICAgICAgICA/IChzY2FsZSAtPSBNYXRoLmFicyhudW0pKVxuICAgICAgICA6IHNjYWxlO1xuICAgICAgLy8g5bu26L+fMC4xcyDmr4/mrKHmlL7lpKflpKfmiJbogIXnvKnlsI/nmoTojIPlm7RcbiAgICAgIGxldCBzdGF0dXMgPSBudW0gPCAwID8gXCJhZGRcIiA6IFwicmVkdWNlXCI7XG4gICAgICBpZiAoc3RhdHVzICE9PSB0aGlzLmNvZVN0YXR1cykge1xuICAgICAgICB0aGlzLmNvZVN0YXR1cyA9IHN0YXR1cztcbiAgICAgICAgdGhpcy5jb2UgPSAwLjI7XG4gICAgICB9XG4gICAgICBpZiAoIXRoaXMuc2Nh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bMF0uY2xpZW50WCA6IDA7XG4gICAgICB2YXIgbm93WSA9ICdjbGllbnRZJyBpbiBlID8gZS5jbGllbnRZIDogZS50b3VjaGVzID8gZS50b3VjaGVzWzBdLmNsaWVudFkgOiAwO1xuICAgICAgLy8g5a655Zmo55qE5a696auYXG4gICAgICBsZXQgd3JhcHBlclcgPSB0aGlzLnc7XG4gICAgICBsZXQgd3JhcHBlckggPSB0aGlzLmg7XG5cbiAgICAgIC8vIOS4jeiDvei2hei/h+eahOWdkOagh+i9tFxuICAgICAgbGV0IG1pblggPSAwO1xuICAgICAgbGV0IG1pblkgPSAwO1xuXG4gICAgICBpZiAodGhpcy5jZW50ZXJCb3gpIHtcbiAgICAgICAgbGV0IGF4aXMgPSB0aGlzLmdldEltZ0F4aXMoKTtcbiAgICAgICAgbGV0IGltZ1cgPSBheGlzLngyO1xuICAgICAgICBsZXQgaW1nSCA9IGF4aXMueTI7XG4gICAgICAgIG1pblggPSBheGlzLngxID4gMCA/IGF4aXMueDEgOiAwO1xuICAgICAgICBtaW5ZID0gYXhpcy55MSA+IDAgPyBheGlzLnkxIDogMDtcbiAgICAgICAgaWYgKHdyYXBwZXJXID4gaW1nVykge1xuICAgICAgICAgIHdyYXBwZXJXID0gaW1nVztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh3cmFwcGVySCA+IGltZ0gpIHtcbiAgICAgICAgICB3cmFwcGVySCA9IGltZ0g7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGNvbnN0IFttaW5Dcm9wVyxtaW5Dcm9wSF0gPSB0aGlzLmNoZWNrQ3JvcExpbWl0U2l6ZSgpXG4gICAgICB0aGlzLiRuZXh0VGljaygoKSA9PiB7XG4gICAgICAgIHZhciBmdyA9IG5vd1ggLSB0aGlzLmNyb3BYO1xuICAgICAgICB2YXIgZmggPSBub3dZIC0gdGhpcy5jcm9wWTtcbiAgICAgICAgaWYgKHRoaXMuY2FuQ2hhbmdlWCkge1xuICAgICAgICAgIGlmICh0a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3BDaGFuZ2VZIC0gZmggPD0gd3JhcHBlckggLSBtaW5ZXG4gICAgICAgICAgICAgICAgICA/IHRoaXMuY3JvcENoYW5nZVkgKyBmaFxuICAgICAgICAgICAgICAgICAgOiBtaW5ZO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdGhpcy5jcm9wSCA9XG4gICAgICAgICAgICAgICAgTWF0aC5hYnMoZmgpICsgdGhpcy5jcm9wQ2hhbmdlWSA8PSB3cmFwcGVySFxuICAgICAgICAgICAgICAgICAgPyBNYXRoLmFicyhmaCkgLSB0aGlzLmNyb3BPbGRIXG4gICAgICAgICAgICAgICAgICA6IHdyYXBwZXJIIC0gdGhpcy5jcm9wT2xkSCAtIHRoaXMuY3JvcENoYW5nZVk7XG4gICAgICAgICAgICAgIHRoaXMuY3JvcE9mZnNlcnRZID0gdGhpcy5jcm9wQ2hhbmdlWSArIHRoaXMuY3JvcE9sZEg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIGlmICh0aGlzLmNoYW5nZUNyb3BUeXBlWSA9PT0gMikge1xuICAgICAgICAgICAgaWYgKHRoaXMuY3JvcE9sZEggKyBmaCA8IG1pbkNyb3BIKSB7XG4gICAgICAgICAgICAgIHRoaXMuY3JvcEggPSBtaW5Dcm9wSFxuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLmNyb3BPbGRIICsgZmggPiAwKSB7XG4gICAgICAgICAgICAgIHRoaXMuY3JvcEggPVxuICAgICAgICAgICAgICAgIHRoaXMuY3JvcE9sZEggKyBmaCArIHRoaXMuY3JvcE9mZnNlcnRZIDw9IHdyYXBwZXJIXG4gICAgICAgICAgICAgICAgICA/IHRoaXMuY3JvcE9sZEggKyBmaFxuICAgICAgICAgICAgICAgICAgOiB3cmFwcGVySCAtIHRoaXMuY3JvcE9mZnNlcnRZO1xuICAgICAgICAgICAgICB0aGlzLmNyb3BPZmZzZXJ0WSA9IHRoaXMuY3JvcENoYW5nZVk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB0aGlzLmNyb3BIID1cbiAgICAgICAgICAgICAgICB3cmFwcGVySCAtIHRoaXMuY3JvcENoYW5nZVkgKyBNYXRoLmFicyhmaCArIHRoaXMuY3JvcE9sZEgpIDw9XG4gICAgICAgICAgICAgICAgd3JhcHBlckggLSBtaW5ZXG4gICAgICAgICAgICAgICAgICA/IE1hdGguYWJzKGZoICsgdGhpcy5jcm9wT2xkSClcbiAgICAgICAgICAgICAgICAgIDogdGhpcy5jcm9wQ2hhbmdlWSAtIG1pblk7XG4gICAgICAgICAgICAgIHRoaXMuY3JvcE9mZnNlcnRZID1cbiAgICAgICAgICAgICAgICB3cmFwcGVySCAtIHRoaXMuY3JvcENoYW5nZVkgKyBNYXRoLmFicyhmaCArIHRoaXMuY3JvcE9sZEgpIDw9XG4gICAgICAgICAgICAgICAgd3JhcHBlckggLSBtaW5ZXG4gICAgICAgICAgICAgICAgICA/IHRoaXMuY3JvcENoYW5nZVkgLSBNYXRoLmFicyhmaCArIHRoaXMuY3JvcE9sZEgpXG4gICAgICAgICAgICAgICAgICA6IG1pblk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMuY2FuQ2hhbmdlWCAmJiB0aGlzLmZpeGVkKSB7XG4gICAgICAgICAgdmFyIGZpeGVkSGVpZ2h0ID1cbiAgICAgICAgICAgICh0aGlzLmNyb3BXIC8gdGhpcy5maXhlZE51bWJlclswXSkgKiB0aGlzLmZpeGVkTnVtYmVyWzFdO1xuICAgICAgICAgIGlmIChmaXhlZEhlaWdodCA8IG1pbkNyb3BIKSB7XG4gICAgICAgICAgICB0aGlzLmNyb3BIID0gbWluQ3JvcEhcbiAgICAgICAgICAgIHRoaXMuY3JvcFcgPSB0aGlzLmZpeGVkTnVtYmVyWzBdICogbWluQ3JvcEggLyB0aGlzLmZpeGVkTnVtYmVyWzFdXG4gICAgICAgICAgICAvL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aDtcbiAgICAgIC8vIOWFiOagueaNruacgOWwj+WuveW6puadpeiuoeeul+mrmOW6plxuICAgICAgaWYgKHdpZHRoIDwgbWluWCkge1xuICAgICAgICB3aWR0aCA9IG1pblg7XG4gICAgICAgIGhlaWdodCA9IE1hdGguY2VpbCh3aWR0aCAvIHJhdGlvKTtcbiAgICAgIH1cbiAgICAgIC8vIOWmguaenOiuoeeul+WHuuadpeeahOmrmOW6puWwj+S6juacgOWwj+mrmOW6pu+8jOWImeagueaNruacgOWwj+mrmOW6puadpemHjeaWsOiuoeeul+WuveW6puWSjOmrmOW6plxuICAgICAgaWYgKGhlaWdodCA8IG1pblkpIHtcbiAgICAgICAgaGVpZ2h0ID0gbWluWTtcbiAgICAgICAgd2lkdGggPSBNYXRoLmNlaWwoaGVpZ2h0ICogcmF0aW8pO1xuICAgICAgICAvLyDlpoLmnpzph43mlrDorqHnrpfnmoTlrr3luqbku43nhLblsI/kuo7mnIDlsI/lrr3luqbvvIzliJnkvb/nlKjmnIDlsI/lrr3luqbvvIzlubbph43mlrDorqHnrpfpq5jluqZcbiAgICAgICAgaWYgKHdpZHRoIDwgbWluWCkge1xuICAgICAgICAgIHdpZHRoID0gbWluWDtcbiAgICAgICAgICBoZWlnaHQgPSBNYXRoLmNlaWwod2lkdGggLyByYXRpbyk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIC8vIOWmguaenOiuoeeul+WHuuadpeeahOWuveW6puaIlumrmOW6puWwj+S6jui+k+WFpeeahOWuveW6puaIlumrmOW6pu+8jOWImeWIhuWIq+S9v+eUqOi+k+WFpeeahOWuveW6puaIlumrmOW6plxuICAgICAgaWYgKHdpZHRoIDwgdykge1xuICAgICAgICB3aWR0aCA9IHc7XG4gICAgICAgIGhlaWdodCA9IE1hdGguY2VpbCh3aWR0aCAvIHJhdGlvKTtcbiAgICAgIH1cbiAgICAgIGlmIChoZWlnaHQgPCBoKSB7XG4gICAgICAgIGhlaWdodCA9IGg7XG4gICAgICAgIHdpZ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bWl0KFwiY3JvcC1tb3ZpbmdcIiwge1xuICAgICAgICBtb3Zpbmc6IHRydWUsXG4gICAgICAgIGF4aXM6IHRoaXMuZ2V0Q3JvcEF4aXMoKVxuICAgICAgfSk7XG4gICAgfSxcblxuICAgIG1vdmVDcm9wKGUsIGlzTW92ZSkge1xuICAgICAgbGV0IG5vd1ggPSAwO1xuICAgICAgbGV0IG5vd1kgPSAwO1xuICAgICAgaWYgKGUpIHtcbiAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICBub3dYID0gJ2NsaWVudFgnIGluIGUgPyBlLmNsaWVudFggOiBlLnRvdWNoZXNbMF0uY2xpZW50WDtcbiAgICAgICAgbm93WSA9ICdjbGllbnRZJyBpbiBlID8gZS5jbGllbnRZIDogZS50b3VjaGVzWzBdLmNsaWVudFk7XG4gICAgICB9XG4gICAgICB0aGlzLiRuZXh0VGljaygoKSA9PiB7XG4gICAgICAgIGxldCBjeCwgY3k7XG4gICAgICAgIGxldCBmdyA9IG5vd1ggLSB0aGlzLmNyb3BYO1xuICAgICAgICBsZXQgZmggPSBub3dZIC0gdGhpcy5jcm9wWTtcbiAgICAgICAgaWYgKGlzTW92ZSkge1xuICAgICAgICAgIGZ3ID0gdGhpcy5jcm9wT2Zmc2VydFg7XG4gICAgICAgICAgZmggPSB0aGlzLmNyb3BPZmZzZXJ0WTtcbiAgICAgICAgfVxuICAgICAgICAvLyDkuI3og73otoXov4flpJblsYLlrrnlmahcbiAgICAgICAgaWYgKGZ3IDw9IDApIHtcbiAgICAgICAgICBjeCA9IDA7XG4gICAgICAgIH0gZWxzZSBpZiAoZncgKyB0aGlzLmNyb3BXID4gdGhpcy53KSB7XG4gICAgICAgICAgY3ggPSB0aGlzLncgLSB0aGlzLmNyb3BXO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGN4ID0gZnc7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZmggPD0gMCkge1xuICAgICAgICAgIGN5ID0gMDtcbiAgICAgICAgfSBlbHNlIGlmIChmaCArIHRoaXMuY3JvcEggPiB0aGlzLmgpIHtcbiAgICAgICAgICBjeSA9IHRoaXMuaCAtIHRoaXMuY3JvcEg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY3kgPSBmaDtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIOS4jeiDvei2hei/h+WbvueJh1xuICAgICAgICBpZiAodGhpcy5jZW50ZXJCb3gpIHtcbiAgICAgICAgICBsZXQgYXhpcyA9IHRoaXMuZ2V0SW1nQXhpcygpO1xuICAgICAgICAgIC8vIOaoquWdkOagh+WIpOaWrVxuICAgICAgICAgIGlmIChjeCA8PSBheGlzLngxKSB7XG4gICAgICAgICAgICBjeCA9IGF4aXMueDE7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGN4ICsgdGhpcy5jcm9wVyA+IGF4aXMueDIpIHtcbiAgICAgICAgICAgIGN4ID0gYXhpcy54MiAtIHRoaXMuY3JvcFc7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgLy8g57q15Z2Q5qCH57q16L20XG4gICAgICAgICAgaWYgKGN5IDw9IGF4aXMueTEpIHtcbiAgICAgICAgICAgIGN5ID0gYXhpcy55MTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoY3kgKyB0aGlzLmNyb3BIID4gYXhpcy55Mikge1xuICAgICAgICAgICAgY3kgPSBheGlzLnkyIC0gdGhpcy5jcm9wSDtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmNyb3BPZmZzZXJ0WCA9IGN4O1xuICAgICAgICB0aGlzLmNyb3BPZmZzZXJ0WSA9IGN5O1xuXG4gICAgICAgIC8vIOinpuWPkeaIquWbvuahhuenu+WKqOS6i+S7tlxuICAgICAgICB0aGlzLiRlbWl0KFwiY3JvcE1vdmluZ1wiLCB7XG4gICAgICAgICAgbW92aW5nOiB0cnVlLFxuICAgICAgICAgIGF4aXM6IHRoaXMuZ2V0Q3JvcEF4aXMoKVxuICAgICAgICB9KTtcbiAgICAgICAgdGhpcy4kZW1pdChcImNyb3AtbW92aW5nXCIsIHtcbiAgICAgICAgICBtb3Zpbmc6IHRydWUsXG4gICAgICAgICAgYXhpczogdGhpcy5nZXRDcm9wQXhpcygpXG4gICAgICAgIH0pO1xuICAgICAgfSk7XG4gICAgfSxcblxuICAgIC8vIOeul+WHuuS4jeWQjOWcuuaZr+S4i+mdoiDlm77niYfnm7jlr7nkuo7lpJblsYLlrrnlmajnmoTlnZDmoIfovbRcbiAgICBnZXRJbWdBeGlzKHgsIHksIHNjYWxlKSB7XG4gICAgICB4ID0geCB8fCB0aGlzLng7XG4gICAgICB5ID0geSB8fCB0aGlzLnk7XG4gICAgICBzY2FsZSA9IHNjYWxlIHx8IHRoaXMuc2NhbGU7XG4gICAgICAvLyDlpoLmnpzorr7nva7kuobmiKrlm77moYblnKjlm77niYflhoXvvIwg6YKj5LmI6ZmQ5Yi25oiq5Zu+5qGG5LiN6IO96LaF6L+H5Zu+54mH55qE5Z2Q5qCHXG4gICAgICAvLyDlm77niYfnmoTlnZDmoIdcbiAgICAgIGxldCBvYmogPSB7XG4gICAgICAgIHgxOiAwLFxuICAgICAgICB4MjogMCxcbiAgICAgICAgeTE6IDAsXG4gICAgICAgIHkyOiAwXG4gICAgICB9O1xuICAgICAgbGV0IGltZ1cgPSB0aGlzLnRydWVXaWR0aCAqIHNjYWxlO1xuICAgICAgbGV0IGltZ0ggPSB0aGlzLnRydWVIZWlnaHQgKiBzY2FsZTtcbiAgICAgIHN3aXRjaCAodGhpcy5yb3RhdGUpIHtcbiAgICAgICAgY2FzZSAwOlxuICAgICAgICAgIG9iai54MSA9IHggKyAodGhpcy50cnVlV2lkdGggKiAoMSAtIHNjYWxlKSkgLyAyO1xuICAgICAgICAgIG9iai54MiA9IG9iai54MSArIHRoaXMudHJ1ZVdpZHRoICogc2NhbGU7XG4gICAgICAgICAgb2JqLnkxID0geSArICh0aGlzLnRydWVIZWlnaHQgKiAoMSAtIHNjYWxlKSkgLyAyO1xuICAgICAgICAgIG9iai55MiA9IG9iai55MSArIHRoaXMudHJ1ZUhlaWdodCAqIHNjYWxlO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIDE6XG4gICAgICAgIGNhc2UgLTE6XG4gICAgICAgIGNhc2UgMzpcbiAgICAgICAgY2FzZSAtMzpcbiAgICAgICAgICBvYmoueDEgPSB4ICsgKHRoaXMudHJ1ZVdpZHRoICogKDEgLSBzY2FsZSkpIC8gMiArIChpbWdXIC0gaW1nSCkgLyAyO1xuICAgICAgICAgIG9iai54MiA9IG9iai54MSArIHRoaXMudHJ1ZUhlaWdodCAqIHNjYWxlO1xuICAgICAgICAgIG9iai55MSA9IHkgKyAodGhpcy50cnVlSGVpZ2h0ICogKDEgLSBzY2FsZSkpIC8gMiArIChpbWdIIC0gaW1nVykgLyAyO1xuICAgICAgICAgIG9iai55MiA9IG9iai55MSArIHRoaXMudHJ1ZVdpZHRoICogc2NhbGU7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgb2JqLngxID0geCArICh0aGlzLnRydWVXaWR0aCAqICgxIC0gc2NhbGUpKSAvIDI7XG4gICAgICAgICAgb2JqLngyID0gb2JqLngxICsgdGhpcy50cnVlV2lkdGggKiBzY2FsZTtcbiAgICAgICAgICBvYmoueTEgPSB5ICsgKHRoaXMudHJ1ZUhlaWdodCAqICgxIC0gc2NhbGUpKSAvIDI7XG4gICAgICAgICAgb2JqLnkyID0gb2JqLnkxICsgdGhpcy50cnVlSGVpZ2h0ICogc2NhbGU7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICB9XG4gICAgICByZXR1cm4gb2JqO1xuICAgIH0sXG5cbiAgICAvLyDojrflj5bmiKrlm77moYbnmoTlnZDmoIfovbRcbiAgICBnZXRDcm9wQXhpcygpIHtcbiAgICAgIGxldCBvYmogPSB7XG4gICAgICAgIHgxOiAwLFxuICA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WVudChcImNhbnZhc1wiKTtcbiAgICAgIGxldCBjdHggPSBjYW52YXMuZ2V0Q29udGV4dChcIjJkXCIpO1xuICAgICAgbGV0IGltZyA9IG5ldyBJbWFnZSgpO1xuICAgICAgbGV0IHJvdGF0ZSA9IHRoaXMucm90YXRlO1xuICAgICAgbGV0IHRydWVXaWR0aCA9IHRoaXMudHJ1ZVdpZHRoO1xuICAgICAgbGV0IHRydWVIZWlnaHQgPSB0aGlzLnRydWVIZWlnaHQ7XG4gICAgICBsZXQgY3JvcE9mZnNlcnRYID0gdGhpcy5jcm9wT2Zmc2VydFg7XG4gICAgICBsZXQgY3JvcE9mZnNlcnRZID0gdGhpcy5jcm9wT2Zmc2VydFk7XG4gICAgICBpbWcub25sb2FkID0gKCkgPT4ge1xuICAgICAgICBpZiAodGhpcy5jcm9wVyAhPT0gMCkge1xuICAgICAgICAgIGxldCBkcHIgPSAxO1xuICAgICAgICAgIGlmICh0aGlzLmhpZ2ggJiAhdGhpcy5mdWxsKSB7XG4gICAgICAgICAgICBkcHIgPSB3aW5kb3cuZGV2aWNlUGl4ZWxSYXRpbztcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKCh0aGlzLmVubGFyZ2UgIT09IDEpICYgIXRoaXMuZnVsbCkge1xuICAgICAgICAgICAgZHByID0gTWF0aC5hYnMoTnVtYmVyKHRoaXMuZW5sYXJnZSkpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBsZXQgd2lkdGggPSB0aGlzLmNyb3BXICogZHByO1xuICAgICAgICAgIGxldCBoZWlnaHQgPSB0aGlzLmNyb3BIICogZHByO1xuICAgICAgICAgIGxldCBpbWdXID0gdHJ1ZVdpZHRoICogdGhpcy5zY2FsZSAqIGRwcjtcbiAgICAgICAgICBsZXQgaW1nSCA9IHRydWVIZWlnaHQgKiB0aGlzLnNjYWxlICogZHByO1xuICAgICAgICAgIC8vIOWbvueJh3jovbTlgY/np7tcbiAgICAgICAgICBsZXQgZHggPVxuICAgICAgICAgICAgKHRoaXMueCAtIGNyb3BPZmZzZXJ0WCArICh0aGlzLnRydWVXaWR0aCAqICgxIC0gdGhpcy5zY2FsZSkpIC8gMikgKlxuICAgICAgICAgICAgZHByO1xuICAgICAgICAgIC8vIOWbvueJh3novbTlgY/np7tcbiAgICAgICAgICBsZXQgZHkgPVxuICAgICAgICAgICAgKHRoaXMueSAtIGNyb3BPZmZzZXJ0WSArICh0aGlzLnRydWVIZWlnaHQgKiAoMSAtIHRoaXMuc2NhbGUpKSAvIDIpICpcbiAgICAgICAgICAgIGRwcjtcbiAgICAgICAgICAvL+S/neWtmOeKtuaAgVxuICAgICAgICAgIHNldENhbnZhc1NpemUod2lkdGgsIGhlaWdodCk7XG4gICAgICAgICAgY3R4LnNhdmUoKTtcbiAgICAgICAgICBzd2l0Y2ggKHJvdGF0ZSkge1xuICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICBpZiAoIXRoaXMuZnVsbCkge1xuICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoaW1nLCBkeCwgZHksIGltZ1csIGltZ0gpO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIOi+k+WHuuWOn+WbvuavlOS+i+aIquWbvlxuICAgICAgICAgICAgICAgIHNldENhbnZhc1NpemUod2lkdGggLyB0aGlzLnNjYWxlLCBoZWlnaHQgLyB0aGlzLnNjYWxlKTtcbiAgICAgICAgICAgICAgICBjdHguZHJhd0ltYWdlKFxuICAgICAgICAgICAgICAgICAgaW1nLFxuICAgICAgICAgICAgICAgICAgZHggLyB0aGlzLnNjYWxlLFxuICAgICAgICAgICAgICAgICAgZHkgLyB0aGlzLnNjYWxlLFxuICAgICAgICAgICAgICAgICAgaW1nVyAvIHRoaXMuc2NhbGUsXG4gICAgICAgICAgICAgICAgICBpbWdIIC8gdGhpcy5zY2FsZVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICBjYXNlIC0zOlxuICAgICAgICAgICAgICBpZiAoIXRoaXMuZnVsbCkge1xuICAgICAgICAgICAgICAgIC8vIOaNoueul+WbvueJh+aXi+i9rOWQjueahOWdkOagh+W8peihpVxuICAgICAgICAgICAgICAgIGR4ID0gZHggKyAoaW1nVyAtIGltZ0gpIC8gMjtcbiAgICAgICAgICAgICAgICBkeSA9IGR5ICsgKGltZ0ggLSBpbWdXKSAvIDI7XG4gICAgICAgICAgICAgICAgY3R4LnJvdGF0ZSgocm90YXRlICogOTAgKiBNYXRoLlBJKSAvIDE4MCk7XG4gICAgICAgICAgICAgICAgY3R4LmRyYXdJbWFnZShpbWcsIGR5LCAtZHggLSBpbWdILCBpbWdXLCBpbWdIKTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBzZXRDYW52YXNTaXplKHdpZHRoIC8gdGhpcy5zY2FsZSwgaGVpZ2h0IC8gdGhpcy5zY2FsZSk7XG4gICAgICAgICAgICAgICAgLy8g5o2i566X5Zu+54mH5peL6L2s5ZCO55qE5Z2Q5qCH5byl6KGlXG4gICAgICAgICAgICAgICAgZHggPVxuICAgICAgICAgICAgICAgICAgZHggLyB0aGlzLnNjYWxlICsgKGltZ1cgLyB0aGlzLnNjYWxlIC0gaW1nSCAvIHRoaXMuc2NhbGUpIC8gMjtcbiAgICAgICAgICAgICAgICBkeSA9XG4gICAgICAgICAgICAgICAgICBkeSAvIHRoaXMuc2NhbGUgKyAoaW1nSCAvIHRoaXMuc2NhbGUgLSBpbWdXIC8gdGhpcy5zY2FsZSkgLyAyO1xuICAgICAgICAgICAgICAgIGN0eC5yb3RhdGUoKHJvdGF0ZSAqIDkwICogTWF0aC5QSSkgLyAxODApO1xuICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoXG4gICAgICAgICAgICAgICAgICBpbWcsXG4gICAgICAgICAgICAgICAgICBkeSxcbiAgICAgICAgICAgICAgICAgIC1keCAtIGltZ0ggLyB0aGlzLnNjYWxlLFxuICAgICAgICAgICAgICAgICAgaW1nVyAvIHRoaXMuc2NhbGUsXG4gICAgICAgICAgICAgICAgICBpbWdIIC8gdGhpcy5zY2FsZVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICBjYXNlIC0yOlxuICAgICAgICAgICAgICBpZiAoIXRoaXMuZnVsbCkge1xuICAgICAgICAgICAgICAgIGN0eC5yb3RhdGUoKHJvdGF0ZSAqIDkwICogTWF0aC5QSSkgLyAxODApO1xuICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoaW1nLCAtZHggLSBpbWdXLCAtZHkgLSBpbWdILCBpbWdXLCBpbWdIKTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBzZXRDYW52YXNTaXplKHdpZHRoIC8gdGhpcy5zY2FsZSwgaGVpZ2h0IC8gdGhpcy5zY2FsZSk7XG4gICAgICAgICAgICAgICAgY3R4LnJvdGF0ZSgocm90YXRlICogOTAgKiBNYXRoLlBJKSAvIDE4MCk7XG4gICAgICAgICAgICAgICAgZHggPSBkeCAvIHRoaXMuc2NhbGU7XG4gICAgICAgICAgICAgICAgZHkgPSBkeSAvIHRoaXMuc2NhbGU7XG4gICAgICAgICAgICAgICAgY3R4LmRyYXdJbWFnZShcbiAgICAgICAgICAgICAgICAgIGltZyxcbiAgICAgICAgICAgICAgICAgIC1keCAtIGltZ1cgLyB0aGlzLnNjYWxlLFxuICAgICAgICAgICAgICAgICAgLWR5IC0gaW1nSCAvIHRoaXMuc2NhbGUsXG4gICAgICAgICAgICAgICAgICBpbWdXIC8gdGhpcy5zY2FsZSxcbiAgICAgICAgICAgICAgICAgIGltZ0ggLyB0aGlzLnNjYWxlXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgIGNhc2UgLTE6XG4gICAgICAgICAgICAgIGlmICghdGhpcy5mdWxsKSB7XG4gICAgICAgICAgICAgICAgLy8g5o2i566X5Zu+54mH5peL6L2s5ZCO55qE5Z2Q5qCH5byl6KGlXG4gICAgICAgICAgICAgICAgZHggPSBkeCArIChpbWdXIC0gaW1nSCkgLyAyO1xuICAgICAgICAgICAgICAgIGR5ID0gZHkgKyAoaW1nSCAtIGltZ1cpIC8gMjtcbiAgICAgICAgICAgICAgICBjdHgucm90YXRlKChyb3RhdGUgKiA5MCAqIE1hdGguUEkpIC8gMTgwKTtcbiAgICAgICAgICAgICAgICBjdHguZHJhd0ltYWdlKGltZywgLWR5IC0gaW1nVywgZHgsIGltZ1csIGltZ0gpO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHNldENhbnZhc1NpemUod2lkdGggLyB0aGlzLnNjYWxlLCBoZWlnaHQgLyB0aGlzLnNjYWxlKTtcbiAgICAgICAgICAgICAgICAvLyDmjaLnrpflm77niYfml4vovazlkI7nmoTlnZDmoIflvKXooaVcbiAgICAgICAgICAgICAgICBkeCA9XG4gICAgICAgICAgICAgICAgICBkeCAvIHRoaXMuc2NhbGUgKyAoaW1nVyAvIHRoaXMuc2NhbGUgLSBpbWdIIC8gdGhpcy5zY2FsZSkgLyAyO1xuICAgICAgICAgICAgICAgIGR5ID1cbiAgICAgICAgICAgICAgICAgIGR5IC8gdGhpcy5zY2FsZSArIChpbWdIIC8gdGhpcy5zY2FsZSAtIGltZ1cgLyB0aGlzLnNjYWxlKSAvIDI7XG4gICAgICAgICAgICAgICAgY3R4LnJvdGF0ZSgocm90YXRlICogOTAgKiBNYXRoLlBJKSAvIDE4MCk7XG4gICAgICAgICAgICAgICAgY3R4LmRyYXdJbWFnZShcbiAgICAgICAgICAgICAgICAgIGltZyxcbiAgICAgICAgICAgICAgICAgIC1keSAtIGltZ1cgLyB0aGlzLnNjYWxlLFxuICAgICAgICAgICAgICAgICAgZHgsXG4gICAgICAgICAgICAgICAgICBpbWdXIC8gdGhpcy5zY2FsZSxcbiAgICAgICAgICAgICAgICAgIGltZ0ggLyB0aGlzLnNjYWxlXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgIGlmICghdGhpcy5mdWxsKSB7XG4gICAgICAgICAgICAgICAgY3R4LmRyYXdJbWFnZShpbWcsIGR4LCBkeSwgaW1nVywgaW1nSCk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8g6L6T5Ye65Y6f5Zu+5q+U5L6L5oiq5Zu+XG4gICAgICAgICAgICAgICAgc2V0Q2FudmFzU2l6ZSh3aWR0aCAvIHRoaXMuc2NhbGUsIGhlaWdodCAvIHRoaXMuc2NhbGUpO1xuICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoXG4gICAgICAgICAgICAgICAgICBpbWcsXG4gICAgICAgICAgICAgICAgICBkeCAvIHRoaXMuc2NhbGUsXG4gICAgICAgICAgICAgICAgICBkeSAvIHRoaXMuc2NhbGUsXG4gICAgICAgICAgICAgICAgICBpbWdXIC8gdGhpcy5zY2FsZSxcbiAgICAgICAgICAgICAgICAgIGltZ0ggLyB0aGlzLnNjYWxlXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBjdHgucmVzdG9yZSgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGxldCB3aWR0aCA9IHRydWVXaWR0aCAqIHRoaXMuc2NhbGU7XG4gICAgICAgICAgbGV0IGhlaWdodCA9IHRydWVIZWlnaHQgKiB0aGlzLnNjYWxlO1xuICAgICAgICAgIGN0eC5zYXZlKCk7XG4gICAgICAgICAgc3dpdGNoIChyb3RhdGUpIHtcbiAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgc2V0Q2FudmFzU2l6ZSh3aWR0aCwgaGVpZ2h0KTtcbiAgICAgICAgICAgICAgY3R4LmRyYXdJbWFnZShpbWcsIDAsIDAsIHdpZHRoLCBoZWlnaHQpO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgIGNhc2UgLTM6XG4gICAgICAgICAgICAgIC8vIOaXi+i9rDkw5bqmIOaIluiAhS0yNzDluqYg5a695bqm5ZKM6auY5bqm5a+56LCDXG4gICAgICAgICAgICAgIHNldENhbnZhc1NpemUoaGVpZ2h0LCB3aWR0aCk7XG4gICAgICAgICAgICAgIGN0eC5yb3RhdGUoKHJvdGF0ZSAqIDkwICogTWF0aC5QSSkgLyAxODApO1xuICAgICAgICAgICAgICBjdHguZHJhd0ltYWdlKGltZywgMCwgLWhlaWdodCwgd2lkdGgsIGhlaWdodCk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgY2FzZSAtMjpcbiAgICAgICAgICAgICAgc2V0Q2FudmFzU2l6ZSh3aWR0aCwgaGVpZ2h0KTtcbiAgICAgICAgICAgICAgY3R4LnJvdGF0ZSgocm90YXRlICogOTAgKiBNYXRoLlBJKSAvIDE4MCk7XG4gICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoaW1nLCAtd2lkdGgsIC1oZWlnaHQsIHdpZHRoLCBoZWlnaHQpO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgIGNhc2UgLTE6XG4gICAgICAgICAgICAgIHNldENhbnZhc1NpemUoaGVpZ2h0LCB3aWR0aCk7XG4gICAgICAgICAgICAgIGN0eC5yb3RhdGUoKHJvdGF0ZSAqIDkwICogTWF0aC5QSSkgLyAxODApO1xuICAgICAgICAgICAgICBjdHguZHJhd0ltYWdlKGltZywgLXdpZHRoLCAwLCB3aWR0aCwgaGVpZ2h0KTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICBzZXRDYW52YXNTaXplKHdpZHRoLCBoZWlnaHQpO1xuICAgICAgICAgICAgICBjdHguZHJhd0ltYWdlKGltZywgMCwgMCwgd2lkdGgsIGhlaWdodCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGN0eC5yZXN0b3JlKCk7XG4gICAgICAgIH1cbiAgICAgICAgY2IoY2FudmFzKTtcbiAgICAgIH07XG4gICAgICAvLyDliKTmlq3lm77niYfmmK/lkKbmmK9iYXNlNjRcbiAgICAgIHZhciBzID0gdGhpcy5pbWcuc3Vic3RyKDAsIDQpO1xuICAgICAgaWYgKHMgIT09IFwiZGF0YVwiKSB7XG4gICAgICAgIGltZy5jcm9zc09yaWdpbiA9IFwiQW5vbnltb3VzXCI7XG4gICAgICB9XG4gICAgICBpbWcuc3JjID0gdGhpcy5pbWdzO1xuICAgICAgY29uc3QgZmlsbENvbG9yID0gdGhpcy5maWxsQ29sb3I7XG4gICAgICBmdW5jdGlvbiBzZXRDYW52YXNTaXplKHdpZHRoLCBoZWlnaHQpIHtcbiAgICAgICAgY2FudmFzLndpZHRoID0gTWF0aC5yb3VuZCh3aWR0aCk7XG4gICAgICAgIGNhbnZhcy5oZWlnaHQgPSBNYXRoLnJvdW5kKGhlaWdodCk7XG4gICAgICAgIC8vIOWhq+WFheiDjOaZr+minOiJslxuICAgICAgICBpZiAoZmlsbENvbG9yKSB7XG4gICAgICAgICAgY3R4LmZpbGxTdHlsZSA9IGZpbGxDb2xvcjtcbiAgICAgICAgICBjdHguZmlsbFJlY3QoMCwgMCwgY2FudmFzLndpZHRoLCBjYW52YXMuaGVpZ2h0KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICAvLyDojrflj5bovazmjaLmiJBiYXN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CgoKSA9PiB7XG4gICAgICAgICAgICB0aGlzLnNob3dQcmV2aWV3KCk7XG4gICAgICAgICAgfSwgMjApO1xuICAgICAgICB9KTtcbiAgICAgIH07XG4gICAgICBpbWcub25lcnJvciA9ICgpID0+IHtcbiAgICAgICAgdGhpcy4kZW1pdChcImltZ0xvYWRcIiwgXCJlcnJvclwiKTtcbiAgICAgICAgdGhpcy4kZW1pdChcImltZy1sb2FkXCIsIFwiZXJyb3JcIik7XG4gICAgICB9O1xuICAgICAgaW1nLnNyYyA9IHRoaXMuaW1ncztcbiAgICB9LFxuICAgIC8vIOiDjOaZr+W4g+WxgOeahOWHveaVsFxuICAgIGNoZWNrZWRNb2RlKCkge1xuICAgICAgbGV0IHNjYWxlID0gMTtcbiAgICAgIC8vIOmAmui/h+Wtl+espuS4suWIhuWJslxuICAgICAgbGV0IGltZ1cgPSB0aGlzLnRydWVXaWR0aDtcbiAgICAgIGxldCBpbWdIID0gdGhpcy50cnVlSGVpZ2h0O1xuICAgICAgY29uc3QgYXJyID0gdGhpcy5tb2RlLnNwbGl0KFwiIFwiKTtcbiAgICAgIHN3aXRjaCAoYXJyWzBdKSB7XG4gICAgICAgIGNhc2UgXCJjb250YWluXCI6XG4gICAgICAgICAgaWYgKHRoaXMudHJ1ZVdpZHRoID4gdGhpcy53KSB7XG4gICAgICAgICAgICAvLyDlpoLmnpzlm77niYflrr3luqblpKfkuo7lrrnlmajlrr3luqZcbiAgICAgICAgICAgIHNjYWxlID0gdGhpcy53IC8gdGhpcy50cnVlV2lkdGg7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHRoaXMudHJ1ZUhlaWdodCAqIHNjYWxlID4gdGhpcy5oKSB7XG4gICAgICAgICAgICBzY2FsZSA9IHRoaXMuaCAvIHRoaXMudHJ1ZUhlaWdodDtcbiAgICAgICAgICB9XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgXCJjb3ZlclwiOlxuICAgICAgICAgIC8vIOaJqeWxleW4g+WxgCDpu5jorqTloavlhYXmu6HmlbTkuKrlrrnlmahcbiAgICAgICAgICAvLyDlm77niYflrr3luqblpKfkuo7lrrnlmahcbiAgICAgICAgICBpbWdXID0gdGhpcy53O1xuICAgICAgICAgIHNjYWxlID0gaW1nVyAvIHRoaXMudHJ1ZVdpZHRoO1xuICAgICAgICAgIGltZ0ggPSBpbWdIICogc2NhbGU7XG4gICAgICAgICAgLy8g5aaC5p6c5omp5bGV5LmL5ZCO6auY5bqm5bCP5LqO5a655Zmo55qE5aSW5bGC6auY5bqmIOe7p+e7reaJqeWxlemrmOW6plxuICAgICAgICAgIGlmIChpbWdIIDwgdGhpcy5oKSB7XG4gICAgICAgICAgICBpbWdIID0gdGhpcy5oO1xuICAgICAgICAgICAgc2NhbGUgPSBpbWdIIC8gdGhpcy50cnVlSGVpZ2h0O1xuICAgICAgICAgIH1cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgbGV0IHN0ciA9IGFyclswXTtcbiAgICAgICAgICAgIGlmIChzdHIuc2VhcmNoKFwicHhcIikgIT09IC0xKSB7XG4gICAgICAgICAgICAgIHN0ciA9IHN0ci5yZXBsYWNlKFwicHhcIiwgXCJcIik7XG4gICAgICAgICAgICAgIGltZ1cgPSBwYXJzZUZsb2F0KHN0cik7XG4gICAgICAgICAgICAgIGNvbnN0IHNjYWxlWCA9IGltZ1cgLyB0aGlzLnRydWVXaWR0aDtcbiAgICAgICAgICAgICAgbGV0IHNjYWxlWSA9IDE7XG4gICAgICAgICAgICAgIGxldCBzdHJIID0gYXJyWzFdO1xuICAgICAgICAgICAgICBpZiAoc3RySC5zZWFyY2goXCJweFwiKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICBzdHJIID0gc3RySC5yZXBsYWNlKFwicHhcIiwgXCJcIik7XG4gICAgICAgICAgICAgICAgaW1nSCA9IHBhcnNlRmxvYXQoc3RySCk7XG4gICAgICAgICAgICAgICAgc2NhbGVZID0gaW1nSCAvIHRoaXMudHJ1ZUhlaWdodDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBzY2FsZSA9IE1hdGgubWluKHNjYWxlWCxzY2FsZVkpXG5cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChzdHIuc2VhcmNoKFwiJVwiKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgc3RyID0gc3RyLnJlcGxhY2UoXCIlXCIsIFwiXCIpO1xuICAgICAgICAgICAgICBpbWdXID0gKHBhcnNlRmxvYXQoc3RyKSAvIDEwMCkgKiB0aGlzLnc7XG4gICAgICAgICAgICAgIHNjYWxlID0gaW1nVyAvIHRoaXMudHJ1ZVdpZHRoO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoYXJyLmxlbmd0aCA9PT0gMiAmJiBzdHIgPT09IFwiYXV0b1wiKSB7XG4gICAgICAgICAgICAgIGxldCBzdHIyID0gYXJyWzFdO1xuICAgICAgICAgICAgICBpZiAoc3RyMi5zZWFyY2goXCJweFwiKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICBzdHIyID0gc3RyMi5yZXBsYWNlKFwicHhcIiwgXCJcIik7XG4gICAgICAgICAgICAgICAgaW1nSCA9IHBhcnNlRmxvYXQoc3RyMik7XG4gICAgICAgICAgICAgICAgc2NhbGUgPSBpbWdIIC8gdGhpcy50cnVlSGVpZ2h0O1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmIChzdHIyLnNlYXJjaChcIiVcIikgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgc3RyMiA9IHN0cjIucmVwbGFjZShcIiVcIiwgXCJcIik7XG4gICAgICAgICAgICAgICAgaW1nSCA9IChwYXJzZUZsb2F0KHN0cjIpIC8gMTAwKSAqIHRoaXMuaDtcbiAgICAgICAgICAgICAgICBzY2FsZSA9IGltZ0ggLyB0aGlzLnRydWVIZWlnaHQ7XG4gICAgICAgICAgICAg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9hdCh0aGlzLmF1dG9Dcm9wV2lkdGgpO1xuICAgICAgdmFyIGggPSBjaCA/IGNoIDogcGFyc2VGbG9hdCh0aGlzLmF1dG9Dcm9wSGVpZ2h0KTtcbiAgICAgIGlmICh3ID09PSAwIHx8IGggPT09IDApIHtcbiAgICAgICAgdyA9IG1heFdpZHRoICogMC44O1xuICAgICAgICBoID0gbWF4SGVpZ2h0ICogMC44O1xuICAgICAgfVxuICAgICAgdyA9IHcgPiBtYXhXaWR0aCA/IG1heFdpZHRoIDogdztcbiAgICAgIGggPSBoID4gbWF4SGVpZ2h0ID8gbWF4SGVpZ2h0IDogaDtcbiAgICAgIGlmICh0aGlzLmZpeGVkKSB7XG4gICAgICAgIGggPSAodyAvIHRoaXMuZml4ZWROdW1iZXJbMF0pICogdGhpcy5maXhlZE51bWJlclsxXTtcbiAgICAgIH1cbiAgICAgIC8vIOWmguaenOavlOS+i+S5i+WQjiDpq5jluqblpKfkuo5oXG4gICAgICBpZiAoaCA+IHRoaXMuaCkge1xuICAgICAgICBoID0gdGhpcy5oO1xuICAgICAgICB3ID0gKGggLyB0aGlzLmZpeGVkTnVtYmVyWzFdKSAqIHRoaXMuZml4ZWROdW1iZXJbMF07XG4gICAgICB9XG4gICAgICB0aGlzLmNoYW5nZUNyb3AodywgaCk7XG4gICAgfSxcbiAgICAvLyDmiYvliqjmlLnlj5jmiKrlm77moYblpKflsI/lh73mlbBcbiAgICBjaGFuZ2VDcm9wKHcsIGgpIHtcbiAgICAgIGlmICh0aGlzLmNlbnRlckJveCkge1xuICAgICAgICAvLyDkv67lpI3liJ3lp4vljJbml7blgJnlnKhjZW50ZXJCb3g9dHJ1ZeaDheWGteS4i1xuICAgICAgICBsZXQgYXhpcyA9IHRoaXMuZ2V0SW1nQXhpcygpO1xuICAgICAgICBpZiAodyA+IGF4aXMueDIgLSBheGlzLngxKSB7XG4gICAgICAgICAgLy8g5a695bqm6LaF5qCHXG4gICAgICAgICAgdyA9IGF4aXMueDIgLSBheGlzLngxO1xuICAgICAgICAgIGggPSAodyAvIHRoaXMuZml4ZWROdW1iZXJbMF0pICogdGhpcy5maXhlZE51bWJlclsxXTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoaCA+IGF4aXMueTIgLSBheGlzLnkxKSB7XG4gICAgICAgICAgLy8g6auY5bqm6LaF5qCHXG4gICAgICAgICAgaCA9IGF4aXMueTIgLSBheGlzLnkxO1xuICAgICAgICAgIHcgPSAoaCAvIHRoaXMuZml4ZWROdW1iZXJbMV0pICogdGhpcy5maXhlZE51bWJlclswXTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgLy8g5Yik5pat5piv5ZCm5aSn5LqO5a655ZmoXG4gICAgICB0aGlzLmNyb3BXID0gdztcbiAgICAgIHRoaXMuY3JvcEggPSBoO1xuICAgICAgdGhpcy5jaGVja0Nyb3BMaW1pdFNpemUoKVxuICAgICAgdGhpcy4kbmV4dFRpY2soKCkgPT4ge1xuICAgICAgICAvLyDlsYXkuK3otbDkuIDotbBcbiAgICAgICAgdGhpcy5jcm9wT2Zmc2VydFggPSAodGhpcy53IC0gdGhpcy5jcm9wVykgLyAyO1xuICAgICAgICB0aGlzLmNyb3BPZmZzZXJ0WSA9ICh0aGlzLmggLSB0aGlzLmNyb3BIKSAvIDI7XG4gICAgICAgIGlmICh0aGlzLmNlbnRlckJveCkge1xuICAgICAgICAgIHRoaXMubW92ZUNyb3AobnVsbCwgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH0sXG4gICAgLy8g6YeN572u5Ye95pWw77yMIOaBouWkjee7hOS7tue9ruWIneWni+eKtuaAgVxuICAgIHJlZnJlc2goKSB7XG4gICAgICBsZXQgaW1nID0gdGhpcy5pbWc7XG4gICAgICB0aGlzLmltZ3MgPSBcIlwiO1xuICAgICAgdGhpcy5zY2FsZSA9IDE7XG4gICAgICB0aGlzLmNyb3AgPSBmYWxzZTtcbiAgICAgIHRoaXMucm90YXRlID0gMDtcbiAgICAgIHRoa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