@ledgerhq/connect-kit 1.1.0-beta.1 → 1.1.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/umd/index.js CHANGED
@@ -233,7 +233,7 @@ t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,c=(1<<a)-1,u=c>>1,l=-7,f=n?i-1:0,h=
233
233
  height: 24px;
234
234
  margin-right: 8px;
235
235
  }
236
- `;const on=n("PlatformNotSupportedModal"),sn=()=>(on("initializing"),_.exports.jsx(_t,{children:_.exports.jsx(_.exports.Fragment,{children:_.exports.jsxs(dt,{children:[_.exports.jsx(pt,{children:"Sorry, we don't support this platform just yet."}),_.exports.jsxs(gt,{children:["We're working hard to expand our coverage.",_.exports.jsx("br",{}),"Until we get there, you can try Ledger Connect on:"]}),_.exports.jsx(nn,{children:_.exports.jsxs(rn,{children:[_.exports.jsx("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='250.076' height='248.707' viewBox='0 0 66.166 65.804'%3e%3cdefs%3e%3clinearGradient id='b'%3e%3cstop style='stop-color:%2306c2e7%3bstop-opacity:1' offset='0'/%3e%3cstop offset='.25' style='stop-color:%230db8ec%3bstop-opacity:1'/%3e%3cstop offset='.5' style='stop-color:%2312aef1%3bstop-opacity:1'/%3e%3cstop style='stop-color:%231f86f9%3bstop-opacity:1' offset='.75'/%3e%3cstop style='stop-color:%23107ddd%3bstop-opacity:1' offset='1'/%3e%3c/linearGradient%3e%3clinearGradient id='a'%3e%3cstop style='stop-color:%23bdbdbd%3bstop-opacity:1' offset='0'/%3e%3cstop style='stop-color:white%3bstop-opacity:1' offset='1'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23a' id='d' x1='412.975' y1='237.608' x2='412.975' y2='59.392' gradientUnits='userSpaceOnUse' gradientTransform='matrix(.35154 0 0 .35154 206.79 159.773)'/%3e%3cfilter style='color-interpolation-filters:sRGB' id='f' x='-.021' width='1.042' y='-.022' height='1.045'%3e%3cfeGaussianBlur stdDeviation='.958'/%3e%3c/filter%3e%3cfilter style='color-interpolation-filters:sRGB' id='c' x='-.048' width='1.096' y='-.048' height='1.096'%3e%3cfeGaussianBlur stdDeviation='3.564'/%3e%3c/filter%3e%3cradialGradient xlink:href='%23b' id='e' cx='413.061' cy='136.818' fx='413.061' fy='136.818' r='82.125' gradientUnits='userSpaceOnUse' gradientTransform='matrix(.38143 0 0 .38143 194.545 155.58)'/%3e%3c/defs%3e%3cpath transform='matrix(.33865 0 0 .3261 -106.77 -14.478)' style='opacity:.52999998%3bfill:black%3bfill-opacity:1%3bstroke:none%3bstroke-width:2.93077397%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill%3bfilter:url(%23c)' d='M502.083 148.5a89.108 89.108 0 0 1-89.108 89.108 89.108 89.108 0 0 1-89.108-89.108 89.108 89.108 0 0 1 89.108-89.108 89.108 89.108 0 0 1 89.108 89.108Z'/%3e%3cpath d='M383.294 211.977a31.325 31.325 0 0 1-31.325 31.325 31.325 31.325 0 0 1-31.326-31.325 31.325 31.325 0 0 1 31.326-31.325 31.325 31.325 0 0 1 31.325 31.325z' style='opacity:1%3bfill:url(%23d)%3bfill-opacity:1%3bstroke:%23cdcdcd%3bstroke-width:.09301235%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath d='M380.84 211.977a28.87 28.87 0 0 1-28.871 28.87 28.87 28.87 0 0 1-28.871-28.87 28.87 28.87 0 0 1 28.87-28.87 28.87 28.87 0 0 1 28.871 28.87z' style='opacity:1%3bfill:url(%23e)%3bfill-opacity:1%3bstroke:none%3bstroke-width:.94955933%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath d='M351.969 184.612a.42.42 0 0 0-.421.42v4.856a.42.42 0 1 0 .841 0v-4.855a.42.42 0 0 0-.42-.421zm-2.754.174a.42.42 0 0 0-.46.463l.212 2.03a.42.42 0 1 0 .837-.087l-.212-2.03a.42.42 0 0 0-.377-.376zm5.526.002a.42.42 0 0 0-.377.375l-.213 2.03a.42.42 0 1 0 .837.089l.214-2.031a.42.42 0 0 0-.46-.463zm-8.355.408a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .824-.174l-1.006-4.75a.42.42 0 0 0-.414-.334zm11.184.004a.42.42 0 0 0-.414.333l-1.01 4.75a.42.42 0 1 0 .824.175l1.01-4.75a.42.42 0 0 0-.41-.508zm-13.883.757a.42.42 0 0 0-.437.55l.631 1.942a.42.42 0 1 0 .8-.26l-.63-1.942a.42.42 0 0 0-.364-.29zm16.567.001a.42.42 0 0 0-.364.29l-.631 1.942a.42.42 0 1 0 .8.26l.632-1.942a.42.42 0 0 0-.437-.55zm-19.237.976a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.973-4.437a.42.42 0 0 0-.392-.25zm21.937.015a.42.42 0 0 0-.393.25l-1.978 4.434a.42.42 0 1 0 .77.343l1.977-4.434a.42.42 0 0 0-.376-.593zm-24.415 1.296a.42.42 0 0 0-.394.63l1.021 1.77a.42.42 0 1 0 .73-.421l-1.022-1.769a.42.42 0 0 0-.335-.21zm26.859 0a.419.419 0 0 0-.335.21l-1.021 1.769a.42.42 0 1 0 .729.42l1.021-1.768a.42.42 0 0 0-.394-.63zm-29.265 1.5a.422.422 0 0 0-.326.669l2.85 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm31.701.022a.42.42 0 0 0-.355.174l-2.856 3.926a.42.42 0 1 0 .68.495l2.857-3.926a.42.42 0 0 0-.326-.669zm-33.852 1.783a.42.42 0 0 0-.335.702l1.367 1.518a.42.42 0 1 0 .626-.563l-1.367-1.518a.42.42 0 0 0-.29-.14zm35.976.003a.421.421 0 0 0-.291.139l-1.366 1.517a.42.42 0 1 0 .625.564l1.367-1.518a.42.42 0 0 0-.335-.702zm-38.037 1.977a.42.42 0 0 0-.26.733l3.609 3.249a.42.42 0 1 0 .563-.626l-3.608-3.248a.42.42 0 0 0-.304-.108zm40.108.014a.419.419 0 0 0-.304.108l-3.61 3.245a.42.42 0 1 0 .563.626l3.61-3.245a.42.42 0 0 0-.259-.734zm-41.822 2.19a.42.42 0 0 0-.262.762l1.652 1.2a.42.42 0 1 0 .495-.681l-1.652-1.2a.42.42 0 0 0-.233-.081zm43.535.015a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .494.681l1.653-1.2a.42.42 0 0 0-.261-.76zm-45.137 2.336a.42.42 0 0 0-.18.785l4.204 2.427a.42.42 0 1 0 .42-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm46.727 0a.417.417 0 0 0-.24.056l-4.204 2.427a.42.42 0 1 0 .42.73l4.205-2.428a.42.42 0 0 0-.18-.785zm-47.938 2.506a.42.42 0 0 0-.18.805l1.865.833a.42.42 0 1 0 .343-.77l-1.865-.831a.42.42 0 0 0-.163-.037zm49.158.017a.42.42 0 0 0-.164.037l-1.866.83a.42.42 0 1 0 .343.77l1.866-.831a.42.42 0 0 0-.18-.806zm-50.238 2.602a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.615-1.504a.421.421 0 0 0-.167-.02zm51.315.018a.408.408 0 0 0-.166.02l-4.618 1.5a.42.42 0 1 0 .26.801l4.618-1.5a.42.42 0 0 0-.094-.82zm-51.987 2.732a.42.42 0 0 0-.09.833l1.997.424a.42.42 0 1 0 .175-.823l-1.997-.425a.413.413 0 0 0-.085-.009zm52.654.004a.518.518 0 0 0-.084.009l-1.998.424a.42.42 0 1 0 .175.823l1.997-.424a.42.42 0 0 0-.09-.833zm-53.163 2.761a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .088-.837l-4.828-.51a.432.432 0 0 0-.085 0zm53.676.037a.386.386 0 0 0-.086 0l-4.828.504a.42.42 0 1 0 .087.837l4.829-.504a.42.42 0 0 0-.002-.837zm-53.758 2.794a.42.42 0 1 0 0 .842h2.042a.42.42 0 1 0 0-.842zm51.793 0a.42.42 0 1 0 0 .842h2.042a.42.42 0 1 0 0-.842zm-46.803 2.295a.384.384 0 0 0-.086 0l-4.829.504a.42.42 0 1 0 .088.838l4.829-.504a.42.42 0 0 0-.002-.838zm43.853.03a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .089-.837l-4.829-.51a.434.434 0 0 0-.085-.001zm-46.26 2.844a.43.43 0 0 0-.085.009l-1.998.424a.42.42 0 1 0 .175.823l1.998-.424a.42.42 0 0 0-.09-.833zm48.669.004a.42.42 0 0 0-.09.833l1.998.424a.42.42 0 1 0 .175-.824l-1.998-.424a.413.413 0 0 0-.085-.01zm-45.305 1.657a.408.408 0 0 0-.167.02l-4.617 1.5a.42.42 0 1 0 .26.801l4.618-1.5a.42.42 0 0 0-.094-.82zm41.937.015a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.616-1.504a.421.421 0 0 0-.166-.02zm-43.7 3.273a.42.42 0 0 0-.163.036l-1.865.831a.42.42 0 1 0 .342.769l1.866-.83a.42.42 0 0 0-.18-.806zm45.46.016a.42.42 0 0 0-.18.805l1.865.832a.42.42 0 1 0 .343-.768l-1.865-.833a.42.42 0 0 0-.163-.036zm-41.827.912a.417.417 0 0 0-.24.056l-4.204 2.427a.42.42 0 1 0 .42.73l4.205-2.428a.42.42 0 0 0-.18-.785zm38.2 0a.42.42 0 0 0-.181.785l4.205 2.427a.42.42 0 1 0 .421-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm-39.248 3.562a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .494.682l1.653-1.2a.42.42 0 0 0-.261-.762zm40.287.015a.42.42 0 0 0-.262.762l1.653 1.2a.42.42 0 1 0 .495-.681l-1.653-1.2a.42.42 0 0 0-.233-.081zm-36.544.145a.418.418 0 0 0-.303.108l-3.611 3.245a.42.42 0 1 0 .563.626l3.61-3.245a.42.42 0 0 0-.259-.734zm32.8.011a.421.421 0 0 0-.259.734l3.608 3.248a.42.42 0 1 0 .564-.625l-3.609-3.249a.42.42 0 0 0-.303-.107zm-29.374 3.084a.42.42 0 0 0-.355.173l-2.857 3.927a.42.42 0 1 0 .681.495l2.856-3.926a.42.42 0 0 0-.325-.669zm25.936.018a.421.421 0 0 0-.327.668l2.851 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm-29.623.606a.421.421 0 0 0-.291.14l-1.366 1.517a.42.42 0 1 0 .625.563l1.367-1.517a.42.42 0 0 0-.335-.703zm33.33.002a.42.42 0 0 0-.335.702l1.367 1.518a.42.42 0 1 0 .626-.563l-1.367-1.518a.42.42 0 0 0-.29-.139zm-25.655 1.684a.419.419 0 0 0-.392.25l-1.978 4.433a.42.42 0 1 0 .769.343l1.978-4.434a.42.42 0 0 0-.377-.592zm17.956.012a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.973-4.437a.42.42 0 0 0-.392-.25zm-21.432 1.359a.419.419 0 0 0-.335.21l-1.02 1.768a.42.42 0 1 0 .728.421l1.021-1.769a.42.42 0 0 0-.394-.63zm24.935 0a.42.42 0 0 0-.394.63l1.02 1.77a.42.42 0 1 0 .73-.422l-1.021-1.769a.42.42 0 0 0-.335-.21zm-17.055.063a.42.42 0 0 0-.414.334l-1.009 4.749a.42.42 0 1 0 .823.175l1.01-4.75a.42.42 0 0 0-.41-.508zm9.16.003a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .824-.175l-1.006-4.75a.42.42 0 0 0-.414-.333zm-4.572.48a.42.42 0 0 0-.421.42v4.855a.42.42 0 1 0 .841 0v-4.855a.42.42 0 0 0-.42-.42zm-7.727 1.568a.42.42 0 0 0-.364.29l-.632 1.942a.42.42 0 1 0 .801.26l.631-1.942a.42.42 0 0 0-.436-.55zm15.45 0a.42.42 0 0 0-.437.55l.631 1.943a.42.42 0 1 0 .801-.26l-.631-1.942a.42.42 0 0 0-.364-.29zm-10.366 1.083a.42.42 0 0 0-.377.375l-.213 2.03a.42.42 0 1 0 .837.088l.213-2.03a.42.42 0 0 0-.46-.463zm5.268.002a.42.42 0 0 0-.46.463l.211 2.03a.42.42 0 1 0 .837-.088l-.211-2.03a.42.42 0 0 0-.377-.375z' style='opacity:1%3bfill:%23f4f2f3%3bfill-opacity:1%3bstroke:none%3bstroke-width:.38088897%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath transform='matrix(.35154 0 0 .35154 -112.095 -20.822)' d='m469.096 100.607-65.51 38.061-41.42 65.207 60.595-44.882z' style='opacity:.40900005%3bfill:black%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.5614785%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill%3bfilter:url(%23f)'/%3e%3cpath style='opacity:1%3bfill:%23ff5150%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.01970422%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' d='m129.839 160.803-23.014-23.015 31.437-8.423z' transform='matrix(.64804 -.3317 -.36122 .63206 10.328 -23.732)'/%3e%3cpath transform='matrix(-.36122 .63206 .64804 -.3317 -20.923 6.11)' d='m129.839 160.803-23.014-23.015 31.437-8.423z' style='opacity:1%3bfill:%23f1f1f1%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.01970422%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill'/%3e%3cpath style='opacity:.243%3bfill:black%3bstroke:none%3bstroke-width:.09301235px%3bstroke-linecap:butt%3bstroke-linejoin:miter%3bstroke-opacity:1' d='m331.853 231.185 23.416-15.752 16.815-22.665z' transform='translate(-318.886 -180.595)'/%3e%3c/svg%3e"}),"Safari on iOS"]})})]})})}));var an={exports:{}};!function(e,t){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(i,o),a=0,c=e.map([t,n],(function(t){var n=s-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(n=null)&&s(t.prototype,n),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),o=c(n(94)),s=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(n[t]=s,r+=1)})),r>0){var s=Object.keys(n),c=a.default.find(s,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var l=a.default.find(s,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(o>0){var h=Object.keys(i),d=a.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==d)return this.compareVersion(i[d])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})}(an);var cn=p(an.exports);function un(){const e=cn.getParser(window.navigator.userAgent),t=e.getOS(),n=e.getBrowser(),{type:r}=e.getPlatform();var i,o;return"isBrave"===(null===(o=null===(i=window.navigator.brave)||void 0===i?void 0:i.isBrave)||void 0===o?void 0:o.name)&&(n.name="Brave"),{type:r,os:t,browser:n}}let ln=null;function fn(e,t){if(!ln){const e=document.body,t=document.createElement("div");t.className="ledger-ck-modal",e.appendChild(t),ln=St(t)}if(ln&&e){let n;switch(e){case"UseLedgerLiveModal":n=_.exports.jsx(tn,Object.assign({},t));break;case"PlatformNotSupportedModal":n=_.exports.jsx(sn,{});break;case"ExtensionInstallModal":n=_.exports.jsx(Tt,Object.assign({},t))}ln.render(n)}mt(!0)}function hn(e){const t=un(),n=(Io("getSupportResult"),Co);mo(),!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))&&!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))&&n.isLedgerConnectSupported&&n.isChainIdSupported?fn("ExtensionInstallModal",{onClose:e.onClose}):fn("UseLedgerLiveModal",{isDesktop:"desktop"===t.type,uri:e.uri,onClose:e.onClose})}const dn=n("WalletConnectLegacy"),pn=r("WalletConnectLegacy");function gn(){return c(this,void 0,void 0,(function*(){dn("getWalletConnectLegacyProvider");try{const e=yield function(){return c(this,void 0,void 0,(function*(){dn("initWalletConnectLegacyProvider");const e=mo();return dn("walletConnectProviderOptions is",e),dn("created a new legacy provider instance"),new m({chainId:e.chainId,bridge:e.bridge,infuraId:e.infuraId,rpc:e.rpc,qrcode:!1})}))}();return function(e){function t(e){dn("connectHandler",e),mt(!1)}function n(t,r){dn("disconnectHandler",t,r),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect"),e.removeListener("disconnect",n)}dn("assignWalletConnectLegacyProviderEvents"),e.on("connect",t),e.on("disconnect",n)}(e),e.request=function(e){dn("patchWalletConnectLegacyProviderRequest");const t=e.request.bind(e),n=mo();return function({method:r,params:i}){return c(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?(dn("calling patched",r,i),new Promise(((o,a)=>c(this,void 0,void 0,(function*(){try{if(!e.connected)return yield e.connector.createSession({chainId:n.chainId}),dn("created a new session"),hn({uri:e.connector.uri,onClose:()=>{pn("user rejected"),a(new s)}}),o(yield t({method:r,params:i}));dn("reusing existing session"),o(yield t({method:r,params:i}))}catch(e){return pn("error",e),a(e)}}))))):(dn("calling provider",r,i),yield t({method:r,params:i}))}))}}(e),e}catch(e){const t=e instanceof Error?e:new Error(String(e));throw pn("error",t),t}}))}var yn,vn={exports:{}},mn="object"==typeof Reflect?Reflect:null,_n=mn&&"function"==typeof mn.apply?mn.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};yn=mn&&"function"==typeof mn.ownKeys?mn.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var bn=Number.isNaN||function(e){return e!=e};function wn(){wn.init.call(this)}vn.exports=wn,vn.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}Nn(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&Nn(e,"error",t,n)}(e,i,{once:!0})}))},wn.EventEmitter=wn,wn.prototype._events=void 0,wn.prototype._eventsCount=0,wn.prototype._maxListeners=void 0;var En=10;function Sn(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function On(e){return void 0===e._maxListeners?wn.defaultMaxListeners:e._maxListeners}function Rn(e,t,n,r){var i,o,s,a;if(Sn(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=On(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function xn(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function In(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=xn.bind(r);return i.listener=n,r.wrapFn=i,i}function Cn(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):kn(i,i.length)}function Pn(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function kn(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function Nn(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(wn,"defaultMaxListeners",{enumerable:!0,get:function(){return En},set:function(e){if("number"!=typeof e||e<0||bn(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");En=e}}),wn.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},wn.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||bn(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},wn.prototype.getMaxListeners=function(){return On(this)},wn.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[e];if(void 0===a)return!1;if("function"==typeof a)_n(a,this,t);else{var c=a.length,u=kn(a,c);for(n=0;n<c;++n)_n(u[n],this,t)}return!0},wn.prototype.addListener=function(e,t){return Rn(this,e,t,!1)},wn.prototype.on=wn.prototype.addListener,wn.prototype.prependListener=function(e,t){return Rn(this,e,t,!0)},wn.prototype.once=function(e,t){return Sn(t),this.on(e,In(this,e,t)),this},wn.prototype.prependOnceListener=function(e,t){return Sn(t),this.prependListener(e,In(this,e,t)),this},wn.prototype.removeListener=function(e,t){var n,r,i,o,s;if(Sn(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},wn.prototype.off=wn.prototype.removeListener,wn.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},wn.prototype.listeners=function(e){return Cn(this,e,!0)},wn.prototype.rawListeners=function(e){return Cn(this,e,!1)},wn.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Pn.call(e,t)},wn.prototype.listenerCount=Pn,wn.prototype.eventNames=function(){return this._eventsCount>0?yn(this._events):[]};var An={},Tn={},Mn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},e.add=function(e,t){return e+t|0},e.sub=function(e,t){return e-t|0},e.rotl=function(e,t){return e<<t|e>>>32-t},e.rotr=function(e,t){return e<<32-t|e>>>t},e.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}}(Mn),Object.defineProperty(Tn,"__esModule",{value:!0});var Ln=Mn;function Un(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function jn(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function Dn(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function zn(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function Bn(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function Fn(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function Hn(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function $n(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function Vn(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),Hn(e/4294967296>>>0,t,n),Hn(e>>>0,t,n+4),t}function qn(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),$n(e>>>0,t,n),$n(e/4294967296>>>0,t,n+4),t}Tn.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},Tn.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},Tn.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},Tn.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},Tn.writeUint16BE=Un,Tn.writeInt16BE=Un,Tn.writeUint16LE=jn,Tn.writeInt16LE=jn,Tn.readInt32BE=Dn,Tn.readUint32BE=zn,Tn.readInt32LE=Bn,Tn.readUint32LE=Fn,Tn.writeUint32BE=Hn,Tn.writeInt32BE=Hn,Tn.writeUint32LE=$n,Tn.writeInt32LE=$n,Tn.readInt64BE=function(e,t){void 0===t&&(t=0);var n=Dn(e,t),r=Dn(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},Tn.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*zn(e,t)+zn(e,t+4)},Tn.readInt64LE=function(e,t){void 0===t&&(t=0);var n=Bn(e,t);return 4294967296*Bn(e,t+4)+n-4294967296*(n>>31)},Tn.readUint64LE=function(e,t){void 0===t&&(t=0);var n=Fn(e,t);return 4294967296*Fn(e,t+4)+n},Tn.writeUint64BE=Vn,Tn.writeInt64BE=Vn,Tn.writeUint64LE=qn,Tn.writeInt64LE=qn,Tn.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,o=e/8+n-1;o>=n;o--)r+=t[o]*i,i*=256;return r},Tn.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,o=n;o<n+e/8;o++)r+=t[o]*i,i*=256;return r},Tn.writeUintBE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!Ln.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,o=e/8+r-1;o>=r;o--)n[o]=t/i&255,i*=256;return n},Tn.writeUintLE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!Ln.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,o=r;o<r+e/8;o++)n[o]=t/i&255,i*=256;return n},Tn.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},Tn.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},Tn.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},Tn.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},Tn.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},Tn.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},Tn.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},Tn.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t};var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e},Object.defineProperty(An,"__esModule",{value:!0});var Kn=Tn,Gn=Wn,Yn=20;function Qn(e,t,n){for(var r=1634760805,i=857760878,o=2036477234,s=1797285236,a=n[3]<<24|n[2]<<16|n[1]<<8|n[0],c=n[7]<<24|n[6]<<16|n[5]<<8|n[4],u=n[11]<<24|n[10]<<16|n[9]<<8|n[8],l=n[15]<<24|n[14]<<16|n[13]<<8|n[12],f=n[19]<<24|n[18]<<16|n[17]<<8|n[16],h=n[23]<<24|n[22]<<16|n[21]<<8|n[20],d=n[27]<<24|n[26]<<16|n[25]<<8|n[24],p=n[31]<<24|n[30]<<16|n[29]<<8|n[28],g=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],v=t[11]<<24|t[10]<<16|t[9]<<8|t[8],m=t[15]<<24|t[14]<<16|t[13]<<8|t[12],_=r,b=i,w=o,E=s,S=a,O=c,R=u,x=l,I=f,C=h,P=d,k=p,N=g,A=y,T=v,M=m,L=0;L<Yn;L+=2)S=(S^=I=I+(N=(N^=_=_+S|0)>>>16|N<<16)|0)>>>20|S<<12,O=(O^=C=C+(A=(A^=b=b+O|0)>>>16|A<<16)|0)>>>20|O<<12,R=(R^=P=P+(T=(T^=w=w+R|0)>>>16|T<<16)|0)>>>20|R<<12,x=(x^=k=k+(M=(M^=E=E+x|0)>>>16|M<<16)|0)>>>20|x<<12,R=(R^=P=P+(T=(T^=w=w+R|0)>>>24|T<<8)|0)>>>25|R<<7,x=(x^=k=k+(M=(M^=E=E+x|0)>>>24|M<<8)|0)>>>25|x<<7,O=(O^=C=C+(A=(A^=b=b+O|0)>>>24|A<<8)|0)>>>25|O<<7,S=(S^=I=I+(N=(N^=_=_+S|0)>>>24|N<<8)|0)>>>25|S<<7,O=(O^=P=P+(M=(M^=_=_+O|0)>>>16|M<<16)|0)>>>20|O<<12,R=(R^=k=k+(N=(N^=b=b+R|0)>>>16|N<<16)|0)>>>20|R<<12,x=(x^=I=I+(A=(A^=w=w+x|0)>>>16|A<<16)|0)>>>20|x<<12,S=(S^=C=C+(T=(T^=E=E+S|0)>>>16|T<<16)|0)>>>20|S<<12,x=(x^=I=I+(A=(A^=w=w+x|0)>>>24|A<<8)|0)>>>25|x<<7,S=(S^=C=C+(T=(T^=E=E+S|0)>>>24|T<<8)|0)>>>25|S<<7,R=(R^=k=k+(N=(N^=b=b+R|0)>>>24|N<<8)|0)>>>25|R<<7,O=(O^=P=P+(M=(M^=_=_+O|0)>>>24|M<<8)|0)>>>25|O<<7;Kn.writeUint32LE(_+r|0,e,0),Kn.writeUint32LE(b+i|0,e,4),Kn.writeUint32LE(w+o|0,e,8),Kn.writeUint32LE(E+s|0,e,12),Kn.writeUint32LE(S+a|0,e,16),Kn.writeUint32LE(O+c|0,e,20),Kn.writeUint32LE(R+u|0,e,24),Kn.writeUint32LE(x+l|0,e,28),Kn.writeUint32LE(I+f|0,e,32),Kn.writeUint32LE(C+h|0,e,36),Kn.writeUint32LE(P+d|0,e,40),Kn.writeUint32LE(k+p|0,e,44),Kn.writeUint32LE(N+g|0,e,48),Kn.writeUint32LE(A+y|0,e,52),Kn.writeUint32LE(T+v|0,e,56),Kn.writeUint32LE(M+m|0,e,60)}function Jn(e,t,n,r,i){if(void 0===i&&(i=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.length)throw new Error("ChaCha: destination is shorter than source");var o,s;if(0===i){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");s=(o=new Uint8Array(16)).length-t.length,o.set(t,s)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");o=t,s=i}for(var a=new Uint8Array(64),c=0;c<n.length;c+=64){Qn(a,o,e);for(var u=c;u<c+64&&u<n.length;u++)r[u]=n[u]^a[u-c];Xn(o,0,s)}return Gn.wipe(a),0===i&&Gn.wipe(o),r}function Xn(e,t,n){for(var r=1;n--;)r=r+(255&e[t])|0,e[t]=255&r,r>>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}An.streamXOR=Jn,An.stream=function(e,t,n,r){return void 0===r&&(r=0),Gn.wipe(n),Jn(e,t,n,n,r)};var Zn={},er={};function tr(e,t){if(e.length!==t.length)return 0;for(var n=0,r=0;r<e.length;r++)n|=e[r]^t[r];return 1&n-1>>>8}Object.defineProperty(er,"__esModule",{value:!0}),er.select=function(e,t,n){return~(e-1)&t|e-1&n},er.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},er.compare=tr,er.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==tr(e,t)},function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=er,n=Wn;e.DIGEST_LENGTH=16;var r=function(){function t(t){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var n=t[0]|t[1]<<8;this._r[0]=8191&n;var r=t[2]|t[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var i=t[4]|t[5]<<8;this._r[2]=7939&(r>>>10|i<<6);var o=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var s=t[8]|t[9]<<8;this._r[4]=255&(o>>>4|s<<12),this._r[5]=s>>>1&8190;var a=t[10]|t[11]<<8;this._r[6]=8191&(s>>>14|a<<2);var c=t[12]|t[13]<<8;this._r[7]=8065&(a>>>11|c<<5);var u=t[14]|t[15]<<8;this._r[8]=8191&(c>>>8|u<<8),this._r[9]=u>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return t.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,i=this._h[0],o=this._h[1],s=this._h[2],a=this._h[3],c=this._h[4],u=this._h[5],l=this._h[6],f=this._h[7],h=this._h[8],d=this._h[9],p=this._r[0],g=this._r[1],y=this._r[2],v=this._r[3],m=this._r[4],_=this._r[5],b=this._r[6],w=this._r[7],E=this._r[8],S=this._r[9];n>=16;){var O=e[t+0]|e[t+1]<<8;i+=8191&O;var R=e[t+2]|e[t+3]<<8;o+=8191&(O>>>13|R<<3);var x=e[t+4]|e[t+5]<<8;s+=8191&(R>>>10|x<<6);var I=e[t+6]|e[t+7]<<8;a+=8191&(x>>>7|I<<9);var C=e[t+8]|e[t+9]<<8;c+=8191&(I>>>4|C<<12),u+=C>>>1&8191;var P=e[t+10]|e[t+11]<<8;l+=8191&(C>>>14|P<<2);var k=e[t+12]|e[t+13]<<8;f+=8191&(P>>>11|k<<5);var N=e[t+14]|e[t+15]<<8,A=0,T=A;T+=i*p,T+=o*(5*S),T+=s*(5*E),T+=a*(5*w),A=(T+=c*(5*b))>>>13,T&=8191,T+=u*(5*_),T+=l*(5*m),T+=f*(5*v),T+=(h+=8191&(k>>>8|N<<8))*(5*y);var M=A+=(T+=(d+=N>>>5|r)*(5*g))>>>13;M+=i*g,M+=o*p,M+=s*(5*S),M+=a*(5*E),A=(M+=c*(5*w))>>>13,M&=8191,M+=u*(5*b),M+=l*(5*_),M+=f*(5*m),M+=h*(5*v),A+=(M+=d*(5*y))>>>13,M&=8191;var L=A;L+=i*y,L+=o*g,L+=s*p,L+=a*(5*S),A=(L+=c*(5*E))>>>13,L&=8191,L+=u*(5*w),L+=l*(5*b),L+=f*(5*_),L+=h*(5*m);var U=A+=(L+=d*(5*v))>>>13;U+=i*v,U+=o*y,U+=s*g,U+=a*p,A=(U+=c*(5*S))>>>13,U&=8191,U+=u*(5*E),U+=l*(5*w),U+=f*(5*b),U+=h*(5*_);var j=A+=(U+=d*(5*m))>>>13;j+=i*m,j+=o*v,j+=s*y,j+=a*g,A=(j+=c*p)>>>13,j&=8191,j+=u*(5*S),j+=l*(5*E),j+=f*(5*w),j+=h*(5*b);var D=A+=(j+=d*(5*_))>>>13;D+=i*_,D+=o*m,D+=s*v,D+=a*y,A=(D+=c*g)>>>13,D&=8191,D+=u*p,D+=l*(5*S),D+=f*(5*E),D+=h*(5*w);var z=A+=(D+=d*(5*b))>>>13;z+=i*b,z+=o*_,z+=s*m,z+=a*v,A=(z+=c*y)>>>13,z&=8191,z+=u*g,z+=l*p,z+=f*(5*S),z+=h*(5*E);var B=A+=(z+=d*(5*w))>>>13;B+=i*w,B+=o*b,B+=s*_,B+=a*m,A=(B+=c*v)>>>13,B&=8191,B+=u*y,B+=l*g,B+=f*p,B+=h*(5*S);var F=A+=(B+=d*(5*E))>>>13;F+=i*E,F+=o*w,F+=s*b,F+=a*_,A=(F+=c*m)>>>13,F&=8191,F+=u*v,F+=l*y,F+=f*g,F+=h*p;var H=A+=(F+=d*(5*S))>>>13;H+=i*S,H+=o*E,H+=s*w,H+=a*b,A=(H+=c*_)>>>13,H&=8191,H+=u*m,H+=l*v,H+=f*y,H+=h*g,i=T=8191&(A=(A=((A+=(H+=d*p)>>>13)<<2)+A|0)+(T&=8191)|0),o=M+=A>>>=13,s=L&=8191,a=U&=8191,c=j&=8191,u=D&=8191,l=z&=8191,f=B&=8191,h=F&=8191,d=H&=8191,t+=16,n-=16}this._h[0]=i,this._h[1]=o,this._h[2]=s,this._h[3]=a,this._h[4]=c,this._h[5]=u,this._h[6]=l,this._h[7]=f,this._h[8]=h,this._h[9]=d},t.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,o,s=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=n,n=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,s[0]=this._h[0]+5,n=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this._h[o]+n,n=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,r=(1^n)-1,o=0;o<10;o++)s[o]&=r;for(r=~r,o=0;o<10;o++)this._h[o]=this._h[o]&r|s[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[n+i];if(r-=t,n+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(r>=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(i=0;i<r;i++)this._buffer[this._leftover+i]=e[n+i];this._leftover+=r}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},t.prototype.clean=function(){return n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();e.Poly1305=r,e.oneTimeAuth=function(e,t){var n=new r(e);n.update(t);var i=n.digest();return n.clean(),i},e.equal=function(n,r){return n.length===e.DIGEST_LENGTH&&r.length===e.DIGEST_LENGTH&&t.equal(n,r)}}(Zn),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=An,n=Zn,r=Wn,i=Tn,o=er;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var s=new Uint8Array(16),a=function(){function a(t){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,t.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(t)}return a.prototype.seal=function(e,n,i,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var s=new Uint8Array(16);s.set(e,s.length-e.length);var a=new Uint8Array(32);t.stream(this._key,s,a,4);var c,u=n.length+this.tagLength;if(o){if(o.length!==u)throw new Error("ChaCha20Poly1305: incorrect destination length");c=o}else c=new Uint8Array(u);return t.streamXOR(this._key,s,n,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),a,c.subarray(0,c.length-this.tagLength),i),r.wipe(s),c},a.prototype.open=function(e,n,i,s){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(n.length<this.tagLength)return null;var a=new Uint8Array(16);a.set(e,a.length-e.length);var c=new Uint8Array(32);t.stream(this._key,a,c,4);var u=new Uint8Array(this.tagLength);if(this._authenticate(u,c,n.subarray(0,n.length-this.tagLength),i),!o.equal(u,n.subarray(n.length-this.tagLength,n.length)))return null;var l,f=n.length-this.tagLength;if(s){if(s.length!==f)throw new Error("ChaCha20Poly1305: incorrect destination length");l=s}else l=new Uint8Array(f);return t.streamXOR(this._key,a,n.subarray(0,n.length-this.tagLength),l,4),r.wipe(a),l},a.prototype.clean=function(){return r.wipe(this._key),this},a.prototype._authenticate=function(e,t,o,a){var c=new n.Poly1305(t);a&&(c.update(a),a.length%16>0&&c.update(s.subarray(a.length%16))),c.update(o),o.length%16>0&&c.update(s.subarray(o.length%16));var u=new Uint8Array(8);a&&i.writeUint64LE(a.length,u),c.update(u),i.writeUint64LE(o.length,u),c.update(u);for(var l=c.digest(),f=0;f<l.length;f++)e[f]=l[f];c.clean(),r.wipe(l),r.wipe(u)},a}();e.ChaCha20Poly1305=a}({});var nr={},rr={},ir={};Object.defineProperty(ir,"__esModule",{value:!0}),ir.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState},Object.defineProperty(rr,"__esModule",{value:!0});var or=ir,sr=er,ar=Wn,cr=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var r=0;r<n.length;r++)n[r]^=54;this._inner.update(n);for(r=0;r<n.length;r++)n[r]^=106;this._outer.update(n),or.isSerializableHash(this._inner)&&or.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),ar.wipe(n)}return e.prototype.reset=function(){if(!or.isSerializableHash(this._inner)||!or.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){or.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),or.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!or.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!or.isSerializableHash(this._inner)||!or.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!or.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();rr.HMAC=cr,rr.hmac=function(e,t,n){var r=new cr(e,t);r.update(n);var i=r.digest();return r.clean(),i},rr.equal=sr.equal,Object.defineProperty(nr,"__esModule",{value:!0});var ur=rr,lr=Wn,fr=function(){function e(e,t,n,r){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=r;var i=ur.hmac(this._hash,n,t);this._hmac=new ur.HMAC(e,i),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n<t.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[n]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),lr.wipe(this._buffer),lr.wipe(this._counter),this._bufpos=0},e}();nr.HKDF=fr;var hr={},dr={},pr={};Object.defineProperty(pr,"__esModule",{value:!0}),pr.BrowserRandomSource=void 0;function gr(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}pr.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}};var yr={},vr=g(Object.freeze({__proto__:null,default:{}}));Object.defineProperty(yr,"__esModule",{value:!0}),yr.NodeRandomSource=void 0;const mr=Wn;yr.NodeRandomSource=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,void 0!==gr){const e=vr;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)n[e]=t[e];return(0,mr.wipe)(t),n}},Object.defineProperty(dr,"__esModule",{value:!0}),dr.SystemRandomSource=void 0;const _r=pr,br=yr;dr.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new _r.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new br.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=dr,n=Tn,r=Wn;function i(t,n=e.defaultRandomSource){return n.randomBytes(t)}e.defaultRandomSource=new t.SystemRandomSource,e.randomBytes=i,e.randomUint32=function(t=e.defaultRandomSource){const o=i(4,t),s=(0,n.readUint32LE)(o);return(0,r.wipe)(o),s};const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function s(t,n=o,s=e.defaultRandomSource){if(n.length<2)throw new Error("randomString charset is too short");if(n.length>256)throw new Error("randomString charset is too long");let a="";const c=n.length,u=256-256%c;for(;t>0;){const e=i(Math.ceil(256*t/u),s);for(let r=0;r<e.length&&t>0;r++){const i=e[r];i<u&&(a+=n.charAt(i%c),t--)}(0,r.wipe)(e)}return a}e.randomString=s,e.randomStringForEntropy=function(t,n=o,r=e.defaultRandomSource){return s(Math.ceil(t/(Math.log(n.length)/Math.LN2)),n,r)}}(hr);!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Tn,n=Wn;e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},r.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=o(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,s=n<<3,a=n%64<56?64:128;this._buffer[r]=128;for(var c=r+1;c<a-8;c++)this._buffer[c]=0;t.writeUint32BE(i,this._buffer,a-8),t.writeUint32BE(s,this._buffer,a-4),o(this._temp,this._state,this._buffer,0,a),this._finished=!0}for(c=0;c<this.digestLength/4;c++)t.writeUint32BE(this._state[c],e,4*c);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.state),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA256=r;var i=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(e,n,r,o,s){for(;s>=64;){for(var a=n[0],c=n[1],u=n[2],l=n[3],f=n[4],h=n[5],d=n[6],p=n[7],g=0;g<16;g++){var y=o+4*g;e[g]=t.readUint32BE(r,y)}for(g=16;g<64;g++){var v=e[g-2],m=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10,_=((v=e[g-15])>>>7|v<<25)^(v>>>18|v<<14)^v>>>3;e[g]=(m+e[g-7]|0)+(_+e[g-16]|0)}for(g=0;g<64;g++){m=(((f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&h^~f&d)|0)+(p+(i[g]+e[g]|0)|0)|0,_=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&c^a&u^c&u)|0;p=d,d=h,h=f,f=l+m|0,l=u,u=c,c=a,a=m+_|0}n[0]+=a,n[1]+=c,n[2]+=u,n[3]+=l,n[4]+=f,n[5]+=h,n[6]+=d,n[7]+=p,o+=64,s-=64}return o}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}({});!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=hr,n=Wn;function r(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;const i=new Uint8Array(32);i[0]=9;const o=r([56129,1]);function s(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function a(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function c(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function u(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function l(e,t,n){let r,i,o=0,s=0,a=0,c=0,u=0,l=0,f=0,h=0,d=0,p=0,g=0,y=0,v=0,m=0,_=0,b=0,w=0,E=0,S=0,O=0,R=0,x=0,I=0,C=0,P=0,k=0,N=0,A=0,T=0,M=0,L=0,U=n[0],j=n[1],D=n[2],z=n[3],B=n[4],F=n[5],H=n[6],$=n[7],V=n[8],q=n[9],W=n[10],K=n[11],G=n[12],Y=n[13],Q=n[14],J=n[15];r=t[0],o+=r*U,s+=r*j,a+=r*D,c+=r*z,u+=r*B,l+=r*F,f+=r*H,h+=r*$,d+=r*V,p+=r*q,g+=r*W,y+=r*K,v+=r*G,m+=r*Y,_+=r*Q,b+=r*J,r=t[1],s+=r*U,a+=r*j,c+=r*D,u+=r*z,l+=r*B,f+=r*F,h+=r*H,d+=r*$,p+=r*V,g+=r*q,y+=r*W,v+=r*K,m+=r*G,_+=r*Y,b+=r*Q,w+=r*J,r=t[2],a+=r*U,c+=r*j,u+=r*D,l+=r*z,f+=r*B,h+=r*F,d+=r*H,p+=r*$,g+=r*V,y+=r*q,v+=r*W,m+=r*K,_+=r*G,b+=r*Y,w+=r*Q,E+=r*J,r=t[3],c+=r*U,u+=r*j,l+=r*D,f+=r*z,h+=r*B,d+=r*F,p+=r*H,g+=r*$,y+=r*V,v+=r*q,m+=r*W,_+=r*K,b+=r*G,w+=r*Y,E+=r*Q,S+=r*J,r=t[4],u+=r*U,l+=r*j,f+=r*D,h+=r*z,d+=r*B,p+=r*F,g+=r*H,y+=r*$,v+=r*V,m+=r*q,_+=r*W,b+=r*K,w+=r*G,E+=r*Y,S+=r*Q,O+=r*J,r=t[5],l+=r*U,f+=r*j,h+=r*D,d+=r*z,p+=r*B,g+=r*F,y+=r*H,v+=r*$,m+=r*V,_+=r*q,b+=r*W,w+=r*K,E+=r*G,S+=r*Y,O+=r*Q,R+=r*J,r=t[6],f+=r*U,h+=r*j,d+=r*D,p+=r*z,g+=r*B,y+=r*F,v+=r*H,m+=r*$,_+=r*V,b+=r*q,w+=r*W,E+=r*K,S+=r*G,O+=r*Y,R+=r*Q,x+=r*J,r=t[7],h+=r*U,d+=r*j,p+=r*D,g+=r*z,y+=r*B,v+=r*F,m+=r*H,_+=r*$,b+=r*V,w+=r*q,E+=r*W,S+=r*K,O+=r*G,R+=r*Y,x+=r*Q,I+=r*J,r=t[8],d+=r*U,p+=r*j,g+=r*D,y+=r*z,v+=r*B,m+=r*F,_+=r*H,b+=r*$,w+=r*V,E+=r*q,S+=r*W,O+=r*K,R+=r*G,x+=r*Y,I+=r*Q,C+=r*J,r=t[9],p+=r*U,g+=r*j,y+=r*D,v+=r*z,m+=r*B,_+=r*F,b+=r*H,w+=r*$,E+=r*V,S+=r*q,O+=r*W,R+=r*K,x+=r*G,I+=r*Y,C+=r*Q,P+=r*J,r=t[10],g+=r*U,y+=r*j,v+=r*D,m+=r*z,_+=r*B,b+=r*F,w+=r*H,E+=r*$,S+=r*V,O+=r*q,R+=r*W,x+=r*K,I+=r*G,C+=r*Y,P+=r*Q,k+=r*J,r=t[11],y+=r*U,v+=r*j,m+=r*D,_+=r*z,b+=r*B,w+=r*F,E+=r*H,S+=r*$,O+=r*V,R+=r*q,x+=r*W,I+=r*K,C+=r*G,P+=r*Y,k+=r*Q,N+=r*J,r=t[12],v+=r*U,m+=r*j,_+=r*D,b+=r*z,w+=r*B,E+=r*F,S+=r*H,O+=r*$,R+=r*V,x+=r*q,I+=r*W,C+=r*K,P+=r*G,k+=r*Y,N+=r*Q,A+=r*J,r=t[13],m+=r*U,_+=r*j,b+=r*D,w+=r*z,E+=r*B,S+=r*F,O+=r*H,R+=r*$,x+=r*V,I+=r*q,C+=r*W,P+=r*K,k+=r*G,N+=r*Y,A+=r*Q,T+=r*J,r=t[14],_+=r*U,b+=r*j,w+=r*D,E+=r*z,S+=r*B,O+=r*F,R+=r*H,x+=r*$,I+=r*V,C+=r*q,P+=r*W,k+=r*K,N+=r*G,A+=r*Y,T+=r*Q,M+=r*J,r=t[15],b+=r*U,w+=r*j,E+=r*D,S+=r*z,O+=r*B,R+=r*F,x+=r*H,I+=r*$,C+=r*V,P+=r*q,k+=r*W,N+=r*K,A+=r*G,T+=r*Y,M+=r*Q,L+=r*J,o+=38*w,s+=38*E,a+=38*S,c+=38*O,u+=38*R,l+=38*x,f+=38*I,h+=38*C,d+=38*P,p+=38*k,g+=38*N,y+=38*A,v+=38*T,m+=38*M,_+=38*L,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=u,e[5]=l,e[6]=f,e[7]=h,e[8]=d,e[9]=p,e[10]=g,e[11]=y,e[12]=v,e[13]=m,e[14]=_,e[15]=b}function f(e,t){l(e,t,t)}function h(e,t){const n=new Uint8Array(32),i=new Float64Array(80),h=r(),d=r(),p=r(),g=r(),y=r(),v=r();for(let t=0;t<31;t++)n[t]=e[t];n[31]=127&e[31]|64,n[0]&=248,function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(i,t);for(let e=0;e<16;e++)d[e]=i[e];h[0]=g[0]=1;for(let e=254;e>=0;--e){const t=n[e>>>3]>>>(7&e)&1;a(h,d,t),a(p,g,t),c(y,h,p),u(h,h,p),c(p,d,g),u(d,d,g),f(g,y),f(v,h),l(h,p,h),l(p,d,y),c(y,h,p),u(h,h,p),f(d,h),u(p,g,v),l(h,p,o),c(h,h,g),l(p,p,h),l(h,g,v),l(g,d,i),f(d,y),a(h,d,t),a(p,g,t)}for(let e=0;e<16;e++)i[e+16]=h[e],i[e+32]=p[e],i[e+48]=d[e],i[e+64]=g[e];const m=i.subarray(32),_=i.subarray(16);!function(e,t){const n=r();for(let e=0;e<16;e++)n[e]=t[e];for(let e=253;e>=0;e--)f(n,n),2!==e&&4!==e&&l(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]}(m,m),l(_,_,m);const b=new Uint8Array(32);return function(e,t){const n=r(),i=r();for(let e=0;e<16;e++)i[e]=t[e];s(i),s(i),s(i);for(let e=0;e<2;e++){n[0]=i[0]-65517;for(let e=1;e<15;e++)n[e]=i[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=i[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,a(i,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&i[t],e[2*t+1]=i[t]>>8}(b,_),b}function d(e){return h(e,i)}function p(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const n=new Uint8Array(t);return{publicKey:d(n),secretKey:n}}e.scalarMult=h,e.scalarMultBase=d,e.generateKeyPairFromSeed=p,e.generateKeyPair=function(e){const r=(0,t.randomBytes)(32,e),i=p(r);return(0,n.wipe)(r),i},e.sharedKey=function(t,n,r=!1){if(t.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(n.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const i=h(t,n);if(r){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw new Error("X25519: invalid shared key")}return i}}({});var wr=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==n[s])throw new TypeError(o+" is ambiguous");n[s]=i}var a=e.length,c=e.charAt(0),u=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function f(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===c;)r++,t++;for(var o=(e.length-t)*u+1>>>0,s=new Uint8Array(o);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var f=0,h=o-1;(0!==l||f<i)&&-1!==h;h--,f++)l+=a*s[h]>>>0,s[h]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=f,t++}if(" "!==e[t]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(r+(o-d)),g=r;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,o=t.length;i!==o&&0===t[i];)i++,n++;for(var s=(o-i)*l+1>>>0,u=new Uint8Array(s);i!==o;){for(var f=t[i],h=0,d=s-1;(0!==f||h<r)&&-1!==d;d--,h++)f+=256*u[d]>>>0,u[d]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");r=h,i++}for(var p=s-r;p!==s&&0===u[p];)p++;for(var g=c.repeat(n);p<s;++p)g+=e.charAt(u[p]);return g},decodeUnsafe:f,decode:function(e){var n=f(e);if(n)return n;throw new Error(`Non-${t} character`)}}},Er=wr;const Sr=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class Or{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Rr{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return Ir(this,e)}}class xr{constructor(e){this.decoders=e}or(e){return Ir(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Ir=(e,t)=>new xr({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class Cr{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new Or(e,t,n),this.decoder=new Rr(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Pr=({name:e,prefix:t,encode:n,decode:r})=>new Cr(e,t,n,r),kr=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=Er(n,t);return Pr({prefix:e,name:t,encode:r,decode:e=>Sr(i(e))})},Nr=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>Pr({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let o="",s=0,a=0;for(let r=0;r<e.length;++r)for(a=a<<8|e[r],s+=8;s>n;)s-=n,o+=t[i&a>>s];if(s&&(o+=t[i&a<<n-s]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const s=new Uint8Array(o*n/8|0);let a=0,c=0,u=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);c=c<<n|o,a+=n,a>=8&&(a-=8,s[u++]=255&c>>a)}if(a>=n||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,r,n,e)});Pr({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});Nr({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});Nr({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});kr({prefix:"9",name:"base10",alphabet:"0123456789"});Nr({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Nr({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});Nr({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Nr({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Nr({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Nr({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Nr({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Nr({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Nr({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Nr({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Nr({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});kr({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),kr({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});kr({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),kr({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});Nr({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Nr({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Nr({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Nr({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});const Ar=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Tr=Ar.reduce(((e,t,n)=>(e[n]=t,e)),[]),Mr=Ar.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);Pr({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=Tr[t]),"")},decode:function(e){const t=[];for(const n of e){const e=Mr[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var Lr=function e(t,n,r){n=n||[];var i=r=r||0;for(;t>=Dr;)n[r++]=255&t|Ur,t/=128;for(;t&jr;)n[r++]=255&t|Ur,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},Ur=128,jr=-128,Dr=Math.pow(2,31);var zr=function e(t,n){var r,i=0,o=0,s=n=n||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");r=t[s++],i+=o<28?(r&Fr)<<o:(r&Fr)*Math.pow(2,o),o+=7}while(r>=Br);return e.bytes=s-n,i},Br=128,Fr=127;var Hr=Math.pow(2,7),$r=Math.pow(2,14),Vr=Math.pow(2,21),qr=Math.pow(2,28),Wr=Math.pow(2,35),Kr=Math.pow(2,42),Gr=Math.pow(2,49),Yr=Math.pow(2,56),Qr=Math.pow(2,63),Jr={encode:Lr,decode:zr,encodingLength:function(e){return e<Hr?1:e<$r?2:e<Vr?3:e<qr?4:e<Wr?5:e<Kr?6:e<Gr?7:e<Yr?8:e<Qr?9:10}};const Xr=(e,t,n=0)=>(Jr.encode(e,t,n),t),Zr=e=>Jr.encodingLength(e),ei=(e,t)=>{const n=t.byteLength,r=Zr(e),i=r+Zr(n),o=new Uint8Array(i+n);return Xr(e,o,0),Xr(n,o,r),o.set(t,i),new ti(e,n,t,o)};class ti{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const ni=({name:e,code:t,encode:n})=>new ri(e,t,n);class ri{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?ei(this.code,t):t.then((e=>ei(this.code,e)))}throw Error("Unknown type, must be binary type")}}const ii=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t));ni({name:"sha2-256",code:18,encode:ii("SHA-256")}),ni({name:"sha2-512",code:19,encode:ii("SHA-512")});new TextEncoder,new TextDecoder;var oi=function(e,t){return oi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},oi(e,t)};
236
+ `;const on=n("PlatformNotSupportedModal"),sn=()=>(on("initializing"),_.exports.jsx(_t,{children:_.exports.jsx(_.exports.Fragment,{children:_.exports.jsxs(dt,{children:[_.exports.jsx(pt,{children:"Sorry, we don't support this platform just yet."}),_.exports.jsxs(gt,{children:["We're working hard to expand our coverage.",_.exports.jsx("br",{}),"Until we get there, you can try Ledger Connect on:"]}),_.exports.jsx(nn,{children:_.exports.jsxs(rn,{children:[_.exports.jsx("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='250.076' height='248.707' viewBox='0 0 66.166 65.804'%3e%3cdefs%3e%3clinearGradient id='b'%3e%3cstop style='stop-color:%2306c2e7%3bstop-opacity:1' offset='0'/%3e%3cstop offset='.25' style='stop-color:%230db8ec%3bstop-opacity:1'/%3e%3cstop offset='.5' style='stop-color:%2312aef1%3bstop-opacity:1'/%3e%3cstop style='stop-color:%231f86f9%3bstop-opacity:1' offset='.75'/%3e%3cstop style='stop-color:%23107ddd%3bstop-opacity:1' offset='1'/%3e%3c/linearGradient%3e%3clinearGradient id='a'%3e%3cstop style='stop-color:%23bdbdbd%3bstop-opacity:1' offset='0'/%3e%3cstop style='stop-color:white%3bstop-opacity:1' offset='1'/%3e%3c/linearGradient%3e%3clinearGradient xlink:href='%23a' id='d' x1='412.975' y1='237.608' x2='412.975' y2='59.392' gradientUnits='userSpaceOnUse' gradientTransform='matrix(.35154 0 0 .35154 206.79 159.773)'/%3e%3cfilter style='color-interpolation-filters:sRGB' id='f' x='-.021' width='1.042' y='-.022' height='1.045'%3e%3cfeGaussianBlur stdDeviation='.958'/%3e%3c/filter%3e%3cfilter style='color-interpolation-filters:sRGB' id='c' x='-.048' width='1.096' y='-.048' height='1.096'%3e%3cfeGaussianBlur stdDeviation='3.564'/%3e%3c/filter%3e%3cradialGradient xlink:href='%23b' id='e' cx='413.061' cy='136.818' fx='413.061' fy='136.818' r='82.125' gradientUnits='userSpaceOnUse' gradientTransform='matrix(.38143 0 0 .38143 194.545 155.58)'/%3e%3c/defs%3e%3cpath transform='matrix(.33865 0 0 .3261 -106.77 -14.478)' style='opacity:.52999998%3bfill:black%3bfill-opacity:1%3bstroke:none%3bstroke-width:2.93077397%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill%3bfilter:url(%23c)' d='M502.083 148.5a89.108 89.108 0 0 1-89.108 89.108 89.108 89.108 0 0 1-89.108-89.108 89.108 89.108 0 0 1 89.108-89.108 89.108 89.108 0 0 1 89.108 89.108Z'/%3e%3cpath d='M383.294 211.977a31.325 31.325 0 0 1-31.325 31.325 31.325 31.325 0 0 1-31.326-31.325 31.325 31.325 0 0 1 31.326-31.325 31.325 31.325 0 0 1 31.325 31.325z' style='opacity:1%3bfill:url(%23d)%3bfill-opacity:1%3bstroke:%23cdcdcd%3bstroke-width:.09301235%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath d='M380.84 211.977a28.87 28.87 0 0 1-28.871 28.87 28.87 28.87 0 0 1-28.871-28.87 28.87 28.87 0 0 1 28.87-28.87 28.87 28.87 0 0 1 28.871 28.87z' style='opacity:1%3bfill:url(%23e)%3bfill-opacity:1%3bstroke:none%3bstroke-width:.94955933%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath d='M351.969 184.612a.42.42 0 0 0-.421.42v4.856a.42.42 0 1 0 .841 0v-4.855a.42.42 0 0 0-.42-.421zm-2.754.174a.42.42 0 0 0-.46.463l.212 2.03a.42.42 0 1 0 .837-.087l-.212-2.03a.42.42 0 0 0-.377-.376zm5.526.002a.42.42 0 0 0-.377.375l-.213 2.03a.42.42 0 1 0 .837.089l.214-2.031a.42.42 0 0 0-.46-.463zm-8.355.408a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .824-.174l-1.006-4.75a.42.42 0 0 0-.414-.334zm11.184.004a.42.42 0 0 0-.414.333l-1.01 4.75a.42.42 0 1 0 .824.175l1.01-4.75a.42.42 0 0 0-.41-.508zm-13.883.757a.42.42 0 0 0-.437.55l.631 1.942a.42.42 0 1 0 .8-.26l-.63-1.942a.42.42 0 0 0-.364-.29zm16.567.001a.42.42 0 0 0-.364.29l-.631 1.942a.42.42 0 1 0 .8.26l.632-1.942a.42.42 0 0 0-.437-.55zm-19.237.976a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.973-4.437a.42.42 0 0 0-.392-.25zm21.937.015a.42.42 0 0 0-.393.25l-1.978 4.434a.42.42 0 1 0 .77.343l1.977-4.434a.42.42 0 0 0-.376-.593zm-24.415 1.296a.42.42 0 0 0-.394.63l1.021 1.77a.42.42 0 1 0 .73-.421l-1.022-1.769a.42.42 0 0 0-.335-.21zm26.859 0a.419.419 0 0 0-.335.21l-1.021 1.769a.42.42 0 1 0 .729.42l1.021-1.768a.42.42 0 0 0-.394-.63zm-29.265 1.5a.422.422 0 0 0-.326.669l2.85 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm31.701.022a.42.42 0 0 0-.355.174l-2.856 3.926a.42.42 0 1 0 .68.495l2.857-3.926a.42.42 0 0 0-.326-.669zm-33.852 1.783a.42.42 0 0 0-.335.702l1.367 1.518a.42.42 0 1 0 .626-.563l-1.367-1.518a.42.42 0 0 0-.29-.14zm35.976.003a.421.421 0 0 0-.291.139l-1.366 1.517a.42.42 0 1 0 .625.564l1.367-1.518a.42.42 0 0 0-.335-.702zm-38.037 1.977a.42.42 0 0 0-.26.733l3.609 3.249a.42.42 0 1 0 .563-.626l-3.608-3.248a.42.42 0 0 0-.304-.108zm40.108.014a.419.419 0 0 0-.304.108l-3.61 3.245a.42.42 0 1 0 .563.626l3.61-3.245a.42.42 0 0 0-.259-.734zm-41.822 2.19a.42.42 0 0 0-.262.762l1.652 1.2a.42.42 0 1 0 .495-.681l-1.652-1.2a.42.42 0 0 0-.233-.081zm43.535.015a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .494.681l1.653-1.2a.42.42 0 0 0-.261-.76zm-45.137 2.336a.42.42 0 0 0-.18.785l4.204 2.427a.42.42 0 1 0 .42-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm46.727 0a.417.417 0 0 0-.24.056l-4.204 2.427a.42.42 0 1 0 .42.73l4.205-2.428a.42.42 0 0 0-.18-.785zm-47.938 2.506a.42.42 0 0 0-.18.805l1.865.833a.42.42 0 1 0 .343-.77l-1.865-.831a.42.42 0 0 0-.163-.037zm49.158.017a.42.42 0 0 0-.164.037l-1.866.83a.42.42 0 1 0 .343.77l1.866-.831a.42.42 0 0 0-.18-.806zm-50.238 2.602a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.615-1.504a.421.421 0 0 0-.167-.02zm51.315.018a.408.408 0 0 0-.166.02l-4.618 1.5a.42.42 0 1 0 .26.801l4.618-1.5a.42.42 0 0 0-.094-.82zm-51.987 2.732a.42.42 0 0 0-.09.833l1.997.424a.42.42 0 1 0 .175-.823l-1.997-.425a.413.413 0 0 0-.085-.009zm52.654.004a.518.518 0 0 0-.084.009l-1.998.424a.42.42 0 1 0 .175.823l1.997-.424a.42.42 0 0 0-.09-.833zm-53.163 2.761a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .088-.837l-4.828-.51a.432.432 0 0 0-.085 0zm53.676.037a.386.386 0 0 0-.086 0l-4.828.504a.42.42 0 1 0 .087.837l4.829-.504a.42.42 0 0 0-.002-.837zm-53.758 2.794a.42.42 0 1 0 0 .842h2.042a.42.42 0 1 0 0-.842zm51.793 0a.42.42 0 1 0 0 .842h2.042a.42.42 0 1 0 0-.842zm-46.803 2.295a.384.384 0 0 0-.086 0l-4.829.504a.42.42 0 1 0 .088.838l4.829-.504a.42.42 0 0 0-.002-.838zm43.853.03a.42.42 0 0 0-.003.838l4.828.51a.42.42 0 1 0 .089-.837l-4.829-.51a.434.434 0 0 0-.085-.001zm-46.26 2.844a.43.43 0 0 0-.085.009l-1.998.424a.42.42 0 1 0 .175.823l1.998-.424a.42.42 0 0 0-.09-.833zm48.669.004a.42.42 0 0 0-.09.833l1.998.424a.42.42 0 1 0 .175-.824l-1.998-.424a.413.413 0 0 0-.085-.01zm-45.305 1.657a.408.408 0 0 0-.167.02l-4.617 1.5a.42.42 0 1 0 .26.801l4.618-1.5a.42.42 0 0 0-.094-.82zm41.937.015a.42.42 0 0 0-.094.82l4.616 1.504a.42.42 0 1 0 .26-.8l-4.616-1.504a.421.421 0 0 0-.166-.02zm-43.7 3.273a.42.42 0 0 0-.163.036l-1.865.831a.42.42 0 1 0 .342.769l1.866-.83a.42.42 0 0 0-.18-.806zm45.46.016a.42.42 0 0 0-.18.805l1.865.832a.42.42 0 1 0 .343-.768l-1.865-.833a.42.42 0 0 0-.163-.036zm-41.827.912a.417.417 0 0 0-.24.056l-4.204 2.427a.42.42 0 1 0 .42.73l4.205-2.428a.42.42 0 0 0-.18-.785zm38.2 0a.42.42 0 0 0-.181.785l4.205 2.427a.42.42 0 1 0 .421-.729l-4.204-2.427a.42.42 0 0 0-.24-.056zm-39.248 3.562a.421.421 0 0 0-.233.08l-1.653 1.2a.42.42 0 1 0 .494.682l1.653-1.2a.42.42 0 0 0-.261-.762zm40.287.015a.42.42 0 0 0-.262.762l1.653 1.2a.42.42 0 1 0 .495-.681l-1.653-1.2a.42.42 0 0 0-.233-.081zm-36.544.145a.418.418 0 0 0-.303.108l-3.611 3.245a.42.42 0 1 0 .563.626l3.61-3.245a.42.42 0 0 0-.259-.734zm32.8.011a.421.421 0 0 0-.259.734l3.608 3.248a.42.42 0 1 0 .564-.625l-3.609-3.249a.42.42 0 0 0-.303-.107zm-29.374 3.084a.42.42 0 0 0-.355.173l-2.857 3.927a.42.42 0 1 0 .681.495l2.856-3.926a.42.42 0 0 0-.325-.669zm25.936.018a.421.421 0 0 0-.327.668l2.851 3.93a.42.42 0 1 0 .682-.494l-2.851-3.93a.42.42 0 0 0-.355-.174zm-29.623.606a.421.421 0 0 0-.291.14l-1.366 1.517a.42.42 0 1 0 .625.563l1.367-1.517a.42.42 0 0 0-.335-.703zm33.33.002a.42.42 0 0 0-.335.702l1.367 1.518a.42.42 0 1 0 .626-.563l-1.367-1.518a.42.42 0 0 0-.29-.139zm-25.655 1.684a.419.419 0 0 0-.392.25l-1.978 4.433a.42.42 0 1 0 .769.343l1.978-4.434a.42.42 0 0 0-.377-.592zm17.956.012a.42.42 0 0 0-.377.592l1.972 4.437a.42.42 0 1 0 .77-.342l-1.973-4.437a.42.42 0 0 0-.392-.25zm-21.432 1.359a.419.419 0 0 0-.335.21l-1.02 1.768a.42.42 0 1 0 .728.421l1.021-1.769a.42.42 0 0 0-.394-.63zm24.935 0a.42.42 0 0 0-.394.63l1.02 1.77a.42.42 0 1 0 .73-.422l-1.021-1.769a.42.42 0 0 0-.335-.21zm-17.055.063a.42.42 0 0 0-.414.334l-1.009 4.749a.42.42 0 1 0 .823.175l1.01-4.75a.42.42 0 0 0-.41-.508zm9.16.003a.42.42 0 0 0-.41.508l1.006 4.75a.42.42 0 1 0 .824-.175l-1.006-4.75a.42.42 0 0 0-.414-.333zm-4.572.48a.42.42 0 0 0-.421.42v4.855a.42.42 0 1 0 .841 0v-4.855a.42.42 0 0 0-.42-.42zm-7.727 1.568a.42.42 0 0 0-.364.29l-.632 1.942a.42.42 0 1 0 .801.26l.631-1.942a.42.42 0 0 0-.436-.55zm15.45 0a.42.42 0 0 0-.437.55l.631 1.943a.42.42 0 1 0 .801-.26l-.631-1.942a.42.42 0 0 0-.364-.29zm-10.366 1.083a.42.42 0 0 0-.377.375l-.213 2.03a.42.42 0 1 0 .837.088l.213-2.03a.42.42 0 0 0-.46-.463zm5.268.002a.42.42 0 0 0-.46.463l.211 2.03a.42.42 0 1 0 .837-.088l-.211-2.03a.42.42 0 0 0-.377-.375z' style='opacity:1%3bfill:%23f4f2f3%3bfill-opacity:1%3bstroke:none%3bstroke-width:.38088897%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' transform='translate(-318.886 -180.595)'/%3e%3cpath transform='matrix(.35154 0 0 .35154 -112.095 -20.822)' d='m469.096 100.607-65.51 38.061-41.42 65.207 60.595-44.882z' style='opacity:.40900005%3bfill:black%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.5614785%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill%3bfilter:url(%23f)'/%3e%3cpath style='opacity:1%3bfill:%23ff5150%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.01970422%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill' d='m129.839 160.803-23.014-23.015 31.437-8.423z' transform='matrix(.64804 -.3317 -.36122 .63206 10.328 -23.732)'/%3e%3cpath transform='matrix(-.36122 .63206 .64804 -.3317 -20.923 6.11)' d='m129.839 160.803-23.014-23.015 31.437-8.423z' style='opacity:1%3bfill:%23f1f1f1%3bfill-opacity:1%3bstroke:none%3bstroke-width:1.01970422%3bstroke-linecap:round%3bstroke-linejoin:round%3bstroke-miterlimit:4%3bstroke-dasharray:none%3bstroke-dashoffset:0%3bstroke-opacity:1%3bpaint-order:markers stroke fill'/%3e%3cpath style='opacity:.243%3bfill:black%3bstroke:none%3bstroke-width:.09301235px%3bstroke-linecap:butt%3bstroke-linejoin:miter%3bstroke-opacity:1' d='m331.853 231.185 23.416-15.752 16.815-22.665z' transform='translate(-318.886 -180.595)'/%3e%3c/svg%3e"}),"Safari on iOS"]})})]})})}));var an={exports:{}};!function(e,t){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(i,o),a=0,c=e.map([t,n],(function(t){var n=s-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(n=null)&&s(t.prototype,n),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),o=c(n(94)),s=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(n[t]=s,r+=1)})),r>0){var s=Object.keys(n),c=a.default.find(s,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var l=a.default.find(s,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(o>0){var h=Object.keys(i),d=a.default.find(h,(function(e){return t.isBrowser(e,!0)}));if(void 0!==d)return this.compareVersion(i[d])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=u,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})}(an);var cn=p(an.exports);function un(){const e=cn.getParser(window.navigator.userAgent),t=e.getOS(),n=e.getBrowser(),{type:r}=e.getPlatform();var i,o;return"isBrave"===(null===(o=null===(i=window.navigator.brave)||void 0===i?void 0:i.isBrave)||void 0===o?void 0:o.name)&&(n.name="Brave"),{type:r,os:t,browser:n}}let ln=null;function fn(e,t){if(!ln){const e=document.body,t=document.createElement("div");t.className="ledger-ck-modal",e.appendChild(t),ln=St(t)}if(ln&&e){let n;switch(e){case"UseLedgerLiveModal":n=_.exports.jsx(tn,Object.assign({},t));break;case"PlatformNotSupportedModal":n=_.exports.jsx(sn,{});break;case"ExtensionInstallModal":n=_.exports.jsx(Tt,Object.assign({},t))}ln.render(n)}mt(!0)}function hn(e){const t=un(),n=(Ro("getSupportResult"),xo);yo(),!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))&&!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))&&n.isLedgerConnectSupported&&n.isChainIdSupported?fn("ExtensionInstallModal",{onClose:e.onClose}):fn("UseLedgerLiveModal",{isDesktop:"desktop"===t.type,uri:e.uri,onClose:e.onClose})}const dn=n("WalletConnectLegacy"),pn=r("WalletConnectLegacy");function gn(){return c(this,void 0,void 0,(function*(){dn("getWalletConnectLegacyProvider");try{const e=yield function(){return c(this,void 0,void 0,(function*(){dn("initWalletConnectLegacyProvider");const e=yo();return dn("walletConnectProviderOptions is",e),dn("created a new legacy provider instance"),new m({chainId:e.chainId,bridge:e.bridge,infuraId:e.infuraId,rpc:e.rpc,qrcode:!1})}))}();return function(e){function t(e){dn("connectHandler",e),mt(!1)}function n(t,r){dn("disconnectHandler",t,r),"undefined"!=typeof localStorage&&localStorage.removeItem("walletconnect"),e.removeListener("disconnect",n)}dn("assignWalletConnectLegacyProviderEvents"),e.on("connect",t),e.on("disconnect",n)}(e),e.request=function(e){dn("patchWalletConnectLegacyProviderRequest");const t=e.request.bind(e),n=yo();return function({method:r,params:i}){return c(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?(dn("calling patched",r,i),new Promise(((o,a)=>c(this,void 0,void 0,(function*(){try{if(!e.connected)return yield e.connector.createSession({chainId:n.chainId}),dn("created a new session"),hn({uri:e.connector.uri,onClose:()=>{pn("user rejected"),a(new s)}}),o(yield t({method:r,params:i}));dn("reusing existing session"),o(yield t({method:r,params:i}))}catch(e){return pn("error",e),a(e)}}))))):(dn("calling provider",r,i),yield t({method:r,params:i}))}))}}(e),e}catch(e){const t=e instanceof Error?e:new Error(String(e));throw pn("error",t),t}}))}var yn,vn={exports:{}},mn="object"==typeof Reflect?Reflect:null,_n=mn&&"function"==typeof mn.apply?mn.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};yn=mn&&"function"==typeof mn.ownKeys?mn.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var bn=Number.isNaN||function(e){return e!=e};function wn(){wn.init.call(this)}vn.exports=wn,vn.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}Nn(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&Nn(e,"error",t,n)}(e,i,{once:!0})}))},wn.EventEmitter=wn,wn.prototype._events=void 0,wn.prototype._eventsCount=0,wn.prototype._maxListeners=void 0;var En=10;function Sn(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function On(e){return void 0===e._maxListeners?wn.defaultMaxListeners:e._maxListeners}function Rn(e,t,n,r){var i,o,s,a;if(Sn(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=On(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function xn(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function In(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=xn.bind(r);return i.listener=n,r.wrapFn=i,i}function Cn(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):kn(i,i.length)}function Pn(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function kn(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function Nn(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(wn,"defaultMaxListeners",{enumerable:!0,get:function(){return En},set:function(e){if("number"!=typeof e||e<0||bn(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");En=e}}),wn.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},wn.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||bn(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},wn.prototype.getMaxListeners=function(){return On(this)},wn.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[e];if(void 0===a)return!1;if("function"==typeof a)_n(a,this,t);else{var c=a.length,u=kn(a,c);for(n=0;n<c;++n)_n(u[n],this,t)}return!0},wn.prototype.addListener=function(e,t){return Rn(this,e,t,!1)},wn.prototype.on=wn.prototype.addListener,wn.prototype.prependListener=function(e,t){return Rn(this,e,t,!0)},wn.prototype.once=function(e,t){return Sn(t),this.on(e,In(this,e,t)),this},wn.prototype.prependOnceListener=function(e,t){return Sn(t),this.prependListener(e,In(this,e,t)),this},wn.prototype.removeListener=function(e,t){var n,r,i,o,s;if(Sn(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},wn.prototype.off=wn.prototype.removeListener,wn.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},wn.prototype.listeners=function(e){return Cn(this,e,!0)},wn.prototype.rawListeners=function(e){return Cn(this,e,!1)},wn.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Pn.call(e,t)},wn.prototype.listenerCount=Pn,wn.prototype.eventNames=function(){return this._eventsCount>0?yn(this._events):[]};var An={},Tn={},Mn={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},e.add=function(e,t){return e+t|0},e.sub=function(e,t){return e-t|0},e.rotl=function(e,t){return e<<t|e>>>32-t},e.rotr=function(e,t){return e<<32-t|e>>>t},e.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}}(Mn),Object.defineProperty(Tn,"__esModule",{value:!0});var Ln=Mn;function Un(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>8,t[n+1]=e>>>0,t}function jn(e,t,n){return void 0===t&&(t=new Uint8Array(2)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t}function Dn(e,t){return void 0===t&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function zn(e,t){return void 0===t&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function Bn(e,t){return void 0===t&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function Fn(e,t){return void 0===t&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function Hn(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function $n(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),t[n+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function Vn(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),Hn(e/4294967296>>>0,t,n),Hn(e>>>0,t,n+4),t}function qn(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),$n(e>>>0,t,n),$n(e/4294967296>>>0,t,n+4),t}Tn.readInt16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16},Tn.readUint16BE=function(e,t){return void 0===t&&(t=0),(e[t+0]<<8|e[t+1])>>>0},Tn.readInt16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])<<16>>16},Tn.readUint16LE=function(e,t){return void 0===t&&(t=0),(e[t+1]<<8|e[t])>>>0},Tn.writeUint16BE=Un,Tn.writeInt16BE=Un,Tn.writeUint16LE=jn,Tn.writeInt16LE=jn,Tn.readInt32BE=Dn,Tn.readUint32BE=zn,Tn.readInt32LE=Bn,Tn.readUint32LE=Fn,Tn.writeUint32BE=Hn,Tn.writeInt32BE=Hn,Tn.writeUint32LE=$n,Tn.writeInt32LE=$n,Tn.readInt64BE=function(e,t){void 0===t&&(t=0);var n=Dn(e,t),r=Dn(e,t+4);return 4294967296*n+r-4294967296*(r>>31)},Tn.readUint64BE=function(e,t){return void 0===t&&(t=0),4294967296*zn(e,t)+zn(e,t+4)},Tn.readInt64LE=function(e,t){void 0===t&&(t=0);var n=Bn(e,t);return 4294967296*Bn(e,t+4)+n-4294967296*(n>>31)},Tn.readUint64LE=function(e,t){void 0===t&&(t=0);var n=Fn(e,t);return 4294967296*Fn(e,t+4)+n},Tn.writeUint64BE=Vn,Tn.writeInt64BE=Vn,Tn.writeUint64LE=qn,Tn.writeInt64LE=qn,Tn.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,i=1,o=e/8+n-1;o>=n;o--)r+=t[o]*i,i*=256;return r},Tn.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,i=1,o=n;o<n+e/8;o++)r+=t[o]*i,i*=256;return r},Tn.writeUintBE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!Ln.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,o=e/8+r-1;o>=r;o--)n[o]=t/i&255,i*=256;return n},Tn.writeUintLE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!Ln.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,o=r;o<r+e/8;o++)n[o]=t/i&255,i*=256;return n},Tn.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},Tn.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},Tn.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},Tn.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},Tn.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},Tn.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},Tn.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},Tn.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t};var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e},Object.defineProperty(An,"__esModule",{value:!0});var Kn=Tn,Gn=Wn,Yn=20;function Qn(e,t,n){for(var r=1634760805,i=857760878,o=2036477234,s=1797285236,a=n[3]<<24|n[2]<<16|n[1]<<8|n[0],c=n[7]<<24|n[6]<<16|n[5]<<8|n[4],u=n[11]<<24|n[10]<<16|n[9]<<8|n[8],l=n[15]<<24|n[14]<<16|n[13]<<8|n[12],f=n[19]<<24|n[18]<<16|n[17]<<8|n[16],h=n[23]<<24|n[22]<<16|n[21]<<8|n[20],d=n[27]<<24|n[26]<<16|n[25]<<8|n[24],p=n[31]<<24|n[30]<<16|n[29]<<8|n[28],g=t[3]<<24|t[2]<<16|t[1]<<8|t[0],y=t[7]<<24|t[6]<<16|t[5]<<8|t[4],v=t[11]<<24|t[10]<<16|t[9]<<8|t[8],m=t[15]<<24|t[14]<<16|t[13]<<8|t[12],_=r,b=i,w=o,E=s,S=a,O=c,R=u,x=l,I=f,C=h,P=d,k=p,N=g,A=y,T=v,M=m,L=0;L<Yn;L+=2)S=(S^=I=I+(N=(N^=_=_+S|0)>>>16|N<<16)|0)>>>20|S<<12,O=(O^=C=C+(A=(A^=b=b+O|0)>>>16|A<<16)|0)>>>20|O<<12,R=(R^=P=P+(T=(T^=w=w+R|0)>>>16|T<<16)|0)>>>20|R<<12,x=(x^=k=k+(M=(M^=E=E+x|0)>>>16|M<<16)|0)>>>20|x<<12,R=(R^=P=P+(T=(T^=w=w+R|0)>>>24|T<<8)|0)>>>25|R<<7,x=(x^=k=k+(M=(M^=E=E+x|0)>>>24|M<<8)|0)>>>25|x<<7,O=(O^=C=C+(A=(A^=b=b+O|0)>>>24|A<<8)|0)>>>25|O<<7,S=(S^=I=I+(N=(N^=_=_+S|0)>>>24|N<<8)|0)>>>25|S<<7,O=(O^=P=P+(M=(M^=_=_+O|0)>>>16|M<<16)|0)>>>20|O<<12,R=(R^=k=k+(N=(N^=b=b+R|0)>>>16|N<<16)|0)>>>20|R<<12,x=(x^=I=I+(A=(A^=w=w+x|0)>>>16|A<<16)|0)>>>20|x<<12,S=(S^=C=C+(T=(T^=E=E+S|0)>>>16|T<<16)|0)>>>20|S<<12,x=(x^=I=I+(A=(A^=w=w+x|0)>>>24|A<<8)|0)>>>25|x<<7,S=(S^=C=C+(T=(T^=E=E+S|0)>>>24|T<<8)|0)>>>25|S<<7,R=(R^=k=k+(N=(N^=b=b+R|0)>>>24|N<<8)|0)>>>25|R<<7,O=(O^=P=P+(M=(M^=_=_+O|0)>>>24|M<<8)|0)>>>25|O<<7;Kn.writeUint32LE(_+r|0,e,0),Kn.writeUint32LE(b+i|0,e,4),Kn.writeUint32LE(w+o|0,e,8),Kn.writeUint32LE(E+s|0,e,12),Kn.writeUint32LE(S+a|0,e,16),Kn.writeUint32LE(O+c|0,e,20),Kn.writeUint32LE(R+u|0,e,24),Kn.writeUint32LE(x+l|0,e,28),Kn.writeUint32LE(I+f|0,e,32),Kn.writeUint32LE(C+h|0,e,36),Kn.writeUint32LE(P+d|0,e,40),Kn.writeUint32LE(k+p|0,e,44),Kn.writeUint32LE(N+g|0,e,48),Kn.writeUint32LE(A+y|0,e,52),Kn.writeUint32LE(T+v|0,e,56),Kn.writeUint32LE(M+m|0,e,60)}function Jn(e,t,n,r,i){if(void 0===i&&(i=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length<n.length)throw new Error("ChaCha: destination is shorter than source");var o,s;if(0===i){if(8!==t.length&&12!==t.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");s=(o=new Uint8Array(16)).length-t.length,o.set(t,s)}else{if(16!==t.length)throw new Error("ChaCha nonce with counter must be 16 bytes");o=t,s=i}for(var a=new Uint8Array(64),c=0;c<n.length;c+=64){Qn(a,o,e);for(var u=c;u<c+64&&u<n.length;u++)r[u]=n[u]^a[u-c];Xn(o,0,s)}return Gn.wipe(a),0===i&&Gn.wipe(o),r}function Xn(e,t,n){for(var r=1;n--;)r=r+(255&e[t])|0,e[t]=255&r,r>>>=8,t++;if(r>0)throw new Error("ChaCha: counter overflow")}An.streamXOR=Jn,An.stream=function(e,t,n,r){return void 0===r&&(r=0),Gn.wipe(n),Jn(e,t,n,n,r)};var Zn={},er={};function tr(e,t){if(e.length!==t.length)return 0;for(var n=0,r=0;r<e.length;r++)n|=e[r]^t[r];return 1&n-1>>>8}Object.defineProperty(er,"__esModule",{value:!0}),er.select=function(e,t,n){return~(e-1)&t|e-1&n},er.lessOrEqual=function(e,t){return(0|e)-(0|t)-1>>>31&1},er.compare=tr,er.equal=function(e,t){return 0!==e.length&&0!==t.length&&0!==tr(e,t)},function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=er,n=Wn;e.DIGEST_LENGTH=16;var r=function(){function t(t){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var n=t[0]|t[1]<<8;this._r[0]=8191&n;var r=t[2]|t[3]<<8;this._r[1]=8191&(n>>>13|r<<3);var i=t[4]|t[5]<<8;this._r[2]=7939&(r>>>10|i<<6);var o=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|o<<9);var s=t[8]|t[9]<<8;this._r[4]=255&(o>>>4|s<<12),this._r[5]=s>>>1&8190;var a=t[10]|t[11]<<8;this._r[6]=8191&(s>>>14|a<<2);var c=t[12]|t[13]<<8;this._r[7]=8065&(a>>>11|c<<5);var u=t[14]|t[15]<<8;this._r[8]=8191&(c>>>8|u<<8),this._r[9]=u>>>5&127,this._pad[0]=t[16]|t[17]<<8,this._pad[1]=t[18]|t[19]<<8,this._pad[2]=t[20]|t[21]<<8,this._pad[3]=t[22]|t[23]<<8,this._pad[4]=t[24]|t[25]<<8,this._pad[5]=t[26]|t[27]<<8,this._pad[6]=t[28]|t[29]<<8,this._pad[7]=t[30]|t[31]<<8}return t.prototype._blocks=function(e,t,n){for(var r=this._fin?0:2048,i=this._h[0],o=this._h[1],s=this._h[2],a=this._h[3],c=this._h[4],u=this._h[5],l=this._h[6],f=this._h[7],h=this._h[8],d=this._h[9],p=this._r[0],g=this._r[1],y=this._r[2],v=this._r[3],m=this._r[4],_=this._r[5],b=this._r[6],w=this._r[7],E=this._r[8],S=this._r[9];n>=16;){var O=e[t+0]|e[t+1]<<8;i+=8191&O;var R=e[t+2]|e[t+3]<<8;o+=8191&(O>>>13|R<<3);var x=e[t+4]|e[t+5]<<8;s+=8191&(R>>>10|x<<6);var I=e[t+6]|e[t+7]<<8;a+=8191&(x>>>7|I<<9);var C=e[t+8]|e[t+9]<<8;c+=8191&(I>>>4|C<<12),u+=C>>>1&8191;var P=e[t+10]|e[t+11]<<8;l+=8191&(C>>>14|P<<2);var k=e[t+12]|e[t+13]<<8;f+=8191&(P>>>11|k<<5);var N=e[t+14]|e[t+15]<<8,A=0,T=A;T+=i*p,T+=o*(5*S),T+=s*(5*E),T+=a*(5*w),A=(T+=c*(5*b))>>>13,T&=8191,T+=u*(5*_),T+=l*(5*m),T+=f*(5*v),T+=(h+=8191&(k>>>8|N<<8))*(5*y);var M=A+=(T+=(d+=N>>>5|r)*(5*g))>>>13;M+=i*g,M+=o*p,M+=s*(5*S),M+=a*(5*E),A=(M+=c*(5*w))>>>13,M&=8191,M+=u*(5*b),M+=l*(5*_),M+=f*(5*m),M+=h*(5*v),A+=(M+=d*(5*y))>>>13,M&=8191;var L=A;L+=i*y,L+=o*g,L+=s*p,L+=a*(5*S),A=(L+=c*(5*E))>>>13,L&=8191,L+=u*(5*w),L+=l*(5*b),L+=f*(5*_),L+=h*(5*m);var U=A+=(L+=d*(5*v))>>>13;U+=i*v,U+=o*y,U+=s*g,U+=a*p,A=(U+=c*(5*S))>>>13,U&=8191,U+=u*(5*E),U+=l*(5*w),U+=f*(5*b),U+=h*(5*_);var j=A+=(U+=d*(5*m))>>>13;j+=i*m,j+=o*v,j+=s*y,j+=a*g,A=(j+=c*p)>>>13,j&=8191,j+=u*(5*S),j+=l*(5*E),j+=f*(5*w),j+=h*(5*b);var D=A+=(j+=d*(5*_))>>>13;D+=i*_,D+=o*m,D+=s*v,D+=a*y,A=(D+=c*g)>>>13,D&=8191,D+=u*p,D+=l*(5*S),D+=f*(5*E),D+=h*(5*w);var z=A+=(D+=d*(5*b))>>>13;z+=i*b,z+=o*_,z+=s*m,z+=a*v,A=(z+=c*y)>>>13,z&=8191,z+=u*g,z+=l*p,z+=f*(5*S),z+=h*(5*E);var B=A+=(z+=d*(5*w))>>>13;B+=i*w,B+=o*b,B+=s*_,B+=a*m,A=(B+=c*v)>>>13,B&=8191,B+=u*y,B+=l*g,B+=f*p,B+=h*(5*S);var F=A+=(B+=d*(5*E))>>>13;F+=i*E,F+=o*w,F+=s*b,F+=a*_,A=(F+=c*m)>>>13,F&=8191,F+=u*v,F+=l*y,F+=f*g,F+=h*p;var H=A+=(F+=d*(5*S))>>>13;H+=i*S,H+=o*E,H+=s*w,H+=a*b,A=(H+=c*_)>>>13,H&=8191,H+=u*m,H+=l*v,H+=f*y,H+=h*g,i=T=8191&(A=(A=((A+=(H+=d*p)>>>13)<<2)+A|0)+(T&=8191)|0),o=M+=A>>>=13,s=L&=8191,a=U&=8191,c=j&=8191,u=D&=8191,l=z&=8191,f=B&=8191,h=F&=8191,d=H&=8191,t+=16,n-=16}this._h[0]=i,this._h[1]=o,this._h[2]=s,this._h[3]=a,this._h[4]=c,this._h[5]=u,this._h[6]=l,this._h[7]=f,this._h[8]=h,this._h[9]=d},t.prototype.finish=function(e,t){void 0===t&&(t=0);var n,r,i,o,s=new Uint16Array(10);if(this._leftover){for(o=this._leftover,this._buffer[o++]=1;o<16;o++)this._buffer[o]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(n=this._h[1]>>>13,this._h[1]&=8191,o=2;o<10;o++)this._h[o]+=n,n=this._h[o]>>>13,this._h[o]&=8191;for(this._h[0]+=5*n,n=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=n,n=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=n,s[0]=this._h[0]+5,n=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this._h[o]+n,n=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,r=(1^n)-1,o=0;o<10;o++)s[o]&=r;for(r=~r,o=0;o<10;o++)this._h[o]=this._h[o]&r|s[o];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),i=this._h[0]+this._pad[0],this._h[0]=65535&i,o=1;o<8;o++)i=(this._h[o]+this._pad[o]|0)+(i>>>16)|0,this._h[o]=65535&i;return e[t+0]=this._h[0]>>>0,e[t+1]=this._h[0]>>>8,e[t+2]=this._h[1]>>>0,e[t+3]=this._h[1]>>>8,e[t+4]=this._h[2]>>>0,e[t+5]=this._h[2]>>>8,e[t+6]=this._h[3]>>>0,e[t+7]=this._h[3]>>>8,e[t+8]=this._h[4]>>>0,e[t+9]=this._h[4]>>>8,e[t+10]=this._h[5]>>>0,e[t+11]=this._h[5]>>>8,e[t+12]=this._h[6]>>>0,e[t+13]=this._h[6]>>>8,e[t+14]=this._h[7]>>>0,e[t+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(e){var t,n=0,r=e.length;if(this._leftover){(t=16-this._leftover)>r&&(t=r);for(var i=0;i<t;i++)this._buffer[this._leftover+i]=e[n+i];if(r-=t,n+=t,this._leftover+=t,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(r>=16&&(t=r-r%16,this._blocks(e,n,t),n+=t,r-=t),r){for(i=0;i<r;i++)this._buffer[this._leftover+i]=e[n+i];this._leftover+=r}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var e=new Uint8Array(16);return this.finish(e),e},t.prototype.clean=function(){return n.wipe(this._buffer),n.wipe(this._r),n.wipe(this._h),n.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();e.Poly1305=r,e.oneTimeAuth=function(e,t){var n=new r(e);n.update(t);var i=n.digest();return n.clean(),i},e.equal=function(n,r){return n.length===e.DIGEST_LENGTH&&r.length===e.DIGEST_LENGTH&&t.equal(n,r)}}(Zn),function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=An,n=Zn,r=Wn,i=Tn,o=er;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var s=new Uint8Array(16),a=function(){function a(t){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,t.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(t)}return a.prototype.seal=function(e,n,i,o){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var s=new Uint8Array(16);s.set(e,s.length-e.length);var a=new Uint8Array(32);t.stream(this._key,s,a,4);var c,u=n.length+this.tagLength;if(o){if(o.length!==u)throw new Error("ChaCha20Poly1305: incorrect destination length");c=o}else c=new Uint8Array(u);return t.streamXOR(this._key,s,n,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),a,c.subarray(0,c.length-this.tagLength),i),r.wipe(s),c},a.prototype.open=function(e,n,i,s){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(n.length<this.tagLength)return null;var a=new Uint8Array(16);a.set(e,a.length-e.length);var c=new Uint8Array(32);t.stream(this._key,a,c,4);var u=new Uint8Array(this.tagLength);if(this._authenticate(u,c,n.subarray(0,n.length-this.tagLength),i),!o.equal(u,n.subarray(n.length-this.tagLength,n.length)))return null;var l,f=n.length-this.tagLength;if(s){if(s.length!==f)throw new Error("ChaCha20Poly1305: incorrect destination length");l=s}else l=new Uint8Array(f);return t.streamXOR(this._key,a,n.subarray(0,n.length-this.tagLength),l,4),r.wipe(a),l},a.prototype.clean=function(){return r.wipe(this._key),this},a.prototype._authenticate=function(e,t,o,a){var c=new n.Poly1305(t);a&&(c.update(a),a.length%16>0&&c.update(s.subarray(a.length%16))),c.update(o),o.length%16>0&&c.update(s.subarray(o.length%16));var u=new Uint8Array(8);a&&i.writeUint64LE(a.length,u),c.update(u),i.writeUint64LE(o.length,u),c.update(u);for(var l=c.digest(),f=0;f<l.length;f++)e[f]=l[f];c.clean(),r.wipe(l),r.wipe(u)},a}();e.ChaCha20Poly1305=a}({});var nr={},rr={},ir={};Object.defineProperty(ir,"__esModule",{value:!0}),ir.isSerializableHash=function(e){return void 0!==e.saveState&&void 0!==e.restoreState&&void 0!==e.cleanSavedState},Object.defineProperty(rr,"__esModule",{value:!0});var or=ir,sr=er,ar=Wn,cr=function(){function e(e,t){this._finished=!1,this._inner=new e,this._outer=new e,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var n=new Uint8Array(this.blockSize);t.length>this.blockSize?this._inner.update(t).finish(n).clean():n.set(t);for(var r=0;r<n.length;r++)n[r]^=54;this._inner.update(n);for(r=0;r<n.length;r++)n[r]^=106;this._outer.update(n),or.isSerializableHash(this._inner)&&or.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),ar.wipe(n)}return e.prototype.reset=function(){if(!or.isSerializableHash(this._inner)||!or.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){or.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),or.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(e){return this._inner.update(e),this},e.prototype.finish=function(e){return this._finished?(this._outer.finish(e),this):(this._inner.finish(e),this._outer.update(e.subarray(0,this.digestLength)).finish(e),this._finished=!0,this)},e.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},e.prototype.saveState=function(){if(!or.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(e){if(!or.isSerializableHash(this._inner)||!or.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(e),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(e){if(!or.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(e)},e}();rr.HMAC=cr,rr.hmac=function(e,t,n){var r=new cr(e,t);r.update(n);var i=r.digest();return r.clean(),i},rr.equal=sr.equal,Object.defineProperty(nr,"__esModule",{value:!0});var ur=rr,lr=Wn,fr=function(){function e(e,t,n,r){void 0===n&&(n=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=r;var i=ur.hmac(this._hash,n,t);this._hmac=new ur.HMAC(e,i),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var t=new Uint8Array(e),n=0;n<t.length;n++)this._bufpos===this._buffer.length&&this._fillBuffer(),t[n]=this._buffer[this._bufpos++];return t},e.prototype.clean=function(){this._hmac.clean(),lr.wipe(this._buffer),lr.wipe(this._counter),this._bufpos=0},e}();nr.HKDF=fr;var hr={},dr={},pr={};Object.defineProperty(pr,"__esModule",{value:!0}),pr.BrowserRandomSource=void 0;function gr(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}pr.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&void 0!==e.getRandomValues&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const t=new Uint8Array(e);for(let e=0;e<t.length;e+=65536)this._crypto.getRandomValues(t.subarray(e,e+Math.min(t.length-e,65536)));return t}};var yr={},vr=g(Object.freeze({__proto__:null,default:{}}));Object.defineProperty(yr,"__esModule",{value:!0}),yr.NodeRandomSource=void 0;const mr=Wn;yr.NodeRandomSource=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,void 0!==gr){const e=vr;e&&e.randomBytes&&(this._crypto=e,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)n[e]=t[e];return(0,mr.wipe)(t),n}},Object.defineProperty(dr,"__esModule",{value:!0}),dr.SystemRandomSource=void 0;const _r=pr,br=yr;dr.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new _r.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new br.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(e){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(e)}},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=dr,n=Tn,r=Wn;function i(t,n=e.defaultRandomSource){return n.randomBytes(t)}e.defaultRandomSource=new t.SystemRandomSource,e.randomBytes=i,e.randomUint32=function(t=e.defaultRandomSource){const o=i(4,t),s=(0,n.readUint32LE)(o);return(0,r.wipe)(o),s};const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function s(t,n=o,s=e.defaultRandomSource){if(n.length<2)throw new Error("randomString charset is too short");if(n.length>256)throw new Error("randomString charset is too long");let a="";const c=n.length,u=256-256%c;for(;t>0;){const e=i(Math.ceil(256*t/u),s);for(let r=0;r<e.length&&t>0;r++){const i=e[r];i<u&&(a+=n.charAt(i%c),t--)}(0,r.wipe)(e)}return a}e.randomString=s,e.randomStringForEntropy=function(t,n=o,r=e.defaultRandomSource){return s(Math.ceil(t/(Math.log(n.length)/Math.LN2)),n,r)}}(hr);!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Tn,n=Wn;e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var r=function(){function r(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return r.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},r.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},r.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._temp),this.reset()},r.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&t>0;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=o(this._temp,this._state,e,n,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[n++],t--;return this},r.prototype.finish=function(e){if(!this._finished){var n=this._bytesHashed,r=this._bufferLength,i=n/536870912|0,s=n<<3,a=n%64<56?64:128;this._buffer[r]=128;for(var c=r+1;c<a-8;c++)this._buffer[c]=0;t.writeUint32BE(i,this._buffer,a-8),t.writeUint32BE(s,this._buffer,a-4),o(this._temp,this._state,this._buffer,0,a),this._finished=!0}for(c=0;c<this.digestLength/4;c++)t.writeUint32BE(this._state[c],e,4*c);return this},r.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},r.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},r.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},r.prototype.cleanSavedState=function(e){n.wipe(e.state),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},r}();e.SHA256=r;var i=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(e,n,r,o,s){for(;s>=64;){for(var a=n[0],c=n[1],u=n[2],l=n[3],f=n[4],h=n[5],d=n[6],p=n[7],g=0;g<16;g++){var y=o+4*g;e[g]=t.readUint32BE(r,y)}for(g=16;g<64;g++){var v=e[g-2],m=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10,_=((v=e[g-15])>>>7|v<<25)^(v>>>18|v<<14)^v>>>3;e[g]=(m+e[g-7]|0)+(_+e[g-16]|0)}for(g=0;g<64;g++){m=(((f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&h^~f&d)|0)+(p+(i[g]+e[g]|0)|0)|0,_=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&c^a&u^c&u)|0;p=d,d=h,h=f,f=l+m|0,l=u,u=c,c=a,a=m+_|0}n[0]+=a,n[1]+=c,n[2]+=u,n[3]+=l,n[4]+=f,n[5]+=h,n[6]+=d,n[7]+=p,o+=64,s-=64}return o}e.hash=function(e){var t=new r;t.update(e);var n=t.digest();return t.clean(),n}}({});!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=hr,n=Wn;function r(e){const t=new Float64Array(16);if(e)for(let n=0;n<e.length;n++)t[n]=e[n];return t}e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;const i=new Uint8Array(32);i[0]=9;const o=r([56129,1]);function s(e){let t=1;for(let n=0;n<16;n++){let r=e[n]+t+65535;t=Math.floor(r/65536),e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function a(e,t,n){const r=~(n-1);for(let n=0;n<16;n++){const i=r&(e[n]^t[n]);e[n]^=i,t[n]^=i}}function c(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]+n[r]}function u(e,t,n){for(let r=0;r<16;r++)e[r]=t[r]-n[r]}function l(e,t,n){let r,i,o=0,s=0,a=0,c=0,u=0,l=0,f=0,h=0,d=0,p=0,g=0,y=0,v=0,m=0,_=0,b=0,w=0,E=0,S=0,O=0,R=0,x=0,I=0,C=0,P=0,k=0,N=0,A=0,T=0,M=0,L=0,U=n[0],j=n[1],D=n[2],z=n[3],B=n[4],F=n[5],H=n[6],$=n[7],V=n[8],q=n[9],W=n[10],K=n[11],G=n[12],Y=n[13],Q=n[14],J=n[15];r=t[0],o+=r*U,s+=r*j,a+=r*D,c+=r*z,u+=r*B,l+=r*F,f+=r*H,h+=r*$,d+=r*V,p+=r*q,g+=r*W,y+=r*K,v+=r*G,m+=r*Y,_+=r*Q,b+=r*J,r=t[1],s+=r*U,a+=r*j,c+=r*D,u+=r*z,l+=r*B,f+=r*F,h+=r*H,d+=r*$,p+=r*V,g+=r*q,y+=r*W,v+=r*K,m+=r*G,_+=r*Y,b+=r*Q,w+=r*J,r=t[2],a+=r*U,c+=r*j,u+=r*D,l+=r*z,f+=r*B,h+=r*F,d+=r*H,p+=r*$,g+=r*V,y+=r*q,v+=r*W,m+=r*K,_+=r*G,b+=r*Y,w+=r*Q,E+=r*J,r=t[3],c+=r*U,u+=r*j,l+=r*D,f+=r*z,h+=r*B,d+=r*F,p+=r*H,g+=r*$,y+=r*V,v+=r*q,m+=r*W,_+=r*K,b+=r*G,w+=r*Y,E+=r*Q,S+=r*J,r=t[4],u+=r*U,l+=r*j,f+=r*D,h+=r*z,d+=r*B,p+=r*F,g+=r*H,y+=r*$,v+=r*V,m+=r*q,_+=r*W,b+=r*K,w+=r*G,E+=r*Y,S+=r*Q,O+=r*J,r=t[5],l+=r*U,f+=r*j,h+=r*D,d+=r*z,p+=r*B,g+=r*F,y+=r*H,v+=r*$,m+=r*V,_+=r*q,b+=r*W,w+=r*K,E+=r*G,S+=r*Y,O+=r*Q,R+=r*J,r=t[6],f+=r*U,h+=r*j,d+=r*D,p+=r*z,g+=r*B,y+=r*F,v+=r*H,m+=r*$,_+=r*V,b+=r*q,w+=r*W,E+=r*K,S+=r*G,O+=r*Y,R+=r*Q,x+=r*J,r=t[7],h+=r*U,d+=r*j,p+=r*D,g+=r*z,y+=r*B,v+=r*F,m+=r*H,_+=r*$,b+=r*V,w+=r*q,E+=r*W,S+=r*K,O+=r*G,R+=r*Y,x+=r*Q,I+=r*J,r=t[8],d+=r*U,p+=r*j,g+=r*D,y+=r*z,v+=r*B,m+=r*F,_+=r*H,b+=r*$,w+=r*V,E+=r*q,S+=r*W,O+=r*K,R+=r*G,x+=r*Y,I+=r*Q,C+=r*J,r=t[9],p+=r*U,g+=r*j,y+=r*D,v+=r*z,m+=r*B,_+=r*F,b+=r*H,w+=r*$,E+=r*V,S+=r*q,O+=r*W,R+=r*K,x+=r*G,I+=r*Y,C+=r*Q,P+=r*J,r=t[10],g+=r*U,y+=r*j,v+=r*D,m+=r*z,_+=r*B,b+=r*F,w+=r*H,E+=r*$,S+=r*V,O+=r*q,R+=r*W,x+=r*K,I+=r*G,C+=r*Y,P+=r*Q,k+=r*J,r=t[11],y+=r*U,v+=r*j,m+=r*D,_+=r*z,b+=r*B,w+=r*F,E+=r*H,S+=r*$,O+=r*V,R+=r*q,x+=r*W,I+=r*K,C+=r*G,P+=r*Y,k+=r*Q,N+=r*J,r=t[12],v+=r*U,m+=r*j,_+=r*D,b+=r*z,w+=r*B,E+=r*F,S+=r*H,O+=r*$,R+=r*V,x+=r*q,I+=r*W,C+=r*K,P+=r*G,k+=r*Y,N+=r*Q,A+=r*J,r=t[13],m+=r*U,_+=r*j,b+=r*D,w+=r*z,E+=r*B,S+=r*F,O+=r*H,R+=r*$,x+=r*V,I+=r*q,C+=r*W,P+=r*K,k+=r*G,N+=r*Y,A+=r*Q,T+=r*J,r=t[14],_+=r*U,b+=r*j,w+=r*D,E+=r*z,S+=r*B,O+=r*F,R+=r*H,x+=r*$,I+=r*V,C+=r*q,P+=r*W,k+=r*K,N+=r*G,A+=r*Y,T+=r*Q,M+=r*J,r=t[15],b+=r*U,w+=r*j,E+=r*D,S+=r*z,O+=r*B,R+=r*F,x+=r*H,I+=r*$,C+=r*V,P+=r*q,k+=r*W,N+=r*K,A+=r*G,T+=r*Y,M+=r*Q,L+=r*J,o+=38*w,s+=38*E,a+=38*S,c+=38*O,u+=38*R,l+=38*x,f+=38*I,h+=38*C,d+=38*P,p+=38*k,g+=38*N,y+=38*A,v+=38*T,m+=38*M,_+=38*L,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,r=b+i+65535,i=Math.floor(r/65536),b=r-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=s,e[2]=a,e[3]=c,e[4]=u,e[5]=l,e[6]=f,e[7]=h,e[8]=d,e[9]=p,e[10]=g,e[11]=y,e[12]=v,e[13]=m,e[14]=_,e[15]=b}function f(e,t){l(e,t,t)}function h(e,t){const n=new Uint8Array(32),i=new Float64Array(80),h=r(),d=r(),p=r(),g=r(),y=r(),v=r();for(let t=0;t<31;t++)n[t]=e[t];n[31]=127&e[31]|64,n[0]&=248,function(e,t){for(let n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}(i,t);for(let e=0;e<16;e++)d[e]=i[e];h[0]=g[0]=1;for(let e=254;e>=0;--e){const t=n[e>>>3]>>>(7&e)&1;a(h,d,t),a(p,g,t),c(y,h,p),u(h,h,p),c(p,d,g),u(d,d,g),f(g,y),f(v,h),l(h,p,h),l(p,d,y),c(y,h,p),u(h,h,p),f(d,h),u(p,g,v),l(h,p,o),c(h,h,g),l(p,p,h),l(h,g,v),l(g,d,i),f(d,y),a(h,d,t),a(p,g,t)}for(let e=0;e<16;e++)i[e+16]=h[e],i[e+32]=p[e],i[e+48]=d[e],i[e+64]=g[e];const m=i.subarray(32),_=i.subarray(16);!function(e,t){const n=r();for(let e=0;e<16;e++)n[e]=t[e];for(let e=253;e>=0;e--)f(n,n),2!==e&&4!==e&&l(n,n,t);for(let t=0;t<16;t++)e[t]=n[t]}(m,m),l(_,_,m);const b=new Uint8Array(32);return function(e,t){const n=r(),i=r();for(let e=0;e<16;e++)i[e]=t[e];s(i),s(i),s(i);for(let e=0;e<2;e++){n[0]=i[0]-65517;for(let e=1;e<15;e++)n[e]=i[e]-65535-(n[e-1]>>16&1),n[e-1]&=65535;n[15]=i[15]-32767-(n[14]>>16&1);const e=n[15]>>16&1;n[14]&=65535,a(i,n,1-e)}for(let t=0;t<16;t++)e[2*t]=255&i[t],e[2*t+1]=i[t]>>8}(b,_),b}function d(e){return h(e,i)}function p(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const n=new Uint8Array(t);return{publicKey:d(n),secretKey:n}}e.scalarMult=h,e.scalarMultBase=d,e.generateKeyPairFromSeed=p,e.generateKeyPair=function(e){const r=(0,t.randomBytes)(32,e),i=p(r);return(0,n.wipe)(r),i},e.sharedKey=function(t,n,r=!1){if(t.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(n.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const i=h(t,n);if(r){let e=0;for(let t=0;t<i.length;t++)e|=i[t];if(0===e)throw new Error("X25519: invalid shared key")}return i}}({});var wr=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==n[s])throw new TypeError(o+" is ambiguous");n[s]=i}var a=e.length,c=e.charAt(0),u=Math.log(a)/Math.log(256),l=Math.log(256)/Math.log(a);function f(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var r=0,i=0;e[t]===c;)r++,t++;for(var o=(e.length-t)*u+1>>>0,s=new Uint8Array(o);e[t];){var l=n[e.charCodeAt(t)];if(255===l)return;for(var f=0,h=o-1;(0!==l||f<i)&&-1!==h;h--,f++)l+=a*s[h]>>>0,s[h]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");i=f,t++}if(" "!==e[t]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(r+(o-d)),g=r;d!==o;)p[g++]=s[d++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var n=0,r=0,i=0,o=t.length;i!==o&&0===t[i];)i++,n++;for(var s=(o-i)*l+1>>>0,u=new Uint8Array(s);i!==o;){for(var f=t[i],h=0,d=s-1;(0!==f||h<r)&&-1!==d;d--,h++)f+=256*u[d]>>>0,u[d]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");r=h,i++}for(var p=s-r;p!==s&&0===u[p];)p++;for(var g=c.repeat(n);p<s;++p)g+=e.charAt(u[p]);return g},decodeUnsafe:f,decode:function(e){var n=f(e);if(n)return n;throw new Error(`Non-${t} character`)}}},Er=wr;const Sr=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")};class Or{constructor(e,t,n){this.name=e,this.prefix=t,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Rr{constructor(e,t,n){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=n}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return Ir(this,e)}}class xr{constructor(e){this.decoders=e}or(e){return Ir(this,e)}decode(e){const t=e[0],n=this.decoders[t];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Ir=(e,t)=>new xr({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class Cr{constructor(e,t,n,r){this.name=e,this.prefix=t,this.baseEncode=n,this.baseDecode=r,this.encoder=new Or(e,t,n),this.decoder=new Rr(e,t,r)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Pr=({name:e,prefix:t,encode:n,decode:r})=>new Cr(e,t,n,r),kr=({prefix:e,name:t,alphabet:n})=>{const{encode:r,decode:i}=Er(n,t);return Pr({prefix:e,name:t,encode:r,decode:e=>Sr(i(e))})},Nr=({name:e,prefix:t,bitsPerChar:n,alphabet:r})=>Pr({prefix:t,name:e,encode:e=>((e,t,n)=>{const r="="===t[t.length-1],i=(1<<n)-1;let o="",s=0,a=0;for(let r=0;r<e.length;++r)for(a=a<<8|e[r],s+=8;s>n;)s-=n,o+=t[i&a>>s];if(s&&(o+=t[i&a<<n-s]),r)for(;o.length*n&7;)o+="=";return o})(e,r,n),decode:t=>((e,t,n,r)=>{const i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;const s=new Uint8Array(o*n/8|0);let a=0,c=0,u=0;for(let t=0;t<o;++t){const o=i[e[t]];if(void 0===o)throw new SyntaxError(`Non-${r} character`);c=c<<n|o,a+=n,a>=8&&(a-=8,s[u++]=255&c>>a)}if(a>=n||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s})(t,r,n,e)});Pr({prefix:"\0",name:"identity",encode:e=>(e=>(new TextDecoder).decode(e))(e),decode:e=>(e=>(new TextEncoder).encode(e))(e)});Nr({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});Nr({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});kr({prefix:"9",name:"base10",alphabet:"0123456789"});Nr({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Nr({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});Nr({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Nr({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Nr({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Nr({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Nr({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Nr({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Nr({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Nr({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Nr({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});kr({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),kr({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});kr({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),kr({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});Nr({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Nr({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Nr({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Nr({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});const Ar=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Tr=Ar.reduce(((e,t,n)=>(e[n]=t,e)),[]),Mr=Ar.reduce(((e,t,n)=>(e[t.codePointAt(0)]=n,e)),[]);Pr({prefix:"🚀",name:"base256emoji",encode:function(e){return e.reduce(((e,t)=>e+=Tr[t]),"")},decode:function(e){const t=[];for(const n of e){const e=Mr[n.codePointAt(0)];if(void 0===e)throw new Error(`Non-base256emoji character: ${n}`);t.push(e)}return new Uint8Array(t)}});var Lr=function e(t,n,r){n=n||[];var i=r=r||0;for(;t>=Dr;)n[r++]=255&t|Ur,t/=128;for(;t&jr;)n[r++]=255&t|Ur,t>>>=7;return n[r]=0|t,e.bytes=r-i+1,n},Ur=128,jr=-128,Dr=Math.pow(2,31);var zr=function e(t,n){var r,i=0,o=0,s=n=n||0,a=t.length;do{if(s>=a)throw e.bytes=0,new RangeError("Could not decode varint");r=t[s++],i+=o<28?(r&Fr)<<o:(r&Fr)*Math.pow(2,o),o+=7}while(r>=Br);return e.bytes=s-n,i},Br=128,Fr=127;var Hr=Math.pow(2,7),$r=Math.pow(2,14),Vr=Math.pow(2,21),qr=Math.pow(2,28),Wr=Math.pow(2,35),Kr=Math.pow(2,42),Gr=Math.pow(2,49),Yr=Math.pow(2,56),Qr=Math.pow(2,63),Jr={encode:Lr,decode:zr,encodingLength:function(e){return e<Hr?1:e<$r?2:e<Vr?3:e<qr?4:e<Wr?5:e<Kr?6:e<Gr?7:e<Yr?8:e<Qr?9:10}};const Xr=(e,t,n=0)=>(Jr.encode(e,t,n),t),Zr=e=>Jr.encodingLength(e),ei=(e,t)=>{const n=t.byteLength,r=Zr(e),i=r+Zr(n),o=new Uint8Array(i+n);return Xr(e,o,0),Xr(n,o,r),o.set(t,i),new ti(e,n,t,o)};class ti{constructor(e,t,n,r){this.code=e,this.size=t,this.digest=n,this.bytes=r}}const ni=({name:e,code:t,encode:n})=>new ri(e,t,n);class ri{constructor(e,t,n){this.name=e,this.code=t,this.encode=n}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?ei(this.code,t):t.then((e=>ei(this.code,e)))}throw Error("Unknown type, must be binary type")}}const ii=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t));ni({name:"sha2-256",code:18,encode:ii("SHA-256")}),ni({name:"sha2-512",code:19,encode:ii("SHA-512")});new TextEncoder,new TextDecoder;var oi=function(e,t){return oi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},oi(e,t)};
237
237
  /*! *****************************************************************************
238
238
  Copyright (c) Microsoft Corporation.
239
239
 
@@ -325,4 +325,4 @@ PERFORMANCE OF THIS SOFTWARE.
325
325
  * Released under MIT license <https://lodash.com/license>
326
326
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
327
327
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
328
- */gg=vg,yg=vg.exports,function(){var e,n="4.17.21",r=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",c=500,u="__lodash_placeholder__",l=1,f=2,h=4,d=1,p=2,g=1,y=2,v=4,m=8,_=16,b=32,w=64,E=128,S=256,O=512,R=30,x="...",I=800,C=16,P=1,k=2,N=3,A=1/0,T=9007199254740991,M=17976931348623157e292,L=NaN,U=4294967295,j=U-1,D=U>>>1,z=[["ary",E],["bind",g],["bindKey",y],["curry",m],["curryRight",_],["flip",O],["partial",b],["partialRight",w],["rearg",S]],B="[object Arguments]",F="[object Array]",H="[object AsyncFunction]",$="[object Boolean]",V="[object Date]",q="[object DOMException]",W="[object Error]",K="[object Function]",G="[object GeneratorFunction]",Y="[object Map]",Q="[object Number]",J="[object Null]",X="[object Object]",Z="[object Promise]",ee="[object Proxy]",te="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object Symbol]",oe="[object Undefined]",se="[object WeakMap]",ae="[object WeakSet]",ce="[object ArrayBuffer]",ue="[object DataView]",le="[object Float32Array]",fe="[object Float64Array]",he="[object Int8Array]",de="[object Int16Array]",pe="[object Int32Array]",ge="[object Uint8Array]",ye="[object Uint8ClampedArray]",ve="[object Uint16Array]",me="[object Uint32Array]",_e=/\b__p \+= '';/g,be=/\b(__p \+=) '' \+/g,we=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ee=/&(?:amp|lt|gt|quot|#39);/g,Se=/[&<>"']/g,Oe=RegExp(Ee.source),Re=RegExp(Se.source),xe=/<%-([\s\S]+?)%>/g,Ie=/<%([\s\S]+?)%>/g,Ce=/<%=([\s\S]+?)%>/g,Pe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ke=/^\w*$/,Ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ae=/[\\^$.*+?()[\]{}|]/g,Te=RegExp(Ae.source),Me=/^\s+/,Le=/\s/,Ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,je=/\{\n\/\* \[wrapped with (.+)\] \*/,De=/,? & /,ze=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Be=/[()=,{}\[\]\/\s]/,Fe=/\\(\\)?/g,He=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$e=/\w*$/,Ve=/^[-+]0x[0-9a-f]+$/i,qe=/^0b[01]+$/i,We=/^\[object .+?Constructor\]$/,Ke=/^0o[0-7]+$/i,Ge=/^(?:0|[1-9]\d*)$/,Ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qe=/($^)/,Je=/['\n\r\u2028\u2029\\]/g,Xe="\\ud800-\\udfff",Ze="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",et="\\u2700-\\u27bf",tt="a-z\\xdf-\\xf6\\xf8-\\xff",nt="A-Z\\xc0-\\xd6\\xd8-\\xde",rt="\\ufe0e\\ufe0f",it="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ot="['’]",st="["+Xe+"]",at="["+it+"]",ct="["+Ze+"]",ut="\\d+",lt="["+et+"]",ft="["+tt+"]",ht="[^"+Xe+it+ut+et+tt+nt+"]",dt="\\ud83c[\\udffb-\\udfff]",pt="[^"+Xe+"]",gt="(?:\\ud83c[\\udde6-\\uddff]){2}",yt="[\\ud800-\\udbff][\\udc00-\\udfff]",vt="["+nt+"]",mt="\\u200d",_t="(?:"+ft+"|"+ht+")",bt="(?:"+vt+"|"+ht+")",wt="(?:"+ot+"(?:d|ll|m|re|s|t|ve))?",Et="(?:"+ot+"(?:D|LL|M|RE|S|T|VE))?",St="(?:"+ct+"|"+dt+")?",Ot="["+rt+"]?",Rt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",It=Ot+St+"(?:"+mt+"(?:"+[pt,gt,yt].join("|")+")"+Ot+St+")*",Ct="(?:"+[lt,gt,yt].join("|")+")"+It,Pt="(?:"+[pt+ct+"?",ct,gt,yt,st].join("|")+")",kt=RegExp(ot,"g"),Nt=RegExp(ct,"g"),At=RegExp(dt+"(?="+dt+")|"+Pt+It,"g"),Tt=RegExp([vt+"?"+ft+"+"+wt+"(?="+[at,vt,"$"].join("|")+")",bt+"+"+Et+"(?="+[at,vt+_t,"$"].join("|")+")",vt+"?"+_t+"+"+wt,vt+"+"+Et,xt,Rt,ut,Ct].join("|"),"g"),Mt=RegExp("["+mt+Xe+Ze+rt+"]"),Lt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ut=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],jt=-1,Dt={};Dt[le]=Dt[fe]=Dt[he]=Dt[de]=Dt[pe]=Dt[ge]=Dt[ye]=Dt[ve]=Dt[me]=!0,Dt[B]=Dt[F]=Dt[ce]=Dt[$]=Dt[ue]=Dt[V]=Dt[W]=Dt[K]=Dt[Y]=Dt[Q]=Dt[X]=Dt[te]=Dt[ne]=Dt[re]=Dt[se]=!1;var zt={};zt[B]=zt[F]=zt[ce]=zt[ue]=zt[$]=zt[V]=zt[le]=zt[fe]=zt[he]=zt[de]=zt[pe]=zt[Y]=zt[Q]=zt[X]=zt[te]=zt[ne]=zt[re]=zt[ie]=zt[ge]=zt[ye]=zt[ve]=zt[me]=!0,zt[W]=zt[K]=zt[se]=!1;var Bt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Ft={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ht={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},$t={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,qt=parseInt,Wt="object"==typeof t&&t&&t.Object===Object&&t,Kt="object"==typeof self&&self&&self.Object===Object&&self,Gt=Wt||Kt||Function("return this")(),Yt=yg&&!yg.nodeType&&yg,Qt=Yt&&gg&&!gg.nodeType&&gg,Jt=Qt&&Qt.exports===Yt,Xt=Jt&&Wt.process,Zt=function(){try{return Qt&&Qt.require&&Qt.require("util").types||Xt&&Xt.binding&&Xt.binding("util")}catch{}}(),en=Zt&&Zt.isArrayBuffer,tn=Zt&&Zt.isDate,nn=Zt&&Zt.isMap,rn=Zt&&Zt.isRegExp,on=Zt&&Zt.isSet,sn=Zt&&Zt.isTypedArray;function an(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function cn(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function un(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function ln(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function fn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function hn(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function dn(e,t){return!(null==e||!e.length)&&Rn(e,t,0)>-1}function pn(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function gn(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function yn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function vn(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function mn(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function _n(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var bn=Pn("length");function wn(e){return e.split("")}function En(e){return e.match(ze)||[]}function Sn(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function On(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Rn(e,t,n){return t==t?tr(e,t,n):On(e,In,n)}function xn(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function In(e){return e!=e}function Cn(e,t){var n=null==e?0:e.length;return n?Tn(e,t)/n:L}function Pn(t){return function(n){return null==n?e:n[t]}}function kn(t){return function(n){return null==t?e:t[n]}}function Nn(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function An(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Tn(t,n){for(var r,i=-1,o=t.length;++i<o;){var s=n(t[i]);s!==e&&(r=r===e?s:r+s)}return r}function Mn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ln(e,t){return gn(t,(function(t){return[t,e[t]]}))}function Un(e){return e&&e.slice(0,or(e)+1).replace(Me,"")}function jn(e){return function(t){return e(t)}}function Dn(e,t){return gn(t,(function(t){return e[t]}))}function zn(e,t){return e.has(t)}function Bn(e,t){for(var n=-1,r=e.length;++n<r&&Rn(t,e[n],0)>-1;);return n}function Fn(e,t){for(var n=e.length;n--&&Rn(t,e[n],0)>-1;);return n}function Hn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var $n=kn(Bt),Vn=kn(Ft);function qn(e){return"\\"+$t[e]}function Wn(t,n){return null==t?e:t[n]}function Kn(e){return Mt.test(e)}function Gn(e){return Lt.test(e)}function Yn(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function Qn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Jn(e,t){return function(n){return e(t(n))}}function Xn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];(s===t||s===u)&&(e[n]=u,o[i++]=n)}return o}function Zn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function er(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function tr(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function nr(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function rr(e){return Kn(e)?ar(e):bn(e)}function ir(e){return Kn(e)?cr(e):wn(e)}function or(e){for(var t=e.length;t--&&Le.test(e.charAt(t)););return t}var sr=kn(Ht);function ar(e){for(var t=At.lastIndex=0;At.test(e);)++t;return t}function cr(e){return e.match(At)||[]}function ur(e){return e.match(Tt)||[]}var lr=function t(Le){var ze,Xe=(Le=null==Le?Gt:fr.defaults(Gt.Object(),Le,fr.pick(Gt,Ut))).Array,Ze=Le.Date,et=Le.Error,tt=Le.Function,nt=Le.Math,rt=Le.Object,it=Le.RegExp,ot=Le.String,st=Le.TypeError,at=Xe.prototype,ct=tt.prototype,ut=rt.prototype,lt=Le["__core-js_shared__"],ft=ct.toString,ht=ut.hasOwnProperty,dt=0,pt=(ze=/[^.]+$/.exec(lt&&lt.keys&&lt.keys.IE_PROTO||""))?"Symbol(src)_1."+ze:"",gt=ut.toString,yt=ft.call(rt),vt=Gt._,mt=it("^"+ft.call(ht).replace(Ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_t=Jt?Le.Buffer:e,bt=Le.Symbol,wt=Le.Uint8Array,Et=_t?_t.allocUnsafe:e,St=Jn(rt.getPrototypeOf,rt),Ot=rt.create,Rt=ut.propertyIsEnumerable,xt=at.splice,It=bt?bt.isConcatSpreadable:e,Ct=bt?bt.iterator:e,Pt=bt?bt.toStringTag:e,At=function(){try{var e=Gs(rt,"defineProperty");return e({},"",{}),e}catch{}}(),Tt=Le.clearTimeout!==Gt.clearTimeout&&Le.clearTimeout,Mt=Ze&&Ze.now!==Gt.Date.now&&Ze.now,Lt=Le.setTimeout!==Gt.setTimeout&&Le.setTimeout,Bt=nt.ceil,Ft=nt.floor,Ht=rt.getOwnPropertySymbols,$t=_t?_t.isBuffer:e,Wt=Le.isFinite,Kt=at.join,Yt=Jn(rt.keys,rt),Qt=nt.max,Xt=nt.min,Zt=Ze.now,bn=Le.parseInt,wn=nt.random,kn=at.reverse,tr=Gs(Le,"DataView"),ar=Gs(Le,"Map"),cr=Gs(Le,"Promise"),lr=Gs(Le,"Set"),hr=Gs(Le,"WeakMap"),dr=Gs(rt,"create"),pr=hr&&new hr,gr={},yr=Ta(tr),vr=Ta(ar),mr=Ta(cr),_r=Ta(lr),br=Ta(hr),wr=bt?bt.prototype:e,Er=wr?wr.valueOf:e,Sr=wr?wr.toString:e;function Or(e){if(xl(e)&&!ul(e)&&!(e instanceof Cr)){if(e instanceof Ir)return e;if(ht.call(e,"__wrapped__"))return La(e)}return new Ir(e)}var Rr=function(){function t(){}return function(n){if(!Rl(n))return{};if(Ot)return Ot(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function xr(){}function Ir(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=e}function Cr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function Pr(){var e=new Cr(this.__wrapped__);return e.__actions__=os(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=os(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=os(this.__views__),e}function kr(){if(this.__filtered__){var e=new Cr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e}function Nr(){var e=this.__wrapped__.value(),t=this.__dir__,n=ul(e),r=t<0,i=n?e.length:0,o=Zs(0,i,this.__views__),s=o.start,a=o.end,c=a-s,u=r?a:s-1,l=this.__iteratees__,f=l.length,h=0,d=Xt(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Bo(e,this.__actions__);var p=[];e:for(;c--&&h<d;){for(var g=-1,y=e[u+=t];++g<f;){var v=l[g],m=v.iteratee,_=v.type,b=m(y);if(_==k)y=b;else if(!b){if(_==P)continue e;break e}}p[h++]=y}return p}function Ar(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Tr(){this.__data__=dr?dr(null):{},this.size=0}function Mr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Lr(t){var n=this.__data__;if(dr){var r=n[t];return r===a?e:r}return ht.call(n,t)?n[t]:e}function Ur(t){var n=this.__data__;return dr?n[t]!==e:ht.call(n,t)}function jr(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=dr&&n===e?a:n,this}function Dr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zr(){this.__data__=[],this.size=0}function Br(e){var t=this.__data__,n=fi(t,e);return!(n<0||(n==t.length-1?t.pop():xt.call(t,n,1),--this.size,0))}function Fr(t){var n=this.__data__,r=fi(n,t);return r<0?e:n[r][1]}function Hr(e){return fi(this.__data__,e)>-1}function $r(e,t){var n=this.__data__,r=fi(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Vr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qr(){this.size=0,this.__data__={hash:new Ar,map:new(ar||Dr),string:new Ar}}function Wr(e){var t=Ws(this,e).delete(e);return this.size-=t?1:0,t}function Kr(e){return Ws(this,e).get(e)}function Gr(e){return Ws(this,e).has(e)}function Yr(e,t){var n=Ws(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Qr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Vr;++t<n;)this.add(e[t])}function Jr(e){return this.__data__.set(e,a),this}function Xr(e){return this.__data__.has(e)}function Zr(e){var t=this.__data__=new Dr(e);this.size=t.size}function ei(){this.__data__=new Dr,this.size=0}function ti(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ni(e){return this.__data__.get(e)}function ri(e){return this.__data__.has(e)}function ii(e,t){var n=this.__data__;if(n instanceof Dr){var i=n.__data__;if(!ar||i.length<r-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Vr(i)}return n.set(e,t),this.size=n.size,this}function oi(e,t){var n=ul(e),r=!n&&cl(e),i=!n&&!r&&pl(e),o=!n&&!r&&!i&&Fl(e),s=n||r||i||o,a=s?Mn(e.length,ot):[],c=a.length;for(var u in e)(t||ht.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||aa(u,c)))&&a.push(u);return a}function si(t){var n=t.length;return n?t[_o(0,n-1)]:e}function ai(e,t){return ka(os(e),vi(t,0,e.length))}function ci(e){return ka(os(e))}function ui(t,n,r){(r!==e&&!ol(t[n],r)||r===e&&!(n in t))&&gi(t,n,r)}function li(t,n,r){var i=t[n];(!ht.call(t,n)||!ol(i,r)||r===e&&!(n in t))&&gi(t,n,r)}function fi(e,t){for(var n=e.length;n--;)if(ol(e[n][0],t))return n;return-1}function hi(e,t,n,r){return Si(e,(function(e,i,o){t(r,e,n(e),o)})),r}function di(e,t){return e&&ss(t,Of(t),e)}function pi(e,t){return e&&ss(t,Rf(t),e)}function gi(e,t,n){"__proto__"==t&&At?At(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function yi(t,n){for(var r=-1,i=n.length,o=Xe(i),s=null==t;++r<i;)o[r]=s?e:mf(t,n[r]);return o}function vi(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function mi(t,n,r,i,o,s){var a,c=n&l,u=n&f,d=n&h;if(r&&(a=o?r(t,i,o,s):r(t)),a!==e)return a;if(!Rl(t))return t;var p=ul(t);if(p){if(a=na(t),!c)return os(t,a)}else{var g=Xs(t),y=g==K||g==G;if(pl(t))return Yo(t,c);if(g==X||g==B||y&&!o){if(a=u||y?{}:ra(t),!c)return u?cs(t,pi(a,t)):as(t,di(a,t))}else{if(!zt[g])return o?t:{};a=ia(t,g,c)}}s||(s=new Zr);var v=s.get(t);if(v)return v;s.set(t,a),Dl(t)?t.forEach((function(e){a.add(mi(e,n,r,e,t,s))})):Il(t)&&t.forEach((function(e,i){a.set(i,mi(e,n,r,i,t,s))}));var m=p?e:(d?u?Fs:Bs:u?Rf:Of)(t);return un(m||t,(function(e,i){m&&(e=t[i=e]),li(a,i,mi(e,n,r,i,t,s))})),a}function _i(e){var t=Of(e);return function(n){return bi(n,e,t)}}function bi(t,n,r){var i=r.length;if(null==t)return!i;for(t=rt(t);i--;){var o=r[i],s=n[o],a=t[o];if(a===e&&!(o in t)||!s(a))return!1}return!0}function wi(t,n,r){if("function"!=typeof t)throw new st(o);return xa((function(){t.apply(e,r)}),n)}function Ei(e,t,n,i){var o=-1,s=dn,a=!0,c=e.length,u=[],l=t.length;if(!c)return u;n&&(t=gn(t,jn(n))),i?(s=pn,a=!1):t.length>=r&&(s=zn,a=!1,t=new Qr(t));e:for(;++o<c;){var f=e[o],h=null==n?f:n(f);if(f=i||0!==f?f:0,a&&h==h){for(var d=l;d--;)if(t[d]===h)continue e;u.push(f)}else s(t,h,i)||u.push(f)}return u}Or.templateSettings={escape:xe,evaluate:Ie,interpolate:Ce,variable:"",imports:{_:Or}},Or.prototype=xr.prototype,Or.prototype.constructor=Or,Ir.prototype=Rr(xr.prototype),Ir.prototype.constructor=Ir,Cr.prototype=Rr(xr.prototype),Cr.prototype.constructor=Cr,Ar.prototype.clear=Tr,Ar.prototype.delete=Mr,Ar.prototype.get=Lr,Ar.prototype.has=Ur,Ar.prototype.set=jr,Dr.prototype.clear=zr,Dr.prototype.delete=Br,Dr.prototype.get=Fr,Dr.prototype.has=Hr,Dr.prototype.set=$r,Vr.prototype.clear=qr,Vr.prototype.delete=Wr,Vr.prototype.get=Kr,Vr.prototype.has=Gr,Vr.prototype.set=Yr,Qr.prototype.add=Qr.prototype.push=Jr,Qr.prototype.has=Xr,Zr.prototype.clear=ei,Zr.prototype.delete=ti,Zr.prototype.get=ni,Zr.prototype.has=ri,Zr.prototype.set=ii;var Si=fs(Ai),Oi=fs(Ti,!0);function Ri(e,t){var n=!0;return Si(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function xi(t,n,r){for(var i=-1,o=t.length;++i<o;){var s=t[i],a=n(s);if(null!=a&&(c===e?a==a&&!Bl(a):r(a,c)))var c=a,u=s}return u}function Ii(t,n,r,i){var o=t.length;for((r=Yl(r))<0&&(r=-r>o?0:o+r),(i=i===e||i>o?o:Yl(i))<0&&(i+=o),i=r>i?0:Ql(i);r<i;)t[r++]=n;return t}function Ci(e,t){var n=[];return Si(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function Pi(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=sa),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?Pi(a,t-1,n,r,i):yn(i,a):r||(i[i.length]=a)}return i}var ki=hs(),Ni=hs(!0);function Ai(e,t){return e&&ki(e,t,Of)}function Ti(e,t){return e&&Ni(e,t,Of)}function Mi(e,t){return hn(t,(function(t){return El(e[t])}))}function Li(t,n){for(var r=0,i=(n=qo(n,t)).length;null!=t&&r<i;)t=t[Aa(n[r++])];return r&&r==i?t:e}function Ui(e,t,n){var r=t(e);return ul(e)?r:yn(r,n(e))}function ji(t){return null==t?t===e?oe:J:Pt&&Pt in rt(t)?Ys(t):ba(t)}function Di(e,t){return e>t}function zi(e,t){return null!=e&&ht.call(e,t)}function Bi(e,t){return null!=e&&t in rt(e)}function Fi(e,t,n){return e>=Xt(t,n)&&e<Qt(t,n)}function Hi(t,n,r){for(var i=r?pn:dn,o=t[0].length,s=t.length,a=s,c=Xe(s),u=1/0,l=[];a--;){var f=t[a];a&&n&&(f=gn(f,jn(n))),u=Xt(f.length,u),c[a]=!r&&(n||o>=120&&f.length>=120)?new Qr(a&&f):e}f=t[0];var h=-1,d=c[0];e:for(;++h<o&&l.length<u;){var p=f[h],g=n?n(p):p;if(p=r||0!==p?p:0,!(d?zn(d,g):i(l,g,r))){for(a=s;--a;){var y=c[a];if(!(y?zn(y,g):i(t[a],g,r)))continue e}d&&d.push(g),l.push(p)}}return l}function $i(e,t,n,r){return Ai(e,(function(e,i,o){t(r,n(e),i,o)})),r}function Vi(t,n,r){var i=null==(t=Ea(t,n=qo(n,t)))?t:t[Aa(sc(n))];return null==i?e:an(i,t,r)}function qi(e){return xl(e)&&ji(e)==B}function Wi(e){return xl(e)&&ji(e)==ce}function Ki(e){return xl(e)&&ji(e)==V}function Gi(e,t,n,r,i){return e===t||(null==e||null==t||!xl(e)&&!xl(t)?e!=e&&t!=t:Yi(e,t,n,r,Gi,i))}function Yi(e,t,n,r,i,o){var s=ul(e),a=ul(t),c=s?F:Xs(e),u=a?F:Xs(t),l=(c=c==B?X:c)==X,f=(u=u==B?X:u)==X,h=c==u;if(h&&pl(e)){if(!pl(t))return!1;s=!0,l=!1}if(h&&!l)return o||(o=new Zr),s||Fl(e)?Us(e,t,n,r,i,o):js(e,t,c,n,r,i,o);if(!(n&d)){var p=l&&ht.call(e,"__wrapped__"),g=f&&ht.call(t,"__wrapped__");if(p||g){var y=p?e.value():e,v=g?t.value():t;return o||(o=new Zr),i(y,v,n,r,o)}}return!!h&&(o||(o=new Zr),Ds(e,t,n,r,i,o))}function Qi(e){return xl(e)&&Xs(e)==Y}function Ji(t,n,r,i){var o=r.length,s=o,a=!i;if(null==t)return!s;for(t=rt(t);o--;){var c=r[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<s;){var u=(c=r[o])[0],l=t[u],f=c[1];if(a&&c[2]){if(l===e&&!(u in t))return!1}else{var h=new Zr;if(i)var g=i(l,f,u,t,n,h);if(!(g===e?Gi(f,l,d|p,i,h):g))return!1}}return!0}function Xi(e){return!(!Rl(e)||ha(e))&&(El(e)?mt:We).test(Ta(e))}function Zi(e){return xl(e)&&ji(e)==te}function eo(e){return xl(e)&&Xs(e)==ne}function to(e){return xl(e)&&Ol(e.length)&&!!Dt[ji(e)]}function no(e){return"function"==typeof e?e:null==e?Ah:"object"==typeof e?ul(e)?co(e[0],e[1]):ao(e):qh(e)}function ro(e){if(!pa(e))return Yt(e);var t=[];for(var n in rt(e))ht.call(e,n)&&"constructor"!=n&&t.push(n);return t}function io(e){if(!Rl(e))return _a(e);var t=pa(e),n=[];for(var r in e)"constructor"==r&&(t||!ht.call(e,r))||n.push(r);return n}function oo(e,t){return e<t}function so(e,t){var n=-1,r=fl(e)?Xe(e.length):[];return Si(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function ao(e){var t=Ks(e);return 1==t.length&&t[0][2]?ya(t[0][0],t[0][1]):function(n){return n===e||Ji(n,e,t)}}function co(t,n){return ua(t)&&ga(n)?ya(Aa(t),n):function(r){var i=mf(r,t);return i===e&&i===n?bf(r,t):Gi(n,i,d|p)}}function uo(t,n,r,i,o){t!==n&&ki(n,(function(s,a){if(o||(o=new Zr),Rl(s))lo(t,n,a,r,uo,i,o);else{var c=i?i(Oa(t,a),s,a+"",t,n,o):e;c===e&&(c=s),ui(t,a,c)}}),Rf)}function lo(t,n,r,i,o,s,a){var c=Oa(t,r),u=Oa(n,r),l=a.get(u);if(l)ui(t,r,l);else{var f=s?s(c,u,r+"",t,n,a):e,h=f===e;if(h){var d=ul(u),p=!d&&pl(u),g=!d&&!p&&Fl(u);f=u,d||p||g?ul(c)?f=c:hl(c)?f=os(c):p?(h=!1,f=Yo(u,!0)):g?(h=!1,f=es(u,!0)):f=[]:Ll(u)||cl(u)?(f=c,cl(c)?f=Xl(c):(!Rl(c)||El(c))&&(f=ra(u))):h=!1}h&&(a.set(u,f),o(f,u,i,s,a),a.delete(u)),ui(t,r,f)}}function fo(t,n){var r=t.length;if(r)return aa(n+=n<0?r:0,r)?t[n]:e}function ho(e,t,n){t=t.length?gn(t,(function(e){return ul(e)?function(t){return Li(t,1===e.length?e[0]:e)}:e})):[Ah];var r=-1;t=gn(t,jn(qs()));var i=so(e,(function(e,n,i){var o=gn(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return An(i,(function(e,t){return ns(e,t,n)}))}function po(e,t){return go(e,t,(function(t,n){return bf(e,n)}))}function go(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Li(e,s);n(a,s)&&Ro(o,qo(s,e),a)}return o}function yo(e){return function(t){return Li(t,e)}}function vo(e,t,n,r){var i=r?xn:Rn,o=-1,s=t.length,a=e;for(e===t&&(t=os(t)),n&&(a=gn(e,jn(n)));++o<s;)for(var c=0,u=t[o],l=n?n(u):u;(c=i(a,l,c,r))>-1;)a!==e&&xt.call(a,c,1),xt.call(e,c,1);return e}function mo(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;aa(i)?xt.call(e,i,1):jo(e,i)}}return e}function _o(e,t){return e+Ft(wn()*(t-e+1))}function bo(e,t,n,r){for(var i=-1,o=Qt(Bt((t-e)/(n||1)),0),s=Xe(o);o--;)s[r?o:++i]=e,e+=n;return s}function wo(e,t){var n="";if(!e||t<1||t>T)return n;do{t%2&&(n+=e),(t=Ft(t/2))&&(e+=e)}while(t);return n}function Eo(e,t){return Ia(wa(e,t,Ah),e+"")}function So(e){return si($f(e))}function Oo(e,t){var n=$f(e);return ka(n,vi(t,0,n.length))}function Ro(t,n,r,i){if(!Rl(t))return t;for(var o=-1,s=(n=qo(n,t)).length,a=s-1,c=t;null!=c&&++o<s;){var u=Aa(n[o]),l=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(o!=a){var f=c[u];(l=i?i(f,u,c):e)===e&&(l=Rl(f)?f:aa(n[o+1])?[]:{})}li(c,u,l),c=c[u]}return t}var xo=pr?function(e,t){return pr.set(e,t),e}:Ah,Io=At?function(e,t){return At(e,"toString",{configurable:!0,enumerable:!1,value:Ch(t),writable:!0})}:Ah;function Co(e){return ka($f(e))}function Po(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Xe(i);++r<i;)o[r]=e[r+t];return o}function ko(e,t){var n;return Si(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function No(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=D){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!Bl(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return Ao(e,t,Ah,n)}function Ao(t,n,r,i){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(n=r(n))!=n,c=null===n,u=Bl(n),l=n===e;o<s;){var f=Ft((o+s)/2),h=r(t[f]),d=h!==e,p=null===h,g=h==h,y=Bl(h);if(a)var v=i||g;else v=l?g&&(i||d):c?g&&d&&(i||!p):u?g&&d&&!p&&(i||!y):!p&&!y&&(i?h<=n:h<n);v?o=f+1:s=f}return Xt(s,j)}function To(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!ol(a,c)){var c=a;o[i++]=0===s?0:s}}return o}function Mo(e){return"number"==typeof e?e:Bl(e)?L:+e}function Lo(e){if("string"==typeof e)return e;if(ul(e))return gn(e,Lo)+"";if(Bl(e))return Sr?Sr.call(e):"";var t=e+"";return"0"==t&&1/e==-A?"-0":t}function Uo(e,t,n){var i=-1,o=dn,s=e.length,a=!0,c=[],u=c;if(n)a=!1,o=pn;else if(s>=r){var l=t?null:ks(e);if(l)return Zn(l);a=!1,o=zn,u=new Qr}else u=t?[]:c;e:for(;++i<s;){var f=e[i],h=t?t(f):f;if(f=n||0!==f?f:0,a&&h==h){for(var d=u.length;d--;)if(u[d]===h)continue e;t&&u.push(h),c.push(f)}else o(u,h,n)||(u!==c&&u.push(h),c.push(f))}return c}function jo(e,t){return null==(e=Ea(e,t=qo(t,e)))||delete e[Aa(sc(t))]}function Do(e,t,n,r){return Ro(e,t,n(Li(e,t)),r)}function zo(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?Po(e,r?0:o,r?o+1:i):Po(e,r?o+1:0,r?i:o)}function Bo(e,t){var n=e;return n instanceof Cr&&(n=n.value()),vn(t,(function(e,t){return t.func.apply(t.thisArg,yn([e],t.args))}),n)}function Fo(e,t,n){var r=e.length;if(r<2)return r?Uo(e[0]):[];for(var i=-1,o=Xe(r);++i<r;)for(var s=e[i],a=-1;++a<r;)a!=i&&(o[i]=Ei(o[i]||s,e[a],t,n));return Uo(Pi(o,1),t,n)}function Ho(t,n,r){for(var i=-1,o=t.length,s=n.length,a={};++i<o;){var c=i<s?n[i]:e;r(a,t[i],c)}return a}function $o(e){return hl(e)?e:[]}function Vo(e){return"function"==typeof e?e:Ah}function qo(e,t){return ul(e)?e:ua(e,t)?[e]:Na(ef(e))}var Wo=Eo;function Ko(t,n,r){var i=t.length;return r=r===e?i:r,!n&&r>=i?t:Po(t,n,r)}var Go=Tt||function(e){return Gt.clearTimeout(e)};function Yo(e,t){if(t)return e.slice();var n=e.length,r=Et?Et(n):new e.constructor(n);return e.copy(r),r}function Qo(e){var t=new e.constructor(e.byteLength);return new wt(t).set(new wt(e)),t}function Jo(e,t){var n=t?Qo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Xo(e){var t=new e.constructor(e.source,$e.exec(e));return t.lastIndex=e.lastIndex,t}function Zo(e){return Er?rt(Er.call(e)):{}}function es(e,t){var n=t?Qo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ts(t,n){if(t!==n){var r=t!==e,i=null===t,o=t==t,s=Bl(t),a=n!==e,c=null===n,u=n==n,l=Bl(n);if(!c&&!l&&!s&&t>n||s&&a&&u&&!c&&!l||i&&a&&u||!r&&u||!o)return 1;if(!i&&!s&&!l&&t<n||l&&r&&o&&!i&&!s||c&&r&&o||!a&&o||!u)return-1}return 0}function ns(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var c=ts(i[r],o[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}function rs(e,t,n,r){for(var i=-1,o=e.length,s=n.length,a=-1,c=t.length,u=Qt(o-s,0),l=Xe(c+u),f=!r;++a<c;)l[a]=t[a];for(;++i<s;)(f||i<o)&&(l[n[i]]=e[i]);for(;u--;)l[a++]=e[i++];return l}function is(e,t,n,r){for(var i=-1,o=e.length,s=-1,a=n.length,c=-1,u=t.length,l=Qt(o-a,0),f=Xe(l+u),h=!r;++i<l;)f[i]=e[i];for(var d=i;++c<u;)f[d+c]=t[c];for(;++s<a;)(h||i<o)&&(f[d+n[s]]=e[i++]);return f}function os(e,t){var n=-1,r=e.length;for(t||(t=Xe(r));++n<r;)t[n]=e[n];return t}function ss(t,n,r,i){var o=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var c=n[s],u=i?i(r[c],t[c],c,r,t):e;u===e&&(u=t[c]),o?gi(r,c,u):li(r,c,u)}return r}function as(e,t){return ss(e,Qs(e),t)}function cs(e,t){return ss(e,Js(e),t)}function us(e,t){return function(n,r){var i=ul(n)?cn:hi,o=t?t():{};return i(n,e,qs(r,2),o)}}function ls(t){return Eo((function(n,r){var i=-1,o=r.length,s=o>1?r[o-1]:e,a=o>2?r[2]:e;for(s=t.length>3&&"function"==typeof s?(o--,s):e,a&&ca(r[0],r[1],a)&&(s=o<3?e:s,o=1),n=rt(n);++i<o;){var c=r[i];c&&t(n,c,i,s)}return n}))}function fs(e,t){return function(n,r){if(null==n)return n;if(!fl(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=rt(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function hs(e){return function(t,n,r){for(var i=-1,o=rt(t),s=r(t),a=s.length;a--;){var c=s[e?a:++i];if(!1===n(o[c],c,o))break}return t}}function ds(e,t,n){var r=t&g,i=ys(e);function o(){return(this&&this!==Gt&&this instanceof o?i:e).apply(r?n:this,arguments)}return o}function ps(t){return function(n){var r=Kn(n=ef(n))?ir(n):e,i=r?r[0]:n.charAt(0),o=r?Ko(r,1).join(""):n.slice(1);return i[t]()+o}}function gs(e){return function(t){return vn(Sh(Qf(t).replace(kt,"")),e,"")}}function ys(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Rr(e.prototype),r=e.apply(n,t);return Rl(r)?r:n}}function vs(t,n,r){var i=ys(t);function o(){for(var s=arguments.length,a=Xe(s),c=s,u=Vs(o);c--;)a[c]=arguments[c];var l=s<3&&a[0]!==u&&a[s-1]!==u?[]:Xn(a,u);return(s-=l.length)<r?Cs(t,n,bs,o.placeholder,e,a,l,e,e,r-s):an(this&&this!==Gt&&this instanceof o?i:t,this,a)}return o}function ms(t){return function(n,r,i){var o=rt(n);if(!fl(n)){var s=qs(r,3);n=Of(n),r=function(e){return s(o[e],e,o)}}var a=t(n,r,i);return a>-1?o[s?n[a]:a]:e}}function _s(t){return zs((function(n){var r=n.length,i=r,s=Ir.prototype.thru;for(t&&n.reverse();i--;){var a=n[i];if("function"!=typeof a)throw new st(o);if(s&&!c&&"wrapper"==$s(a))var c=new Ir([],!0)}for(i=c?i:r;++i<r;){var u=$s(a=n[i]),l="wrapper"==u?Hs(a):e;c=l&&fa(l[0])&&l[1]==(E|m|b|S)&&!l[4].length&&1==l[9]?c[$s(l[0])].apply(c,l[3]):1==a.length&&fa(a)?c[u]():c.thru(a)}return function(){var e=arguments,t=e[0];if(c&&1==e.length&&ul(t))return c.plant(t).value();for(var i=0,o=r?n[i].apply(this,e):t;++i<r;)o=n[i].call(this,o);return o}}))}function bs(t,n,r,i,o,s,a,c,u,l){var f=n&E,h=n&g,d=n&y,p=n&(m|_),v=n&O,b=d?e:ys(t);function w(){for(var e=arguments.length,g=Xe(e),y=e;y--;)g[y]=arguments[y];if(p)var m=Vs(w),_=Hn(g,m);if(i&&(g=rs(g,i,o,p)),s&&(g=is(g,s,a,p)),e-=_,p&&e<l){var E=Xn(g,m);return Cs(t,n,bs,w.placeholder,r,g,E,c,u,l-e)}var S=h?r:this,O=d?S[t]:t;return e=g.length,c?g=Sa(g,c):v&&e>1&&g.reverse(),f&&u<e&&(g.length=u),this&&this!==Gt&&this instanceof w&&(O=b||ys(O)),O.apply(S,g)}return w}function ws(e,t){return function(n,r){return $i(n,e,t(r),{})}}function Es(t,n){return function(r,i){var o;if(r===e&&i===e)return n;if(r!==e&&(o=r),i!==e){if(o===e)return i;"string"==typeof r||"string"==typeof i?(r=Lo(r),i=Lo(i)):(r=Mo(r),i=Mo(i)),o=t(r,i)}return o}}function Ss(e){return zs((function(t){return t=gn(t,jn(qs())),Eo((function(n){var r=this;return e(t,(function(e){return an(e,r,n)}))}))}))}function Os(t,n){var r=(n=n===e?" ":Lo(n)).length;if(r<2)return r?wo(n,t):n;var i=wo(n,Bt(t/rr(n)));return Kn(n)?Ko(ir(i),0,t).join(""):i.slice(0,t)}function Rs(e,t,n,r){var i=t&g,o=ys(e);function s(){for(var t=-1,a=arguments.length,c=-1,u=r.length,l=Xe(u+a),f=this&&this!==Gt&&this instanceof s?o:e;++c<u;)l[c]=r[c];for(;a--;)l[c++]=arguments[++t];return an(f,i?n:this,l)}return s}function xs(t){return function(n,r,i){return i&&"number"!=typeof i&&ca(n,r,i)&&(r=i=e),n=Gl(n),r===e?(r=n,n=0):r=Gl(r),bo(n,r,i=i===e?n<r?1:-1:Gl(i),t)}}function Is(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Jl(t),n=Jl(n)),e(t,n)}}function Cs(t,n,r,i,o,s,a,c,u,l){var f=n&m;n|=f?b:w,(n&=~(f?w:b))&v||(n&=~(g|y));var h=[t,n,o,f?s:e,f?a:e,f?e:s,f?e:a,c,u,l],d=r.apply(e,h);return fa(t)&&Ra(d,h),d.placeholder=i,Ca(d,t,n)}function Ps(e){var t=nt[e];return function(e,n){if(e=Jl(e),(n=null==n?0:Xt(Yl(n),292))&&Wt(e)){var r=(ef(e)+"e").split("e");return+((r=(ef(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var ks=lr&&1/Zn(new lr([,-0]))[1]==A?function(e){return new lr(e)}:Bh;function Ns(e){return function(t){var n=Xs(t);return n==Y?Qn(t):n==ne?er(t):Ln(t,e(t))}}function As(t,n,r,i,s,a,c,u){var l=n&y;if(!l&&"function"!=typeof t)throw new st(o);var f=i?i.length:0;if(f||(n&=~(b|w),i=s=e),c=c===e?c:Qt(Yl(c),0),u=u===e?u:Yl(u),f-=s?s.length:0,n&w){var h=i,d=s;i=s=e}var p=l?e:Hs(t),v=[t,n,r,i,s,h,d,a,c,u];if(p&&ma(v,p),t=v[0],n=v[1],r=v[2],i=v[3],s=v[4],!(u=v[9]=v[9]===e?l?0:t.length:Qt(v[9]-f,0))&&n&(m|_)&&(n&=~(m|_)),n&&n!=g)E=n==m||n==_?vs(t,n,u):n!=b&&n!=(g|b)||s.length?bs.apply(e,v):Rs(t,n,r,i);else var E=ds(t,n,r);return Ca((p?xo:Ra)(E,v),t,n)}function Ts(t,n,r,i){return t===e||ol(t,ut[r])&&!ht.call(i,r)?n:t}function Ms(t,n,r,i,o,s){return Rl(t)&&Rl(n)&&(s.set(n,t),uo(t,n,e,Ms,s),s.delete(n)),t}function Ls(t){return Ll(t)?e:t}function Us(t,n,r,i,o,s){var a=r&d,c=t.length,u=n.length;if(c!=u&&!(a&&u>c))return!1;var l=s.get(t),f=s.get(n);if(l&&f)return l==n&&f==t;var h=-1,g=!0,y=r&p?new Qr:e;for(s.set(t,n),s.set(n,t);++h<c;){var v=t[h],m=n[h];if(i)var _=a?i(m,v,h,n,t,s):i(v,m,h,t,n,s);if(_!==e){if(_)continue;g=!1;break}if(y){if(!_n(n,(function(e,t){if(!zn(y,t)&&(v===e||o(v,e,r,i,s)))return y.push(t)}))){g=!1;break}}else if(v!==m&&!o(v,m,r,i,s)){g=!1;break}}return s.delete(t),s.delete(n),g}function js(e,t,n,r,i,o,s){switch(n){case ue:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ce:return!(e.byteLength!=t.byteLength||!o(new wt(e),new wt(t)));case $:case V:case Q:return ol(+e,+t);case W:return e.name==t.name&&e.message==t.message;case te:case re:return e==t+"";case Y:var a=Qn;case ne:var c=r&d;if(a||(a=Zn),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=p,s.set(e,t);var l=Us(a(e),a(t),r,i,o,s);return s.delete(e),l;case ie:if(Er)return Er.call(e)==Er.call(t)}return!1}function Ds(t,n,r,i,o,s){var a=r&d,c=Bs(t),u=c.length;if(u!=Bs(n).length&&!a)return!1;for(var l=u;l--;){var f=c[l];if(!(a?f in n:ht.call(n,f)))return!1}var h=s.get(t),p=s.get(n);if(h&&p)return h==n&&p==t;var g=!0;s.set(t,n),s.set(n,t);for(var y=a;++l<u;){var v=t[f=c[l]],m=n[f];if(i)var _=a?i(m,v,f,n,t,s):i(v,m,f,t,n,s);if(!(_===e?v===m||o(v,m,r,i,s):_)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var b=t.constructor,w=n.constructor;b!=w&&"constructor"in t&&"constructor"in n&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(g=!1)}return s.delete(t),s.delete(n),g}function zs(t){return Ia(wa(t,e,Ya),t+"")}function Bs(e){return Ui(e,Of,Qs)}function Fs(e){return Ui(e,Rf,Js)}var Hs=pr?function(e){return pr.get(e)}:Bh;function $s(e){for(var t=e.name+"",n=gr[t],r=ht.call(gr,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Vs(e){return(ht.call(Or,"placeholder")?Or:e).placeholder}function qs(){var e=Or.iteratee||Th;return e=e===Th?no:e,arguments.length?e(arguments[0],arguments[1]):e}function Ws(e,t){var n=e.__data__;return la(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ks(e){for(var t=Of(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ga(i)]}return t}function Gs(t,n){var r=Wn(t,n);return Xi(r)?r:e}function Ys(t){var n=ht.call(t,Pt),r=t[Pt];try{t[Pt]=e;var i=!0}catch{}var o=gt.call(t);return i&&(n?t[Pt]=r:delete t[Pt]),o}var Qs=Ht?function(e){return null==e?[]:(e=rt(e),hn(Ht(e),(function(t){return Rt.call(e,t)})))}:Yh,Js=Ht?function(e){for(var t=[];e;)yn(t,Qs(e)),e=St(e);return t}:Yh,Xs=ji;function Zs(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=Xt(t,e+s);break;case"takeRight":e=Qt(e,t-s)}}return{start:e,end:t}}function ea(e){var t=e.match(je);return t?t[1].split(De):[]}function ta(e,t,n){for(var r=-1,i=(t=qo(t,e)).length,o=!1;++r<i;){var s=Aa(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ol(i)&&aa(s,i)&&(ul(e)||cl(e))}function na(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ht.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function ra(e){return"function"!=typeof e.constructor||pa(e)?{}:Rr(St(e))}function ia(e,t,n){var r=e.constructor;switch(t){case ce:return Qo(e);case $:case V:return new r(+e);case ue:return Jo(e,n);case le:case fe:case he:case de:case pe:case ge:case ye:case ve:case me:return es(e,n);case Y:return new r;case Q:case re:return new r(e);case te:return Xo(e);case ne:return new r;case ie:return Zo(e)}}function oa(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Ue,"{\n/* [wrapped with "+t+"] */\n")}function sa(e){return ul(e)||cl(e)||!!(It&&e&&e[It])}function aa(e,t){var n=typeof e;return!!(t=t??T)&&("number"==n||"symbol"!=n&&Ge.test(e))&&e>-1&&e%1==0&&e<t}function ca(e,t,n){if(!Rl(n))return!1;var r=typeof t;return!!("number"==r?fl(n)&&aa(t,n.length):"string"==r&&t in n)&&ol(n[t],e)}function ua(e,t){if(ul(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Bl(e))||ke.test(e)||!Pe.test(e)||null!=t&&e in rt(t)}function la(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function fa(e){var t=$s(e),n=Or[t];if("function"!=typeof n||!(t in Cr.prototype))return!1;if(e===n)return!0;var r=Hs(n);return!!r&&e===r[0]}function ha(e){return!!pt&&pt in e}(tr&&Xs(new tr(new ArrayBuffer(1)))!=ue||ar&&Xs(new ar)!=Y||cr&&Xs(cr.resolve())!=Z||lr&&Xs(new lr)!=ne||hr&&Xs(new hr)!=se)&&(Xs=function(t){var n=ji(t),r=n==X?t.constructor:e,i=r?Ta(r):"";if(i)switch(i){case yr:return ue;case vr:return Y;case mr:return Z;case _r:return ne;case br:return se}return n});var da=lt?El:Qh;function pa(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ut)}function ga(e){return e==e&&!Rl(e)}function ya(t,n){return function(r){return null!=r&&r[t]===n&&(n!==e||t in rt(r))}}function va(e){var t=Fu(e,(function(e){return n.size===c&&n.clear(),e})),n=t.cache;return t}function ma(e,t){var n=e[1],r=t[1],i=n|r,o=i<(g|y|E),s=r==E&&n==m||r==E&&n==S&&e[7].length<=t[8]||r==(E|S)&&t[7].length<=t[8]&&n==m;if(!o&&!s)return e;r&g&&(e[2]=t[2],i|=n&g?0:v);var a=t[3];if(a){var c=e[3];e[3]=c?rs(c,a,t[4]):a,e[4]=c?Xn(e[3],u):t[4]}return(a=t[5])&&(c=e[5],e[5]=c?is(c,a,t[6]):a,e[6]=c?Xn(e[5],u):t[6]),(a=t[7])&&(e[7]=a),r&E&&(e[8]=null==e[8]?t[8]:Xt(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function _a(e){var t=[];if(null!=e)for(var n in rt(e))t.push(n);return t}function ba(e){return gt.call(e)}function wa(t,n,r){return n=Qt(n===e?t.length-1:n,0),function(){for(var e=arguments,i=-1,o=Qt(e.length-n,0),s=Xe(o);++i<o;)s[i]=e[n+i];i=-1;for(var a=Xe(n+1);++i<n;)a[i]=e[i];return a[n]=r(s),an(t,this,a)}}function Ea(e,t){return t.length<2?e:Li(e,Po(t,0,-1))}function Sa(t,n){for(var r=t.length,i=Xt(n.length,r),o=os(t);i--;){var s=n[i];t[i]=aa(s,r)?o[s]:e}return t}function Oa(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ra=Pa(xo),xa=Lt||function(e,t){return Gt.setTimeout(e,t)},Ia=Pa(Io);function Ca(e,t,n){var r=t+"";return Ia(e,oa(r,Ma(ea(r),n)))}function Pa(t){var n=0,r=0;return function(){var i=Zt(),o=C-(i-r);if(r=i,o>0){if(++n>=I)return arguments[0]}else n=0;return t.apply(e,arguments)}}function ka(t,n){var r=-1,i=t.length,o=i-1;for(n=n===e?i:n;++r<n;){var s=_o(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=n,t}var Na=va((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ne,(function(e,n,r,i){t.push(r?i.replace(Fe,"$1"):n||e)})),t}));function Aa(e){if("string"==typeof e||Bl(e))return e;var t=e+"";return"0"==t&&1/e==-A?"-0":t}function Ta(e){if(null!=e){try{return ft.call(e)}catch{}try{return e+""}catch{}}return""}function Ma(e,t){return un(z,(function(n){var r="_."+n[0];t&n[1]&&!dn(e,r)&&e.push(r)})),e.sort()}function La(e){if(e instanceof Cr)return e.clone();var t=new Ir(e.__wrapped__,e.__chain__);return t.__actions__=os(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Ua(t,n,r){n=(r?ca(t,n,r):n===e)?1:Qt(Yl(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,s=0,a=Xe(Bt(i/n));o<i;)a[s++]=Po(t,o,o+=n);return a}function ja(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i}function Da(){var e=arguments.length;if(!e)return[];for(var t=Xe(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return yn(ul(n)?os(n):[n],Pi(t,1))}var za=Eo((function(e,t){return hl(e)?Ei(e,Pi(t,1,hl,!0)):[]})),Ba=Eo((function(t,n){var r=sc(n);return hl(r)&&(r=e),hl(t)?Ei(t,Pi(n,1,hl,!0),qs(r,2)):[]})),Fa=Eo((function(t,n){var r=sc(n);return hl(r)&&(r=e),hl(t)?Ei(t,Pi(n,1,hl,!0),e,r):[]}));function Ha(t,n,r){var i=null==t?0:t.length;return i?Po(t,(n=r||n===e?1:Yl(n))<0?0:n,i):[]}function $a(t,n,r){var i=null==t?0:t.length;return i?Po(t,0,(n=i-(n=r||n===e?1:Yl(n)))<0?0:n):[]}function Va(e,t){return e&&e.length?zo(e,qs(t,3),!0,!0):[]}function qa(e,t){return e&&e.length?zo(e,qs(t,3),!0):[]}function Wa(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&ca(e,t,n)&&(n=0,r=i),Ii(e,t,n,r)):[]}function Ka(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Yl(n);return i<0&&(i=Qt(r+i,0)),On(e,qs(t,3),i)}function Ga(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==e&&(o=Yl(r),o=r<0?Qt(i+o,0):Xt(o,i-1)),On(t,qs(n,3),o,!0)}function Ya(e){return null!=e&&e.length?Pi(e,1):[]}function Qa(e){return null!=e&&e.length?Pi(e,A):[]}function Ja(t,n){return null!=t&&t.length?Pi(t,n=n===e?1:Yl(n)):[]}function Xa(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}function Za(t){return t&&t.length?t[0]:e}function ec(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Yl(n);return i<0&&(i=Qt(r+i,0)),Rn(e,t,i)}function tc(e){return null!=e&&e.length?Po(e,0,-1):[]}var nc=Eo((function(e){var t=gn(e,$o);return t.length&&t[0]===e[0]?Hi(t):[]})),rc=Eo((function(t){var n=sc(t),r=gn(t,$o);return n===sc(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Hi(r,qs(n,2)):[]})),ic=Eo((function(t){var n=sc(t),r=gn(t,$o);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Hi(r,e,n):[]}));function oc(e,t){return null==e?"":Kt.call(e,t)}function sc(t){var n=null==t?0:t.length;return n?t[n-1]:e}function ac(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==e&&(o=(o=Yl(r))<0?Qt(i+o,0):Xt(o,i-1)),n==n?nr(t,n,o):On(t,In,o,!0)}function cc(t,n){return t&&t.length?fo(t,Yl(n)):e}var uc=Eo(lc);function lc(e,t){return e&&e.length&&t&&t.length?vo(e,t):e}function fc(e,t,n){return e&&e.length&&t&&t.length?vo(e,t,qs(n,2)):e}function hc(t,n,r){return t&&t.length&&n&&n.length?vo(t,n,e,r):t}var dc=zs((function(e,t){var n=null==e?0:e.length,r=yi(e,t);return mo(e,gn(t,(function(e){return aa(e,n)?+e:e})).sort(ts)),r}));function pc(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=qs(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return mo(e,i),n}function gc(e){return null==e?e:kn.call(e)}function yc(t,n,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&ca(t,n,r)?(n=0,r=i):(n=null==n?0:Yl(n),r=r===e?i:Yl(r)),Po(t,n,r)):[]}function vc(e,t){return No(e,t)}function mc(e,t,n){return Ao(e,t,qs(n,2))}function _c(e,t){var n=null==e?0:e.length;if(n){var r=No(e,t);if(r<n&&ol(e[r],t))return r}return-1}function bc(e,t){return No(e,t,!0)}function wc(e,t,n){return Ao(e,t,qs(n,2),!0)}function Ec(e,t){if(null!=e&&e.length){var n=No(e,t,!0)-1;if(ol(e[n],t))return n}return-1}function Sc(e){return e&&e.length?To(e):[]}function Oc(e,t){return e&&e.length?To(e,qs(t,2)):[]}function Rc(e){var t=null==e?0:e.length;return t?Po(e,1,t):[]}function xc(t,n,r){return t&&t.length?Po(t,0,(n=r||n===e?1:Yl(n))<0?0:n):[]}function Ic(t,n,r){var i=null==t?0:t.length;return i?Po(t,(n=i-(n=r||n===e?1:Yl(n)))<0?0:n,i):[]}function Cc(e,t){return e&&e.length?zo(e,qs(t,3),!1,!0):[]}function Pc(e,t){return e&&e.length?zo(e,qs(t,3)):[]}var kc=Eo((function(e){return Uo(Pi(e,1,hl,!0))})),Nc=Eo((function(t){var n=sc(t);return hl(n)&&(n=e),Uo(Pi(t,1,hl,!0),qs(n,2))})),Ac=Eo((function(t){var n=sc(t);return n="function"==typeof n?n:e,Uo(Pi(t,1,hl,!0),e,n)}));function Tc(e){return e&&e.length?Uo(e):[]}function Mc(e,t){return e&&e.length?Uo(e,qs(t,2)):[]}function Lc(t,n){return n="function"==typeof n?n:e,t&&t.length?Uo(t,e,n):[]}function Uc(e){if(!e||!e.length)return[];var t=0;return e=hn(e,(function(e){if(hl(e))return t=Qt(e.length,t),!0})),Mn(t,(function(t){return gn(e,Pn(t))}))}function jc(t,n){if(!t||!t.length)return[];var r=Uc(t);return null==n?r:gn(r,(function(t){return an(n,e,t)}))}var Dc=Eo((function(e,t){return hl(e)?Ei(e,t):[]})),zc=Eo((function(e){return Fo(hn(e,hl))})),Bc=Eo((function(t){var n=sc(t);return hl(n)&&(n=e),Fo(hn(t,hl),qs(n,2))})),Fc=Eo((function(t){var n=sc(t);return n="function"==typeof n?n:e,Fo(hn(t,hl),e,n)})),Hc=Eo(Uc);function $c(e,t){return Ho(e||[],t||[],li)}function Vc(e,t){return Ho(e||[],t||[],Ro)}var qc=Eo((function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,jc(t,r)}));function Wc(e){var t=Or(e);return t.__chain__=!0,t}function Kc(e,t){return t(e),e}function Gc(e,t){return t(e)}var Yc=zs((function(t){var n=t.length,r=n?t[0]:0,i=this.__wrapped__,o=function(e){return yi(e,t)};return!(n>1||this.__actions__.length)&&i instanceof Cr&&aa(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:Gc,args:[o],thisArg:e}),new Ir(i,this.__chain__).thru((function(t){return n&&!t.length&&t.push(e),t}))):this.thru(o)}));function Qc(){return Wc(this)}function Jc(){return new Ir(this.value(),this.__chain__)}function Xc(){this.__values__===e&&(this.__values__=Kl(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}}function Zc(){return this}function eu(t){for(var n,r=this;r instanceof xr;){var i=La(r);i.__index__=0,i.__values__=e,n?o.__wrapped__=i:n=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,n}function tu(){var t=this.__wrapped__;if(t instanceof Cr){var n=t;return this.__actions__.length&&(n=new Cr(this)),(n=n.reverse()).__actions__.push({func:Gc,args:[gc],thisArg:e}),new Ir(n,this.__chain__)}return this.thru(gc)}function nu(){return Bo(this.__wrapped__,this.__actions__)}var ru=us((function(e,t,n){ht.call(e,n)?++e[n]:gi(e,n,1)}));function iu(t,n,r){var i=ul(t)?fn:Ri;return r&&ca(t,n,r)&&(n=e),i(t,qs(n,3))}function ou(e,t){return(ul(e)?hn:Ci)(e,qs(t,3))}var su=ms(Ka),au=ms(Ga);function cu(e,t){return Pi(vu(e,t),1)}function uu(e,t){return Pi(vu(e,t),A)}function lu(t,n,r){return r=r===e?1:Yl(r),Pi(vu(t,n),r)}function fu(e,t){return(ul(e)?un:Si)(e,qs(t,3))}function hu(e,t){return(ul(e)?ln:Oi)(e,qs(t,3))}var du=us((function(e,t,n){ht.call(e,n)?e[n].push(t):gi(e,n,[t])}));function pu(e,t,n,r){e=fl(e)?e:$f(e),n=n&&!r?Yl(n):0;var i=e.length;return n<0&&(n=Qt(i+n,0)),zl(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Rn(e,t,n)>-1}var gu=Eo((function(e,t,n){var r=-1,i="function"==typeof t,o=fl(e)?Xe(e.length):[];return Si(e,(function(e){o[++r]=i?an(t,e,n):Vi(e,t,n)})),o})),yu=us((function(e,t,n){gi(e,n,t)}));function vu(e,t){return(ul(e)?gn:so)(e,qs(t,3))}function mu(t,n,r,i){return null==t?[]:(ul(n)||(n=null==n?[]:[n]),ul(r=i?e:r)||(r=null==r?[]:[r]),ho(t,n,r))}var _u=us((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));function bu(e,t,n){var r=ul(e)?vn:Nn,i=arguments.length<3;return r(e,qs(t,4),n,i,Si)}function wu(e,t,n){var r=ul(e)?mn:Nn,i=arguments.length<3;return r(e,qs(t,4),n,i,Oi)}function Eu(e,t){return(ul(e)?hn:Ci)(e,Hu(qs(t,3)))}function Su(e){return(ul(e)?si:So)(e)}function Ou(t,n,r){return n=(r?ca(t,n,r):n===e)?1:Yl(n),(ul(t)?ai:Oo)(t,n)}function Ru(e){return(ul(e)?ci:Co)(e)}function xu(e){if(null==e)return 0;if(fl(e))return zl(e)?rr(e):e.length;var t=Xs(e);return t==Y||t==ne?e.size:ro(e).length}function Iu(t,n,r){var i=ul(t)?_n:ko;return r&&ca(t,n,r)&&(n=e),i(t,qs(n,3))}var Cu=Eo((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ca(e,t[0],t[1])?t=[]:n>2&&ca(t[0],t[1],t[2])&&(t=[t[0]]),ho(e,Pi(t,1),[])})),Pu=Mt||function(){return Gt.Date.now()};function ku(e,t){if("function"!=typeof t)throw new st(o);return e=Yl(e),function(){if(--e<1)return t.apply(this,arguments)}}function Nu(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,As(t,E,e,e,e,e,n)}function Au(t,n){var r;if("function"!=typeof n)throw new st(o);return t=Yl(t),function(){return--t>0&&(r=n.apply(this,arguments)),t<=1&&(n=e),r}}var Tu=Eo((function(e,t,n){var r=g;if(n.length){var i=Xn(n,Vs(Tu));r|=b}return As(e,r,t,n,i)})),Mu=Eo((function(e,t,n){var r=g|y;if(n.length){var i=Xn(n,Vs(Mu));r|=b}return As(t,r,e,n,i)}));function Lu(t,n,r){var i=As(t,m,e,e,e,e,e,n=r?e:n);return i.placeholder=Lu.placeholder,i}function Uu(t,n,r){var i=As(t,_,e,e,e,e,e,n=r?e:n);return i.placeholder=Uu.placeholder,i}function ju(t,n,r){var i,s,a,c,u,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new st(o);function g(n){var r=i,o=s;return i=s=e,f=n,c=t.apply(o,r)}function y(e){return f=e,u=xa(_,n),h?g(e):c}function v(e){var t=n-(e-l);return d?Xt(t,a-(e-f)):t}function m(t){var r=t-l;return l===e||r>=n||r<0||d&&t-f>=a}function _(){var e=Pu();if(m(e))return b(e);u=xa(_,v(e))}function b(t){return u=e,p&&i?g(t):(i=s=e,c)}function w(){u!==e&&Go(u),f=0,i=l=s=u=e}function E(){return u===e?c:b(Pu())}function S(){var t=Pu(),r=m(t);if(i=arguments,s=this,l=t,r){if(u===e)return y(l);if(d)return Go(u),u=xa(_,n),g(l)}return u===e&&(u=xa(_,n)),c}return n=Jl(n)||0,Rl(r)&&(h=!!r.leading,a=(d="maxWait"in r)?Qt(Jl(r.maxWait)||0,n):a,p="trailing"in r?!!r.trailing:p),S.cancel=w,S.flush=E,S}var Du=Eo((function(e,t){return wi(e,1,t)})),zu=Eo((function(e,t,n){return wi(e,Jl(t)||0,n)}));function Bu(e){return As(e,O)}function Fu(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new st(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Fu.Cache||Vr),n}function Hu(e){if("function"!=typeof e)throw new st(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function $u(e){return Au(2,e)}Fu.Cache=Vr;var Vu=Wo((function(e,t){var n=(t=1==t.length&&ul(t[0])?gn(t[0],jn(qs())):gn(Pi(t,1),jn(qs()))).length;return Eo((function(r){for(var i=-1,o=Xt(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return an(e,this,r)}))})),qu=Eo((function(t,n){var r=Xn(n,Vs(qu));return As(t,b,e,n,r)})),Wu=Eo((function(t,n){var r=Xn(n,Vs(Wu));return As(t,w,e,n,r)})),Ku=zs((function(t,n){return As(t,S,e,e,e,n)}));function Gu(t,n){if("function"!=typeof t)throw new st(o);return Eo(t,n=n===e?n:Yl(n))}function Yu(e,t){if("function"!=typeof e)throw new st(o);return t=null==t?0:Qt(Yl(t),0),Eo((function(n){var r=n[t],i=Ko(n,0,t);return r&&yn(i,r),an(e,this,i)}))}function Qu(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new st(o);return Rl(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ju(e,t,{leading:r,maxWait:t,trailing:i})}function Ju(e){return Nu(e,1)}function Xu(e,t){return qu(Vo(t),e)}function Zu(){if(!arguments.length)return[];var e=arguments[0];return ul(e)?e:[e]}function el(e){return mi(e,h)}function tl(t,n){return mi(t,h,n="function"==typeof n?n:e)}function nl(e){return mi(e,l|h)}function rl(t,n){return mi(t,l|h,n="function"==typeof n?n:e)}function il(e,t){return null==t||bi(e,t,Of(t))}function ol(e,t){return e===t||e!=e&&t!=t}var sl=Is(Di),al=Is((function(e,t){return e>=t})),cl=qi(function(){return arguments}())?qi:function(e){return xl(e)&&ht.call(e,"callee")&&!Rt.call(e,"callee")},ul=Xe.isArray,ll=en?jn(en):Wi;function fl(e){return null!=e&&Ol(e.length)&&!El(e)}function hl(e){return xl(e)&&fl(e)}function dl(e){return!0===e||!1===e||xl(e)&&ji(e)==$}var pl=$t||Qh,gl=tn?jn(tn):Ki;function yl(e){return xl(e)&&1===e.nodeType&&!Ll(e)}function vl(e){if(null==e)return!0;if(fl(e)&&(ul(e)||"string"==typeof e||"function"==typeof e.splice||pl(e)||Fl(e)||cl(e)))return!e.length;var t=Xs(e);if(t==Y||t==ne)return!e.size;if(pa(e))return!ro(e).length;for(var n in e)if(ht.call(e,n))return!1;return!0}function ml(e,t){return Gi(e,t)}function _l(t,n,r){var i=(r="function"==typeof r?r:e)?r(t,n):e;return i===e?Gi(t,n,e,r):!!i}function bl(e){if(!xl(e))return!1;var t=ji(e);return t==W||t==q||"string"==typeof e.message&&"string"==typeof e.name&&!Ll(e)}function wl(e){return"number"==typeof e&&Wt(e)}function El(e){if(!Rl(e))return!1;var t=ji(e);return t==K||t==G||t==H||t==ee}function Sl(e){return"number"==typeof e&&e==Yl(e)}function Ol(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=T}function Rl(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xl(e){return null!=e&&"object"==typeof e}var Il=nn?jn(nn):Qi;function Cl(e,t){return e===t||Ji(e,t,Ks(t))}function Pl(t,n,r){return r="function"==typeof r?r:e,Ji(t,n,Ks(n),r)}function kl(e){return Ml(e)&&e!=+e}function Nl(e){if(da(e))throw new et(i);return Xi(e)}function Al(e){return null===e}function Tl(e){return null==e}function Ml(e){return"number"==typeof e||xl(e)&&ji(e)==Q}function Ll(e){if(!xl(e)||ji(e)!=X)return!1;var t=St(e);if(null===t)return!0;var n=ht.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ft.call(n)==yt}var Ul=rn?jn(rn):Zi;function jl(e){return Sl(e)&&e>=-T&&e<=T}var Dl=on?jn(on):eo;function zl(e){return"string"==typeof e||!ul(e)&&xl(e)&&ji(e)==re}function Bl(e){return"symbol"==typeof e||xl(e)&&ji(e)==ie}var Fl=sn?jn(sn):to;function Hl(t){return t===e}function $l(e){return xl(e)&&Xs(e)==se}function Vl(e){return xl(e)&&ji(e)==ae}var ql=Is(oo),Wl=Is((function(e,t){return e<=t}));function Kl(e){if(!e)return[];if(fl(e))return zl(e)?ir(e):os(e);if(Ct&&e[Ct])return Yn(e[Ct]());var t=Xs(e);return(t==Y?Qn:t==ne?Zn:$f)(e)}function Gl(e){return e?(e=Jl(e))===A||e===-A?(e<0?-1:1)*M:e==e?e:0:0===e?e:0}function Yl(e){var t=Gl(e),n=t%1;return t==t?n?t-n:t:0}function Ql(e){return e?vi(Yl(e),0,U):0}function Jl(e){if("number"==typeof e)return e;if(Bl(e))return L;if(Rl(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Rl(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Un(e);var n=qe.test(e);return n||Ke.test(e)?qt(e.slice(2),n?2:8):Ve.test(e)?L:+e}function Xl(e){return ss(e,Rf(e))}function Zl(e){return e?vi(Yl(e),-T,T):0===e?e:0}function ef(e){return null==e?"":Lo(e)}var tf=ls((function(e,t){if(pa(t)||fl(t))ss(t,Of(t),e);else for(var n in t)ht.call(t,n)&&li(e,n,t[n])})),nf=ls((function(e,t){ss(t,Rf(t),e)})),rf=ls((function(e,t,n,r){ss(t,Rf(t),e,r)})),of=ls((function(e,t,n,r){ss(t,Of(t),e,r)})),sf=zs(yi);function af(e,t){var n=Rr(e);return null==t?n:di(n,t)}var cf=Eo((function(t,n){t=rt(t);var r=-1,i=n.length,o=i>2?n[2]:e;for(o&&ca(n[0],n[1],o)&&(i=1);++r<i;)for(var s=n[r],a=Rf(s),c=-1,u=a.length;++c<u;){var l=a[c],f=t[l];(f===e||ol(f,ut[l])&&!ht.call(t,l))&&(t[l]=s[l])}return t})),uf=Eo((function(t){return t.push(e,Ms),an(Pf,e,t)}));function lf(e,t){return Sn(e,qs(t,3),Ai)}function ff(e,t){return Sn(e,qs(t,3),Ti)}function hf(e,t){return null==e?e:ki(e,qs(t,3),Rf)}function df(e,t){return null==e?e:Ni(e,qs(t,3),Rf)}function pf(e,t){return e&&Ai(e,qs(t,3))}function gf(e,t){return e&&Ti(e,qs(t,3))}function yf(e){return null==e?[]:Mi(e,Of(e))}function vf(e){return null==e?[]:Mi(e,Rf(e))}function mf(t,n,r){var i=null==t?e:Li(t,n);return i===e?r:i}function _f(e,t){return null!=e&&ta(e,t,zi)}function bf(e,t){return null!=e&&ta(e,t,Bi)}var wf=ws((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=gt.call(t)),e[t]=n}),Ch(Ah)),Ef=ws((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=gt.call(t)),ht.call(e,t)?e[t].push(n):e[t]=[n]}),qs),Sf=Eo(Vi);function Of(e){return fl(e)?oi(e):ro(e)}function Rf(e){return fl(e)?oi(e,!0):io(e)}function xf(e,t){var n={};return t=qs(t,3),Ai(e,(function(e,r,i){gi(n,t(e,r,i),e)})),n}function If(e,t){var n={};return t=qs(t,3),Ai(e,(function(e,r,i){gi(n,r,t(e,r,i))})),n}var Cf=ls((function(e,t,n){uo(e,t,n)})),Pf=ls((function(e,t,n,r){uo(e,t,n,r)})),kf=zs((function(e,t){var n={};if(null==e)return n;var r=!1;t=gn(t,(function(t){return t=qo(t,e),r||(r=t.length>1),t})),ss(e,Fs(e),n),r&&(n=mi(n,l|f|h,Ls));for(var i=t.length;i--;)jo(n,t[i]);return n}));function Nf(e,t){return Tf(e,Hu(qs(t)))}var Af=zs((function(e,t){return null==e?{}:po(e,t)}));function Tf(e,t){if(null==e)return{};var n=gn(Fs(e),(function(e){return[e]}));return t=qs(t),go(e,n,(function(e,n){return t(e,n[0])}))}function Mf(t,n,r){var i=-1,o=(n=qo(n,t)).length;for(o||(o=1,t=e);++i<o;){var s=null==t?e:t[Aa(n[i])];s===e&&(i=o,s=r),t=El(s)?s.call(t):s}return t}function Lf(e,t,n){return null==e?e:Ro(e,t,n)}function Uf(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Ro(t,n,r,i)}var jf=Ns(Of),Df=Ns(Rf);function zf(e,t,n){var r=ul(e),i=r||pl(e)||Fl(e);if(t=qs(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Rl(e)&&El(o)?Rr(St(e)):{}}return(i?un:Ai)(e,(function(e,r,i){return t(n,e,r,i)})),n}function Bf(e,t){return null==e||jo(e,t)}function Ff(e,t,n){return null==e?e:Do(e,t,Vo(n))}function Hf(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Do(t,n,Vo(r),i)}function $f(e){return null==e?[]:Dn(e,Of(e))}function Vf(e){return null==e?[]:Dn(e,Rf(e))}function qf(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=Jl(r))==r?r:0),n!==e&&(n=(n=Jl(n))==n?n:0),vi(Jl(t),n,r)}function Wf(t,n,r){return n=Gl(n),r===e?(r=n,n=0):r=Gl(r),Fi(t=Jl(t),n,r)}function Kf(t,n,r){if(r&&"boolean"!=typeof r&&ca(t,n,r)&&(n=r=e),r===e&&("boolean"==typeof n?(r=n,n=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&n===e?(t=0,n=1):(t=Gl(t),n===e?(n=t,t=0):n=Gl(n)),t>n){var i=t;t=n,n=i}if(r||t%1||n%1){var o=wn();return Xt(t+o*(n-t+Vt("1e-"+((o+"").length-1))),n)}return _o(t,n)}var Gf=gs((function(e,t,n){return t=t.toLowerCase(),e+(n?Yf(t):t)}));function Yf(e){return Eh(ef(e).toLowerCase())}function Qf(e){return(e=ef(e))&&e.replace(Ye,$n).replace(Nt,"")}function Jf(t,n,r){t=ef(t),n=Lo(n);var i=t.length,o=r=r===e?i:vi(Yl(r),0,i);return(r-=n.length)>=0&&t.slice(r,o)==n}function Xf(e){return(e=ef(e))&&Re.test(e)?e.replace(Se,Vn):e}function Zf(e){return(e=ef(e))&&Te.test(e)?e.replace(Ae,"\\$&"):e}var eh=gs((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),th=gs((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),nh=ps("toLowerCase");function rh(e,t,n){e=ef(e);var r=(t=Yl(t))?rr(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Os(Ft(i),n)+e+Os(Bt(i),n)}function ih(e,t,n){e=ef(e);var r=(t=Yl(t))?rr(e):0;return t&&r<t?e+Os(t-r,n):e}function oh(e,t,n){e=ef(e);var r=(t=Yl(t))?rr(e):0;return t&&r<t?Os(t-r,n)+e:e}function sh(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(ef(e).replace(Me,""),t||0)}function ah(t,n,r){return n=(r?ca(t,n,r):n===e)?1:Yl(n),wo(ef(t),n)}function ch(){var e=arguments,t=ef(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var uh=gs((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));function lh(t,n,r){return r&&"number"!=typeof r&&ca(t,n,r)&&(n=r=e),(r=r===e?U:r>>>0)?(t=ef(t))&&("string"==typeof n||null!=n&&!Ul(n))&&!(n=Lo(n))&&Kn(t)?Ko(ir(t),0,r):t.split(n,r):[]}var fh=gs((function(e,t,n){return e+(n?" ":"")+Eh(t)}));function hh(e,t,n){return e=ef(e),n=null==n?0:vi(Yl(n),0,e.length),t=Lo(t),e.slice(n,n+t.length)==t}function dh(t,n,r){var i=Or.templateSettings;r&&ca(t,n,r)&&(n=e),t=ef(t),n=rf({},n,i,Ts);var o,a,c=rf({},n.imports,i.imports,Ts),u=Of(c),l=Dn(c,u),f=0,h=n.interpolate||Qe,d="__p += '",p=it((n.escape||Qe).source+"|"+h.source+"|"+(h===Ce?He:Qe).source+"|"+(n.evaluate||Qe).source+"|$","g"),g="//# sourceURL="+(ht.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++jt+"]")+"\n";t.replace(p,(function(e,n,r,i,s,c){return r||(r=i),d+=t.slice(f,c).replace(Je,qn),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=c+e.length,e})),d+="';\n";var y=ht.call(n,"variable")&&n.variable;if(y){if(Be.test(y))throw new et(s)}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(_e,""):d).replace(be,"$1").replace(we,"$1;"),d="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Oh((function(){return tt(u,g+"return "+d).apply(e,l)}));if(v.source=d,bl(v))throw v;return v}function ph(e){return ef(e).toLowerCase()}function gh(e){return ef(e).toUpperCase()}function yh(t,n,r){if((t=ef(t))&&(r||n===e))return Un(t);if(!t||!(n=Lo(n)))return t;var i=ir(t),o=ir(n);return Ko(i,Bn(i,o),Fn(i,o)+1).join("")}function vh(t,n,r){if((t=ef(t))&&(r||n===e))return t.slice(0,or(t)+1);if(!t||!(n=Lo(n)))return t;var i=ir(t);return Ko(i,0,Fn(i,ir(n))+1).join("")}function mh(t,n,r){if((t=ef(t))&&(r||n===e))return t.replace(Me,"");if(!t||!(n=Lo(n)))return t;var i=ir(t);return Ko(i,Bn(i,ir(n))).join("")}function _h(t,n){var r=R,i=x;if(Rl(n)){var o="separator"in n?n.separator:o;r="length"in n?Yl(n.length):r,i="omission"in n?Lo(n.omission):i}var s=(t=ef(t)).length;if(Kn(t)){var a=ir(t);s=a.length}if(r>=s)return t;var c=r-rr(i);if(c<1)return i;var u=a?Ko(a,0,c).join(""):t.slice(0,c);if(o===e)return u+i;if(a&&(c+=u.length-c),Ul(o)){if(t.slice(c).search(o)){var l,f=u;for(o.global||(o=it(o.source,ef($e.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;u=u.slice(0,h===e?c:h)}}else if(t.indexOf(Lo(o),c)!=c){var d=u.lastIndexOf(o);d>-1&&(u=u.slice(0,d))}return u+i}function bh(e){return(e=ef(e))&&Oe.test(e)?e.replace(Ee,sr):e}var wh=gs((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Eh=ps("toUpperCase");function Sh(t,n,r){return t=ef(t),(n=r?e:n)===e?Gn(t)?ur(t):En(t):t.match(n)||[]}var Oh=Eo((function(t,n){try{return an(t,e,n)}catch(e){return bl(e)?e:new et(e)}})),Rh=zs((function(e,t){return un(t,(function(t){t=Aa(t),gi(e,t,Tu(e[t],e))})),e}));function xh(e){var t=null==e?0:e.length,n=qs();return e=t?gn(e,(function(e){if("function"!=typeof e[1])throw new st(o);return[n(e[0]),e[1]]})):[],Eo((function(n){for(var r=-1;++r<t;){var i=e[r];if(an(i[0],this,n))return an(i[1],this,n)}}))}function Ih(e){return _i(mi(e,l))}function Ch(e){return function(){return e}}function Ph(e,t){return null==e||e!=e?t:e}var kh=_s(),Nh=_s(!0);function Ah(e){return e}function Th(e){return no("function"==typeof e?e:mi(e,l))}function Mh(e){return ao(mi(e,l))}function Lh(e,t){return co(e,mi(t,l))}var Uh=Eo((function(e,t){return function(n){return Vi(n,e,t)}})),jh=Eo((function(e,t){return function(n){return Vi(e,n,t)}}));function Dh(e,t,n){var r=Of(t),i=Mi(t,r);null==n&&(!Rl(t)||!i.length&&r.length)&&(n=t,t=e,e=this,i=Mi(t,Of(t)));var o=!(Rl(n)&&"chain"in n&&!n.chain),s=El(e);return un(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=os(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,yn([this.value()],arguments))})})),e}function zh(){return Gt._===this&&(Gt._=vt),this}function Bh(){}function Fh(e){return e=Yl(e),Eo((function(t){return fo(t,e)}))}var Hh=Ss(gn),$h=Ss(fn),Vh=Ss(_n);function qh(e){return ua(e)?Pn(Aa(e)):yo(e)}function Wh(t){return function(n){return null==t?e:Li(t,n)}}var Kh=xs(),Gh=xs(!0);function Yh(){return[]}function Qh(){return!1}function Jh(){return{}}function Xh(){return""}function Zh(){return!0}function ed(e,t){if((e=Yl(e))<1||e>T)return[];var n=U,r=Xt(e,U);t=qs(t),e-=U;for(var i=Mn(r,t);++n<e;)t(n);return i}function td(e){return ul(e)?gn(e,Aa):Bl(e)?[e]:os(Na(ef(e)))}function nd(e){var t=++dt;return ef(e)+t}var rd=Es((function(e,t){return e+t}),0),id=Ps("ceil"),od=Es((function(e,t){return e/t}),1),sd=Ps("floor");function ad(t){return t&&t.length?xi(t,Ah,Di):e}function cd(t,n){return t&&t.length?xi(t,qs(n,2),Di):e}function ud(e){return Cn(e,Ah)}function ld(e,t){return Cn(e,qs(t,2))}function fd(t){return t&&t.length?xi(t,Ah,oo):e}function hd(t,n){return t&&t.length?xi(t,qs(n,2),oo):e}var dd=Es((function(e,t){return e*t}),1),pd=Ps("round"),gd=Es((function(e,t){return e-t}),0);function yd(e){return e&&e.length?Tn(e,Ah):0}function vd(e,t){return e&&e.length?Tn(e,qs(t,2)):0}return Or.after=ku,Or.ary=Nu,Or.assign=tf,Or.assignIn=nf,Or.assignInWith=rf,Or.assignWith=of,Or.at=sf,Or.before=Au,Or.bind=Tu,Or.bindAll=Rh,Or.bindKey=Mu,Or.castArray=Zu,Or.chain=Wc,Or.chunk=Ua,Or.compact=ja,Or.concat=Da,Or.cond=xh,Or.conforms=Ih,Or.constant=Ch,Or.countBy=ru,Or.create=af,Or.curry=Lu,Or.curryRight=Uu,Or.debounce=ju,Or.defaults=cf,Or.defaultsDeep=uf,Or.defer=Du,Or.delay=zu,Or.difference=za,Or.differenceBy=Ba,Or.differenceWith=Fa,Or.drop=Ha,Or.dropRight=$a,Or.dropRightWhile=Va,Or.dropWhile=qa,Or.fill=Wa,Or.filter=ou,Or.flatMap=cu,Or.flatMapDeep=uu,Or.flatMapDepth=lu,Or.flatten=Ya,Or.flattenDeep=Qa,Or.flattenDepth=Ja,Or.flip=Bu,Or.flow=kh,Or.flowRight=Nh,Or.fromPairs=Xa,Or.functions=yf,Or.functionsIn=vf,Or.groupBy=du,Or.initial=tc,Or.intersection=nc,Or.intersectionBy=rc,Or.intersectionWith=ic,Or.invert=wf,Or.invertBy=Ef,Or.invokeMap=gu,Or.iteratee=Th,Or.keyBy=yu,Or.keys=Of,Or.keysIn=Rf,Or.map=vu,Or.mapKeys=xf,Or.mapValues=If,Or.matches=Mh,Or.matchesProperty=Lh,Or.memoize=Fu,Or.merge=Cf,Or.mergeWith=Pf,Or.method=Uh,Or.methodOf=jh,Or.mixin=Dh,Or.negate=Hu,Or.nthArg=Fh,Or.omit=kf,Or.omitBy=Nf,Or.once=$u,Or.orderBy=mu,Or.over=Hh,Or.overArgs=Vu,Or.overEvery=$h,Or.overSome=Vh,Or.partial=qu,Or.partialRight=Wu,Or.partition=_u,Or.pick=Af,Or.pickBy=Tf,Or.property=qh,Or.propertyOf=Wh,Or.pull=uc,Or.pullAll=lc,Or.pullAllBy=fc,Or.pullAllWith=hc,Or.pullAt=dc,Or.range=Kh,Or.rangeRight=Gh,Or.rearg=Ku,Or.reject=Eu,Or.remove=pc,Or.rest=Gu,Or.reverse=gc,Or.sampleSize=Ou,Or.set=Lf,Or.setWith=Uf,Or.shuffle=Ru,Or.slice=yc,Or.sortBy=Cu,Or.sortedUniq=Sc,Or.sortedUniqBy=Oc,Or.split=lh,Or.spread=Yu,Or.tail=Rc,Or.take=xc,Or.takeRight=Ic,Or.takeRightWhile=Cc,Or.takeWhile=Pc,Or.tap=Kc,Or.throttle=Qu,Or.thru=Gc,Or.toArray=Kl,Or.toPairs=jf,Or.toPairsIn=Df,Or.toPath=td,Or.toPlainObject=Xl,Or.transform=zf,Or.unary=Ju,Or.union=kc,Or.unionBy=Nc,Or.unionWith=Ac,Or.uniq=Tc,Or.uniqBy=Mc,Or.uniqWith=Lc,Or.unset=Bf,Or.unzip=Uc,Or.unzipWith=jc,Or.update=Ff,Or.updateWith=Hf,Or.values=$f,Or.valuesIn=Vf,Or.without=Dc,Or.words=Sh,Or.wrap=Xu,Or.xor=zc,Or.xorBy=Bc,Or.xorWith=Fc,Or.zip=Hc,Or.zipObject=$c,Or.zipObjectDeep=Vc,Or.zipWith=qc,Or.entries=jf,Or.entriesIn=Df,Or.extend=nf,Or.extendWith=rf,Dh(Or,Or),Or.add=rd,Or.attempt=Oh,Or.camelCase=Gf,Or.capitalize=Yf,Or.ceil=id,Or.clamp=qf,Or.clone=el,Or.cloneDeep=nl,Or.cloneDeepWith=rl,Or.cloneWith=tl,Or.conformsTo=il,Or.deburr=Qf,Or.defaultTo=Ph,Or.divide=od,Or.endsWith=Jf,Or.eq=ol,Or.escape=Xf,Or.escapeRegExp=Zf,Or.every=iu,Or.find=su,Or.findIndex=Ka,Or.findKey=lf,Or.findLast=au,Or.findLastIndex=Ga,Or.findLastKey=ff,Or.floor=sd,Or.forEach=fu,Or.forEachRight=hu,Or.forIn=hf,Or.forInRight=df,Or.forOwn=pf,Or.forOwnRight=gf,Or.get=mf,Or.gt=sl,Or.gte=al,Or.has=_f,Or.hasIn=bf,Or.head=Za,Or.identity=Ah,Or.includes=pu,Or.indexOf=ec,Or.inRange=Wf,Or.invoke=Sf,Or.isArguments=cl,Or.isArray=ul,Or.isArrayBuffer=ll,Or.isArrayLike=fl,Or.isArrayLikeObject=hl,Or.isBoolean=dl,Or.isBuffer=pl,Or.isDate=gl,Or.isElement=yl,Or.isEmpty=vl,Or.isEqual=ml,Or.isEqualWith=_l,Or.isError=bl,Or.isFinite=wl,Or.isFunction=El,Or.isInteger=Sl,Or.isLength=Ol,Or.isMap=Il,Or.isMatch=Cl,Or.isMatchWith=Pl,Or.isNaN=kl,Or.isNative=Nl,Or.isNil=Tl,Or.isNull=Al,Or.isNumber=Ml,Or.isObject=Rl,Or.isObjectLike=xl,Or.isPlainObject=Ll,Or.isRegExp=Ul,Or.isSafeInteger=jl,Or.isSet=Dl,Or.isString=zl,Or.isSymbol=Bl,Or.isTypedArray=Fl,Or.isUndefined=Hl,Or.isWeakMap=$l,Or.isWeakSet=Vl,Or.join=oc,Or.kebabCase=eh,Or.last=sc,Or.lastIndexOf=ac,Or.lowerCase=th,Or.lowerFirst=nh,Or.lt=ql,Or.lte=Wl,Or.max=ad,Or.maxBy=cd,Or.mean=ud,Or.meanBy=ld,Or.min=fd,Or.minBy=hd,Or.stubArray=Yh,Or.stubFalse=Qh,Or.stubObject=Jh,Or.stubString=Xh,Or.stubTrue=Zh,Or.multiply=dd,Or.nth=cc,Or.noConflict=zh,Or.noop=Bh,Or.now=Pu,Or.pad=rh,Or.padEnd=ih,Or.padStart=oh,Or.parseInt=sh,Or.random=Kf,Or.reduce=bu,Or.reduceRight=wu,Or.repeat=ah,Or.replace=ch,Or.result=Mf,Or.round=pd,Or.runInContext=t,Or.sample=Su,Or.size=xu,Or.snakeCase=uh,Or.some=Iu,Or.sortedIndex=vc,Or.sortedIndexBy=mc,Or.sortedIndexOf=_c,Or.sortedLastIndex=bc,Or.sortedLastIndexBy=wc,Or.sortedLastIndexOf=Ec,Or.startCase=fh,Or.startsWith=hh,Or.subtract=gd,Or.sum=yd,Or.sumBy=vd,Or.template=dh,Or.times=ed,Or.toFinite=Gl,Or.toInteger=Yl,Or.toLength=Ql,Or.toLower=ph,Or.toNumber=Jl,Or.toSafeInteger=Zl,Or.toString=ef,Or.toUpper=gh,Or.trim=yh,Or.trimEnd=vh,Or.trimStart=mh,Or.truncate=_h,Or.unescape=bh,Or.uniqueId=nd,Or.upperCase=wh,Or.upperFirst=Eh,Or.each=fu,Or.eachRight=hu,Or.first=Za,Dh(Or,function(){var e={};return Ai(Or,(function(t,n){ht.call(Or.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Or.VERSION=n,un(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Or[e].placeholder=Or})),un(["drop","take"],(function(t,n){Cr.prototype[t]=function(r){r=r===e?1:Qt(Yl(r),0);var i=this.__filtered__&&!n?new Cr(this):this.clone();return i.__filtered__?i.__takeCount__=Xt(r,i.__takeCount__):i.__views__.push({size:Xt(r,U),type:t+(i.__dir__<0?"Right":"")}),i},Cr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),un(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=n==P||n==N;Cr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:qs(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),un(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Cr.prototype[e]=function(){return this[n](1).value()[0]}})),un(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Cr.prototype[e]=function(){return this.__filtered__?new Cr(this):this[n](1)}})),Cr.prototype.compact=function(){return this.filter(Ah)},Cr.prototype.find=function(e){return this.filter(e).head()},Cr.prototype.findLast=function(e){return this.reverse().find(e)},Cr.prototype.invokeMap=Eo((function(e,t){return"function"==typeof e?new Cr(this):this.map((function(n){return Vi(n,e,t)}))})),Cr.prototype.reject=function(e){return this.filter(Hu(qs(e)))},Cr.prototype.slice=function(t,n){t=Yl(t);var r=this;return r.__filtered__&&(t>0||n<0)?new Cr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=Yl(n))<0?r.dropRight(-n):r.take(n-t)),r)},Cr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Cr.prototype.toArray=function(){return this.take(U)},Ai(Cr.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),o=Or[i?"take"+("last"==n?"Right":""):n],s=i||/^find/.test(n);o&&(Or.prototype[n]=function(){var n=this.__wrapped__,a=i?[1]:arguments,c=n instanceof Cr,u=a[0],l=c||ul(n),f=function(e){var t=o.apply(Or,yn([e],a));return i&&h?t[0]:t};l&&r&&"function"==typeof u&&1!=u.length&&(c=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,g=c&&!d;if(!s&&l){n=g?n:new Cr(this);var y=t.apply(n,a);return y.__actions__.push({func:Gc,args:[f],thisArg:e}),new Ir(y,h)}return p&&g?t.apply(this,a):(y=this.thru(f),p?i?y.value()[0]:y.value():y)})})),un(["pop","push","shift","sort","splice","unshift"],(function(e){var t=at[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Or.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ul(i)?i:[],e)}return this[n]((function(n){return t.apply(ul(n)?n:[],e)}))}})),Ai(Cr.prototype,(function(e,t){var n=Or[t];if(n){var r=n.name+"";ht.call(gr,r)||(gr[r]=[]),gr[r].push({name:t,func:n})}})),gr[bs(e,y).name]=[{name:"wrapper",func:e}],Cr.prototype.clone=Pr,Cr.prototype.reverse=kr,Cr.prototype.value=Nr,Or.prototype.at=Yc,Or.prototype.chain=Qc,Or.prototype.commit=Jc,Or.prototype.next=Xc,Or.prototype.plant=eu,Or.prototype.reverse=tu,Or.prototype.toJSON=Or.prototype.valueOf=Or.prototype.value=nu,Or.prototype.first=Or.prototype.head,Ct&&(Or.prototype[Ct]=Zc),Or},fr=lr();Qt?((Qt.exports=fr)._=fr,Yt._=fr):Gt._=fr}.call(t);var mg=Object.defineProperty,_g=Object.defineProperties,bg=Object.getOwnPropertyDescriptors,wg=Object.getOwnPropertySymbols,Eg=Object.prototype.hasOwnProperty,Sg=Object.prototype.propertyIsEnumerable,Og=(e,t,n)=>t in e?mg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rg=(e,t)=>{for(var n in t||(t={}))Eg.call(t,n)&&Og(e,n,t[n]);if(wg)for(var n of wg(t))Sg.call(t,n)&&Og(e,n,t[n]);return e},xg=(e,t)=>_g(e,bg(t));function Ig(e,t,n){let r;const i=Cg(e);return t.rpcMap&&(r=t.rpcMap[i]),r||(r=`${dg}?chainId=eip155:${i}&projectId=${n}`),r}function Cg(e){return e.includes("eip155")?Number(e.split(":")[1]):Number(e)}function Pg(e,t){if(!t.includes(e))throw new Error(`Chain '${e}' not approved. Please use one of the following: ${t.toString()}`)}function kg(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}function Ng(e,t){const n=Object.keys(t.namespaces).filter((t=>t.includes(e)));if(!n.length)return[];const r=[];return n.forEach((e=>{const n=t.namespaces[e].accounts;r.push(...n)})),r}function Ag(e,t={}){const n=Tg(e),r=Tg(t);return vg.exports.merge(n,r)}function Tg(e){var t,n,r,i;const o={};if(!gu(e))return o;for(const[s,a]of Object.entries(e)){const e=cu(s)?[s]:a.chains,c=a.methods||[],u=a.events||[],l=a.rpcMap||{},f=uu(s);o[f]=xg(Rg(Rg({},o[f]),a),{chains:Fc(e,null==(t=o[f])?void 0:t.chains),methods:Fc(c,null==(n=o[f])?void 0:n.methods),events:Fc(u,null==(r=o[f])?void 0:r.events),rpcMap:Rg(Rg({},l),null==(i=o[f])?void 0:i.rpcMap)})}return o}const Mg={},Lg=e=>Mg[e],Ug=(e,t)=>{Mg[e]=t};var jg={exports:{}};!function(e,n){var r,i=typeof self<"u"?self:t,o=function(){function e(){this.fetch=!1,this.DOMException=i.DOMException}return e.prototype=i,new e}();r=o,function(e){var t={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function n(e){return e&&DataView.prototype.isPrototypeOf(e)}if(t.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function c(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(n[Symbol.iterator]=function(){return n}),n}function u(e){this.map={},e instanceof u?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function h(e){var t=new FileReader,n=f(t);return t.readAsArrayBuffer(e),n}function d(e){var t=new FileReader,n=f(t);return t.readAsText(e),n}function p(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:t.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:t.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():t.arrayBuffer&&t.blob&&n(e)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return d(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(p(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},t.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(e,t){e=s(e),t=a(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},u.prototype.delete=function(e){delete this.map[s(e)]},u.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},u.prototype.set=function(e,t){this.map[s(e)]=a(t)},u.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},u.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),c(e)},u.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),c(e)},u.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),c(e)},t.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(e){var t=e.toUpperCase();return v.indexOf(t)>-1?t:e}function _(e,t){var n=(t=t||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!n&&null!=e._bodyInit&&(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new u(t.headers)),this.method=m(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function w(e){var t=new u;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},y.call(_.prototype),y.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];E.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},e.DOMException=r.DOMException;try{new e.DOMException}catch{e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function O(n,r){return new Promise((function(i,o){var s=new _(n,r);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:w(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var t="response"in a?a.response:a.responseText;i(new E(t,e))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&t.blob&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(typeof s._bodyInit>"u"?null:s._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=u,r.Request=_,r.Response=E),e.Headers=u,e.Request=_,e.Response=E,e.fetch=O,Object.defineProperty(e,"__esModule",{value:!0})}({}),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var s=o;(n=s.fetch).default=s.fetch,n.fetch=s.fetch,n.Headers=s.Headers,n.Request=s.Request,n.Response=s.Response,e.exports=n}(jg,jg.exports);var Dg=n(jg.exports);const zg={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},Bg=10;class Fg{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new o.exports.EventEmitter,this.isAvailable=!1,this.registering=!1,!Jl(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=sr(e),n=await(await Dg(this.url,Object.assign(Object.assign({},zg),{body:t}))).json();this.onPayload({data:n})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!Jl(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=sr({id:1,jsonrpc:"2.0",method:"test",params:[]});await Dg(e,Object.assign(Object.assign({},zg),{body:t}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?or(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=Hl(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return ol(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>Bg&&this.events.setMaxListeners(Bg)}}class Hg{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=Lg("events"),this.client=Lg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Ig(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(pg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Ig(e,this.namespace);return typeof n>"u"?void 0:new sf(new Fg(n,Lg("disableProviderPing")))}}class $g{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=Lg("events"),this.client=Lg("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){var t;switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return this.handleSwitchChain(e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0"),null;case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){const n=Cg(e);if(!this.httpProviders[n]){const e=t||Ig(`${this.name}:${n}`,this.namespace,this.client.core.projectId);if(!e)throw new Error(`No RPC url provided for chainId: ${n}`);this.setHttpProvider(n,e)}this.chainId=n,this.events.emit(pg.DEFAULT_CHAIN_CHANGED,`${this.name}:${n}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||Ig(`${this.name}:${e}`,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new Fg(n,Lg("disableProviderPing")))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Cg(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}handleSwitchChain(e){const t=parseInt(e,16);Pg(`${this.name}:${t}`,this.namespace.chains),this.setDefaultChain(`${t}`)}}class Vg{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=Lg("events"),this.client=Lg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Ig(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(pg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Ig(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new Fg(n,Lg("disableProviderPing")))}}class qg{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=Lg("events"),this.client=Lg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Ig(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(pg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Ig(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new Fg(n,Lg("disableProviderPing")))}}class Wg{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=Lg("events"),this.client=Lg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(pg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{const n=this.getCardanoRPCUrl(t);e[t]=this.createHttpProvider(t,n)})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||this.getCardanoRPCUrl(e);return typeof n>"u"?void 0:new sf(new Fg(n,Lg("disableProviderPing")))}}class Kg{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=Lg("events"),this.client=Lg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Ig(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(pg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Ig(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new Fg(n,Lg("disableProviderPing")))}}class Gg{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=Lg("events"),this.client=Lg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Ig(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(pg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Ig(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new Fg(n,Lg("disableProviderPing")))}}var Yg=Object.defineProperty,Qg=Object.defineProperties,Jg=Object.getOwnPropertyDescriptors,Xg=Object.getOwnPropertySymbols,Zg=Object.prototype.hasOwnProperty,ey=Object.prototype.propertyIsEnumerable,ty=(e,t,n)=>t in e?Yg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ny=(e,t)=>{for(var n in t||(t={}))Zg.call(t,n)&&ty(e,n,t[n]);if(Xg)for(var n of Xg(t))ey.call(t,n)&&ty(e,n,t[n]);return e},ry=(e,t)=>Qg(e,Jg(t));class iy{constructor(e){this.events=new o.exports,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:cn.pino(cn.getDefaultLoggerOptions({level:e?.logger||lg})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){const t=new iy(e);return await t.initialize(),t}async request(e,t){const[n,r]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:ny({},e),chainId:`${n}:${r}`,topic:this.session.topic})}sendAsync(e,t,n){this.request(e,n).then((e=>t(null,e))).catch((e=>t(e,void 0)))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:du("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:r}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await r().then((e=>{this.session=e})).catch((e=>{if(e.message!==Hp)throw e;t++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{const[n,r]=this.validateChain(e);this.getProvider(n).setDefaultChain(r,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(pu(t)){for(const n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await ug.init({logger:this.providerOpts.logger||lg,relayUrl:this.providerOpts.relayUrl||fg,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map((e=>uu(e))))];Ug("client",this.client),Ug("events",this.events),Ug("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;const t=Ng(e,this.session),n=kg(t),r=Ag(this.namespaces,this.optionalNamespaces),i=ry(ny({},r[e]),{accounts:t,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new $g({namespace:i});break;case"solana":this.rpcProviders[e]=new Vg({namespace:i});break;case"cosmos":this.rpcProviders[e]=new qg({namespace:i});break;case"polkadot":this.rpcProviders[e]=new Hg({namespace:i});break;case"cip34":this.rpcProviders[e]=new Wg({namespace:i});break;case"elrond":this.rpcProviders[e]=new Kg({namespace:i});break;case"multiversx":this.rpcProviders[e]=new Gg({namespace:i})}}))}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",(e=>{this.events.emit("session_ping",e)})),this.client.on("session_event",(e=>{const{params:t}=e,{event:n}=t;"accountsChanged"===n.name?this.events.emit("accountsChanged",n.data):"chainChanged"===n.name?this.onChainChanged(t.chainId):this.events.emit(n.name,n.data),this.events.emit("session_event",e)})),this.client.on("session_update",(({topic:e,params:t})=>{var n;const{namespaces:r}=t,i=null==(n=this.client)?void 0:n.session.get(e);this.session=ry(ny({},i),{namespaces:r}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})})),this.client.on("session_delete",(async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",ry(ny({},du("USER_DISCONNECTED")),{data:e.topic}))})),this.on(pg.DEFAULT_CHAIN_CHANGED,(e=>{this.onChainChanged(e,!0)}))}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])}))}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:r}=e;if(!t||!Object.keys(t).length)throw new Error("Namespaces must be not empty");this.namespaces=t,this.optionalNamespaces=n,this.sessionProperties=r,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=e?.split(":")||["",""];if(t&&!Object.keys(this.namespaces).map((e=>uu(e))).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const r=uu(Object.keys(this.namespaces)[0]);return[r,this.rpcProviders[r].getDefaultChain()]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){var n;const[r,i]=this.validateChain(e);t||this.getProvider(r).setDefaultChain(i),(null!=(n=this.namespaces[r])?n:this.namespaces[`${r}:${i}`]).defaultChain=i,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${hg}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${hg}/${e}`)}}const oy=iy;e.UniversalProvider=oy,e.default=iy,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,Ji.exports);const Xi=["eth_sendTransaction","personal_sign"],Zi=["eth_accounts","eth_requestAccounts","eth_call","eth_getBalance","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],eo=["chainChanged","accountsChanged"],to=["message","disconnect","connect"];function no(e){return Number(e[0].split(":")[1])}function ro(e){return`0x${e.toString(16)}`}class io{constructor(){this.events=new vn.exports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static init(e){return c(this,void 0,void 0,(function*(){const t=new io;return yield t.initialize(e),t}))}request(e){return c(this,void 0,void 0,(function*(){return yield this.signer.request(e,this.formatChainId(this.chainId))}))}sendAsync(e,t){this.signer.sendAsync(e,t,this.formatChainId(this.chainId))}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}enable(){return c(this,void 0,void 0,(function*(){this.session||(yield this.connect());return yield this.request({method:"eth_requestAccounts"})}))}connect(e){return c(this,void 0,void 0,(function*(){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:n}=function(e){const{chains:t,optionalChains:n,methods:r,optionalMethods:i,events:o,optionalEvents:s,rpcMap:a}=e;if(!Gi(t))throw new Error("Invalid chains");const c=t,u=r||Xi,l=o||eo,f={chains:c,methods:u,events:l,rpcMap:{[no(c)]:a[no(c)]}},h=null==o?void 0:o.filter((e=>!eo.includes(e))),d=null==r?void 0:r.filter((e=>!Xi.includes(e)));if(!(n||s||i||(null==h?void 0:h.length)||(null==d?void 0:d.length)))return{required:f};const p=(null==h?void 0:h.length)&&(null==d?void 0:d.length)||!n;return{required:f,optional:{chains:[...new Set(p?c.concat(n||[]):n)],methods:[...new Set(u.concat(i||[]))],events:[...new Set(l.concat(s||[]))],rpcMap:a}}}(this.rpc);try{const r=yield new Promise(((r,i)=>c(this,void 0,void 0,(function*(){yield this.signer.connect(Object.assign(Object.assign({namespaces:{[this.namespace]:t}},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:null==e?void 0:e.pairingTopic})).then((e=>{r(e)})).catch((e=>{i(new Error(e.message))}))}))));if(!r)return;this.setChainIds(this.rpc.chains);const i=function(e,t=[]){const n=[];return Object.keys(e).forEach((r=>{if(t.length&&!t.includes(r))return;const i=e[r];n.push(...i.accounts)})),n}(r.namespaces,[this.namespace]);this.setAccounts(i),this.events.emit("connect",{chainId:ro(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}}))}disconnect(){return c(this,void 0,void 0,(function*(){this.session&&(yield this.signer.disconnect()),this.reset()}))}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",(e=>{const{params:t}=e,{event:n}=t;"accountsChanged"===n.name?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===n.name?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)})),this.signer.on("chainChanged",(e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",ro(this.chainId)),this.persist()})),this.signer.on("session_update",(e=>{this.events.emit("session_update",e)})),this.signer.on("session_delete",(e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Object.assign(Object.assign({},function(e,t){const{message:n,code:r}=Ki[e];return{message:t?`${n} ${t}`:n,code:r}}("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(e=>{this.events.emit("display_uri",e)}))}setHttpProvider(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith(`${this.namespace}:`)}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter((e=>this.isCompatibleChainId(e))),n=t.map((e=>this.parseChainId(e)));n.length&&(this.chainId=n[0],this.events.emit("chainChanged",ro(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.setHttpProvider(t)}}parseAccountId(e){const[t,n,r]=e.split(":");return{chainId:`${t}:${n}`,address:r}}setAccounts(e){this.accounts=e.filter((e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId)).map((e=>this.parseAccountId(e).address)),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t;return{chains:(null===(t=e.chains)||void 0===t?void 0:t.map((e=>this.formatChainId(e))))||[`${this.namespace}:1`],optionalChains:e.optionalChains?e.optionalChains.map((e=>this.formatChainId(e))):void 0,methods:(null==e?void 0:e.methods)||Xi,events:(null==e?void 0:e.events)||eo,optionalMethods:(null==e?void 0:e.optionalMethods)||[],optionalEvents:(null==e?void 0:e.optionalEvents)||[],rpcMap:(null==e?void 0:e.rpcMap)||this.buildRpcMap(e.chains.concat(e.optionalChains||[]),e.projectId),projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const n={};return e.forEach((e=>{n[e]=this.getRpcUrl(e,t)})),n}initialize(e){return c(this,void 0,void 0,(function*(){this.rpc=this.getRpcConfig(e),this.chainId=no(this.rpc.chains),this.signer=yield Ji.exports.UniversalProvider.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata}),this.registerEventListeners(),yield this.loadPersistedSession()}))}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:n,rpcMap:r}=e;t&&Gi(t)&&(this.rpc.chains=t.map((e=>this.formatChainId(e))),t.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)}))),n&&Gi(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=null==n?void 0:n.map((e=>this.formatChainId(e))),n.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)})))}getRpcUrl(e,t){var n;return(null===(n=this.rpc.rpcMap)||void 0===n?void 0:n[e])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}loadPersistedSession(){return c(this,void 0,void 0,(function*(){if(!this.session)return;const e=yield this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`);this.setChainIds(e?[this.formatChainId(e)]:this.session.namespaces[this.namespace].accounts),this.setAccounts(this.session.namespaces[this.namespace].accounts)}))}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map((e=>this.parseAccount(e)))}}const oo=n("WalletConnectEvm"),so=r("WalletConnectEvm");function ao(){return c(this,void 0,void 0,(function*(){oo("getWalletConnectProvider");try{const e=yield function(){return c(this,void 0,void 0,(function*(){oo("initWalletConnectProvider");const e=mo();oo("walletConnectProviderOptions is",e);const t={projectId:e.projectId,chains:e.chains,optionalChains:e.optionalChains,methods:e.methods,optionalMethods:e.optionalMethods||Zi,events:e.events,optionalEvents:e.optionalEvents||to,rpcMap:e.rpcMap,metadata:e.metadata,showQrModal:!1};oo("ethereum init options are",t),oo("creating a new provider instance");try{return io.init(t)}catch(e){throw so("Error while initializing ethereum provider"),e}}))}();return function(e){function t(n){oo("disconnectHandler",n),e.disconnect(),e.removeListener("connect",co),e.removeListener("session_delete",t),e.removeListener("display_uri",uo)}oo("assignWalletConnectProviderEvents"),e.on("connect",co),e.on("display_uri",uo),e.on("session_delete",t),oo("provider is",e)}(e),e.request=function(e){oo("patchWalletConnectProviderRequest");const t=e.request.bind(e),n=mo();return oo("walletConnectProviderOptions is",n),function({method:r,params:i}){return c(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?(oo("calling patched",r,i),new Promise(((o,a)=>c(this,void 0,void 0,(function*(){var c;try{(null===(c=null==e?void 0:e.session)||void 0===c?void 0:c.connected)?(oo("reusing existing session"),o(t({method:r,params:i}))):(hn({uri:"",onClose:()=>{so("user rejected"),a(new s)}}),oo("creating a new session"),yield e.connect({chains:n.chains,optionalChains:n.optionalChains}),o(t({method:r,params:i})))}catch(e){return so("error",e),a(e)}}))))):(oo("calling provider",r,i),yield t({method:r,params:i}))}))}}(e),e}catch(e){const t=e instanceof Error?e:new Error(String(e));throw so("error",t),t}}))}function co(e){oo("connectHandler",e),mt(!1)}function uo(e){oo("displayUriHandler",e),en(e)}const lo=n("getProvider"),fo=[1];var ho,po;let go;!function(e){e.Ethereum="Ethereum",e.Solana="Solana"}(ho||(ho={})),function(e){e.LedgerConnect="LedgerConnect",e.WalletConnect="WalletConnect"}(po||(po={}));const yo=n("supportOptions");let vo;const mo=()=>(yo("getSupportOptions"),vo),_o=n("ExtensionEvm"),bo="ethereum",wo="isLedgerConnect";var Eo;function So(e){return("iOS"===e.os.name||"macOS"===e.os.name)&&"Safari"===e.browser.name}function Oo(e){return!!Eo[e]}function Ro(e){return e.every(Oo)}function xo(){var e;if(_o("getEthereumProvider"),"undefined"==typeof window)throw new a;let t=window[bo];if(void 0===t||void 0===t[wo])throw new i;_o("chainId is",t.chainId);const n=`0x${(null===(e=mo().chainId)||void 0===e?void 0:e.toString(16))||0}`;return _o("hex chainId is",n),t.chainId!=n&&_o("chainIds are different, changing to",n),t}!function(e){e[e.EthereumMainnet=1]="EthereumMainnet",e[e.Polygon=137]="Polygon"}(Eo||(Eo={}));const Io=n("support");let Co;e.checkSupport=function(e){Io("checkSupport",e),(e=>{var t;yo("setSupportOptions",e);const n=e.version||1;let r,i,o=[];1===n?(i=e.chainId||1,r=[i]):(r=e.chains||fo,i=r[0],o.push(...r),(null===(t=e.optionalChains)||void 0===t?void 0:t.length)&&o.push(...e.optionalChains.filter((e=>o.indexOf(e)<0))));const s=Object.assign(Object.assign({},e),{version:n,chains:r,chainId:i,optionalChains:o,projectId:e.projectId||""});if(2===n&&(!e.projectId||""===e.projectId))throw new Error("WalletConnect requires a projectId. Please visit https://cloud.walletconnect.com to get one.");vo=s})(e);const t=mo();let n;switch(t.providerType){case ho.Ethereum:n=function(e){Io("checkEthereumSupport",e);const t=un();let n=!1;try{n=!!xo()}catch(e){}const r={isLedgerConnectSupported:So(t),isLedgerConnectEnabled:!!n,isChainIdSupported:Ro(e.chains),providerImplementation:po.LedgerConnect};r.isLedgerConnectSupported&&r.isLedgerConnectEnabled&&r.isChainIdSupported||(r.providerImplementation=po.WalletConnect);return function(e){lo("setProviderImplementation",e),go=e}(r.providerImplementation),r}(t);break;case ho.Solana:n=function(){Io("checkSolanaSupport");const e=un();let t=!1;try{t=!!h()}catch(e){}const n={isLedgerConnectSupported:So(e),isLedgerConnectEnabled:!!t,providerImplementation:po.LedgerConnect};n.isLedgerConnectSupported?n.isLedgerConnectSupported&&!n.isLedgerConnectEnabled&&fn("ExtensionInstallModal"):fn("PlatformNotSupportedModal");return n}()}return Io("checkSupportResult is",n),Co=n,n},e.enableDebugLogs=()=>{t=!0},e.getProvider=function(){return c(this,void 0,void 0,(function*(){lo("getProvider",go);const e=mo();switch(e.providerType){case ho.Ethereum:return(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))||(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))||go!==po.LedgerConnect?(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))||1!==e.version&&!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))?yield ao():yield gn():xo();case ho.Solana:return h();default:throw new o}}))},Object.defineProperty(e,"__esModule",{value:!0})}));//# sourceMappingURL=index.js.map
328
+ */gg=vg,yg=vg.exports,function(){var e,n="4.17.21",r=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",c=500,u="__lodash_placeholder__",l=1,f=2,h=4,d=1,p=2,g=1,y=2,v=4,m=8,_=16,b=32,w=64,E=128,S=256,O=512,R=30,x="...",I=800,C=16,P=1,k=2,N=3,A=1/0,T=9007199254740991,M=17976931348623157e292,L=NaN,U=4294967295,j=U-1,D=U>>>1,z=[["ary",E],["bind",g],["bindKey",y],["curry",m],["curryRight",_],["flip",O],["partial",b],["partialRight",w],["rearg",S]],B="[object Arguments]",F="[object Array]",H="[object AsyncFunction]",$="[object Boolean]",V="[object Date]",q="[object DOMException]",W="[object Error]",K="[object Function]",G="[object GeneratorFunction]",Y="[object Map]",Q="[object Number]",J="[object Null]",X="[object Object]",Z="[object Promise]",ee="[object Proxy]",te="[object RegExp]",ne="[object Set]",re="[object String]",ie="[object Symbol]",oe="[object Undefined]",se="[object WeakMap]",ae="[object WeakSet]",ce="[object ArrayBuffer]",ue="[object DataView]",le="[object Float32Array]",fe="[object Float64Array]",he="[object Int8Array]",de="[object Int16Array]",pe="[object Int32Array]",ge="[object Uint8Array]",ye="[object Uint8ClampedArray]",ve="[object Uint16Array]",me="[object Uint32Array]",_e=/\b__p \+= '';/g,be=/\b(__p \+=) '' \+/g,we=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ee=/&(?:amp|lt|gt|quot|#39);/g,Se=/[&<>"']/g,Oe=RegExp(Ee.source),Re=RegExp(Se.source),xe=/<%-([\s\S]+?)%>/g,Ie=/<%([\s\S]+?)%>/g,Ce=/<%=([\s\S]+?)%>/g,Pe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ke=/^\w*$/,Ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ae=/[\\^$.*+?()[\]{}|]/g,Te=RegExp(Ae.source),Me=/^\s+/,Le=/\s/,Ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,je=/\{\n\/\* \[wrapped with (.+)\] \*/,De=/,? & /,ze=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Be=/[()=,{}\[\]\/\s]/,Fe=/\\(\\)?/g,He=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$e=/\w*$/,Ve=/^[-+]0x[0-9a-f]+$/i,qe=/^0b[01]+$/i,We=/^\[object .+?Constructor\]$/,Ke=/^0o[0-7]+$/i,Ge=/^(?:0|[1-9]\d*)$/,Ye=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qe=/($^)/,Je=/['\n\r\u2028\u2029\\]/g,Xe="\\ud800-\\udfff",Ze="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",et="\\u2700-\\u27bf",tt="a-z\\xdf-\\xf6\\xf8-\\xff",nt="A-Z\\xc0-\\xd6\\xd8-\\xde",rt="\\ufe0e\\ufe0f",it="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ot="['’]",st="["+Xe+"]",at="["+it+"]",ct="["+Ze+"]",ut="\\d+",lt="["+et+"]",ft="["+tt+"]",ht="[^"+Xe+it+ut+et+tt+nt+"]",dt="\\ud83c[\\udffb-\\udfff]",pt="[^"+Xe+"]",gt="(?:\\ud83c[\\udde6-\\uddff]){2}",yt="[\\ud800-\\udbff][\\udc00-\\udfff]",vt="["+nt+"]",mt="\\u200d",_t="(?:"+ft+"|"+ht+")",bt="(?:"+vt+"|"+ht+")",wt="(?:"+ot+"(?:d|ll|m|re|s|t|ve))?",Et="(?:"+ot+"(?:D|LL|M|RE|S|T|VE))?",St="(?:"+ct+"|"+dt+")?",Ot="["+rt+"]?",Rt="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",It=Ot+St+"(?:"+mt+"(?:"+[pt,gt,yt].join("|")+")"+Ot+St+")*",Ct="(?:"+[lt,gt,yt].join("|")+")"+It,Pt="(?:"+[pt+ct+"?",ct,gt,yt,st].join("|")+")",kt=RegExp(ot,"g"),Nt=RegExp(ct,"g"),At=RegExp(dt+"(?="+dt+")|"+Pt+It,"g"),Tt=RegExp([vt+"?"+ft+"+"+wt+"(?="+[at,vt,"$"].join("|")+")",bt+"+"+Et+"(?="+[at,vt+_t,"$"].join("|")+")",vt+"?"+_t+"+"+wt,vt+"+"+Et,xt,Rt,ut,Ct].join("|"),"g"),Mt=RegExp("["+mt+Xe+Ze+rt+"]"),Lt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ut=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],jt=-1,Dt={};Dt[le]=Dt[fe]=Dt[he]=Dt[de]=Dt[pe]=Dt[ge]=Dt[ye]=Dt[ve]=Dt[me]=!0,Dt[B]=Dt[F]=Dt[ce]=Dt[$]=Dt[ue]=Dt[V]=Dt[W]=Dt[K]=Dt[Y]=Dt[Q]=Dt[X]=Dt[te]=Dt[ne]=Dt[re]=Dt[se]=!1;var zt={};zt[B]=zt[F]=zt[ce]=zt[ue]=zt[$]=zt[V]=zt[le]=zt[fe]=zt[he]=zt[de]=zt[pe]=zt[Y]=zt[Q]=zt[X]=zt[te]=zt[ne]=zt[re]=zt[ie]=zt[ge]=zt[ye]=zt[ve]=zt[me]=!0,zt[W]=zt[K]=zt[se]=!1;var Bt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Ft={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ht={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},$t={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,qt=parseInt,Wt="object"==typeof t&&t&&t.Object===Object&&t,Kt="object"==typeof self&&self&&self.Object===Object&&self,Gt=Wt||Kt||Function("return this")(),Yt=yg&&!yg.nodeType&&yg,Qt=Yt&&gg&&!gg.nodeType&&gg,Jt=Qt&&Qt.exports===Yt,Xt=Jt&&Wt.process,Zt=function(){try{return Qt&&Qt.require&&Qt.require("util").types||Xt&&Xt.binding&&Xt.binding("util")}catch{}}(),en=Zt&&Zt.isArrayBuffer,tn=Zt&&Zt.isDate,nn=Zt&&Zt.isMap,rn=Zt&&Zt.isRegExp,on=Zt&&Zt.isSet,sn=Zt&&Zt.isTypedArray;function an(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function cn(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function un(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function ln(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function fn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function hn(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function dn(e,t){return!(null==e||!e.length)&&Rn(e,t,0)>-1}function pn(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function gn(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function yn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function vn(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function mn(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function _n(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var bn=Pn("length");function wn(e){return e.split("")}function En(e){return e.match(ze)||[]}function Sn(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function On(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Rn(e,t,n){return t==t?tr(e,t,n):On(e,In,n)}function xn(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function In(e){return e!=e}function Cn(e,t){var n=null==e?0:e.length;return n?Tn(e,t)/n:L}function Pn(t){return function(n){return null==n?e:n[t]}}function kn(t){return function(n){return null==t?e:t[n]}}function Nn(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function An(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Tn(t,n){for(var r,i=-1,o=t.length;++i<o;){var s=n(t[i]);s!==e&&(r=r===e?s:r+s)}return r}function Mn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ln(e,t){return gn(t,(function(t){return[t,e[t]]}))}function Un(e){return e&&e.slice(0,or(e)+1).replace(Me,"")}function jn(e){return function(t){return e(t)}}function Dn(e,t){return gn(t,(function(t){return e[t]}))}function zn(e,t){return e.has(t)}function Bn(e,t){for(var n=-1,r=e.length;++n<r&&Rn(t,e[n],0)>-1;);return n}function Fn(e,t){for(var n=e.length;n--&&Rn(t,e[n],0)>-1;);return n}function Hn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var $n=kn(Bt),Vn=kn(Ft);function qn(e){return"\\"+$t[e]}function Wn(t,n){return null==t?e:t[n]}function Kn(e){return Mt.test(e)}function Gn(e){return Lt.test(e)}function Yn(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function Qn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Jn(e,t){return function(n){return e(t(n))}}function Xn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];(s===t||s===u)&&(e[n]=u,o[i++]=n)}return o}function Zn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function er(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function tr(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function nr(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}function rr(e){return Kn(e)?ar(e):bn(e)}function ir(e){return Kn(e)?cr(e):wn(e)}function or(e){for(var t=e.length;t--&&Le.test(e.charAt(t)););return t}var sr=kn(Ht);function ar(e){for(var t=At.lastIndex=0;At.test(e);)++t;return t}function cr(e){return e.match(At)||[]}function ur(e){return e.match(Tt)||[]}var lr=function t(Le){var ze,Xe=(Le=null==Le?Gt:fr.defaults(Gt.Object(),Le,fr.pick(Gt,Ut))).Array,Ze=Le.Date,et=Le.Error,tt=Le.Function,nt=Le.Math,rt=Le.Object,it=Le.RegExp,ot=Le.String,st=Le.TypeError,at=Xe.prototype,ct=tt.prototype,ut=rt.prototype,lt=Le["__core-js_shared__"],ft=ct.toString,ht=ut.hasOwnProperty,dt=0,pt=(ze=/[^.]+$/.exec(lt&&lt.keys&&lt.keys.IE_PROTO||""))?"Symbol(src)_1."+ze:"",gt=ut.toString,yt=ft.call(rt),vt=Gt._,mt=it("^"+ft.call(ht).replace(Ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_t=Jt?Le.Buffer:e,bt=Le.Symbol,wt=Le.Uint8Array,Et=_t?_t.allocUnsafe:e,St=Jn(rt.getPrototypeOf,rt),Ot=rt.create,Rt=ut.propertyIsEnumerable,xt=at.splice,It=bt?bt.isConcatSpreadable:e,Ct=bt?bt.iterator:e,Pt=bt?bt.toStringTag:e,At=function(){try{var e=Gs(rt,"defineProperty");return e({},"",{}),e}catch{}}(),Tt=Le.clearTimeout!==Gt.clearTimeout&&Le.clearTimeout,Mt=Ze&&Ze.now!==Gt.Date.now&&Ze.now,Lt=Le.setTimeout!==Gt.setTimeout&&Le.setTimeout,Bt=nt.ceil,Ft=nt.floor,Ht=rt.getOwnPropertySymbols,$t=_t?_t.isBuffer:e,Wt=Le.isFinite,Kt=at.join,Yt=Jn(rt.keys,rt),Qt=nt.max,Xt=nt.min,Zt=Ze.now,bn=Le.parseInt,wn=nt.random,kn=at.reverse,tr=Gs(Le,"DataView"),ar=Gs(Le,"Map"),cr=Gs(Le,"Promise"),lr=Gs(Le,"Set"),hr=Gs(Le,"WeakMap"),dr=Gs(rt,"create"),pr=hr&&new hr,gr={},yr=Ta(tr),vr=Ta(ar),mr=Ta(cr),_r=Ta(lr),br=Ta(hr),wr=bt?bt.prototype:e,Er=wr?wr.valueOf:e,Sr=wr?wr.toString:e;function Or(e){if(xl(e)&&!ul(e)&&!(e instanceof Cr)){if(e instanceof Ir)return e;if(ht.call(e,"__wrapped__"))return La(e)}return new Ir(e)}var Rr=function(){function t(){}return function(n){if(!Rl(n))return{};if(Ot)return Ot(n);t.prototype=n;var r=new t;return t.prototype=e,r}}();function xr(){}function Ir(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=e}function Cr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=U,this.__views__=[]}function Pr(){var e=new Cr(this.__wrapped__);return e.__actions__=os(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=os(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=os(this.__views__),e}function kr(){if(this.__filtered__){var e=new Cr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e}function Nr(){var e=this.__wrapped__.value(),t=this.__dir__,n=ul(e),r=t<0,i=n?e.length:0,o=Zs(0,i,this.__views__),s=o.start,a=o.end,c=a-s,u=r?a:s-1,l=this.__iteratees__,f=l.length,h=0,d=Xt(c,this.__takeCount__);if(!n||!r&&i==c&&d==c)return Bo(e,this.__actions__);var p=[];e:for(;c--&&h<d;){for(var g=-1,y=e[u+=t];++g<f;){var v=l[g],m=v.iteratee,_=v.type,b=m(y);if(_==k)y=b;else if(!b){if(_==P)continue e;break e}}p[h++]=y}return p}function Ar(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Tr(){this.__data__=dr?dr(null):{},this.size=0}function Mr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Lr(t){var n=this.__data__;if(dr){var r=n[t];return r===a?e:r}return ht.call(n,t)?n[t]:e}function Ur(t){var n=this.__data__;return dr?n[t]!==e:ht.call(n,t)}function jr(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=dr&&n===e?a:n,this}function Dr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zr(){this.__data__=[],this.size=0}function Br(e){var t=this.__data__,n=fi(t,e);return!(n<0||(n==t.length-1?t.pop():xt.call(t,n,1),--this.size,0))}function Fr(t){var n=this.__data__,r=fi(n,t);return r<0?e:n[r][1]}function Hr(e){return fi(this.__data__,e)>-1}function $r(e,t){var n=this.__data__,r=fi(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Vr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qr(){this.size=0,this.__data__={hash:new Ar,map:new(ar||Dr),string:new Ar}}function Wr(e){var t=Ws(this,e).delete(e);return this.size-=t?1:0,t}function Kr(e){return Ws(this,e).get(e)}function Gr(e){return Ws(this,e).has(e)}function Yr(e,t){var n=Ws(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Qr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Vr;++t<n;)this.add(e[t])}function Jr(e){return this.__data__.set(e,a),this}function Xr(e){return this.__data__.has(e)}function Zr(e){var t=this.__data__=new Dr(e);this.size=t.size}function ei(){this.__data__=new Dr,this.size=0}function ti(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function ni(e){return this.__data__.get(e)}function ri(e){return this.__data__.has(e)}function ii(e,t){var n=this.__data__;if(n instanceof Dr){var i=n.__data__;if(!ar||i.length<r-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Vr(i)}return n.set(e,t),this.size=n.size,this}function oi(e,t){var n=ul(e),r=!n&&cl(e),i=!n&&!r&&pl(e),o=!n&&!r&&!i&&Fl(e),s=n||r||i||o,a=s?Mn(e.length,ot):[],c=a.length;for(var u in e)(t||ht.call(e,u))&&(!s||!("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||aa(u,c)))&&a.push(u);return a}function si(t){var n=t.length;return n?t[_o(0,n-1)]:e}function ai(e,t){return ka(os(e),vi(t,0,e.length))}function ci(e){return ka(os(e))}function ui(t,n,r){(r!==e&&!ol(t[n],r)||r===e&&!(n in t))&&gi(t,n,r)}function li(t,n,r){var i=t[n];(!ht.call(t,n)||!ol(i,r)||r===e&&!(n in t))&&gi(t,n,r)}function fi(e,t){for(var n=e.length;n--;)if(ol(e[n][0],t))return n;return-1}function hi(e,t,n,r){return Si(e,(function(e,i,o){t(r,e,n(e),o)})),r}function di(e,t){return e&&ss(t,Of(t),e)}function pi(e,t){return e&&ss(t,Rf(t),e)}function gi(e,t,n){"__proto__"==t&&At?At(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function yi(t,n){for(var r=-1,i=n.length,o=Xe(i),s=null==t;++r<i;)o[r]=s?e:mf(t,n[r]);return o}function vi(t,n,r){return t==t&&(r!==e&&(t=t<=r?t:r),n!==e&&(t=t>=n?t:n)),t}function mi(t,n,r,i,o,s){var a,c=n&l,u=n&f,d=n&h;if(r&&(a=o?r(t,i,o,s):r(t)),a!==e)return a;if(!Rl(t))return t;var p=ul(t);if(p){if(a=na(t),!c)return os(t,a)}else{var g=Xs(t),y=g==K||g==G;if(pl(t))return Yo(t,c);if(g==X||g==B||y&&!o){if(a=u||y?{}:ra(t),!c)return u?cs(t,pi(a,t)):as(t,di(a,t))}else{if(!zt[g])return o?t:{};a=ia(t,g,c)}}s||(s=new Zr);var v=s.get(t);if(v)return v;s.set(t,a),Dl(t)?t.forEach((function(e){a.add(mi(e,n,r,e,t,s))})):Il(t)&&t.forEach((function(e,i){a.set(i,mi(e,n,r,i,t,s))}));var m=p?e:(d?u?Fs:Bs:u?Rf:Of)(t);return un(m||t,(function(e,i){m&&(e=t[i=e]),li(a,i,mi(e,n,r,i,t,s))})),a}function _i(e){var t=Of(e);return function(n){return bi(n,e,t)}}function bi(t,n,r){var i=r.length;if(null==t)return!i;for(t=rt(t);i--;){var o=r[i],s=n[o],a=t[o];if(a===e&&!(o in t)||!s(a))return!1}return!0}function wi(t,n,r){if("function"!=typeof t)throw new st(o);return xa((function(){t.apply(e,r)}),n)}function Ei(e,t,n,i){var o=-1,s=dn,a=!0,c=e.length,u=[],l=t.length;if(!c)return u;n&&(t=gn(t,jn(n))),i?(s=pn,a=!1):t.length>=r&&(s=zn,a=!1,t=new Qr(t));e:for(;++o<c;){var f=e[o],h=null==n?f:n(f);if(f=i||0!==f?f:0,a&&h==h){for(var d=l;d--;)if(t[d]===h)continue e;u.push(f)}else s(t,h,i)||u.push(f)}return u}Or.templateSettings={escape:xe,evaluate:Ie,interpolate:Ce,variable:"",imports:{_:Or}},Or.prototype=xr.prototype,Or.prototype.constructor=Or,Ir.prototype=Rr(xr.prototype),Ir.prototype.constructor=Ir,Cr.prototype=Rr(xr.prototype),Cr.prototype.constructor=Cr,Ar.prototype.clear=Tr,Ar.prototype.delete=Mr,Ar.prototype.get=Lr,Ar.prototype.has=Ur,Ar.prototype.set=jr,Dr.prototype.clear=zr,Dr.prototype.delete=Br,Dr.prototype.get=Fr,Dr.prototype.has=Hr,Dr.prototype.set=$r,Vr.prototype.clear=qr,Vr.prototype.delete=Wr,Vr.prototype.get=Kr,Vr.prototype.has=Gr,Vr.prototype.set=Yr,Qr.prototype.add=Qr.prototype.push=Jr,Qr.prototype.has=Xr,Zr.prototype.clear=ei,Zr.prototype.delete=ti,Zr.prototype.get=ni,Zr.prototype.has=ri,Zr.prototype.set=ii;var Si=fs(Ai),Oi=fs(Ti,!0);function Ri(e,t){var n=!0;return Si(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function xi(t,n,r){for(var i=-1,o=t.length;++i<o;){var s=t[i],a=n(s);if(null!=a&&(c===e?a==a&&!Bl(a):r(a,c)))var c=a,u=s}return u}function Ii(t,n,r,i){var o=t.length;for((r=Yl(r))<0&&(r=-r>o?0:o+r),(i=i===e||i>o?o:Yl(i))<0&&(i+=o),i=r>i?0:Ql(i);r<i;)t[r++]=n;return t}function Ci(e,t){var n=[];return Si(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function Pi(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=sa),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?Pi(a,t-1,n,r,i):yn(i,a):r||(i[i.length]=a)}return i}var ki=hs(),Ni=hs(!0);function Ai(e,t){return e&&ki(e,t,Of)}function Ti(e,t){return e&&Ni(e,t,Of)}function Mi(e,t){return hn(t,(function(t){return El(e[t])}))}function Li(t,n){for(var r=0,i=(n=qo(n,t)).length;null!=t&&r<i;)t=t[Aa(n[r++])];return r&&r==i?t:e}function Ui(e,t,n){var r=t(e);return ul(e)?r:yn(r,n(e))}function ji(t){return null==t?t===e?oe:J:Pt&&Pt in rt(t)?Ys(t):ba(t)}function Di(e,t){return e>t}function zi(e,t){return null!=e&&ht.call(e,t)}function Bi(e,t){return null!=e&&t in rt(e)}function Fi(e,t,n){return e>=Xt(t,n)&&e<Qt(t,n)}function Hi(t,n,r){for(var i=r?pn:dn,o=t[0].length,s=t.length,a=s,c=Xe(s),u=1/0,l=[];a--;){var f=t[a];a&&n&&(f=gn(f,jn(n))),u=Xt(f.length,u),c[a]=!r&&(n||o>=120&&f.length>=120)?new Qr(a&&f):e}f=t[0];var h=-1,d=c[0];e:for(;++h<o&&l.length<u;){var p=f[h],g=n?n(p):p;if(p=r||0!==p?p:0,!(d?zn(d,g):i(l,g,r))){for(a=s;--a;){var y=c[a];if(!(y?zn(y,g):i(t[a],g,r)))continue e}d&&d.push(g),l.push(p)}}return l}function $i(e,t,n,r){return Ai(e,(function(e,i,o){t(r,n(e),i,o)})),r}function Vi(t,n,r){var i=null==(t=Ea(t,n=qo(n,t)))?t:t[Aa(sc(n))];return null==i?e:an(i,t,r)}function qi(e){return xl(e)&&ji(e)==B}function Wi(e){return xl(e)&&ji(e)==ce}function Ki(e){return xl(e)&&ji(e)==V}function Gi(e,t,n,r,i){return e===t||(null==e||null==t||!xl(e)&&!xl(t)?e!=e&&t!=t:Yi(e,t,n,r,Gi,i))}function Yi(e,t,n,r,i,o){var s=ul(e),a=ul(t),c=s?F:Xs(e),u=a?F:Xs(t),l=(c=c==B?X:c)==X,f=(u=u==B?X:u)==X,h=c==u;if(h&&pl(e)){if(!pl(t))return!1;s=!0,l=!1}if(h&&!l)return o||(o=new Zr),s||Fl(e)?Us(e,t,n,r,i,o):js(e,t,c,n,r,i,o);if(!(n&d)){var p=l&&ht.call(e,"__wrapped__"),g=f&&ht.call(t,"__wrapped__");if(p||g){var y=p?e.value():e,v=g?t.value():t;return o||(o=new Zr),i(y,v,n,r,o)}}return!!h&&(o||(o=new Zr),Ds(e,t,n,r,i,o))}function Qi(e){return xl(e)&&Xs(e)==Y}function Ji(t,n,r,i){var o=r.length,s=o,a=!i;if(null==t)return!s;for(t=rt(t);o--;){var c=r[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<s;){var u=(c=r[o])[0],l=t[u],f=c[1];if(a&&c[2]){if(l===e&&!(u in t))return!1}else{var h=new Zr;if(i)var g=i(l,f,u,t,n,h);if(!(g===e?Gi(f,l,d|p,i,h):g))return!1}}return!0}function Xi(e){return!(!Rl(e)||ha(e))&&(El(e)?mt:We).test(Ta(e))}function Zi(e){return xl(e)&&ji(e)==te}function eo(e){return xl(e)&&Xs(e)==ne}function to(e){return xl(e)&&Ol(e.length)&&!!Dt[ji(e)]}function no(e){return"function"==typeof e?e:null==e?Ah:"object"==typeof e?ul(e)?co(e[0],e[1]):ao(e):qh(e)}function ro(e){if(!pa(e))return Yt(e);var t=[];for(var n in rt(e))ht.call(e,n)&&"constructor"!=n&&t.push(n);return t}function io(e){if(!Rl(e))return _a(e);var t=pa(e),n=[];for(var r in e)"constructor"==r&&(t||!ht.call(e,r))||n.push(r);return n}function oo(e,t){return e<t}function so(e,t){var n=-1,r=fl(e)?Xe(e.length):[];return Si(e,(function(e,i,o){r[++n]=t(e,i,o)})),r}function ao(e){var t=Ks(e);return 1==t.length&&t[0][2]?ya(t[0][0],t[0][1]):function(n){return n===e||Ji(n,e,t)}}function co(t,n){return ua(t)&&ga(n)?ya(Aa(t),n):function(r){var i=mf(r,t);return i===e&&i===n?bf(r,t):Gi(n,i,d|p)}}function uo(t,n,r,i,o){t!==n&&ki(n,(function(s,a){if(o||(o=new Zr),Rl(s))lo(t,n,a,r,uo,i,o);else{var c=i?i(Oa(t,a),s,a+"",t,n,o):e;c===e&&(c=s),ui(t,a,c)}}),Rf)}function lo(t,n,r,i,o,s,a){var c=Oa(t,r),u=Oa(n,r),l=a.get(u);if(l)ui(t,r,l);else{var f=s?s(c,u,r+"",t,n,a):e,h=f===e;if(h){var d=ul(u),p=!d&&pl(u),g=!d&&!p&&Fl(u);f=u,d||p||g?ul(c)?f=c:hl(c)?f=os(c):p?(h=!1,f=Yo(u,!0)):g?(h=!1,f=es(u,!0)):f=[]:Ll(u)||cl(u)?(f=c,cl(c)?f=Xl(c):(!Rl(c)||El(c))&&(f=ra(u))):h=!1}h&&(a.set(u,f),o(f,u,i,s,a),a.delete(u)),ui(t,r,f)}}function fo(t,n){var r=t.length;if(r)return aa(n+=n<0?r:0,r)?t[n]:e}function ho(e,t,n){t=t.length?gn(t,(function(e){return ul(e)?function(t){return Li(t,1===e.length?e[0]:e)}:e})):[Ah];var r=-1;t=gn(t,jn(qs()));var i=so(e,(function(e,n,i){var o=gn(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return An(i,(function(e,t){return ns(e,t,n)}))}function po(e,t){return go(e,t,(function(t,n){return bf(e,n)}))}function go(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=Li(e,s);n(a,s)&&Ro(o,qo(s,e),a)}return o}function yo(e){return function(t){return Li(t,e)}}function vo(e,t,n,r){var i=r?xn:Rn,o=-1,s=t.length,a=e;for(e===t&&(t=os(t)),n&&(a=gn(e,jn(n)));++o<s;)for(var c=0,u=t[o],l=n?n(u):u;(c=i(a,l,c,r))>-1;)a!==e&&xt.call(a,c,1),xt.call(e,c,1);return e}function mo(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;aa(i)?xt.call(e,i,1):jo(e,i)}}return e}function _o(e,t){return e+Ft(wn()*(t-e+1))}function bo(e,t,n,r){for(var i=-1,o=Qt(Bt((t-e)/(n||1)),0),s=Xe(o);o--;)s[r?o:++i]=e,e+=n;return s}function wo(e,t){var n="";if(!e||t<1||t>T)return n;do{t%2&&(n+=e),(t=Ft(t/2))&&(e+=e)}while(t);return n}function Eo(e,t){return Ia(wa(e,t,Ah),e+"")}function So(e){return si($f(e))}function Oo(e,t){var n=$f(e);return ka(n,vi(t,0,n.length))}function Ro(t,n,r,i){if(!Rl(t))return t;for(var o=-1,s=(n=qo(n,t)).length,a=s-1,c=t;null!=c&&++o<s;){var u=Aa(n[o]),l=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return t;if(o!=a){var f=c[u];(l=i?i(f,u,c):e)===e&&(l=Rl(f)?f:aa(n[o+1])?[]:{})}li(c,u,l),c=c[u]}return t}var xo=pr?function(e,t){return pr.set(e,t),e}:Ah,Io=At?function(e,t){return At(e,"toString",{configurable:!0,enumerable:!1,value:Ch(t),writable:!0})}:Ah;function Co(e){return ka($f(e))}function Po(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Xe(i);++r<i;)o[r]=e[r+t];return o}function ko(e,t){var n;return Si(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function No(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=D){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!Bl(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return Ao(e,t,Ah,n)}function Ao(t,n,r,i){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(n=r(n))!=n,c=null===n,u=Bl(n),l=n===e;o<s;){var f=Ft((o+s)/2),h=r(t[f]),d=h!==e,p=null===h,g=h==h,y=Bl(h);if(a)var v=i||g;else v=l?g&&(i||d):c?g&&d&&(i||!p):u?g&&d&&!p&&(i||!y):!p&&!y&&(i?h<=n:h<n);v?o=f+1:s=f}return Xt(s,j)}function To(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!ol(a,c)){var c=a;o[i++]=0===s?0:s}}return o}function Mo(e){return"number"==typeof e?e:Bl(e)?L:+e}function Lo(e){if("string"==typeof e)return e;if(ul(e))return gn(e,Lo)+"";if(Bl(e))return Sr?Sr.call(e):"";var t=e+"";return"0"==t&&1/e==-A?"-0":t}function Uo(e,t,n){var i=-1,o=dn,s=e.length,a=!0,c=[],u=c;if(n)a=!1,o=pn;else if(s>=r){var l=t?null:ks(e);if(l)return Zn(l);a=!1,o=zn,u=new Qr}else u=t?[]:c;e:for(;++i<s;){var f=e[i],h=t?t(f):f;if(f=n||0!==f?f:0,a&&h==h){for(var d=u.length;d--;)if(u[d]===h)continue e;t&&u.push(h),c.push(f)}else o(u,h,n)||(u!==c&&u.push(h),c.push(f))}return c}function jo(e,t){return null==(e=Ea(e,t=qo(t,e)))||delete e[Aa(sc(t))]}function Do(e,t,n,r){return Ro(e,t,n(Li(e,t)),r)}function zo(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?Po(e,r?0:o,r?o+1:i):Po(e,r?o+1:0,r?i:o)}function Bo(e,t){var n=e;return n instanceof Cr&&(n=n.value()),vn(t,(function(e,t){return t.func.apply(t.thisArg,yn([e],t.args))}),n)}function Fo(e,t,n){var r=e.length;if(r<2)return r?Uo(e[0]):[];for(var i=-1,o=Xe(r);++i<r;)for(var s=e[i],a=-1;++a<r;)a!=i&&(o[i]=Ei(o[i]||s,e[a],t,n));return Uo(Pi(o,1),t,n)}function Ho(t,n,r){for(var i=-1,o=t.length,s=n.length,a={};++i<o;){var c=i<s?n[i]:e;r(a,t[i],c)}return a}function $o(e){return hl(e)?e:[]}function Vo(e){return"function"==typeof e?e:Ah}function qo(e,t){return ul(e)?e:ua(e,t)?[e]:Na(ef(e))}var Wo=Eo;function Ko(t,n,r){var i=t.length;return r=r===e?i:r,!n&&r>=i?t:Po(t,n,r)}var Go=Tt||function(e){return Gt.clearTimeout(e)};function Yo(e,t){if(t)return e.slice();var n=e.length,r=Et?Et(n):new e.constructor(n);return e.copy(r),r}function Qo(e){var t=new e.constructor(e.byteLength);return new wt(t).set(new wt(e)),t}function Jo(e,t){var n=t?Qo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Xo(e){var t=new e.constructor(e.source,$e.exec(e));return t.lastIndex=e.lastIndex,t}function Zo(e){return Er?rt(Er.call(e)):{}}function es(e,t){var n=t?Qo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ts(t,n){if(t!==n){var r=t!==e,i=null===t,o=t==t,s=Bl(t),a=n!==e,c=null===n,u=n==n,l=Bl(n);if(!c&&!l&&!s&&t>n||s&&a&&u&&!c&&!l||i&&a&&u||!r&&u||!o)return 1;if(!i&&!s&&!l&&t<n||l&&r&&o&&!i&&!s||c&&r&&o||!a&&o||!u)return-1}return 0}function ns(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var c=ts(i[r],o[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}function rs(e,t,n,r){for(var i=-1,o=e.length,s=n.length,a=-1,c=t.length,u=Qt(o-s,0),l=Xe(c+u),f=!r;++a<c;)l[a]=t[a];for(;++i<s;)(f||i<o)&&(l[n[i]]=e[i]);for(;u--;)l[a++]=e[i++];return l}function is(e,t,n,r){for(var i=-1,o=e.length,s=-1,a=n.length,c=-1,u=t.length,l=Qt(o-a,0),f=Xe(l+u),h=!r;++i<l;)f[i]=e[i];for(var d=i;++c<u;)f[d+c]=t[c];for(;++s<a;)(h||i<o)&&(f[d+n[s]]=e[i++]);return f}function os(e,t){var n=-1,r=e.length;for(t||(t=Xe(r));++n<r;)t[n]=e[n];return t}function ss(t,n,r,i){var o=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var c=n[s],u=i?i(r[c],t[c],c,r,t):e;u===e&&(u=t[c]),o?gi(r,c,u):li(r,c,u)}return r}function as(e,t){return ss(e,Qs(e),t)}function cs(e,t){return ss(e,Js(e),t)}function us(e,t){return function(n,r){var i=ul(n)?cn:hi,o=t?t():{};return i(n,e,qs(r,2),o)}}function ls(t){return Eo((function(n,r){var i=-1,o=r.length,s=o>1?r[o-1]:e,a=o>2?r[2]:e;for(s=t.length>3&&"function"==typeof s?(o--,s):e,a&&ca(r[0],r[1],a)&&(s=o<3?e:s,o=1),n=rt(n);++i<o;){var c=r[i];c&&t(n,c,i,s)}return n}))}function fs(e,t){return function(n,r){if(null==n)return n;if(!fl(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=rt(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function hs(e){return function(t,n,r){for(var i=-1,o=rt(t),s=r(t),a=s.length;a--;){var c=s[e?a:++i];if(!1===n(o[c],c,o))break}return t}}function ds(e,t,n){var r=t&g,i=ys(e);function o(){return(this&&this!==Gt&&this instanceof o?i:e).apply(r?n:this,arguments)}return o}function ps(t){return function(n){var r=Kn(n=ef(n))?ir(n):e,i=r?r[0]:n.charAt(0),o=r?Ko(r,1).join(""):n.slice(1);return i[t]()+o}}function gs(e){return function(t){return vn(Sh(Qf(t).replace(kt,"")),e,"")}}function ys(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Rr(e.prototype),r=e.apply(n,t);return Rl(r)?r:n}}function vs(t,n,r){var i=ys(t);function o(){for(var s=arguments.length,a=Xe(s),c=s,u=Vs(o);c--;)a[c]=arguments[c];var l=s<3&&a[0]!==u&&a[s-1]!==u?[]:Xn(a,u);return(s-=l.length)<r?Cs(t,n,bs,o.placeholder,e,a,l,e,e,r-s):an(this&&this!==Gt&&this instanceof o?i:t,this,a)}return o}function ms(t){return function(n,r,i){var o=rt(n);if(!fl(n)){var s=qs(r,3);n=Of(n),r=function(e){return s(o[e],e,o)}}var a=t(n,r,i);return a>-1?o[s?n[a]:a]:e}}function _s(t){return zs((function(n){var r=n.length,i=r,s=Ir.prototype.thru;for(t&&n.reverse();i--;){var a=n[i];if("function"!=typeof a)throw new st(o);if(s&&!c&&"wrapper"==$s(a))var c=new Ir([],!0)}for(i=c?i:r;++i<r;){var u=$s(a=n[i]),l="wrapper"==u?Hs(a):e;c=l&&fa(l[0])&&l[1]==(E|m|b|S)&&!l[4].length&&1==l[9]?c[$s(l[0])].apply(c,l[3]):1==a.length&&fa(a)?c[u]():c.thru(a)}return function(){var e=arguments,t=e[0];if(c&&1==e.length&&ul(t))return c.plant(t).value();for(var i=0,o=r?n[i].apply(this,e):t;++i<r;)o=n[i].call(this,o);return o}}))}function bs(t,n,r,i,o,s,a,c,u,l){var f=n&E,h=n&g,d=n&y,p=n&(m|_),v=n&O,b=d?e:ys(t);function w(){for(var e=arguments.length,g=Xe(e),y=e;y--;)g[y]=arguments[y];if(p)var m=Vs(w),_=Hn(g,m);if(i&&(g=rs(g,i,o,p)),s&&(g=is(g,s,a,p)),e-=_,p&&e<l){var E=Xn(g,m);return Cs(t,n,bs,w.placeholder,r,g,E,c,u,l-e)}var S=h?r:this,O=d?S[t]:t;return e=g.length,c?g=Sa(g,c):v&&e>1&&g.reverse(),f&&u<e&&(g.length=u),this&&this!==Gt&&this instanceof w&&(O=b||ys(O)),O.apply(S,g)}return w}function ws(e,t){return function(n,r){return $i(n,e,t(r),{})}}function Es(t,n){return function(r,i){var o;if(r===e&&i===e)return n;if(r!==e&&(o=r),i!==e){if(o===e)return i;"string"==typeof r||"string"==typeof i?(r=Lo(r),i=Lo(i)):(r=Mo(r),i=Mo(i)),o=t(r,i)}return o}}function Ss(e){return zs((function(t){return t=gn(t,jn(qs())),Eo((function(n){var r=this;return e(t,(function(e){return an(e,r,n)}))}))}))}function Os(t,n){var r=(n=n===e?" ":Lo(n)).length;if(r<2)return r?wo(n,t):n;var i=wo(n,Bt(t/rr(n)));return Kn(n)?Ko(ir(i),0,t).join(""):i.slice(0,t)}function Rs(e,t,n,r){var i=t&g,o=ys(e);function s(){for(var t=-1,a=arguments.length,c=-1,u=r.length,l=Xe(u+a),f=this&&this!==Gt&&this instanceof s?o:e;++c<u;)l[c]=r[c];for(;a--;)l[c++]=arguments[++t];return an(f,i?n:this,l)}return s}function xs(t){return function(n,r,i){return i&&"number"!=typeof i&&ca(n,r,i)&&(r=i=e),n=Gl(n),r===e?(r=n,n=0):r=Gl(r),bo(n,r,i=i===e?n<r?1:-1:Gl(i),t)}}function Is(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Jl(t),n=Jl(n)),e(t,n)}}function Cs(t,n,r,i,o,s,a,c,u,l){var f=n&m;n|=f?b:w,(n&=~(f?w:b))&v||(n&=~(g|y));var h=[t,n,o,f?s:e,f?a:e,f?e:s,f?e:a,c,u,l],d=r.apply(e,h);return fa(t)&&Ra(d,h),d.placeholder=i,Ca(d,t,n)}function Ps(e){var t=nt[e];return function(e,n){if(e=Jl(e),(n=null==n?0:Xt(Yl(n),292))&&Wt(e)){var r=(ef(e)+"e").split("e");return+((r=(ef(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var ks=lr&&1/Zn(new lr([,-0]))[1]==A?function(e){return new lr(e)}:Bh;function Ns(e){return function(t){var n=Xs(t);return n==Y?Qn(t):n==ne?er(t):Ln(t,e(t))}}function As(t,n,r,i,s,a,c,u){var l=n&y;if(!l&&"function"!=typeof t)throw new st(o);var f=i?i.length:0;if(f||(n&=~(b|w),i=s=e),c=c===e?c:Qt(Yl(c),0),u=u===e?u:Yl(u),f-=s?s.length:0,n&w){var h=i,d=s;i=s=e}var p=l?e:Hs(t),v=[t,n,r,i,s,h,d,a,c,u];if(p&&ma(v,p),t=v[0],n=v[1],r=v[2],i=v[3],s=v[4],!(u=v[9]=v[9]===e?l?0:t.length:Qt(v[9]-f,0))&&n&(m|_)&&(n&=~(m|_)),n&&n!=g)E=n==m||n==_?vs(t,n,u):n!=b&&n!=(g|b)||s.length?bs.apply(e,v):Rs(t,n,r,i);else var E=ds(t,n,r);return Ca((p?xo:Ra)(E,v),t,n)}function Ts(t,n,r,i){return t===e||ol(t,ut[r])&&!ht.call(i,r)?n:t}function Ms(t,n,r,i,o,s){return Rl(t)&&Rl(n)&&(s.set(n,t),uo(t,n,e,Ms,s),s.delete(n)),t}function Ls(t){return Ll(t)?e:t}function Us(t,n,r,i,o,s){var a=r&d,c=t.length,u=n.length;if(c!=u&&!(a&&u>c))return!1;var l=s.get(t),f=s.get(n);if(l&&f)return l==n&&f==t;var h=-1,g=!0,y=r&p?new Qr:e;for(s.set(t,n),s.set(n,t);++h<c;){var v=t[h],m=n[h];if(i)var _=a?i(m,v,h,n,t,s):i(v,m,h,t,n,s);if(_!==e){if(_)continue;g=!1;break}if(y){if(!_n(n,(function(e,t){if(!zn(y,t)&&(v===e||o(v,e,r,i,s)))return y.push(t)}))){g=!1;break}}else if(v!==m&&!o(v,m,r,i,s)){g=!1;break}}return s.delete(t),s.delete(n),g}function js(e,t,n,r,i,o,s){switch(n){case ue:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ce:return!(e.byteLength!=t.byteLength||!o(new wt(e),new wt(t)));case $:case V:case Q:return ol(+e,+t);case W:return e.name==t.name&&e.message==t.message;case te:case re:return e==t+"";case Y:var a=Qn;case ne:var c=r&d;if(a||(a=Zn),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=p,s.set(e,t);var l=Us(a(e),a(t),r,i,o,s);return s.delete(e),l;case ie:if(Er)return Er.call(e)==Er.call(t)}return!1}function Ds(t,n,r,i,o,s){var a=r&d,c=Bs(t),u=c.length;if(u!=Bs(n).length&&!a)return!1;for(var l=u;l--;){var f=c[l];if(!(a?f in n:ht.call(n,f)))return!1}var h=s.get(t),p=s.get(n);if(h&&p)return h==n&&p==t;var g=!0;s.set(t,n),s.set(n,t);for(var y=a;++l<u;){var v=t[f=c[l]],m=n[f];if(i)var _=a?i(m,v,f,n,t,s):i(v,m,f,t,n,s);if(!(_===e?v===m||o(v,m,r,i,s):_)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var b=t.constructor,w=n.constructor;b!=w&&"constructor"in t&&"constructor"in n&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(g=!1)}return s.delete(t),s.delete(n),g}function zs(t){return Ia(wa(t,e,Ya),t+"")}function Bs(e){return Ui(e,Of,Qs)}function Fs(e){return Ui(e,Rf,Js)}var Hs=pr?function(e){return pr.get(e)}:Bh;function $s(e){for(var t=e.name+"",n=gr[t],r=ht.call(gr,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Vs(e){return(ht.call(Or,"placeholder")?Or:e).placeholder}function qs(){var e=Or.iteratee||Th;return e=e===Th?no:e,arguments.length?e(arguments[0],arguments[1]):e}function Ws(e,t){var n=e.__data__;return la(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ks(e){for(var t=Of(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ga(i)]}return t}function Gs(t,n){var r=Wn(t,n);return Xi(r)?r:e}function Ys(t){var n=ht.call(t,Pt),r=t[Pt];try{t[Pt]=e;var i=!0}catch{}var o=gt.call(t);return i&&(n?t[Pt]=r:delete t[Pt]),o}var Qs=Ht?function(e){return null==e?[]:(e=rt(e),hn(Ht(e),(function(t){return Rt.call(e,t)})))}:Yh,Js=Ht?function(e){for(var t=[];e;)yn(t,Qs(e)),e=St(e);return t}:Yh,Xs=ji;function Zs(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=Xt(t,e+s);break;case"takeRight":e=Qt(e,t-s)}}return{start:e,end:t}}function ea(e){var t=e.match(je);return t?t[1].split(De):[]}function ta(e,t,n){for(var r=-1,i=(t=qo(t,e)).length,o=!1;++r<i;){var s=Aa(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ol(i)&&aa(s,i)&&(ul(e)||cl(e))}function na(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ht.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function ra(e){return"function"!=typeof e.constructor||pa(e)?{}:Rr(St(e))}function ia(e,t,n){var r=e.constructor;switch(t){case ce:return Qo(e);case $:case V:return new r(+e);case ue:return Jo(e,n);case le:case fe:case he:case de:case pe:case ge:case ye:case ve:case me:return es(e,n);case Y:return new r;case Q:case re:return new r(e);case te:return Xo(e);case ne:return new r;case ie:return Zo(e)}}function oa(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Ue,"{\n/* [wrapped with "+t+"] */\n")}function sa(e){return ul(e)||cl(e)||!!(It&&e&&e[It])}function aa(e,t){var n=typeof e;return!!(t=t??T)&&("number"==n||"symbol"!=n&&Ge.test(e))&&e>-1&&e%1==0&&e<t}function ca(e,t,n){if(!Rl(n))return!1;var r=typeof t;return!!("number"==r?fl(n)&&aa(t,n.length):"string"==r&&t in n)&&ol(n[t],e)}function ua(e,t){if(ul(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Bl(e))||ke.test(e)||!Pe.test(e)||null!=t&&e in rt(t)}function la(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function fa(e){var t=$s(e),n=Or[t];if("function"!=typeof n||!(t in Cr.prototype))return!1;if(e===n)return!0;var r=Hs(n);return!!r&&e===r[0]}function ha(e){return!!pt&&pt in e}(tr&&Xs(new tr(new ArrayBuffer(1)))!=ue||ar&&Xs(new ar)!=Y||cr&&Xs(cr.resolve())!=Z||lr&&Xs(new lr)!=ne||hr&&Xs(new hr)!=se)&&(Xs=function(t){var n=ji(t),r=n==X?t.constructor:e,i=r?Ta(r):"";if(i)switch(i){case yr:return ue;case vr:return Y;case mr:return Z;case _r:return ne;case br:return se}return n});var da=lt?El:Qh;function pa(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ut)}function ga(e){return e==e&&!Rl(e)}function ya(t,n){return function(r){return null!=r&&r[t]===n&&(n!==e||t in rt(r))}}function va(e){var t=Fu(e,(function(e){return n.size===c&&n.clear(),e})),n=t.cache;return t}function ma(e,t){var n=e[1],r=t[1],i=n|r,o=i<(g|y|E),s=r==E&&n==m||r==E&&n==S&&e[7].length<=t[8]||r==(E|S)&&t[7].length<=t[8]&&n==m;if(!o&&!s)return e;r&g&&(e[2]=t[2],i|=n&g?0:v);var a=t[3];if(a){var c=e[3];e[3]=c?rs(c,a,t[4]):a,e[4]=c?Xn(e[3],u):t[4]}return(a=t[5])&&(c=e[5],e[5]=c?is(c,a,t[6]):a,e[6]=c?Xn(e[5],u):t[6]),(a=t[7])&&(e[7]=a),r&E&&(e[8]=null==e[8]?t[8]:Xt(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function _a(e){var t=[];if(null!=e)for(var n in rt(e))t.push(n);return t}function ba(e){return gt.call(e)}function wa(t,n,r){return n=Qt(n===e?t.length-1:n,0),function(){for(var e=arguments,i=-1,o=Qt(e.length-n,0),s=Xe(o);++i<o;)s[i]=e[n+i];i=-1;for(var a=Xe(n+1);++i<n;)a[i]=e[i];return a[n]=r(s),an(t,this,a)}}function Ea(e,t){return t.length<2?e:Li(e,Po(t,0,-1))}function Sa(t,n){for(var r=t.length,i=Xt(n.length,r),o=os(t);i--;){var s=n[i];t[i]=aa(s,r)?o[s]:e}return t}function Oa(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ra=Pa(xo),xa=Lt||function(e,t){return Gt.setTimeout(e,t)},Ia=Pa(Io);function Ca(e,t,n){var r=t+"";return Ia(e,oa(r,Ma(ea(r),n)))}function Pa(t){var n=0,r=0;return function(){var i=Zt(),o=C-(i-r);if(r=i,o>0){if(++n>=I)return arguments[0]}else n=0;return t.apply(e,arguments)}}function ka(t,n){var r=-1,i=t.length,o=i-1;for(n=n===e?i:n;++r<n;){var s=_o(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=n,t}var Na=va((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ne,(function(e,n,r,i){t.push(r?i.replace(Fe,"$1"):n||e)})),t}));function Aa(e){if("string"==typeof e||Bl(e))return e;var t=e+"";return"0"==t&&1/e==-A?"-0":t}function Ta(e){if(null!=e){try{return ft.call(e)}catch{}try{return e+""}catch{}}return""}function Ma(e,t){return un(z,(function(n){var r="_."+n[0];t&n[1]&&!dn(e,r)&&e.push(r)})),e.sort()}function La(e){if(e instanceof Cr)return e.clone();var t=new Ir(e.__wrapped__,e.__chain__);return t.__actions__=os(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Ua(t,n,r){n=(r?ca(t,n,r):n===e)?1:Qt(Yl(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,s=0,a=Xe(Bt(i/n));o<i;)a[s++]=Po(t,o,o+=n);return a}function ja(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i}function Da(){var e=arguments.length;if(!e)return[];for(var t=Xe(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return yn(ul(n)?os(n):[n],Pi(t,1))}var za=Eo((function(e,t){return hl(e)?Ei(e,Pi(t,1,hl,!0)):[]})),Ba=Eo((function(t,n){var r=sc(n);return hl(r)&&(r=e),hl(t)?Ei(t,Pi(n,1,hl,!0),qs(r,2)):[]})),Fa=Eo((function(t,n){var r=sc(n);return hl(r)&&(r=e),hl(t)?Ei(t,Pi(n,1,hl,!0),e,r):[]}));function Ha(t,n,r){var i=null==t?0:t.length;return i?Po(t,(n=r||n===e?1:Yl(n))<0?0:n,i):[]}function $a(t,n,r){var i=null==t?0:t.length;return i?Po(t,0,(n=i-(n=r||n===e?1:Yl(n)))<0?0:n):[]}function Va(e,t){return e&&e.length?zo(e,qs(t,3),!0,!0):[]}function qa(e,t){return e&&e.length?zo(e,qs(t,3),!0):[]}function Wa(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&ca(e,t,n)&&(n=0,r=i),Ii(e,t,n,r)):[]}function Ka(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Yl(n);return i<0&&(i=Qt(r+i,0)),On(e,qs(t,3),i)}function Ga(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return r!==e&&(o=Yl(r),o=r<0?Qt(i+o,0):Xt(o,i-1)),On(t,qs(n,3),o,!0)}function Ya(e){return null!=e&&e.length?Pi(e,1):[]}function Qa(e){return null!=e&&e.length?Pi(e,A):[]}function Ja(t,n){return null!=t&&t.length?Pi(t,n=n===e?1:Yl(n)):[]}function Xa(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}function Za(t){return t&&t.length?t[0]:e}function ec(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Yl(n);return i<0&&(i=Qt(r+i,0)),Rn(e,t,i)}function tc(e){return null!=e&&e.length?Po(e,0,-1):[]}var nc=Eo((function(e){var t=gn(e,$o);return t.length&&t[0]===e[0]?Hi(t):[]})),rc=Eo((function(t){var n=sc(t),r=gn(t,$o);return n===sc(r)?n=e:r.pop(),r.length&&r[0]===t[0]?Hi(r,qs(n,2)):[]})),ic=Eo((function(t){var n=sc(t),r=gn(t,$o);return(n="function"==typeof n?n:e)&&r.pop(),r.length&&r[0]===t[0]?Hi(r,e,n):[]}));function oc(e,t){return null==e?"":Kt.call(e,t)}function sc(t){var n=null==t?0:t.length;return n?t[n-1]:e}function ac(t,n,r){var i=null==t?0:t.length;if(!i)return-1;var o=i;return r!==e&&(o=(o=Yl(r))<0?Qt(i+o,0):Xt(o,i-1)),n==n?nr(t,n,o):On(t,In,o,!0)}function cc(t,n){return t&&t.length?fo(t,Yl(n)):e}var uc=Eo(lc);function lc(e,t){return e&&e.length&&t&&t.length?vo(e,t):e}function fc(e,t,n){return e&&e.length&&t&&t.length?vo(e,t,qs(n,2)):e}function hc(t,n,r){return t&&t.length&&n&&n.length?vo(t,n,e,r):t}var dc=zs((function(e,t){var n=null==e?0:e.length,r=yi(e,t);return mo(e,gn(t,(function(e){return aa(e,n)?+e:e})).sort(ts)),r}));function pc(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=qs(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return mo(e,i),n}function gc(e){return null==e?e:kn.call(e)}function yc(t,n,r){var i=null==t?0:t.length;return i?(r&&"number"!=typeof r&&ca(t,n,r)?(n=0,r=i):(n=null==n?0:Yl(n),r=r===e?i:Yl(r)),Po(t,n,r)):[]}function vc(e,t){return No(e,t)}function mc(e,t,n){return Ao(e,t,qs(n,2))}function _c(e,t){var n=null==e?0:e.length;if(n){var r=No(e,t);if(r<n&&ol(e[r],t))return r}return-1}function bc(e,t){return No(e,t,!0)}function wc(e,t,n){return Ao(e,t,qs(n,2),!0)}function Ec(e,t){if(null!=e&&e.length){var n=No(e,t,!0)-1;if(ol(e[n],t))return n}return-1}function Sc(e){return e&&e.length?To(e):[]}function Oc(e,t){return e&&e.length?To(e,qs(t,2)):[]}function Rc(e){var t=null==e?0:e.length;return t?Po(e,1,t):[]}function xc(t,n,r){return t&&t.length?Po(t,0,(n=r||n===e?1:Yl(n))<0?0:n):[]}function Ic(t,n,r){var i=null==t?0:t.length;return i?Po(t,(n=i-(n=r||n===e?1:Yl(n)))<0?0:n,i):[]}function Cc(e,t){return e&&e.length?zo(e,qs(t,3),!1,!0):[]}function Pc(e,t){return e&&e.length?zo(e,qs(t,3)):[]}var kc=Eo((function(e){return Uo(Pi(e,1,hl,!0))})),Nc=Eo((function(t){var n=sc(t);return hl(n)&&(n=e),Uo(Pi(t,1,hl,!0),qs(n,2))})),Ac=Eo((function(t){var n=sc(t);return n="function"==typeof n?n:e,Uo(Pi(t,1,hl,!0),e,n)}));function Tc(e){return e&&e.length?Uo(e):[]}function Mc(e,t){return e&&e.length?Uo(e,qs(t,2)):[]}function Lc(t,n){return n="function"==typeof n?n:e,t&&t.length?Uo(t,e,n):[]}function Uc(e){if(!e||!e.length)return[];var t=0;return e=hn(e,(function(e){if(hl(e))return t=Qt(e.length,t),!0})),Mn(t,(function(t){return gn(e,Pn(t))}))}function jc(t,n){if(!t||!t.length)return[];var r=Uc(t);return null==n?r:gn(r,(function(t){return an(n,e,t)}))}var Dc=Eo((function(e,t){return hl(e)?Ei(e,t):[]})),zc=Eo((function(e){return Fo(hn(e,hl))})),Bc=Eo((function(t){var n=sc(t);return hl(n)&&(n=e),Fo(hn(t,hl),qs(n,2))})),Fc=Eo((function(t){var n=sc(t);return n="function"==typeof n?n:e,Fo(hn(t,hl),e,n)})),Hc=Eo(Uc);function $c(e,t){return Ho(e||[],t||[],li)}function Vc(e,t){return Ho(e||[],t||[],Ro)}var qc=Eo((function(t){var n=t.length,r=n>1?t[n-1]:e;return r="function"==typeof r?(t.pop(),r):e,jc(t,r)}));function Wc(e){var t=Or(e);return t.__chain__=!0,t}function Kc(e,t){return t(e),e}function Gc(e,t){return t(e)}var Yc=zs((function(t){var n=t.length,r=n?t[0]:0,i=this.__wrapped__,o=function(e){return yi(e,t)};return!(n>1||this.__actions__.length)&&i instanceof Cr&&aa(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:Gc,args:[o],thisArg:e}),new Ir(i,this.__chain__).thru((function(t){return n&&!t.length&&t.push(e),t}))):this.thru(o)}));function Qc(){return Wc(this)}function Jc(){return new Ir(this.value(),this.__chain__)}function Xc(){this.__values__===e&&(this.__values__=Kl(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?e:this.__values__[this.__index__++]}}function Zc(){return this}function eu(t){for(var n,r=this;r instanceof xr;){var i=La(r);i.__index__=0,i.__values__=e,n?o.__wrapped__=i:n=i;var o=i;r=r.__wrapped__}return o.__wrapped__=t,n}function tu(){var t=this.__wrapped__;if(t instanceof Cr){var n=t;return this.__actions__.length&&(n=new Cr(this)),(n=n.reverse()).__actions__.push({func:Gc,args:[gc],thisArg:e}),new Ir(n,this.__chain__)}return this.thru(gc)}function nu(){return Bo(this.__wrapped__,this.__actions__)}var ru=us((function(e,t,n){ht.call(e,n)?++e[n]:gi(e,n,1)}));function iu(t,n,r){var i=ul(t)?fn:Ri;return r&&ca(t,n,r)&&(n=e),i(t,qs(n,3))}function ou(e,t){return(ul(e)?hn:Ci)(e,qs(t,3))}var su=ms(Ka),au=ms(Ga);function cu(e,t){return Pi(vu(e,t),1)}function uu(e,t){return Pi(vu(e,t),A)}function lu(t,n,r){return r=r===e?1:Yl(r),Pi(vu(t,n),r)}function fu(e,t){return(ul(e)?un:Si)(e,qs(t,3))}function hu(e,t){return(ul(e)?ln:Oi)(e,qs(t,3))}var du=us((function(e,t,n){ht.call(e,n)?e[n].push(t):gi(e,n,[t])}));function pu(e,t,n,r){e=fl(e)?e:$f(e),n=n&&!r?Yl(n):0;var i=e.length;return n<0&&(n=Qt(i+n,0)),zl(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Rn(e,t,n)>-1}var gu=Eo((function(e,t,n){var r=-1,i="function"==typeof t,o=fl(e)?Xe(e.length):[];return Si(e,(function(e){o[++r]=i?an(t,e,n):Vi(e,t,n)})),o})),yu=us((function(e,t,n){gi(e,n,t)}));function vu(e,t){return(ul(e)?gn:so)(e,qs(t,3))}function mu(t,n,r,i){return null==t?[]:(ul(n)||(n=null==n?[]:[n]),ul(r=i?e:r)||(r=null==r?[]:[r]),ho(t,n,r))}var _u=us((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));function bu(e,t,n){var r=ul(e)?vn:Nn,i=arguments.length<3;return r(e,qs(t,4),n,i,Si)}function wu(e,t,n){var r=ul(e)?mn:Nn,i=arguments.length<3;return r(e,qs(t,4),n,i,Oi)}function Eu(e,t){return(ul(e)?hn:Ci)(e,Hu(qs(t,3)))}function Su(e){return(ul(e)?si:So)(e)}function Ou(t,n,r){return n=(r?ca(t,n,r):n===e)?1:Yl(n),(ul(t)?ai:Oo)(t,n)}function Ru(e){return(ul(e)?ci:Co)(e)}function xu(e){if(null==e)return 0;if(fl(e))return zl(e)?rr(e):e.length;var t=Xs(e);return t==Y||t==ne?e.size:ro(e).length}function Iu(t,n,r){var i=ul(t)?_n:ko;return r&&ca(t,n,r)&&(n=e),i(t,qs(n,3))}var Cu=Eo((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ca(e,t[0],t[1])?t=[]:n>2&&ca(t[0],t[1],t[2])&&(t=[t[0]]),ho(e,Pi(t,1),[])})),Pu=Mt||function(){return Gt.Date.now()};function ku(e,t){if("function"!=typeof t)throw new st(o);return e=Yl(e),function(){if(--e<1)return t.apply(this,arguments)}}function Nu(t,n,r){return n=r?e:n,n=t&&null==n?t.length:n,As(t,E,e,e,e,e,n)}function Au(t,n){var r;if("function"!=typeof n)throw new st(o);return t=Yl(t),function(){return--t>0&&(r=n.apply(this,arguments)),t<=1&&(n=e),r}}var Tu=Eo((function(e,t,n){var r=g;if(n.length){var i=Xn(n,Vs(Tu));r|=b}return As(e,r,t,n,i)})),Mu=Eo((function(e,t,n){var r=g|y;if(n.length){var i=Xn(n,Vs(Mu));r|=b}return As(t,r,e,n,i)}));function Lu(t,n,r){var i=As(t,m,e,e,e,e,e,n=r?e:n);return i.placeholder=Lu.placeholder,i}function Uu(t,n,r){var i=As(t,_,e,e,e,e,e,n=r?e:n);return i.placeholder=Uu.placeholder,i}function ju(t,n,r){var i,s,a,c,u,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new st(o);function g(n){var r=i,o=s;return i=s=e,f=n,c=t.apply(o,r)}function y(e){return f=e,u=xa(_,n),h?g(e):c}function v(e){var t=n-(e-l);return d?Xt(t,a-(e-f)):t}function m(t){var r=t-l;return l===e||r>=n||r<0||d&&t-f>=a}function _(){var e=Pu();if(m(e))return b(e);u=xa(_,v(e))}function b(t){return u=e,p&&i?g(t):(i=s=e,c)}function w(){u!==e&&Go(u),f=0,i=l=s=u=e}function E(){return u===e?c:b(Pu())}function S(){var t=Pu(),r=m(t);if(i=arguments,s=this,l=t,r){if(u===e)return y(l);if(d)return Go(u),u=xa(_,n),g(l)}return u===e&&(u=xa(_,n)),c}return n=Jl(n)||0,Rl(r)&&(h=!!r.leading,a=(d="maxWait"in r)?Qt(Jl(r.maxWait)||0,n):a,p="trailing"in r?!!r.trailing:p),S.cancel=w,S.flush=E,S}var Du=Eo((function(e,t){return wi(e,1,t)})),zu=Eo((function(e,t,n){return wi(e,Jl(t)||0,n)}));function Bu(e){return As(e,O)}function Fu(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new st(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Fu.Cache||Vr),n}function Hu(e){if("function"!=typeof e)throw new st(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function $u(e){return Au(2,e)}Fu.Cache=Vr;var Vu=Wo((function(e,t){var n=(t=1==t.length&&ul(t[0])?gn(t[0],jn(qs())):gn(Pi(t,1),jn(qs()))).length;return Eo((function(r){for(var i=-1,o=Xt(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return an(e,this,r)}))})),qu=Eo((function(t,n){var r=Xn(n,Vs(qu));return As(t,b,e,n,r)})),Wu=Eo((function(t,n){var r=Xn(n,Vs(Wu));return As(t,w,e,n,r)})),Ku=zs((function(t,n){return As(t,S,e,e,e,n)}));function Gu(t,n){if("function"!=typeof t)throw new st(o);return Eo(t,n=n===e?n:Yl(n))}function Yu(e,t){if("function"!=typeof e)throw new st(o);return t=null==t?0:Qt(Yl(t),0),Eo((function(n){var r=n[t],i=Ko(n,0,t);return r&&yn(i,r),an(e,this,i)}))}function Qu(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new st(o);return Rl(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ju(e,t,{leading:r,maxWait:t,trailing:i})}function Ju(e){return Nu(e,1)}function Xu(e,t){return qu(Vo(t),e)}function Zu(){if(!arguments.length)return[];var e=arguments[0];return ul(e)?e:[e]}function el(e){return mi(e,h)}function tl(t,n){return mi(t,h,n="function"==typeof n?n:e)}function nl(e){return mi(e,l|h)}function rl(t,n){return mi(t,l|h,n="function"==typeof n?n:e)}function il(e,t){return null==t||bi(e,t,Of(t))}function ol(e,t){return e===t||e!=e&&t!=t}var sl=Is(Di),al=Is((function(e,t){return e>=t})),cl=qi(function(){return arguments}())?qi:function(e){return xl(e)&&ht.call(e,"callee")&&!Rt.call(e,"callee")},ul=Xe.isArray,ll=en?jn(en):Wi;function fl(e){return null!=e&&Ol(e.length)&&!El(e)}function hl(e){return xl(e)&&fl(e)}function dl(e){return!0===e||!1===e||xl(e)&&ji(e)==$}var pl=$t||Qh,gl=tn?jn(tn):Ki;function yl(e){return xl(e)&&1===e.nodeType&&!Ll(e)}function vl(e){if(null==e)return!0;if(fl(e)&&(ul(e)||"string"==typeof e||"function"==typeof e.splice||pl(e)||Fl(e)||cl(e)))return!e.length;var t=Xs(e);if(t==Y||t==ne)return!e.size;if(pa(e))return!ro(e).length;for(var n in e)if(ht.call(e,n))return!1;return!0}function ml(e,t){return Gi(e,t)}function _l(t,n,r){var i=(r="function"==typeof r?r:e)?r(t,n):e;return i===e?Gi(t,n,e,r):!!i}function bl(e){if(!xl(e))return!1;var t=ji(e);return t==W||t==q||"string"==typeof e.message&&"string"==typeof e.name&&!Ll(e)}function wl(e){return"number"==typeof e&&Wt(e)}function El(e){if(!Rl(e))return!1;var t=ji(e);return t==K||t==G||t==H||t==ee}function Sl(e){return"number"==typeof e&&e==Yl(e)}function Ol(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=T}function Rl(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xl(e){return null!=e&&"object"==typeof e}var Il=nn?jn(nn):Qi;function Cl(e,t){return e===t||Ji(e,t,Ks(t))}function Pl(t,n,r){return r="function"==typeof r?r:e,Ji(t,n,Ks(n),r)}function kl(e){return Ml(e)&&e!=+e}function Nl(e){if(da(e))throw new et(i);return Xi(e)}function Al(e){return null===e}function Tl(e){return null==e}function Ml(e){return"number"==typeof e||xl(e)&&ji(e)==Q}function Ll(e){if(!xl(e)||ji(e)!=X)return!1;var t=St(e);if(null===t)return!0;var n=ht.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&ft.call(n)==yt}var Ul=rn?jn(rn):Zi;function jl(e){return Sl(e)&&e>=-T&&e<=T}var Dl=on?jn(on):eo;function zl(e){return"string"==typeof e||!ul(e)&&xl(e)&&ji(e)==re}function Bl(e){return"symbol"==typeof e||xl(e)&&ji(e)==ie}var Fl=sn?jn(sn):to;function Hl(t){return t===e}function $l(e){return xl(e)&&Xs(e)==se}function Vl(e){return xl(e)&&ji(e)==ae}var ql=Is(oo),Wl=Is((function(e,t){return e<=t}));function Kl(e){if(!e)return[];if(fl(e))return zl(e)?ir(e):os(e);if(Ct&&e[Ct])return Yn(e[Ct]());var t=Xs(e);return(t==Y?Qn:t==ne?Zn:$f)(e)}function Gl(e){return e?(e=Jl(e))===A||e===-A?(e<0?-1:1)*M:e==e?e:0:0===e?e:0}function Yl(e){var t=Gl(e),n=t%1;return t==t?n?t-n:t:0}function Ql(e){return e?vi(Yl(e),0,U):0}function Jl(e){if("number"==typeof e)return e;if(Bl(e))return L;if(Rl(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Rl(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Un(e);var n=qe.test(e);return n||Ke.test(e)?qt(e.slice(2),n?2:8):Ve.test(e)?L:+e}function Xl(e){return ss(e,Rf(e))}function Zl(e){return e?vi(Yl(e),-T,T):0===e?e:0}function ef(e){return null==e?"":Lo(e)}var tf=ls((function(e,t){if(pa(t)||fl(t))ss(t,Of(t),e);else for(var n in t)ht.call(t,n)&&li(e,n,t[n])})),nf=ls((function(e,t){ss(t,Rf(t),e)})),rf=ls((function(e,t,n,r){ss(t,Rf(t),e,r)})),of=ls((function(e,t,n,r){ss(t,Of(t),e,r)})),sf=zs(yi);function af(e,t){var n=Rr(e);return null==t?n:di(n,t)}var cf=Eo((function(t,n){t=rt(t);var r=-1,i=n.length,o=i>2?n[2]:e;for(o&&ca(n[0],n[1],o)&&(i=1);++r<i;)for(var s=n[r],a=Rf(s),c=-1,u=a.length;++c<u;){var l=a[c],f=t[l];(f===e||ol(f,ut[l])&&!ht.call(t,l))&&(t[l]=s[l])}return t})),uf=Eo((function(t){return t.push(e,Ms),an(Pf,e,t)}));function lf(e,t){return Sn(e,qs(t,3),Ai)}function ff(e,t){return Sn(e,qs(t,3),Ti)}function hf(e,t){return null==e?e:ki(e,qs(t,3),Rf)}function df(e,t){return null==e?e:Ni(e,qs(t,3),Rf)}function pf(e,t){return e&&Ai(e,qs(t,3))}function gf(e,t){return e&&Ti(e,qs(t,3))}function yf(e){return null==e?[]:Mi(e,Of(e))}function vf(e){return null==e?[]:Mi(e,Rf(e))}function mf(t,n,r){var i=null==t?e:Li(t,n);return i===e?r:i}function _f(e,t){return null!=e&&ta(e,t,zi)}function bf(e,t){return null!=e&&ta(e,t,Bi)}var wf=ws((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=gt.call(t)),e[t]=n}),Ch(Ah)),Ef=ws((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=gt.call(t)),ht.call(e,t)?e[t].push(n):e[t]=[n]}),qs),Sf=Eo(Vi);function Of(e){return fl(e)?oi(e):ro(e)}function Rf(e){return fl(e)?oi(e,!0):io(e)}function xf(e,t){var n={};return t=qs(t,3),Ai(e,(function(e,r,i){gi(n,t(e,r,i),e)})),n}function If(e,t){var n={};return t=qs(t,3),Ai(e,(function(e,r,i){gi(n,r,t(e,r,i))})),n}var Cf=ls((function(e,t,n){uo(e,t,n)})),Pf=ls((function(e,t,n,r){uo(e,t,n,r)})),kf=zs((function(e,t){var n={};if(null==e)return n;var r=!1;t=gn(t,(function(t){return t=qo(t,e),r||(r=t.length>1),t})),ss(e,Fs(e),n),r&&(n=mi(n,l|f|h,Ls));for(var i=t.length;i--;)jo(n,t[i]);return n}));function Nf(e,t){return Tf(e,Hu(qs(t)))}var Af=zs((function(e,t){return null==e?{}:po(e,t)}));function Tf(e,t){if(null==e)return{};var n=gn(Fs(e),(function(e){return[e]}));return t=qs(t),go(e,n,(function(e,n){return t(e,n[0])}))}function Mf(t,n,r){var i=-1,o=(n=qo(n,t)).length;for(o||(o=1,t=e);++i<o;){var s=null==t?e:t[Aa(n[i])];s===e&&(i=o,s=r),t=El(s)?s.call(t):s}return t}function Lf(e,t,n){return null==e?e:Ro(e,t,n)}function Uf(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Ro(t,n,r,i)}var jf=Ns(Of),Df=Ns(Rf);function zf(e,t,n){var r=ul(e),i=r||pl(e)||Fl(e);if(t=qs(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Rl(e)&&El(o)?Rr(St(e)):{}}return(i?un:Ai)(e,(function(e,r,i){return t(n,e,r,i)})),n}function Bf(e,t){return null==e||jo(e,t)}function Ff(e,t,n){return null==e?e:Do(e,t,Vo(n))}function Hf(t,n,r,i){return i="function"==typeof i?i:e,null==t?t:Do(t,n,Vo(r),i)}function $f(e){return null==e?[]:Dn(e,Of(e))}function Vf(e){return null==e?[]:Dn(e,Rf(e))}function qf(t,n,r){return r===e&&(r=n,n=e),r!==e&&(r=(r=Jl(r))==r?r:0),n!==e&&(n=(n=Jl(n))==n?n:0),vi(Jl(t),n,r)}function Wf(t,n,r){return n=Gl(n),r===e?(r=n,n=0):r=Gl(r),Fi(t=Jl(t),n,r)}function Kf(t,n,r){if(r&&"boolean"!=typeof r&&ca(t,n,r)&&(n=r=e),r===e&&("boolean"==typeof n?(r=n,n=e):"boolean"==typeof t&&(r=t,t=e)),t===e&&n===e?(t=0,n=1):(t=Gl(t),n===e?(n=t,t=0):n=Gl(n)),t>n){var i=t;t=n,n=i}if(r||t%1||n%1){var o=wn();return Xt(t+o*(n-t+Vt("1e-"+((o+"").length-1))),n)}return _o(t,n)}var Gf=gs((function(e,t,n){return t=t.toLowerCase(),e+(n?Yf(t):t)}));function Yf(e){return Eh(ef(e).toLowerCase())}function Qf(e){return(e=ef(e))&&e.replace(Ye,$n).replace(Nt,"")}function Jf(t,n,r){t=ef(t),n=Lo(n);var i=t.length,o=r=r===e?i:vi(Yl(r),0,i);return(r-=n.length)>=0&&t.slice(r,o)==n}function Xf(e){return(e=ef(e))&&Re.test(e)?e.replace(Se,Vn):e}function Zf(e){return(e=ef(e))&&Te.test(e)?e.replace(Ae,"\\$&"):e}var eh=gs((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),th=gs((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),nh=ps("toLowerCase");function rh(e,t,n){e=ef(e);var r=(t=Yl(t))?rr(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Os(Ft(i),n)+e+Os(Bt(i),n)}function ih(e,t,n){e=ef(e);var r=(t=Yl(t))?rr(e):0;return t&&r<t?e+Os(t-r,n):e}function oh(e,t,n){e=ef(e);var r=(t=Yl(t))?rr(e):0;return t&&r<t?Os(t-r,n)+e:e}function sh(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(ef(e).replace(Me,""),t||0)}function ah(t,n,r){return n=(r?ca(t,n,r):n===e)?1:Yl(n),wo(ef(t),n)}function ch(){var e=arguments,t=ef(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var uh=gs((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));function lh(t,n,r){return r&&"number"!=typeof r&&ca(t,n,r)&&(n=r=e),(r=r===e?U:r>>>0)?(t=ef(t))&&("string"==typeof n||null!=n&&!Ul(n))&&!(n=Lo(n))&&Kn(t)?Ko(ir(t),0,r):t.split(n,r):[]}var fh=gs((function(e,t,n){return e+(n?" ":"")+Eh(t)}));function hh(e,t,n){return e=ef(e),n=null==n?0:vi(Yl(n),0,e.length),t=Lo(t),e.slice(n,n+t.length)==t}function dh(t,n,r){var i=Or.templateSettings;r&&ca(t,n,r)&&(n=e),t=ef(t),n=rf({},n,i,Ts);var o,a,c=rf({},n.imports,i.imports,Ts),u=Of(c),l=Dn(c,u),f=0,h=n.interpolate||Qe,d="__p += '",p=it((n.escape||Qe).source+"|"+h.source+"|"+(h===Ce?He:Qe).source+"|"+(n.evaluate||Qe).source+"|$","g"),g="//# sourceURL="+(ht.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++jt+"]")+"\n";t.replace(p,(function(e,n,r,i,s,c){return r||(r=i),d+=t.slice(f,c).replace(Je,qn),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=c+e.length,e})),d+="';\n";var y=ht.call(n,"variable")&&n.variable;if(y){if(Be.test(y))throw new et(s)}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(_e,""):d).replace(be,"$1").replace(we,"$1;"),d="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Oh((function(){return tt(u,g+"return "+d).apply(e,l)}));if(v.source=d,bl(v))throw v;return v}function ph(e){return ef(e).toLowerCase()}function gh(e){return ef(e).toUpperCase()}function yh(t,n,r){if((t=ef(t))&&(r||n===e))return Un(t);if(!t||!(n=Lo(n)))return t;var i=ir(t),o=ir(n);return Ko(i,Bn(i,o),Fn(i,o)+1).join("")}function vh(t,n,r){if((t=ef(t))&&(r||n===e))return t.slice(0,or(t)+1);if(!t||!(n=Lo(n)))return t;var i=ir(t);return Ko(i,0,Fn(i,ir(n))+1).join("")}function mh(t,n,r){if((t=ef(t))&&(r||n===e))return t.replace(Me,"");if(!t||!(n=Lo(n)))return t;var i=ir(t);return Ko(i,Bn(i,ir(n))).join("")}function _h(t,n){var r=R,i=x;if(Rl(n)){var o="separator"in n?n.separator:o;r="length"in n?Yl(n.length):r,i="omission"in n?Lo(n.omission):i}var s=(t=ef(t)).length;if(Kn(t)){var a=ir(t);s=a.length}if(r>=s)return t;var c=r-rr(i);if(c<1)return i;var u=a?Ko(a,0,c).join(""):t.slice(0,c);if(o===e)return u+i;if(a&&(c+=u.length-c),Ul(o)){if(t.slice(c).search(o)){var l,f=u;for(o.global||(o=it(o.source,ef($e.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;u=u.slice(0,h===e?c:h)}}else if(t.indexOf(Lo(o),c)!=c){var d=u.lastIndexOf(o);d>-1&&(u=u.slice(0,d))}return u+i}function bh(e){return(e=ef(e))&&Oe.test(e)?e.replace(Ee,sr):e}var wh=gs((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Eh=ps("toUpperCase");function Sh(t,n,r){return t=ef(t),(n=r?e:n)===e?Gn(t)?ur(t):En(t):t.match(n)||[]}var Oh=Eo((function(t,n){try{return an(t,e,n)}catch(e){return bl(e)?e:new et(e)}})),Rh=zs((function(e,t){return un(t,(function(t){t=Aa(t),gi(e,t,Tu(e[t],e))})),e}));function xh(e){var t=null==e?0:e.length,n=qs();return e=t?gn(e,(function(e){if("function"!=typeof e[1])throw new st(o);return[n(e[0]),e[1]]})):[],Eo((function(n){for(var r=-1;++r<t;){var i=e[r];if(an(i[0],this,n))return an(i[1],this,n)}}))}function Ih(e){return _i(mi(e,l))}function Ch(e){return function(){return e}}function Ph(e,t){return null==e||e!=e?t:e}var kh=_s(),Nh=_s(!0);function Ah(e){return e}function Th(e){return no("function"==typeof e?e:mi(e,l))}function Mh(e){return ao(mi(e,l))}function Lh(e,t){return co(e,mi(t,l))}var Uh=Eo((function(e,t){return function(n){return Vi(n,e,t)}})),jh=Eo((function(e,t){return function(n){return Vi(e,n,t)}}));function Dh(e,t,n){var r=Of(t),i=Mi(t,r);null==n&&(!Rl(t)||!i.length&&r.length)&&(n=t,t=e,e=this,i=Mi(t,Of(t)));var o=!(Rl(n)&&"chain"in n&&!n.chain),s=El(e);return un(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=os(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,yn([this.value()],arguments))})})),e}function zh(){return Gt._===this&&(Gt._=vt),this}function Bh(){}function Fh(e){return e=Yl(e),Eo((function(t){return fo(t,e)}))}var Hh=Ss(gn),$h=Ss(fn),Vh=Ss(_n);function qh(e){return ua(e)?Pn(Aa(e)):yo(e)}function Wh(t){return function(n){return null==t?e:Li(t,n)}}var Kh=xs(),Gh=xs(!0);function Yh(){return[]}function Qh(){return!1}function Jh(){return{}}function Xh(){return""}function Zh(){return!0}function ed(e,t){if((e=Yl(e))<1||e>T)return[];var n=U,r=Xt(e,U);t=qs(t),e-=U;for(var i=Mn(r,t);++n<e;)t(n);return i}function td(e){return ul(e)?gn(e,Aa):Bl(e)?[e]:os(Na(ef(e)))}function nd(e){var t=++dt;return ef(e)+t}var rd=Es((function(e,t){return e+t}),0),id=Ps("ceil"),od=Es((function(e,t){return e/t}),1),sd=Ps("floor");function ad(t){return t&&t.length?xi(t,Ah,Di):e}function cd(t,n){return t&&t.length?xi(t,qs(n,2),Di):e}function ud(e){return Cn(e,Ah)}function ld(e,t){return Cn(e,qs(t,2))}function fd(t){return t&&t.length?xi(t,Ah,oo):e}function hd(t,n){return t&&t.length?xi(t,qs(n,2),oo):e}var dd=Es((function(e,t){return e*t}),1),pd=Ps("round"),gd=Es((function(e,t){return e-t}),0);function yd(e){return e&&e.length?Tn(e,Ah):0}function vd(e,t){return e&&e.length?Tn(e,qs(t,2)):0}return Or.after=ku,Or.ary=Nu,Or.assign=tf,Or.assignIn=nf,Or.assignInWith=rf,Or.assignWith=of,Or.at=sf,Or.before=Au,Or.bind=Tu,Or.bindAll=Rh,Or.bindKey=Mu,Or.castArray=Zu,Or.chain=Wc,Or.chunk=Ua,Or.compact=ja,Or.concat=Da,Or.cond=xh,Or.conforms=Ih,Or.constant=Ch,Or.countBy=ru,Or.create=af,Or.curry=Lu,Or.curryRight=Uu,Or.debounce=ju,Or.defaults=cf,Or.defaultsDeep=uf,Or.defer=Du,Or.delay=zu,Or.difference=za,Or.differenceBy=Ba,Or.differenceWith=Fa,Or.drop=Ha,Or.dropRight=$a,Or.dropRightWhile=Va,Or.dropWhile=qa,Or.fill=Wa,Or.filter=ou,Or.flatMap=cu,Or.flatMapDeep=uu,Or.flatMapDepth=lu,Or.flatten=Ya,Or.flattenDeep=Qa,Or.flattenDepth=Ja,Or.flip=Bu,Or.flow=kh,Or.flowRight=Nh,Or.fromPairs=Xa,Or.functions=yf,Or.functionsIn=vf,Or.groupBy=du,Or.initial=tc,Or.intersection=nc,Or.intersectionBy=rc,Or.intersectionWith=ic,Or.invert=wf,Or.invertBy=Ef,Or.invokeMap=gu,Or.iteratee=Th,Or.keyBy=yu,Or.keys=Of,Or.keysIn=Rf,Or.map=vu,Or.mapKeys=xf,Or.mapValues=If,Or.matches=Mh,Or.matchesProperty=Lh,Or.memoize=Fu,Or.merge=Cf,Or.mergeWith=Pf,Or.method=Uh,Or.methodOf=jh,Or.mixin=Dh,Or.negate=Hu,Or.nthArg=Fh,Or.omit=kf,Or.omitBy=Nf,Or.once=$u,Or.orderBy=mu,Or.over=Hh,Or.overArgs=Vu,Or.overEvery=$h,Or.overSome=Vh,Or.partial=qu,Or.partialRight=Wu,Or.partition=_u,Or.pick=Af,Or.pickBy=Tf,Or.property=qh,Or.propertyOf=Wh,Or.pull=uc,Or.pullAll=lc,Or.pullAllBy=fc,Or.pullAllWith=hc,Or.pullAt=dc,Or.range=Kh,Or.rangeRight=Gh,Or.rearg=Ku,Or.reject=Eu,Or.remove=pc,Or.rest=Gu,Or.reverse=gc,Or.sampleSize=Ou,Or.set=Lf,Or.setWith=Uf,Or.shuffle=Ru,Or.slice=yc,Or.sortBy=Cu,Or.sortedUniq=Sc,Or.sortedUniqBy=Oc,Or.split=lh,Or.spread=Yu,Or.tail=Rc,Or.take=xc,Or.takeRight=Ic,Or.takeRightWhile=Cc,Or.takeWhile=Pc,Or.tap=Kc,Or.throttle=Qu,Or.thru=Gc,Or.toArray=Kl,Or.toPairs=jf,Or.toPairsIn=Df,Or.toPath=td,Or.toPlainObject=Xl,Or.transform=zf,Or.unary=Ju,Or.union=kc,Or.unionBy=Nc,Or.unionWith=Ac,Or.uniq=Tc,Or.uniqBy=Mc,Or.uniqWith=Lc,Or.unset=Bf,Or.unzip=Uc,Or.unzipWith=jc,Or.update=Ff,Or.updateWith=Hf,Or.values=$f,Or.valuesIn=Vf,Or.without=Dc,Or.words=Sh,Or.wrap=Xu,Or.xor=zc,Or.xorBy=Bc,Or.xorWith=Fc,Or.zip=Hc,Or.zipObject=$c,Or.zipObjectDeep=Vc,Or.zipWith=qc,Or.entries=jf,Or.entriesIn=Df,Or.extend=nf,Or.extendWith=rf,Dh(Or,Or),Or.add=rd,Or.attempt=Oh,Or.camelCase=Gf,Or.capitalize=Yf,Or.ceil=id,Or.clamp=qf,Or.clone=el,Or.cloneDeep=nl,Or.cloneDeepWith=rl,Or.cloneWith=tl,Or.conformsTo=il,Or.deburr=Qf,Or.defaultTo=Ph,Or.divide=od,Or.endsWith=Jf,Or.eq=ol,Or.escape=Xf,Or.escapeRegExp=Zf,Or.every=iu,Or.find=su,Or.findIndex=Ka,Or.findKey=lf,Or.findLast=au,Or.findLastIndex=Ga,Or.findLastKey=ff,Or.floor=sd,Or.forEach=fu,Or.forEachRight=hu,Or.forIn=hf,Or.forInRight=df,Or.forOwn=pf,Or.forOwnRight=gf,Or.get=mf,Or.gt=sl,Or.gte=al,Or.has=_f,Or.hasIn=bf,Or.head=Za,Or.identity=Ah,Or.includes=pu,Or.indexOf=ec,Or.inRange=Wf,Or.invoke=Sf,Or.isArguments=cl,Or.isArray=ul,Or.isArrayBuffer=ll,Or.isArrayLike=fl,Or.isArrayLikeObject=hl,Or.isBoolean=dl,Or.isBuffer=pl,Or.isDate=gl,Or.isElement=yl,Or.isEmpty=vl,Or.isEqual=ml,Or.isEqualWith=_l,Or.isError=bl,Or.isFinite=wl,Or.isFunction=El,Or.isInteger=Sl,Or.isLength=Ol,Or.isMap=Il,Or.isMatch=Cl,Or.isMatchWith=Pl,Or.isNaN=kl,Or.isNative=Nl,Or.isNil=Tl,Or.isNull=Al,Or.isNumber=Ml,Or.isObject=Rl,Or.isObjectLike=xl,Or.isPlainObject=Ll,Or.isRegExp=Ul,Or.isSafeInteger=jl,Or.isSet=Dl,Or.isString=zl,Or.isSymbol=Bl,Or.isTypedArray=Fl,Or.isUndefined=Hl,Or.isWeakMap=$l,Or.isWeakSet=Vl,Or.join=oc,Or.kebabCase=eh,Or.last=sc,Or.lastIndexOf=ac,Or.lowerCase=th,Or.lowerFirst=nh,Or.lt=ql,Or.lte=Wl,Or.max=ad,Or.maxBy=cd,Or.mean=ud,Or.meanBy=ld,Or.min=fd,Or.minBy=hd,Or.stubArray=Yh,Or.stubFalse=Qh,Or.stubObject=Jh,Or.stubString=Xh,Or.stubTrue=Zh,Or.multiply=dd,Or.nth=cc,Or.noConflict=zh,Or.noop=Bh,Or.now=Pu,Or.pad=rh,Or.padEnd=ih,Or.padStart=oh,Or.parseInt=sh,Or.random=Kf,Or.reduce=bu,Or.reduceRight=wu,Or.repeat=ah,Or.replace=ch,Or.result=Mf,Or.round=pd,Or.runInContext=t,Or.sample=Su,Or.size=xu,Or.snakeCase=uh,Or.some=Iu,Or.sortedIndex=vc,Or.sortedIndexBy=mc,Or.sortedIndexOf=_c,Or.sortedLastIndex=bc,Or.sortedLastIndexBy=wc,Or.sortedLastIndexOf=Ec,Or.startCase=fh,Or.startsWith=hh,Or.subtract=gd,Or.sum=yd,Or.sumBy=vd,Or.template=dh,Or.times=ed,Or.toFinite=Gl,Or.toInteger=Yl,Or.toLength=Ql,Or.toLower=ph,Or.toNumber=Jl,Or.toSafeInteger=Zl,Or.toString=ef,Or.toUpper=gh,Or.trim=yh,Or.trimEnd=vh,Or.trimStart=mh,Or.truncate=_h,Or.unescape=bh,Or.uniqueId=nd,Or.upperCase=wh,Or.upperFirst=Eh,Or.each=fu,Or.eachRight=hu,Or.first=Za,Dh(Or,function(){var e={};return Ai(Or,(function(t,n){ht.call(Or.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Or.VERSION=n,un(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Or[e].placeholder=Or})),un(["drop","take"],(function(t,n){Cr.prototype[t]=function(r){r=r===e?1:Qt(Yl(r),0);var i=this.__filtered__&&!n?new Cr(this):this.clone();return i.__filtered__?i.__takeCount__=Xt(r,i.__takeCount__):i.__views__.push({size:Xt(r,U),type:t+(i.__dir__<0?"Right":"")}),i},Cr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),un(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=n==P||n==N;Cr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:qs(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),un(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Cr.prototype[e]=function(){return this[n](1).value()[0]}})),un(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Cr.prototype[e]=function(){return this.__filtered__?new Cr(this):this[n](1)}})),Cr.prototype.compact=function(){return this.filter(Ah)},Cr.prototype.find=function(e){return this.filter(e).head()},Cr.prototype.findLast=function(e){return this.reverse().find(e)},Cr.prototype.invokeMap=Eo((function(e,t){return"function"==typeof e?new Cr(this):this.map((function(n){return Vi(n,e,t)}))})),Cr.prototype.reject=function(e){return this.filter(Hu(qs(e)))},Cr.prototype.slice=function(t,n){t=Yl(t);var r=this;return r.__filtered__&&(t>0||n<0)?new Cr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),n!==e&&(r=(n=Yl(n))<0?r.dropRight(-n):r.take(n-t)),r)},Cr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Cr.prototype.toArray=function(){return this.take(U)},Ai(Cr.prototype,(function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),o=Or[i?"take"+("last"==n?"Right":""):n],s=i||/^find/.test(n);o&&(Or.prototype[n]=function(){var n=this.__wrapped__,a=i?[1]:arguments,c=n instanceof Cr,u=a[0],l=c||ul(n),f=function(e){var t=o.apply(Or,yn([e],a));return i&&h?t[0]:t};l&&r&&"function"==typeof u&&1!=u.length&&(c=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,g=c&&!d;if(!s&&l){n=g?n:new Cr(this);var y=t.apply(n,a);return y.__actions__.push({func:Gc,args:[f],thisArg:e}),new Ir(y,h)}return p&&g?t.apply(this,a):(y=this.thru(f),p?i?y.value()[0]:y.value():y)})})),un(["pop","push","shift","sort","splice","unshift"],(function(e){var t=at[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Or.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(ul(i)?i:[],e)}return this[n]((function(n){return t.apply(ul(n)?n:[],e)}))}})),Ai(Cr.prototype,(function(e,t){var n=Or[t];if(n){var r=n.name+"";ht.call(gr,r)||(gr[r]=[]),gr[r].push({name:t,func:n})}})),gr[bs(e,y).name]=[{name:"wrapper",func:e}],Cr.prototype.clone=Pr,Cr.prototype.reverse=kr,Cr.prototype.value=Nr,Or.prototype.at=Yc,Or.prototype.chain=Qc,Or.prototype.commit=Jc,Or.prototype.next=Xc,Or.prototype.plant=eu,Or.prototype.reverse=tu,Or.prototype.toJSON=Or.prototype.valueOf=Or.prototype.value=nu,Or.prototype.first=Or.prototype.head,Ct&&(Or.prototype[Ct]=Zc),Or},fr=lr();Qt?((Qt.exports=fr)._=fr,Yt._=fr):Gt._=fr}.call(t);var mg=Object.defineProperty,_g=Object.defineProperties,bg=Object.getOwnPropertyDescriptors,wg=Object.getOwnPropertySymbols,Eg=Object.prototype.hasOwnProperty,Sg=Object.prototype.propertyIsEnumerable,Og=(e,t,n)=>t in e?mg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rg=(e,t)=>{for(var n in t||(t={}))Eg.call(t,n)&&Og(e,n,t[n]);if(wg)for(var n of wg(t))Sg.call(t,n)&&Og(e,n,t[n]);return e},xg=(e,t)=>_g(e,bg(t));function Ig(e,t,n){let r;const i=Cg(e);return t.rpcMap&&(r=t.rpcMap[i]),r||(r=`${dg}?chainId=eip155:${i}&projectId=${n}`),r}function Cg(e){return e.includes("eip155")?Number(e.split(":")[1]):Number(e)}function Pg(e,t){if(!t.includes(e))throw new Error(`Chain '${e}' not approved. Please use one of the following: ${t.toString()}`)}function kg(e){return e.map((e=>`${e.split(":")[0]}:${e.split(":")[1]}`))}function Ng(e,t){const n=Object.keys(t.namespaces).filter((t=>t.includes(e)));if(!n.length)return[];const r=[];return n.forEach((e=>{const n=t.namespaces[e].accounts;r.push(...n)})),r}function Ag(e,t={}){const n=Tg(e),r=Tg(t);return vg.exports.merge(n,r)}function Tg(e){var t,n,r,i;const o={};if(!gu(e))return o;for(const[s,a]of Object.entries(e)){const e=cu(s)?[s]:a.chains,c=a.methods||[],u=a.events||[],l=a.rpcMap||{},f=uu(s);o[f]=xg(Rg(Rg({},o[f]),a),{chains:Fc(e,null==(t=o[f])?void 0:t.chains),methods:Fc(c,null==(n=o[f])?void 0:n.methods),events:Fc(u,null==(r=o[f])?void 0:r.events),rpcMap:Rg(Rg({},l),null==(i=o[f])?void 0:i.rpcMap)})}return o}const Mg={},Lg=e=>Mg[e],Ug=(e,t)=>{Mg[e]=t};var jg={exports:{}};!function(e,n){var r,i=typeof self<"u"?self:t,o=function(){function e(){this.fetch=!1,this.DOMException=i.DOMException}return e.prototype=i,new e}();r=o,function(e){var t={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function n(e){return e&&DataView.prototype.isPrototypeOf(e)}if(t.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(e){return e&&i.indexOf(Object.prototype.toString.call(e))>-1};function s(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function c(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t.iterable&&(n[Symbol.iterator]=function(){return n}),n}function u(e){this.map={},e instanceof u?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function h(e){var t=new FileReader,n=f(t);return t.readAsArrayBuffer(e),n}function d(e){var t=new FileReader,n=f(t);return t.readAsText(e),n}function p(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:t.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:t.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():t.arrayBuffer&&t.blob&&n(e)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||o(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return d(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(p(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},t.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(e,t){e=s(e),t=a(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},u.prototype.delete=function(e){delete this.map[s(e)]},u.prototype.get=function(e){return e=s(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(s(e))},u.prototype.set=function(e,t){this.map[s(e)]=a(t)},u.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},u.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),c(e)},u.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),c(e)},u.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),c(e)},t.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(e){var t=e.toUpperCase();return v.indexOf(t)>-1?t:e}function _(e,t){var n=(t=t||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!n&&null!=e._bodyInit&&(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new u(t.headers)),this.method=m(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function w(e){var t=new u;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},y.call(_.prototype),y.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];E.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},e.DOMException=r.DOMException;try{new e.DOMException}catch{e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function O(n,r){return new Promise((function(i,o){var s=new _(n,r);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:w(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var t="response"in a?a.response:a.responseText;i(new E(t,e))},a.onerror=function(){o(new TypeError("Network request failed"))},a.ontimeout=function(){o(new TypeError("Network request failed"))},a.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&t.blob&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(typeof s._bodyInit>"u"?null:s._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=u,r.Request=_,r.Response=E),e.Headers=u,e.Request=_,e.Response=E,e.fetch=O,Object.defineProperty(e,"__esModule",{value:!0})}({}),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var s=o;(n=s.fetch).default=s.fetch,n.fetch=s.fetch,n.Headers=s.Headers,n.Request=s.Request,n.Response=s.Response,e.exports=n}(jg,jg.exports);var Dg=n(jg.exports);const zg={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},Bg=10;class Fg{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new o.exports.EventEmitter,this.isAvailable=!1,this.registering=!1,!Jl(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(e,t){this.isAvailable||await this.register();try{const t=sr(e),n=await(await Dg(this.url,Object.assign(Object.assign({},zg),{body:t}))).json();this.onPayload({data:n})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!Jl(e))throw new Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){const e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise(((e,t)=>{this.events.once("register_error",(e=>{this.resetMaxListeners(),t(e)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return t(new Error("HTTP connection is missing or invalid"));e()}))}))}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){const t=sr({id:1,jsonrpc:"2.0",method:"test",params:[]});await Dg(e,Object.assign(Object.assign({},zg),{body:t}))}this.onOpen()}catch(e){const t=this.parseError(e);throw this.events.emit("register_error",t),this.onClose(),t}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;const t="string"==typeof e.data?or(e.data):e.data;this.events.emit("payload",t)}onError(e,t){const n=this.parseError(t),r=Hl(e,n.message||n.toString());this.events.emit("payload",r)}parseError(e,t=this.url){return ol(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>Bg&&this.events.setMaxListeners(Bg)}}class Hg{constructor(e){this.name="polkadot",this.namespace=e.namespace,this.events=Lg("events"),this.client=Lg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Ig(`${this.name}:${e}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(pg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e&&e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2]))||[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Ig(e,this.namespace);return typeof n>"u"?void 0:new sf(new Fg(n,Lg("disableProviderPing")))}}class $g{constructor(e){this.name="eip155",this.namespace=e.namespace,this.events=Lg("events"),this.client=Lg("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(e){var t;switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return this.handleSwitchChain(e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0"),null;case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){const n=Cg(e);if(!this.httpProviders[n]){const e=t||Ig(`${this.name}:${n}`,this.namespace,this.client.core.projectId);if(!e)throw new Error(`No RPC url provided for chainId: ${n}`);this.setHttpProvider(n,e)}this.chainId=n,this.events.emit(pg.DEFAULT_CHAIN_CHANGED,`${this.name}:${n}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){const n=t||Ig(`${this.name}:${e}`,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new Fg(n,Lg("disableProviderPing")))}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;const r=Cg(t);e[r]=this.createHttpProvider(r,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}getHttpProvider(){const e=this.chainId,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}handleSwitchChain(e){const t=parseInt(e,16);Pg(`${this.name}:${t}`,this.namespace.chains),this.setDefaultChain(`${t}`)}}class Vg{constructor(e){this.name="solana",this.namespace=e.namespace,this.events=Lg("events"),this.client=Lg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Ig(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(pg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Ig(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new Fg(n,Lg("disableProviderPing")))}}class qg{constructor(e){this.name="cosmos",this.namespace=e.namespace,this.events=Lg("events"),this.client=Lg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||Ig(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(pg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Ig(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new Fg(n,Lg("disableProviderPing")))}}class Wg{constructor(e){this.name="cip34",this.namespace=e.namespace,this.events=Lg("events"),this.client=Lg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(this.chainId=e,!this.httpProviders[e]){const n=t||this.getCardanoRPCUrl(e);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.events.emit(pg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{const n=this.getCardanoRPCUrl(t);e[t]=this.createHttpProvider(t,n)})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}getCardanoRPCUrl(e){const t=this.namespace.rpcMap;if(t)return t[e]}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||this.getCardanoRPCUrl(e);return typeof n>"u"?void 0:new sf(new Fg(n,Lg("disableProviderPing")))}}class Kg{constructor(e){this.name="elrond",this.namespace=e.namespace,this.events=Lg("events"),this.client=Lg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Ig(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(pg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Ig(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new Fg(n,Lg("disableProviderPing")))}}class Gg{constructor(e){this.name="multiversx",this.namespace=e.namespace,this.events=Lg("events"),this.client=Lg("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider().request(e.request)}setDefaultChain(e,t){if(!this.httpProviders[e]){const n=t||Ig(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${e}`);this.setHttpProvider(e,n)}this.chainId=e,this.events.emit(pg.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const e=this.namespace.chains[0];if(!e)throw new Error("ChainId not found");return e.split(":")[1]}getAccounts(){const e=this.namespace.accounts;return e?[...new Set(e.filter((e=>e.split(":")[1]===this.chainId.toString())).map((e=>e.split(":")[2])))]:[]}createHttpProviders(){const e={};return this.namespace.chains.forEach((t=>{var n;e[t]=this.createHttpProvider(t,null==(n=this.namespace.rpcMap)?void 0:n[t])})),e}getHttpProvider(){const e=`${this.name}:${this.chainId}`,t=this.httpProviders[e];if(typeof t>"u")throw new Error(`JSON-RPC provider for ${e} not found`);return t}setHttpProvider(e,t){const n=this.createHttpProvider(e,t);n&&(this.httpProviders[e]=n)}createHttpProvider(e,t){const n=t||Ig(e,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new sf(new Fg(n,Lg("disableProviderPing")))}}var Yg=Object.defineProperty,Qg=Object.defineProperties,Jg=Object.getOwnPropertyDescriptors,Xg=Object.getOwnPropertySymbols,Zg=Object.prototype.hasOwnProperty,ey=Object.prototype.propertyIsEnumerable,ty=(e,t,n)=>t in e?Yg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ny=(e,t)=>{for(var n in t||(t={}))Zg.call(t,n)&&ty(e,n,t[n]);if(Xg)for(var n of Xg(t))ey.call(t,n)&&ty(e,n,t[n]);return e},ry=(e,t)=>Qg(e,Jg(t));class iy{constructor(e){this.events=new o.exports,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=e,this.logger=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:cn.pino(cn.getDefaultLoggerOptions({level:e?.logger||lg})),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){const t=new iy(e);return await t.initialize(),t}async request(e,t){const[n,r]=this.validateChain(t);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:ny({},e),chainId:`${n}:${r}`,topic:this.session.topic})}sendAsync(e,t,n){this.request(e,n).then((e=>t(null,e))).catch((e=>t(e,void 0)))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:du("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(e),await this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){this.shouldAbortPairingAttempt=!1;let t=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(t>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:r}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await r().then((e=>{this.session=e})).catch((e=>{if(e.message!==Hp)throw e;t++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(e,t){try{const[n,r]=this.validateChain(e);this.getProvider(n).setDefaultChain(r,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){this.logger.info("Cleaning up inactive pairings...");const t=this.client.pairing.getAll();if(pu(t)){for(const n of t)e.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const e=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[e]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await ug.init({logger:this.providerOpts.logger||lg,relayUrl:this.providerOpts.relayUrl||fg,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const e=[...new Set(Object.keys(this.session.namespaces).map((e=>uu(e))))];Ug("client",this.client),Ug("events",this.events),Ug("disableProviderPing",this.disableProviderPing),e.forEach((e=>{if(!this.session)return;const t=Ng(e,this.session),n=kg(t),r=Ag(this.namespaces,this.optionalNamespaces),i=ry(ny({},r[e]),{accounts:t,chains:n});switch(e){case"eip155":this.rpcProviders[e]=new $g({namespace:i});break;case"solana":this.rpcProviders[e]=new Vg({namespace:i});break;case"cosmos":this.rpcProviders[e]=new qg({namespace:i});break;case"polkadot":this.rpcProviders[e]=new Hg({namespace:i});break;case"cip34":this.rpcProviders[e]=new Wg({namespace:i});break;case"elrond":this.rpcProviders[e]=new Kg({namespace:i});break;case"multiversx":this.rpcProviders[e]=new Gg({namespace:i})}}))}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",(e=>{this.events.emit("session_ping",e)})),this.client.on("session_event",(e=>{const{params:t}=e,{event:n}=t;"accountsChanged"===n.name?this.events.emit("accountsChanged",n.data):"chainChanged"===n.name?this.onChainChanged(t.chainId):this.events.emit(n.name,n.data),this.events.emit("session_event",e)})),this.client.on("session_update",(({topic:e,params:t})=>{var n;const{namespaces:r}=t,i=null==(n=this.client)?void 0:n.session.get(e);this.session=ry(ny({},i),{namespaces:r}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})})),this.client.on("session_delete",(async e=>{await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",ry(ny({},du("USER_DISCONNECTED")),{data:e.topic}))})),this.on(pg.DEFAULT_CHAIN_CHANGED,(e=>{this.onChainChanged(e,!0)}))}getProvider(e){if(!this.rpcProviders[e])throw new Error(`Provider not found: ${e}`);return this.rpcProviders[e]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])}))}setNamespaces(e){const{namespaces:t,optionalNamespaces:n,sessionProperties:r}=e;if(!t||!Object.keys(t).length)throw new Error("Namespaces must be not empty");this.namespaces=t,this.optionalNamespaces=n,this.sessionProperties=r,this.persist("namespaces",t),this.persist("optionalNamespaces",n)}validateChain(e){const[t,n]=e?.split(":")||["",""];if(t&&!Object.keys(this.namespaces).map((e=>uu(e))).includes(t))throw new Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&n)return[t,n];const r=uu(Object.keys(this.namespaces)[0]);return[r,this.rpcProviders[r].getDefaultChain()]}async requestAccounts(){const[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}onChainChanged(e,t=!1){var n;const[r,i]=this.validateChain(e);t||this.getProvider(r).setDefaultChain(i),(null!=(n=this.namespaces[r])?n:this.namespaces[`${r}:${i}`]).defaultChain=i,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",i)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,await this.cleanupPendingPairings({deletePairings:!0})}persist(e,t){this.client.core.storage.setItem(`${hg}/${e}`,t)}async getFromStore(e){return await this.client.core.storage.getItem(`${hg}/${e}`)}}const oy=iy;e.UniversalProvider=oy,e.default=iy,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,Ji.exports);const Xi=["eth_sendTransaction","personal_sign"],Zi=["eth_accounts","eth_requestAccounts","eth_call","eth_getBalance","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],eo=["chainChanged","accountsChanged"],to=["message","disconnect","connect"];function no(e){return Number(e[0].split(":")[1])}function ro(e){return`0x${e.toString(16)}`}class io{constructor(){this.events=new vn.exports.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY="wc@2:ethereum_provider:",this.on=(e,t)=>(this.events.on(e,t),this),this.once=(e,t)=>(this.events.once(e,t),this),this.removeListener=(e,t)=>(this.events.removeListener(e,t),this),this.off=(e,t)=>(this.events.off(e,t),this),this.parseAccount=e=>this.isCompatibleChainId(e)?this.parseAccountId(e).address:e,this.signer={},this.rpc={}}static init(e){return c(this,void 0,void 0,(function*(){const t=new io;return yield t.initialize(e),t}))}request(e){return c(this,void 0,void 0,(function*(){return yield this.signer.request(e,this.formatChainId(this.chainId))}))}sendAsync(e,t){this.signer.sendAsync(e,t,this.formatChainId(this.chainId))}get connected(){return!!this.signer.client&&this.signer.client.core.relayer.connected}get connecting(){return!!this.signer.client&&this.signer.client.core.relayer.connecting}enable(){return c(this,void 0,void 0,(function*(){this.session||(yield this.connect());return yield this.request({method:"eth_requestAccounts"})}))}connect(e){return c(this,void 0,void 0,(function*(){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(e);const{required:t,optional:n}=function(e){const{chains:t,optionalChains:n,methods:r,optionalMethods:i,events:o,optionalEvents:s,rpcMap:a}=e;if(!Gi(t))throw new Error("Invalid chains");const c=t,u=r||Xi,l=o||eo,f={chains:c,methods:u,events:l,rpcMap:{[no(c)]:a[no(c)]}},h=null==o?void 0:o.filter((e=>!eo.includes(e))),d=null==r?void 0:r.filter((e=>!Xi.includes(e)));if(!(n||s||i||(null==h?void 0:h.length)||(null==d?void 0:d.length)))return{required:f};const p=(null==h?void 0:h.length)&&(null==d?void 0:d.length)||!n;return{required:f,optional:{chains:[...new Set(p?c.concat(n||[]):n)],methods:[...new Set(u.concat(i||[]))],events:[...new Set(l.concat(s||[]))],rpcMap:a}}}(this.rpc);try{const r=yield new Promise(((r,i)=>c(this,void 0,void 0,(function*(){yield this.signer.connect(Object.assign(Object.assign({namespaces:{[this.namespace]:t}},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:null==e?void 0:e.pairingTopic,skipPairing:!1})).then((e=>{r(e)})).catch((e=>{i(new Error(e.message))}))}))));if(!r)return;this.setChainIds(this.rpc.chains);const i=function(e,t=[]){const n=[];return Object.keys(e).forEach((r=>{if(t.length&&!t.includes(r))return;const i=e[r];n.push(...i.accounts)})),n}(r.namespaces,[this.namespace]);this.setAccounts(i),this.events.emit("connect",{chainId:ro(this.chainId)})}catch(e){throw this.signer.logger.error(e),e}}))}disconnect(){return c(this,void 0,void 0,(function*(){this.session&&(yield this.signer.disconnect()),this.reset()}))}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",(e=>{const{params:t}=e,{event:n}=t;"accountsChanged"===n.name?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===n.name?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",e)})),this.signer.on("chainChanged",(e=>{const t=parseInt(e);this.chainId=t,this.events.emit("chainChanged",ro(this.chainId)),this.persist()})),this.signer.on("session_update",(e=>{this.events.emit("session_update",e)})),this.signer.on("session_delete",(e=>{this.reset(),this.events.emit("session_delete",e),this.events.emit("disconnect",Object.assign(Object.assign({},function(e,t){const{message:n,code:r}=Ki[e];return{message:t?`${n} ${t}`:n,code:r}}("USER_DISCONNECTED")),{data:e.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(e=>{this.events.emit("display_uri",e)}))}setHttpProvider(e){this.request({method:"wallet_switchEthereumChain",params:[{chainId:e.toString(16)}]})}isCompatibleChainId(e){return"string"==typeof e&&e.startsWith(`${this.namespace}:`)}formatChainId(e){return`${this.namespace}:${e}`}parseChainId(e){return Number(e.split(":")[1])}setChainIds(e){const t=e.filter((e=>this.isCompatibleChainId(e))),n=t.map((e=>this.parseChainId(e)));n.length&&(this.chainId=n[0],this.events.emit("chainChanged",ro(this.chainId)),this.persist())}setChainId(e){if(this.isCompatibleChainId(e)){const t=this.parseChainId(e);this.chainId=t,this.setHttpProvider(t)}}parseAccountId(e){const[t,n,r]=e.split(":");return{chainId:`${t}:${n}`,address:r}}setAccounts(e){this.accounts=e.filter((e=>this.parseChainId(this.parseAccountId(e).chainId)===this.chainId)).map((e=>this.parseAccountId(e).address)),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(e){var t;return{chains:(null===(t=e.chains)||void 0===t?void 0:t.map((e=>this.formatChainId(e))))||[`${this.namespace}:1`],optionalChains:e.optionalChains?e.optionalChains.map((e=>this.formatChainId(e))):void 0,methods:(null==e?void 0:e.methods)||Xi,events:(null==e?void 0:e.events)||eo,optionalMethods:(null==e?void 0:e.optionalMethods)||[],optionalEvents:(null==e?void 0:e.optionalEvents)||[],rpcMap:(null==e?void 0:e.rpcMap)||this.buildRpcMap(e.chains.concat(e.optionalChains||[]),e.projectId),projectId:e.projectId,metadata:e.metadata}}buildRpcMap(e,t){const n={};return e.forEach((e=>{n[e]=this.getRpcUrl(e,t)})),n}initialize(e){return c(this,void 0,void 0,(function*(){this.rpc=this.getRpcConfig(e),this.chainId=no(this.rpc.chains),this.signer=yield Ji.exports.UniversalProvider.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata}),this.registerEventListeners(),yield this.loadPersistedSession()}))}loadConnectOpts(e){if(!e)return;const{chains:t,optionalChains:n,rpcMap:r}=e;t&&Gi(t)&&(this.rpc.chains=t.map((e=>this.formatChainId(e))),t.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)}))),n&&Gi(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=null==n?void 0:n.map((e=>this.formatChainId(e))),n.forEach((e=>{this.rpc.rpcMap[e]=(null==r?void 0:r[e])||this.getRpcUrl(e)})))}getRpcUrl(e,t){var n;return(null===(n=this.rpc.rpcMap)||void 0===n?void 0:n[e])||`https://rpc.walletconnect.com/v1/?chainId=eip155:${e}&projectId=${t||this.rpc.projectId}`}loadPersistedSession(){return c(this,void 0,void 0,(function*(){if(!this.session)return;const e=yield this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`);this.setChainIds(e?[this.formatChainId(e)]:this.session.namespaces[this.namespace].accounts),this.setAccounts(this.session.namespaces[this.namespace].accounts)}))}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(e){return"string"==typeof e||e instanceof String?[this.parseAccount(e)]:e.map((e=>this.parseAccount(e)))}}const oo=n("WalletConnectEvm"),so=r("WalletConnectEvm");function ao(){return c(this,void 0,void 0,(function*(){oo("getWalletConnectProvider");try{const e=yield function(){return c(this,void 0,void 0,(function*(){oo("initWalletConnectProvider");const e=yo();oo("walletConnectProviderOptions is",e);const t={projectId:e.projectId,chains:e.chains,optionalChains:e.optionalChains,methods:e.methods,optionalMethods:e.optionalMethods||Zi,events:e.events,optionalEvents:e.optionalEvents||to,rpcMap:e.rpcMap,showQrModal:!1};oo("ethereum init options are",t),oo("creating a new provider instance");try{return io.init(t)}catch(e){throw so("Error while initializing ethereum provider"),e}}))}();return function(e){if(oo("assignWalletConnectProviderEvents"),!e)return;function t(e){e&&(e.removeListener("connect",n),e.removeListener("display_uri",r),e.removeListener("session_delete",i))}function n(t){oo("connectHandler",t),e.removeListener("display_uri",r),mt(!1)}function r(e){oo("displayUriHandler",e),en(e)}function i(n){oo("disconnectHandler",n),e.disconnect(),t(e)}t(e),e.on("connect",n),e.on("display_uri",r),e.on("session_delete",i),oo("provider is",e)}(e),e.request=function(e){oo("patchWalletConnectProviderRequest");const t=e.request.bind(e),n=yo();return oo("walletConnectProviderOptions is",n),function({method:r,params:i}){return c(this,void 0,void 0,(function*(){return"eth_requestAccounts"===r?(oo("calling patched",r,i),new Promise(((o,a)=>c(this,void 0,void 0,(function*(){var c;try{(null===(c=null==e?void 0:e.session)||void 0===c?void 0:c.connected)?(oo("reusing existing session"),o(yield t({method:r,params:i}))):(hn({uri:"",onClose:()=>{so("user rejected"),a(new s)}}),oo("creating a new session"),yield e.connect({chains:n.chains,optionalChains:n.optionalChains}),o(yield t({method:r,params:i})))}catch(e){return so("error",e),a(e)}}))))):(oo("calling provider",r,i),yield t({method:r,params:i}))}))}}(e),e}catch(e){const t=e instanceof Error?e:new Error(String(e));throw so("error",t),t}}))}const co=n("getProvider"),uo=[1];var lo,fo;let ho;!function(e){e.Ethereum="Ethereum",e.Solana="Solana"}(lo||(lo={})),function(e){e.LedgerConnect="LedgerConnect",e.WalletConnect="WalletConnect"}(fo||(fo={}));const po=n("supportOptions");let go;const yo=()=>(po("getSupportOptions"),go),vo=n("ExtensionEvm"),mo="ethereum",_o="isLedgerConnect";var bo;function wo(e){return("iOS"===e.os.name||"macOS"===e.os.name)&&"Safari"===e.browser.name}function Eo(e){return!!bo[e]}function So(e){return e.every(Eo)}function Oo(){var e;if(vo("getEthereumProvider"),"undefined"==typeof window)throw new a;let t=window[mo];if(void 0===t||void 0===t[_o])throw new i;vo("chainId is",t.chainId);const n=`0x${(null===(e=yo().chainId)||void 0===e?void 0:e.toString(16))||0}`;return vo("hex chainId is",n),t.chainId!=n&&vo("chainIds are different, changing to",n),t}!function(e){e[e.EthereumMainnet=1]="EthereumMainnet",e[e.Polygon=137]="Polygon"}(bo||(bo={}));const Ro=n("support");let xo;e.checkSupport=function(e){Ro("checkSupport",e),(e=>{var t;po("setSupportOptions",e);const n=e.walletConnectVersion||1;let r,i,o=[];1===n?(i=e.chainId||1,r=[i]):(r=e.chains||uo,i=r[0],o.push(...r),(null===(t=e.optionalChains)||void 0===t?void 0:t.length)&&o.push(...e.optionalChains.filter((e=>o.indexOf(e)<0))));const s=Object.assign(Object.assign({},e),{walletConnectVersion:n,chains:r,chainId:i,optionalChains:o,projectId:e.projectId||""});if(2===n&&(!e.projectId||""===e.projectId))throw new Error("WalletConnect requires a projectId. Please visit https://cloud.walletconnect.com to get one.");go=s})(e);const t=yo();let n;switch(t.providerType){case lo.Ethereum:n=function(e){Ro("checkEthereumSupport",e);const t=un();let n=!1;try{n=!!Oo()}catch(e){}const r={isLedgerConnectSupported:wo(t),isLedgerConnectEnabled:!!n,isChainIdSupported:So(e.chains),providerImplementation:fo.LedgerConnect};r.isLedgerConnectSupported&&r.isLedgerConnectEnabled&&r.isChainIdSupported||(r.providerImplementation=fo.WalletConnect);return function(e){co("setProviderImplementation",e),ho=e}(r.providerImplementation),r}(t);break;case lo.Solana:n=function(){Ro("checkSolanaSupport");const e=un();let t=!1;try{t=!!h()}catch(e){}const n={isLedgerConnectSupported:wo(e),isLedgerConnectEnabled:!!t,providerImplementation:fo.LedgerConnect};n.isLedgerConnectSupported?n.isLedgerConnectSupported&&!n.isLedgerConnectEnabled&&fn("ExtensionInstallModal"):fn("PlatformNotSupportedModal");return n}()}return Ro("checkSupportResult is",n),xo=n,n},e.enableDebugLogs=()=>{t=!0},e.getProvider=function(){return c(this,void 0,void 0,(function*(){co("getProvider",ho);const e=yo();switch(e.providerType){case lo.Ethereum:return(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))||(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))||ho!==fo.LedgerConnect?(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV2"))||1!==e.walletConnectVersion&&!(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("connectKit_forceWcV1"))?yield ao():yield gn():Oo();case lo.Solana:return h();default:throw new o}}))},Object.defineProperty(e,"__esModule",{value:!0})}));//# sourceMappingURL=index.js.map