PageSourceSearch

https://www.btse.com/static/js/B7TQbCQK.js

js btse.com collected 2026-09-25 18:39:21 UTC 384,750 bytes, 14 lines download raw bytes

1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};t.SENTRY_RELEASE={id:"btse@5f19a485"};var e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="a13f6734-458c-47cf-bd7e-3d7638b7df00",t._sentryDebugIdIdentifier="sentry-dbid-a13f6734-458c-47cf-bd7e-3d7638b7df00")}catch(i){}}();import{aS as t,a5 as e,ar as i,ak as n,a9 as r,am as o,aa as s,aK as a,af as l,as as u,ae as c,a7 as h,a8 as f,ad as p,aU as d,aq as v,al as m,ai as y,a6 as g,ag as b,aM as w,aN as S,aY as _,r as C,an as M,a$ as k,aE as x,aF as T,ac as E,B as D,aZ as L,b6 as O,ab as I,ca as B,aI as P,b0 as A,bC as N,bD as F,b1 as z,b2 as R,aO as $,aj as j,ah as V,cb as W,h as H,be as K,aV as G,g as Y,aG as U,a_ as X,ap as q,b5 as Z,aC as J,aT as Q,cc as tt,bt as et}from"./PmfENnFs.js";import{u as it,B as nt,bJ as rt,bI as ot,h as st,d0 as at,p as lt,iR as ut,df as ct,ce as ht,hr as ft,af as pt,U as dt,ep as vt,eq as mt,e4 as yt,j as gt,aI as bt,ej as wt,iM as St,e_ as _t,dY as Ct,a3 as Mt,eX as kt,bR as xt,c as Tt,f5 as Et,K as Dt,g0 as Lt,hD as Ot,iS as It,gb as Bt,N as Pt,dJ as At,am as Nt,ap as Ft,ag as zt,iT as Rt,hy as $t,ab as jt,ac as Vt,ad as Wt,e as Ht,R as Kt,aB as Gt,dn as Yt,aV as Ut,iU as Xt,aH as qt,y as Zt,iV as Jt,w as Qt,iW as te,db as ee,iK as ie,fo as ne,E as re,f as oe,t as se,W as ae,iX as le,fF as ue,fG as ce,iY as he,iZ as fe,f3 as pe,i_ as de,dS as ve,hS as me,dR as ye,az as ge,i$ as be,_ as we}from"./BhKTELSe.js";import{F as Se,s as _e,v as Ce,w as Me,x as ke,y as xe,z as Te,B as Ee,D as De,E as Le,H as Oe,J as Ie,K as Be,N as Pe,P as Ae,Q as Ne,R as Fe,T as ze,U as Re,V as $e,W as je,X as Ve,Y as We,Z as He,_ as Ke,r as Ge,$ as Ye,a0 as Ue,a1 as Xe}from"../../app.DuROpXuw.js";import{_ as qe}from"./CRPzHAml.js";import{_ as Ze,E as Je}from"./tad1MRrM.js";import{u as Qe,a as ti}from"./DTvt6p8J.js";import{a as ei,g as ii}from"./DzIKp7QL.js";import{u as ni,i as ri,e as oi,b as si,f as ai,g as li,a as ui,c as ci,h as hi,j as fi,k as pi}from"./chunk-echarts.AHWYl6Ef.js";import di from"./CXr9G-CP.js";const vi={class:"content"},mi=qe({__name:"IdVerificationRequiredDialog",emits:["dialog:closed"],setup(h,{emit:f}){const p=f,d=it(),v=t(),{lang:m}=e(d),y=()=>p("dialog:closed"),g=()=>{v.push({name:st.VERIFICATION,params:{lang:m.value}}),p("dialog:closed")};return(t,e)=>{const h=i("BaseButton");return r(),n(ot,{class:"id-verification-required-dialog",genre:u(rt).WARNING,title:t.$t("t.idVerificationRequired"),onClosed:y},{default:o((()=>[s("div",vi,[s("div",null,l(t.$t("dialog.IdVerificationRequired.description")),1),a(h,{class:"btn green",size:u(nt).L,onClick:g},{default:o((()=>[c(l(t.$t("t.verifyNow")),1)])),_:1},8,["size"])])])),_:1},8,["genre","title"])}}},[["__scopeId","data-v-e4cf538a"]]),{displayIdVerificationRequiredDialogRules:yi}=lt;function gi(){const t=h(),{$openDialog:e}=at();return{showIdVerificationRequiredDialog:i=>0!==yi.kycLevel.size&&(!!yi.kycLevel.has(t.state.accountInfo.kycV2Level)&&(!!yi.locations.has(i)&&(!t.state.accountInfo[ut[i]]&&(e(mi),!0))))}}const{debitCardLogoList:bi}=lt,wi=[{type:"visa",icon:Ze,sizeInfo:{},iconClass:"visa-icon"},{type:"mastercard",icon:ct,sizeInfo:{width:32,height:32},iconClass:"mastercard-icon"}],Si=Object.fromEntries(wi.map((t=>[t.type,t])));function _i(t){return null===t||!!Array.isArray(t)&&t.every((t=>void 0!==Si[t]))}const Ci={class:"debit-card-link-list-wrapper"};const Mi=qe({name:"DebitCardLogos",props:{list:{default:()=>_i(bi)?bi??[]:[],validator:_i}},computed:{computedList(){return this.list.map((t=>Si[t]))}}},[["render",function(t,e,i,o,s,a){return r(),f("div",Ci,[(r(!0),f(p,null,d(a.computedList,((t,e)=>(r(),f("div",{key:`debitcard-${e}`,class:"icon-wrapper"},[(r(),n(m(t.icon),v({ref_for:!0},t.sizeInfo,{class:t.iconClass}),null,16,["class"]))])))),128))])}],["__scopeId","data-v-8e03de01"]]),ki={class:"currency-icon"},xi={class:"name"},Ti=qe(y({__name:"MarketsOverviewItem",props:{item:{}},emits:["click"],setup(i,{emit:n}){const{enableSpotTrade:u}=lt,h=i,p=n,d=t(),v=it(),{lang:m}=e(v),{convertToDisplaySymbol:y,getSpotDefaultMarketQuote:w}=ht(),S=g((()=>{const{tradeCurrency:t,baseCurrency:e}=h.item;return y(u?t:e)}
1)),_=g((()=>w({symbol:h.item.tradeCurrency,quote:ft})));const C=g((()=>pt(h.item.price,{formatKey:"max6",prefix:"$"})));function M(){const t=u?"tradingId":"futuresId",e=u?`${h.item.tradeCurrency}-${_.value}`:h.item.tradeCurrency;p("click",{tradePair:e});const i=d.resolve({name:t,params:{lang:m.value,id:e}});window.open(i.href,"_blank")}return(t,e)=>(r(),f("div",{class:"list-item",onClick:M},[s("div",ki,[a(dt,{name:t.item.baseCurrency,showName:!1,size:"24"},null,8,["name"])]),s("div",xi,l(S.value),1),a(Se,{class:b(["price-change",{gain:!!t.item.change&&t.item.change>0,loss:!!t.item.change&&t.item.change<0}]),dir:"ltr",fontSize:12,minFontSize:12},{default:o((()=>{return[c(l((e=t.item.change,null===e?"-":pt(100*e,{prefix:e>0?"+":"",formatKey:"max2",postfix:"%"}))),1)];var e})),_:1},8,["class"]),a(Se,{class:"price",dir:"ltr",fontSize:12,minFontSize:12},{default:o((()=>[c(l(C.value),1)])),_:1})]))}}),[["__scopeId","data-v-24b01821"]]);var Ei=(t=>(t.allCrypto="default",t.favorites="favorite",t.spot="spot",t.futures="futures",t.sector="sector",t.tradeNow="trade_now",t.newListing="new_listing",t.topGainers="top_gainers",t.topLosers="top_losers",t.highestVolume="highest_volume",t))(Ei||{}),Di=(t=>(t.main="market_main",t.detail="market_details",t))(Di||{});const Li="WebMarketsListClicked",Oi="WebMarketsTabClicked",Ii="WebMarketsFuturesSubTabClicked",Bi={[yt.ALL]:"all",[yt.CRYPTO]:"crypto",[yt.FX]:"fx",[yt.EQUITIES]:"equity",[yt.COMMODITIES]:"commodities",[yt.RATES]:"rates"};function Pi({sub_tab:t="all"}={}){const{captureEvent:e}=vt();mt.track(Ii,{s1:t}),e(Ii,{sub_tab:t})}const Ai="WebMarketsQuoteClicked";const Ni="WebMarketsSectorTabClicked",Fi="WebMarketsSectorEntryClicked",zi="WebMarketsFavoriteAdded";function Ri({trading_pair:t=""}={}){const{captureEvent:e}=vt();mt.track(zi,{s1:t}),e(zi,{trading_pair:t})}const $i="WebMarketsFavoriteEditClicked",ji="WebMarketsFavoriteEdited";var Vi=(t=>(t.pinTop="pin",t.drag="drag",t))(Vi||{});const Wi="WebMarketsFavoriteRemoved",Hi="WebMarketsTokenSearchResult",Ki="WebMarketsDetailClicked",Gi="WebMarketsDetailQuoteClicked";const Yi="WebMarketsDetailBlogClicked",Ui={class:"markets-overview-list"},Xi={class:"top flex-box"},qi={class:"title"},Zi=qe(y({__name:"MarketsOverviewList",props:{overview:{}},setup(t){const e=t;function i(t){return{s1:e.overview.trackKey,s2:t.tradePair,s3:Di.main}}function o(t){return{tab:e.overview.trackKey,trading_pair:t.tradePair,page:Di.main}}return(t,e)=>{const a=w("track");return r(),f("div",Ui,[s("div",Xi,[s("div",qi,l(t.overview.title),1),(r(),n(m(t.overview.icon),{class:"icon"}))]),s("div",null,[(r(!0),f(p,null,d(t.overview.list,(t=>S((r(),n(Ti,{key:t.displayName,item:t},null,8,["item"])),[[a,{mixpanel:{name:u(Li),props:i},posthog:{name:u(Li),props:o},emit:"click"}]]))),128))])])}}}),[["__scopeId","data-v-80753576"]]);const Ji=qe({name:"IconTrendDown",components:{Icon:gt},props:{width:{type:[Number,String],default:22},height:{type:[Number,String],default:22}}},[["render",function(t,e,a,l,u,c){const h=i("Icon");return r(),n(h,{width:a.width,height:a.height,"aria-label":"Trend Down Icon"},{default:o((()=>e[0]||(e[0]=[s("path",{d:"M3.4652 7.52679C3.02342 7.52679 2.65884 7.85738 2.60537 8.28468L2.59862 8.39338L2.59862 18.1335C2.59862 18.6121 2.9866 19.0001 3.4652 19.0001C3.90699 19.0001 4.27156 18.6695 4.32503 18.2422L4.33179 18.1335L4.33179 8.39338C4.33179 7.91478 3.9438 7.52679 3.4652 7.52679ZM9.24242 11.4525C8.80064 11.4525 8.43607 11.7831 8.38259 12.2104L8.37584 12.3191V18.1335C8.37584 18.6121 8.76382 19.0001 9.24242 19.0001C9.68421 19.0001 10.0488 18.6695 10.1023 18.2422L10.109 18.1335V12.3191C10.109 11.8405 9.72102 11.4525 9.24242 11.4525ZM15.0196 14.3783C14.5779 14.3783 14.2133 14.7089 14.1598 15.1362L14.1531 15.2449L14.1531 18.1335C14.1531 18.6121 14.541 19.0001 15.0196 19.0001C15.4614 19.0001 15.826 18.6695 15.8795 18.2422L15.8862 18.1335V15.2449C15.8862 14.7663 15.4982 14.3783 15.0196 14.3783Z"},null,-1),s("path",{d:"M16.4479 12.9717C16.8328 12.9717 17.1566 12.6867 17.2085 12.3022L17.2148 12.2048V8.17457C17.2148 7.7509 16.8715 7.40734 16.4479 7.40734C16.0631 7.40734 15.7392 7.69252 15.6872 8.07689L15.6809 8.1743L15.68 10.3383L11.4223 6.09443C11.1817 5.85521 10.8185 5.80571 10.5232 5.96059L10.4276 6.0198L10.3388 6.09573L8.93514 7.49875L3.50921 2.07162C3.39283 1.95502 3.24484 1.88113 3.08689 1.85624L2.9669 1.84686C2.76478 1.84686 2.57013 1.92581 2.42465 2.07153C2.15774 2.33819 2.12561 2.75812 2.34864 3.06732L2.42462 3.15609L8.3938 9.1253C8.66062 9.39212 9.08012 9.42414 9.38945 9.20127L9.47833 9.1253L10.8821 7.72118L14.6122 11.4388L12.4177 11.4378C12.0678 11.4378 11.7683 11.6733 11.6778 12.005L11.657 12.1073L11.6507 12.2048C11.6507 12.5897 11.9357 12.9135 12.3202 12.9654L12.4177 12.9717H16.4479Z"},null,-1)]))),_:1,__:[0]},8,["width","height"])}]]),Qi={class:"markets-overview flex-box justify-center"},tn=qe(y({__name:"MarketsOverview",setup(t){const{enableSpotTrade:i}=lt,n=bt(),s=g((()=>{const t=n.isMobile||n.isPad;return{loop:!0,watchDrag:t,autoplay:t,interval:2e3,align:"start"}})),l=_(),u=_e(),{spotMainQuoteCurrency:c}=e(u),h=C([]),v=C([]),m=C([]),y=C([]),b=g((()=>[{title:l.t("markets.newListings"),key:"newListings",trackKey:Ei.newListing,icon:Ce,list:h.value},{title:l.t("markets.topGainers"),key:"topGainers",trackKey:Ei.topGainers,icon:wt,list:v.value},{title:l.t("markets.topLosers"),key:"topLosers",trackKey:Ei.topLosers,icon:Ji,list:m.value}
1,{title:l.t("markets.highestVolume"),key:"highestVolume",trackKey:Ei.highestVolume,icon:Me,list:y.value}]));return M(c,(t=>{t&&async function(){try{const t=i?St.spot:St.futures,e=i?c.value:ft,n=await _t.getMarketsOverview({category:t,currency:e}),{newListings:r,topGainers:o,topLosers:s,highestVolume:a}=n.data;h.value=r,v.value=o,m.value=s,y.value=a}catch(t){}}()}),{immediate:!0}),(t,e)=>(r(),f("div",Qi,[a(Je,{class:"slider",isShowCustomPaging:"",options:s.value},{default:o((()=>[(r(!0),f(p,null,d(b.value,(t=>(r(),f("div",{key:t.key},[a(Zi,{overview:t},null,8,["overview"])])))),128))])),_:1},8,["options"])]))}}),[["__scopeId","data-v-b68e243d"]]),en=qe(y({__name:"ScrollFog",props:{isHorizontal:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},setup(t,{expose:e}){const i=t;let n;const o=C(!1),a=C(!1),l=C(!0),c=k("containerRef"),h=k("innerRef");function p(){if(!c.value)return 0;const{offsetHeight:t,offsetWidth:e}=c.value;return i.isHorizontal?e:t}function d(){if(!h.value)return 0;const{offsetHeight:t,offsetWidth:e}=h.value;return i.isHorizontal?e:t}function v(){o.value=p()<d()}M((()=>i.isHorizontal),(()=>{v(),m()}));const m=Ct((function(){const t=function(){if(!c.value)return 0;const{scrollTop:t,scrollLeft:e}=c.value;return i.isHorizontal?e:t}();a.value=p()+t>=d(),l.value=0===t}),300);function y(t){for(const e of t)e.contentBoxSize&&(v(),m())}return x((()=>{n=new ResizeObserver(y),c.value&&n.observe(c.value)})),T((()=>{c.value&&n.unobserve(c.value)})),e({checkScrollBar:v,onScrollThrottle:m}),(t,e)=>(r(),f("div",{ref_key:"containerRef",ref:c,class:b(["scroll-fog-container",{horizontal:t.isHorizontal,disabled:t.isDisabled,"show-more":o.value&&!a.value,"show-previous":o.value&&!l.value}]),onScroll:e[0]||(e[0]=(...t)=>u(m)&&u(m)(...t))},[s("div",{ref_key:"innerRef",ref:h,class:"scroll-fog-inner"},[E(t.$slots,"default",{},void 0,!0)],512)],34))}}),[["__scopeId","data-v-9c2ac3d0"]]);function nn(t,e){return 0==t.toNumber()?null:t.times(e)}function rn(t=""){return t.toLowerCase().replace("_","-")}function on(t,e,i){const n=i===Mt.asc?-1:1;if(Number(t)===Number(e))return null===t?n:null===e?-n:0;const r=D(Number(t)),o=D(Number(e));return i===Mt.asc?r.minus(o).toNumber():o.minus(r).toNumber()}function sn(t={}){const e=kt(t),i=h(),n=xt(),r=g((()=>i.getters.getCurrencySymbol));return{spotMarketList:g((()=>{const{rawSpotMarketsData:t,spotFavoriteMarkets:i=[],quoteCurrency:o}=u(e),s=r.value(o);return t.map((t=>{const{baseCurrency:e}=t,r=n.getExchangeInfoBySymbol(`${e}-${o}`).priceDecimal??"",a=i.includes(e),l=D(t.price);return{currency:e,symbol:e,displayName:n.getDisplayNameBySymbol(e),currencySymbol:s,lastPrice:l,change:D(t.change),volume:D(t.volume),marketCap:nn(D(t.circulatingSupply),l),priceFilter:r,sortId:t.sortId||0,categories:(null==t?void 0:t.categories)||[],isFavorite:a}})).sort(((t,e)=>t.sortId-e.sortId))}))}}const{enableSpotTrade:an}=lt;function ln(t,e={}){const i=kt(t),n=kt(e);let r;const o=C([]),{spotMarketList:s}=sn((()=>({spotFavoriteMarkets:u(n).spotFavoriteMarkets,rawSpotMarketsData:o.value,quoteCurrency:u(i).currency})));const a=Tt((async function(){try{const{currency:t,...e}=u(i);if(an&&t){const i=await _t.getMarketsList({marketType:St.spot,isFavorites:!1,currency:t,...e});o.value=i.data}}catch(t){}}),300);return M((()=>i.value),(()=>{a()})),x((()=>{a(),an&&(r=setInterval((()=>{a()}),ke))})),T((()=>{clearInterval(r),r=void 0})),{rawMarkets:o,spotMarketList:s,getSpotMarkets:a}}const{enableFuturesTrade:un}=lt;function cn(t,i={}){const n=kt(t),r=kt(i);let o;const s=C([]),{futuresMarketList:a}=function(t={}){const i=kt(t),n=_(),r=it(),{lang:o}=e(r),s=h(),a=g((()=>s.state.futures.marketMap)),l=g((()=>s.getters.getCurrencySymbol));function c(t,e){return Dt[o.value](t,Lt(e))}return{futuresMarketList:g((()=>{const{rawFuturesMarketsData:t,futuresFavoriteMarkets:e=[],quoteCurrency:r}=u(i),o=l.value(r);return t.map((t=>{const{baseCurrency:i,isTimeBasedContract:r,closeTime:s,priceFilter:l,displayName:u,categoryId:h,promoIcon:f,marketStatus:p}=a.value[t.baseCurrency]||{},d=e.includes(t.baseCurrency),v=D(t.price);
1return{displayName:u,currency:i||"",symbol:t.baseCurrency,marketType:r?c(s,t.baseCurrency):n.t("t.perpetual"),currencySymbol:o,lastPrice:v,change:D(t.change),volume:D(t.volume),marketCap:nn(D(t.circulatingSupply),v),priceFilter:l??"",sortId:t.sortId,isTimeBasedContract:r,isFavorite:d,categoryId:h,promoIcon:f,isPostOnly:p===Et.MARKET_OFF_HOURS}})).sort(((t,e)=>t.sortId-e.sortId))}))}}((()=>({futuresFavoriteMarkets:u(r).futuresFavoriteMarkets,quoteCurrency:u(n).currency,rawFuturesMarketsData:s.value})));const l=Tt((async function(){try{const{currency:t,...e}=u(n);if(un&&t){const i=await _t.getMarketsList({marketType:St.futures,isFavorites:!1,currency:t,...e});s.value=i.data}}catch(t){}}),300);return M((()=>n.value),(()=>{l()})),x((()=>{l(),un&&(o=setInterval((()=>{l()}),ke))})),T((()=>{clearInterval(o),o=void 0})),{rawMarkets:s,futuresMarketList:a,getFuturesMarkets:l}}function hn(){let t;const i=function(){const t=_(),{getFavoriteMarkets:e}=_e();return async function(...i){try{await e(...i)}catch(n){n===Ot.getFavoriteMarketsFail&&It({toastType:Bt.dark,title:t.t("markets.favorite.errors.getFavoriteMarketsFail")})}}}(),n=it(),{loginState:r}=e(n),o=_e(),{isSpotUserCustomized:s,spotFavoriteMarkets:a,isFuturesUserCustomized:l,futuresFavoriteMarkets:u}=e(o),c=g((()=>a.value.map((t=>t.symbol)))),h=g((()=>u.value.map((t=>t.symbol)))),f=g((()=>s.value?c.value:[])),p=g((()=>l.value?h.value:[])),d=g((()=>s.value?[]:c.value)),v=g((()=>l.value?[]:h.value));return x((async()=>{r.value&&(t=setInterval((()=>{i()}),ke),await i())})),T((()=>{clearInterval(t),t=void 0})),{isSpotUserCustomized:s,isFuturesUserCustomized:l,spotFavoriteSymbols:f,futuresFavoriteSymbols:p,suggestedSpotSymbols:d,suggestedFuturesSymbols:v,spotFavoriteMarkets:a,futuresFavoriteMarkets:u}}function fn(){const t=_(),{updateFavoriteMarkets:e}=_e();return async function(...i){try{await e(...i)}catch(n){let e="";switch(n){case Ot.updateFavoriteMarketsFail:e=t.t("markets.favorite.errors.updateFavoriteMarketsFail");break;case Ot.invalidFavoriteMarkets:e=t.t("markets.favorite.errors.invalidFavoriteMarkets");break;case Ot.getFavoriteMarketsFail:e=t.t("markets.favorite.errors.getFavoriteMarketsFail")}e&&It({toastType:Bt.dark,title:e})}}}const pn=["src"],dn={key:0},vn={class:"search-key"},mn={key:1},yn=qe(y({__name:"EmptyTableDisplay",props:{searchText:{default:""}},setup(t){const{enableCustomBrandStyles:e}=lt;return(t,i)=>(r(),n(Pt,{class:"no-data-available"},L({"empty-text":o((()=>[t.searchText?(r(),f("div",dn,[c(l(t.$t("t.canNotFind"))+" ",1),s("span",vn,l(t.searchText),1)])):(r(),f("div",mn,l(t.$t("t.noDataFound")),1))])),_:2},[u(e)?{name:"no-data-icon",fn:o((()=>[s("img",{class:"image",src:u(di)},null,8,pn)])),key:"0"}:void 0]),1024))}}),[["__scopeId","data-v-fc007c31"]]),gn=qe(y({__name:"FavoriteCell",props:{symbol:{},isFavorite:{type:Boolean,default:!1},isSpotMarket:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["toggle","setLocalStorage"],setup(t,{emit:i}){const{marketSpotFavoriteQuoteCurrency:n,marketFuturesFavoriteQuoteCurrency:o}=lt,s=t,l=i,u=it(),{loginState:c}=e(u),h=fn();async function p(){if(!s.disabled)try{const t=!s.isFavorite;if(c.value){const e=s.isSpotMarket?n:o;l("toggle",t),await h({action:t?Ee.add:Ee.delete,marketList:[{marketType:s.isSpotMarket?Te.spot:Te.futures,marketList:[{symbol:s.symbol,quote:e}]}]})}l("setLocalStorage",{symbol:s.symbol,nextState:t})}catch(t){}}return(t,e)=>(r(),f("div",{onClick:O(p,["stop"])},[a(xe,{class:b(["favorite-icon",{"is-favorite":t.isFavorite}])},null,8,["class"])]))}}),[["__scopeId","data-v-72254d69"]]),bn={class:"pair"},wn={key:0,class:"currency-icon"},Sn={class:"name-container"},_n={class:"name"},Cn={class:"short-name"},Mn={key:0,class:"base-currency"},kn={class:"currency-name"},xn=qe(y({__name:"SymbolCell",props:{isShowIcon:{type:Boolean,default:!1},symbol:{default:null},currency:{default:null},quoteCurrency:{default:null},displayName:{default:null},isFuturesIcon:{type:Boolean,default:!1},promoIcon:{default:De.none},isPostOnly:{type:Boolean,default:!1}},setup(t){const e=t,i=xt(),{convertToDisplaySymbol:o}=ht(),h=g((()=>e.isFuturesIcon?e.currency:o(i.getSpotBaseCurrencyFromMarketSymbol(e.currency??""))));return(t,e)=>(r(),f("div",bn,[t.isShowIcon?(r(),f("div",wn,[a(dt,{name:h.value,showName:!1,size:"24"}
1,null,8,["name"])])):I("",!0),s("div",Sn,[s("div",_n,[s("div",Cn,[c(l(u(o)(t.symbol))+" ",1),t.quoteCurrency?(r(),f("span",Mn," / "+l(t.quoteCurrency),1)):I("",!0)]),t.isFuturesIcon?(r(),n(Le,{key:0,promoType:t.promoIcon,isPostOnly:t.isPostOnly},null,8,["promoType","isPostOnly"])):I("",!0)]),s("div",kn,l(t.displayName),1)])]))}}),[["__scopeId","data-v-9e691128"]]),Tn=y({__name:"LastPriceCell",props:{value:{default:0},formatKey:{default:0},currencySymbol:{default:"$"},currency:{default:""}},setup:t=>(t,e)=>(r(),f("div",null,[a(Se,{fontSize:12},{default:o((()=>[c(l(u(pt)(t.value,{formatKey:t.formatKey,prefix:t.currencySymbol,currency:t.currency})),1)])),_:1})]))}),En=qe(y({__name:"ChangePercentageCell",props:{value:{default:0}},setup(t){const e=t,i=g((()=>{const t=Number(e.value);return Number.isNaN(t)?0:Number(t)})),n=g((()=>null===e.value?"-":pt(100*i.value,{prefix:i.value>0?"+":"",formatKey:"max2",postfix:"%"})));return(t,e)=>(r(),f("div",{class:b(["change",{gain:i.value>0,lose:i.value<0}]),dir:"ltr"},l(n.value),3))}}),[["__scopeId","data-v-9646a155"]]),Dn={class:"volume"},Ln=y({__name:"VolumeCell",props:{value:{default:0}},setup:t=>(t,e)=>(r(),f("div",Dn,l(u(pt)(t.value,{compactWithDigits:2,defaultValue:"-"})),1))}),On={class:"market-cap"},In=y({__name:"MarketCapCell",props:{value:{default:0}},setup:t=>(t,e)=>(r(),f("div",On,l(u(pt)(t.value,{compactWithDigits:2,defaultValue:"-"})),1))}),Bn={class:"filters"},Pn=qe(y({inheritAttrs:!1,__name:"FavoriteSpotTable",props:{spotMarkets:{},spotCurrency:{},searchText:{default:""}},emits:["toggleSpotFavoriteLocalStorageSymbol"],setup(h,{emit:d}){const v=h,m=d,y=_(),b=t(),C=bt(),M=it(),{lang:k}=e(M),x=_e(),{isFavoriteMarketsLoading:T}=e(x),{enable24hVolume:D}=Nt,L={mixpanel:{name:Li,props:t=>({s1:Ei.favorites,s2:`${t.symbol}-${v.spotCurrency}`,s3:Di.main})},posthog:{name:Li,props:t=>({tab:Ei.favorites,trading_pair:`${t.symbol}-${v.spotCurrency}`,page:Di.main})},emit:"onClickRow"},{sortKey:I,sortDirection:B,onSorting:P}=Qe(),A=g((()=>[{id:Oe.favorite,label:"",columnClassName:"favorite-column",isShow:!0},{id:Oe.name,label:y.t("t.name"),isSortable:!0,isShow:!0},{id:Oe.lastPrice,label:y.t("msg.lastPrice"),textAlign:At.right,isSortable:!0,isShow:C.isLargeSize},{id:Oe.changeBy24Hour,label:y.t("markets.24hChange"),textAlign:At.right,isSortable:!0,isShow:C.isLargeSize},{id:Oe.volumeBy24Hour,label:y.t("markets.24hVol",{baseCurrency:v.spotCurrency}),textAlign:At.right,isSortable:!0,isShow:C.isLargeSize&&D},{id:Oe.marketCap,label:y.t("markets.marketCap",{baseCurrency:v.spotCurrency}),textAlign:At.right,isSortable:!0,isShow:C.isLargeSize},{id:Oe.actions,label:"",textAlign:At.center,isShow:C.isLargeSize},{id:Oe.mobilePrice,sortId:Oe.lastPrice,label:y.t("msg.lastPrice"),textAlign:At.right,isSortable:!0,rowColSpan:D?0:void 0,isShow:C.isMobile},{id:Oe.mobileVolume,sortId:Oe.volumeBy24Hour,label:y.t("t.vol"),textAlign:At.right,isSortable:!0,rowColSpan:2,isShow:C.isMobile&&D},{id:Oe.mobileChange,sortId:Oe.changeBy24Hour,label:y.t("t.24hChg"),textAlign:At.right,columnClassName:"mobile-change-column",isSortable:!0,isShow:C.isMobile}].filter((t=>t.isShow)))),N=g((()=>{const t=v.searchText?v.searchText.toLowerCase():"",e=v.spotMarkets.filter((e=>{var i;return!t||e.symbol.toLowerCase().includes(t)||(null==(i=e.displayName)?void 0:i.toLowerCase().includes(t))})),i=u(I),n=u(B);switch(i){case Oe.name:e.sort(((t,e)=>n===Mt.asc?t[i].localeCompare(e[i]):e[i].localeCompare(t[i])));break;case Oe.lastPrice:case Oe.changeBy24Hour:case Oe.volumeBy24Hour:case Oe.marketCap:e.sort(((t,e)=>on(t[i],e[i],n)))}return e}));function F(t){window.open(b.resolve({name:"tradingId",params:{lang:k.value,id:`${t.symbol}-${v.spotCurrency}`}}).href,"_blank")}return(t,e)=>{const h=i("RouterLink"),d=w("track");return r(),f(p,null,[s("div",Bn,[E(t.$slots,"filters",{},void 0,!0)]),S((r(),n(Ft,{class:"table",isSortingControllable:"",keepPagination:"",layout:t.isMobile?"prev, pager, next":"prev, pager, next, jumper",currentSortKey:u(I),currentSortDirection:u(B),columns:A.value,rows:N.value,total:N.value.length,onSort:u(P),onOnClickRow:F},{empty:o((()=>[a(yn,{searchText:t.searchText},null,8,["searchText"])])),[`cell(${u(Oe).favorite})`]:o((({info:i})=>
1[S((r(),n(gn,{key:i.symbol,isSpotMarket:"",symbol:i.symbol,isFavorite:i.isFavorite,quoteCurrency:t.spotCurrency,onSetLocalStorage:e[0]||(e[0]=t=>m("toggleSpotFavoriteLocalStorageSymbol",t))},null,8,["symbol","isFavorite","quoteCurrency"])),[[d,{mixpanel:{name:u(Wi)},posthog:{name:u(Wi)},disabled:u(T),emit:"toggle"}]])])),[`cell(${u(Oe).name})`]:o((({info:e})=>[a(xn,{isShowIcon:"",symbol:e.symbol,currency:e.currency,quoteCurrency:t.spotCurrency,displayName:e.displayName},null,8,["symbol","currency","quoteCurrency","displayName"])])),[`cell(${u(Oe).lastPrice})`]:o((({value:e,info:i})=>[a(Tn,{value:e,formatKey:i.priceFilter,currencySymbol:i.currencySymbol,currency:t.spotCurrency},null,8,["value","formatKey","currencySymbol","currency"])])),[`cell(${u(Oe).changeBy24Hour})`]:o((({value:t})=>[a(En,{value:t},null,8,["value"])])),[`cell(${u(Oe).volumeBy24Hour})`]:o((({value:t})=>[a(Ln,{value:t},null,8,["value"])])),[`cell(${u(Oe).marketCap})`]:o((({value:t})=>[a(In,{value:t},null,8,["value"])])),[`cell(${u(Oe).actions})`]:o((({info:i})=>[S((r(),n(h,{class:"action-link",to:{name:"tradingId",params:{lang:u(k),id:`${i.symbol}-${t.spotCurrency}`}},target:"_blank",rel:"noreferrer noopener",onClick:e[1]||(e[1]=O((()=>{}),["stop"]))},{default:o((()=>[c(l(t.$t("t.trade")),1)])),_:2},1032,["to"])),[[d,{mixpanel:{name:u(Li),props:{s1:u(Ei).favorites,s2:`${i.symbol}-${t.spotCurrency}`,s3:u(Di).main}},posthog:{name:u(Li),props:{tab:u(Ei).favorites,trading_pair:`${i.symbol}-${t.spotCurrency}`,page:u(Di).main}}}]])])),[`cell(${u(Oe).mobilePrice})`]:o((({info:e})=>[a(Tn,{value:e[u(Oe).lastPrice],formatKey:e.priceFilter,currencySymbol:e.currencySymbol,currency:t.spotCurrency},null,8,["value","formatKey","currencySymbol","currency"])])),[`cell(${u(Oe).mobileVolume})`]:o((({info:e})=>[a(Tn,{value:e[u(Oe).lastPrice],formatKey:e.priceFilter,currencySymbol:e.currencySymbol,currency:t.spotCurrency},null,8,["value","formatKey","currencySymbol","currency"]),a(Ln,{class:"mobile-volume",value:e[u(Oe).volumeBy24Hour]},null,8,["value"])])),[`cell(${u(Oe).mobileChange})`]:o((({info:t})=>[a(En,{value:t[u(Oe).changeBy24Hour]},null,8,["value"])])),_:2},1032,["layout","currentSortKey","currentSortDirection","columns","rows","total","onSort"])),[[d,L]])],64)}}}),[["__scopeId","data-v-76cd65b9"]]);
vendor: 4,931 bytes, lines 1-7
1var An={exports:{}};
2/**!
3 * Sortable 1.14.0
4 * @author	RubaXa   <[email protected]>
5 * @author	owenm    <[email protected]>
6 * @license MIT
7 */function Nn(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Fn(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Nn(Object(i),!0).forEach((function(e){Rn(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Nn(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function zn(t){return(zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Rn(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function $n(){return $n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},$n.apply(this,arguments)}function jn(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n<o.length;n++)i=o[n],e.indexOf(i)>=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)i=o[n],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}function Vn(t){return function(t){if(Array.isArray(t))return Wn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Wn(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Wn(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function Hn(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Kn=Hn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Gn=Hn(/Edge/i),Yn=Hn(/firefox/i),Un=Hn(/safari/i)&&!Hn(/chrome/i)&&!Hn(/android/i),Xn=Hn(/iP(ad|od|hone)/i),qn=Hn(/chrome/i)&&Hn(/android/i),Zn={capture:!1,passive:!1};function Jn(t,e,i){t.addEventListener(e,i,!Kn&&Zn)}function Qn(t,e,i){t.removeEventListener(e,i,!Kn&&Zn)}function tr(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(i){return!1}return!1}}function er(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function ir(t,e,i,n){if(t){i=i||document;do{if(null!=e&&(">"===e[0]?t.parentNode===i&&tr(t,e):tr(t,e))||n&&t===i)return t;if(t===i)break}while(t=er(t))}return null}var nr,rr=/\s+/g;function or(t,e,i){if(t&&e)if(t.classList)t.classList[i?"add":"remove"](e);else{var n=(" "+t.className+" ").replace(rr," ").replace(" "+e+" "," ");t.className=(n+(i?" "+e:"")).replace(rr," ")}}function sr(t,e,i){var n=t&&t.style;if(n){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),void 0===e?i:i[e];e in n||-1!==e.indexOf("webkit")||(e="-webkit-"+e),n[e]=i+("string"==typeof i?"":"px")}}function ar(t,e){var i="";if("string"==typeof t)i=t;else do{var n=sr(t,"transform");n&&"none"!==n&&(i=n+" "+i)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(i)}function lr(t,e,i){if(t){var n=t.getElementsByTagName(e),r=0,o=n.length;if(i)for(;r<o;r++)i(n[r],r);return n}return[]}function ur(){var t=document.scrollingElement;return t||document.documentElement}function cr(t,e,i,n,r){if(t.getBoundingClientRect||t===window){var o,s,a,l,u,c,h;if(t!==window&&t.parentNode&&t!==ur()?(s=(o=t.getBoundingClientRect()).top,a=o.left,l=o.bottom,u=o.right,c=o.height,h=o.width):(s=0,a=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,h=window.innerWidth),(e||i)&&t!==window&&(r=r||t.parentNode,!Kn))do{if(r&&r.getBoundingClientRect&&("none"!==sr(r,"transform")||i&&"static"!==sr(r,"position"))){var f=r.getBoundingClientRect();s-=f.top+parseInt(sr(r,"border-top-width")),a-=f.left+parseInt(sr(r,"border-left-width")),l=s+o.height,u=a+o.width;break}}while(r=r.parentNode);
vendor: 4,154 bytes, line 7
7if(n&&t!==window){var p=ar(r||t),d=p&&p.a,v=p&&p.d;p&&(l=(s/=v)+(c/=v),u=(a/=d)+(h/=d))}return{top:s,left:a,bottom:l,right:u,width:h,height:c}}}function hr(t,e,i){for(var n=mr(t,!0),r=cr(t)[e];n;){if(!(r>=cr(n)[i]))return n;if(n===ur())break;n=mr(n,!1)}return!1}function fr(t,e,i,n){for(var r=0,o=0,s=t.children;o<s.length;){if("none"!==s[o].style.display&&s[o]!==Co.ghost&&(n||s[o]!==Co.dragged)&&ir(s[o],i.draggable,t,!1)){if(r===e)return s[o];r++}o++}return null}function pr(t,e){for(var i=t.lastElementChild;i&&(i===Co.ghost||"none"===sr(i,"display")||e&&!tr(i,e));)i=i.previousElementSibling;return i||null}function dr(t,e){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Co.clone||e&&!tr(t,e)||i++;return i}function vr(t){var e=0,i=0,n=ur();if(t)do{var r=ar(t),o=r.a,s=r.d;e+=t.scrollLeft*o,i+=t.scrollTop*s}while(t!==n&&(t=t.parentNode));return[e,i]}function mr(t,e){if(!t||!t.getBoundingClientRect)return ur();var i=t,n=!1;do{if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var r=sr(i);if(i.clientWidth<i.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||i.clientHeight<i.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!i.getBoundingClientRect||i===document.body)return ur();if(n||e)return i;n=!0}}}while(i=i.parentNode);return ur()}function yr(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function gr(t,e){return function(){if(!nr){var i=arguments;1===i.length?t.call(this,i[0]):t.apply(this,i),nr=setTimeout((function(){nr=void 0}),e)}}}function br(t,e,i){t.scrollLeft+=e,t.scrollTop+=i}function wr(t){var e=window.Polymer,i=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}function Sr(t,e){sr(t,"position","absolute"),sr(t,"top",e.top),sr(t,"left",e.left),sr(t,"width",e.width),sr(t,"height",e.height)}function _r(t){sr(t,"position",""),sr(t,"top",""),sr(t,"left",""),sr(t,"width",""),sr(t,"height","")}var Cr="Sortable"+(new Date).getTime();function Mr(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==sr(t,"display")&&t!==Co.ghost){e.push({target:t,rect:cr(t)});var i=Fn({},e[e.length-1].rect);if(t.thisAnimationDuration){var n=ar(t,!0);n&&(i.top-=n.f,i.left-=n.e)}t.fromRect=i}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var i in t)if(t.hasOwnProperty(i))for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t[i][n])return Number(i);return-1}(e,{target:t}),1)},animateAll:function(i){var n=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof i&&i());var r=!1,o=0;e.forEach((function(t){var e=0,i=t.target,s=i.fromRect,a=cr(i),l=i.prevFromRect,u=i.prevToRect,c=t.rect,h=ar(i,!0);h&&(a.top-=h.f,a.left-=h.e),i.toRect=a,i.thisAnimationDuration&&yr(l,a)&&!yr(s,a)&&(c.top-a.top)/(c.left-a.left)===(s.top-a.top)/(s.left-a.left)&&(e=function(t,e,i,n){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))*n.animation}(c,l,u,n.options)),yr(a,s)||(i.prevFromRect=s,i.prevToRect=a,e||(e=n.options.animation),n.animate(i,c,a,e)),e&&(r=!0,o=Math.max(o,e),clearTimeout(i.animationResetTimer),i.animationResetTimer=setTimeout((function(){i.animationTime=0,i.prevFromRect=null,i.fromRect=null,i.prevToRect=null,i.thisAnimationDuration=null}),e),i.thisAnimationDuration=e)})),clearTimeout(t),r?t=setTimeout((function(){"function"==typeof i&&i()}),o):"function"==typeof i&&i(),e=[]},animate:function(t,e,i,n){if(n){sr(t,"transition",""),sr(t,"transform","");var r=ar(this.el),o=r&&r.a,s=r&&r.d,a=(e.left-i.left)/(o||1),l=(e.top-i.top)/(s||1);t.animatingX=!!a,t.animatingY=!!l,sr(t,"transform","translate3d("+a+"px,"+l+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),sr(t,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),sr(t,"transform","translate3d(0,
70,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){sr(t,"transition",""),sr(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),n)}}}}var kr=[],xr={initializeByDefault:!0},Tr={mount:function(t){for(var e in xr)xr.hasOwnProperty(e)&&!(e in t)&&(t[e]=xr[e]);kr.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),kr.push(t)},pluginEvent:function(t,e,i){var n=this;this.eventCanceled=!1,i.cancel=function(){n.eventCanceled=!0};var r=t+"Global";kr.forEach((function(n){e[n.pluginName]&&(e[n.pluginName][r]&&e[n.pluginName][r](Fn({sortable:e},i)),e.options[n.pluginName]&&e[n.pluginName][t]&&e[n.pluginName][t](Fn({sortable:e},i)))}))},initializePlugins:function(t,e,i,n){for(var r in kr.forEach((function(n){var r=n.pluginName;if(t.options[r]||n.initializeByDefault){var o=new n(t,e,t.options);o.sortable=t,o.options=t.options,t[r]=o,$n(i,o.defaults)}})),t.options)if(t.options.hasOwnProperty(r)){var o=this.modifyOption(t,r,t.options[r]);void 0!==o&&(t.options[r]=o)}},getEventProperties:function(t,e){var i={};return kr.forEach((function(n){"function"==typeof n.eventProperties&&$n(i,n.eventProperties.call(e[n.pluginName],t))})),i},modifyOption:function(t,e,i){var n;return kr.forEach((function(r){t[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[e]&&(n=r.optionListeners[e].call(t[r.pluginName],i))})),n}};function Er(t){var e=t.sortable,i=t.rootEl,n=t.name,r=t.targetEl,o=t.cloneEl,s=t.toEl,a=t.from
vendor: 1,735 bytes, line 7
7El,l=t.oldIndex,u=t.newIndex,c=t.oldDraggableIndex,h=t.newDraggableIndex,f=t.originalEvent,p=t.putSortable,d=t.extraEventProperties;if(e=e||i&&i[Cr]){var v,m=e.options,y="on"+n.charAt(0).toUpperCase()+n.substr(1);!window.CustomEvent||Kn||Gn?(v=document.createEvent("Event")).initEvent(n,!0,!0):v=new CustomEvent(n,{bubbles:!0,cancelable:!0}),v.to=s||i,v.from=a||i,v.item=r||i,v.clone=o,v.oldIndex=l,v.newIndex=u,v.oldDraggableIndex=c,v.newDraggableIndex=h,v.originalEvent=f,v.pullMode=p?p.lastPutMode:void 0;var g=Fn(Fn({},d),Tr.getEventProperties(n,e));for(var b in g)v[b]=g[b];i&&i.dispatchEvent(v),m[y]&&m[y].call(e,v)}}var Dr=["evt"],Lr=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.evt,r=jn(i,Dr);Tr.pluginEvent.bind(Co)(t,e,Fn({dragEl:Ir,parentEl:Br,ghostEl:Pr,rootEl:Ar,nextEl:Nr,lastDownEl:Fr,cloneEl:zr,cloneHidden:Rr,dragStarted:Jr,putSortable:Kr,activeSortable:Co.active,originalEvent:n,oldIndex:$r,oldDraggableIndex:Vr,newIndex:jr,newDraggableIndex:Wr,hideGhostForTarget:bo,unhideGhostForTarget:wo,cloneNowHidden:function(){Rr=!0},cloneNowShown:function(){Rr=!1},dispatchSortableEvent:function(t){Or({sortable:e,name:t,originalEvent:n})}},r))};function Or(t){Er(Fn({putSortable:Kr,cloneEl:zr,targetEl:Ir,rootEl:Ar,oldIndex:$r,oldDraggableIndex:Vr,newIndex:jr,newDraggableIndex:Wr},t))}var Ir,Br,Pr,Ar,Nr,Fr,zr,Rr,$r,jr,Vr,Wr,Hr,Kr,Gr,Yr,Ur,Xr,qr,Zr,Jr,Qr,to,eo,io,no=!1,ro=!1,oo=[],so=!1,ao=!1,lo=[],uo=!1,co=[],ho="undefined"!=typeof document,fo=Xn,po=Gn||Kn?"cssFloat":"float",vo=ho&&!qn&&!Xn&&"draggable"in document.createElement("div"),mo=function(){if(ho){if(Kn)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}
vendor: 5,202 bytes, line 7
7(),yo=function(t,e){var i=sr(t),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=fr(t,0,e),o=fr(t,1,e),s=r&&sr(r),a=o&&sr(o),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+cr(r).width,u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+cr(o).width;if("flex"===i.display)return"column"===i.flexDirection||"column-reverse"===i.flexDirection?"vertical":"horizontal";if("grid"===i.display)return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&s.float&&"none"!==s.float){var c="left"===s.float?"left":"right";return!o||"both"!==a.clear&&a.clear!==c?"horizontal":"vertical"}return r&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=n&&"none"===i[po]||o&&"none"===i[po]&&l+u>n)?"vertical":"horizontal"},go=function(t){function e(t,i){return function(n,r,o,s){var a=n.options.group.name&&r.options.group.name&&n.options.group.name===r.options.group.name;if(null==t&&(i||a))return!0;if(null==t||!1===t)return!1;if(i&&"clone"===t)return t;if("function"==typeof t)return e(t(n,r,o,s),i)(n,r,o,s);var l=(i?n:r).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var i={},n=t.group;n&&"object"==zn(n)||(n={name:n}),i.name=n.name,i.checkPull=e(n.pull,!0),i.checkPut=e(n.put),i.revertClone=n.revertClone,t.group=i},bo=function(){!mo&&Pr&&sr(Pr,"display","none")},wo=function(){!mo&&Pr&&sr(Pr,"display","")};ho&&document.addEventListener("click",(function(t){if(ro)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),ro=!1,!1}),!0);var So=function(t){if(Ir){t=t.touches?t.touches[0]:t;var e=(r=t.clientX,o=t.clientY,oo.some((function(t){var e=t[Cr].options.emptyInsertThreshold;if(e&&!pr(t)){var i=cr(t),n=r>=i.left-e&&r<=i.right+e,a=o>=i.top-e&&o<=i.bottom+e;return n&&a?s=t:void 0}})),s);if(e){var i={};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[Cr]._onDragOver(i)}}var r,o,s},_o=function(t){Ir&&Ir.parentNode[Cr]._isOutsideThisEl(t.target)};function Co(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=$n({},e),t[Cr]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return yo(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Co.supportPointer&&"PointerEvent"in window&&!Un,emptyInsertThreshold:5};for(var n in Tr.initializePlugins(this,t,i),i)!(n in e)&&(e[n]=i[n]);for(var r in go(e),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!e.forceFallback&&vo,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Jn(t,"pointerdown",this._onTapStart):(Jn(t,"mousedown",this._onTapStart),Jn(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Jn(t,"dragover",this),Jn(t,"dragenter",this)),oo.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),$n(this,Mr())}function Mo(t,e,i,n,r,o,s,a){var l,u,c=t[Cr],h=c.options.onMove;return!window.CustomEvent||Kn||Gn?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=i,l.draggedRect=n,l.related=r||e,l.relatedRect=o||cr(e),l.willInsertAfter=a,l.originalEvent=s,t.dispatchEvent(l),h&&(u=h.call(c,l,s)),u}function ko(t){t.draggable=!1}function xo(){uo=!1}function To(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,i=e.length,n=0;i--;)n+=e.charCodeAt(i);return n.toString(36)}function Eo(t){return setTimeout(t,0)}function Do(t){return clearTimeout(t)}Co.prototype={constructor:Co,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Qr=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Ir):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,i=this.el,n=this.options,r=n.preventOnFilter,o=t.type,s=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(s||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,u=n.filter;if(function(t){co.length=0;var e=t.getElementsByTagName("input"),i=e.length;for(;i--;){var n=e[i];n.checked&&co.push(n)}}(i),!Ir&&!(/mousedown|pointerdown/.test(o)&&0!==t.button||n.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Un||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=ir(a,n.draggable,i,!1))&&a.animated||Fr===a)
vendor: 4,074 bytes, line 7
7){if($r=dr(a),Vr=dr(a,n.draggable),"function"==typeof u){if(u.call(this,t,a,this))return Or({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:i,fromEl:i}),Lr("filter",e,{evt:t}),void(r&&t.cancelable&&t.preventDefault())}else if(u&&(u=u.split(",").some((function(n){if(n=ir(l,n.trim(),i,!1))return Or({sortable:e,rootEl:n,name:"filter",targetEl:a,fromEl:i,toEl:i}),Lr("filter",e,{evt:t}),!0}))))return void(r&&t.cancelable&&t.preventDefault());n.handle&&!ir(l,n.handle,i,!1)||this._prepareDragStart(t,s,a)}}},_prepareDragStart:function(t,e,i){var n,r=this,o=r.el,s=r.options,a=o.ownerDocument;if(i&&!Ir&&i.parentNode===o){var l=cr(i);if(Ar=o,Br=(Ir=i).parentNode,Nr=Ir.nextSibling,Fr=i,Hr=s.group,Co.dragged=Ir,Gr={target:Ir,clientX:(e||t).clientX,clientY:(e||t).clientY},qr=Gr.clientX-l.left,Zr=Gr.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Ir.style["will-change"]="all",n=function(){Lr("delayEnded",r,{evt:t}),Co.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!Yn&&r.nativeDraggable&&(Ir.draggable=!0),r._triggerDragStart(t,e),Or({sortable:r,name:"choose",originalEvent:t}),or(Ir,s.chosenClass,!0))},s.ignore.split(",").forEach((function(t){lr(Ir,t.trim(),ko)})),Jn(a,"dragover",So),Jn(a,"mousemove",So),Jn(a,"touchmove",So),Jn(a,"mouseup",r._onDrop),Jn(a,"touchend",r._onDrop),Jn(a,"touchcancel",r._onDrop),Yn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ir.draggable=!0),Lr("delayStart",this,{evt:t}),!s.delay||s.delayOnTouchOnly&&!e||this.nativeDraggable&&(Gn||Kn))n();else{if(Co.eventCanceled)return void this._onDrop();Jn(a,"mouseup",r._disableDelayedDrag),Jn(a,"touchend",r._disableDelayedDrag),Jn(a,"touchcancel",r._disableDelayedDrag),Jn(a,"mousemove",r._delayedDragTouchMoveHandler),Jn(a,"touchmove",r._delayedDragTouchMoveHandler),s.supportPointer&&Jn(a,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(n,s.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ir&&ko(Ir),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Qn(t,"mouseup",this._disableDelayedDrag),Qn(t,"touchend",this._disableDelayedDrag),Qn(t,"touchcancel",this._disableDelayedDrag),Qn(t,"mousemove",this._delayedDragTouchMoveHandler),Qn(t,"touchmove",this._delayedDragTouchMoveHandler),Qn(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?Jn(document,"pointermove",this._onTouchMove):Jn(document,e?"touchmove":"mousemove",this._onTouchMove):(Jn(Ir,"dragend",this),Jn(Ar,"dragstart",this._onDragStart));try{document.selection?Eo((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(i){}},_dragStarted:function(t,e){if(no=!1,Ar&&Ir){Lr("dragStarted",this,{evt:e}),this.nativeDraggable&&Jn(document,"dragover",_o);var i=this.options;!t&&or(Ir,i.dragClass,!1),or(Ir,i.ghostClass,!0),Co.active=this,t&&this._appendGhost(),Or({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Yr){this._lastX=Yr.clientX,this._lastY=Yr.clientY,bo();for(var t=document.elementFromPoint(Yr.clientX,Yr.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Yr.clientX,Yr.clientY))!==e;)e=t;if(Ir.parentNode[Cr]._isOutsideThisEl(t),e)do{if(e[Cr]){if(e[Cr]._onDragOver({clientX:Yr.clientX,clientY:Yr.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);wo()}},_onTouchMove:function(t){if(Gr){var e=this.options,i=e.fallbackTolerance,n=e.fallbackOffset,r=t.touches?t.touches[0]:t,o=Pr&&ar(Pr,!0),s=Pr&&o&&o.a,a=Pr&&o&&o.d,l=fo&&io&&vr(io),u=(r.clientX-Gr.clientX+n.x)/(s||1)+(l?l[0]-lo[0]:0)/(s||1),c=(r.clientY-Gr.clientY+n.y)/(a||1)+(l?l[1]-lo[1]:0)/(a||1);
vendor: 4,130 bytes, line 7
7if(!Co.active&&!no){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(Pr){o?(o.e+=u-(Ur||0),o.f+=c-(Xr||0)):o={a:1,b:0,c:0,d:1,e:u,f:c};var h="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");sr(Pr,"webkitTransform",h),sr(Pr,"mozTransform",h),sr(Pr,"msTransform",h),sr(Pr,"transform",h),Ur=u,Xr=c,Yr=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Pr){var t=this.options.fallbackOnBody?document.body:Ar,e=cr(Ir,!0,fo,!0,t),i=this.options;if(fo){for(io=t;"static"===sr(io,"position")&&"none"===sr(io,"transform")&&io!==document;)io=io.parentNode;io!==document.body&&io!==document.documentElement?(io===document&&(io=ur()),e.top+=io.scrollTop,e.left+=io.scrollLeft):io=ur(),lo=vr(io)}or(Pr=Ir.cloneNode(!0),i.ghostClass,!1),or(Pr,i.fallbackClass,!0),or(Pr,i.dragClass,!0),sr(Pr,"transition",""),sr(Pr,"transform",""),sr(Pr,"box-sizing","border-box"),sr(Pr,"margin",0),sr(Pr,"top",e.top),sr(Pr,"left",e.left),sr(Pr,"width",e.width),sr(Pr,"height",e.height),sr(Pr,"opacity","0.8"),sr(Pr,"position",fo?"absolute":"fixed"),sr(Pr,"zIndex","100000"),sr(Pr,"pointerEvents","none"),Co.ghost=Pr,t.appendChild(Pr),sr(Pr,"transform-origin",qr/parseInt(Pr.style.width)*100+"% "+Zr/parseInt(Pr.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,n=t.dataTransfer,r=i.options;Lr("dragStart",this,{evt:t}),Co.eventCanceled?this._onDrop():(Lr("setupClone",this),Co.eventCanceled||((zr=wr(Ir)).draggable=!1,zr.style["will-change"]="",this._hideClone(),or(zr,this.options.chosenClass,!1),Co.clone=zr),i.cloneId=Eo((function(){Lr("clone",i),Co.eventCanceled||(i.options.removeCloneOnHide||Ar.insertBefore(zr,Ir),i._hideClone(),Or({sortable:i,name:"clone"}))})),!e&&or(Ir,r.dragClass,!0),e?(ro=!0,i._loopId=setInterval(i._emulateDragOver,50)):(Qn(document,"mouseup",i._onDrop),Qn(document,"touchend",i._onDrop),Qn(document,"touchcancel",i._onDrop),n&&(n.effectAllowed="move",r.setData&&r.setData.call(i,n,Ir)),Jn(document,"drop",i),sr(Ir,"transform","translateZ(0)")),no=!0,i._dragStartId=Eo(i._dragStarted.bind(i,e,t)),Jn(document,"selectstart",i),Jr=!0,Un&&sr(document.body,"user-select","none"))},_onDragOver:function(t){var e,i,n,r,o=this.el,s=t.target,a=this.options,l=a.group,u=Co.active,c=Hr===l,h=a.sort,f=Kr||u,p=this,d=!1;if(!uo){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=ir(s,a.draggable,o,!0),D("dragOver"),Co.eventCanceled)return d;if(Ir.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||p._ignoreWhileAnimating===s)return O(!1);if(ro=!1,u&&!a.disabled&&(c?h||(n=Br!==Ar):Kr===this||(this.lastPutMode=Hr.checkPull(this,u,Ir,t))&&l.checkPut(this,u,Ir,t))){if(r="vertical"===this._getDirection(t,s),e=cr(Ir),D("dragOverValid"),Co.eventCanceled)return d;if(n)return Br=Ar,L(),this._hideClone(),D("revert"),Co.eventCanceled||(Nr?Ar.insertBefore(Ir,Nr):Ar.appendChild(Ir)),O(!0);var v=pr(o,a.draggable);if(!v||function(t,e,i){var n=cr(pr(i.el,i.options.draggable)),r=10;return e?t.clientX>n.right+r||t.clientX<=n.right&&t.clientY>n.bottom&&t.clientX>=n.left:t.clientX>n.right&&t.clientY>n.top||t.clientX<=n.right&&t.clientY>n.bottom+r}(t,r,this)&&!v.animated){if(v===Ir)return O(!1);if(v&&o===t.target&&(s=v),s&&(i=cr(s)),!1!==Mo(Ar,o,Ir,e,s,i,t,!!s))return L(),o.appendChild(Ir),Br=o,I(),O(!0)}else if(v&&function(t,e,i){var n=cr(fr(i.el,0,i.options,!0)),r=10;return e?t.clientX<n.left-r||t.clientY<n.top&&t.clientX<n.right:t.clientY<n.top-r||t.clientY<n.bottom&&t.clientX<n.left}(t,r,this)){var m=fr(o,0,a,!0);if(m===Ir)return O(!1);if(i=cr(s=m),!1!==Mo(Ar,o,Ir,e,s,i,t,!1))return L(),o.insertBefore(Ir,m),Br=o,I(),O(!0)}else if(s.parentNode===o){i=cr(s);var y,g,b,w=Ir.parentNode!==o,S=!function(t,e,i){var n=i?t.left:t.top,r=i?t.right:t.bottom,o=i?t.width:t.height,s=i?e.left:e.top,a=i?e.right:e.bottom,l=i?e.width:e.height;return n===s||r===a||n+o/2===s+l/2}(Ir.animated&&Ir.toRect||e,s.animated&&s.toRect||i,r),_=r?"top":"left",C=hr(s,"top","top")||hr(Ir,"top","top"),M=C?C.scrollTop:void 0;if(Qr!==s&&(g=i[_],so=!1,ao=!S&&a.invertSwap||w),y=function(t,e,
vendor: 4,169 bytes, line 7
7i,n,r,o,s,a){var l=n?t.clientY:t.clientX,u=n?i.height:i.width,c=n?i.top:i.left,h=n?i.bottom:i.right,f=!1;if(!s)if(a&&eo<u*r){if(!so&&(1===to?l>c+u*o/2:l<h-u*o/2)&&(so=!0),so)f=!0;else if(1===to?l<c+eo:l>h-eo)return-to}else if(l>c+u*(1-r)/2&&l<h-u*(1-r)/2)return function(t){return dr(Ir)<dr(t)?1:-1}(e);if((f=f||s)&&(l<c+u*o/2||l>h-u*o/2))return l>c+u/2?1:-1;return 0}(t,s,i,r,S?1:a.swapThreshold,null==a.invertedSwapThreshold?a.swapThreshold:a.invertedSwapThreshold,ao,Qr===s),0!==y){var k=dr(Ir);do{k-=y,b=Br.children[k]}while(b&&("none"===sr(b,"display")||b===Pr))}if(0===y||b===s)return O(!1);Qr=s,to=y;var x=s.nextElementSibling,T=!1,E=Mo(Ar,o,Ir,e,s,i,t,T=1===y);if(!1!==E)return 1!==E&&-1!==E||(T=1===E),uo=!0,setTimeout(xo,30),L(),T&&!x?o.appendChild(Ir):s.parentNode.insertBefore(Ir,T?x:s),C&&br(C,0,M-C.scrollTop),Br=Ir.parentNode,void 0===g||ao||(eo=Math.abs(g-cr(s)[_])),I(),O(!0)}if(o.contains(Ir))return O(!1)}return!1}function D(a,l){Lr(a,p,Fn({evt:t,isOwner:c,axis:r?"vertical":"horizontal",revert:n,dragRect:e,targetRect:i,canSort:h,fromSortable:f,target:s,completed:O,onMove:function(i,n){return Mo(Ar,o,Ir,e,i,cr(i),t,n)},changed:I},l))}function L(){D("dragOverAnimationCapture"),p.captureAnimationState(),p!==f&&f.captureAnimationState()}function O(e){return D("dragOverCompleted",{insertion:e}),e&&(c?u._hideClone():u._showClone(p),p!==f&&(or(Ir,Kr?Kr.options.ghostClass:u.options.ghostClass,!1),or(Ir,a.ghostClass,!0)),Kr!==p&&p!==Co.active?Kr=p:p===Co.active&&Kr&&(Kr=null),f===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){D("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(s===Ir&&!Ir.animated||s===o&&!s.animated)&&(Qr=null),a.dragoverBubble||t.rootEl||s===document||(Ir.parentNode[Cr]._isOutsideThisEl(t.target),!e&&So(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),d=!0}function I(){jr=dr(Ir),Wr=dr(Ir,a.draggable),Or({sortable:p,name:"change",toEl:o,newIndex:jr,newDraggableIndex:Wr,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Qn(document,"mousemove",this._onTouchMove),Qn(document,"touchmove",this._onTouchMove),Qn(document,"pointermove",this._onTouchMove),Qn(document,"dragover",So),Qn(document,"mousemove",So),Qn(document,"touchmove",So)},_offUpEvents:function(){var t=this.el.ownerDocument;Qn(t,"mouseup",this._onDrop),Qn(t,"touchend",this._onDrop),Qn(t,"pointerup",this._onDrop),Qn(t,"touchcancel",this._onDrop),Qn(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;jr=dr(Ir),Wr=dr(Ir,i.draggable),Lr("drop",this,{evt:t}),Br=Ir&&Ir.parentNode,jr=dr(Ir),Wr=dr(Ir,i.draggable),Co.eventCanceled||(no=!1,ao=!1,so=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Do(this.cloneId),Do(this._dragStartId),this.nativeDraggable&&(Qn(document,"drop",this),Qn(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Un&&sr(document.body,"user-select",""),sr(Ir,"transform",""),t&&(Jr&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),Pr&&Pr.parentNode&&Pr.parentNode.removeChild(Pr),(Ar===Br||Kr&&"clone"!==Kr.lastPutMode)&&zr&&zr.parentNode&&zr.parentNode.removeChild(zr),Ir&&(this.nativeDraggable&&Qn(Ir,"dragend",this),ko(Ir),Ir.style["will-change"]="",Jr&&!no&&or(Ir,Kr?Kr.options.ghostClass:this.options.ghostClass,!1),or(Ir,this.options.chosenClass,!1),Or({sortable:this,name:"unchoose",toEl:Br,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ar!==Br?(jr>=0&&(Or({rootEl:Br,name:"add",toEl:Br,fromEl:Ar,originalEvent:t}),Or({sortable:this,name:"remove",toEl:Br,originalEvent:t}),Or({rootEl:Br,name:"sort",toEl:Br,fromEl:Ar,originalEvent:t}),Or({sortable:this,name:"sort",toEl:Br,originalEvent:t})),Kr&&Kr.save()):jr!==$r&&jr>=0&&(Or({sortable:this,name:"update",toEl:Br,originalEvent:t}),Or({sortable:this,name:"sort",toEl:Br,originalEvent:t})),Co.active&&(null!=jr&&-1!==jr||(jr=$r,Wr=Vr),Or({sortable:this,name:"end",toEl:Br,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Lr("nulling",this),Ar=Ir=Br=Pr=Nr=zr=Fr=Rr=Gr=Yr=Jr=jr=Wr=$r=Vr=Qr=to=Kr=Hr=Co.dragged=Co.ghost=Co.clone=Co.active=null,co.forEac
vendor: 5,437 bytes, line 7
7h((function(t){t.checked=!0})),co.length=Ur=Xr=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Ir&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],i=this.el.children,n=0,r=i.length,o=this.options;n<r;n++)ir(t=i[n],o.draggable,this.el,!1)&&e.push(t.getAttribute(o.dataIdAttr)||To(t));return e},sort:function(t,e){var i={},n=this.el;this.toArray().forEach((function(t,e){var r=n.children[e];ir(r,this.options.draggable,n,!1)&&(i[t]=r)}),this),e&&this.captureAnimationState(),t.forEach((function(t){i[t]&&(n.removeChild(i[t]),n.appendChild(i[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return ir(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(void 0===e)return i[t];var n=Tr.modifyOption(this,t,e);i[t]=void 0!==n?n:e,"group"===t&&go(i)},destroy:function(){Lr("destroy",this);var t=this.el;t[Cr]=null,Qn(t,"mousedown",this._onTapStart),Qn(t,"touchstart",this._onTapStart),Qn(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Qn(t,"dragover",this),Qn(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),oo.splice(oo.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Rr){if(Lr("hideClone",this),Co.eventCanceled)return;sr(zr,"display","none"),this.options.removeCloneOnHide&&zr.parentNode&&zr.parentNode.removeChild(zr),Rr=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(Rr){if(Lr("showClone",this),Co.eventCanceled)return;Ir.parentNode!=Ar||this.options.group.revertClone?Nr?Ar.insertBefore(zr,Nr):Ar.appendChild(zr):Ar.insertBefore(zr,Ir),this.options.group.revertClone&&this.animate(Ir,zr),sr(zr,"display",""),Rr=!1}}else this._hideClone()}},ho&&Jn(document,"touchmove",(function(t){(Co.active||no)&&t.cancelable&&t.preventDefault()})),Co.utils={on:Jn,off:Qn,css:sr,find:lr,is:function(t,e){return!!ir(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},throttle:gr,closest:ir,toggleClass:or,clone:wr,index:dr,nextTick:Eo,cancelNextTick:Do,detectDirection:yo,getChild:fr},Co.get=function(t){return t[Cr]},Co.mount=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Co.utils=Fn(Fn({},Co.utils),t.utils)),Tr.mount(t)}))},Co.create=function(t,e){return new Co(t,e)},Co.version="1.14.0";var Lo,Oo,Io,Bo,Po,Ao,No=[],Fo=!1;function zo(){No.forEach((function(t){clearInterval(t.pid)})),No=[]}function Ro(){clearInterval(Ao)}var $o,jo=gr((function(t,e,i,n){if(e.scroll){var r,o=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,u=ur(),c=!1;Oo!==i&&(Oo=i,zo(),Lo=e.scroll,r=e.scrollFn,!0===Lo&&(Lo=mr(i,!0)));var h=0,f=Lo;do{var p=f,d=cr(p),v=d.top,m=d.bottom,y=d.left,g=d.right,b=d.width,w=d.height,S=void 0,_=void 0,C=p.scrollWidth,M=p.scrollHeight,k=sr(p),x=p.scrollLeft,T=p.scrollTop;p===u?(S=b<C&&("auto"===k.overflowX||"scroll"===k.overflowX||"visible"===k.overflowX),_=w<M&&("auto"===k.overflowY||"scroll"===k.overflowY||"visible"===k.overflowY)):(S=b<C&&("auto"===k.overflowX||"scroll"===k.overflowX),_=w<M&&("auto"===k.overflowY||"scroll"===k.overflowY));var E=S&&(Math.abs(g-o)<=a&&x+b<C)-(Math.abs(y-o)<=a&&!!x),D=_&&(Math.abs(m-s)<=a&&T+w<M)-(Math.abs(v-s)<=a&&!!T);if(!No[h])for(var L=0;L<=h;L++)No[L]||(No[L]={});No[h].vx==E&&No[h].vy==D&&No[h].el===p||(No[h].el=p,No[h].vx=E,No[h].vy=D,clearInterval(No[h].pid),0==E&&0==D||(c=!0,No[h].pid=setInterval(function(){n&&0===this.layer&&Co.active._onTouchMove(Po);var e=No[this.layer].vy?No[this.layer].vy*l:0,i=No[this.layer].vx?No[this.layer].vx*l:0;"function"==typeof r&&"continue"!==r.call(Co.dragged.parentNode[Cr],i,e,t,Po,No[this.layer].el)||br(No[this.layer].el,i,e)}.bind({layer:h}),24))),h++}while(e.bubbleScroll&&f!==u&&(f=mr(f,!1)));Fo=c}}),30),Vo=function(t){var e=t.originalEvent,i=t.putSortable,n=t.dragEl,r=t.activeSortable,o=t.dispatchSortableEvent,s=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var l=i||r;s();var u=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(u.clientX,u.clientY);a(),l&&!l.el.contains(c)&&(o("spill"),this.onSpill({dragEl:n,putSortable:i}))}};function Wo(){}function Ho(){}Wo.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var n=fr(this.sortable.el,this.startIndex,this.options);n?this.sortable.el.insertBefore(e,n):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:Vo},$n(Wo,{pluginName:"revertOnSpill"}),Ho.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:Vo},$n(Ho,{pluginName:"removeOnSpill"});var Ko,Go,Yo,Uo,Xo,qo=[],Zo=[],Jo=!1,Qo=!1,ts=!1;
7function es(t,e){Zo.forEach((function(i,n){var r=e.children[i.sortableIndex+(t?Number(n):0)];r?e.insertBefore(i,r):e.appendChild(i)}))}function is(){qo.forEach((function(t){t!==Yo&&t.parentNode&&t.parentNode.removeChild(t)}))}Co.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?Jn(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Jn(document,"pointermove",this._handleFallbackAutoScroll):e.touches?Jn(document,"touchmove",this._handleFallbackAutoScroll):Jn(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?Qn(document,"dragover",this._handleAutoScroll):(Qn(document,"pointermove",this._handleFallbackAutoScroll),Qn(document,"touchmove",this._handleFallbackAutoScroll),Qn(document,"mousemove",this._handleFallbackAutoScroll)),Ro(),zo(),clearTimeout(nr),nr=void 0},nulling:function(){Po=Oo=Lo=Fo=Ao=Io=Bo=null,No.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var i=this,n=(t.touches?t.touches[0]:t).clientX,r=(t.touches?t.touches[0]:t).clientY,o=document.elementFromPoint(n,r);if(Po=t,e||this.options.forceAutoScrollFallback||Gn||Kn||Un){jo(t,this.options,o,e);var s=mr(o,!0);!Fo||Ao&&n===Io&&r===Bo||(Ao&&Ro(),Ao=setInterval((function(){var o=mr(document.elementFromPoint(n,r),!0);o!==s&&(s=o,zo()),jo(t,i.options,o,e)}),10),Io=n,Bo=r)}else{if(!this.options.bubbleScroll||mr(o,!0)===ur())return void zo();jo(t,this.options,mr(o,!1),!1)}}},$n(t,{pluginName:"scroll",initializeByDefault:!0})}),Co.mount(Ho,Wo);const ns=ei(Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:function(){function t(t){for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));t.options.supportPointer?Jn(document,"pointerup",this._deselectMultiDrag):(Jn(document,"mouseup",this._deselectMultiDrag),Jn(document,"touchend",this._deselectMultiDrag)),Jn(document,"keydown",this._checkKeyDown),Jn(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(e,i){var n="";qo.length&&Go===t?qo.forEach((function(t,e){n+=(e?", ":"")+t.textContent})):n=i.textContent,e.setData("Text",n)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var e=t.dragEl;Yo=e},delayEnded:function(){this.isMultiDrag=~qo.indexOf(Yo)},setupClone:function(t){var e=t.sortable,i=t.cancel;if(this.isMultiDrag){for(var n=0;n<qo.length;n++)Zo.push(wr(qo[n])),Zo[n].sortableIndex=qo[n].sortableIndex,Zo[n].draggable=!1,Zo[n].style["will-change"]="",or(Zo[n],this.options.selectedClass,!1),qo[n]===Yo&&or(Zo[n],this.options.chosenClass,!1);e._hideClone(),i()}},clone:function(t){var e=t.sortable,i=t.rootEl,n=t.dispatchSortableEvent,r=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||qo.length&&Go===e&&(es(!0,i),n("clone"),r()))},showClone:function(t){var e=t.cloneNowShown,i=t.rootEl,n=t.cancel;this.isMultiDrag&&(es(!1,i),Zo.forEach((function(t){sr(t,"display","")})),e(),Xo=!1,n())},hideClone:function(t){var e=this;t.sortable;var i=t.cloneNowHidden,n=t.cancel;this.isMultiDrag&&(Zo.forEach((function(t){sr(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)})),i(),Xo=!0,n())},dragStartGlobal:function(t){t.sortable,!this.isMultiDrag&&Go&&Go.multiDrag._deselectMultiDrag(),qo.forEach((function(t){t.sortableIndex=dr(t)})),qo=qo.sort((function(t,e){return t.sortableIndex-e.sortableIndex})),ts=!0},dragStarted:function(t){var e=this,i=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(i.captureAnimationState(),this.options.animation)){qo.forEach((function(t){t!==Yo&&sr(t,"position","absolute")}));var n=cr(Yo,!1,!0,!0);qo.forEach((function(t){t!==Yo&&Sr(t,n)})),Qo=!0,Jo=!0}i.animateAll((function(){Qo=!1,Jo=!1,e.options.animation&&qo.forEach((function(t){_r(t)})),e.options.sort&&is()}))}},dragOver:function(t){var e=t.target,i=t.completed,n=t.cancel;Qo&&~qo.indexOf(e)&&(i(!1),n())},revert:function(t){var e=t.fromSortable,i=t.rootEl,n=t.sortable,r=t.dragRect;qo.length>1&&(qo.forEach((function(t){n.addAnimationState({target:t,rect:Qo?cr(t):r}),_r(t),t.fromRect=r,e.removeAnimationState(t)})),Qo=!1,function(t,e){qo.forEach((function(i,n){var r=e.children[i.sortableIndex+(t?Number(n):0)];r?e.insertBefore(i,r):e.appendChild(i)}))}(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(t){var e=t.sortable,i=t.isOwner,n=t.insertion,r=t.activeSortable,o=t.parentEl,s=t.putSortable,a=this.options;if(n){if(i&&r._hideClone(),Jo=!1,a.animation&&qo.length>
71&&(Qo||!i&&!r.options.sort&&!s)){var l=cr(Yo,!1,!0,!0);qo.forEach((function(t){t!==Yo&&(Sr(t,l),o.appendChild(t))})),Qo=!0}if(!i)if(Qo||is(),qo.length>1){var u=Xo;r._showClone(e),r.options.animation&&!Xo&&u&&Zo.forEach((function(t){r.addAnimationState({target:t,rect:Uo}),t.fromRect=Uo,t.thisAnimationDuration=null}))}else r._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,i=t.isOwner,n=t.activeSortable;if(qo.forEach((function(t){t.thisAnimationDuration=null})),n.options.animation&&!i&&n.multiDrag.isMultiDrag){Uo=$n({},e);var r=ar(Yo,!0);Uo.top-=r.f,Uo.left-=r.e}},dragOverAnimationComplete:function(){Qo&&(Qo=!1,is())},drop:function(t){var e=t.originalEvent,i=t.rootEl,n=t.parentEl,r=t.sortable,o=t.dispatchSortableEvent,s=t.oldIndex,a=t.putSortable,l=a||this.sortable;if(e){var u=this.options,c=n.children;if(!ts)if(u.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),or(Yo,u.selectedClass,!~qo.indexOf(Yo)),~qo.indexOf(Yo))qo.splice(qo.indexOf(Yo),1),Ko=null,Er({sortable:r,rootEl:i,name:"deselect",targetEl:Yo});else{if(qo.push(Yo),Er({sortable:r,rootEl:i,name:"select",targetEl:Yo}),e.shiftKey&&Ko&&r.el.contains(Ko)){var h,f,p=dr(Ko),d=dr(Yo);if(~p&&~d&&p!==d)for(d>p?(f=p,h=d):(f=d,h=p+1);f<h;f++)~qo.indexOf(c[f])||(or(c[f],u.selectedClass,!0),qo.push(c[f]),Er({sortable:r,rootEl:i,name:"select",targetEl:c[f]}))}else Ko=Yo;Go=l}if(ts&&this.isMultiDrag){if(Qo=!1,(n[Cr].options.sort||n!==i)&&qo.length>1){var v=cr(Yo),m=dr(Yo,":not(."+this.options.selectedClass+")");if(!Jo&&u.animation&&(Yo.thisAnimationDuration=null),l.captureAnimationState(),!Jo&&(u.animation&&(Yo.fromRect=v,qo.forEach((function(t){if(t.thisAnimationDuration=null,t!==Yo){var e=Qo?cr(t):v;t.fromRect=e,l.addAnimationState({target:t,rect:e})}}))),is(),qo.forEach((function(t){c[m]?n.insertBefore(t,c[m]):n.appendChild(t),m++})),s===dr(Yo))){var y=!1;qo.forEach((function(t){t.sortableIndex===dr(t)||(y=!0)})),y&&o("update")}qo.forEach((function(t){_r(t)})),l.animateAll()}Go=l}(i===n||a&&"clone"!==a.lastPutMode)&&Zo.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)}))}},nullingGlobal:function(){this.isMultiDrag=ts=!1,Zo.length=0},destroyGlobal:function(){this._deselectMultiDrag(),Qn(document,"pointerup",this._deselectMultiDrag),Qn(document,"mouseup",this._deselectMultiDrag),Qn(document,"touchend",this._deselectMultiDrag),Qn(document,"keydown",this._checkKeyDown),Qn(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==ts&&ts||Go!==this.sortable||t&&ir(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;qo.length;){var e=qo[0];or(e,this.options.selectedClass,!1),qo.shift(),Er({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},$n(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[Cr];e&&e.options.multiDrag&&!~qo.indexOf(t)&&(Go&&Go!==e&&(Go.multiDrag._deselectMultiDrag(),Go=e),or(t,e.options.selectedClass,!0),qo.push(t))},deselect:function(t){var e=t.parentNode[Cr],i=qo.indexOf(t);e&&e.options.multiDrag&&~i&&(or(t,e.options.selectedClass,!1),qo.splice(i,1))}},eventProperties:function(){var t=this,e=[],i=[];return qo.forEach((function(n){var r;e.push({multiDragElement:n,index:n.sortableIndex}),r=Qo&&n!==Yo?-1:Qo?dr(n,":not(."+t.options.selectedClass+")"):dr(n),i.push({multiDragElement:n,index:r})})),{items:Vn(qo),clones:[].concat(Zo),oldIndicies:e,newIndicies:i}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})},Sortable:Co,Swap:function(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){var e=t.dragEl;$o=e},dragOverValid:function(t){var e=t.completed,i=t.target,n=t.onMove,r=t.activeSortable,o=t.changed,s=t.cancel;if(r.options.swap){var a=this.sortable.el,l=this.options;if(i&&i!==a){var u=$o;!1!==n(i)?(or(i,l.swapClass,!0),$o=i):$o=null,u&&u!==$o&&or(u,l.swapClass,!1)}o(),e(!0),s()}},drop:function(t){var e=t.activeSortable,i=t.putSortable,n=t.dragEl,r=i||this.sortable,o=this.options;$o&&or($o,o.swapClass,!1),$o&&(o.swap||i&&i.options.swap)&&n!==$o&&(r.captureAnimationState(),r!==e&&e.captureAnimationState(),function(t,e){var i,n,r=t.parentNode,o=e.parentNode;if(!r||!o||r.isEqualNode(e)||o.isEqualNode(t))return;i=dr(t),n=dr(e),r.isEqualNode(o)&&i<n&&n++;r.insertBefore(e,r.children[i]),o.insertBefore(t,o.children[n])}(n,$o),r.animateAll(),r!==e&&e.animateAll())},nulling:function(){$o=null}},$n(t,{pluginName:"swap",eventProperties:function(){return{swapItem:$o}}})},default:Co},Symbol.toStringTag,{value:"Module"})));var rs,os,ss;const as=ii(rs?An.exports:(rs=1,"undefined"!=typeof self&&self,An.exports=(os=B(),ss=ns,function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};
vendor: 8,543 bytes, line 7
7return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s="fb15")}({"00ee":function(t,e,i){var n={};n[i("b622")("toStringTag")]="z",t.exports="[object z]"===String(n)},"0366":function(t,e,i){var n=i("1c0b");t.exports=function(t,e,i){if(n(t),void 0===e)return t;switch(i){case 0:return function(){return t.call(e)};case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,r){return t.call(e,i,n,r)}}return function(){return t.apply(e,arguments)}}},"057f":function(t,e,i){var n=i("fc6a"),r=i("241c").f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?function(t){try{return r(t)}catch(e){return s.slice()}}(t):r(n(t))}},"06cf":function(t,e,i){var n=i("83ab"),r=i("d1e7"),o=i("5c6c"),s=i("fc6a"),a=i("c04e"),l=i("5135"),u=i("0cfb"),c=Object.getOwnPropertyDescriptor;e.f=n?c:function(t,e){if(t=s(t),e=a(e,!0),u)try{return c(t,e)}catch(i){}if(l(t,e))return o(!r.f.call(t,e),t[e])}},"0cfb":function(t,e,i){var n=i("83ab"),r=i("d039"),o=i("cc12");t.exports=!n&&!r((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},"13d5":function(t,e,i){var n=i("23e7"),r=i("d58f").left,o=i("a640"),s=i("ae40"),a=o("reduce"),l=s("reduce",{1:0});n({target:"Array",proto:!0,forced:!a||!l},{reduce:function(t){return r(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(t,e,i){var n=i("c6b6"),r=i("9263");t.exports=function(t,e){var i=t.exec;if("function"==typeof i){var o=i.call(t,e);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==n(t))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(t,e)}},"159b":function(t,e,i){var n=i("da84"),r=i("fdbc"),o=i("17c2"),s=i("9112");for(var a in r){var l=n[a],u=l&&l.prototype;if(u&&u.forEach!==o)try{s(u,"forEach",o)}catch(c){u.forEach=o}}},"17c2":function(t,e,i){var n=i("b727").forEach,r=i("a640"),o=i("ae40"),s=r("forEach"),a=o("forEach");t.exports=s&&a?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},"1be4":function(t,e,i){var n=i("d066");t.exports=n("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(t,e,i){var n=i("b622")("iterator"),r=!1;try{var o=0,s={next:function(){return{done:!!o++}},return:function(){r=!0}};s[n]=function(){return this},Array.from(s,(function(){throw 2}))}catch(a){}t.exports=function(t,e){if(!e&&!r)return!1;var i=!1;try{var o={};o[n]=function(){return{next:function(){return{done:i=!0}}}},t(o)}catch(a){}return i}},"1d80":function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},"1dde":function(t,e,i){var n=i("d039"),r=i("b622"),o=i("2d00"),s=r("species");t.exports=function(t){return o>=51||!n((function(){var e=[];return(e.constructor={})[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"23cb":function(t,e,i){var n=i("a691"),r=Math.max,o=Math.min;t.exports=function(t,e){var i=n(t);return i<0?r(i+e,0):o(i,e)}},"23e7":function(t,e,i){var n=i("da84"),r=i("06cf").f,o=i("9112"),s=i("6eeb"),a=i("ce4e"),l=i("e893"),u=i("94ca");t.exports=function(t,e){var i,c,h,f,p,d=t.target,v=t.global,m=t.stat;if(i=v?n:m?n[d]||a(d,{}):(n[d]||{}).prototype)for(c in e){if(f=e[c],h=t.noTargetGet?(p=r(i,c))&&p.value:i[c],!u(v?c:d+(m?".":"#")+c,t.forced)&&void 0!==h){if(typeof f==typeof h)continue;l(f,h)}(t.sham||h&&h.sham)&&o(f,"sham",!0),s(i,c,f,t)}}},"241c":function(t,e,i){var n=i("ca84"),r=i("7839").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,r)}},"25f0":function(t,e,i){var n=i("6eeb"),r=i("825a"),o=i("d039"),s=i("ad6d"),a="toString",l=RegExp.prototype,u=l[a],c=o((function(){return"/a/b"!=u.call({source:"a",flags:"b"})})),h=u.name!=a;(c||h)&&n(RegExp.prototype,a,(function(){var t=r(this),e=String(t.source),i=t.flags;return"/"+e+"/"+String(void 0===i&&t instanceof RegExp&&!("flags"in l)?s.call(t):i)}),{unsafe:!0})},"2ca0":function(t,e,i){var n,r=i("23e7"),o=i("06cf").f,s=i("50c4"),a=i("5a34"),l=i("1d80"),u=i("ab13"),c=i("c430"),h="".startsWith,f=Math.min,p=u("startsWith");r({target:"String",proto:!0,forced:!(!c&&!p&&(n=o(String.prototype,"startsWith"),n&&!n.writable)||p)},{startsWith:function(t){var e=String(l(this));a(t);var i=s(f(arguments.length>1?arguments[1]:void 0,e.length)),n=String(t);return h?h.call(e,n,i):e.slice(i,i+n.length)===n}})},"2d00":function(t,e,i){var n,r,o=i("da84"),s=i("342f"),a=o.process,l=a&&a.versions,u=l&&l.v8;u?r=(n=u.split("."))[0]+n[1]:s&&(!(n=s.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/))&&(r=n[1]),t.exports=r&&+r},"342f":function(t,e,i){var n=i("d066");t.exports=n("navigator","userAgent")||""},"35a1":function(t,e,i){var n=i("f5df"),r=i("3f8c"),o=i("b622")("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||r[n(t)]}},"37e8":function(t,e,i){var n=i("83ab"),r=i("9bf2"),o=i("825a"),s=i("df75");t.exports=n?Object.defineProperties:function(t,e){o(t);for(var i,n=s(e),a=n.length,l=0;a>l;)r.f(t,i=n[l++],e[i]);return t}},"3bbe":function(t,e,i){var n=i("861d");t.exports=function(t){if(!n(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3ca3":function(t,e,i){var n=i("6547").charAt,r=i("69f3"),o=i("7dd0"),s="String Iterator",a=r.set,l=r.getterFor(s);o(String,"String",(function(t){a(this,{type:s,string:String(t),index:0})}),(function(){var t,e=l(this),i=e.string,r=e.index;return r>=i.length?{value:void 0,done:!0}:(t=n(i,r),e.index+=t.length,{value:t,done:!1})}))},"3f8c":function(t,e){t.exports={}},4160:function(t,e,i){var n=i("23e7"),r=i("17c2");n({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},"428f":function(t,e,i){var n=i("da84");t.exports=n},"44ad":function(t,e,i){var n=i("d039"),r=i("c6b6"),o="".split;t.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==r(t)?o.call(t,""):Object(t)}:Object},"44d2":function(t,e,i){var n=i("b622"),r=i("7c73"),o=i("9bf2"),s=n("unscopables"),a=Array.prototype;null==a[s]&&o.f(a,s,{configurable:!0,value:r(null)}),t.exports=function(t){a[s][t]=!0}},"44e7":function(t,e,i){var n=i("861d"),r=i("c6b6"),o=i("b622")("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==r(t))}},4930:function(t,e,i){var n=i("d039");t.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},"4d64":function(t,e,i){var n=i("fc6a"),r=i("50c4"),o=i("23cb"),s=function(t){return function(e,i,s){var a,l=n(e),u=r(l.length),c=o(s,u);if(t&&i!=i){for(;u>c;)if((a=l[c++])!=a)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===i)return t||c||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},"4de4":function(t,e,i){var n=i("23e7"),r=i("b727").filter,o=i("1dde"),s=i("ae40"),a=o("filter"),l=s("filter");n({target:"Array",proto:!0,forced:!a||!l},{filter:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(t,e,i){var n=i("0366"),r=i("7b0b"),o=i("9bdd"),s=i("e95a"),a=i("50c4"),l=i("8418"),u=i("35a1");t.exports=function(t){var e,i,c,h,f,p,d=r(t),v="function"==typeof this?this:Array,m=arguments.length,y=m>1?arguments[1]:void 0,g=void 0!==y,b=u(d),w=0;if(g&&(y=n(y,m>2?arguments[2]:void 0,2)),null==b||v==Array&&s(b))for(i=new v(e=a(d.length));e>w;w++)p=g?y(d[w],w):d[w],l(i,w,p);else for(f=(h=b.call(d)).next,i=new v;!(c=f.call(h)).done;w++)p=g?o(h,y,[c.value,w],!0):c.value,l(i,w,p);return i.length=w,i}},"4fad":function(t,e,i){var n=i("23e7"),r=i("6f53").entries;n({target:"Object",stat:!0},{entries:function(t){return r(t)}})}
vendor: 4,076 bytes, line 7
7,"50c4":function(t,e,i){var n=i("a691"),r=Math.min;t.exports=function(t){return t>0?r(n(t),9007199254740991):0}},5135:function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},5319:function(t,e,i){var n=i("d784"),r=i("825a"),o=i("7b0b"),s=i("50c4"),a=i("a691"),l=i("1d80"),u=i("8aa5"),c=i("14c3"),h=Math.max,f=Math.min,p=Math.floor,d=/\$([$&'`]|\d\d?|<[^>]*>)/g,v=/\$([$&'`]|\d\d?)/g;n("replace",2,(function(t,e,i,n){var m=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,y=n.REPLACE_KEEPS_$0,g=m?"$":"$0";return[function(i,n){var r=l(this),o=null==i?void 0:i[t];return void 0!==o?o.call(i,r,n):e.call(String(r),i,n)},function(t,n){if(!m&&y||"string"==typeof n&&-1===n.indexOf(g)){var o=i(e,t,this,n);if(o.done)return o.value}var l=r(t),p=String(this),d="function"==typeof n;d||(n=String(n));var v=l.global;if(v){var w=l.unicode;l.lastIndex=0}for(var S=[];;){var _=c(l,p);if(null===_)break;if(S.push(_),!v)break;""===String(_[0])&&(l.lastIndex=u(p,s(l.lastIndex),w))}for(var C,M="",k=0,x=0;x<S.length;x++){_=S[x];for(var T=String(_[0]),E=h(f(a(_.index),p.length),0),D=[],L=1;L<_.length;L++)D.push(void 0===(C=_[L])?C:String(C));var O=_.groups;if(d){var I=[T].concat(D,E,p);void 0!==O&&I.push(O);var B=String(n.apply(void 0,I))}else B=b(T,p,E,D,O,n);E>=k&&(M+=p.slice(k,E)+B,k=E+T.length)}return M+p.slice(k)}];function b(t,i,n,r,s,a){var l=n+t.length,u=r.length,c=v;return void 0!==s&&(s=o(s),c=d),e.call(a,c,(function(e,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return i.slice(0,n);case"'":return i.slice(l);case"<":a=s[o.slice(1,-1)];break;default:var c=+o;if(0===c)return e;if(c>u){var h=p(c/10);return 0===h?e:h<=u?void 0===r[h-1]?o.charAt(1):r[h-1]+o.charAt(1):e}a=r[c-1]}return void 0===a?"":a}))}}))},5692:function(t,e,i){var n=i("c430"),r=i("c6cd");(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:n?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,i){var n=i("d066"),r=i("241c"),o=i("7418"),s=i("825a");t.exports=n("Reflect","ownKeys")||function(t){var e=r.f(s(t)),i=o.f;return i?e.concat(i(t)):e}},"5a34":function(t,e,i){var n=i("44e7");t.exports=function(t){if(n(t))throw TypeError("The method doesn't accept regular expressions");return t}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"5db7":function(t,e,i){var n=i("23e7"),r=i("a2bf"),o=i("7b0b"),s=i("50c4"),a=i("1c0b"),l=i("65f0");n({target:"Array",proto:!0},{flatMap:function(t){var e,i=o(this),n=s(i.length);return a(t),(e=l(i,0)).length=r(e,i,i,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},6547:function(t,e,i){var n=i("a691"),r=i("1d80"),o=function(t){return function(e,i){var o,s,a=String(r(e)),l=n(i),u=a.length;return l<0||l>=u?t?"":void 0:(o=a.charCodeAt(l))<55296||o>56319||l+1===u||(s=a.charCodeAt(l+1))<56320||s>57343?t?a.charAt(l):o:t?a.slice(l,l+2):s-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},"65f0":function(t,e,i){var n=i("861d"),r=i("e8b5"),o=i("b622")("species");t.exports=function(t,e){var i;return r(t)&&("function"!=typeof(i=t.constructor)||i!==Array&&!r(i.prototype)?n(i)&&null===(i=i[o])&&(i=void 0):i=void 0),new(void 0===i?Array:i)(0===e?0:e)}},"69f3":function(t,e,i){var n,r,o,s=i("7f9a"),a=i("da84"),l=i("861d"),u=i("9112"),c=i("5135"),h=i("f772"),f=i("d012"),p=a.WeakMap;if(s){var d=new p,v=d.get,m=d.has,y=d.set;n=function(t,e){return y.call(d,t,e),e},r=function(t){return v.call(d,t)||{}},o=function(t){return m.call(d,t)}}else{var g=h("state");f[g]=!0,n=function(t,e){return u(t,g,e),e},r=function(t){return c(t,g)?t[g]:{}},o=function(t){return c(t,g)}}t.exports={set:n,get:r,has:o,enforce:function(t){return o(t)?r(t):n(t,{})},getterFor:function(t){return function(e){var i;if(!l(e)||(i=r(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}}}},"6eeb":function(t,e,i){var n=i("da84"),r=i("9112"),o=i("5135"),s=i("ce4e"),a=i("8925"),l=i("69f3"),u=l.get,c=l.enforce,h=String(String).split("String");
7(t.exports=function(t,e,i,a){var l=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,f=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof e||o(i,"name")||r(i,"name",e),c(i).source=h.join("string"==typeof e?e:"")),t!==n?(l?!f&&t[e]&&(u=!0):delete t[e],u?t[e]=i:r(t,e,i)):u?t[e]=i:s(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||a(this)}))},"6f53":function(t,e,i){var n=i("83ab"),r=i("df75"),o=i("fc6a"),s=i("d1e7").f,a=function(t){return function(e){for(var i,a=o(e),l=r(a),u=l.length,c=0,h=[];u>c;)i=l[c++],n&&!s.call(a,i)||h.push(t?[i,a[i]]:a[i]);return h}};t.exports={entries:a(!0),values:a(!1)}},"73d9":function(t,e,i){i("44d2")("flatMap")},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"746f":function(t,e,i){var n=i("428f"),r=i("5135"),o=i("e538"),s=i("9bf2").f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});r(e,t)||s(e,t,{value:o.f(t)})}},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,i){var n=i("1d80");t.exports=function(t){return Object(n(t))}},"7c73":function(t,e,i){var n,r=i("825a"),o=i("37e8"),s=i("7839"),a=i("d012"),l=i("1be4"),u=i("cc12"),c=i("f772"),h="prototype",f="script",p=c("IE_PROTO"),d=function(){},v=function(t){return"<"+f+">"+t+"</"+f+">"},m=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(o){}var t,e,i;m=n?function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e}(n):(e=u("iframe"),i="java"+f+":",e.style.display="none",l.appendChild(e),e.src=String(i),(t=e.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F);for(var r=s.length;r--;)delete m[h][s[r]];return m()};a[p]=!0,t.exports=Object.create||function(t,e){var i;return null!==t?(d[h]=r(t),i=new d,d[h]=null,i[p]=t):i=m(),void 0===e?i:o(i,e)}},"7dd0":function(t,e,i){var n=i("23e7"),r=i("9ed3"),o=i("e163"),s=i("d2bb"),a=i("d44e"),l=i("9112"),u=i("6eeb"),c=i("b622"),h=i("c430"),f=i("3f8c"),p=i("ae93"),d=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,m=c("iterator"),y="keys",g="values",b="entries",w=function(){return this};t.exports=function(t,e,i,c,p,S,_){r(i,e,c);var C,M,k,x=function(t){if(t===p&&O)return O;if(!v&&t in D)return D[t];switch(t){case y:case g:case b:return function(){return new i(this,t)}}return function(){return new i(this)}},T=e+" Iterator",E=!1,D=t.prototype,L=D[m]||D["@@iterator"]||p&&D[p],O=!v&&L||x(p),I="Array"==e&&D.entries||L;if(I&&(C=o(I.call(new t)),d!==Object.prototype&&C.next&&(h||o(C)===d||(s?s(C,d):"function"!=typeof C[m]&&l(C,m,w)),a(C,T,!0,!0),h&&(f[T]=w))),p==g&&L&&L.name!==g&&(E=!0,O=function(){return L.call(this)}),h&&!_||D[m]===O||l(D,m,O),f[e]=O,p)if(M={values:x(g),keys:S?O:x(y),entries:x(b)},_)for(k in M)(v||E||!(k in D))&&u(D,k,M[k]);else n({target:e,proto:!0,forced:v||E},M);return M}},"7f9a":function(t,e,i){var n=i("da84"),r=i("8925"),o=n.WeakMap;t.exports="function"==typeof o&&/native code/.test(r(o))},"825a":function(t,e,i){var n=i("861d");t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,e,i){var n=i("d039");t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},8418:function(t,e,i){var n=i("c04e"),r=i("9bf2"),o=i("5c6c");t.exports=function(t,e,i){var s=n(e);s in t?r.f(t,s,o(0,i)):t[s]=i}},"861d":function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},8875:function(t,e,i){var n,r,o;"undefined"!=typeof self&&self,r=[],void 0===(o="function"==typeof(n=function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(f){var i,n,r,o=/@([^@]*):(\d+):(\d+)\s*$/gi,s=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(f.stack)||o.exec(f.stack),a=s&&s[1]||!1,l=s&&s[2]||!1,u=document.location.href.replace(document.location.hash,""),c=document.getElementsByTagName("script");a===u&&(i=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(l-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),r=i.replace(n,"$1").trim());for(var h=0;h<c.length;h++){if("interactive"===c[h].readyState)return c[h];if(c[h].src===a)return c[h];if(a===u&&c[h].innerHTML&&c[h].innerHTML.trim()===r)return c[h]}return null}}return t})?n.apply(e,r):n)||(t.exports=o)}
vendor: 4,570 bytes, line 7
7,8925:function(t,e,i){var n=i("c6cd"),r=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(t){return r.call(t)}),t.exports=n.inspectSource},"8aa5":function(t,e,i){var n=i("6547").charAt;t.exports=function(t,e,i){return e+(i?n(t,e).length:1)}},"8bbf":function(t,e){t.exports=os},"90e3":function(t,e){var i=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++i+n).toString(36)}},9112:function(t,e,i){var n=i("83ab"),r=i("9bf2"),o=i("5c6c");t.exports=n?function(t,e,i){return r.f(t,e,o(1,i))}:function(t,e,i){return t[e]=i,t}},9263:function(t,e,i){var n,r,o=i("ad6d"),s=i("9f7f"),a=RegExp.prototype.exec,l=String.prototype.replace,u=a,c=(n=/a/,r=/b*/g,a.call(n,"a"),a.call(r,"a"),0!==n.lastIndex||0!==r.lastIndex),h=s.UNSUPPORTED_Y||s.BROKEN_CARET,f=void 0!==/()??/.exec("")[1];(c||f||h)&&(u=function(t){var e,i,n,r,s=this,u=h&&s.sticky,p=o.call(s),d=s.source,v=0,m=t;return u&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),m=String(t).slice(s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==t[s.lastIndex-1])&&(d="(?: "+d+")",m=" "+m,v++),i=new RegExp("^(?:"+d+")",p)),f&&(i=new RegExp("^"+d+"$(?!\\s)",p)),c&&(e=s.lastIndex),n=a.call(u?i:s,m),u?n?(n.input=n.input.slice(v),n[0]=n[0].slice(v),n.index=s.lastIndex,s.lastIndex+=n[0].length):s.lastIndex=0:c&&n&&(s.lastIndex=s.global?n.index+n[0].length:e),f&&n&&n.length>1&&l.call(n[0],i,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(n[r]=void 0)})),n}),t.exports=u},"94ca":function(t,e,i){var n=i("d039"),r=/#|\.prototype\./,o=function(t,e){var i=a[s(t)];return i==u||i!=l&&("function"==typeof e?n(e):!!e)},s=o.normalize=function(t){return String(t).replace(r,".").toLowerCase()},a=o.data={},l=o.NATIVE="N",u=o.POLYFILL="P";t.exports=o},"99af":function(t,e,i){var n=i("23e7"),r=i("d039"),o=i("e8b5"),s=i("861d"),a=i("7b0b"),l=i("50c4"),u=i("8418"),c=i("65f0"),h=i("1dde"),f=i("b622"),p=i("2d00"),d=f("isConcatSpreadable"),v=9007199254740991,m="Maximum allowed index exceeded",y=p>=51||!r((function(){var t=[];return t[d]=!1,t.concat()[0]!==t})),g=h("concat"),b=function(t){if(!s(t))return!1;var e=t[d];return void 0!==e?!!e:o(t)};n({target:"Array",proto:!0,forced:!y||!g},{concat:function(t){var e,i,n,r,o,s=a(this),h=c(s,0),f=0;for(e=-1,n=arguments.length;e<n;e++)if(b(o=-1===e?s:arguments[e])){if(f+(r=l(o.length))>v)throw TypeError(m);for(i=0;i<r;i++,f++)i in o&&u(h,f,o[i])}else{if(f>=v)throw TypeError(m);u(h,f++,o)}return h.length=f,h}})},"9bdd":function(t,e,i){var n=i("825a");t.exports=function(t,e,i,r){try{return r?e(n(i)[0],i[1]):e(i)}catch(s){var o=t.return;throw void 0!==o&&n(o.call(t)),s}}},"9bf2":function(t,e,i){var n=i("83ab"),r=i("0cfb"),o=i("825a"),s=i("c04e"),a=Object.defineProperty;e.f=n?a:function(t,e,i){if(o(t),e=s(e,!0),o(i),r)try{return a(t,e,i)}catch(n){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},"9ed3":function(t,e,i){var n=i("ae93").IteratorPrototype,r=i("7c73"),o=i("5c6c"),s=i("d44e"),a=i("3f8c"),l=function(){return this};t.exports=function(t,e,i){var u=e+" Iterator";return t.prototype=r(n,{next:o(1,i)}),s(t,u,!1,!0),a[u]=l,t}},"9f7f":function(t,e,i){var n=i("d039");function r(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=n((function(){var t=r("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=n((function(){var t=r("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},a2bf:function(t,e,i){var n=i("e8b5"),r=i("50c4"),o=i("0366"),s=function(t,e,i,a,l,u,c,h){for(var f,p=l,d=0,v=!!c&&o(c,h,3);d<a;){if(d in i){if(f=v?v(i[d],d,e):i[d],u>0&&n(f))p=s(t,e,f,r(f.length),p,u-1)-1;else{if(p>=9007199254740991)throw TypeError("Exceed the acceptable array length");t[p]=f}p++}d++}return p};t.exports=s},a352:function(t,e){t.exports=ss},a434:function(t,e,i){var n=i("23e7"),r=i("23cb"),o=i("a691"),s=i("50c4"),a=i("7b0b"),l=i("65f0"),u=i("8418"),c=i("1dde"),h=i("ae40"),f=c("splice"),p=h("splice",{ACCESSORS:!0,0:0,1:2}),d=Math.max,v=Math.min;n({target:"Array",proto:!0,forced:!f||!p},{splice:function(t,e){var i,n,c,h,f,p,m=a(this),y=s(m.length),g=r(t,y),b=arguments.length;if(0===b?i=n=0:1===b?(i=0,n=y-g):(i=b-2,n=v(d(o(e),0),y-g)),y+i-n>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(c=l(m,n),h=0;h<n;h++)(f=g+h)in m&&u(c,h,m[f]);if(c.length=n,i<n){for(h=g;h<y-n;h++)p=h+i,(f=h+n)in m?m[p]=m[f]:delete m[p];for(h=y;h>y-n+i;h--)delete m[h-1]}else if(i>n)for(h=y-n;h>g;h--)p=h+i-1,(f=h+n-1)in m?m[p]=m[f]:delete m[p];for(h=0;h<i;h++)m[h+g]=arguments[h+2];return m.length=y-n+i,c}})}
vendor: 4,091 bytes, line 7
7,a4d3:function(t,e,i){var n=i("23e7"),r=i("da84"),o=i("d066"),s=i("c430"),a=i("83ab"),l=i("4930"),u=i("fdbf"),c=i("d039"),h=i("5135"),f=i("e8b5"),p=i("861d"),d=i("825a"),v=i("7b0b"),m=i("fc6a"),y=i("c04e"),g=i("5c6c"),b=i("7c73"),w=i("df75"),S=i("241c"),_=i("057f"),C=i("7418"),M=i("06cf"),k=i("9bf2"),x=i("d1e7"),T=i("9112"),E=i("6eeb"),D=i("5692"),L=i("f772"),O=i("d012"),I=i("90e3"),B=i("b622"),P=i("e538"),A=i("746f"),N=i("d44e"),F=i("69f3"),z=i("b727").forEach,R=L("hidden"),$="Symbol",j="prototype",V=B("toPrimitive"),W=F.set,H=F.getterFor($),K=Object[j],G=r.Symbol,Y=o("JSON","stringify"),U=M.f,X=k.f,q=_.f,Z=x.f,J=D("symbols"),Q=D("op-symbols"),tt=D("string-to-symbol-registry"),et=D("symbol-to-string-registry"),it=D("wks"),nt=r.QObject,rt=!nt||!nt[j]||!nt[j].findChild,ot=a&&c((function(){return 7!=b(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?function(t,e,i){var n=U(K,e);n&&delete K[e],X(t,e,i),n&&t!==K&&X(K,e,n)}:X,st=function(t,e){var i=J[t]=b(G[j]);return W(i,{type:$,tag:t,description:e}),a||(i.description=e),i},at=u?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof G},lt=function(t,e,i){t===K&&lt(Q,e,i),d(t);var n=y(e,!0);return d(i),h(J,n)?(i.enumerable?(h(t,R)&&t[R][n]&&(t[R][n]=!1),i=b(i,{enumerable:g(0,!1)})):(h(t,R)||X(t,R,g(1,{})),t[R][n]=!0),ot(t,n,i)):X(t,n,i)},ut=function(t,e){d(t);var i=m(e),n=w(i).concat(pt(i));return z(n,(function(e){a&&!ct.call(i,e)||lt(t,e,i[e])})),t},ct=function(t){var e=y(t,!0),i=Z.call(this,e);return!(this===K&&h(J,e)&&!h(Q,e))&&(!(i||!h(this,e)||!h(J,e)||h(this,R)&&this[R][e])||i)},ht=function(t,e){var i=m(t),n=y(e,!0);if(i!==K||!h(J,n)||h(Q,n)){var r=U(i,n);return!r||!h(J,n)||h(i,R)&&i[R][n]||(r.enumerable=!0),r}},ft=function(t){var e=q(m(t)),i=[];return z(e,(function(t){h(J,t)||h(O,t)||i.push(t)})),i},pt=function(t){var e=t===K,i=q(e?Q:m(t)),n=[];return z(i,(function(t){!h(J,t)||e&&!h(K,t)||n.push(J[t])})),n};l||(G=function(){if(this instanceof G)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=I(t),i=function(t){this===K&&i.call(Q,t),h(this,R)&&h(this[R],e)&&(this[R][e]=!1),ot(this,e,g(1,t))};return a&&rt&&ot(K,e,{configurable:!0,set:i}),st(e,t)},E(G[j],"toString",(function(){return H(this).tag})),E(G,"withoutSetter",(function(t){return st(I(t),t)})),x.f=ct,k.f=lt,M.f=ht,S.f=_.f=ft,C.f=pt,P.f=function(t){return st(B(t),t)},a&&(X(G[j],"description",{configurable:!0,get:function(){return H(this).description}}),s||E(K,"propertyIsEnumerable",ct,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:G}),z(w(it),(function(t){A(t)})),n({target:$,stat:!0,forced:!l},{for:function(t){var e=String(t);if(h(tt,e))return tt[e];var i=G(e);return tt[e]=i,et[i]=e,i},keyFor:function(t){if(!at(t))throw TypeError(t+" is not a symbol");if(h(et,t))return et[t]},useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),n({target:"Object",stat:!0,forced:!l,sham:!a},{create:function(t,e){return void 0===e?b(t):ut(b(t),e)},defineProperty:lt,defineProperties:ut,getOwnPropertyDescriptor:ht}),n({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:ft,getOwnPropertySymbols:pt}),n({target:"Object",stat:!0,forced:c((function(){C.f(1)}))},{getOwnPropertySymbols:function(t){return C.f(v(t))}}),Y&&n({target:"JSON",stat:!0,forced:!l||c((function(){var t=G();return"[null]"!=Y([t])||"{}"!=Y({a:t})||"{}"!=Y(Object(t))}))},{stringify:function(t,e,i){for(var n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e,(p(e)||void 0!==t)&&!at(t))return f(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!at(e))return e}),r[1]=e,Y.apply(null,r)}}),G[j][V]||T(G[j],V,G[j].valueOf),N(G,$),O[R]=!0},a630:function(t,e,i){var n=i("23e7"),r=i("4df4");n({target:"Array",stat:!0,forced:!i("1c7e")((function(t){Array.from(t)}))},{from:r})},a640:function(t,e,i){var n=i("d039");t.exports=function(t,e){var i=[][t];return!!i&&n((function(){i.call(null,e||function(){throw 1},1)}))}},a691:function(t,e){var i=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:i)(t)}}
vendor: 4,240 bytes, line 7
7,ab13:function(t,e,i){var n=i("b622")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(i){try{return e[n]=!1,"/./"[t](e)}catch(r){}}return!1}},ac1f:function(t,e,i){var n=i("23e7"),r=i("9263");n({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},ad6d:function(t,e,i){var n=i("825a");t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},ae40:function(t,e,i){var n=i("83ab"),r=i("d039"),o=i("5135"),s=Object.defineProperty,a={},l=function(t){throw t};t.exports=function(t,e){if(o(a,t))return a[t];e||(e={});var i=[][t],u=!!o(e,"ACCESSORS")&&e.ACCESSORS,c=o(e,0)?e[0]:l,h=o(e,1)?e[1]:void 0;return a[t]=!!i&&!r((function(){if(u&&!n)return!0;var t={length:-1};u?s(t,1,{enumerable:!0,get:l}):t[1]=1,i.call(t,c,h)}))}},ae93:function(t,e,i){var n,r,o,s=i("e163"),a=i("9112"),l=i("5135"),u=i("b622"),c=i("c430"),h=u("iterator"),f=!1;[].keys&&("next"in(o=[].keys())?(r=s(s(o)))!==Object.prototype&&(n=r):f=!0),null==n&&(n={}),c||l(n,h)||a(n,h,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:f}},b041:function(t,e,i){var n=i("00ee"),r=i("f5df");t.exports=n?{}.toString:function(){return"[object "+r(this)+"]"}},b0c0:function(t,e,i){var n=i("83ab"),r=i("9bf2").f,o=Function.prototype,s=o.toString,a=/^\s*function ([^ (]*)/,l="name";n&&!(l in o)&&r(o,l,{configurable:!0,get:function(){try{return s.call(this).match(a)[1]}catch(t){return""}}})},b622:function(t,e,i){var n=i("da84"),r=i("5692"),o=i("5135"),s=i("90e3"),a=i("4930"),l=i("fdbf"),u=r("wks"),c=n.Symbol,h=l?c:c&&c.withoutSetter||s;t.exports=function(t){return o(u,t)||(a&&o(c,t)?u[t]=c[t]:u[t]=h("Symbol."+t)),u[t]}},b64b:function(t,e,i){var n=i("23e7"),r=i("7b0b"),o=i("df75");n({target:"Object",stat:!0,forced:i("d039")((function(){o(1)}))},{keys:function(t){return o(r(t))}})},b727:function(t,e,i){var n=i("0366"),r=i("44ad"),o=i("7b0b"),s=i("50c4"),a=i("65f0"),l=[].push,u=function(t){var e=1==t,i=2==t,u=3==t,c=4==t,h=6==t,f=5==t||h;return function(p,d,v,m){for(var y,g,b=o(p),w=r(b),S=n(d,v,3),_=s(w.length),C=0,M=m||a,k=e?M(p,_):i?M(p,0):void 0;_>C;C++)if((f||C in w)&&(g=S(y=w[C],C,b),t))if(e)k[C]=g;else if(g)switch(t){case 3:return!0;case 5:return y;case 6:return C;case 2:l.call(k,y)}else if(c)return!1;return h?-1:u||c?c:k}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6)}},c04e:function(t,e,i){var n=i("861d");t.exports=function(t,e){if(!n(t))return t;var i,r;if(e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;if("function"==typeof(i=t.valueOf)&&!n(r=i.call(t)))return r;if(!e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},c430:function(t,e){t.exports=!1},c6b6:function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},c6cd:function(t,e,i){var n=i("da84"),r=i("ce4e"),o="__core-js_shared__",s=n[o]||r(o,{});t.exports=s},c740:function(t,e,i){var n=i("23e7"),r=i("b727").findIndex,o=i("44d2"),s=i("ae40"),a="findIndex",l=!0,u=s(a);a in[]&&Array(1)[a]((function(){l=!1})),n({target:"Array",proto:!0,forced:l||!u},{findIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),o(a)},c8ba:function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(n){"object"==typeof window&&(i=window)}t.exports=i},c975:function(t,e,i){var n=i("23e7"),r=i("4d64").indexOf,o=i("a640"),s=i("ae40"),a=[].indexOf,l=!!a&&1/[1].indexOf(1,-0)<0,u=o("indexOf"),c=s("indexOf",{ACCESSORS:!0,1:0});n({target:"Array",proto:!0,forced:l||!u||!c},{indexOf:function(t){return l?a.apply(this,arguments)||0:r(this,t,arguments.length>1?arguments[1]:void 0)}})},ca84:function(t,e,i){var n=i("5135"),r=i("fc6a"),o=i("4d64").indexOf,s=i("d012");t.exports=function(t,e){var i,a=r(t),l=0,u=[];for(i in a)!n(s,i)&&n(a,i)&&u.push(i);for(;e.length>l;)n(a,i=e[l++])&&(~o(u,i)||u.push(i));return u}},caad:function(t,e,i){var n=i("23e7"),r=i("4d64").includes,o=i("44d2");n({target:"Array",proto:!0,forced:!i("ae40")("indexOf",{ACCESSORS:!0,1:0})},{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")}
vendor: 4,074 bytes, line 7
7,cc12:function(t,e,i){var n=i("da84"),r=i("861d"),o=n.document,s=r(o)&&r(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},ce4e:function(t,e,i){var n=i("da84"),r=i("9112");t.exports=function(t,e){try{r(n,t,e)}catch(i){n[t]=e}return e}},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,i){var n=i("428f"),r=i("da84"),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t])||o(r[t]):n[t]&&n[t][e]||r[t]&&r[t][e]}},d1e7:function(t,e,i){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},d28b:function(t,e,i){i("746f")("iterator")},d2bb:function(t,e,i){var n=i("825a"),r=i("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(i,[]),e=i instanceof Array}catch(o){}return function(i,o){return n(i),r(o),e?t.call(i,o):i.__proto__=o,i}}():void 0)},d3b7:function(t,e,i){var n=i("00ee"),r=i("6eeb"),o=i("b041");n||r(Object.prototype,"toString",o,{unsafe:!0})},d44e:function(t,e,i){var n=i("9bf2").f,r=i("5135"),o=i("b622")("toStringTag");t.exports=function(t,e,i){t&&!r(t=i?t:t.prototype,o)&&n(t,o,{configurable:!0,value:e})}},d58f:function(t,e,i){var n=i("1c0b"),r=i("7b0b"),o=i("44ad"),s=i("50c4"),a=function(t){return function(e,i,a,l){n(i);var u=r(e),c=o(u),h=s(u.length),f=t?h-1:0,p=t?-1:1;if(a<2)for(;;){if(f in c){l=c[f],f+=p;break}if(f+=p,t?f<0:h<=f)throw TypeError("Reduce of empty array with no initial value")}for(;t?f>=0:h>f;f+=p)f in c&&(l=i(l,c[f],f,u));return l}};t.exports={left:a(!1),right:a(!0)}},d784:function(t,e,i){i("ac1f");var n=i("6eeb"),r=i("d039"),o=i("b622"),s=i("9263"),a=i("9112"),l=o("species"),u=!r((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),c="$0"==="a".replace(/./,"$0"),h=o("replace"),f=!!/./[h]&&""===/./[h]("a","$0"),p=!r((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]}));t.exports=function(t,e,i,h){var d=o(t),v=!r((function(){var e={};return e[d]=function(){return 7},7!=""[t](e)})),m=v&&!r((function(){var e=!1,i=/a/;return"split"===t&&((i={}).constructor={},i.constructor[l]=function(){return i},i.flags="",i[d]=/./[d]),i.exec=function(){return e=!0,null},i[d](""),!e}));if(!v||!m||"replace"===t&&(!u||!c||f)||"split"===t&&!p){var y=/./[d],g=i(d,""[t],(function(t,e,i,n,r){return e.exec===s?v&&!r?{done:!0,value:y.call(e,i,n)}:{done:!0,value:t.call(i,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),b=g[0],w=g[1];n(String.prototype,t,b),n(RegExp.prototype,d,2==e?function(t,e){return w.call(t,this,e)}:function(t){return w.call(t,this)})}h&&a(RegExp.prototype[d],"sham",!0)}},d81d:function(t,e,i){var n=i("23e7"),r=i("b727").map,o=i("1dde"),s=i("ae40"),a=o("map"),l=s("map");n({target:"Array",proto:!0,forced:!a||!l},{map:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},da84:function(t,e,i){(function(e){var i=function(t){return t&&t.Math==Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||Function("return this")()}).call(this,i("c8ba"))},dbb4:function(t,e,i){var n=i("23e7"),r=i("83ab"),o=i("56ef"),s=i("fc6a"),a=i("06cf"),l=i("8418");n({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(t){for(var e,i,n=s(t),r=a.f,u=o(n),c={},h=0;u.length>h;)void 0!==(i=r(n,e=u[h++]))&&l(c,e,i);return c}})},dbf1:function(t,e,i){(function(t){i.d(e,"a",(function(){return n}));var n="undefined"!=typeof window?window.console:t.console}).call(this,i("c8ba"))},ddb0:function(t,e,i){var n=i("da84"),r=i("fdbc"),o=i("e260"),s=i("9112"),a=i("b622"),l=a("iterator"),u=a("toStringTag"),c=o.values;for(var h in r){var f=n[h],p=f&&f.prototype;
7if(p){if(p[l]!==c)try{s(p,l,c)}catch(v){p[l]=c}if(p[u]||s(p,u,h),r[h])for(var d in o)if(p[d]!==o[d])try{s(p,d,o[d])}catch(v){p[d]=o[d]}}}},df75:function(t,e,i){var n=i("ca84"),r=i("7839");t.exports=Object.keys||function(t){return n(t,r)}},e01a:function(t,e,i){var n=i("23e7"),r=i("83ab"),o=i("da84"),s=i("5135"),a=i("861d"),l=i("9bf2").f,u=i("e893"),c=o.Symbol;if(r&&"function"==typeof c&&(!("description"in c.prototype)||void 0!==c().description)){var h={},f=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof f?new c(t):void 0===t?c():c(t);return""===t&&(h[e]=!0),e};u(f,c);var p=f.prototype=c.prototype;p.constructor=f;var d=p.toString,v="Symbol(test)"==String(c("test")),m=/^Symbol\((.*)\)[^)]+$/;l(p,"description",{configurable:!0,get:function(){var t=a(this)?this.valueOf():this,e=d.call(t);if(s(h,t))return"";var i=v?e.slice(7,-1):e.replace(m,"$1");return""===i?void 0:i}}),n({global:!0,forced:!0},{Symbol:f})}},e163:function(t,e,i){var n=i("5135"),r=i("7b0b"),o=i("f772"),s=i("e177"),a=o("IE_PROTO"),l=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=r(t),n(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?l:null}},e177:function(t,e,i){var n=i("d039");t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e260:function(t,e,i){var n=i("fc6a"),r=i("44d2"),o=i("3f8c"),s=i("69f3"),a=i("7dd0"),l="Array Iterator",u=s.set,c=s.getterFor(l);t.exports=a(Array,"Array",(function(t,e){u(this,{type:l,target:n(t),index:0,kind:e})}),(function(){var t=c(this),e=t.target,i=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:n,done:!1}:"values"==i?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},e439:function(t,e,i){var n=i("23e7"),r=i("d039"),o=i("fc6a"),s=i("06cf").f,a=i("83ab"),l=r((function(){s(1)}));n({target:"Object",stat:!0,forced:!a||l,sham:!a},{getOwnPropertyDescriptor:function(t,e){return s(o(t),e)}})},e538:function(t,e,i){var n=i("b622");e.f=n},e893:function(t,e,i){var n=i("5135"),r=i("56ef"),o=i("06cf"),s=i("9bf2");t.exports=function(t,e){for(var i=r(e),a=s.f,l=o.f,u=0;u<i.length;u++){var c=i[u];n(t,c)||a(t,c,l(e,c))}}},e8b5:function(t,e,i){var n=i("c6b6");t.exports=Array.isArray||function(t){return"Array"==n(t)}},e95a:function(t,e,i){var n=i("b622"),r=i("3f8c"),o=n("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||s[o]===t)}},f5df:function(t,e,i){var n=i("00ee"),r=i("c6b6"),o=i("b622")("toStringTag"),s="Arguments"==r(function(){return arguments}());t.exports=n?r:function(t){var e,i,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(i){}}(e=Object(t),o))?i:s?r(e):"Object"==(n=r(e))&&"function"==typeof e.callee?"Arguments":n}},f772:function(t,e,i){var n=i("5692"),r=i("90e3"),o=n("keys");t.exports=function(t){return o[t]||(o[t]=r(t))}},fb15:function(t,e,i){if(i.r(e),"undefined"!=typeof window){var n=window.document.currentScript,r=i("8875");n=r(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:r});var o=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(i.p=o[1])}function s(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function l(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?a(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function c(t,e){if(t){if("string"==typeof t)return u(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?u(t,e):void 0}}function h(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(l){r=!0,o=l}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}return i}}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to de
7structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}i("99af"),i("4de4"),i("4160"),i("c975"),i("d81d"),i("a434"),i("159b"),i("a4d3"),i("e439"),i("dbb4"),i("b64b"),i("e01a"),i("d28b"),i("e260"),i("d3b7"),i("3ca3"),i("ddb0"),i("a630"),i("fb6a"),i("b0c0"),i("25f0");var p=i("a352"),d=i.n(p);function v(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function m(t,e,i){var n=0===i?t.children[0]:t.children[i-1].nextSibling;t.insertBefore(e,n)}var y=i("dbf1");i("13d5"),i("4fad"),i("ac1f"),i("5319");var g,b,w=/-(\w)/g,S=(g=function(t){return t.replace(w,(function(t,e){return e.toUpperCase()}))},b=Object.create(null),function(t){return b[t]||(b[t]=g(t))});i("5db7"),i("73d9");var _=["Start","Add","Remove","Update","End"],C=["Choose","Unchoose","Sort","Filter","Clone"],M=["Move"],k=[M,_,C].flatMap((function(t){return t})).map((function(t){return"on".concat(t)})),x={manage:M,manageAndEmit:_,emit:C};i("caad"),i("2ca0");var T=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function E(t){return["id","class","role","style"].includes(t)||t.startsWith("data-")||t.startsWith("aria-")||t.startsWith("on")}function D(t){return t.reduce((function(t,e){var i=h(e,2),n=i[0],r=i[1];return t[n]=r,t}),{})}function L(t){return Object.entries(t).filter((function(t){var e=h(t,2),i=e[0];return e[1],!E(i)})).map((function(t){var e=h(t,2),i=e[0],n=e[1];return[S(i),n]})).filter((function(t){var e,i=h(t,2),n=i[0];return i[1],e=n,!(-1!==k.indexOf(e))}))}function O(t,e,i){return e&&function(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}i("c740");var I=function(t){return t.el},B=function(t){return t.__draggable_context},P=function(){function t(e){var i=e.nodes,n=i.header,r=i.default,o=i.footer,s=e.root,a=e.realList;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.defaultNodes=r,this.children=[].concat(f(n),f(r),f(o)),this.externalComponent=s.externalComponent,this.rootTransition=s.transition,this.tag=s.tag,this.realList=a}return O(t,[{key:"render",value:function(t,e){var i=this.tag,n=this.children;return t(i,e,this._isRootComponent?{default:function(){return n}}:n)}},{key:"updated",value:function(){var t=this.defaultNodes,e=this.realList;t.forEach((function(t,i){var n,r;n=I(t),r={element:e[i],index:i},n.__draggable_context=r}))}},{key:"getUnderlyingVm",value:function(t){return B(t)}},{key:"getVmIndexFromDomIndex",value:function(t,e){var i=this.defaultNodes,n=i.length,r=e.children,o=r.item(t);if(null===o)return n;var s=B(o);if(s)return s.index;if(0===n)return 0;var a=I(i[0]);return t<f(r).findIndex((function(t){return t===a}))?0:n}},{key:"_isRootComponent",get:function(){return this.externalComponent||this.rootTransition}}]),t}(),A=i("8bbf");function N(t){var e=["transition-group","TransitionGroup"].includes(t),i=!function(t){return T.includes(t)}(t)&&!e;
7return{transition:e,externalComponent:i,tag:i?Object(A.resolveComponent)(t):e?A.TransitionGroup:t}}function F(t){var e=t.$slots,i=t.tag,n=t.realList,r=function(t){var e=t.$slots,i=t.realList,n=t.getKey,r=i||[],o=h(["header","footer"].map((function(t){return(i=e[t])?i():[];var i})),2),s=o[0],a=o[1],u=e.item;if(!u)throw new Error("draggable element must have an item slot");var c=r.flatMap((function(t,e){return u({element:t,index:e}).map((function(e){return e.key=n(t),e.props=l(l({},e.props||{}),{},{"data-draggable":!0}),e}))}));if(c.length!==r.length)throw new Error("Item slot must have only one child");return{header:s,footer:a,default:c}}({$slots:e,realList:n,getKey:t.getKey}),o=N(i);return new P({nodes:r,root:o,realList:n})}function z(t,e){var i=this;Object(A.nextTick)((function(){return i.$emit(t.toLowerCase(),e)}))}function R(t){var e=this;return function(i,n){if(null!==e.realList)return e["onDrag".concat(t)](i,n)}}function $(t){var e=this,i=R.call(this,t);return function(n,r){i.call(e,n,r),z.call(e,t,n)}}var j=null,V={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:function(t){return t}},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},W=["update:modelValue","change"].concat(f([].concat(f(x.manageAndEmit),f(x.emit)).map((function(t){return t.toLowerCase()})))),H=Object(A.defineComponent)({name:"draggable",inheritAttrs:!1,props:V,emits:W,data:function(){return{error:!1}},render:function(){try{this.error=!1;var t=this.$slots,e=this.$attrs,i=this.tag,n=this.componentData,r=F({$slots:t,tag:i,realList:this.realList,getKey:this.getKey});this.componentStructure=r;var o=function(t){var e=t.$attrs,i=t.componentData,n=void 0===i?{}:i;return l(l({},D(Object.entries(e).filter((function(t){var e=h(t,2),i=e[0];return e[1],E(i)})))),n)}({$attrs:e,componentData:n});return r.render(A.h,o)}catch(s){return this.error=!0,Object(A.h)("pre",{style:{color:"red"}},s.stack)}},created:function(){null!==this.list&&null!==this.modelValue&&y.a.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted:function(){var t=this;if(!this.error){var e=this.$attrs,i=this.$el;this.componentStructure.updated();var n=function(t){var e=t.$attrs,i=t.callBackBuilder,n=D(L(e));Object.entries(i).forEach((function(t){var e=h(t,2),i=e[0],r=e[1];x[i].forEach((function(t){n["on".concat(t)]=r(t)}))}));var r="[data-draggable]".concat(n.draggable||"");return l(l({},n),{},{draggable:r})}({$attrs:e,callBackBuilder:{manageAndEmit:function(e){return $.call(t,e)},emit:function(e){return z.bind(t,e)},manage:function(e){return R.call(t,e)}}}),r=1===i.nodeType?i:i.parentElement;this._sortable=new d.a(r,n),this.targetDomElement=r,r.__draggable_component__=this}},updated:function(){this.componentStructure.updated()},beforeUnmount:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{realList:function(){var t=this.list;return t||this.modelValue},getKey:function(){var t=this.itemKey;return"function"==typeof t?t:function(e){return e[t]}}},watch:{$attrs:{handler:function(t){var e=this._sortable;e&&L(t).forEach((function(t){var i=h(t,2),n=i[0],r=i[1];e.option(n,r)}))},deep:!0}},methods:{getUnderlyingVm:function(t){return this.componentStructure.getUnderlyingVm(t)||null},getUnderlyingPotencialDraggableComponent:function(t){return t.__draggable_component__},emitChanges:function(t){var e=this;Object(A.nextTick)((function(){return e.$emit("change",t)}))},alterList:function(t){if(this.list)t(this.list);else{var e=f(this.modelValue);t(e),this.$emit("update:modelValue",e)}},spliceList:function(){var t=arguments;this.alterList((function(e){return e.splice.apply(e,f(t))}))},updatePosition:function(t,e){this.alterList((function(i){return i.splice(e,0,i.splice(t,1)[0])}))},getRelatedContextFromMoveEvent:function(t){var e=t.to,i=t.related,n=this.getUnderlyingPotencialDraggableComponent(e);if(!n)return{component:n};var r=n.realList,o={list:r,component:n};return e!==i&&r?l(l({},n.getUnderlyingVm(i)||{}),o):o},getVmIndexFromDomIndex:function(t){return this.componentStructure.getVmIndexFromDomIndex(t,this.targetDomElement)},onDragStart:function(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),j=t.item},onDragAdd:function(t){var e=t.item._underlying_vm_;if(void 0!==e){v(t.item);var i=this.getVmIndexFromDomIndex(t.newIndex);this.spliceList(i,0,e);var n={element:e,newIndex:i};this.emitChanges({added:n})}},onDragRemove:function(t){if(m(this.$el,t.item,t.oldIndex),"clone"!==t.pullMode){var e=this.context,i=e.index,n=e.element;this.spliceList(i,1);var r={element:n,oldIndex:i};this.emitChanges({removed:r})}else v(t.clone)},onDragUpdate:function(t){v(t.item),m(t.from,t.item,t.oldIndex);
7var e=this.context.index,i=this.getVmIndexFromDomIndex(t.newIndex);this.updatePosition(e,i);var n={element:this.context.element,oldIndex:e,newIndex:i};this.emitChanges({moved:n})},computeFutureIndex:function(t,e){if(!t.element)return 0;var i=f(e.to.children).filter((function(t){return"none"!==t.style.display})),n=i.indexOf(e.related),r=t.component.getVmIndexFromDomIndex(n);return-1===i.indexOf(j)&&e.willInsertAfter?r+1:r},onDragMove:function(t,e){var i=this.move,n=this.realList;if(!i||!n)return!0;var r=this.getRelatedContextFromMoveEvent(t),o=this.computeFutureIndex(r,t),s=l(l({},this.context),{},{futureIndex:o});return i(l(l({},t),{},{relatedContext:r,draggedContext:s}),e)},onDragEnd:function(){j=null}}}),K=H;e.default=K},fb6a:function(t,e,i){var n=i("23e7"),r=i("861d"),o=i("e8b5"),s=i("23cb"),a=i("50c4"),l=i("fc6a"),u=i("8418"),c=i("b622"),h=i("1dde"),f=i("ae40"),p=h("slice"),d=f("slice",{ACCESSORS:!0,0:0,1:2}),v=c("species"),m=[].slice,y=Math.max;n({target:"Array",proto:!0,forced:!p||!d},{slice:function(t,e){var i,n,c,h=l(this),f=a(h.length),p=s(t,f),d=s(void 0===e?f:e,f);if(o(h)&&("function"!=typeof(i=h.constructor)||i!==Array&&!o(i.prototype)?r(i)&&null===(i=i[v])&&(i=void 0):i=void 0,i===Array||void 0===i))return m.call(h,p,d);for(n=new(void 0===i?Array:i)(y(d-p,0)),c=0;p<d;p++,c++)p in h&&u(n,c,h[p]);return n.length=c,n}})},fc6a:function(t,e,i){var n=i("44ad"),r=i("1d80");t.exports=function(t){return n(r(t))}},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,i){var n=i("4930");t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}}).default)));function ls(t){const e=C(Symbol()),i=C(!1),n=g((()=>({class:{"is-dragging":i.value},animation:300,dragClass:Be,ghostClass:Ie})));return{remountKey:e,attributes:n,events:{start(){i.value=!0},end(){i.value=!1}},onMoveToTop:async function(i){const n=t.value.slice(),r=n.splice(i,1);n.unshift(r[0]),t.value=n,await P(),e.value=Symbol()}}}const us=qe({name:"IconPin",components:{Icon:gt}},[["render",function(t,e,a,l,u,c){const h=i("Icon");return r(),n(h,{width:"24",height:"24",viewBox:"0 0 24 24","aria-label":"Pin Icon","fill-rule":"evenodd"},{default:o((()=>e[0]||(e[0]=[s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18 1.6499H6V4.6499H18V1.6499ZM6 14.7929L12 6.79292L18 14.7929H14V22.2214H10V14.7929H6Z"},null,-1)]))),_:1,__:[0]})}]]);const cs=qe({name:"IconSort",components:{Icon:gt}},[["render",function(t,e,a,l,u,c){const h=i("Icon");return r(),n(h,{width:"24",height:"24",viewBox:"0 0 24 24","aria-label":"Sort Icon","fill-rule":"evenodd"},{default:o((()=>e[0]||(e[0]=[s("path",{d:"M10.7266 3.4502C10.7266 4.48573 9.8871 5.3252 8.85156 5.3252C7.81603 5.3252 6.97656 4.48573 6.97656 3.4502C6.97656 2.41466 7.81603 1.5752 8.85156 1.5752C9.8871 1.5752 10.7266 2.41466 10.7266 3.4502Z"},null,-1),s("path",{d:"M10.7266 9.15039C10.7266 10.1859 9.8871 11.0254 8.85156 11.0254C7.81603 11.0254 6.97656 10.1859 6.97656 9.15039C6.97656 8.11486 7.81603 7.27539 8.85156 7.27539C9.8871 7.27539 10.7266 8.11486 10.7266 9.15039Z"},null,-1),s("path",{d:"M10.7266 14.8503C10.7266 15.8859 9.8871 16.7253 8.85156 16.7253C7.81603 16.7253 6.97656 15.8859 6.97656 14.8503C6.97656 13.8148 7.81603 12.9753 8.85156 12.9753C9.8871 12.9753 10.7266 13.8148 10.7266 14.8503Z"},null,-1),s("path",{d:"M10.7266 20.55C10.7266 21.5856 9.8871 22.425 8.85156 22.425C7.81603 22.425 6.97656 21.5856 6.97656 20.55C6.97656 19.5145 7.81603 18.675 8.85156 18.675C9.8871 18.675 10.7266 19.5145 10.7266 20.55Z"},null,-1),s("path",{d:"M17.4766 3.4502C17.4766 4.48573 16.6371 5.3252 15.6016 5.3252C14.566 5.3252 13.7266 4.48573 13.7266 3.4502C13.7266 2.41466 14.566 1.5752 15.6016 1.5752C16.
76371 1.5752 17.4766 2.41466 17.4766 3.4502Z"},null,-1),s("path",{d:"M17.4766 9.15039C17.4766 10.1859 16.6371 11.0254 15.6016 11.0254C14.566 11.0254 13.7266 10.1859 13.7266 9.15039C13.7266 8.11486 14.566 7.27539 15.6016 7.27539C16.6371 7.27539 17.4766 8.11486 17.4766 9.15039Z"},null,-1),s("path",{d:"M17.4766 14.8503C17.4766 15.8859 16.6371 16.7253 15.6016 16.7253C14.566 16.7253 13.7266 15.8859 13.7266 14.8503C13.7266 13.8148 14.566 12.9753 15.6016 12.9753C16.6371 12.9753 17.4766 13.8148 17.4766 14.8503Z"},null,-1),s("path",{d:"M17.4766 20.55C17.4766 21.5856 16.6371 22.425 15.6016 22.425C14.566 22.425 13.7266 21.5856 13.7266 20.55C13.7266 19.5145 14.566 18.675 15.6016 18.675C16.6371 18.675 17.4766 19.5145 17.4766 20.55Z"},null,-1)]))),_:1,__:[0]})}]]),hs={class:"market-item"},fs={class:"sort-container"},ps=qe(y({__name:"EditSortingMarketItem",emits:["toTop"],setup(t,{emit:e}){const i=e,n=bt(),o=g((()=>({[n.isMobile?"touchend":"click"]:function(t){t.stopPropagation(),i("toTop")}})));return(t,e)=>(r(),f("div",hs,[E(t.$slots,"default",{},void 0,!0),s("div",v({class:"pin-container"}
7,A(o.value,!0)),[a(us,{class:"icon"})],16),s("div",fs,[a(cs,{class:"icon"})])]))}}),[["__scopeId","data-v-9363b9be"]]),ds=qe(y({inheritAttrs:!1,__name:"EditSpotOrder",props:{spotOrderMarkets:{},spotCurrency:{default:"USDT"}},emits:["update:spotOrderMarkets"],setup(t,{emit:e}){const i=t,s=e,l=g({get:()=>i.spotOrderMarkets,set(t){s("update:spotOrderMarkets",t)}}),{remountKey:c,attributes:h,events:f,onMoveToTop:p}=ls(l);return(t,e)=>{const i=w("track");return S((r(),n(u(as),v({key:u(c),modelValue:l.value,"onUpdate:modelValue":e[0]||(e[0]=t=>l.value=t),itemKey:u(Oe).name},u(h),A(u(f))),{item:o((({element:e,index:s})=>[S((r(),n(ps,{onToTop:t=>u(p)(s)},{default:o((()=>[a(gn,{disabled:"",isFavorite:"",symbol:e[u(Oe).name]},null,8,["symbol"]),a(xn,{class:"symbol-cell",symbol:e[u(Oe).name],currency:e.currency,quoteCurrency:t.spotCurrency,displayName:e.displayName},null,8,["symbol","currency","quoteCurrency","displayName"])])),_:2},1032,["onToTop"])),[[i,{mixpanel:{name:u(ji),props:{s1:u(Vi).pinTop}},posthog:{name:u(ji),props:{entry_channel:u(Vi).pinTop}},emit:"toTop"}]])])),_:1},16,["modelValue","itemKey"])),[[i,{mixpanel:{name:u(ji),props:{s1:u(Vi).drag}},posthog:{name:u(ji),props:{entry_channel:u(Vi).drag}},emit:"start"}]])}}}),[["__scopeId","data-v-22f3a780"]]);function vs(t){const e=kt(t),{meta:i,errors:n,setValues:r}=zt({validationSchema:{[Pe.suggestions]:"required"}});return M(e,(t=>{r(t)}),{immediate:!0}),{meta:i,errors:n}}const ms={class:"suggestions"},ys={class:"buttons"},gs=qe(y({__name:"SuggestionPanel",props:{isButtonDisabled:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1}},emits:["addFavorite"],setup(t,{emit:e}){const n=e;return(t,e)=>{const h=i("BaseButton");return r(),f(p,null,[s("div",ms,[E(t.$slots,"default",{},void 0,!0)]),s("div",ys,[a(h,{class:"primary",size:u(nt).L,disabled:t.isButtonDisabled,isLoading:t.isLoading,onClick:e[0]||(e[0]=t=>n("addFavorite"))},{default:o((()=>[c(l(t.$t("t.addToFavorite")),1)])),_:1},8,["size","disabled","isLoading"])])],64)}}}),[["__scopeId","data-v-bf3ce0d6"]]),bs=qe(y({__name:"SuggestionItem",props:N({symbol:{}},{selected:{},selectedModifiers:{}}),emits:["update:selected"],setup(t){const e=F(t,"selected");return(t,i)=>(r(),n(Rt,{value:e.value,"onUpdate:value":i[0]||(i[0]=t=>e.value=t),class:"suggestion-item",isBrandNewStyle:"",name:t.symbol},{default:o((()=>[E(t.$slots,"default",{},void 0,!0)])),_:3},8,["value","name"]))}}),[["__scopeId","data-v-4ef2c10b"]]),ws={class:"symbol-info"},Ss={key:0,class:"symbol-icon"},_s={class:"symbol-name"},Cs={key:0,class:"quote-currency"},Ms={class:"full-name"},ks=qe(y({__name:"SuggestionSymbol",props:{isShowIcon:{type:Boolean,default:!1},symbol:{default:null},currency:{default:null},quoteCurrency:{default:null},displayName:{default:null}},setup(t){const{convertToDisplaySymbol:e}=ht();return(t,i)=>(r(),f("div",null,[s("div",ws,[t.isShowIcon?(r(),f("div",Ss,[a(dt,{name:u(e)(t.currency),showName:!1,size:"20"},null,8,["name"])])):I("",!0),s("div",_s,[c(l(u(e)(t.symbol))+" ",1),t.quoteCurrency?(r(),f("span",Cs," / "+l(t.quoteCurrency),1)):I("",!0)])]),s("div",Ms,l(t.displayName),1)]))}}),[["__scopeId","data-v-fde5f4cc"]]),xs=qe(y({inheritAttrs:!1,__name:"SpotSuggestion",props:{isSpotSuggestionsSubmitting:{type:Boolean,default:!1},suggestedSpotMarkets:{},selectedSpotSuggestedSymbols:{},spotCurrency:{default:"USDT"}},emits:["update:selectedSpotSuggestedSymbols","addSpotSuggestedMarkets"],setup(t,{emit:e}){const i=t,s=e,l=g({get:()=>i.selectedSpotSuggestedSymbols,set(t){s("update:selectedSpotSuggestedSymbols",t)}}),{meta:c}=vs((()=>({[Pe.suggestions]:l.value})));return(t,e)=>(r(),n(gs,{isLoading:t.isSpotSuggestionsSubmitting,isButtonDisabled:!u(c).valid,onAddFavorite:e[1]||(e[1]=t=>s("addSpotSuggestedMarkets"))},{default:o((()=>[(r(!0),f(p,null,d(t.suggestedSpotMarkets,(i=>(r(),n(bs,{key:i[u(Oe).name],selected:l.value,"onUpdate:selected":e[0]||(e[0]=t=>l.value=t),class:"item",symbol:i[u(Oe).name]},{default:o((()=>[a(ks,{isShowIcon:"",symbol:i.symbol,currency:i.currency,quoteCurrency:t.spotCurrency,displayName:i.displayName},null,8,["symbol","currency","quoteCurrency","displayName"]),a(En,{class:"change-percentage",value:i[u(Oe).changeBy24Hour]},null,8,["value"])])),_:2}
7,1032,["selected","symbol"])))),128))])),_:1},8,["isLoading","isButtonDisabled"]))}}),[["__scopeId","data-v-896effde"]]),Ts=y({__name:"Spot",props:{isOrderEditing:{type:Boolean,default:!1},isShowSuggestion:{type:Boolean,default:!1}},setup(t){const e=t,i=g((()=>{switch(!0){case e.isOrderEditing:return Ae.orderEditing;case e.isShowSuggestion:return Ae.suggestion;default:return Ae.table}})),s=$t(i,{[Ae.table]:Pn,[Ae.orderEditing]:ds,[Ae.suggestion]:xs});return(t,e)=>(r(),n(m(u(s)),null,L({_:2},[d(t.$slots,((e,i)=>({name:i,fn:o((e=>[E(t.$slots,i,z(R(e)))]))})))]),1024))}}),Es=qe(y({__name:"FuturesCfdCategories",props:{selectedCfd:{default:void 0},selectedCfdModifiers:{}},emits:N(["selected"],["update:selectedCfd"]),setup(t,{emit:e}){const i=e,s=C(0),l=F(t,"selectedCfd"),{futuresCategoryTabs:c}=Ne(),h=g((()=>c.value.map((t=>({...t,name:t.label})))));function f(t){s.value=t,i("selected",h.value[t])}return M(s,(t=>{var e;l.value=null==(e=h.value)?void 0:e[t]}),{immediate:!0}),(t,e)=>h.value.length>0?(r(),n(Wt,{key:0,class:"cfd-switch",barHeight:0,type:u(Vt).BOTTOM_BAR_NARROW,theme:u(jt).margin,itemList:h.value,selected:s.value,onSelect:f},{postfix:o((({info:t})=>[a(Le,{promoType:t.promoIcon},null,8,["promoType"])])),_:1},8,["type","theme","itemList","selected"])):I("",!0)}}),[["__scopeId","data-v-f4e713cc"]]),Ds={class:"filters"},Ls=qe(y({inheritAttrs:!1,__name:"FavoriteFuturesTable",props:{searchText:{default:""},futuresMarkets:{},futuresCurrency:{}},emits:["toggleFuturesLocalStorageSymbol"],setup(h,{emit:d}){const v={mixpanel:{name:Li,props:t=>({s1:Ei.favorites,s2:t.symbol,s3:Di.main})},posthog:{name:Li,props:t=>({tab:Ei.favorites,trading_pair:t.symbol,page:Di.main})},emit:"onClickRow"},m=h,y=d,b=t(),M=_(),k=bt(),x=it(),{lang:T}=e(x),D=_e(),{isFavoriteMarketsLoading:L}=e(D),{enable24hVolume:I}=Nt,{sortKey:B,sortDirection:P,onSorting:A}=Qe(),N=C(),F=g((()=>[{id:Fe.favorite,label:"",textAlign:At.center,columnClassName:"favorite-column",isShow:!0},{id:Fe.contract,label:M.t("t.name"),textAlign:At.left,isSortable:!0,isShow:!0},{id:Fe.lastPrice,label:M.t("msg.lastPrice"),textAlign:At.right,isSortable:!0,isShow:k.isLargeSize},{id:Fe.changeBy24Hour,label:M.t("markets.24hChange"),textAlign:At.right,isSortable:!0,isShow:k.isLargeSize},{id:Fe.volumeBy24Hour,label:M.t("markets.24hVol",{baseCurrency:m.futuresCurrency}),textAlign:At.right,isSortable:!0,isShow:k.isLargeSize&&I},{id:Fe.actions,textAlign:At.center,isShow:k.isLargeSize},{id:Fe.mobilePrice,sortId:Fe.lastPrice,label:M.t("msg.lastPrice"),textAlign:At.right,rowColSpan:I?0:void 0,isSortable:!0,isShow:k.isMobile},{id:Fe.mobileVolume,sortId:Fe.volumeBy24Hour,label:M.t("t.vol"),textAlign:At.right,rowColSpan:2,isSortable:!0,isShow:k.isMobile&&I},{id:Fe.mobileChange,sortId:Fe.changeBy24Hour,label:M.t("t.24hChg"),textAlign:At.right,columnClassName:"mobile-change-column",isSortable:!0,isShow:k.isMobile}].filter((t=>t.isShow)))),z=g((()=>{const t=m.searchText?m.searchText.toLowerCase():"",e=m.futuresMarkets.filter((e=>{var i,n,r;return(!N.value||(null==(i=N.value)?void 0:i.value)===yt.ALL||e.categoryId===(null==(n=N.value)?void 0:n.value))&&(!t||e.symbol.toLowerCase().includes(t)||(null==(r=e.displayName)?void 0:r.toLowerCase().includes(t)))})),i=u(B),n=u(P);switch(i){case Fe.contract:e.sort(((t,e)=>n===Mt.asc?t[i].localeCompare(e[i]):e[i].localeCompare(t[i])));break;case Fe.lastPrice:case Fe.changeBy24Hour:case Fe.volumeBy24Hour:e.sort(((t,e)=>on(t[i],e[i],n)))}return e}));function R(t){window.open(b.resolve({name:"futuresId",params:{lang:T.value,id:t.symbol}}).href,"_blank")}function $(t){Pi({sub_tab:Bi[t.value]})}return(t,e)=>{const h=i("RouterLink"),d=w("track");return r(),f(p,null,[s("div",Ds,[E(t.$slots,"filters",{},void 0,!0),a(Es,{selectedCfd:N.value,"onUpdate:selectedCfd":e[0]||(e[0]=t=>N.value=t),onSelected:$},null,8,["selectedCfd"])]),S((r(),n(Ft,{class:"table",isSortingControllable:"",keepPagination:"",layout:t.isMobile?"prev, pager, next":"prev, pager, next, jumper",currentSortKey:u(B),currentSortDirection:u(P),columns:F.value,rows:z.value,total:z.value.length,onSort:u(A),onOnClickRow:R},{empty:o((()=>[a(yn,{searchText:t.searchText},null,8,["searchText"])])),[`cell(${u(Fe).favorite})`]:o((({info:t})=>[S((r(),n(gn,{key:t[u(Fe).contract],symbol:t[u(Fe).contract],isFavorite:t.isFavorite,onSetLocalStorage:e[1]||(e[1]=t=>y("toggleFuturesLocalStorageSymbol",t))},null,8,["symbol","isFavorite"])),[[d,{mixpanel:{name:u(Wi)},posthog:{name:u(Wi)},disabled:u(L),emit:"toggle"}]])])),[`cell(${u(Fe).contract})`]:o((({value:t,info:e})=>
7[a(xn,{isShowIcon:"",isFuturesIcon:"",symbol:t,displayName:e.displayName,currency:e.currency,promoIcon:e.promoIcon,isPostOnly:e.isPostOnly},null,8,["symbol","displayName","currency","promoIcon","isPostOnly"])])),[`cell(${u(Fe).lastPrice})`]:o((({value:e,info:i})=>[a(Tn,{value:e,formatKey:i.priceFilter,currencySymbol:i.currencySymbol,currency:t.futuresCurrency},null,8,["value","formatKey","currencySymbol","currency"])])),[`cell(${u(Fe).changeBy24Hour})`]:o((({value:t})=>[a(En,{value:t},null,8,["value"])])),[`cell(${u(Fe).volumeBy24Hour})`]:o((({value:t})=>[a(Ln,{value:t},null,8,["value"])])),[`cell(${u(Fe).actions})`]:o((({info:i})=>[S((r(),n(h,{class:"action-link",to:{name:"futuresId",params:{lang:u(T),id:i.symbol}},target:"_blank",rel:"noreferrer noopener",onClick:e[2]||(e[2]=O((()=>{}),["stop"]))},{default:o((()=>[c(l(t.$t("t.trade")),1)])),_:2},1032,["to"])),[[d,{mixpanel:{name:u(Li),props:{s1:u(Ei).favorites,s2:i.symbol,s3:u(Di).main}},posthog:{name:u(Li),props:{tab:u(Ei).favorites,trading_pair:i.symbol,page:u(Di).main}}}]])])),[`cell(${u(Fe).mobilePrice})`]:o((({info:e})=>[a(Tn,{value:e[u(Fe).lastPrice],formatKey:e.priceFilter,currencySymbol:e.currencySymbol,currency:t.futuresCurrency},null,8,["value","formatKey","currencySymbol","currency"])])),[`cell(${u(Fe).mobileVolume})`]:o((({info:e})=>[a(Tn,{value:e[u(Fe).lastPrice],formatKey:e.priceFilter,currencySymbol:e.currencySymbol,currency:t.futuresCurrency},null,8,["value","formatKey","currencySymbol","currency"]),a(Ln,{class:"mobile-volume",value:e[u(Fe).volumeBy24Hour]},null,8,["value"])])),[`cell(${u(Fe).mobileChange})`]:o((({info:t})=>[a(En,{value:t[u(Fe).changeBy24Hour]},null,8,["value"])])),_:2},1032,["layout","currentSortKey","currentSortDirection","columns","rows","total","onSort"])),[[d,v]])],64)}}}),[["__scopeId","data-v-a98d916b"]]),Os=qe(y({inheritAttrs:!1,__name:"EditFuturesOrder",props:{futuresOrderMarkets:{}},emits:["update:futuresOrderMarkets"],setup(t,{emit:e}){const i=t,s=e,l=g({get:()=>i.futuresOrderMarkets,set(t){s("update:futuresOrderMarkets",t)}}),{remountKey:c,attributes:h,events:f,onMoveToTop:p}=ls(l);return(t,e)=>{const i=w("track");return S((r(),n(u(as),v({key:u(c),modelValue:l.value,"onUpdate:modelValue":e[0]||(e[0]=t=>l.value=t),itemKey:u(Fe).contract},u(h),A(u(f))),{item:o((({element:t,index:e})=>[S((r(),n(ps,{onToTop:t=>u(p)(e)},{default:o((()=>[a(gn,{disabled:"",isFavorite:"",symbol:t[u(Fe).contract]},null,8,["symbol"]),a(xn,{class:"symbol-cell",symbol:t[u(Fe).contract],currency:t.currency,displayName:t.displayName},null,8,["symbol","currency","displayName"])])),_:2},1032,["onToTop"])),[[i,{mixpanel:{name:u(ji),props:{s1:u(Vi).pinTop}},posthog:{name:u(ji),props:{entry_channel:u(Vi).pinTop}},emit:"toTop"}]])])),_:1},16,["modelValue","itemKey"])),[[i,{mixpanel:{name:u(ji),props:{s1:u(Vi).drag}},posthog:{name:u(ji),props:{entry_channel:u(Vi).drag}},emit:"start"}]])}}}),[["__scopeId","data-v-304e2fbc"]]),Is=qe(y({inheritAttrs:!1,__name:"FuturesSuggestion",props:{isFuturesSuggestionsSubmitting:{type:Boolean,default:!1},suggestedFuturesMarkets:{},selectedFuturesSuggestedSymbols:{}},emits:["update:selectedFuturesSuggestedSymbols","addFuturesSuggestedMarkets"],setup(t,{emit:e}){const i=t,s=e,l=g({get:()=>i.selectedFuturesSuggestedSymbols,set(t){s("update:selectedFuturesSuggestedSymbols",t)}}),{meta:c}=vs((()=>({[Pe.suggestions]:l.value})));return(t,e)=>
7(r(),n(gs,{isButtonDisabled:!u(c).valid,isLoading:t.isFuturesSuggestionsSubmitting,onAddFavorite:e[1]||(e[1]=t=>s("addFuturesSuggestedMarkets"))},{default:o((()=>[(r(!0),f(p,null,d(t.suggestedFuturesMarkets,(t=>(r(),n(bs,{key:t[u(Fe).contract],selected:l.value,"onUpdate:selected":e[0]||(e[0]=t=>l.value=t),class:"item",symbol:t[u(Fe).contract]},{default:o((()=>[a(ks,{isShowIcon:"",symbol:t.symbol,currency:t.currency,displayName:t.displayName},null,8,["symbol","currency","displayName"]),a(En,{class:"change-percentage",value:t[u(Fe).changeBy24Hour]},null,8,["value"])])),_:2},1032,["selected","symbol"])))),128))])),_:1},8,["isButtonDisabled","isLoading"]))}}),[["__scopeId","data-v-cbfa4cfc"]]),Bs=y({__name:"Futures",props:{isOrderEditing:{type:Boolean,default:!1},isShowSuggestion:{type:Boolean,default:!1}},setup(t){const e=t,i=g((()=>{switch(!0){case e.isOrderEditing:return Ae.orderEditing;case e.isShowSuggestion:return Ae.suggestion;default:return Ae.table}})),s=$t(i,{[Ae.table]:Ls,[Ae.orderEditing]:Os,[Ae.suggestion]:Is});return(t,e)=>(r(),n(m(u(s)),null,L({_:2},[d(t.$slots,((e,i)=>({name:i,fn:o((e=>[E(t.$slots,i,z(R(e)))]))})))]),1024))}});const Ps=qe({name:"IconArrowDownWideShort",components:{Icon:gt}},[["render",function(t,e,a,l,u,c){const h=i("Icon");return r(),n(h,{"aria-label":"Arrow Down wide short Icon",width:"16",height:"16",viewBox:"0 0 17 16",fill:"currentColor"},{default:o((()=>e[0]||(e[0]=[s("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.18124 3.27096C8.7704 3.27096 8.43736 2.91876 8.43736 2.4843C8.43736 2.04983 8.7704 1.69763 9.18124 1.69763L15.6282 1.69763C16.039 1.69763 16.3721 2.04983 16.3721 2.48429C16.3721 2.91876 16.039 3.27096 15.6282 3.27096L9.18124 3.27096ZM8.43736 7.72875C8.43736 8.16322 8.7704 8.51542 9.18124 8.51542L13.6445 8.51542C14.0553 8.51542 14.3884 8.16322 14.3884 7.72875C14.3884 7.29429 14.0553 6.94209 13.6445 6.94208L9.18124 6.94208C8.7704 6.94208 8.43736 7.29429 8.43736 7.72875ZM9.18124 13.7599C8.7704 13.7599 8.43736 13.4077 8.43736 12.9732C8.43736 12.5387 8.7704 12.1865 9.18124 12.1865L11.6608 12.1865C12.0717 12.1865 12.4047 12.5387 12.4047 12.9732C12.4047 13.4077 12.0717 13.7599 11.6608 13.7599L9.18124 13.7599ZM0.54379 10.634C0.291336 10.9392 0.320648 11.4031 0.609258 11.6701L3.66012 14.4922L4.14887 14.9443L4.60809 14.4589L7.2776 11.6367C7.54878 11.35 7.54885 10.8851 7.27775 10.5983C7.00666 10.3116 6.56706 10.3115 6.29588 10.5982L4.74276 12.2401L4.74276 1.88705C4.74276 1.48155 4.43192 1.15283 4.04847 1.15283C3.66503 1.15283 3.35418 1.48155 3.35418 1.88705L3.35418 12.2583L1.52348 10.5648C1.23487 10.2978 0.796245 10.3288 0.54379 10.634Z"},null,-1)]))),_:1,__:[0]})}]]),As={class:"navigator"},Ns={class:"navigator-left"},Fs={class:"navigator-right"},zs={class:"edit-button-text"},Rs={class:"market-content"},$s=qe(y({inheritAttrs:!1,__name:"index",props:{searchText:{default:""}},emits:["showSuggestion","editOrder"],setup(t,{emit:v}){const{spotTradeDefaultQuoteCurrency:y,enableSpotTrade:b,enableFuturesTrade:k,marketSpotFavoriteQuoteCurrency:x,marketFuturesFavoriteQuoteCurrency:D}=lt,O=t,I=v,B=_(),P=it(),{loginState:A}=e(P),N=h(),F=g((()=>N.state.futures.fixedCurrency)),{spotFavoriteSymbols:$,isSpotUserCustomized:j,suggestedSpotSymbols:V,futuresFavoriteSymbols:W,isFuturesUserCustomized:H,suggestedFuturesSymbols:K}=hn(),G=fn(),{spotMarketList:Y}=ln({currency:y},(()=>({spotFavoriteMarkets:$.value}))),{futuresMarketList:U}=cn({currency:F.value},(()=>({futuresFavoriteMarkets:W.value}))),X=C(b?Te.spot:Te.futures),q=$t(X,{[Te.spot]:Ts,[Te.futures]:Bs}),Z=C(!1),J=C(!1),Q=C(!1),tt=C([]),et=C([]),rt=C(!1),ot=C([]),st=C([]),at=g((()=>Y.value.reduce(((t,e)=>(t[e.symbol]=e,t)),{}))),ut=g((()=>U.value.reduce(((t,e)=>(t[e.symbol]=e,t)),{}))),ct=g((()=>V.value.map((t=>{var e;return null==(e=at.value)?void 0:e[t]})).filter((t=>t)))),ht=g((()=>ct.value.map((t=>t.symbol)))),ft=g((()=>$.value.map((t=>{var e;return null==(e=at.value)?void 0:e[t]})).filter((t=>t)))),pt=g((()=>K.value.map((t=>{var e;return null==(e=ut.value)?void 0:e[t]})).filter((t=>t)))),dt=g((()=>pt.value.map((t=>t.symbol)))),vt=g((()=>W.value.map((t=>{var e;return null==(e=ut.value)?void 0:e[t]})).filter((t=>t)))),mt=g((()=>[{id:Te.spot,title:B.t("t.spot"),isEnabled:b,count:ft.value.length},{id:Te.futures,title:B.t("t.futures"),isEnabled:k,count:vt.value.length}].filter((t=>t.isEnabled)))),yt=g((()=>mt.value.map((t=>t.count)))),gt=g((()=>0!==ct.value.length&&(A.value?!j.value:0===ft.value.length))),bt=g
7((()=>0!==pt.value.length&&(A.value?!H.value:0===vt.value.length))),wt=g((()=>{switch(X.value){case Te.spot:return gt.value;case Te.futures:return bt.value;default:return!1}})),St=g((()=>{switch(X.value){case Te.spot:return 0!==ft.value.length;case Te.futures:return 0!==vt.value.length;default:return!0}}));function _t(t){X.value=t}async function Ct(){try{const t=tt.value.slice();A.value&&(Q.value=!0,Ri({trading_pair:t.map((t=>`${t}-${x}`)).join(",")}),await G({action:Ee.overwrite,marketList:[{marketType:Te.spot,marketList:t.map((t=>({symbol:t,quote:x})))}]})),tt.value=[]}catch(t){}finally{Q.value=!1}}async function Mt(){try{const t=ot.value.slice();A.value&&(rt.value=!0,Ri({trading_pair:t.join(",")}),await G({action:Ee.overwrite,marketList:[{marketType:Te.futures,marketList:t.map((t=>({symbol:t,quote:D})))}]})),ot.value=[]}catch(t){}finally{rt.value=!1}}function kt(){et.value=ft.value.slice(),st.value=vt.value.slice(),Z.value=!0}async function xt(){try{J.value=!0;const t=et.value.map((t=>t[Oe.name])),e=st.value.map((t=>t[Fe.contract]));A.value&&await G({action:Ee.overwrite,marketList:[{marketType:Te.spot,marketList:t.map((t=>({symbol:t,quote:x})))},{marketType:Te.futures,marketList:e.map((t=>({symbol:t,quote:D})))}]}),Z.value=!1}catch(t){}finally{J.value=!1}}return M((()=>gt.value&&0!==ht.value.length),(t=>{t&&(tt.value=ht.value.slice())}),{immediate:!0}),M((()=>bt.value&&0!==dt.value.length),(t=>{t&&(ot.value=dt.value.slice())}),{immediate:!0}),M((()=>wt.value),(t=>{I("showSuggestion",t)}),{immediate:!0}),M(Z,(t=>{I("editOrder",t)})),T((()=>wt.value&&I("showSuggestion",!1))),(t,e)=>{const h=i("BaseButton"),v=w("track");return r(),f(p,null,[s("div",As,[s("div",Ns,[a(en,{isHorizontal:""},{default:o((()=>[a(Wt,{class:"switcher",barHeight:4,type:u(Vt).BOTTOM_BAR_NARROW,theme:u(jt).compact,itemList:mt.value,selected:X.value,isDefaultSelectedKey:!1,count:yt.value,onSelect:_t},null,8,["type","theme","itemList","selected","count"])])),_:1})]),s("div",Fs,[Z.value?(r(),f(p,{key:0},[a(h,{class:"primary",size:u(nt).M,isLoading:J.value,onClick:xt},{default:o((()=>
7[c(l(t.$t("t.save")),1)])),_:1},8,["size","isLoading"]),a(h,{size:u(nt).M,isLoading:J.value,onClick:e[0]||(e[0]=t=>Z.value=!1)},{default:o((()=>[c(l(t.$t("t.cancel")),1)])),_:1},8,["size","isLoading"])],64)):S((r(),n(h,{key:1,class:"edit-button",size:u(nt).M,disabled:wt.value||!St.value,onClick:kt},{default:o((()=>[a(Ps,{class:"edit-button-icon"}),s("span",zs,l(t.$t("t.edit")),1)])),_:1},8,["size","disabled"])),[[v,{mixpanel:{name:u($i)},posthog:{name:u($i)}}]])])]),s("div",Rs,[(r(),n(m(u(q)),{selectedSpotSuggestedSymbols:tt.value,"onUpdate:selectedSpotSuggestedSymbols":e[1]||(e[1]=t=>tt.value=t),spotOrderMarkets:et.value,"onUpdate:spotOrderMarkets":e[2]||(e[2]=t=>et.value=t),selectedFuturesSuggestedSymbols:ot.value,"onUpdate:selectedFuturesSuggestedSymbols":e[3]||(e[3]=t=>ot.value=t),futuresOrderMarkets:st.value,"onUpdate:futuresOrderMarkets":e[4]||(e[4]=t=>st.value=t),searchText:O.searchText,isShowSuggestion:wt.value,isSpotSuggestionsSubmitting:Q.value,isFuturesSuggestionsSubmitting:rt.value,suggestedSpotMarkets:ct.value,suggestedFuturesMarkets:pt.value,isOrderEditing:Z.value,spotCurrency:u(y),spotMarkets:ft.value,futuresCurrency:F.value,futuresMarkets:vt.value,onAddSpotSuggestedMarkets:Ct,onAddFuturesSuggestedMarkets:Mt},L({_:2},[d(t.$slots,((e,i)=>({name:i,fn:o((e=>[E(t.$slots,i,z(R(e)),void 0,!0)]))})))]),1064,["selectedSpotSuggestedSymbols","spotOrderMarkets","selectedFuturesSuggestedSymbols","futuresOrderMarkets","searchText","isShowSuggestion","isSpotSuggestionsSubmitting","isFuturesSuggestionsSubmitting","suggestedSpotMarkets","suggestedFuturesMarkets","isOrderEditing","spotCurrency","spotMarkets","futuresCurrency","futuresMarkets"]))])],64)}}}),[["__scopeId","data-v-f0988f82"]]),js=["onClick"],Vs=["onClick"],Ws=["onClick"],Hs=qe(y({__name:"ChainSelector",props:{selected:{default:ze.ALL},spotMarketList:{default:()=>[]}},emits:["update:selected"],setup(t,{emit:e}){const i=k("sliderRef"),s={loop:!1,watchDrag:!1,align:"start"},u=t,c=e,h=_(),v=C([]),m=g((()=>new Set(u.spotMarketList.reduce(((t,e)=>(e.categories&&t.push(...e.categories),t)),[])))),y=g({get:()=>u.selected,set(t){c("update:selected",t)}}),w=g((()=>{const t=v.value.filter((t=>m.value.has(t.code)));return t.length>0?[{code:ze.ALL,name:h.t("t.all")}].concat(t):[]}));return $((()=>{!async function(){try{v.value=await _t.getMarketCategories()}catch(t){}}()})),(t,e)=>w.value.length>0?(r(),n(Je,{key:0,ref_key:"sliderRef",ref:i,autoWidth:"",options:s},{prevArrow:o((({action:t})=>{var e;return[(null==(e=i.value)?void 0:e.canScrollPrev)?(r(),f("div",{key:0,class:"arrow arrow--prev",onClick:t},[a(Ht,{class:"arrow__icon"})],8,Vs)):I("",!0)]})),nextArrow:o((({action:t})=>{var e;return[(null==(e=i.value)?void 0:e.canScrollNext)?(r(),f("div",{key:0,class:"arrow arrow--next",onClick:t},[a(Ht,{class:"arrow__icon"})],8,Ws)):I("",!0)]})),default:o((()=>[(r(!0),f(p,null,d(w.value,(t=>(r(),f("div",{key:t.code,class:b(["tag",{active:y.value===t.code}]),onClick:e=>y.value=t.code},l(t.name),11,js)))),128))])),_:1},512)):I("",!0)}}),[["__scopeId","data-v-2de5b966"]]),Ks={class:"filters"},Gs=qe(y({inheritAttrs:!1,__name:"AllCryptoTable",props:{searchText:{default:""}},setup(h){const{spotTradeDefaultQuoteCurrency:d,enableNewMarketsPageTokenDetail:v,brandToken:m}=lt,{enable24hVolume:y}=Nt,b=h,k={mixpanel:{name:Li,props:t=>({s1:Ei.allCrypto,s2:`${t.symbol}-${d}`,s3:Di.main})},posthog:{name:Li,props:t=>({tab:Ei.allCrypto,trading_pair:`${t.symbol}-${d}`,page:Di.main})},emit:"onClickRow"},x=_(),T=t(),D=bt(),L=it(),{lang:B}=e(L),{sortKey:P,sortDirection:A,onSorting:N}=Qe({initialSortKey:Oe.marketCap,initialSortDirection:Mt.desc}),{spotMarketList:F,rawMarkets:z}=ln((()=>({currency:d}))),R=C(ze.ALL),$=C(1),j=g((()=>[{id:Oe.name,label:x.t("t.name"),isSortable:!0,isShow:!0},{id:Oe.lastPrice,label:x.t("msg.lastPrice"),textAlign:"right",isSortable:!0,isShow:D.isLargeSize},{id:Oe.changeBy24Hour,label:x.t("markets.24hChange"),textAlign:"right",isSortable:!0,isShow:D.isLargeSize},{id:Oe.volumeBy24Hour,label:x.t("markets.24hVol",{baseCurrency:d}),textAlign:"right",isSortable:!0,isShow:D.isLargeSize&&y},{id:Oe.marketCap,label:x.t("markets.marketCap",{baseCurrency:d}
7),textAlign:"right",isSortable:!0,isShow:D.isLargeSize},{id:Oe.actions,textAlign:"center",label:"",isShow:D.isLargeSize},{id:Oe.mobilePrice,sortId:Oe.lastPrice,label:x.t("msg.lastPrice"),textAlign:"right",isSortable:!0,rowColSpan:y?0:void 0,isShow:D.isMobile},{id:Oe.mobileVolume,sortId:Oe.volumeBy24Hour,label:x.t("t.vol"),textAlign:"right",isSortable:!0,rowColSpan:2,isShow:D.isMobile&&y},{id:Oe.mobileChange,sortId:Oe.changeBy24Hour,label:x.t("t.24hChg"),textAlign:"right",columnClassName:"mobile-change-column",isSortable:!0,isShow:D.isMobile}].filter((t=>t.isShow)))),V=g((()=>{const t=b.searchText?b.searchText.toLowerCase():"",e=F.value.filter((e=>{var i,n;const r=R.value===ze.ALL||e.categories.includes(R.value);return t?r&&(e.symbol.toLowerCase().includes(t)||(null==(n=null==(i=e.displayName)?void 0:i.toLowerCase())?void 0:n.includes(t))):r&&(e.symbol===m||e[Oe.volumeBy24Hour]&&e[Oe.volumeBy24Hour].gt(Re))})),i=u(P),n=u(A);switch(i){case Oe.name:e.sort(((t,e)=>n===Mt.asc?t[i].localeCompare(e[i]):e[i].localeCompare(t[i])));break;case Oe.lastPrice:case Oe.changeBy24Hour:case Oe.volumeBy24Hour:case Oe.marketCap:e.sort(((t,e)=>on(t[i],e[i],n)))}return e})),W=g((()=>V.value.slice(($.value-1)*$e,$.value*$e)));function H(t){var e;$.value=t,null==(e=document.querySelector(".market-page-function-wrap"))||e.scrollIntoView()}function K(t){let e={name:"tradingId",params:{lang:B.value,id:`${t.symbol}-${d}`}};v&&D.isMobile&&(e={name:Kt.MARKET_TOKEN_DETAIL,params:{lang:B.value,symbol:`${t.symbol}-${d}`}}),window.open(T.resolve(e).href,"_blank")}return M((()=>({selectedChain:R.value,searchText:b.searchText,sortKey:P.value,sortDirection:A.value})),(()=>{$.value=1}),{deep:!0}),(t,e)=>{const h=i("RouterLink"),m=w("track");return r(),f(p,null,[s("div",Ks,[S(a(Hs,{selected:R.value,"onUpdate:selected":e[0]||(e[0]=t=>R.value=t),class:"chain-selector",spotMarketList:u(z)},null,8,["selected","spotMarketList"]),[[m,{mixpanel:{name:u(Ni),props:{s1:R.value}},posthog:{name:u(Ni),props:{sector:R.value}},watch:R.value}]]),E(t.$slots,"filters",{},void 0,!0)]),S((r(),n(Gt,{class:"table",isSortingControllable:"",keepPagination:"",layout:t.isMobile?"prev, pager, next":"prev, pager, next, jumper",currentSortKey:u(P),currentSortDirection:u(A),columns:j.value,rows:W.value,total:V.value.length,pageSize:u($e),page:$.value,onSort:u(N),onChangePage:H,onOnClickRow:K},{empty:o((()=>[a(yn,{searchText:t.searchText},null,8,["searchText"])])),[`cell(${u(Oe).name})`]:o((({info:t})=>[a(xn,{isShowIcon:"",symbol:t.symbol,currency:t.currency,displayName:t.displayName},null,8,["symbol","currency","displayName"])])),[`cell(${u(Oe).lastPrice})`]:o((({value:t,info:e})=>[a(Tn,{value:t,formatKey:e.priceFilter,currencySymbol:e.currencySymbol,currency:u(d)},null,8,["value","formatKey","currencySymbol","currency"])])),[`cell(${u(Oe).changeBy24Hour})`]:o((({value:t})=>[a(En,{value:t},null,8,["value"])])),[`cell(${u(Oe).volumeBy24Hour})`]:o((({value:t})=>[a(Ln,{value:t},null,8,["value"])])),[`cell(${u(Oe).marketCap})`]:o((({value:t})=>[a(In,{value:t},null,8,["value"])])),[`cell(${u(Oe).actions})`]:o((({info:i})=>[u(v)?S((r(),n(h,{key:0,class:"action-link",to:{name:u(Kt).MARKET_TOKEN_DETAIL,params:{lang:u(B),symbol:`${i.symbol}-${u(d)}`}},target:"_blank",rel:"noreferrer noopener",onClick:e[1]||(e[1]=O((()=>{}),["stop"]))},{default:o((()=>[c(l(t.$t("t.details")),1)])),_:2},1032,["to"])),[[m,{mixpanel:{name:u(Ki)},posthog:{name:u(Ki)}}]]):I("",!0),S((r(),n(h,{class:"action-link",to:{name:"tradingId",params:{lang:u(B),id:`${i.symbol}-${u(d)}`}},target:"_blank",rel:"noreferrer noopener",onClick:e[2]||(e[2]=O((()=>{}),["stop"]))},{default:o((()=>[c(l(t.$t("t.trade")),1)])),_:2},1032,["to"])),[[m,{mixpanel:{name:u(Li),props:{s1:u(Ei).allCrypto,s2:`${i.symbol}-${u(d)}`,s3:u(Di).main}},posthog:{name:u(Li),props:{tab:u(Ei).allCrypto,trading_pair:`${i.symbol}-${u(d)}`,page:u(Di).main}}}]])])),[`cell(${u(Oe).mobilePrice})`]:o((({info:t})=>[a(Tn,{value:t[u(Oe).lastPrice],formatKey:t.priceFilter,currencySymbol:t.currencySymbol,currency:u(d)},null,8,["value","formatKey","currencySymbol","currency"])])),[`cell(${u(Oe).mobileVolume})`]:o((({info:t})=>[a(Tn,{value:t[u(Oe).lastPrice],formatKey:t.priceFilter,currencySymbol:t.currencySymbol,currency:u(d)},null,8,["value","formatKey","currencySymbol","currency"]),a(Ln,{class:"mobile-volume",value:t[u(Oe).volumeBy24Hour]},null,8,["value"])])),[`cell(${u(Oe).mobileChange})`]:o((({info:t})=>[a(En,{value:t[u(Oe).changeBy24Hour]},null,8,["value"])])),_:2},1032,["layout","currentSortKey","currentSortDirection","columns","rows","total","pageSize","page","onSort"])),[[m,k]])],64)}}}),[["__scopeId","data-v-9112c2cf"]]),Ys=["onClick"],Us=qe(y({__name:"CurrencyDropdown",props:N({hasDefault:{type:Boolean,default:!1}},{selected:{default:null},selectedModifiers:{}}),emits:N(["userSelected"],["update:selected"]),setup(t,{emit:i}
7){const s=F(t,"selected"),a=t,c=i,h=_e(),{spotMainQuoteCurrencyList:v}=e(h);return M((()=>v.value),(t=>{a.hasDefault&&(s.value=t[0]||"")}),{immediate:!0}),(t,e)=>(r(),n(Yt,{value:s.value,class:"currency-dropdown",list:u(v)},{default:o((({onSelect:t})=>[(r(!0),f(p,null,d(u(v),(e=>(r(),f("div",{key:e,class:"dropdown-item",onClick:i=>{return n=e,r=t,s.value=n,c("userSelected",n),void r(n);var n,r}},l(e),9,Ys)))),128))])),_:1},8,["value","list"]))}}),[["__scopeId","data-v-7298bb9d"]]),Xs={class:"filters"},qs={class:"filter-row"},Zs=qe(y({inheritAttrs:!1,__name:"SpotTable",props:{spotFavoriteMarkets:{default:()=>[]},searchText:{default:""}},setup(h){const{spotTradeDefaultQuoteCurrency:d,brandToken:v}=lt,{enable24hVolume:m}=Nt,y=h,b={mixpanel:{name:Li,props:t=>({s1:Ei.spot,s2:`${t.symbol}-${R.value}`,s3:Di.main})},posthog:{name:Li,props:t=>({tab:Ei.spot,trading_pair:`${t.symbol}-${R.value}`,page:Di.main})},emit:"onClickRow"},k=_(),x=t(),T=bt(),D=it(),{lang:L}=e(D),B=_e(),{isShowFavorites:P}=e(B),{sortKey:A,sortDirection:N,onSorting:F}=Qe((()=>({initialSortKey:Oe.volumeBy24Hour,initialSortDirection:Mt.desc}))),{spotFavoriteSymbols:z}=hn(),R=C(),$=C(ze.ALL),j=C(1),{spotMarketList:V,rawMarkets:W}=ln((()=>({currency:R.value})),(()=>({spotFavoriteMarkets:z.value}))),H=g((()=>[{id:Oe.favorite,label:"",columnClassName:"favorite-column",isShow:P.value},{id:Oe.name,label:k.t("t.name"),isSortable:!0,isShow:!0},{id:Oe.lastPrice,label:k.t("msg.lastPrice"),textAlign:"right",isSortable:!0,isShow:T.isLargeSize},{id:Oe.changeBy24Hour,label:k.t("markets.24hChange"),textAlign:"right",isSortable:!0,isShow:T.isLargeSize},{id:Oe.volumeBy24Hour,label:k.t("markets.24hVol",{baseCurrency:R.value}),textAlign:"right",isSortable:!0,isShow:T.isLargeSize&&m},{id:Oe.marketCap,label:k.t("markets.marketCap",{baseCurrency:R.value}),textAlign:"right",isSortable:!0,isShow:T.isLargeSize},{id:Oe.actions,label:"",textAlign:"center",isShow:T.isLargeSize},{id:Oe.mobilePrice,sortId:Oe.lastPrice,label:k.t("msg.lastPrice"),textAlign:"right",isSortable:!0,rowColSpan:m?0:void 0,isShow:T.isMobile},{id:Oe.mobileVolume,sortId:Oe.volumeBy24Hour,label:k.t("t.vol"),textAlign:"right",isSortable:!0,rowColSpan:2,isShow:T.isMobile&&m},{id:Oe.mobileChange,sortId:Oe.changeBy24Hour,label:k.t("t.24hChg"),textAlign:"right",columnClassName:"mobile-change-column",isSortable:!0,isShow:T.isMobile}].filter((t=>t.isShow)))),K=g((()=>{const t=y.searchText?y.searchText.toLowerCase():"",e=V.value.filter((e=>{var i,n;return!($.value!==ze.ALL&&!e.categories.includes($.value))&&(t?e.symbol.toLowerCase().includes(t)||(null==(n=null==(i=e.displayName)?void 0:i.toLowerCase())?void 0:n.includes(t)):e.symbol===v||e[Oe.volumeBy24Hour]&&e[Oe.volumeBy24Hour].gt(Re))})),i=u(A),n=u(N);switch(i){case Oe.name:e.sort(((t,e)=>n===Mt.asc?t[i].localeCompare(e[i]):e[i].localeCompare(t[i])));break;case Oe.lastPrice:case Oe.changeBy24Hour:case Oe.volumeBy24Hour:case Oe.marketCap:e.sort(((t,e)=>on(t[i],e[i],n)))}return e})),G=g((()=>K.value.slice((j.value-1)*$e,j.value*$e))),Y=g((()=>R.value===d));function U(){j.value=1}function X(t){var e;j.value=t,null==(e=document.querySelector(".market-page-function-wrap"))||e.scrollIntoView()}function q(t){window.open(x.resolve({name:"tradingId",params:{lang:L.value,id:`${t.symbol}-${R.value}`}}).href,"_blank")}function Z(){!function({currency:t="USDT"}={}){const{captureEvent:e}=vt();mt.track(Ai,{s1:t}),e(Ai,{currency:t})}({currency:R.value})}return M((()=>R.value),(()=>{U()}),{immediate:!0}),M((()=>({selectedChain:$.value,searchText:y.searchText,sortKey:A.value,sortDirection:N.value})),(()=>{U()}),{deep:!0}),(t,e)=>{const h=i("RouterLink"),d=w("track");return r(),f(p,null,[s("div",Xs,[s("div",qs,[a(Us,{selected:R.value,"onUpdate:selected":e[0]||(e[0]=t=>R.value=t),hasDefault:"",class:"currency-dropdown",onUserSelected:Z},null,8,["selected"]),S(a(Hs,{selected:$.value,"onUpdate:selected":e[1]||(e[1]=t=>$.value=t),class:"chain-selector",spotMarketList:u(W)},null,8,["selected","spotMarketList"]),[[d,{mixpanel:{name:u(Ni),props:{s1:$.value}},posthog:{name:u(Ni),props:{sector:$.value}},watch:$.value}]])]),E(t.$slots,"filters",{},void 0,!0)]),S((r(),n(Gt,{class:"table",isSortingControllable:"",keepPagination:"",layout:t.isMobile?"prev, pager, next":"prev, pager, next, jumper",currentSortKey:u(A),currentSortDirection:u(N),columns:H.value,rows:G.value,total:K.value.length,pageSize:u($e),page:j.value,onSort:u(F),onChangePage:X,onOnClickRow:q},{empty:o((()=>[a(yn,{searchText:t.searchText},null,8,["searchText"])])),[`cell(${u(Oe).favorite})`]:o((({info:t})=>
7[Y.value?(r(),n(gn,{key:0,isSpotMarket:"",symbol:t.symbol,quoteCurrency:R.value,isFavorite:t.isFavorite},null,8,["symbol","quoteCurrency","isFavorite"])):I("",!0)])),[`cell(${u(Oe).name})`]:o((({info:t})=>[a(xn,{isShowIcon:"",symbol:t.symbol,currency:t.currency,quoteCurrency:R.value,displayName:t.displayName},null,8,["symbol","currency","quoteCurrency","displayName"])])),[`cell(${u(Oe).lastPrice})`]:o((({value:t,info:e})=>[a(Tn,{value:t,formatKey:e.priceFilter,currencySymbol:e.currencySymbol,currency:R.value},null,8,["value","formatKey","currencySymbol","currency"])])),[`cell(${u(Oe).changeBy24Hour})`]:o((({value:t})=>[a(En,{value:t},null,8,["value"])])),[`cell(${u(Oe).volumeBy24Hour})`]:o((({value:t})=>[a(Ln,{value:t},null,8,["value"])])),[`cell(${u(Oe).marketCap})`]:o((({value:t})=>[a(In,{value:t},null,8,["value"])])),[`cell(${u(Oe).actions})`]:o((({info:i})=>[S((r(),n(h,{class:"action-link",to:{name:"tradingId",params:{lang:u(L),id:`${i.symbol}-${R.value}`}},target:"_blank",rel:"noreferrer noopener",onClick:e[2]||(e[2]=O((()=>{}),["stop"]))},{default:o((()=>[c(l(t.$t("t.trade")),1)])),_:2},1032,["to"])),[[d,{mixpanel:{name:u(Li),props:{s1:u(Ei).spot,s2:`${i.symbol}-${R.value}`,s3:u(Di).main}},posthog:{name:u(Li),props:{tab:u(Ei).spot,trading_pair:`${i.symbol}-${R.value}`,page:u(Di).main}}}]])])),[`cell(${u(Oe).mobilePrice})`]:o((({info:t})=>[a(Tn,{value:t[u(Oe).lastPrice],formatKey:t.priceFilter,currencySymbol:t.currencySymbol,currency:R.value},null,8,["value","formatKey","currencySymbol","currency"])])),[`cell(${u(Oe).mobileVolume})`]:o((({info:t})=>[a(Tn,{value:t[u(Oe).lastPrice],formatKey:t.priceFilter,currencySymbol:t.currencySymbol,currency:R.value},null,8,["value","formatKey","currencySymbol","currency"]),a(Ln,{class:"mobile-volume",value:t[u(Oe).volumeBy24Hour]},null,8,["value"])])),[`cell(${u(Oe).mobileChange})`]:o((({info:t})=>[a(En,{value:t[u(Oe).changeBy24Hour]},null,8,["value"])])),_:2},1032,["layout","currentSortKey","currentSortDirection","columns","rows","total","pageSize","page","onSort"])),[[d,b]])],64)}}}),[["__scopeId","data-v-bb67a5da"]]),Js={class:"filters"},Qs=qe(y({inheritAttrs:!1,__name:"FuturesTable",props:{searchText:{default:""}},setup(d){const{brandToken:v}=lt,{enable24hVolume:m}=Nt,y=d,b={mixpanel:{name:Li,props:t=>({s1:Ei.futures,s2:t.symbol,s3:Di.main})},posthog:{name:Li,props:t=>({tab:Ei.futures,trading_pair:t.symbol,page:Di.main})},emit:"onClickRow"},k=t(),x=_(),T=bt(),D=it(),{lang:L}=e(D),I=_e(),{isShowFavorites:B}=e(I),P=h(),A=g((()=>P.state.futures.fixedCurrency)),{sortKey:N,sortDirection:F,onSorting:z}=Qe({initialSortKey:Fe.volumeBy24Hour,initialSortDirection:Mt.desc}),{futuresFavoriteSymbols:R}=hn(),{futuresMarketList:$}=cn((()=>({currency:A.value})),(()=>({futuresFavoriteMarkets:R.value}))),j=C(1),V=C(),W=g((()=>[{id:Fe.favorite,label:"",textAlign:"center",columnClassName:"favorite-column",isShow:B.value},{id:Fe.contract,label:x.t("t.name"),textAlign:"left",isSortable:!0,isShow:!0},{id:Fe.lastPrice,label:x.t("msg.lastPrice"),textAlign:"right",isSortable:!0,isShow:T.isLargeSize},{id:Fe.changeBy24Hour,label:x.t("markets.24hChange"),textAlign:"right",isSortable:!0,isShow:T.isLargeSize},{id:Fe.volumeBy24Hour,label:x.t("markets.24hVol",{baseCurrency:A.value}),textAlign:"right",isSortable:!0,isShow:T.isLargeSize&&m},{id:Fe.actions,textAlign:"center",isShow:T.isLargeSize},{id:Fe.mobilePrice,sortId:Fe.lastPrice,label:x.t("msg.lastPrice"),textAlign:"right",rowColSpan:m?0:void 0,isSortable:!0,isShow:T.isMobile},{id:Fe.mobileVolume,sortId:Fe.volumeBy24Hour,label:x.t("t.vol"),textAlign:"right",rowColSpan:2,isSortable:!0,isShow:T.isMobile&&m},{id:Fe.mobileChange,sortId:Fe.changeBy24Hour,label:x.t("t.24hChg"),textAlign:"right",columnClassName:"mobile-change-column",isSortable:!0,isShow:T.isMobile}].filter((t=>t.isShow)))),H=g((()=>{const t=y.searchText?y.searchText.toLowerCase():"",e=$.value.filter((({symbol:e,currency:i,displayName:n,isTimeBasedContract:r,marketType:o,volume:s,categoryId:a})=>{var l,u,c;const h=!V.value||(null==(l=V.value)?void 0:l.value)===yt.ALL||a===(null==(u=V.value)?void 0:u.value);return t?h&&(e.toLowerCase().includes(t)||i.toLowerCase().includes(t)||(null==(c=null==n?void 0:n.toLowerCase())?void 0:c.includes(t))||r&&o.toLowerCase().includes(t)):h&&(i===v||s&&s.gt(Re))})),i=u(N),n=u(F);switch(i){case Fe.contract:e.sort(((t,e)=>n===Mt.asc?t[i].localeCompare(e[i]):e[i].localeCompare(t[i])));break;case Fe.lastPrice:case Fe.changeBy24Hour:case Fe.volumeBy24Hour:e.sort(((t,e)=>on(t[i],e[i],n)))}return e})),K=g((()=>H.value.slice((j.value-1)*$e,j.value*$e)));function G(t){var e;
7j.value=t,null==(e=document.querySelector(".market-page-function-wrap"))||e.scrollIntoView()}function Y(t){window.open(k.resolve({name:"futuresId",params:{lang:L.value,id:t.symbol}}).href,"_blank")}function U(t){Pi({sub_tab:Bi[t.value]})}return M((()=>({searchText:y.searchText,sortKey:N.value,sortDirection:F.value})),(()=>{j.value=1}),{deep:!0}),(t,e)=>{const h=i("RouterLink"),d=w("track");return r(),f(p,null,[s("div",Js,[E(t.$slots,"filters",{},void 0,!0),a(Es,{selectedCfd:V.value,"onUpdate:selectedCfd":e[0]||(e[0]=t=>V.value=t),onSelected:U},null,8,["selectedCfd"])]),S((r(),n(Gt,{class:"table",isSortingControllable:"",keepPagination:"",layout:t.isMobile?"prev, pager, next":"prev, pager, next, jumper",currentSortKey:u(N),currentSortDirection:u(F),columns:W.value,rows:K.value,total:H.value.length,pageSize:u($e),page:j.value,onSort:u(z),onChangePage:G,onOnClickRow:Y},{empty:o((()=>[a(yn,{searchText:t.searchText},null,8,["searchText"])])),[`cell(${u(Fe).favorite})`]:o((({info:t})=>[a(gn,{symbol:t[u(Fe).contract],isFavorite:t.isFavorite},null,8,["symbol","isFavorite"])])),[`cell(${u(Fe).contract})`]:o((({value:t,info:e})=>[a(xn,{isShowIcon:"",isFuturesIcon:"",symbol:t,displayName:e.displayName,currency:e.currency,promoIcon:e.promoIcon,isPostOnly:e.isPostOnly},null,8,["symbol","displayName","currency","promoIcon","isPostOnly"])])),[`cell(${u(Fe).lastPrice})`]:o((({value:t,info:e})=>[a(Tn,{value:t,formatKey:e.priceFilter,currencySymbol:e.currencySymbol,currency:A.value},null,8,["value","formatKey","currencySymbol","currency"])])),[`cell(${u(Fe).changeBy24Hour})`]:o((({value:t})=>[a(En,{value:t},null,8,["value"])])),[`cell(${u(Fe).volumeBy24Hour})`]:o((({value:t})=>[a(Ln,{value:t},null,8,["value"])])),[`cell(${u(Fe).actions})`]:o((({info:i})=>[S((r(),n(h,{class:"action-link",to:{name:"futuresId",params:{lang:u(L),id:i.symbol}},target:"_blank",rel:"noreferrer noopener",onClick:e[1]||(e[1]=O((()=>{}),["stop"]))},{default:o((()=>[c(l(t.$t("t.trade")),1)])),_:2},1032,["to"])),[[d,{mixpanel:{name:u(Li),props:{s1:u(Ei).futures,s2:i.symbol,s3:u(Di).main}},posthog:{name:u(Li),props:{tab:u(Ei).futures,trading_pair:i.symbol,page:u(Di).main}}}]])])),[`cell(${u(Fe).mobilePrice})`]:o((({info:t})=>[a(Tn,{value:t[u(Fe).lastPrice],formatKey:t.priceFilter,currencySymbol:t.currencySymbol,currency:A.value},null,8,["value","formatKey","currencySymbol","currency"])])),[`cell(${u(Fe).mobileVolume})`]:o((({info:t})=>[a(Tn,{value:t[u(Fe).lastPrice],formatKey:t.priceFilter,currencySymbol:t.currencySymbol,currency:A.value},null,8,["value","formatKey","currencySymbol","currency"]),a(Ln,{class:"mobile-volume",value:t[u(Fe).volumeBy24Hour]},null,8,["value"])])),[`cell(${u(Fe).mobileChange})`]:o((({info:t})=>[a(En,{value:t[u(Fe).changeBy24Hour]},null,8,["value"])])),_:2},1032,["layout","currentSortKey","currentSortDirection","columns","rows","total","pageSize","page","onSort"])),[[d,b]])],64)}}}),[["__scopeId","data-v-046834c7"]]),{spotTradeDefaultQuoteCurrency:ta}=lt;function ea(t={}){const i=kt(t),n=_e(),{isShowMarketSector:r}=e(n);let o;const s=C([]),a=g((()=>s.value.map((t=>({...t,topGainerChange:t.leading.change,top3Symbols:t.symbols.slice(0,3)}))).sort(((t,e)=>t.sortId-e.sortId))));const l=Tt((async function(){const{code:t=null,errorCallback:e=null}=u(i);try{const e=await _t.getSectorDetail({quoteCurrency:ta,code:t});s.value=e}catch(n){e&&e(n)}}),300);return M(r,((t,e,i)=>{t&&(l(),o=setInterval((()=>{l()}),ke)),i((()=>{clearInterval(o),o=void 0}))}),{immediate:!0}),{sectorList:a}}const ia=qe({__name:"StackedViewV2",props:{isVertical:{type:Boolean,default:!1}},setup(t){const e=j(),i=g((()=>{var t;const i=e.default();if((null==i?void 0:i[0])&&(null==(t=null==i?void 0:i[0])?void 0:t.children)){const t=i[0].children||[];return Array.isArray(t)?t:[t]}return[]}));return(e,o)=>(r(),f("div",{class:b(["stacked-view-v2",{vertical:t.isVertical}])},[(r(!0),f(p,null,d(i.value,((t,e)=>(r(),f("div",{key:e,class:"stacked-item",style:V({zIndex:i.value.length-e})},[(r(),n(m(t)))],4)))),128))],2))}},[["__scopeId","data-v-4511940c"]]),na={class:"filters"},ra={class:"sector-wrap"},oa={class:"sector-name"},sa={class:"win-count"},aa={class:"loss-count"},la={class:"top-gainers"},ua={class:"currency-change"},ca=qe(y({inheritAttrs:!1,__name:"SectorTable",props:{searchText:{default:""}},setup(h){const v=h,{sectorList:m}=ea(),y=_(),b=t(),k=bt(),x=it(),{lang:T}=e(x),{sortKey:D,sortDirection:L,onSorting:I}=Qe(),B=C(1),P=g((()=>[{id:je.name,label:k.isMobile?y.t("t.marketSector"):y.t("markets.sector.sectorName"),isSortable:!0,isS
7how:!0,columnClassName:"sector-name-row-cell"},{id:je.gainersAndLosers,label:k.isMobile?y.t("markets.sector.gainersAndLosers.mobile"):y.t("markets.sector.gainersAndLosers"),textAlign:"right",isShow:!0},{id:je.changeBy24Hour,label:k.isMobile?y.t("t.chg"):y.t("markets.24hChange"),textAlign:"right",isSortable:!0,isShow:!0},{id:je.topGainers,sortId:je.topGainerChange,label:k.isMobile?y.t("markets.topGainers.mobile"):y.t("markets.topGainers"),textAlign:"right",isSortable:!0,isShow:!0},{id:je.actions,label:"",textAlign:"right",isShow:k.isLargeSize}].filter((t=>t.isShow)))),A=g((()=>{const t=v.searchText?v.searchText.toLowerCase():"",e=m.value.filter((e=>!t||e.name.toLowerCase().includes(t)));switch(D.value){case je.name:{const t=D.value;e.sort(((e,i)=>L.value===Mt.asc?e[t].localeCompare(i[t]):i[t].localeCompare(e[t])));break}case je.changeBy24Hour:case je.topGainerChange:{const t=D.value;e.sort(((e,i)=>{const n=e[t],r=i[t];let o=Number(n),s=Number(r);o=Number.isNaN(o)?0:o,s=Number.isNaN(s)?0:s;const a=L.value===Mt.asc?-1:1;return o===s?null===n?a:null===r?-a:0:L.value===Mt.asc?o-s:s-o}));break}}return e})),N=g((()=>A.value.slice((B.value-1)*$e,B.value*$e))),F=g((()=>[{gtm:{event:"marketSectorSortingChanged",target:D.value,type:L.value},watch:`${D.value}-${L.value}`},{gtm:t=>({event:"marketSectorSelectedCategory",target:t.code,trackItem:"row"}),mixpanel:{name:Fi,props:t=>({s1:t.code})},posthog:{name:Fi,props:t=>({sector:t.code})},emit:"onClickRow"},{gtm:{event:"marketSectorPageChanged",target:B.value},watch:B.value}]));function z(t){const e=R(t.code);b.push(e)}function R(t=""){return{name:Kt.MARKET_SECTOR_DETAIL,params:{lang:T.value,sector:rn(t)}}}function $(t){var e;B.value=t,null==(e=document.querySelector(".market-page-function-wrap"))||e.scrollIntoView()}return M((()=>({searchKey:v.searchText,sortKey:D.value,sortDirection:L.value})),(()=>{B.value=1}),{deep:!0}),(t,e)=>{const h=i("RouterLink"),v=w("track");return r(),f(p,null,[s("div",na,[E(t.$slots,"filters",{},void 0,!0)]),S((r(),n(Gt,{class:"table",isSortingControllable:"",keepPagination:"",layout:t.isMobile?"prev, pager, next":"prev, pager, next, jumper",currentSortKey:u(D),currentSortDirection:u(L),columns:P.value,rows:N.value,total:A.value.length,pageSize:u($e),page:B.value,onSort:u(I),onChangePage:$,onOnClickRow:z},{empty:o((()=>[a(yn,{searchText:t.searchText},null,8,["searchText"])])),[`cell(${u(je).name})`]:o((({info:t})=>[s("div",ra,[a(ia,null,{default:o((()=>[(r(!0),f(p,null,d(t.top3Symbols,(t=>(r(),n(dt,{key:t.symbol,class:"sector-icons",name:t.baseCurrency,showName:!1,size:"24"},null,8,["name"])))),128))])),_:2},1024),s("span",oa,l(t.name),1)])])),[`cell(${u(je).gainersAndLosers})`]:o((({info:t})=>[s("span",sa,l(t.winCount),1),e[1]||(e[1]=s("span",{class:"slash"},"/",-1)),s("span",aa,l(t.lossCount),1)])),[`cell(${u(je).changeBy24Hour})`]:o((({value:t})=>[a(En,{value:t},null,8,["value"])])),[`cell(${u(je).topGainers})`]:o((({value:t})=>[s("div",la,[a(dt,{name:t.baseCurrency,showName:!1,size:"24"},null,8,["name"]),s("div",ua,[s("span",null,l(t.tradeCurrency),1),a(En,{value:t.change},null,8,["value"])])])])),[`cell(${u(je).actions})`]:o((({info:i})=>[S((r(),n(h,{class:"details",to:R(i.code),onClick:e[0]||(e[0]=O((()=>{}),["stop"]))},{default:o((()=>[c(l(t.$t("t.details")),1)])),_:2},1032,["to"])),[[v,{gtm:{event:"marketSectorSelectedCategory",target:i.code,trackItem:"detail"},mixpanel:{name:u(Fi),props:{s1:i.code}},posthog:{name:u(Fi),props:{sector:i.code}}}]])])),_:2},1032,["layout","currentSortKey","currentSortDirection","columns","rows","total","pageSize","page","onSort"])),[[v,F.value]])],64)}}}),[["__scopeId","data-v-6f18ba4e"]]),ha={class:"markets-table"},fa={class:"filter-wrap"},pa={class:"market-page-function-wrap"},da={class:"switch-wrap"},va={class:"tab-content"},ma={key:0},ya=qe(y({__name:"MarketsTable",setup(t){const{enableSpotTrade:i,enableFuturesTrade:l}=lt,c=_(),h={gtm:t=>({event:"marketTabSelected",target:t}),mixpanel:{name:Oi,props:t=>({s1:t})},posthog:{name:Oi,props:t=>({tab:t})},emit:"select"},p=_e(),{isShowFavorites:d,isShowMarketSector:v}=e(p),y=C(!1),M=C(""),k=C(Object.values(Ve).includes(history.state.type)?history.state.type:i?Ve.ALLCRYPTOS:Ve.FUTURES),x=C(!1),T=$t(k,{[Ve.FAVORITE]:$s,[Ve.ALLCRYPTOS]:Gs,[Ve.SPOT]:Zs,[Ve.FUTURES]:Qs,[Ve.SECTOR]:ca}),E=g((()=>[{id:Ve.FAVORITE,title:c.t("markets.favorite"),icon:xe,isEnabled:d.value},{id:Ve.ALLCRYPTOS,title:c.t("t.allCryptos"),isEnabled:i},{id:Ve.SPOT,title:c.t("t.spot"),isEnabled:i},{id:Ve.FUTURES,title:c.t("t.futures"),isEnabled:l},{id:Ve.SECTOR,title:c.t("t.marketSector"),isEnabled:i&&v.value}].filter((t=>t.isEnabled))));function D(t){k.value=t,history.replaceState({...history.state,type:t},"")}return(t,e)=>{const i=w("track");return r(),f("div",ha,[s("div",fa,[s("div",pa,[a(en,{isHorizontal:""},{default:o((()=>[s("div",da,[S(a(Wt,{class:b(["main-switcher",{favorite:u(d)}]),barHeight:4,type:u(Vt).BOTTOM_BAR_NARROW,theme:u(jt).compact,itemList:E.value,selected:k.value,isDefaultSelectedKey:!1,onSelect:D},null,8,["class","type","theme","itemList","selected"]),[[i,h]])])])),_:1}),!t.isDesktop||y.value||x.value?I("",!0):S((r(),n(Ut,{key:0,value:M.value,"onUpdate:value":e[0]||(e[0]=t=>M.value=t),class:"search-input",width:"169px",height:"32px"},null,8,["value"])),[[i,{gtm:{event:"marketSearchKey",searchTerm:M.value,type:k.value},mixpanel:{name:u(Hi),props:{s1:M.value}},posthog:{name:u(Hi),props:{keyword:M.value}},disabled:!M.value,watch:M.value,delay:700}]])])]),s("div",va,[(r(),n(m(u(T)),{searchText:M.value.trim(),onShowSuggestion:e[2]||(e[2]=t=>y.value=t),onEditOrder:e[3]||(e[3]=t=>x.value=t)},{filters:o((()=>[!t.isNotDesktop||y.value||x.value?I("",!0):(r(),f("div",ma,[S(a(Ut,{value:M.value,"onUpdate:value":e[1]||(e[1]=t=>M.value=t),class:"search-input",width:"100%",height:"32px"},null,8,["value"]),[[i,{gtm:{event:"marketSearchKey",searchTerm:M.value,type:k.value},mixpanel:{name:u(Hi),props:{s1:M.value}},posthog:{name:u(Hi),props:{keyword:M.value}},disabled:!M.value,watch:M.value,delay:700}]])]))])),_:1},40,["searchText"]))])])}}}),[["__scopeId","data-v-297c3fa5"]]),ga={class:"markets"},ba={class:"content"},wa={class:"title"},Sa=qe(y({__name:"index",setup(t){const{enableMarketsOverview:e}=lt;return(t,i)=>(r(),f("div",ga,[s("div",ba,[s("div",wa,l(t.$t("nav.markets")),1),u(e)?(r(),n(tn,{key:0})):I("",!0),a(ya)])]))}}),[["__scopeId","data-v-5c23f8df"]]),_a=Object.freeze(Object.defineProperty({__proto__:null,default:Sa},Symbol.toStringTag,{value:"Module"})),Ca={class:"market-price"},Ma={class:"last-price",dir:"ltr"},ka=qe(y({__name:"MarketPrice",props:{market:{default:()=>({})},priceFormats:{default:()=>({})},priceChangeFormatter:{type:Function,default:t=>Number(t).toString()}},setup:t=>(t,e)=>(r(),f("div",Ca,[s("div",Ma,l(t.$filters.formatNumber(t.market.lastPrice,t.priceFormats.marketPrice)),1),t.market.change?(r(),f("div",{key:0,dir:"ltr",class:b(["price-change-label",{increase:t.market.change>0,decrease:t.market.change<0}])},l(t.priceChangeFormatter(t.market.change)),3)):I("",!0)]))}),[["__scopeId","data-v-8a326ce2"]]);const xa=qe({name:"IconTradingView",components:{Icon:gt}},[["render",function(t,e,a,l,u,c){const h=i("Icon");return r(),n(h,{"aria-label":"Tradingview Icon",viewBox:"0 0 17 16"},{default:o((()=>e[0]||(e[0]=[s("path",{d:"M13.5931 7.06152C13.8413 7.41269 13.9828 7.82516 14.001
75 8.25144C14.9959 8.59489 15.5169 9.66057 15.1652 10.6317C14.8957 11.376 14.1757 11.8741 13.3674 11.875H3.82269C3.15172 11.8759 2.50758 11.6172 2.0316 11.1553L6.07994 8.02473C6.37554 8.17844 6.72791 8.1871 7.03094 8.04813L8.96121 9.69754C8.78418 10.2429 9.09344 10.825 9.65182 10.9977C10.2102 11.1703 10.8062 10.8685 10.983 10.3231C11.0563 10.0971 11.0479 9.85312 10.9595 9.63226L13.5931 7.06129V7.06152ZM12.9942 6.47662L10.3614 9.0462C10.0892 8.94232 9.78525 8.95214 9.52079 9.07357L7.59148 7.42322C7.76874 6.8781 7.45973 6.29577 6.90135 6.12264C6.3432 5.94951 5.74697 6.25132 5.5697 6.79668C5.50886 6.98408 5.50383 7.18435 5.55509 7.37432L1.53526 10.4822C0.916748 9.24951 1.43848 7.76036 2.70065 7.15604C3.05782 6.98501 3.45091 6.89822 3.84856 6.90266C4.08188 5.08597 5.77883 3.79826 7.63891 4.02613C8.98444 4.19107 10.1003 5.122 10.4771 6.39427C11.2599 5.94015 12.2416 5.9715 12.9923 6.47498L12.9945 6.47662H12.9942Z"},null,-1)]))),_:1,__:[0]})}]]),Ta={class:"selector"},Ea=["type","value"],Da={L:"large",M:"medium",S:"small"},La=qe(y({__name:"LabelSelector",props:N({size:{default:Da.S},isMultipleSelect:{type:Boolean,default:!1},list:{default:()=>[]}},{result:{default:null},resultModifiers:{}}),emits:["update:result"],setup(t){const e=F(t,"result"),i=t,n=g((()=>i.isMultipleSelect?"checkbox":"radio")),o=i.isMultipleSelect?[]:null,a=g({get:()=>e.value||o,set(t){e.value=t}});return(t,e)=>(r(),f("div",Ta,[(r(!0),f(p,null,d(t.list,((i,o)=>(r(),f("div",{key:o,class:"item"},[S(s("input",{"onUpdate:modelValue":e[0]||(e[0]=t=>a.value=t),type:n.value,class:"input",value:i.value},null,8,Ea),[[W,a.value]]),E(t.$slots,"item",{info:i},(()=>[s("button",{class:b(["label",t.size])},l(i.name),3)]),!0)])))),128))]))}}),[["__scopeId","data-v-751d7a05"]]);var Oa={allowDownsampling:!0};var Ia,Ba,Pa,Aa=function(){function t(t,e){var i=this;this._resolutionMediaQueryList=null,this._resolutionListener=function(t){return i._onResolutionChanged()},this._canvasConfiguredListeners=[],this.canvas=t,this._canvasSize={width:this.canvas.clientWidth,height:this.canvas.clientHeight},this._options=e,this._configureCanvas(),this._installResolutionListener()}return t.prototype.destroy=function(){this._canvasConfiguredListeners.length=0,this._uninstallResolutionListener(),this.canvas=null},Object.defineProperty(t.prototype,"canvasSize",{get:function(){return{width:this._canvasSize.width,height:this._canvasSize.height}},enumerable:!0,configurable:!0}),t.prototype.resizeCanvas=function(t){this._canvasSize={width:t.width,height:t.height},this._configureCanvas()},Object.defineProperty(t.prototype,"pixelRatio",{get:function(){var t=this.canvas.ownerDocument.defaultView;if(null==t)throw new Error("No window is associated with the canvas");return t.devicePixelRatio>1||this._options.allowDownsampling?t.devicePixelRatio:1},enumerable:!0,configurable:!0}),t.prototype.subscribeCanvasConfigured=function(t){this._canvasConfiguredListeners.push(t)},t.prototype.unsubscribeCanvasConfigured=function(t){this._canvasConfiguredListeners=this._canvasConfiguredListeners.filter((function(e){return e!=t}))},t.prototype._configureCanvas=function(){var t=this.pixelRatio;this.canvas.style.width=this._canvasSize.width+"px",this.canvas.style.height=this._canvasSize.height+"px",this.canvas.width=this._canvasSize.width*t,this.canvas.height=this._canvasSize.height*t,this._emitCanvasConfigured()},t.prototype._emitCanvasConfigured=function(){var t=this;this._canvasConfiguredListeners.forEach((function(e){return e.call(t)}))},t.prototype._installResolutionListener=function(){if(null!==this._resolutionMediaQueryList)throw new Error("Resolution listener is already installed");var t=this.canvas.ownerDocument.defaultView;if(null==t)throw new Error("No window is associated with the canvas");var e=t.devicePixelRatio;this._resolutionMediaQueryList=t.matchMedia("all and (resolution: "+e+"dppx)"),this._resolutionMediaQueryList.addListener(this._resolutionListener)},t.prototype._uninstallResolutionListener=function(){null!==this._resolutionMediaQueryList&&(this._resolutionMediaQueryList.removeListener(this._resolutionListener),this._resolutionMediaQueryList=null)},t.prototype._reinstallResolutionListener=function(){this._uninstallResolutionListener(),this._installResolutionListener()},t.prototype._onResolutionChanged=function(){this._configureCanvas(),this._reinstallResolutionListener()},t}();
8/*!
9 * @license
10 * TradingView Lightweight Charts v3.8.0
11 * Copyright (c) 2020 TradingView, Inc.
12 * Licensed under Apache License 2.0 https://www.apache.org/licenses/LICENSE-2.0
13 */function Na(t,e){var i,n=((i={})[0]=[],i[1]=[t.lineWidth,t.lineWidth],i[2]=[2*t.lineWidth,2*t.lineWidth],i[3]=[6*t.lineWidth,6*t.lineWidth],i[4]=[t.lineWidth,4*t.lineWidth],i)[e];t.setLineDash(n)}function Fa(t,e,i,n){t.beginPath();var r=t.lineWidth%2?.5:0;t.moveTo(i,e+r),t.lineTo(n,e+r),t.stroke()}function za(t,e){if(!t)throw new Error("Assertion failed"+(e?": "+e:""))}function Ra(t){if(void 0===t)throw new Error("Value is undefined");return t}function $a(t){if(null===t)throw new Error("Value is null");return t}function ja(t){return $a(Ra(t))}
13(Pa=Ia||(Ia={}))[Pa.Simple=0]="Simple",Pa[Pa.WithSteps=1]="WithSteps",function(t){t[t.Solid=0]="Solid",t[t.Dotted=1]="Dotted",t[t.Dashed=2]="Dashed",t[t.LargeDashed=3]="LargeDashed",t[t.SparseDotted=4]="SparseDotted"}(Ba||(Ba={}));var Va={khaki:"#f0e68c",azure:"#f0ffff",aliceblue:"#f0f8ff",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",gray:"#808080",green:"#008000",honeydew:"#f0fff0",floralwhite:"#fffaf0",lightblue:"#add8e6",lightcoral:"#f08080",lemonchiffon:"#fffacd",hotpink:"#ff69b4",lightyellow:"#ffffe0",greenyellow:"#adff2f",lightgoldenrodyellow:"#fafad2",limegreen:"#32cd32",linen:"#faf0e6",lightcyan:"#e0ffff",magenta:"#f0f",maroon:"#800000",olive:"#808000",orange:"#ffa500",oldlace:"#fdf5e6",mediumblue:"#0000cd",transparent:"#0000",lime:"#0f0",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",midnightblue:"#191970",orchid:"#da70d6",mediumorchid:"#ba55d3",mediumturquoise:"#48d1cc",orangered:"#ff4500",royalblue:"#4169e1",powderblue:"#b0e0e6",red:"#f00",coral:"#ff7f50",turquoise:"#40e0d0",white:"#fff",whitesmoke:"#f5f5f5",wheat:"#f5deb3",teal:"#008080",steelblue:"#4682b4",bisque:"#ffe4c4",aquamarine:"#7fffd4",aqua:"#0ff",sienna:"#a0522d",silver:"#c0c0c0",springgreen:"#00ff7f",antiquewhite:"#faebd7",burlywood:"#deb887",brown:"#a52a2a",beige:"#f5f5dc",chocolate:"#d2691e",chartreuse:"#7fff00",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cadetblue:"#5f9ea0",tomato:"#ff6347",fuchsia:"#f0f",blue:"#00f",salmon:"#fa8072",blanchedalmond:"#ffebcd",slateblue:"#6a5acd",slategray:"#708090",thistle:"#d8bfd8",tan:"#d2b48c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",blueviolet:"#8a2be2",black:"#000",darkmagenta:"#8b008b",darkslateblue:"#483d8b",darkkhaki:"#bdb76b",darkorchid:"#9932cc",darkorange:"#ff8c00",darkgreen:"#006400",darkred:"#8b0000",dodgerblue:"#1e90ff",darkslategray:"#2f4f4f",dimgray:"#696969",deepskyblue:"#00bfff",firebrick:"#b22222",forestgreen:"#228b22",indigo:"#4b0082",ivory:"#fffff0",lavenderblush:"#fff0f5",feldspar:"#d19275",indianred:"#cd5c5c",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightskyblue:"#87cefa",lightslategray:"#789",lightslateblue:"#8470ff",snow:"#fffafa",lightseagreen:"#20b2aa",lightsalmon:"#ffa07a",darksalmon:"#e9967a",darkviolet:"#9400d3",mediumpurple:"#9370d8",mediumaquamarine:"#66cdaa",skyblue:"#87ceeb",lavender:"#e6e6fa",lightsteelblue:"#b0c4de",mediumvioletred:"#c71585",mintcream:"#f5fffa",navajowhite:"#ffdead",navy:"#000080",olivedrab:"#6b8e23",palevioletred:"#d87093",violetred:"#d02090",yellow:"#ff0",yellowgreen:"#9acd32",lawngreen:"#7cfc00",pink:"#ffc0cb",paleturquoise:"#afeeee",palegoldenrod:"#eee8aa",darkolivegreen:"#556b2f",darkseagreen:"#8fbc8f",darkturquoise:"#00ced1",peachpuff:"#ffdab9",deeppink:"#ff1493",violet:"#ee82ee",palegreen:"#98fb98",mediumseagreen:"#3cb371",peru:"#cd853f",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",purple:"#800080",seagreen:"#2e8b57",seashell:"#fff5ee",papayawhip:"#ffefd5",mediumslateblue:"#7b68ee",plum:"#dda0dd",mediumspringgreen:"#00fa9a"};function Wa(t){return t<0?0:t>255?255:Math.round(t)||0}function Ha(t){return t<=0||t>0?t<0?0:t>1?1:Math.round(1e4*t)/1e4:0}var Ka=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,Ga=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,Ya=/^rgb\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*\)$/,Ua=/^rgba\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?[\d]{0,10}(?:\.\d+)?)\s*\)$/;function Xa(t){var e;if((t=t.toLowerCase())in Va&&(t=Va[t]),e=Ua.exec(t)||Ya.exec(t))return[Wa(parseInt(e[1],10)),Wa(parseInt(e[2],10)),Wa(parseInt(e[3],10)),Ha(e.length<5?1:parseFloat(e[4]))];if(e=Ga.exec(t))return[Wa(parseInt(e[1],16)),Wa(parseInt(e[2],16)),Wa(parseInt(e[3],16)),1];if(e=Ka.exec(t))return[Wa(17*parseInt(e[1],16)),Wa(17*parseInt(e[2],16)),Wa(17*parseInt(e[3],16)),1];throw new Error("Cannot parse color: ".concat(t))}function qa(t){var e,i=Xa(t);return{t:"rgb(".concat(i[0],", ").concat(i[1],", ").concat(i[2],")"),i:(e=i,.199*e[0]+.687*e[1]+.114*e[2]>160?"black":"white")}}
13var Za=function(t,e){return(Za=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function Ja(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}Za(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var Qa=function(){return Qa=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},Qa.apply(this,arguments)};function tl(t,e,i){for(var n,r=0,o=e.length;r<o;r++)!n&&r in e||(n||(n=Array.prototype.slice.call(e,0,r)),n[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))}var el=function(){function t(){this.h=[]}return t.prototype.u=function(t,e,i){var n={o:t,l:e,v:!0===i};this.h.push(n)},t.prototype._=function(t){var e=this.h.findIndex((function(e){return t===e.o}));e>-1&&this.h.splice(e,1)},t.prototype.M=function(t){this.h=this.h.filter((function(e){return e.l!==t}))},t.prototype.m=function(t,e){var i=tl([],this.h);this.h=this.h.filter((function(t){return!t.v}
13)),i.forEach((function(i){return i.o(t,e)}))},t.prototype.p=function(){return this.h.length>0},t.prototype.g=function(){this.h=[]},t}();function il(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];for(var n=0,r=e;n<r.length;n++){var o=r[n];for(var s in o)void 0!==o[s]&&("object"!=typeof o[s]||void 0===t[s]?t[s]=o[s]:il(t[s],o[s]))}return t}function nl(t){return"number"==typeof t&&isFinite(t)}function rl(t){return"number"==typeof t&&t%1==0}function ol(t){return"string"==typeof t}function sl(t){return"boolean"==typeof t}function al(t){var e,i,n,r=t;if(!r||"object"!=typeof r)return r;for(i in e=Array.isArray(r)?[]:{},r)r.hasOwnProperty(i)&&(n=r[i],e[i]=n&&"object"==typeof n?al(n):n);return e}function ll(t){return null!==t}function ul(t){return null===t?void 0:t}var cl="'Trebuchet MS', Roboto, Ubuntu, sans-serif";function hl(t,e,i){return i=void 0!==i?"".concat(i," "):"",void 0===e&&(e=cl),"".concat(i).concat(t,"px ").concat(e)}var fl=function(){function t(t){this.k={N:1,C:4,S:NaN,T:"",D:"",A:"",B:0,L:0,F:0,O:0,V:0},this.P=t}return t.prototype.W=function(){var t=this.k,e=this.R(),i=this.I();return t.S===e&&t.D===i||(t.S=e,t.D=i,t.T=hl(e,i),t.O=Math.floor(e/3.5),t.B=t.O,t.L=Math.max(Math.ceil(e/2-t.C/2),0),t.F=Math.ceil(e/2+t.C/2),t.V=Math.round(e/10)),t.A=this.j(),this.k},t.prototype.j=function(){return this.P.W().layout.textColor},t.prototype.R=function(){return this.P.W().layout.fontSize},t.prototype.I=function(){return this.P.W().layout.fontFamily},t}(),pl=function(){function t(){this.q=[]}return t.prototype.U=function(t){this.q=t},t.prototype.H=function(t,e,i,n){this.q.forEach((function(r){t.save(),r.H(t,e,i,n),t.restore()}))},t}(),dl=function(){function t(){}return t.prototype.H=function(t,e,i,n){t.save(),t.scale(e,e),this.Y(t,i,n),t.restore()},t.prototype.$=function(t,e,i,n){t.save(),t.scale(e,e),this.K(t,i,n),t.restore()},t.prototype.K=function(t,e,i){},t}(),vl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.X=null,e}return Ja(e,t),e.prototype.Z=function(t){this.X=t},e.prototype.Y=function(t){if(null!==this.X&&null!==this.X.J){var e=this.X.J,i=this.X,n=function(n){t.beginPath();for(var r=e.to-1;r>=e.from;--r){var o=i.G[r];t.moveTo(o.tt,o.it),t.arc(o.tt,o.it,n,0,2*Math.PI)}t.fill()};t.fillStyle=i.nt,n(i.st+2),t.fillStyle=i.ht,n(i.st)}},e}(dl);function ml(){return{G:[{tt:0,it:0,rt:0,et:0}],ht:"",nt:"",st:0,J:null}}var yl={from:0,to:1},gl=function(){function t(t,e){this.ut=new pl,this.ot=[],this.lt=[],this.ft=!0,this.P=t,this.ct=e,this.ut.U(this.ot)}return t.prototype.vt=function(t){var e=this.P._t();e.length!==this.ot.length&&(this.lt=e.map(ml),this.ot=this.lt.map((function(t){var e=new vl;return e.Z(t),e})),this.ut.U(this.ot)),this.ft=!0},t.prototype.dt=function(t,e,i){return this.ft&&(this.wt(t),this.ft=!1),this.ut},t.prototype.wt=function(t){var e=this,i=this.P._t(),n=this.ct.Mt(),r=this.P.bt();i.forEach((function(i,o){var s,a=e.lt[o],l=i.gt(n);if(null!==l&&i.yt()){var u=$a(i.kt());a.ht=l.Nt,a.st=l.st,a.G[0].et=l.et,a.G[0].it=i.Ct().xt(l.et,u.St),a.nt=null!==(s=l.Tt)&&void 0!==s?s:e.P.Dt(a.G[0].it/t),a.G[0].rt=n,a.G[0].tt=r.At(n),a.J=yl}else a.J=null}))},t}(),bl=function(){function t(t){this.Bt=t}return t.prototype.H=function(t,e,i,n){if(null!==this.Bt){var r=this.Bt.Lt.yt,o=this.Bt.Et.yt;if(r||o){t.save();var s=Math.round(this.Bt.tt*e),a=Math.round(this.Bt.it*e),l=Math.ceil(this.Bt.Ft*e),u=Math.ceil(this.Bt.Ot*e);t.lineCap="butt",r&&s>=0&&(t.lineWidth=Math.floor(this.Bt.Lt.Vt*e),t.strokeStyle=this.Bt.Lt.A,t.fillStyle=this.Bt.Lt.A,Na(t,this.Bt.Lt.Pt),function(t,e,i,n){t.beginPath();var r=t.lineWidth%2?.5:0;t.moveTo(e+r,0),t.lineTo(e+r,n),t.stroke()}(t,s,0,u)),o&&a>=0&&(t.lineWidth=Math.floor(this.Bt.Et.Vt*e),t.strokeStyle=this.Bt.Et.A,t.fillStyle=this.Bt.Et.A,Na(t,this.Bt.Et.Pt),Fa(t,a,0,l)),t.restore()}}},t}(),wl=function(){function t(t){this.ft=!0,this.Wt={Lt:{Vt:1,Pt:0,A:"",yt:!1},Et:{Vt:1,Pt:0,A:"",yt:!1},Ft:0,Ot:0,tt:0,it:0},this.zt=new bl(this.Wt),this.Rt=t}return t.prototype.vt=function(){this.ft=!0},t.prototype.dt=function(t,e){return this.ft&&(this.wt(),this.ft=!1),this.zt}
13,t.prototype.wt=function(){var t=this.Rt.yt(),e=$a(this.Rt.It()),i=e.jt().W().crosshair,n=this.Wt;n.Et.yt=t&&this.Rt.qt(e),n.Lt.yt=t&&this.Rt.Ut(),n.Et.Vt=i.horzLine.width,n.Et.Pt=i.horzLine.style,n.Et.A=i.horzLine.color,n.Lt.Vt=i.vertLine.width,n.Lt.Pt=i.vertLine.style,n.Lt.A=i.vertLine.color,n.Ft=e.Ht(),n.Ot=e.Yt(),n.tt=this.Rt.$t(),n.it=this.Rt.Kt()},t}();function Sl(t,e,i,n,r,o){t.fillRect(e+o,i,n-2*o,o),t.fillRect(e+o,i+r-o,n-2*o,o),t.fillRect(e,i,o,r),t.fillRect(e+n-o,i,o,r)}function _l(t,e,i){t.save(),t.scale(e,e),i(),t.restore()}function Cl(t,e,i,n,r,o){t.save(),t.globalCompositeOperation="copy",t.fillStyle=o,t.fillRect(e,i,n,r),t.restore()}function Ml(t,e,i,n,r,o,s){t.save(),t.globalCompositeOperation="copy";var a=t.createLinearGradient(0,0,0,r);a.addColorStop(0,o),a.addColorStop(1,s),t.fillStyle=a,t.fillRect(e,i,n,r),t.restore()}var kl,xl=function(){function t(t,e){this.Z(t,e)}return t.prototype.Z=function(t,e){this.Bt=t,this.Xt=e},t.prototype.H=function(t,e,i,n,r,o){if(this.Bt.yt){t.font=e.T;var s=this.Bt.Zt||!this.Bt.Jt?e.C:0,a=e.N,l=e.O,u=e.B,c=e.L,h=e.F,f=this.Bt.Gt,p=Math.ceil(i.Qt(t,f)),d=e.V,v=e.S+l+u,m=Math.ceil(.5*v),y=a+p+c+h+s,g=this.Xt.ti;this.Xt.ii&&(g=this.Xt.ii);var b,w,S=(g=Math.round(g))-m,_=S+v,C="right"===r,M=C?n:0,k=Math.ceil(n*o),x=M;if(t.fillStyle=this.Xt.t,t.lineWidth=1,t.lineCap="butt",f){C?(b=M-s,w=(x=M-y)+h):(x=M+y,b=M+s,w=M+a+s+c);var T=Math.max(1,Math.floor(o)),E=Math.max(1,Math.floor(a*o)),D=C?k:0,L=Math.round(S*o),O=Math.round(x*o),I=Math.round(g*o)-Math.floor(.5*o),B=I+T+(I-L),P=Math.round(b*o);t.save(),t.beginPath(),t.moveTo(D,L),t.lineTo(O,L),t.lineTo(O,B),t.lineTo(D,B),t.fill(),t.fillStyle=this.Bt.Tt,t.fillRect(C?k-E:0,L,E,B-L),this.Bt.Zt&&(t.fillStyle=this.Xt.A,t.fillRect(D,I,P-D,T)),t.textAlign="left",t.fillStyle=this.Xt.A,_l(t,o,(function(){t.fillText(f,w,_-u-d)})),t.restore()}}},t.prototype.Yt=function(t,e){return this.Bt.yt?t.S+t.O+t.B:0},t}(),Tl=function(){function t(t){this.ni={ti:0,A:"#FFF",t:"#000"},this.si={Gt:"",yt:!1,Zt:!0,Jt:!1,Tt:""},this.hi={Gt:"",yt:!1,Zt:!1,Jt:!0,Tt:""},this.ft=!0,this.ri=new(t||xl)(this.si,this.ni),this.ei=new(t||xl)(this.hi,this.ni)}return t.prototype.Gt=function(){return this.ui(),this.si.Gt},t.prototype.ti=function(){return this.ui(),this.ni.ti},t.prototype.vt=function(){this.ft=!0},t.prototype.Yt=function(t,e){return void 0===e&&(e=!1),Math.max(this.ri.Yt(t,e),this.ei.Yt(t,e))},t.prototype.ai=function(){return this.ni.ii||0},t.prototype.oi=function(t){this.ni.ii=t},t.prototype.li=function(){return this.ui(),this.si.yt||this.hi.yt},t.prototype.fi=function(){return this.ui(),this.si.yt},t.prototype.dt=function(t){return this.ui(),this.si.Zt=this.si.Zt&&t.W().drawTicks,this.hi.Zt=this.hi.Zt&&t.W().drawTicks,this.ri.Z(this.si,this.ni),this.ei.Z(this.hi,this.ni),this.ri},t.prototype.ci=function(){return this.ui(),this.ri.Z(this.si,this.ni),this.ei.Z(this.hi,this.ni),this.ei},t.prototype.ui=function(){this.ft&&(this.si.Zt=!0,this.hi.Zt=!1,this.vi(this.si,this.hi,this.ni))},t}(),El=function(t){function e(e,i,n){var r=t.call(this)||this;return r.Rt=e,r._i=i,r.di=n,r}return Ja(e,t),e.prototype.vi=function(t,e,i){t.yt=!1;var n=this.Rt.W().horzLine;if(n.labelVisible){var r=this._i.kt();if(this.Rt.yt()&&!this._i.wi()&&null!==r){var o=qa(n.labelBackgroundColor);i.t=o.t,i.A=o.i;var s=this.di(this._i);i.ti=s.ti,t.Gt=this._i.Mi(s.et,r),t.yt=!0}}},e}(Tl),Dl=/[1-9]/g,Ll=function(){function t(){this.Bt=null}return t.prototype.Z=function(t){this.Bt=t},t.prototype.H=function(t,e,i){var n=this;if(null!==this.Bt&&!1!==this.Bt.yt&&0!==this.Bt.Gt.length){t.font=e.T;var r=Math.round(e.bi.Qt(t,this.Bt.Gt,Dl));if(!(r<=0)){t.save();var o=e.mi,s=r+2*o,a=s/2,l=this.Bt.Ht,u=this.Bt.ti,c=Math.floor(u-a)+.5;c<0?(u+=Math.abs(0-c),c=Math.floor(u-a)+.5):c+s>l&&(u-=Math.abs(l-(c+s)),c=Math.floor(u-a)+.5);var h=c+s,f=0+e.N+e.O+e.S+e.B;t.fillStyle=this.Bt.t;var p=Math.round(c*i),d=Math.round(0*i),v=Math.round(h*i),m=Math.round(f*i);t.fillRect(p,d,v-p,m-d);var y=Math.round(this.Bt.ti*i),g=d,b=Math.round((g+e.N+e.C)*i);t.fillStyle=this.Bt.A;var w=Math.max(1,Math.floor(i)),S=Math.floor(.5*i);t.fillRect(y-S,g,w,b-g);var _=f-e.V-e.B;t.textAlign="left",t.fillStyle=this.Bt.A,_l(t,i,(function(){t.fillText($a(n.Bt).Gt,c+o,_)}
13)),t.restore()}}},t}(),Ol=function(){function t(t,e,i){this.ft=!0,this.zt=new Ll,this.Wt={yt:!1,t:"#4c525e",A:"white",Gt:"",Ht:0,ti:NaN},this.ct=t,this.pi=e,this.di=i}return t.prototype.vt=function(){this.ft=!0},t.prototype.dt=function(){return this.ft&&(this.wt(),this.ft=!1),this.zt.Z(this.Wt),this.zt},t.prototype.wt=function(){var t=this.Wt;t.yt=!1;var e=this.ct.W().vertLine;if(e.labelVisible){var i=this.pi.bt();if(!i.wi()){var n=i.gi(this.ct.Mt());t.Ht=i.Ht();var r=this.di();if(r.rt){t.ti=r.ti,t.Gt=i.yi($a(n)),t.yt=!0;var o=qa(e.labelBackgroundColor);t.t=o.t,t.A=o.i}}}},t}(),Il=function(){function t(){this.ki=null,this.Ni=0}return t.prototype.xi=function(){return this.Ni},t.prototype.Ci=function(t){this.Ni=t},t.prototype.Ct=function(){return this.ki},t.prototype.Si=function(t){this.ki=t},t.prototype.Ti=function(){return[]},t.prototype.yt=function(){return!0},t}();!function(t){t[t.Normal=0]="Normal",t[t.Magnet=1]="Magnet"}(kl||(kl={}));var Bl=function(t){function e(e,i){var n,r,o=t.call(this)||this;o.Di=null,o.Ai=NaN,o.Bi=0,o.Li=!0,o.Ei=new Map,o.Fi=!1,o.Oi=NaN,o.Vi=NaN,o.Pi=NaN,o.Wi=NaN,o.pi=e,o.zi=i,o.Ri=new gl(e,o),o.Ii=(n=function(){return o.Ai},r=function(){return o.Vi},function(t){var e=r(),i=n();if(t===$a(o.Di).ji())return{et:i,ti:e};var s=$a(t.kt());return{et:t.qi(e,s),ti:e}});var s=function(){return function(){return{rt:o.pi.bt().gi(o.Bi),ti:o.$t()}}}();return o.Ui=new Ol(o,e,s),o.Hi=new wl(o),o}return Ja(e,t),e.prototype.W=function(){return this.zi},e.prototype.Yi=function(t,e){this.Pi=t,this.Wi=e},e.prototype.$i=function(){this.Pi=NaN,this.Wi=NaN},e.prototype.Ki=function(){return this.Pi},e.prototype.Xi=function(){return this.Wi},e.prototype.Zi=function(t,e,i){this.Fi||(this.Fi=!0),this.Li=!0,this.Ji(t,e,i)},e.prototype.Mt=function(){return this.Bi},e.prototype.$t=function(){return this.Oi},e.prototype.Kt=function(){return this.Vi},e.prototype.yt=function(){return this.Li},e.prototype.Gi=function(){this.Li=!1,this.Qi(),this.Ai=NaN,this.Oi=NaN,this.Vi=NaN,this.Di=null,this.$i()},e.prototype.tn=function(t){return null!==this.Di?[this.Hi,this.Ri]:[]},e.prototype.qt=function(t){return t===this.Di&&this.zi.horzLine.visible},e.prototype.Ut=function(){return this.zi.vertLine.visible},e.prototype.nn=function(t,e){this.Li&&this.Di===t||this.Ei.clear();var i=[];return this.Di===t&&i.push(this.sn(this.Ei,e,this.Ii)),i},e.prototype.Ti=function(){return this.Li?[this.Ui]:[]},e.prototype.It=function(){return this.Di},e.prototype.hn=function(){this.Hi.vt(),this.Ei.forEach((function(t){return t.vt()})),this.Ui.vt(),this.Ri.vt()},e.prototype.rn=function(t){return t&&!t.ji().wi()?t.ji():null},e.prototype.Ji=function(t,e,i){this.en(t,e,i)&&this.hn()},e.prototype.en=function(t,e,i){var n=this.Oi,r=this.Vi,o=this.Ai,s=this.Bi,a=this.Di,l=this.rn(i);this.Bi=t,this.Oi=isNaN(t)?NaN:this.pi.bt().At(t),this.Di=i;var u=null!==l?l.kt():null;return null!==l&&null!==u?(this.Ai=e,this.Vi=l.xt(e,u)):(this.Ai=NaN,this.Vi=NaN),n!==this.Oi||r!==this.Vi||s!==this.Bi||o!==this.Ai||a!==this.Di},e.prototype.Qi=function(){var t=this.pi._t().map((function(t){return t.an().un()})).filter(ll),e=0===t.length?null:Math.max.apply(Math,t);this.Bi=null!==e?e:NaN},e.prototype.sn=function(t,e,i){var n=t.get(e);return void 0===n&&(n=new El(this,e,i),t.set(e,n)),n},e}(Il);function Pl(t){return"left"===t||"right"===t}var Al=function(){function t(t){this.on=new Map,this.ln=[],this.fn=t}return t.prototype.cn=function(t,e){var i,n,r=(i=this.on.get(t),n=e,void 0===i?n:{vn:Math.max(i.vn,n.vn),_n:i._n||n._n});this.on.set(t,r)},t.prototype.dn=function(){return this.fn},t.prototype.wn=function(t){var e=this.on.get(t);return void 0===e?{vn:this.fn}:{vn:Math.max(this.fn,e.vn),_n:e._n}},t.prototype.Mn=function(){this.ln=[{bn:0}]},t.prototype.mn=function(t){this.ln=[{bn:1,St:t}]},t.prototype.pn=function(){this.ln=[{bn:4}]},t.prototype.gn=function(t){this.ln.push({bn:2,St:t})},t.prototype.yn=function(t){this.ln.push({bn:3,St:t})},t.prototype.kn=function(){return this.ln},t.prototype.Nn=function(t){for(var e=this,i=0,n=t.ln;i<n.length;i++){var r=n[i];this.xn(r)}this.fn=Math.max(this.fn,t.fn),t.on.forEach((function(t,i){e.cn(i,t)}))},t.prototype.xn=function(t){switch(t.bn){case 0:this.Mn();break;case 1:this.mn(t.St);break;case 2:this.gn(t.St);break;case 3:this.yn(t.St);break;case 4:this.pn()}},t}();function Nl(t,e){if(!nl(t))return"n/a";if(!rl(e))throw new TypeError("invalid length");if(e<0||e>16)throw new TypeError("invalid length");return 0===e?t.toString():("0000000000000000"+t.toString()).slice(-e)}var Fl=function(){function t(t,e){if(e||(e=1),nl(t)&&rl(t)||(t=100),t<0)throw new TypeError("invalid base");this._i=t,this.Cn=e,this.Sn()}return t.prototype.format=function(t){var e=t<0?"−":"";return t=Math.abs(t),e+this.Tn(t)},t.prototype.Sn=function(){if(this.Dn=0,this._i>0&&this.Cn>0)for(var t=this._i;t>1;)t/=10,this.Dn++},t.prototype.Tn=function(t){var e=this._i/this.Cn,i=Math.floor(t),n="",r=void 0!==this.Dn?this.Dn:NaN;if(e>1){var o=+(Math.round(t*e)-i*e).toFixed(this.Dn);o>=e&&(o-=e,i+=1),n="."+Nl(+o.toFixed(this.Dn)*this.Cn,r)}else i=Math.round(i*e)/e,r>0&&(n="."+Nl(0,r));return i.toFixed(0)+n},t}(),zl=function(t){function e(e){return void 0===e&&(e=100),t.call(this,e)||this}return Ja(e,t),e.prototype.format=function(e){return"".concat(t.prototype.format.call(this,e),"%")},e}(Fl),Rl=function(){function t(t){this.An=t}return t.prototype.format=function(t){var e="";return t<0&&(e="-",t=-t),t<995?e+this.Bn(t):t<999995?e+this.Bn(t/1e3)+"K":t<999999995?(t=1e3*Math.round(t/1e3),e+this.Bn(t/1e6)+"M"):(t=1e6*Math.round(t/1e6),e+this.Bn(t/1e9)+"B")},t.prototype.Bn=function(t){var e=Math.pow(10,this.An);return((t=Math.round(t*e)/e)>=1e-15&&t<1?t.toFixed(this.An).replace(/\.?0+$/,""):String(t)).replace(/(\.[1-9]*)0+$/,(function(t,e){return e}))},t}();function $l(t,e,i,n){if(0!==e.length){var r=e[n.from].tt,o=e[n.from].it;t.moveTo(r,o);for(var s=n.from+1;s<n.to;++s){var a=e[s];if(1===i){var l=e[s-1].it,u=a.tt;t.lineTo(u,l)}t.lineTo(a.tt,a.it)}}}var jl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.X=null,e}return Ja(e,t),e.prototype.Z=function(t){this.X=t},e.prototype.Y=function(t){if(null!==this.X&&0!==this.X.G.length&&null!==this.X.J){if(t.lineCap="butt",t.lineJoin="round",t.lineWidth=this.X.Vt,Na(t,this.X.Pt),t.lineWidth=1,t.beginPath(),1===this.X.G.length){var e=this.X.G[0],i=this.X.Ln/2;t.moveTo(e.tt-i,this.X.En),t.lineTo(e.tt-i,e.it),t.lineTo(e.tt+i,e.it),t.lineTo(e.tt+i,this.X.En)}else t.moveTo(this.X.G[this.X.J.from].tt,this.X.En),t.lineTo(this.X.G[this.X.J.from].tt,this.X.G[this.X.J.from].it),$l(t,this.X.G,this.X.Fn,this.X.J),this.X.J.to>this.X.J.from&&(t.lineTo(this.X.G[this.X.J.to-1].tt,this.X.En),t.lineTo(this.X.G[this.X.J.from].tt,this.X.En));t.closePath(),t.fillStyle=this.On(t),t.fill()}},e}(dl),Vl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ja(e,t),e.prototype.On=function(t){var e=this.X,i=t.createLinearGradient(0,0,0,e.Vn);return i.addColorStop(0,e.Pn),i.addColorStop(1,e.Wn),i},e}(jl),Wl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.X=null,e}return Ja(e,t),e.prototype.Z=function(t){this.X=t},e.prototype.Y=function(t){if(null!==this.X&&0!==this.X.G.length&&null!==this.X.J)if(t.lineCap="butt",t.lineWidth=this.X.Vt,Na(t,this.X.Pt),t.strokeStyle=this.zn(t),t.lineJoin="round",1===this.X.G.length){t.beginPath();var e=this.X.G[0];
13t.moveTo(e.tt-this.X.Ln/2,e.it),t.lineTo(e.tt+this.X.Ln/2,e.it),void 0!==e.A&&(t.strokeStyle=e.A),t.stroke()}else this.Rn(t,this.X)},e.prototype.Rn=function(t,e){t.beginPath(),$l(t,e.G,e.Fn,e.J),t.stroke()},e}(dl),Hl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ja(e,t),e.prototype.Rn=function(t,e){var i,n,r=e.G,o=e.J,s=e.Fn,a=e.ht;if(0!==r.length&&null!==o){t.beginPath();var l=r[o.from];t.moveTo(l.tt,l.it);var u=null!==(i=l.A)&&void 0!==i?i:a;t.strokeStyle=u;for(var c=function(e){t.stroke(),t.beginPath(),t.strokeStyle=e,u=e},h=o.from+1;h<o.to;++h){var f=r[h],p=r[h-1],d=null!==(n=f.A)&&void 0!==n?n:a;1===s&&(t.lineTo(f.tt,p.it),d!==u&&(c(d),t.moveTo(f.tt,p.it))),t.lineTo(f.tt,f.it),1!==s&&d!==u&&(c(d),t.moveTo(f.tt,f.it))}t.stroke()}},e.prototype.zn=function(){return this.X.ht},e}(Wl);function Kl(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);for(var o=r-n;0<o;){var s=o>>1,a=n+s;i(t[a],e)?(n=a+1,o-=s+1):o=s}return n}function Gl(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);for(var o=r-n;0<o;){var s=o>>1,a=n+s;i(e,t[a])?o=s:(n=a+1,o-=s+1)}return n}function Yl(t,e){return t.rt<e}function Ul(t,e){return t<e.rt}function Xl(t,e,i){var n=e.In(),r=e.jn(),o=Kl(t,n,Yl),s=Gl(t,r,Ul);if(!i)return{from:o,to:s};var a=o,l=s;return o>0&&o<t.length&&t[o].rt>=n&&(a=o-1),s>0&&s<t.length&&t[s-1].rt<=r&&(l=s+1),{from:a,to:l}}var ql=function(){function t(t,e,i){this.qn=!0,this.Un=!0,this.Hn=!0,this.Yn=[],this.$n=null,this.Kn=t,this.Xn=e,this.Zn=i}return t.prototype.vt=function(t){this.qn=!0,"data"===t&&(this.Un=!0),"options"===t&&(this.Hn=!0)},t.prototype.Jn=function(){this.Un&&(this.Gn(),this.Un=!1),this.qn&&(this.Qn(),this.qn=!1),this.Hn&&(this.ts(),this.Hn=!1)},t.prototype.ns=function(){this.$n=null},t.prototype.Qn=function(){var t=this.Kn.Ct(),e=this.Xn.bt();if(this.ns(),!e.wi()&&!t.wi()){var i=e.ss();if(null!==i&&0!==this.Kn.an().hs()){var n=this.Kn.kt();null!==n&&(this.$n=Xl(this.Yn,i,this.Zn),this.rs(t,e,n.St))}}},t}(),Zl=function(t){function e(e,i){return t.call(this,e,i,!0)||this}return Ja(e,t),e.prototype.rs=function(t,e,i){e.es(this.Yn,ul(this.$n)),t.us(this.Yn,i,ul(this.$n))},e.prototype.os=function(t,e){return{rt:t,et:e,tt:NaN,it:NaN}},e.prototype.ts=function(){},e.prototype.Gn=function(){var t=this,e=this.Kn.ls();this.Yn=this.Kn.an().fs().map((function(i){var n=i.St[3];return t.cs(i.vs,n,e)}))},e}(ql),Jl=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.zt=new pl,n._s=new Vl,n.ds=new Hl,n.zt.U([n._s,n.ds]),n}return Ja(e,t),e.prototype.dt=function(t,e){if(!this.Kn.yt())return null;var i=this.Kn.W();return this.Jn(),this._s.Z({Fn:i.lineType,G:this.Yn,Pt:i.lineStyle,Vt:i.lineWidth,Pn:i.topColor,Wn:i.bottomColor,En:t,Vn:t,J:this.$n,Ln:this.Xn.bt().ws()}),this.ds.Z({Fn:i.lineType,G:this.Yn,ht:i.lineColor,Pt:i.lineStyle,Vt:i.lineWidth,J:this.$n,Ln:this.Xn.bt().ws()}),this.zt},e.prototype.cs=function(t,e){return this.os(t,e)},e}(Zl),Ql=function(){function t(){this.Bt=null,this.Ms=0,this.bs=0}return t.prototype.Z=function(t){this.Bt=t},t.prototype.H=function(t,e,i,n){if(null!==this.Bt&&0!==this.Bt.an.length&&null!==this.Bt.J){this.Ms=this.ps(e),this.Ms>=2&&Math.max(1,Math.floor(e))%2!=this.Ms%2&&this.Ms--,this.bs=this.Bt.gs?Math.min(this.Ms,Math.floor(e)):this.Ms;for(var r=null,o=this.bs<=this.Ms&&this.Bt.ws>=Math.floor(1.5*e),s=this.Bt.J.from;s<this.Bt.J.to;++s){var a=this.Bt.an[s];r!==a.A&&(t.fillStyle=a.A,r=a.A);var l=Math.floor(.5*this.bs),u=Math.round(a.tt*e),c=u-l,h=this.bs,f=c+h-1,p=Math.min(a.ys,a.ks),d=Math.max(a.ys,a.ks),v=Math.round(p*e)-l,m=Math.round(d*e)+l,y=Math.max(m-v,this.bs);t.fillRect(c,v,h,y);var g=Math.ceil(1.5*this.Ms);if(o){if(this.Bt.Ns){var b=u-g,w=Math.max(v,Math.round(a.xs*e)-l),S=w+h-1;S>v+y-1&&(w=(S=v+y-1)-h+1),t.fillRect(b,w,c-b,S-w+1)}var _=u+g,C=Math.max(v,Math.round(a.Cs*e)-l),M=C+h-1;M>v+y-1&&(C=(M=v+y-1)-h+1),t.fillRect(f+1,C,_-f,M-C+1)}}}},t.prototype.ps=function(t){var e,i,n=Math.floor(t);return Math.max(n,Math.floor((e=$a(this.Bt).ws,i=t,Math.floor(.3*e*i))))},t}(),tu=function(t){function e(e,i){return t.call(this,e,i,!1)||this}
13return Ja(e,t),e.prototype.rs=function(t,e,i){e.es(this.Yn,ul(this.$n)),t.Ss(this.Yn,i,ul(this.$n))},e.prototype.Ts=function(t,e,i){return{rt:t,open:e.St[0],high:e.St[1],low:e.St[2],close:e.St[3],tt:NaN,xs:NaN,ys:NaN,ks:NaN,Cs:NaN}},e.prototype.Gn=function(){var t=this,e=this.Kn.ls();this.Yn=this.Kn.an().fs().map((function(i){return t.cs(i.vs,i,e)}))},e}(ql),eu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.zt=new Ql,e}return Ja(e,t),e.prototype.dt=function(t,e){if(!this.Kn.yt())return null;var i=this.Kn.W();this.Jn();var n={an:this.Yn,ws:this.Xn.bt().ws(),Ns:i.openVisible,gs:i.thinBars,J:this.$n};return this.zt.Z(n),this.zt},e.prototype.ts=function(){var t=this;this.Yn.forEach((function(e){e.A=t.Kn.ls().As(e.rt).Ds}))},e.prototype.cs=function(t,e,i){return Qa(Qa({},this.Ts(t,e,i)),{A:i.As(t).Ds})},e}(tu);function iu(t,e,i){return Math.min(Math.max(t,e),i)}function nu(t,e,i){return e-t<=i}function ru(t){return t<=0?NaN:Math.log(t)/Math.log(10)}function ou(t){var e=Math.ceil(t);return e%2!=0?e-1:e}function su(t){var e=Math.ceil(t);return e%2==0?e-1:e}var au=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ja(e,t),e.prototype.On=function(t){var e=this.X,i=t.createLinearGradient(0,0,0,e.Vn),n=iu(e.En/e.Vn,0,1);return i.addColorStop(0,e.Bs),i.addColorStop(n,e.Ls),i.addColorStop(n,e.Es),i.addColorStop(1,e.Fs),i},e}(jl),lu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ja(e,t),e.prototype.zn=function(t){var e=this.X,i=t.createLinearGradient(0,0,0,e.Vn),n=iu(e.En/e.Vn,0,1);return i.addColorStop(0,e.Pn),i.addColorStop(n,e.Pn),i.addColorStop(n,e.Wn),i.addColorStop(1,e.Wn),i},e}(Wl),uu=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.Os=new au,n.Vs=new lu,n.ut=new pl,n.ut.U([n.Os,n.Vs]),n}return Ja(e,t),e.prototype.dt=function(t,e){if(!this.Kn.yt())return null;var i=this.Kn.kt();if(null===i)return null;var n=this.Kn.W();this.Jn();var r=this.Kn.Ct().xt(n.baseValue.price,i.St),o=this.Xn.bt().ws();return this.Os.Z({G:this.Yn,Bs:n.topFillColor1,Ls:n.topFillColor2,Es:n.bottomFillColor1,Fs:n.bottomFillColor2,Vt:n.lineWidth,Pt:n.lineStyle,Fn:0,En:r,Vn:t,J:this.$n,Ln:o}),this.Vs.Z({G:this.Yn,Pn:n.topLineColor,Wn:n.bottomLineColor,Vt:n.lineWidth,Pt:n.lineStyle,Fn:0,En:r,Vn:t,J:this.$n,Ln:o}),this.ut},e.prototype.cs=function(t,e){return this.os(t,e)},e}(Zl),cu=function(){function t(){this.Bt=null,this.Ms=0}return t.prototype.Z=function(t){this.Bt=t},t.prototype.H=function(t,e,i,n){if(null!==this.Bt&&0!==this.Bt.an.length&&null!==this.Bt.J){this.Ms=function(t,e){if(t>=2.5&&t<=4)return Math.floor(3*e);var i=1-.2*Math.atan(Math.max(4,t)-4)/(.5*Math.PI),n=Math.floor(t*i*e),r=Math.floor(t*e),o=Math.min(n,r);return Math.max(Math.floor(e),o)}(this.Bt.ws,e),this.Ms>=2&&Math.floor(e)%2!=this.Ms%2&&this.Ms--;var r=this.Bt.an;this.Bt.Ps&&this.Ws(t,r,this.Bt.J,e),this.Bt.zs&&this.Rs(t,r,this.Bt.J,this.Bt.ws,e);var o=this.Is(e);(!this.Bt.zs||this.Ms>2*o)&&this.js(t,r,this.Bt.J,e)}},t.prototype.Ws=function(t,e,i,n){if(null!==this.Bt){var r="",o=Math.min(Math.floor(n),Math.floor(this.Bt.ws*n));o=Math.max(Math.floor(n),Math.min(o,this.Ms));for(var s=Math.floor(.5*o),a=null,l=i.from;l<i.to;l++){var u=e[l];u.qs!==r&&(t.fillStyle=u.qs,r=u.qs);var c=Math.round(Math.min(u.xs,u.Cs)*n),h=Math.round(Math.max(u.xs,u.Cs)*n),f=Math.round(u.ys*n),p=Math.round(u.ks*n),d=Math.round(n*u.tt)-s,v=d+o-1;null!==a&&(d=Math.max(a+1,d),d=Math.min(d,v));var m=v-d+1;t.fillRect(d,f,m,c-f),t.fillRect(d,h+1,m,p-h),a=v}}},t.prototype.Is=function(t){var e=Math.floor(1*t);this.Ms<=2*e&&(e=Math.floor(.5*(this.Ms-1)));var i=Math.max(Math.floor(t),e);return this.Ms<=2*i?Math.max(Math.floor(t),Math.floor(1*t)):i},t.prototype.Rs=function(t,e,i,n,r){if(null!==this.Bt)for(var o="",s=this.Is(r),a=null,l=i.from;l<i.to;l++){var u=e[l];u.Tt!==o&&(t.fillStyle=u.Tt,o=u.Tt);var c=Math.round(u.tt*r)-Math.floor(.5*this.Ms),h=c+this.Ms-1,f=Math.round(Math.min(u.xs,u.Cs)*r),p=Math.round(Math.max(u.xs,u.Cs)*r);if(null!==a&&(c=Math.max(a+1,c),c=Math.min(c,h)),this.Bt.ws*r>2*s)Sl(t,c,f,h-c+1,p-f+1,s);else{var d=h-c+1;t.fillRect(c,f,d,p-f+1)}a=h}}
13,t.prototype.js=function(t,e,i,n){if(null!==this.Bt)for(var r="",o=this.Is(n),s=i.from;s<i.to;s++){var a=e[s],l=Math.round(Math.min(a.xs,a.Cs)*n),u=Math.round(Math.max(a.xs,a.Cs)*n),c=Math.round(a.tt*n)-Math.floor(.5*this.Ms),h=c+this.Ms-1;if(a.A!==r){var f=a.A;t.fillStyle=f,r=f}this.Bt.zs&&(c+=o,l+=o,h-=o,u-=o),l>u||t.fillRect(c,l,h-c+1,u-l+1)}},t}(),hu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.zt=new cu,e}return Ja(e,t),e.prototype.dt=function(t,e){if(!this.Kn.yt())return null;var i=this.Kn.W();this.Jn();var n={an:this.Yn,ws:this.Xn.bt().ws(),Ps:i.wickVisible,zs:i.borderVisible,J:this.$n};return this.zt.Z(n),this.zt},e.prototype.ts=function(){var t=this;this.Yn.forEach((function(e){var i=t.Kn.ls().As(e.rt);e.A=i.Ds,e.qs=i.Us,e.Tt=i.Hs}))},e.prototype.cs=function(t,e,i){var n=i.As(t);return Qa(Qa({},this.Ts(t,e,i)),{A:n.Ds,qs:n.Us,Tt:n.Hs})},e}(tu),fu=function(){function t(){this.Bt=null,this.Ys=[]}return t.prototype.Z=function(t){this.Bt=t,this.Ys=[]},t.prototype.H=function(t,e,i,n){if(null!==this.Bt&&0!==this.Bt.G.length&&null!==this.Bt.J){this.Ys.length||this.$s(e);for(var r=Math.max(1,Math.floor(e)),o=Math.round(this.Bt.Ks*e)-Math.floor(r/2),s=o+r,a=this.Bt.J.from;a<this.Bt.J.to;a++){var l=this.Bt.G[a],u=this.Ys[a-this.Bt.J.from],c=Math.round(l.it*e);t.fillStyle=l.A;var h=void 0,f=void 0;c<=o?(h=c,f=s):(h=o,f=c-Math.floor(r/2)+r),t.fillRect(u.In,h,u.jn-u.In+1,f-h)}}},t.prototype.$s=function(t){if(null!==this.Bt&&0!==this.Bt.G.length&&null!==this.Bt.J){var e=Math.ceil(this.Bt.ws*t)<=1?0:Math.max(1,Math.floor(t)),i=Math.round(this.Bt.ws*t)-e;this.Ys=new Array(this.Bt.J.to-this.Bt.J.from);for(var n=this.Bt.J.from;n<this.Bt.J.to;n++){var r,o=this.Bt.G[n],s=Math.round(o.tt*t),a=void 0,l=void 0;i%2?(a=s-(r=(i-1)/2),l=s+r):(a=s-(r=i/2),l=s+r-1),this.Ys[n-this.Bt.J.from]={In:a,jn:l,Xs:s,Zs:o.tt*t,rt:o.rt}}for(n=this.Bt.J.from+1;n<this.Bt.J.to;n++){var u=this.Ys[n-this.Bt.J.from],c=this.Ys[n-this.Bt.J.from-1];u.rt===c.rt+1&&u.In-c.jn!==e+1&&(c.Xs>c.Zs?c.jn=u.In-e-1:u.In=c.jn+e+1)}var h=Math.ceil(this.Bt.ws*t);for(n=this.Bt.J.from;n<this.Bt.J.to;n++){(u=this.Ys[n-this.Bt.J.from]).jn<u.In&&(u.jn=u.In);var f=u.jn-u.In+1;h=Math.min(f,h)}if(e>0&&h<4)for(n=this.Bt.J.from;n<this.Bt.J.to;n++)(f=(u=this.Ys[n-this.Bt.J.from]).jn-u.In+1)>h&&(u.Xs>u.Zs?u.jn-=1:u.In+=1)}else this.Ys=[]},t}();function pu(t){return{G:[],ws:t,Ks:NaN,J:null}}function du(t,e,i){return{rt:t,et:e,tt:NaN,it:NaN,A:i}}var vu=function(t){function e(e,i){var n=t.call(this,e,i,!1)||this;return n.ut=new pl,n.Js=pu(0),n.zt=new fu,n}return Ja(e,t),e.prototype.dt=function(t,e){return this.Kn.yt()?(this.Jn(),this.ut):null},e.prototype.Gn=function(){var t=this.Xn.bt().ws();this.Js=pu(t);for(var e=0,i=0,n=this.Kn.W().color,r=0,o=this.Kn.an().fs();r<o.length;r++){var s=o[r],a=s.St[3],l=void 0!==s.A?s.A:n,u=du(s.vs,a,l);++e<this.Js.G.length?this.Js.G[e]=u:this.Js.G.push(u),this.Yn[i++]={rt:s.vs,tt:0}}this.zt.Z(this.Js),this.ut.U([this.zt])},e.prototype.ts=function(){},e.prototype.ns=function(){t.prototype.ns.call(this),this.Js.J=null},e.prototype.rs=function(t,e,i){if(null!==this.$n){var n=e.ws(),r=$a(e.ss()),o=t.xt(this.Kn.W().base,i);e.es(this.Js.G),t.us(this.Js.G,i),this.Js.Ks=o,this.Js.J=Xl(this.Js.G,r,!1),this.Js.ws=n,this.zt.Z(this.Js)}},e}(ql),mu=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.ds=new Hl,n}return Ja(e,t),e.prototype.dt=function(t,e){if(!this.Kn.yt())return null;var i=this.Kn.W();this.Jn();var n={G:this.Yn,ht:i.color,Pt:i.lineStyle,Fn:i.lineType,Vt:i.lineWidth,J:this.$n,Ln:this.Xn.bt().ws()};return this.ds.Z(n),this.ds},e.prototype.ts=function(){var t=this;this.Yn.forEach((function(e){e.A=t.Kn.ls().As(e.rt).Ds}))},e.prototype.cs=function(t,e,i){var n=this.os(t,e);return n.A=i.As(t).Ds,n},e}(Zl),yu=/[2-9]/g,gu=function(){function t(t){void 0===t&&(t=50),this.Gs=new Map,this.Qs=0,this.th=Array.from(new Array(t))}return t.prototype.ih=function(){this.Gs.clear(),this.th.fill(void 0)},t.prototype.Qt=function(t,e,i){var n=i||yu,r=String(e).replace(n,"0"),o=this.Gs.get(r);if(void 0===o){if(0===(o=t.measureText(r).width)&&0!==e.length)return 0;var s=this.th[this.Qs];void 0!==s&&this.Gs.delete(s),this.th[this.Qs]=r,this.Qs=(this.Qs+1)%this.th.length,this.Gs.set(r,o)}return o},t}(),bu=function(){function t(t){this.nh=null,this.k=null,this.sh="right",this.hh=0,this.rh=t}
13return t.prototype.eh=function(t,e,i,n){this.nh=t,this.k=e,this.hh=i,this.sh=n},t.prototype.H=function(t,e){null!==this.k&&null!==this.nh&&this.nh.H(t,this.k,this.rh,this.hh,this.sh,e)},t}(),wu=function(){function t(t,e,i){this.uh=t,this.rh=new gu(50),this.ah=e,this.P=i,this.R=-1,this.zt=new bu(this.rh)}return t.prototype.dt=function(t,e){var i=this.P.oh(this.ah);if(null===i)return null;var n=i.lh(this.ah)?i.fh():this.ah.Ct();if(null===n)return null;var r=i._h(n);if("overlay"===r)return null;var o=this.P.dh();return o.S!==this.R&&(this.R=o.S,this.rh.ih()),this.zt.eh(this.uh.ci(),o,e,r),this.zt},t}(),Su=function(){function t(){this.Bt=null}return t.prototype.Z=function(t){this.Bt=t},t.prototype.H=function(t,e,i,n){if(null!==this.Bt&&!1!==this.Bt.yt){var r=Math.round(this.Bt.it*e);if(!(r<0||r>Math.ceil(this.Bt.Yt*e))){var o=Math.ceil(this.Bt.Ht*e);t.lineCap="butt",t.strokeStyle=this.Bt.A,t.lineWidth=Math.floor(this.Bt.Vt*e),Na(t,this.Bt.Pt),Fa(t,r,0,o)}}},t}(),_u=function(){function t(t){this.wh={Ht:0,Yt:0,it:0,A:"rgba(0, 0, 0, 0)",Vt:1,Pt:0,yt:!1},this.Mh=new Su,this.ft=!0,this.Kn=t,this.Xn=t.jt(),this.Mh.Z(this.wh)}return t.prototype.vt=function(){this.ft=!0},t.prototype.dt=function(t,e){return this.Kn.yt()?(this.ft&&(this.bh(t,e),this.ft=!1),this.Mh):null},t}(),Cu=function(t){function e(e){return t.call(this,e)||this}return Ja(e,t),e.prototype.bh=function(t,e){this.wh.yt=!1;var i=this.Kn.Ct(),n=i.mh().mh;if(2===n||3===n){var r=this.Kn.W();if(r.baseLineVisible&&this.Kn.yt()){var o=this.Kn.kt();null!==o&&(this.wh.yt=!0,this.wh.it=i.xt(o.St,o.St),this.wh.Ht=e,this.wh.Yt=t,this.wh.A=r.baseLineColor,this.wh.Vt=r.baseLineWidth,this.wh.Pt=r.baseLineStyle)}}},e}(_u),Mu=function(){function t(){this.Bt=null}return t.prototype.Z=function(t){this.Bt=t},t.prototype.ph=function(){return this.Bt},t.prototype.H=function(t,e,i,n){var r=this.Bt;if(null!==r){t.save();var o=Math.max(1,Math.floor(e)),s=o%2/2,a=Math.round(r.Zs.x*e)+s,l=r.Zs.y*e;t.fillStyle=r.gh,t.beginPath();var u=Math.max(2,1.5*r.yh)*e;t.arc(a,l,u,0,2*Math.PI,!1),t.fill(),t.fillStyle=r.kh,t.beginPath(),t.arc(a,l,r.st*e,0,2*Math.PI,!1),t.fill(),t.lineWidth=o,t.strokeStyle=r.Nh,t.beginPath(),t.arc(a,l,r.st*e+o/2,0,2*Math.PI,!1),t.stroke(),t.restore()}},t}(),ku=[{xh:0,Ch:.25,Sh:4,Th:10,Dh:.25,Ah:0,Bh:.4,Lh:.8},{xh:.25,Ch:.525,Sh:10,Th:14,Dh:0,Ah:0,Bh:.8,Lh:0},{xh:.525,Ch:1,Sh:14,Th:14,Dh:0,Ah:0,Bh:0,Lh:0}];function xu(t,e,i,n){return function(t,e){if("transparent"===t)return t;var i=Xa(t),n=i[3];return"rgba(".concat(i[0],", ").concat(i[1],", ").concat(i[2],", ").concat(e*n,")")}(t,i+(n-i)*e)}function Tu(t,e){for(var i,n=t%2600/2600,r=0,o=ku;r<o.length;r++){var s=o[r];if(n>=s.xh&&n<=s.Ch){i=s;break}}za(void 0!==i,"Last price animation internal logic error");var a,l,u,c=(n-i.xh)/(i.Ch-i.xh);return{kh:xu(e,c,i.Dh,i.Ah),Nh:xu(e,c,i.Bh,i.Lh),st:(a=c,l=i.Sh,u=i.Th,l+(u-l)*a)}}var Eu=function(){function t(t){this.zt=new Mu,this.ft=!0,this.Eh=!0,this.Fh=performance.now(),this.Oh=this.Fh-1,this.Vh=t}return t.prototype.Ph=function(){this.Oh=this.Fh-1,this.vt()},t.prototype.Wh=function(){if(this.vt(),2===this.Vh.W().lastPriceAnimation){var t=performance.now(),e=this.Oh-t;if(e>0)return void(e<650&&(this.Oh+=2600));this.Fh=t,this.Oh=t+2600}},t.prototype.vt=function(){this.ft=!0},t.prototype.zh=function(){this.Eh=!0},t.prototype.yt=function(){return 0!==this.Vh.W().lastPriceAnimation},t.prototype.Rh=function(){switch(this.Vh.W().lastPriceAnimation){case 0:return!1;case 1:return!0;case 2:return performance.now()<=this.Oh}},t.prototype.dt=function(t,e){return this.ft?(this.wt(t,e),this.ft=!1,this.Eh=!1):this.Eh&&(this.Ih(),this.Eh=!1),this.zt},t.prototype.wt=function(t,e){this.zt.Z(null);var i=this.Vh.jt().bt(),n=i.ss(),r=this.Vh.kt();if(null!==n&&null!==r){var o=this.Vh.jh(!0);if(!o.qh&&n.Uh(o.vs)){var s={x:i.At(o.vs),y:this.Vh.Ct().xt(o.et,r.St)},a=o.A,l=this.Vh.W().lineWidth,u=Tu(this.Hh(),a);this.zt.Z({gh:a,yh:l,kh:u.kh,Nh:u.Nh,st:u.st,Zs:s})}}},t.prototype.Ih=function(){var t=this.zt.ph();if(null!==t){var e=Tu(this.Hh(),t.gh);t.kh=e.kh,t.Nh=e.Nh,t.st=e.st}},t.prototype.Hh=function(){return this.Rh()?performance.now()-this.Fh:2599},t}();function Du(t,e){return su(Math.min(Math.max(t,12),30)*e)}function Lu(t,e){switch(t){case"arrowDown":case"arrowUp":return Du(e,1);case"circle":return Du(e,.8);case"square":return Du(e,.7)}}function Ou(t){return ou(Du(t,1))}function Iu(t){return Math.max(Du(t,.1),3)}function Bu(t,e,i,n,r){var o=Lu("square",i),s=(o-1)/2,a=t-s,l=e-s;return n>=a&&n<=a+o&&r>=l&&r<=l+o}function Pu(t,e,i,n,r){var o=(Lu("arrowUp",r)-1)/2,s=(su(r/2)-1)/2;e.beginPath(),t?(e.moveTo(i-o,n),e.lineTo(i,n-o),e.lineTo(i+o,n),e.lineTo(i+s,n),e.lineTo(i+s,n+o),e.lineTo(i-s,n+o),e.lineTo(i-s,n)):(e.moveTo(i-o,n),e.lineTo(i,n+o),e.lineTo(i+o,n),e.lineTo(i+s,n),e.lineTo(i+s,n-o),e.lineTo(i-s,n-o),e.lineTo(i-s,n)),e.fill()}var Au=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.Bt=null,e.rh=new gu,e.R=-1,e.I="",e.Yh="",e}return Ja(e,t),e.prototype.Z=function(t){this.Bt=t},e.prototype.eh=function(t,e){this.R===t&&this.I===e||(this.R=t,this.I=e,this.Yh=hl(t,e),this.rh.ih())},e.prototype.$h=function(t,e){if(null===this.Bt||null===this.Bt.J)return null;for(var i=this.Bt.J.from;i<this.Bt.J.to;i++){var n=this.Bt.G[i];if(Fu(n,t,e))return{Kh:n.Xh,Zh:n.Zh}}return null}
13,e.prototype.Y=function(t,e,i){if(null!==this.Bt&&null!==this.Bt.J){t.textBaseline="middle",t.font=this.Yh;for(var n=this.Bt.J.from;n<this.Bt.J.to;n++){var r=this.Bt.G[n];void 0!==r.Gt&&(r.Gt.Ht=this.rh.Qt(t,r.Gt.Jh),r.Gt.Yt=this.R),Nu(r,t)}}},e}(dl);function Nu(t,e){var i,n,r,o;e.fillStyle=t.A,void 0!==t.Gt&&(i=e,n=t.Gt.Jh,r=t.tt-t.Gt.Ht/2,o=t.Gt.it,i.fillText(n,r,o)),function(t,e){if(0!==t.hs){switch(t.Gh){case"arrowDown":return void Pu(!1,e,t.tt,t.it,t.hs);case"arrowUp":return void Pu(!0,e,t.tt,t.it,t.hs);case"circle":return void function(t,e,i,n){var r=(Lu("circle",n)-1)/2;t.beginPath(),t.arc(e,i,r,0,2*Math.PI,!1),t.fill()}(e,t.tt,t.it,t.hs);case"square":return void function(t,e,i,n){var r=Lu("square",n),o=(r-1)/2,s=e-o,a=i-o;t.fillRect(s,a,r,r)}(e,t.tt,t.it,t.hs)}t.Gh}}(t,e)}function Fu(t,e,i){return!(void 0===t.Gt||(n=t.tt,r=t.Gt.it,o=t.Gt.Ht,s=t.Gt.Yt,a=e,l=i,u=s/2,!(a>=n&&a<=n+o&&l>=r-u&&l<=r+u)))||function(t,e,i){if(0===t.hs)return!1;switch(t.Gh){case"arrowDown":case"arrowUp":return function(t,e,i,n,r,o){return Bu(e,i,n,r,o)}(0,t.tt,t.it,t.hs,e,i);case"circle":return function(t,e,i,n,r){var o=2+Lu("circle",i)/2,s=t-n,a=e-r;return Math.sqrt(s*s+a*a)<=o}(t.tt,t.it,t.hs,e,i);case"square":return Bu(t.tt,t.it,t.hs,e,i)}}(t,e,i);var n,r,o,s,a,l,u}function zu(t,e,i,n,r,o,s,a,l){var u=nl(i)?i:i.close,c=nl(i)?i:i.high,h=nl(i)?i:i.low,f=nl(e.size)?Math.max(e.size,0):1,p=Ou(a.ws())*f,d=p/2;switch(t.hs=p,e.position){case"inBar":return t.it=s.xt(u,l),void(void 0!==t.Gt&&(t.Gt.it=t.it+d+o+.6*r));case"aboveBar":return t.it=s.xt(c,l)-d-n.Qh,void 0!==t.Gt&&(t.Gt.it=t.it-d-.6*r,n.Qh+=1.2*r),void(n.Qh+=p+o);case"belowBar":return t.it=s.xt(h,l)+d+n.tr,void 0!==t.Gt&&(t.Gt.it=t.it+d+o+.6*r,n.tr+=1.2*r),void(n.tr+=p+o)}e.position}var Ru=function(){function t(t,e){this.ft=!0,this.ir=!0,this.nr=!0,this.sr=null,this.zt=new Au,this.Vh=t,this.pi=e,this.Bt={G:[],J:null}}return t.prototype.vt=function(t){this.ft=!0,this.nr=!0,"data"===t&&(this.ir=!0)},t.prototype.dt=function(t,e,i){if(!this.Vh.yt())return null;this.ft&&this.Jn();var n=this.pi.W().layout;return this.zt.eh(n.fontSize,n.fontFamily),this.zt.Z(this.Bt),this.zt},t.prototype.hr=function(){if(this.nr){if(this.Vh.rr().length>0){var t=this.pi.bt().ws(),e=Iu(t),i=1.5*Ou(t)+2*e;this.sr={above:i,below:i}}else this.sr=null;this.nr=!1}return this.sr},t.prototype.Jn=function(){var t=this.Vh.Ct(),e=this.pi.bt(),i=this.Vh.rr();this.ir&&(this.Bt.G=i.map((function(t){return{rt:t.time,tt:0,it:0,hs:0,Gh:t.shape,A:t.color,Xh:t.Xh,Zh:t.id,Gt:void 0}})),this.ir=!1);var n=this.pi.W().layout;this.Bt.J=null;var r=e.ss();if(null!==r){var o=this.Vh.kt();if(null!==o&&0!==this.Bt.G.length){var s=NaN,a=Iu(e.ws()),l={Qh:a,tr:a};this.Bt.J=Xl(this.Bt.G,r,!0);for(var u=this.Bt.J.from;u<this.Bt.J.to;u++){var c=i[u];c.time!==s&&(l.Qh=a,l.tr=a,s=c.time);var h=this.Bt.G[u];h.tt=e.At(c.time),void 0!==c.text&&c.text.length>0&&(h.Gt={Jh:c.text,it:0,Ht:0,Yt:0});var f=this.Vh.er(c.time);null!==f&&zu(h,c,f,l,n.fontSize,a,t,e,o.St)}this.ft=!1}}},t}(),$u=function(t){function e(e){return t.call(this,e)||this}return Ja(e,t),e.prototype.bh=function(t,e){var i=this.wh;i.yt=!1;var n=this.Kn.W();if(n.priceLineVisible&&this.Kn.yt()){var r=this.Kn.jh(0===n.priceLineSource);r.qh||(i.yt=!0,i.it=r.ti,i.A=this.Kn.ur(r.A),i.Ht=e,i.Yt=t,i.Vt=n.priceLineWidth,i.Pt=n.priceLineStyle)}},e}(_u),ju=function(t){function e(e){var i=t.call(this)||this;return i.Rt=e,i}return Ja(e,t),e.prototype.vi=function(t,e,i){t.yt=!1,e.yt=!1;var n=this.Rt;if(n.yt()){var r=n.W(),o=r.lastValueVisible,s=""!==n.ar(),a=0===r.seriesLastValueMode,l=n.jh(!1);if(!l.qh){o&&(t.Gt=this.lr(l,o,a),t.yt=0!==t.Gt.length),(s||a)&&(e.Gt=this.cr(l,o,s,a),e.yt=e.Gt.length>0);var u=n.ur(l.A),c=qa(u);i.t=c.t,i.A=c.i,i.ti=l.ti,e.Tt=n.jt().Dt(l.ti/n.Ct().Yt()),t.Tt=u}}},e.prototype.cr=function(t,e,i,n){var r="",o=this.Rt.ar();return i&&0!==o.length&&(r+="".concat(o," ")),e&&n&&(r+=this.Rt.Ct().vr()?t._r:t.dr),r.trim()},e.prototype.lr=function(t,e,i){return e?i?this.Rt.Ct().vr()?t.dr:t._r:t.Gt:""},e}(Tl),Vu=function(){function t(t,e){this.wr=t,this.Mr=e}return t.prototype.br=function(t){return null!==t&&this.wr===t.wr&&this.Mr===t.Mr},t.prototype.mr=function(){return new t(this.wr,this.Mr)},t.prototype.pr=function(){return this.wr},t.prototype.gr=function(){return this.Mr},t.prototype.yr=function(){return this.Mr-this.wr},t.prototype.wi=function(){return this.Mr===this.wr||Number.isNaN(this.Mr)||Number.isNaN(this.wr)},t.prototype.Nn=function(e){return null===e?this:new t(Math.min(this.pr(),e.pr()),Math.max(this.gr(),e.gr()))},t.prototype.kr=function(t){if(nl(t)&&0!==this.Mr-this.wr){var e=.5*(this.Mr+this.wr),i=this.Mr-e,n=this.wr-e;i*=t,n*=t,this.Mr=e+i,this.wr=e+n}},t.prototype.Nr=function(t){nl(t)&&(this.Mr+=t,this.wr+=t)},t.prototype.Cr=function(){return{minValue:this.wr,maxValue:this.Mr}},t.Sr=function(e){return null===e?null:new t(e.minValue,e.maxValue)},t}(),Wu=function(){function t(t,e){this.Tr=t,this.Dr=e||null}return t.prototype.Ar=function(){return this.Tr},t.prototype.Br=function(){return this.Dr},t.prototype.Cr=function(){return null===this.Tr?null:{priceRange:this.Tr.Cr(),margins:this.Dr||void 0}},t.Sr=function(e){return null===e?null:new t(Vu.Sr(e.priceRange),e.margins)},t}(),Hu=function(t){function e(e,i){var n=t.call(this,e)||this;return n.Lr=i,n}return Ja(e,t),e.prototype.bh=function(t,e){var i=this.wh;i.yt=!1;var n=this.Lr.W();if(this.Kn.yt()&&n.lineVisible){var r=this.Lr.Er();null!==r&&(i.yt=!0,i.it=r,i.A=n.color,i.Ht=e,i.Yt=t,i.Vt=n.lineWidth,i.Pt=n.lineStyle)}
13},e}(_u),Ku=function(t){function e(e,i){var n=t.call(this)||this;return n.Vh=e,n.Lr=i,n}return Ja(e,t),e.prototype.vi=function(t,e,i){t.yt=!1,e.yt=!1;var n=this.Lr.W(),r=n.axisLabelVisible,o=""!==n.title,s=this.Vh;if(r&&s.yt()){var a=this.Lr.Er();if(null!==a){o&&(e.Gt=n.title,e.yt=!0),e.Tt=s.jt().Dt(a/s.Ct().Yt()),t.Gt=s.Ct().Fr(n.price),t.yt=!0;var l=qa(n.color);i.t=l.t,i.A=l.i,i.ti=a}}},e}(Tl),Gu=function(){function t(t,e){this.Vh=t,this.zi=e,this.Or=new Hu(t,this),this.uh=new Ku(t,this),this.Vr=new wu(this.uh,t,t.jt())}return t.prototype.Pr=function(t){il(this.zi,t),this.vt(),this.Vh.jt().Wr()},t.prototype.W=function(){return this.zi},t.prototype.tn=function(){return[this.Or,this.Vr]},t.prototype.zr=function(){return this.uh},t.prototype.vt=function(){this.Or.vt(),this.uh.vt()},t.prototype.Er=function(){var t=this.Vh,e=t.Ct();if(t.jt().bt().wi()||e.wi())return null;var i=t.kt();return null===i?null:e.xt(this.zi.price,i.St)},t}(),Yu=function(t){function e(e){var i=t.call(this)||this;return i.pi=e,i}return Ja(e,t),e.prototype.jt=function(){return this.pi},e}(Il),Uu={Ds:"",Hs:"",Us:""},Xu=function(){function t(t){this.Vh=t}return t.prototype.As=function(t,e){var i=this.Vh.Rr(),n=this.Vh.W();switch(i){case"Line":return this.Ir(n,t,e);case"Area":return this.jr(n);case"Baseline":return this.qr(n,t,e);case"Bar":return this.Ur(n,t,e);case"Candlestick":return this.Hr(n,t,e);case"Histogram":return this.Yr(n,t,e)}throw new Error("Unknown chart style")},t.prototype.Ur=function(t,e,i){var n=Qa({},Uu),r=t.upColor,o=t.downColor,s=r,a=o,l=$a(this.$r(e,i)),u=ja(l.St[0])<=ja(l.St[3]);return void 0!==l.A?(n.Ds=l.A,n.Hs=l.A):(n.Ds=u?r:o,n.Hs=u?s:a),n},t.prototype.Hr=function(t,e,i){var n,r,o,s=Qa({},Uu),a=t.upColor,l=t.downColor,u=t.borderUpColor,c=t.borderDownColor,h=t.wickUpColor,f=t.wickDownColor,p=$a(this.$r(e,i)),d=ja(p.St[0])<=ja(p.St[3]);return s.Ds=null!==(n=p.A)&&void 0!==n?n:d?a:l,s.Hs=null!==(r=p.Tt)&&void 0!==r?r:d?u:c,s.Us=null!==(o=p.qs)&&void 0!==o?o:d?h:f,s},t.prototype.jr=function(t){return Qa(Qa({},Uu),{Ds:t.lineColor})},t.prototype.qr=function(t,e,i){var n=$a(this.$r(e,i)).St[3]>=t.baseValue.price;return Qa(Qa({},Uu),{Ds:n?t.topLineColor:t.bottomLineColor})},t.prototype.Ir=function(t,e,i){var n,r=$a(this.$r(e,i));return Qa(Qa({},Uu),{Ds:null!==(n=r.A)&&void 0!==n?n:t.color})},t.prototype.Yr=function(t,e,i){var n=Qa({},Uu),r=$a(this.$r(e,i));return n.Ds=void 0!==r.A?r.A:t.color,n},t.prototype.$r=function(t,e){return void 0!==e?e.St:this.Vh.an().Kr(t)},t}(),qu=function(){function t(){this.Xr=[],this.Zr=new Map,this.Jr=new Map}return t.prototype.Gr=function(){return this.hs()>0?this.Xr[this.Xr.length-1]:null},t.prototype.Qr=function(){return this.hs()>0?this.te(0):null},t.prototype.un=function(){return this.hs()>0?this.te(this.Xr.length-1):null},t.prototype.hs=function(){return this.Xr.length},t.prototype.wi=function(){return 0===this.hs()},t.prototype.Uh=function(t){return null!==this.ie(t,0)},t.prototype.Kr=function(t){return this.ne(t)},t.prototype.ne=function(t,e){void 0===e&&(e=0);var i=this.ie(t,e);return null===i?null:Qa(Qa({},this.se(i)),{vs:this.te(i)})},t.prototype.fs=function(){return this.Xr},t.prototype.he=function(t,e,i){if(this.wi())return null;for(var n=null,r=0,o=i;r<o.length;r++){var s=o[r];n=Zu(n,this.re(t,e,s))}return n},t.prototype.Z=function(t){this.Jr.clear(),this.Zr.clear(),this.Xr=t},t.prototype.te=function(t){return this.Xr[t].vs},t.prototype.se=function(t){return this.Xr[t]},t.prototype.ie=function(t,e){var i=this.ee(t);if(null===i&&0!==e)switch(e){case-1:return this.ue(t);case 1:return this.ae(t);default:throw new TypeError("Unknown search mode")}return i},t.prototype.ue=function(t){var e=this.oe(t);return e>0&&(e-=1),e!==this.Xr.length&&this.te(e)<t?e:null},t.prototype.ae=function(t){var e=this.le(t);return e!==this.Xr.length&&t<this.te(e)?e:null},t.prototype.ee=function(t){var e=this.oe(t);return e===this.Xr.length||t<this.Xr[e].vs?null:e},t.prototype.oe=function(t){return Kl(this.Xr,t,(function(t,e){return t.vs<e}))},t.prototype.le=function(t){return Gl(this.Xr,t,(function(t,e){return e.vs>t}))}
13,t.prototype.fe=function(t,e,i){for(var n=null,r=t;r<e;r++){var o=this.Xr[r].St[i];Number.isNaN(o)||(null===n?n={ce:o,ve:o}:(o<n.ce&&(n.ce=o),o>n.ve&&(n.ve=o)))}return n},t.prototype.re=function(t,e,i){if(this.wi())return null;var n=null,r=$a(this.Qr()),o=$a(this.un()),s=Math.max(t,r),a=Math.min(e,o),l=30*Math.ceil(s/30),u=Math.max(l,30*Math.floor(a/30)),c=this.oe(s),h=this.le(Math.min(a,l,e));n=Zu(n,this.fe(c,h,i));var f=this.Zr.get(i);void 0===f&&(f=new Map,this.Zr.set(i,f));for(var p=Math.max(l+1,s);p<u;p+=30){var d=Math.floor(p/30),v=f.get(d);if(void 0===v){var m=this.oe(30*d),y=this.le(30*(d+1)-1);v=this.fe(m,y,i),f.set(d,v)}n=Zu(n,v)}return c=this.oe(u),h=this.le(a),Zu(n,this.fe(c,h,i))},t}();function Zu(t,e){return null===t?e:null===e?t:{ce:Math.min(t.ce,e.ce),ve:Math.max(t.ve,e.ve)}}var Ju=function(t){function e(e,i,n){var r=t.call(this,e)||this;r.Bt=new qu,r.Or=new $u(r),r._e=[],r.de=new Cu(r),r.we=null,r.Me=null,r.be=[],r.me=[],r.pe=null,r.zi=i,r.ge=n;var o=new ju(r);return r.Ei=[o],r.Vr=new wu(o,r,e),"Area"!==n&&"Line"!==n&&"Baseline"!==n||(r.we=new Eu(r)),r.ye(),r.ke(),r}return Ja(e,t),e.prototype.g=function(){null!==this.pe&&clearTimeout(this.pe)},e.prototype.ur=function(t){return this.zi.priceLineColor||t},e.prototype.jh=function(t){var e={qh:!0},i=this.Ct();if(this.jt().bt().wi()||i.wi()||this.Bt.wi())return e;var n,r,o=this.jt().bt().ss(),s=this.kt();if(null===o||null===s)return e;if(t){var a=this.Bt.Gr();if(null===a)return e;n=a,r=a.vs}else{var l=this.Bt.ne(o.jn(),-1);if(null===l)return e;if(null===(n=this.Bt.Kr(l.vs)))return e;r=l.vs}var u=n.St[3],c=this.ls().As(r,{St:n}),h=i.xt(u,s.St);return{qh:!1,et:u,Gt:i.Mi(u,s.St),_r:i.Fr(u),dr:i.Ne(u,s.St),A:c.Ds,ti:h,vs:r}},e.prototype.ls=function(){return null!==this.Me||(this.Me=new Xu(this)),this.Me},e.prototype.W=function(){return this.zi},e.prototype.Pr=function(t){var e=t.priceScaleId;void 0!==e&&e!==this.zi.priceScaleId&&this.jt().xe(this,e),il(this.zi,t),null!==this.ki&&void 0!==t.scaleMargins&&this.ki.Pr({scaleMargins:t.scaleMargins}),void 0!==t.priceFormat&&(this.ye(),this.jt().Ce()),this.jt().Se(this),this.jt().Te(),this.Hi.vt("options")},e.prototype.Z=function(t,e){this.Bt.Z(t),this.De(),this.Hi.vt("data"),this.Ri.vt("data"),null!==this.we&&(e&&e.Ae?this.we.Wh():0===t.length&&this.we.Ph());var i=this.jt().oh(this);this.jt().Be(i),this.jt().Se(this),this.jt().Te(),this.jt().Wr()},e.prototype.Le=function(t){this.be=t.map((function(t){return Qa({},t)})),this.De();var e=this.jt().oh(this);this.Ri.vt("data"),this.jt().Be(e),this.jt().Se(this),this.jt().Te(),this.jt().Wr()},e.prototype.rr=function(){return this.me},e.prototype.Ee=function(t){var e=new Gu(this,t);return this._e.push(e),this.jt().Se(this),e},e.prototype.Fe=function(t){var e=this._e.indexOf(t);-1!==e&&this._e.splice(e,1),this.jt().Se(this)},e.prototype.Rr=function(){return this.ge},e.prototype.kt=function(){var t=this.Oe();return null===t?null:{St:t.St[3],Ve:t.rt}},e.prototype.Oe=function(){var t=this.jt().bt().ss();if(null===t)return null;var e=t.In();return this.Bt.ne(e,1)},e.prototype.an=function(){return this.Bt},e.prototype.er=function(t){var e=this.Bt.Kr(t);return null===e?null:"Bar"===this.ge||"Candlestick"===this.ge?{open:e.St[0],high:e.St[1],low:e.St[2],close:e.St[3]}:e.St[3]},e.prototype.Pe=function(t){var e=this,i=this.we;return null!==i&&i.yt()?(null===this.pe&&i.Rh()&&(this.pe=setTimeout((function(){e.pe=null,e.jt().We()}),0)),i.zh(),[i]):[]},e.prototype.tn=function(){var t=[];this.ze()||t.push(this.de);for(var e=0,i=this._e;e<i.length;e++){var n=i[e];t.push.apply(t,n.tn())}return t.push(this.Hi,this.Or,this.Vr,this.Ri),t},e.prototype.nn=function(t,e){if(e!==this.ki&&!this.ze())return[];for(var i=tl([],this.Ei),n=0,r=this._e;n<r.length;n++){var o=r[n];i.push(o.zr())}return i},e.prototype.Re=function(t,e){var i=this;if(void 0!==this.zi.autoscaleInfoProvider){var n=this.zi.autoscaleInfoProvider((function(){var n=i.Ie(t,e);return null===n?null:n.Cr()}));return Wu.Sr(n)}return this.Ie(t,e)},e.prototype.je=function(){return this.zi.priceFormat.minMove},e.prototype.qe=function(){return this.Ue},e.prototype.hn=function(){var t;this.Hi.vt(),this.Ri.vt();for(var e=0,i=this.Ei;e<i.length;e++)i[e].vt();for(var n=0,r=this._e;n<r.length;n++)r[n].vt();this.Or.vt(),this.de.vt(),null===(t=this.we)||void 0===t||t.vt()},e.prototype.Ct=function(){return $a(t.prototype.Ct.call(this))},e.prototype.gt=function(t){if("Line"!==this.ge&&"Area"!==this.ge&&"Baseline"!==this.ge||!this.zi.crosshairMarkerVisible)return null;var e=this.Bt.Kr(t);return null===e?null:{et:e.St[3],st:this.He(),Tt:this.Ye(),Nt:this.$e(t)}},e.prototype.ar=function(){return this.zi.title},e.prototype.yt=function(){return this.zi.visible},e.prototype.ze=function(){return!Pl(this.Ct().Ke())},e.prototype.Ie=function(t,e){if(!rl(t)||!rl(e)||this.Bt.wi())return null;var i="Line"===this.ge||"Area"===this.ge||"Baseline"===this.ge||"Histogram"===this.ge?[3]:[2,1],n=this.Bt.he(t,e,i),r=null!==n?new Vu(n.ce,n.ve):null;if("Histogram"===this.Rr()){var o=this.zi.base,s=new Vu(o,o);r=null!==r?r.Nn(s):s}return new Wu(r,this.Ri.hr())},e.prototype.He=function(){switch(this.ge){case"Line":case"Area":case"Baseline":return this.zi.crosshairMarkerRadius}return 0},e.prototype.Ye=function(){switch(this.ge){case"Line":case"Area":case"Baseline":var t=this.zi.crosshairMarkerBorderColor;if(0!==t.length)return t}return null},e.prototype.$e=function(t){switch(this.ge){case"Line":case"Area":case"Baseline":var e=this.zi.crosshairMarkerBackgroun
13dColor;if(0!==e.length)return e}return this.ls().As(t).Ds},e.prototype.ye=function(){switch(this.zi.priceFormat.type){case"custom":this.Ue={format:this.zi.priceFormat.formatter};break;case"volume":this.Ue=new Rl(this.zi.priceFormat.precision);break;case"percent":this.Ue=new zl(this.zi.priceFormat.precision);break;default:var t=Math.pow(10,this.zi.priceFormat.precision);this.Ue=new Fl(t,this.zi.priceFormat.minMove*t)}null!==this.ki&&this.ki.Xe()},e.prototype.De=function(){var t=this,e=this.jt().bt();if(e.wi()||0===this.Bt.hs())this.me=[];else{var i=$a(this.Bt.Qr());this.me=this.be.map((function(n,r){var o=$a(e.Ze(n.time,!0)),s=o<i?1:-1;return{time:$a(t.Bt.ne(o,s)).vs,position:n.position,shape:n.shape,color:n.color,id:n.id,Xh:r,text:n.text,size:n.size}}))}},e.prototype.ke=function(){switch(this.Ri=new Ru(this,this.jt()),this.ge){case"Bar":this.Hi=new eu(this,this.jt());break;case"Candlestick":this.Hi=new hu(this,this.jt());break;case"Line":this.Hi=new mu(this,this.jt());break;case"Area":this.Hi=new Jl(this,this.jt());break;case"Baseline":this.Hi=new uu(this,this.jt());break;case"Histogram":this.Hi=new vu(this,this.jt());break;default:throw Error("Unknown chart style assigned: "+this.ge)}},e}(Yu),Qu=function(){function t(t){this.zi=t}return t.prototype.Je=function(t,e,i){var n=t;if(0===this.zi.mode)return n;var r=i.ji(),o=r.kt();if(null===o)return n;var s=r.xt(t,o),a=i.Ge().filter((function(t){return t instanceof Ju})).reduce((function(t,n){if(i.lh(n)||!n.yt())return t;var r=n.Ct(),o=n.an();if(r.wi()||!o.Uh(e))return t;var s=o.Kr(e);if(null===s)return t;var a=ja(n.kt());return t.concat([r.xt(s.St[3],a.St)])}),[]);if(0===a.length)return n;a.sort((function(t,e){return Math.abs(t-s)-Math.abs(e-s)}));var l=a[0];return r.qi(l,o)},t}(),tc=function(){function t(){this.Bt=null}return t.prototype.Z=function(t){this.Bt=t},t.prototype.H=function(t,e,i,n){var r,o=this;if(null!==this.Bt){var s=Math.max(1,Math.floor(e));t.lineWidth=s;var a=Math.ceil(this.Bt.Ot*e),l=Math.ceil(this.Bt.Ft*e);(r=t).save(),r.lineWidth%2&&r.translate(.5,.5),function(){var i=$a(o.Bt);if(i.Qe){t.strokeStyle=i.tu,Na(t,i.iu),t.beginPath();for(var n=0,r=i.nu;n<r.length;n++){var u=r[n],c=Math.round(u.su*e);t.moveTo(c,-s),t.lineTo(c,a+s)}t.stroke()}if(i.hu){t.strokeStyle=i.ru,Na(t,i.eu),t.beginPath();for(var h=0,f=i.uu;h<f.length;h++){var p=f[h],d=Math.round(p.su*e);t.moveTo(-s,d),t.lineTo(l+s,d)}t.stroke()}}(),r.restore()}},t}(),ec=function(){function t(t){this.zt=new tc,this.ft=!0,this.Di=t}return t.prototype.vt=function(){this.ft=!0},t.prototype.dt=function(t,e){if(this.ft){var i=this.Di.jt().W().grid,n={Ot:t,Ft:e,hu:i.horzLines.visible,Qe:i.vertLines.visible,ru:i.horzLines.color,tu:i.vertLines.color,eu:i.horzLines.style,iu:i.vertLines.style,uu:this.Di.ji().au(),nu:this.Di.jt().bt().au()||[]};this.zt.Z(n),this.ft=!1}return this.zt},t}(),ic=function(){function t(t){this.Hi=new ec(t)}return t.prototype.ou=function(){return this.Hi},t}(),nc={lu:4,fu:1e-4};function rc(t,e){var i=100*(t-e)/e;return e<0?-i:i}function oc(t,e){var i=rc(t.pr(),e),n=rc(t.gr(),e);return new Vu(i,n)}function sc(t,e){var i=100*(t-e)/e+100;return e<0?-i:i}function ac(t,e){var i=sc(t.pr(),e),n=sc(t.gr(),e);return new Vu(i,n)}function lc(t,e){var i=Math.abs(t);if(i<1e-15)return 0;var n=ru(i+e.fu)+e.lu;return t<0?-n:n}function uc(t,e){var i=Math.abs(t);if(i<1e-15)return 0;var n=Math.pow(10,i-e.lu)-e.fu;return t<0?-n:n}function cc(t,e){if(null===t)return null;var i=lc(t.pr(),e),n=lc(t.gr(),e);return new Vu(i,n)}function hc(t,e){if(null===t)return null;var i=uc(t.pr(),e),n=uc(t.gr(),e);return new Vu(i,n)}function fc(t){if(null===t)return nc;var e=Math.abs(t.gr()-t.pr());if(e>=1||e<1e-15)return nc;var i=Math.ceil(Math.abs(Math.log10(e))),n=nc.lu+i;return{lu:n,fu:1/Math.pow(10,n)}}var pc,dc=function(){function t(t,e){if(this.cu=t,this.vu=e,function(t){if(t<0)return!1;for(var e=t;e>1;e/=10)if(e%10!=0)return!1;return!0}(this.cu))this._u=[2,2.5,2];else{this._u=[];for(var i=this.cu;1!==i;){if(i%2==0)this._u.push(2),i/=2;else{if(i%5!=0)throw new Error("unexpected base");this._u.push(2,2.5),i/=5}if(this._u.length>100)throw new Error("something wrong with base")}}}
13return t.prototype.du=function(t,e,i){for(var n,r=0===this.cu?0:1/this.cu,o=Math.pow(10,Math.max(0,Math.ceil(ru(t-e)))),s=0,a=this.vu[0];;){var l=nu(o,r,1e-14)&&o>r+1e-14,u=nu(o,i*a,1e-14),c=nu(o,1,1e-14);if(!(l&&u&&c))break;o/=a,a=this.vu[++s%this.vu.length]}if(o<=r+1e-14&&(o=r),o=Math.max(1,o),this._u.length>0&&(n=o,Math.abs(n-1)<1e-14))for(s=0,a=this._u[0];nu(o,i*a,1e-14)&&o>r+1e-14;)o/=a,a=this._u[++s%this._u.length];return o},t}(),vc=function(){function t(t,e,i,n){this.wu=[],this._i=t,this.cu=e,this.Mu=i,this.bu=n}return t.prototype.du=function(t,e){if(t<e)throw new Error("high < low");var i=this._i.Yt(),n=(t-e)*this.mu()/i,r=new dc(this.cu,[2,2.5,2]),o=new dc(this.cu,[2,2,2.5]),s=new dc(this.cu,[2.5,2,2]),a=[];return a.push(r.du(t,e,n),o.du(t,e,n),s.du(t,e,n)),function(t){if(t.length<1)throw Error("array is empty");for(var e=t[0],i=1;i<t.length;++i)t[i]<e&&(e=t[i]);return e}(a)},t.prototype.pu=function(){var t=this._i,e=t.kt();if(null!==e){var i=t.Yt(),n=this.Mu(i-1,e),r=this.Mu(0,e),o=this._i.W().entireTextOnly?this.gu()/2:0,s=o,a=i-1-o,l=Math.max(n,r),u=Math.min(n,r);if(l!==u){for(var c=this.du(l,u),h=l%c,f=l>=u?1:-1,p=null,d=0,v=l-(h+=h<0?c:0);v>u;v-=c){var m=this.bu(v,e,!0);null!==p&&Math.abs(m-p)<this.mu()||m<s||m>a||(d<this.wu.length?(this.wu[d].su=m,this.wu[d].yu=t.ku(v)):this.wu.push({su:m,yu:t.ku(v)}),d++,p=m,t.Nu()&&(c=this.du(v*f,u)))}this.wu.length=d}else this.wu=[]}else this.wu=[]},t.prototype.au=function(){return this.wu},t.prototype.gu=function(){return this._i.S()},t.prototype.mu=function(){return Math.ceil(2.5*this.gu())},t}();function mc(t){return t.slice().sort((function(t,e){return $a(t.xi())-$a(e.xi())}))}!function(t){t[t.Normal=0]="Normal",t[t.Logarithmic=1]="Logarithmic",t[t.Percentage=2]="Percentage",t[t.IndexedTo100=3]="IndexedTo100"}(pc||(pc={}));var yc=new zl,gc=new Fl(100,1),bc=function(){function t(t,e,i,n){this.xu=0,this.Cu=null,this.Tr=null,this.Su=null,this.Tu={Du:!1,Au:null},this.Bu=0,this.Lu=0,this.Eu=new el,this.Fu=new el,this.Ou=[],this.Vu=null,this.Pu=null,this.Wu=null,this.zu=null,this.Ue=gc,this.Ru=fc(null),this.Iu=t,this.zi=e,this.ju=i,this.qu=n,this.Uu=new vc(this,100,this.Hu.bind(this),this.Yu.bind(this))}return t.prototype.Ke=function(){return this.Iu},t.prototype.W=function(){return this.zi},t.prototype.Pr=function(t){if(il(this.zi,t),this.Xe(),void 0!==t.mode&&this.$u({mh:t.mode}),void 0!==t.scaleMargins){var e=Ra(t.scaleMargins.top),i=Ra(t.scaleMargins.bottom);if(e<0||e>1)throw new Error("Invalid top margin - expect value between 0 and 1, given=".concat(e));if(i<0||i>1||e+i>1)throw new Error("Invalid bottom margin - expect value between 0 and 1, given=".concat(i));if(e+i>1)throw new Error("Invalid margins - sum of margins must be less than 1, given=".concat(e+i));this.Ku(),this.Pu=null}},t.prototype.Xu=function(){return this.zi.autoScale},t.prototype.Nu=function(){return 1===this.zi.mode},t.prototype.vr=function(){return 2===this.zi.mode},t.prototype.Zu=function(){return 3===this.zi.mode},t.prototype.mh=function(){return{_n:this.zi.autoScale,Ju:this.zi.invertScale,mh:this.zi.mode}},t.prototype.$u=function(t){var e=this.mh(),i=null;void 0!==t._n&&(this.zi.autoScale=t._n),void 0!==t.mh&&(this.zi.mode=t.mh,2!==t.mh&&3!==t.mh||(this.zi.autoScale=!0),this.Tu.Du=!1),1===e.mh&&t.mh!==e.mh&&(function(t,e){if(null===t)return!1;var i=uc(t.pr(),e),n=uc(t.gr(),e);return isFinite(i)&&isFinite(n)}(this.Tr,this.Ru)?null!==(i=hc(this.Tr,this.Ru))&&this.Gu(i):this.zi.autoScale=!0),1===t.mh&&t.mh!==e.mh&&null!==(i=cc(this.Tr,this.Ru))&&this.Gu(i);var n=e.mh!==this.zi.mode;n&&(2===e.mh||this.vr())&&this.Xe(),n&&(3===e.mh||this.Zu())&&this.Xe(),void 0!==t.Ju&&e.Ju!==t.Ju&&(this.zi.invertScale=t.Ju,this.Qu()),this.Fu.m(e,this.mh())},t.prototype.ta=function(){return this.Fu},t.prototype.S=function(){return this.ju.fontSize},t.prototype.Yt=function(){return this.xu},t.prototype.ia=function(t){this.xu!==t&&(this.xu=t,this.Ku(),this.Pu=null)},t.prototype.na=function(){if(this.Cu)return this.Cu;var t=this.Yt()-this.sa()-this.ha();return this.Cu=t,t},t.prototype.Ar=function(){return this.ra(),this.Tr},t.prototype.Gu=function(t,e){var i=this.Tr;(e||null===i&&null!==t||null!==i&&!i.br(t))&&(this.Pu=null,this.Tr=t)},t.prototype.wi=function(){return this.ra(),0===this.xu||!this.Tr||this.Tr.wi()},t.prototype.ea=function(t){return this.Ju()?t:this.Yt()-1-t},t.prototype.xt=function(t,e){return this.vr()?t=rc(t,e):this.Zu()&&(t=sc(t,e)),this.Yu(t,e)}
13,t.prototype.us=function(t,e,i){this.ra();for(var n=this.ha(),r=$a(this.Ar()),o=r.pr(),s=r.gr(),a=this.na()-1,l=this.Ju(),u=a/(s-o),c=void 0===i?0:i.from,h=void 0===i?t.length:i.to,f=this.ua(),p=c;p<h;p++){var d=t[p],v=d.et;if(!isNaN(v)){var m=v;null!==f&&(m=f(d.et,e));var y=n+u*(m-o),g=l?y:this.xu-1-y;d.it=g}}},t.prototype.Ss=function(t,e,i){this.ra();for(var n=this.ha(),r=$a(this.Ar()),o=r.pr(),s=r.gr(),a=this.na()-1,l=this.Ju(),u=a/(s-o),c=void 0===i?0:i.from,h=void 0===i?t.length:i.to,f=this.ua(),p=c;p<h;p++){var d=t[p],v=d.open,m=d.high,y=d.low,g=d.close;null!==f&&(v=f(d.open,e),m=f(d.high,e),y=f(d.low,e),g=f(d.close,e));var b=n+u*(v-o),w=l?b:this.xu-1-b;d.xs=w,b=n+u*(m-o),w=l?b:this.xu-1-b,d.ys=w,b=n+u*(y-o),w=l?b:this.xu-1-b,d.ks=w,b=n+u*(g-o),w=l?b:this.xu-1-b,d.Cs=w}},t.prototype.qi=function(t,e){var i=this.Hu(t,e);return this.aa(i,e)},t.prototype.aa=function(t,e){var i,n,r=t;return this.vr()?(i=r,(n=e)<0&&(i=-i),r=i/100*n+n):this.Zu()&&(r=function(t,e){return t-=100,e<0&&(t=-t),t/100*e+e}(r,e)),r},t.prototype.Ge=function(){return this.Ou},t.prototype.oa=function(){if(this.Vu)return this.Vu;for(var t=[],e=0;e<this.Ou.length;e++){var i=this.Ou[e];null===i.xi()&&i.Ci(e+1),t.push(i)}return t=mc(t),this.Vu=t,this.Vu},t.prototype.la=function(t){-1===this.Ou.indexOf(t)&&(this.Ou.push(t),this.Xe(),this.fa())},t.prototype.ca=function(t){var e=this.Ou.indexOf(t);if(-1===e)throw new Error("source is not attached to scale");this.Ou.splice(e,1),0===this.Ou.length&&(this.$u({_n:!0}),this.Gu(null)),this.Xe(),this.fa()},t.prototype.kt=function(){for(var t=null,e=0,i=this.Ou;e<i.length;e++){var n=i[e].kt();null!==n&&(null===t||n.Ve<t.Ve)&&(t=n)}return null===t?null:t.St},t.prototype.Ju=function(){return this.zi.invertScale},t.prototype.au=function(){var t=null===this.kt();if(null!==this.Pu&&(t||this.Pu.va===t))return this.Pu.au;this.Uu.pu();var e=this.Uu.au();return this.Pu={au:e,va:t},this.Eu.m(),e},t.prototype._a=function(){return this.Eu},t.prototype.da=function(t){this.vr()||this.Zu()||null===this.Wu&&null===this.Su&&(this.wi()||(this.Wu=this.xu-t,this.Su=$a(this.Ar()).mr()))},t.prototype.wa=function(t){if(!this.vr()&&!this.Zu()&&null!==this.Wu){this.$u({_n:!1}),(t=this.xu-t)<0&&(t=0);var e=(this.Wu+.2*(this.xu-1))/(t+.2*(this.xu-1)),i=$a(this.Su).mr();e=Math.max(e,.1),i.kr(e),this.Gu(i)}},t.prototype.Ma=function(){this.vr()||this.Zu()||(this.Wu=null,this.Su=null)},t.prototype.ba=function(t){this.Xu()||null===this.zu&&null===this.Su&&(this.wi()||(this.zu=t,this.Su=$a(this.Ar()).mr()))},t.prototype.ma=function(t){if(!this.Xu()&&null!==this.zu){var e=$a(this.Ar()).yr()/(this.na()-1),i=t-this.zu;this.Ju()&&(i*=-1);var n=i*e,r=$a(this.Su).mr();r.Nr(n),this.Gu(r,!0),this.Pu=null}},t.prototype.pa=function(){this.Xu()||null!==this.zu&&(this.zu=null,this.Su=null)},t.prototype.qe=function(){return this.Ue||this.Xe(),this.Ue},t.prototype.Mi=function(t,e){switch(this.zi.mode){case 2:return this.qe().format(rc(t,e));case 3:return this.qe().format(sc(t,e));default:return this.ga(t)}},t.prototype.ku=function(t){switch(this.zi.mode){case 2:case 3:return this.qe().format(t);default:return this.ga(t)}},t.prototype.Fr=function(t){return this.ga(t,$a(this.ya()).qe())},t.prototype.Ne=function(t,e){return t=rc(t,e),yc.format(t)},t.prototype.ka=function(){return this.Ou},t.prototype.Na=function(t){this.Tu={Au:t,Du:!1}},t.prototype.hn=function(){this.Ou.forEach((function(t){return t.hn()}))},t.prototype.Xe=function(){this.Pu=null;var t=this.ya(),e=100;null!==t&&(e=Math.round(1/t.je())),this.Ue=gc,this.vr()?(this.Ue=yc,e=100):this.Zu()?(this.Ue=new Fl(100,1),e=100):null!==t&&(this.Ue=t.qe()),this.Uu=new vc(this,e,this.Hu.bind(this),this.Yu.bind(this)),this.Uu.pu()},t.prototype.fa=function(){this.Vu=null},t.prototype.ya=function(){return this.Ou[0]||null},t.prototype.sa=function(){return this.Ju()?this.zi.scaleMargins.bottom*this.Yt()+this.Lu:this.zi.scaleMargins.top*this.Yt()+this.Bu},t.prototype.ha=function(){return this.Ju()?this.zi.scaleMargins.top*this.Yt()+this.Bu:this.zi.scaleMargins.bottom*this.Yt()+this.Lu},t.prototype.ra=function(){this.Tu.Du||(this.Tu.Du=!0,this.xa())},t.prototype.Ku=function(){this.Cu=null},t.prototype.Yu=function(t,e){if(this.ra(),this.wi())return 0;t=this.Nu()&&t?lc(t,this.Ru):t;var i=$a(this.Ar()),n=this.ha()+(this.na()-1)*(t-i.pr())/i.yr();return this.ea(n)},t.prototype.Hu=function(t,e){if(this.ra(),this.wi())return 0;var i=this.ea(t),n=$a(this.Ar()),r=n.pr()+n.yr()*((i-this.ha())/(this.na()-1));return this.Nu()?uc(r,this.Ru):r},t.prototype.Qu=function(){this.Pu=null,this.Uu.pu()},t.prototype.xa=function(){var t=this.Tu.Au;if(null!==t){for(var e,i,n=null,r=0,o=0,s=0,a=this.ka();s<a.length;s++){var l=a[s];if(l.yt()){var u=l.kt();if(null!==u){var c=l.Re(t.In(),t.jn()),h=c&&c.Ar();
13if(null!==h){switch(this.zi.mode){case 1:h=cc(h,this.Ru);break;case 2:h=oc(h,u.St);break;case 3:h=ac(h,u.St)}if(n=null===n?h:n.Nn($a(h)),null!==c){var f=c.Br();null!==f&&(r=Math.max(r,f.above),o=Math.max(r,f.below))}}}}}if(r===this.Bu&&o===this.Lu||(this.Bu=r,this.Lu=o,this.Pu=null,this.Ku()),null!==n){if(n.pr()===n.gr()){var p=this.ya(),d=5*(null===p||this.vr()||this.Zu()?1:p.je());this.Nu()&&(n=hc(n,this.Ru)),n=new Vu(n.pr()-d,n.gr()+d),this.Nu()&&(n=cc(n,this.Ru))}if(this.Nu()){var v=hc(n,this.Ru),m=fc(v);if(e=m,i=this.Ru,e.lu!==i.lu||e.fu!==i.fu){var y=null!==this.Su?hc(this.Su,this.Ru):null;this.Ru=m,n=cc(v,m),null!==y&&(this.Su=cc(y,m))}}this.Gu(n)}else null===this.Tr&&(this.Gu(new Vu(-.5,.5)),this.Ru=fc(null));this.Tu.Du=!0}},t.prototype.ua=function(){var t=this;return this.vr()?rc:this.Zu()?sc:this.Nu()?function(e){return lc(e,t.Ru)}:null},t.prototype.ga=function(t,e){return void 0===this.qu.priceFormatter?(void 0===e&&(e=this.qe()),e.format(t)):this.qu.priceFormatter(t)},t}(),wc=function(){function t(t,e){this.Ou=[],this.Ca=new Map,this.xu=0,this.hh=0,this.Sa=1e3,this.Vu=null,this.Ta=new el,this.Da=t,this.pi=e,this.Aa=new ic(this);var i=e.W();this.Ba=this.La("left",i.leftPriceScale),this.Ea=this.La("right",i.rightPriceScale),this.Ba.ta().u(this.Fa.bind(this,this.Ba),this),this.Ea.ta().u(this.Fa.bind(this,this.Ba),this),this.Oa(i)}return t.prototype.Oa=function(t){if(t.leftPriceScale&&this.Ba.Pr(t.leftPriceScale),t.rightPriceScale&&this.Ea.Pr(t.rightPriceScale),t.localization&&(this.Ba.Xe(),this.Ea.Xe()),t.overlayPriceScales)for(var e=0,i=Array.from(this.Ca.values());e<i.length;e++){var n=$a(i[e][0].Ct());n.Pr(t.overlayPriceScales),t.localization&&n.Xe()}},t.prototype.Va=function(t){switch(t){case"left":return this.Ba;case"right":return this.Ea}return this.Ca.has(t)?Ra(this.Ca.get(t))[0].Ct():null},t.prototype.g=function(){this.jt().Pa().M(this),this.Ba.ta().M(this),this.Ea.ta().M(this),this.Ou.forEach((function(t){t.g&&t.g()})),this.Ta.m()},t.prototype.Wa=function(){return this.Sa},t.prototype.za=function(t){this.Sa=t},t.prototype.jt=function(){return this.pi},t.prototype.Ht=function(){return this.hh},t.prototype.Yt=function(){return this.xu},t.prototype.Ra=function(t){this.hh=t,this.Ia()},t.prototype.ia=function(t){var e=this;this.xu=t,this.Ba.ia(t),this.Ea.ia(t),this.Ou.forEach((function(i){if(e.lh(i)){var n=i.Ct();null!==n&&n.ia(t)}})),this.Ia()},t.prototype.Ge=function(){return this.Ou},t.prototype.lh=function(t){var e=t.Ct();return null===e||this.Ba!==e&&this.Ea!==e},t.prototype.la=function(t,e,i){var n=void 0!==i?i:this.qa().ja+1;this.Ua(t,e,n)},t.prototype.ca=function(t){var e=this.Ou.indexOf(t);za(-1!==e,"removeDataSource: invalid data source"),this.Ou.splice(e,1);var i=$a(t.Ct()).Ke();if(this.Ca.has(i)){var n=Ra(this.Ca.get(i)),r=n.indexOf(t);-1!==r&&(n.splice(r,1),0===n.length&&this.Ca.delete(i))}var o=t.Ct();o&&o.Ge().indexOf(t)>=0&&o.ca(t),null!==o&&(o.fa(),this.Ha(o)),this.Vu=null},t.prototype._h=function(t){return t===this.Ba?"left":t===this.Ea?"right":"overlay"},t.prototype.Ya=function(){return this.Ba},t.prototype.$a=function(){return this.Ea},t.prototype.Ka=function(t,e){t.da(e)},t.prototype.Xa=function(t,e){t.wa(e),this.Ia()},t.prototype.Za=function(t){t.Ma()},t.prototype.Ja=function(t,e){t.ba(e)},t.prototype.Ga=function(t,e){t.ma(e),this.Ia()},t.prototype.Qa=function(t){t.pa()},t.prototype.Ia=function(){this.Ou.forEach((function(t){t.hn()}))},t.prototype.ji=function(){var t=null;return this.pi.W().rightPriceScale.visible&&0!==this.Ea.Ge().length?t=this.Ea:this.pi.W().leftPriceScale.visible&&0!==this.Ba.Ge().length?t=this.Ba:0!==this.Ou.length&&(t=this.Ou[0].Ct()),null===t&&(t=this.Ea),t},t.prototype.fh=function(){var t=null;return this.pi.W().rightPriceScale.visible?t=this.Ea:this.pi.W().leftPriceScale.visible&&(t=this.Ba),t},t.prototype.Ha=function(t){null!==t&&t.Xu()&&this.io(t)},t.prototype.no=function(t){var e=this.Da.ss();t.$u({_n:!0}),null!==e&&t.Na(e),this.Ia()},t.prototype.so=function(){this.io(this.Ba),this.io(this.Ea)},t.prototype.ho=function(){var t=this;this.Ha(this.Ba),this.Ha(this.Ea),this.Ou.forEach((function(e){t.lh(e)&&t.Ha(e.Ct())}
13)),this.Ia(),this.pi.Wr()},t.prototype.oa=function(){return null===this.Vu&&(this.Vu=mc(this.Ou)),this.Vu},t.prototype.ro=function(){return this.Ta},t.prototype.eo=function(){return this.Aa},t.prototype.io=function(t){var e=t.ka();if(e&&e.length>0&&!this.Da.wi()){var i=this.Da.ss();null!==i&&t.Na(i)}t.hn()},t.prototype.qa=function(){var t=this.oa();if(0===t.length)return{uo:0,ja:0};for(var e=0,i=0,n=0;n<t.length;n++){var r=t[n].xi();null!==r&&(r<e&&(e=r),r>i&&(i=r))}return{uo:e,ja:i}},t.prototype.Ua=function(t,e,i){var n=this.Va(e);if(null===n&&(n=this.La(e,this.pi.W().overlayPriceScales)),this.Ou.push(t),!Pl(e)){var r=this.Ca.get(e)||[];r.push(t),this.Ca.set(e,r)}n.la(t),t.Si(n),t.Ci(i),this.Ha(n),this.Vu=null},t.prototype.Fa=function(t,e,i){e.mh!==i.mh&&this.io(t)},t.prototype.La=function(t,e){var i=Qa({visible:!0,autoScale:!0},al(e)),n=new bc(t,i,this.pi.W().layout,this.pi.W().localization);return n.ia(this.Yt()),n},t}(),Sc=function(t){return t.getUTCFullYear()};var _c=function(){function t(t,e){void 0===t&&(t="yyyy-MM-dd"),void 0===e&&(e="default"),this.ao=t,this.oo=e}return t.prototype.lo=function(t){return function(t,e,i){return e.replace(/yyyy/g,(n=t,Nl(Sc(n),4))).replace(/yy/g,function(t){return Nl(Sc(t)%100,2)}(t)).replace(/MMMM/g,function(t,e){return new Date(t.getUTCFullYear(),t.getUTCMonth(),1).toLocaleString(e,{month:"long"})}(t,i)).replace(/MMM/g,function(t,e){return new Date(t.getUTCFullYear(),t.getUTCMonth(),1).toLocaleString(e,{month:"short"})}(t,i)).replace(/MM/g,function(t){return Nl(t.getUTCMonth()+1,2)}(t)).replace(/dd/g,function(t){return Nl(t.getUTCDate(),2)}(t));var n}(t,this.ao,this.oo)},t}(),Cc=function(){function t(t){this.fo=t||"%h:%m:%s"}return t.prototype.lo=function(t){return this.fo.replace("%h",Nl(t.getUTCHours(),2)).replace("%m",Nl(t.getUTCMinutes(),2)).replace("%s",Nl(t.getUTCSeconds(),2))},t}(),Mc={co:"yyyy-MM-dd",vo:"%h:%m:%s",_o:" ",do:"default"},kc=function(){function t(t){void 0===t&&(t={});var e=Qa(Qa({},Mc),t);this.wo=new _c(e.co,e.do),this.Mo=new Cc(e.vo),this.bo=e._o}return t.prototype.lo=function(t){return"".concat(this.wo.lo(t)).concat(this.bo).concat(this.Mo.lo(t))},t}(),xc=function(){function t(t,e){void 0===e&&(e=50),this.mo=0,this.po=1,this.yo=1,this.Gs=new Map,this.ko=new Map,this.No=t,this.xo=e}return t.prototype.lo=function(t){var e=void 0===t.Co?new Date(1e3*t.So).getTime():new Date(Date.UTC(t.Co.year,t.Co.month-1,t.Co.day)).getTime(),i=this.Gs.get(e);if(void 0!==i)return i.To;if(this.mo===this.xo){var n=this.ko.get(this.yo);this.ko.delete(this.yo),this.Gs.delete(Ra(n)),this.yo++,this.mo--}var r=this.No(t);return this.Gs.set(e,{To:r,Do:this.po}),this.ko.set(this.po,e),this.mo++,this.po++,r},t}(),Tc=function(){function t(t,e){za(t<=e,"right should be >= left"),this.Ao=t,this.Bo=e}return t.prototype.In=function(){return this.Ao},t.prototype.jn=function(){return this.Bo},t.prototype.Lo=function(){return this.Bo-this.Ao+1}
13,t.prototype.Uh=function(t){return this.Ao<=t&&t<=this.Bo},t.prototype.br=function(t){return this.Ao===t.In()&&this.Bo===t.jn()},t}();function Ec(t,e){return null===t||null===e?t===e:t.br(e)}var Dc,Lc=function(){function t(){this.Eo=new Map,this.Gs=null}return t.prototype.Fo=function(t,e){this.Oo(e),this.Gs=null;for(var i=e;i<t.length;++i){var n=t[i],r=this.Eo.get(n.Vo);void 0===r&&(r=[],this.Eo.set(n.Vo,r)),r.push({vs:i,rt:n.rt,Po:n.Vo})}},t.prototype.Wo=function(t,e){var i=Math.ceil(e/t);return null!==this.Gs&&this.Gs.zo===i||(this.Gs={au:this.Ro(i),zo:i}),this.Gs.au},t.prototype.Oo=function(t){if(0!==t){var e=[];this.Eo.forEach((function(i,n){t<=i[0].vs?e.push(n):i.splice(Kl(i,t,(function(e){return e.vs<t})),1/0)}));for(var i=0,n=e;i<n.length;i++){var r=n[i];this.Eo.delete(r)}}else this.Eo.clear()},t.prototype.Ro=function(t){for(var e=[],i=0,n=Array.from(this.Eo.keys()).sort((function(t,e){return e-t}));i<n.length;i++){var r=n[i];if(this.Eo.get(r)){var o=e;e=[];for(var s=o.length,a=0,l=Ra(this.Eo.get(r)),u=l.length,c=1/0,h=-1/0,f=0;f<u;f++){for(var p=l[f],d=p.vs;a<s;){var v=o[a],m=v.vs;if(!(m<d)){c=m;break}a++,e.push(v),h=m,c=1/0}c-d>=t&&d-h>=t&&(e.push(p),h=d)}for(;a<s;
13a++)e.push(o[a])}}return e},t}(),Oc=function(){function t(t){this.Io=t}return t.prototype.jo=function(){return null===this.Io?null:new Tc(Math.floor(this.Io.In()),Math.ceil(this.Io.jn()))},t.prototype.qo=function(){return this.Io},t.Uo=function(){return new t(null)},t}();!function(t){t[t.Year=0]="Year",t[t.Month=1]="Month",t[t.DayOfMonth=2]="DayOfMonth",t[t.Time=3]="Time",t[t.TimeWithSeconds=4]="TimeWithSeconds"}(Dc||(Dc={}));var Ic,Bc=function(){function t(t,e,i){this.hh=0,this.Ho=null,this.Yo=[],this.zu=null,this.Wu=null,this.$o=new Lc,this.Ko=new Map,this.Xo=Oc.Uo(),this.Zo=!0,this.Jo=new el,this.Go=new el,this.Qo=new el,this.tl=null,this.il=null,this.nl=[],this.zi=e,this.qu=i,this.sl=e.rightOffset,this.hl=e.barSpacing,this.pi=t,this.rl()}return t.prototype.W=function(){return this.zi},t.prototype.el=function(t){il(this.qu,t),this.ul(),this.rl()},t.prototype.Pr=function(t,e){var i;il(this.zi,t),this.zi.fixLeftEdge&&this.al(),this.zi.fixRightEdge&&this.ol(),void 0!==t.barSpacing&&this.pi.gn(t.barSpacing),void 0!==t.rightOffset&&this.pi.yn(t.rightOffset),void 0!==t.minBarSpacing&&this.pi.gn(null!==(i=t.barSpacing)&&void 0!==i?i:this.hl),this.ul(),this.rl(),this.Qo.m()},t.prototype.gi=function(t){var e;return(null===(e=this.Yo[t])||void 0===e?void 0:e.rt)||null},t.prototype.Ze=function(t,e){if(this.Yo.length<1)return null;if(t.So>this.Yo[this.Yo.length-1].rt.So)return e?this.Yo.length-1:null;var i=Kl(this.Yo,t.So,(function(t,e){return t.rt.So<e}));return t.So<this.Yo[i].rt.So?e?i:null:i},t.prototype.wi=function(){return 0===this.hh||0===this.Yo.length||null===this.Ho},t.prototype.ss=function(){return this.ll(),this.Xo.jo()},t.prototype.fl=function(){return this.ll(),this.Xo.qo()},t.prototype.cl=function(){var t=this.ss();if(null===t)return null;var e={from:t.In(),to:t.jn()};return this.vl(e)},t.prototype.vl=function(t){var e=Math.round(t.from),i=Math.round(t.to),n=$a(this._l()),r=$a(this.dl());return{from:$a(this.gi(Math.max(n,e))),to:$a(this.gi(Math.min(r,i)))}},t.prototype.wl=function(t){return{from:$a(this.Ze(t.from,!0)),to:$a(this.Ze(t.to,!0))}},t.prototype.Ht=function(){return this.hh},t.prototype.Ra=function(t){if(isFinite(t)&&!(t<=0)&&this.hh!==t){if(this.zi.lockVisibleTimeRangeOnResize&&this.hh){var e=this.hl*t/this.hh;this.hl=e}if(this.zi.fixLeftEdge){var i=this.ss();if(null!==i&&i.In()<=0){var n=this.hh-t;this.sl-=Math.round(n/this.hl)+1}}this.hh=t,this.Zo=!0,this.Ml(),this.bl()}},t.prototype.At=function(t){if(this.wi()||!rl(t))return 0;var e=this.ml()+this.sl-t;return this.hh-(e+.5)*this.hl-1},t.prototype.es=function(t,e){for(var i=this.ml(),n=void 0===e?0:e.from,r=void 0===e?t.length:e.to,o=n;o<r;o++){var s=t[o].rt,a=i+this.sl-s,l=this.hh-(a+.5)*this.hl-1;t[o].tt=l}},t.prototype.pl=function(t){return Math.ceil(this.gl(t))},t.prototype.yn=function(t){this.Zo=!0,this.sl=t,this.bl(),this.pi.yl(),this.pi.Wr()},t.prototype.ws=function(){return this.hl},t.prototype.gn=function(t){this.kl(t),this.bl(),this.pi.yl(),this.pi.Wr()},t.prototype.Nl=function(){return this.sl},t.prototype.au=function(){if(this.wi())return null;if(null!==this.il)return this.il;for(var t=this.hl,e=5*(this.pi.W().layout.fontSize+4),i=Math.round(e/t),n=$a(this.ss()),r=Math.max(n.In(),n.In()-i),o=Math.max(n.jn(),n.jn()-i),s=this.$o.Wo(t,e),a=this._l()+i,l=this.dl()-i,u=this.xl(),c=this.zi.fixLeftEdge||u,h=this.zi.fixRightEdge||u,f=0,p=0,d=s;p<d.length;p++){var v=d[p];if(r<=v.vs&&v.vs<=o){var m=void 0;f<this.nl.length?((m=this.nl[f]).su=this.At(v.vs),m.yu=this.Cl(v.rt,v.Po),m.Po=v.Po):(m={Sl:!1,su:this.At(v.vs),yu:this.Cl(v.rt,v.Po),Po:v.Po},this.nl.push(m)),this.hl>e/2&&!u?m.Sl=!1:m.Sl=c&&v.vs<=a||h&&v.vs>=l,f++}}return this.nl.length=f,this.il=this.nl,this.nl},t.prototype.Tl=function(){this.Zo=!0,this.gn(this.zi.barSpacing),this.yn(this.zi.rightOffset)},t.prototype.Dl=function(t){this.Zo=!0,this.Ho=t,this.bl(),this.al()},t.prototype.Al=function(t,e){var i=this.gl(t),n=this.ws(),r=n+e*(n/10);this.gn(r),this.zi.rightBarStaysOnScroll||this.yn(this.Nl()+(i-this.gl(t)))},t.prototype.da=function(t){this.zu&&this.pa(),null===this.Wu&&null===this.tl&&(this.wi()||(this.Wu=t,this.Bl()))},t.prototype.wa=function(t){if(null!==this.tl){var e=iu(this.hh-t,0,this.hh),i=iu(this.hh-$a(this.Wu),0,this.hh);0!==e&&0!==i&&this.gn(this.tl.ws*e/i)}},t.prototype.Ma=function(){null!==this.Wu&&(this.Wu=null,this.Ll())},t.prototype.ba=function(t){null===this.zu&&null===this.tl&&(this.wi()||(this.zu=t,this.Bl()))},t.prototype.ma=function(t){if(null!==this.zu){var e=(this.zu-t)/this.ws();this.sl=$a(this.tl).Nl+e,this.Zo=!0,this.bl()}},t.prototype.pa=function(){null!==this.zu&&(this.zu=null,this.Ll())},t.prototype.El=function(){this.Fl(this.zi.rightOffset)},t.prototype.Fl=function(t,e){var i=this;if(void 0===e&&(e=400),!isFinite(t))throw new RangeError("offset is required and must be finite number");if(!isFinite(e)||e<=0)throw new RangeError("animationDuration (optional) must be finite positive number");var n=this.sl,r=performance.now(),o=function(){var s=(performance.now()-r)/e,a=s>
13=1,l=a?t:n+(t-n)*s;i.yn(l),a||setTimeout(o,20)};o()},t.prototype.vt=function(t,e){this.Zo=!0,this.Yo=t,this.$o.Fo(t,e),this.bl()},t.prototype.Ol=function(){return this.Jo},t.prototype.Vl=function(){return this.Go},t.prototype.Pl=function(){return this.Qo},t.prototype.ml=function(){return this.Ho||0},t.prototype.Wl=function(t){var e=t.Lo();this.kl(this.hh/e),this.sl=t.jn()-this.ml(),this.bl(),this.Zo=!0,this.pi.yl(),this.pi.Wr()},t.prototype.zl=function(){var t=this._l(),e=this.dl();null!==t&&null!==e&&this.Wl(new Tc(t,e+this.zi.rightOffset))},t.prototype.Rl=function(t){var e=new Tc(t.from,t.to);this.Wl(e)},t.prototype.yi=function(t){return void 0!==this.qu.timeFormatter?this.qu.timeFormatter(t.Co||t.So):this.Il.lo(new Date(1e3*t.So))},t.prototype.xl=function(){var t=this.pi.W(),e=t.handleScroll,i=t.handleScale;return!(e.horzTouchDrag||e.mouseWheel||e.pressedMouseMove||e.vertTouchDrag||i.axisDoubleClickReset||i.axisPressedMouseMove.time||i.mouseWheel||i.pinch)},t.prototype._l=function(){return 0===this.Yo.length?null:0},t.prototype.dl=function(){return 0===this.Yo.length?null:this.Yo.length-1},t.prototype.jl=function(t){return(this.hh-1-t)/this.hl},t.prototype.gl=function(t){var e=this.jl(t),i=this.ml()+this.sl-e;return Math.round(1e6*i)/1e6},t.prototype.kl=function(t){var e=this.hl;this.hl=t,this.Ml(),e!==this.hl&&(this.Zo=!0,this.ql())},t.prototype.ll=function(){if(this.Zo)if(this.Zo=!1,this.wi())this.Ul(Oc.Uo());else{var t=this.ml(),e=this.hh/this.hl,i=this.sl+t,n=new Tc(i-e+1,i);this.Ul(new Oc(n))}},t.prototype.Ml=function(){var t=this.Hl();if(this.hl<t&&(this.hl=t,this.Zo=!0),0!==this.hh){var e=.5*this.hh;this.hl>e&&(this.hl=e,this.Zo=!0)}},t.prototype.Hl=function(){return this.zi.fixLeftEdge&&this.zi.fixRightEdge&&0!==this.Yo.length?this.hh/this.Yo.length:this.zi.minBarSpacing},t.prototype.bl=function(){var t=this.Yl();this.sl>t&&(this.sl=t,this.Zo=!0);var e=this.$l();null!==e&&this.sl<e&&(this.sl=e,this.Zo=!0)},t.prototype.$l=function(){var t=this._l(),e=this.Ho;return null===t||null===e?null:t-e-1+(this.zi.fixLeftEdge?this.hh/this.hl:Math.min(2,this.Yo.length))},t.prototype.Yl=function(){return this.zi.fixRightEdge?0:this.hh/this.hl-Math.min(2,this.Yo.length)},t.prototype.Bl=function(){this.tl={ws:this.ws(),Nl:this.Nl()}},t.prototype.Ll=function(){this.tl=null},t.prototype.Cl=function(t,e){var i=this,n=this.Ko.get(e);return void 0===n&&(n=new xc((function(t){return i.Kl(t,e)})),this.Ko.set(e,n)),n.lo(t)},t.prototype.Kl=function(t,e){var i,n=function(t,e,i){switch(t){case 0:case 10:return e?i?4:3:2;case 20:case 21:case 22:case 30:case 31:case 32:case 33:return e?3:2;case 50:return 2;case 60:return 1;case 70:return 0}}(e,this.zi.timeVisible,this.zi.secondsVisible);return void 0!==this.zi.tickMarkFormatter?this.zi.tickMarkFormatter(null!==(i=t.Co)&&void 0!==i?i:t.So,n,this.qu.locale):function(t,e,i){var n={};switch(e){case 0:n.year="numeric";break;case 1:n.month="short";break;case 2:n.day="numeric";break;case 3:n.hour12=!1,n.hour="2-digit",n.minute="2-digit";break;case 4:n.hour12=!1,n.hour="2-digit",n.minute="2-digit",n.second="2-digit"}var r=void 0===t.Co?new Date(1e3*t.So):new Date(Date.UTC(t.Co.year,t.Co.month-1,t.Co.day));return new Date(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()).toLocaleString(i,n)}(t,n,this.qu.locale)},t.prototype.Ul=function(t){var e=this.Xo;this.Xo=t,Ec(e.jo(),this.Xo.jo())||this.Jo.m(),Ec(e.qo(),this.Xo.qo())||this.Go.m(),this.ql()},t.prototype.ql=function(){this.il=null},t.prototype.ul=function(){this.ql(),this.Ko.clear()},t.prototype.rl=function(){var t=this.qu.dateFormat;this.zi.timeVisible?this.Il=new kc({co:t,vo:this.zi.secondsVisible?"%h:%m:%s":"%h:%m",_o:"   ",do:this.qu.locale}):this.Il=new _c(t,this.qu.locale)},t.prototype.al=function(){if(this.zi.fixLeftEdge){var t=this._l();if(null!==t){var e=this.ss();if(null!==e){var i=e.In()-t;if(i<0){var n=this.sl-i-1;this.yn(n)}this.Ml()}}}},t.prototype.ol=function(){this.bl(),this.Ml()},t}(),Pc=function(t){function e(e){var i=t.call(this)||this;return i.Xl=new Map,i.Bt=e,i}return Ja(e,t),e.prototype.Y=function(t){},e.prototype.K=function(t){if(this.Bt.yt){t.save();for(var e=0,i=0,n=this.Bt.Zl;i<n.length;i++)if(0!==(l=n[i]).Gt.length){t.font=l.T;var r=this.Jl(t,l.Gt);r>this.Bt.Ht?l.Al=this.Bt.Ht/r:l.Al=1,e+=l.Gl*l.Al}var o=0;switch(this.Bt.Ql){case"top":o=0;break;case"center":o=Math.max((this.Bt.Yt-e)/2,0);break;case"bottom":o=Math.max(this.Bt.Yt-e,0)}t.fillStyle=this.Bt.A;for(var s=0,a=this.Bt.Zl;s<a.length;s++){var l=a[s];t.save();var u=0;switch(this.Bt.tf){case"left":t.textAlign="left",u=l.Gl/2;break;case"center":t.textAlign="center",u=this.Bt.Ht/2;break;case"right":t.textAlign="right",u=this.Bt.Ht-1-l.Gl/2}t.translate(u,o),t.textBaseline="top",t.font=l.T,t.scale(l.Al,l.Al),t.fillText(l.Gt,0,l.if),t.restore(
13),o+=l.Gl*l.Al}t.restore()}},e.prototype.Jl=function(t,e){var i=this.nf(t.font),n=i.get(e);return void 0===n&&(n=t.measureText(e).width,i.set(e,n)),n},e.prototype.nf=function(t){var e=this.Xl.get(t);return void 0===e&&(e=new Map,this.Xl.set(t,e)),e},e}(dl),Ac=function(){function t(t){this.ft=!0,this.Wt={yt:!1,A:"",Yt:0,Ht:0,Zl:[],Ql:"center",tf:"center"},this.zt=new Pc(this.Wt),this.Rt=t}return t.prototype.vt=function(){this.ft=!0},t.prototype.dt=function(t,e){return this.ft&&(this.wt(t,e),this.ft=!1),this.zt},t.prototype.wt=function(t,e){var i=this.Rt.W(),n=this.Wt;n.yt=i.visible,n.yt&&(n.A=i.color,n.Ht=e,n.Yt=t,n.tf=i.horzAlign,n.Ql=i.vertAlign,n.Zl=[{Gt:i.text,T:hl(i.fontSize,i.fontFamily,i.fontStyle),Gl:1.2*i.fontSize,if:0,Al:0}])},t}(),Nc=function(t){function e(e,i){var n=t.call(this)||this;return n.zi=i,n.Hi=new Ac(n),n}return Ja(e,t),e.prototype.nn=function(){return[]},e.prototype.tn=function(){return[this.Hi]},e.prototype.W=function(){return this.zi},e.prototype.hn=function(){this.Hi.vt()},e}(Il);!function(t){t[t.OnTouchEnd=0]="OnTouchEnd",t[t.OnNextTap=1]="OnNextTap"}(Ic||(Ic={}));var Fc,zc,Rc,$c=function(){function t(t,e){this.sf=[],this.hf=[],this.hh=0,this.rf=null,this.ef=null,this.uf=new el,this.af=new el,this.lf=null,this.ff=t,this.zi=e,this.cf=new fl(this),this.Da=new Bc(this,e.timeScale,this.zi.localization),this.ct=new Bl(this,e.crosshair),this.vf=new Qu(e.crosshair),this._f=new Nc(this,e.watermark),this.df(),this.sf[0].za(2e3),this.wf=this.Mf(0),this.bf=this.Mf(1)}return t.prototype.Ce=function(){this.mf(new Al(3))},t.prototype.Wr=function(){this.mf(new Al(2))},t.prototype.We=function(){this.mf(new Al(1))},t.prototype.Se=function(t){var e=this.pf(t);this.mf(e)},t.prototype.gf=function(){return this.ef},t.prototype.yf=function(t){var e=this.ef;this.ef=t,null!==e&&this.Se(e.kf),null!==t&&this.Se(t.kf)},t.prototype.W=function(){return this.zi},t.prototype.Pr=function(t){il(this.zi,t),this.sf.forEach((function(e){return e.Oa(t)})),void 0!==t.timeScale&&this.Da.Pr(t.timeScale),void 0!==t.localization&&this.Da.el(t.localization),(t.leftPriceScale||t.rightPriceScale)&&this.uf.m(),this.wf=this.Mf(0),this.bf=this.Mf(1),this.Ce()},t.prototype.Nf=function(t,e){if("left"!==t)if("right"!==t){var i=this.xf(t);null!==i&&(i.Ct.Pr(e),this.uf.m())}else this.Pr({rightPriceScale:e});else this.Pr({leftPriceScale:e})},t.prototype.xf=function(t){for(var e=0,i=this.sf;e<i.length;e++){var n=i[e],r=n.Va(t);if(null!==r)return{It:n,Ct:r}}return null},t.prototype.bt=function(){return this.Da},t.prototype.Cf=function(){return this.sf},t.prototype.Sf=function(){return this._f},t.prototype.Tf=function(){return this.ct},t.prototype.Df=function(){return this.af},t.prototype.Af=function(t,e){t.ia(e),this.yl()},t.prototype.Ra=function(t){this.hh=t,this.Da.Ra(this.hh),this.sf.forEach((function(e){return e.Ra(t)})),this.yl()},t.prototype.df=function(t){var e=new wc(this.Da,this);void 0!==t?this.sf.splice(t,0,e):this.sf.push(e);var i=void 0===t?this.sf.length-1:t,n=new Al(3);return n.cn(i,{vn:0,_n:!0}),this.mf(n),e},t.prototype.Ka=function(t,e,i){t.Ka(e,i)},t.prototype.Xa=function(t,e,i){t.Xa(e,i),this.Te(),this.mf(this.Bf(t,2))},t.prototype.Za=function(t,e){t.Za(e),this.mf(this.Bf(t,2))},t.prototype.Ja=function(t,e,i){e.Xu()||t.Ja(e,i)},t.prototype.Ga=function(t,e,i){e.Xu()||(t.Ga(e,i),this.Te(),this.mf(this.Bf(t,2)))},t.prototype.Qa=function(t,e){e.Xu()||(t.Qa(e),this.mf(this.Bf(t,2)))},t.prototype.no=function(t,e){t.no(e),this.mf(this.Bf(t,2))},t.prototype.Lf=function(t){this.Da.da(t)},t.prototype.Ef=function(t,e){var i=this.bt();if(!i.wi()&&0!==e){var n=i.Ht();t=Math.max(1,Math.min(t,n)),i.Al(t,e),this.yl()}},t.prototype.Ff=function(t){this.Of(0),this.Vf(t),this.Pf()},t.prototype.Wf=function(t){this.Da.wa(t),this.yl()},t.prototype.zf=function(){this.Da.Ma(),this.Wr()},t.prototype.Of=function(t){this.rf=t,this.Da.ba(t)},t.prototype.Vf=function(t){var e=!1;return null!==this.rf&&Math.abs(t-this.rf)>20&&(this.rf=null,e=!0),this.Da.ma(t),this.yl(),e},t.prototype.Pf=function(){this.Da.pa(),this.Wr(),this.rf=null},t.prototype._t=function(){return this.hf}
13,t.prototype.Rf=function(t,e,i){this.ct.Yi(t,e);var n=NaN,r=this.Da.pl(t),o=this.Da.ss();null!==o&&(r=Math.min(Math.max(o.In(),r),o.jn()));var s=i.ji(),a=s.kt();null!==a&&(n=s.qi(e,a)),n=this.vf.Je(n,r,i),this.ct.Zi(r,n,i),this.We(),this.af.m(this.ct.Mt(),{x:t,y:e})},t.prototype.If=function(){this.Tf().Gi(),this.We(),this.af.m(null,null)},t.prototype.Te=function(){var t=this.ct.It();if(null!==t){var e=this.ct.Ki(),i=this.ct.Xi();this.Rf(e,i,t)}this.ct.hn()},t.prototype.jf=function(t,e,i){var n=this.Da.gi(0);void 0!==e&&void 0!==i&&this.Da.vt(e,i);var r=this.Da.gi(0),o=this.Da.ml(),s=this.Da.ss();if(null!==s&&null!==n&&null!==r){var a=s.Uh(o),l=n.So>r.So,u=null!==t&&t>o&&!l,c=a&&this.Da.W().shiftVisibleRangeOnNewBar;if(u&&!c){var h=t-o;this.Da.yn(this.Da.Nl()-h)}}this.Da.Dl(t)},t.prototype.Be=function(t){null!==t&&t.ho()},t.prototype.oh=function(t){var e=this.sf.find((function(e){return e.oa().includes(t)}));return void 0===e?null:e},t.prototype.yl=function(){this._f.hn(),this.sf.forEach((function(t){return t.ho()})),this.Te()},t.prototype.g=function(){this.sf.forEach((function(t){return t.g()})),this.sf.length=0,this.zi.localization.priceFormatter=void 0,this.zi.localization.timeFormatter=void 0},t.prototype.qf=function(){return this.cf},t.prototype.dh=function(){return this.cf.W()},t.prototype.Pa=function(){return this.uf},t.prototype.Uf=function(t,e){var i=this.sf[0],n=this.Hf(e,t,i);return this.hf.push(n),1===this.hf.length?this.Ce():this.Wr(),n},t.prototype.Yf=function(t){var e=this.oh(t),i=this.hf.indexOf(t);za(-1!==i,"Series not found"),this.hf.splice(i,1),$a(e).ca(t),t.g&&t.g()},t.prototype.xe=function(t,e){var i=$a(this.oh(t));i.ca(t);var n=this.xf(e);if(null===n){var r=t.xi();i.la(t,e,r)}else r=n.It===i?t.xi():void 0,n.It.la(t,e,r)},t.prototype.zl=function(){var t=new Al(2);t.Mn(),this.mf(t)},t.prototype.$f=function(t){var e=new Al(2);e.mn(t),this.mf(e)},t.prototype.pn=function(){var t=new Al(2);t.pn(),this.mf(t)},t.prototype.gn=function(t){var e=new Al(2);e.gn(t),this.mf(e)},t.prototype.yn=function(t){var e=new Al(2);e.yn(t),this.mf(e)},t.prototype.Kf=function(){return this.zi.rightPriceScale.visible?"right":"left"},t.prototype.Xf=function(){return this.bf},t.prototype.Zf=function(){return this.wf},t.prototype.Dt=function(t){var e=this.bf,i=this.wf;if(e===i)return e;if(t=Math.max(0,Math.min(100,Math.round(100*t))),null===this.lf||this.lf.Pn!==i||this.lf.Wn!==e)this.lf={Pn:i,Wn:e,Jf:new Map};else{var n=this.lf.Jf.get(t);if(void 0!==n)return n}var r,o,s,a,l,u,c,h,f,p,d,v,m,y=(r=e,o=t/100,s=Xa(i),a=s[0],l=s[1],u=s[2],c=s[3],h=Xa(r),f=h[0],p=h[1],d=h[2],v=h[3],m=[Wa(a+o*(f-a)),Wa(l+o*(p-l)),Wa(u+o*(d-u)),Ha(c+o*(v-c))],"rgba(".concat(m[0],", ").concat(m[1],", ").concat(m[2],", ").concat(m[3],")"));return this.lf.Jf.set(t,y),y},t.prototype.Bf=function(t,e){var i=new Al(e);if(null!==t){var n=this.sf.indexOf(t);i.cn(n,{vn:e})}return i},t.prototype.pf=function(t,e){return void 0===e&&(e=2),this.Bf(this.oh(t),e)},t.prototype.mf=function(t){this.ff&&this.ff(t),this.sf.forEach((function(t){return t.eo().ou().vt()}))},t.prototype.Hf=function(t,e,i){var n=new Ju(this,t,e),r=void 0!==t.priceScaleId?t.priceScaleId:this.Kf();return i.la(n,r),Pl(r)||n.Pr(t),n},t.prototype.Mf=function(t){var e=this.zi.layout;return"gradient"===e.background.type?0===t?e.background.topColor:e.background.bottomColor:e.background.color},t}();function jc(t){void 0!==t.borderColor&&(t.borderUpColor=t.borderColor,t.borderDownColor=t.borderColor),void 0!==t.wickColor&&(t.wickUpColor=t.wickColor,t.wickDownColor=t.wickColor)}function Vc(t){return!nl(t)&&!ol(t)}function Wc(t){return nl(t)}!function(t){t[t.Disabled=0]="Disabled",t[t.Continuous=1]="Continuous",t[t.OnDataUpdate=2]="OnDataUpdate"}(Fc||(Fc={})),function(t){t[t.LastBar=0]="LastBar",t[t.LastVisible=1]="LastVisible"}(zc||(zc={})),function(t){t.Solid="solid",t.VerticalGradient="gradient"}(Rc||(Rc={}));var Hc=function(){function t(t,e){this.Ft=t,this.Ot=e}return t.prototype.br=function(t){return this.Ft===t.Ft&&this.Ot===t.Ot},t}();function Kc(t){return t.ownerDocument&&t.ownerDocument.defaultView&&t.ownerDocument.defaultView.devicePixelRatio||1}function Gc(t){var e=$a(t.getContext("2d"));return e.setTransform(1,0,0,1,0,0),e}function Yc(t,e){var i=t.createElement("canvas"),n=Kc(i);return i.style.width="".concat(e.Ft,"px"),i.style.height="".concat(e.Ot,"px"),i.width=e.Ft*n,i.height=e.Ot*n,i}function Uc(t,e){var i=$a(t.ownerDocument).createElement("canvas");t.appendChild(i);var n,r=(void 0===(n={allowDownsampling:!1})&&(n=Oa),new Aa(i,n));return r.resizeCanvas({width:e.Ft,height:e.Ot}),r}function Xc(t,e){return t.Gf-e.Gf}function qc(t,e,i){var n=(t.Gf-e.Gf)/(t.rt-e.rt);return Math.sign(n)*Math.min(Math.abs(n),i)}var Zc=function(){function t(t,e,i,n){this.Qf=null,this.tc=null,this.ic=null,this.nc=null,this.sc=null,this.hc=0,this.rc=0,this.ec=!1,this.uc=t,this.ac=e,this.oc=i,this.Cn=n}return t.prototype.lc=function(t,e){if(null!==this.Qf){if(this.Qf.rt===e)return void(this.Qf.Gf=t);if(Math.abs(this.Qf.Gf-t)<this.Cn)return}this.nc=this.ic,this.ic=this.tc,this.tc=this.Qf,this.Qf={rt:e,Gf:t}},t.prototype.xh=function(t,e){if(null!==this.Qf&&null!==this.tc&&!(e-this.Qf.rt>50)){var i=0,n=qc(this.Qf,this.tc,this.ac),r=Xc(this.Qf,this.tc),o=[n],s=[r];if(i+=r,null!==this.ic){var a=qc(this.tc,this.ic,this.ac);if(Math.sign(a)===Math.sign(n)){var l=Xc(this.tc,this.ic);if(o.push(a),s.push(l),i+=l,null!==this.nc){var u=qc(this.ic,this.nc,this.ac);if(Math.sign(u)===Math.sign(n)){var c=Xc(this.ic,this.nc);o.push(u),s.push(c),i+=c}}}}for(var h,f,p,d=0,v=0;v<o.length;++v)d+=s[v]/i*o[v];Math.abs(d)<this.uc||(this.sc={Gf:t,rt:e},this.rc=d,this.hc=(h=Math.abs(d),f=this.oc,p=Math.log(f),Math.log(1*p/-h)/p))}},t.prototype.fc=function(t){var e=$a(this.sc),i=t-e.rt;return e.Gf+this.rc*(Math.pow(this.oc,i)-1)/Math.log(this.oc)},t.prototype.cc=function(t){return null===this.sc||this.vc(t)===this.hc},t.prototype._c=function(){return this.ec},t.prototype.dc=function(){this.ec=!0},t.prototype.vc=function(t){var e=t-$a(this.sc).rt;return Math.min(e,this.hc)},t}(),Jc="undefined"!=typeof window;function Qc(){return!!Jc&&window.navigator.userAgent.toLowerCase().indexOf("firefox")>-1}function th(){return!!Jc&&/iPhone|iPad|iPod/.test(window.navigator.platform)}var eh=function(){function t(t,e,i){var n=this;this.wc=0,this.Mc=null,this.bc={tt:Number.NEGATIVE_INFINITY,it:Number.POSITIVE_INFINITY},this.mc=0,this.gc=null,this.yc={tt:Number.NEGATIVE_INFINITY,it:Number.POSITIVE_INFINITY},this.kc=null,this.Nc=!1,this.xc=null,this.Cc=null,this.Sc=!1,this.Tc=!1,this.Dc=!1,this.Ac=null,this.Bc=null,this.Lc=null,this.Ec=null,this.Fc=null,this.Oc=null,this.Vc=null,this.Pc=0,this.Wc=!1,this.zc=!1,this.Rc=!1,this.Ic=0,this.jc=null,this.qc=!th(),this.Uc=function(t){n.Hc(t)},this.Yc=function(t){if(n.$c(t)){var e=n.Kc(t);++n.mc,n.gc&&n.mc>1&&(n.Zc(rh(t),n.yc).Xc<30&&!n.Dc&&n.Jc(e,n.Qc.Gc),n.tv())}else e=n.Kc(t),++n.wc,n.Mc&&n.wc>1&&(n.Zc(rh(t),n.bc).Xc<5&&!n.Tc&&n.iv(e,n.Qc.nv),n.sv())},this.hv=t,this.Qc=e,this.zi=i,this.rv()}return t.prototype.g=function(){null!==this.Ac&&(this.Ac(),this.Ac=null),null!==this.Bc&&(this.Bc(),this.Bc=null),null!==this.Ec&&(this.Ec(),this.Ec=null),null!==this.Fc&&(this.Fc(),this.Fc=null),null!==this.Oc&&(this.Oc(),this.Oc=null),null!==this.Lc&&(this.Lc(),this.Lc=null),this.ev(),this.sv()},t.prototype.uv=function(t){var e=this;this.Ec&&this.Ec();var i=this.av.bind(this);if(this.Ec=function(){e.hv.removeEventListener("mousemove",i)},this.hv.addEventListener("mousemove",i),!this.$c(t)){var n=this.Kc(t);this.iv(n,this.Qc.ov),this.qc=!0}},t.prototype.sv=function(){null!==this.Mc&&clearTimeout(this.Mc),this.wc=0,this.Mc=null,this.bc={tt:Number.NEGATIVE_INFINITY,it:Number.POSITIVE_INFINITY}},t.prototype.tv=function(){null!==this.gc&&clearTimeout(this.gc),this.mc=0,this.gc=null,this.yc={tt:Number.NEGATIVE_INFINITY,it:Number.POSITIVE_INFINITY}},t.prototype.av=function(t){if(!this.Rc&&null===this.Cc&&!this.$c(t)){var e=this.Kc(t);this.iv(e,this.Qc.lv),this.qc=!0}},t.prototype.fv=function(t){var e=sh(t.changedTouches,$a(this.jc));if(null!==e&&(this.Ic=oh(t),null===this.Vc&&!this.zc)){this.Wc=!0;var i=this.Zc(rh(e),$a(this.Cc)),n=i.cv,r=i.vv,o=i.Xc;if(this.Sc||!(o<5)){if(!this.Sc){var s=.5*n,a=r>=s&&!this.zi._v(),l=s>r&&!this.zi.dv();a||l||(this.zc=!0),this.Sc=!0,this.Dc=!0,this.ev(),this.tv()}if(!this.zc){var u=this.Kc(t,e);this.Jc(u,this.Qc.wv),nh(t)}}}},t.prototype.Mv=function(t){if(0===t.button&&(this.Zc(rh(t),$a(this.xc)).Xc>=5&&(this.Tc=!0,this.sv()),this.Tc)){var e=this.Kc(t);this.iv(e,this.Qc.bv)}},t.prototype.Zc=function(t,e){var i=Math.abs(e.tt-t.tt),n=Math.abs(e.it-t.it);return{cv:i,vv:n,Xc:i+n}},t.prototype.mv=function(t){var e=sh(t.changedTouches,$a(this.jc));if(null===e&&0===t.touches.length&&(e=t.changedTouches[0]),null!==e){this.jc=null,this.Ic=oh(t),this.ev(),this.Cc=null,this.Oc&&(this.Oc(),this.Oc=null);var i=this.Kc(t,e);this.Jc(i,this.Qc.pv),++this.mc,this.gc&&this.mc>1?(this.Zc(rh(e),this.yc).Xc<30&&!this.Dc&&this.Jc(i,this.Qc.Gc),this.tv()):this.Dc||(this.Jc(i,this.Qc.gv),this.Qc.gv&&nh(t)),0===this.mc&&nh(t),0===t.touches.length&&this.Nc&&(this.Nc=!1,nh(t))}},t.prototype.Hc=function(t){if(0===t.button){var e=this.Kc(t);this.xc=null,this.Rc=!1,this.Fc&&(this.Fc(),this.Fc=null),Qc()&&this.hv.ownerDocument.documentElement.removeEventListener("mouseleave",this.Uc),this.$c(t)||(this.iv(e,this.Qc.yv),++this.wc,this.Mc&&this.wc>1?(this.Zc(rh(t),this.bc).Xc<5&&!this.Tc&&this.iv(e,this.Qc.nv),this.sv()):this.Tc||this.iv(e,this.Qc.kv))}},t.prototype.ev=function(){null!==this.kc&&(clearTimeout(this.kc),this.kc=null)},t.prototype.Nv=function(t){if(null===this.jc){var e=t.changedTouches[0];this.jc=e.identifier,this.Ic=oh(t);var i=this.hv.ownerDocument.documentElement;this.Dc=!1,this.Sc=!1,this.zc=!1,this.Cc=rh(e),this.Oc&&(this.Oc(),this.Oc=null);var n=this.fv.bind(this),r=this.mv.bind(this);this.Oc=function(){i.removeEventListener("touchmove",n),i.removeEventListener("touchend",r)},i.addEventListener("touchmove",n,{passive:!1}),i.addEventListener("touchend",r,{passive:!1}
13),this.ev(),this.kc=setTimeout(this.xv.bind(this,t),240);var o=this.Kc(t,e);this.Jc(o,this.Qc.Cv),this.gc||(this.mc=0,this.gc=setTimeout(this.tv.bind(this),500),this.yc=rh(e))}},t.prototype.Sv=function(t){if(0===t.button){var e=this.hv.ownerDocument.documentElement;Qc()&&e.addEventListener("mouseleave",this.Uc),this.Tc=!1,this.xc=rh(t),this.Fc&&(this.Fc(),this.Fc=null);var i=this.Mv.bind(this),n=this.Hc.bind(this);if(this.Fc=function(){e.removeEventListener("mousemove",i),e.removeEventListener("mouseup",n)},e.addEventListener("mousemove",i),e.addEventListener("mouseup",n),this.Rc=!0,!this.$c(t)){var r=this.Kc(t);this.iv(r,this.Qc.Tv),this.Mc||(this.wc=0,this.Mc=setTimeout(this.sv.bind(this),500),this.bc=rh(t))}}},t.prototype.rv=function(){var t=this;this.hv.addEventListener("mouseenter",this.uv.bind(this)),this.hv.addEventListener("touchcancel",this.ev.bind(this));var e=this.hv.ownerDocument,i=function(e){t.Qc.Dv&&(e.target&&t.hv.contains(e.target)||t.Qc.Dv())};this.Bc=function(){e.removeEventListener("touchstart",i)},this.Ac=function(){e.removeEventListener("mousedown",i)},e.addEventListener("mousedown",i),e.addEventListener("touchstart",i,{passive:!0}),th()&&(this.Lc=function(){t.hv.removeEventListener("dblclick",t.Yc)},this.hv.addEventListener("dblclick",this.Yc)),this.hv.addEventListener("mouseleave",this.Av.bind(this)),this.hv.addEventListener("touchstart",this.Nv.bind(this),{passive:!0}),function(t){Jc&&void 0!==window.chrome&&t.addEventListener("mousedown",(function(t){if(1===t.button)return t.preventDefault(),!1}))}(this.hv),this.hv.addEventListener("mousedown",this.Sv.bind(this)),this.Bv(),this.hv.addEventListener("touchmove",(function(){}),{passive:!1})},t.prototype.Bv=function(){var t=this;void 0===this.Qc.Lv&&void 0===this.Qc.Ev&&void 0===this.Qc.Fv||(this.hv.addEventListener("touchstart",(function(e){return t.Ov(e.touches)}),{passive:!0}),this.hv.addEventListener("touchmove",(function(e){if(2===e.touches.length&&null!==t.Vc&&void 0!==t.Qc.Ev){var i=ih(e.touches[0],e.touches[1])/t.Pc;t.Qc.Ev(t.Vc,i),nh(e)}}),{passive:!1}),this.hv.addEventListener("touchend",(function(e){t.Ov(e.touches)})))},t.prototype.Ov=function(t){1===t.length&&(this.Wc=!1),2!==t.length||this.Wc||this.Nc?this.Vv():this.Pv(t)},t.prototype.Pv=function(t){var e=this.hv.getBoundingClientRect()||{left:0,top:0};this.Vc={tt:(t[0].clientX-e.left+(t[1].clientX-e.left))/2,it:(t[0].clientY-e.top+(t[1].clientY-e.top))/2},this.Pc=ih(t[0],t[1]),void 0!==this.Qc.Lv&&this.Qc.Lv(),this.ev()},t.prototype.Vv=function(){null!==this.Vc&&(this.Vc=null,void 0!==this.Qc.Fv&&this.Qc.Fv())},t.prototype.Av=function(t){if(this.Ec&&this.Ec(),!this.$c(t)&&this.qc){var e=this.Kc(t);this.iv(e,this.Qc.Wv),this.qc=!th()}},t.prototype.xv=function(t){var e=sh(t.touches,$a(this.jc));if(null!==e){var i=this.Kc(t,e);this.Jc(i,this.Qc.zv),this.Dc=!0,this.Nc=!0}},t.prototype.$c=function(t){return t.sourceCapabilities&&void 0!==t.sourceCapabilities.firesTouchEvents?t.sourceCapabilities.firesTouchEvents:oh(t)<this.Ic+500},t.prototype.Jc=function(t,e){e&&e.call(this.Qc,t)},t.prototype.iv=function(t,e){e&&e.call(this.Qc,t)},t.prototype.Kc=function(t,e){var i=e||t,n=this.hv.getBoundingClientRect()||{left:0,top:0};return{Rv:i.clientX,Iv:i.clientY,jv:i.pageX,qv:i.pageY,Uv:i.screenX,Hv:i.screenY,Yv:i.clientX-n.left,$v:i.clientY-n.top,Kv:t.ctrlKey,Xv:t.altKey,Zv:t.shiftKey,Jv:t.metaKey,Gv:!t.type.startsWith("mouse")&&"contextmenu"!==t.type&&"click"!==t.type,Qv:t.type,t_:i.target,i_:t.view,n_:function(){"touchstart"!==t.type&&nh(t)}}},t}();function ih(t,e){var i=t.clientX-e.clientX,n=t.clientY-e.clientY;return Math.sqrt(i*i+n*n)}function nh(t){t.cancelable&&t.preventDefault()}function rh(t){return{tt:t.pageX,it:t.pageY}}function oh(t){return t.timeStamp||performance.now()}function sh(t,e){for(var i=0;i<t.length;++i)if(t[i].identifier===e)return t[i];return null}var ah=function(){function t(t,e,i,n){this.rh=new gu(200),this.R=0,this.s_="",this.Yh="",this.th=[],this.h_=new Map,this.R=t,this.s_=e,this.Yh=hl(t,i,n)}return t.prototype.g=function(){this.rh.ih(),this.th=[],this.h_.clear()}
13,t.prototype.r_=function(t,e,i,n,r){var o=this.e_(t,e);if("left"!==r){var s=Kc(t.canvas);i-=Math.floor(o.u_*s)}n-=Math.floor(o.Yt/2),t.drawImage(o.a_,i,n,o.Ht,o.Yt)},t.prototype.e_=function(t,e){var i,n=this;if(this.h_.has(e))i=Ra(this.h_.get(e));else{if(this.th.length>=200){var r=Ra(this.th.shift());this.h_.delete(r)}var o=Kc(t.canvas),s=Math.ceil(this.R/4.5),a=Math.round(this.R/10),l=Math.ceil(this.rh.Qt(t,e)),u=ou(Math.round(l+2*s)),c=ou(this.R+2*s),h=Yc(document,new Hc(u,c));i={Gt:e,u_:Math.round(Math.max(1,l)),Ht:Math.ceil(u*o),Yt:Math.ceil(c*o),a_:h},0!==l&&(this.th.push(i.Gt),this.h_.set(i.Gt,i)),_l(t=Gc(i.a_),o,(function(){t.font=n.Yh,t.fillStyle=n.s_,t.fillText(e,0,c-s-a)}))}return i},t}(),lh=function(){function t(t,e,i,n){var r=this;this._i=null,this.o_=null,this.l_=!1,this.f_=new gu(50),this.c_=new ah(11,"#000"),this.s_=null,this.Yh=null,this.v_=0,this.__=!1,this.d_=function(){r.w_(r.cf.W()),r.__||r.Di.M_().jt().Wr()},this.b_=function(){r.__||r.Di.M_().jt().Wr()},this.Di=t,this.zi=e,this.cf=i,this.m_="left"===n,this.p_=document.createElement("div"),this.p_.style.height="100%",this.p_.style.overflow="hidden",this.p_.style.width="25px",this.p_.style.left="0",this.p_.style.position="relative",this.g_=Uc(this.p_,new Hc(16,16)),this.g_.subscribeCanvasConfigured(this.d_);var o=this.g_.canvas;o.style.position="absolute",o.style.zIndex="1",o.style.left="0",o.style.top="0",this.y_=Uc(this.p_,new Hc(16,16)),this.y_.subscribeCanvasConfigured(this.b_);var s=this.y_.canvas;s.style.position="absolute",s.style.zIndex="2",s.style.left="0",s.style.top="0";var a={Tv:this.k_.bind(this),Cv:this.k_.bind(this),bv:this.N_.bind(this),wv:this.N_.bind(this),Dv:this.x_.bind(this),yv:this.C_.bind(this),pv:this.C_.bind(this),nv:this.S_.bind(this),Gc:this.S_.bind(this),ov:this.T_.bind(this),Wv:this.D_.bind(this)};this.A_=new eh(this.y_.canvas,a,{_v:function(){return!1},dv:function(){return!0}})}return t.prototype.g=function(){this.A_.g(),this.y_.unsubscribeCanvasConfigured(this.b_),this.y_.destroy(),this.g_.unsubscribeCanvasConfigured(this.d_),this.g_.destroy(),null!==this._i&&this._i._a().M(this),this._i=null,this.c_.g()},t.prototype.B_=function(){return this.p_},t.prototype.ht=function(){return $a(this._i).W().borderColor},t.prototype.L_=function(){return this.zi.textColor},t.prototype.S=function(){return this.zi.fontSize},t.prototype.E_=function(){return hl(this.S(),this.zi.fontFamily)},t.prototype.F_=function(){var t=this.cf.W(),e=this.s_!==t.A,i=this.Yh!==t.T;return(e||i)&&(this.w_(t),this.s_=t.A),i&&(this.f_.ih(),this.Yh=t.T),t},t.prototype.O_=function(){if(null===this._i)return 0;var t=0,e=this.F_(),i=Gc(this.g_.canvas),n=this._i.au();i.font=this.E_(),n.length>0&&(t=Math.max(this.f_.Qt(i,n[0].yu),this.f_.Qt(i,n[n.length-1].yu)));for(var r=this.V_(),o=r.length;o--;){var s=this.f_.Qt(i,r[o].Gt());s>t&&(t=s)}var a=this._i.kt();if(null!==a&&null!==this.o_){var l=this._i.qi(1,a),u=this._i.qi(this.o_.Ot-2,a);t=Math.max(t,this.f_.Qt(i,this._i.Mi(Math.floor(Math.min(l,u))+.11111111111111,a)),this.f_.Qt(i,this._i.Mi(Math.ceil(Math.max(l,u))-.11111111111111,a)))}var c=t||34,h=Math.ceil(e.N+e.C+e.L+e.F+c);return h+h%2},t.prototype.P_=function(t){if(t.Ft<0||t.Ot<0)throw new Error("Try to set invalid size to PriceAxisWidget "+JSON.stringify(t));null!==this.o_&&this.o_.br(t)||(this.o_=t,this.__=!0,this.g_.resizeCanvas({width:t.Ft,height:t.Ot}),this.y_.resizeCanvas({width:t.Ft,height:t.Ot}),this.__=!1,this.p_.style.width=t.Ft+"px",this.p_.style.height=t.Ot+"px",this.p_.style.minWidth=t.Ft+"px")},t.prototype.W_=function(){return $a(this.o_).Ft},t.prototype.Si=function(t){this._i!==t&&(null!==this._i&&this._i._a().M(this),this._i=t,t._a().u(this.Eu.bind(this),this))},t.prototype.Ct=function(){return this._i},t.prototype.ih=function(){var t=this.Di.z_();this.Di.M_().jt().no(t,$a(this.Ct()))},t.prototype.R_=function(t){if(null!==this.o_){if(1!==t){var e=Gc(this.g_.canvas);this.I_(),this.j_(e,this.g_.pixelRatio),this.Rs(e,this.g_.pixelRatio),this.q_(e,this.g_.pixelRatio),this.U_(e,this.g_.pixelRatio)}var i=Gc(this.y_.canvas),n=this.o_.Ft,r=this.o_.Ot;_l(i,this.y_.pixelRatio,(function(){i.clearRect(0,0,n,r)})),this.H_(i,this.y_.pixelRatio)}},t.prototype.Y_=function(){return this.g_.canvas},t.prototype.vt=function(){var t;null===(t=this._i)||void 0===t||t.au()},t.prototype.k_=function(t){if(null!==this._i&&!this._i.wi()&&this.Di.M_().W().handleScale.axisPressedMouseMove.price){var e=this.Di.M_().jt
13(),i=this.Di.z_();this.l_=!0,e.Ka(i,this._i,t.$v)}},t.prototype.N_=function(t){if(null!==this._i&&this.Di.M_().W().handleScale.axisPressedMouseMove.price){var e=this.Di.M_().jt(),i=this.Di.z_(),n=this._i;e.Xa(i,n,t.$v)}},t.prototype.x_=function(){if(null!==this._i&&this.Di.M_().W().handleScale.axisPressedMouseMove.price){var t=this.Di.M_().jt(),e=this.Di.z_(),i=this._i;this.l_&&(this.l_=!1,t.Za(e,i))}},t.prototype.C_=function(t){if(null!==this._i&&this.Di.M_().W().handleScale.axisPressedMouseMove.price){var e=this.Di.M_().jt(),i=this.Di.z_();this.l_=!1,e.Za(i,this._i)}},t.prototype.S_=function(t){this.Di.M_().W().handleScale.axisDoubleClickReset&&this.ih()},t.prototype.T_=function(t){null!==this._i&&(!this.Di.M_().jt().W().handleScale.axisPressedMouseMove.price||this._i.vr()||this._i.Zu()||this.K_(1))},t.prototype.D_=function(t){this.K_(0)},t.prototype.V_=function(){var t=this,e=[],i=null===this._i?void 0:this._i;return function(n){for(var r=0;r<n.length;++r)for(var o=n[r].nn(t.Di.z_(),i),s=0;s<o.length;s++)e.push(o[s])}(this.Di.z_().oa()),e},t.prototype.j_=function(t,e){var i=this;if(null!==this.o_){var n=this.o_.Ft,r=this.o_.Ot;_l(t,e,(function(){var e=i.Di.z_().jt(),o=e.Zf(),s=e.Xf();o===s?Cl(t,0,0,n,r,o):Ml(t,0,0,n,r,o,s)}))}},t.prototype.Rs=function(t,e){if(null!==this.o_&&null!==this._i&&this._i.W().borderVisible){t.save(),t.fillStyle=this.ht();var i,n=Math.max(1,Math.floor(this.F_().N*e));i=this.m_?Math.floor(this.o_.Ft*e)-n:0,t.fillRect(i,0,n,Math.ceil(this.o_.Ot*e)),t.restore()}},t.prototype.q_=function(t,e){if(null!==this.o_&&null!==this._i){var i=this._i.au();t.save(),t.strokeStyle=this.ht(),t.font=this.E_(),t.fillStyle=this.ht();var n=this.F_(),r=this._i.W().borderVisible&&this._i.W().drawTicks,o=this.m_?Math.floor((this.o_.Ft-n.C)*e-n.N*e):Math.floor(n.N*e),s=this.m_?Math.round(o-n.L*e):Math.round(o+n.C*e+n.L*e),a=this.m_?"right":"left",l=Math.max(1,Math.floor(e)),u=Math.floor(.5*e);if(r){var c=Math.round(n.C*e);t.beginPath();for(var h=0,f=i;h<f.length;h++){var p=f[h];t.rect(o,Math.round(p.su*e)-u,c,l)}t.fill()}t.fillStyle=this.L_();for(var d=0,v=i;d<v.length;d++)p=v[d],this.c_.r_(t,p.yu,s,Math.round(p.su*e),a);t.restore()}},t.prototype.I_=function(){if(null!==this.o_&&null!==this._i){var t=this.o_.Ot/2,e=[],i=this._i.oa().slice(),n=this.Di.z_(),r=this.F_();this._i===n.fh()&&this.Di.z_().oa().forEach((function(t){n.lh(t)&&i.push(t)}));var o=this._i.Ge()[0],s=this._i;i.forEach((function(i){var r=i.nn(n,s);r.forEach((function(t){t.oi(null),t.li()&&e.push(t)})),o===i&&r.length>0&&(t=r[0].ti())}));var a=e.filter((function(e){return e.ti()<=t})),l=e.filter((function(e){return e.ti()>t}));if(a.sort((function(t,e){return e.ti()-t.ti()})),a.length&&l.length&&l.push(a[0]),l.sort((function(t,e){return t.ti()-e.ti()})),e.forEach((function(t){return t.oi(t.ti())})),this._i.W().alignLabels){for(var u=1;u<a.length;u++){var c=a[u],h=(p=a[u-1]).Yt(r,!1);c.ti()>(d=p.ai())-h&&c.oi(d-h)}for(var f=1;f<l.length;f++){var p,d;c=l[f],h=(p=l[f-1]).Yt(r,!0),c.ti()<(d=p.ai())+h&&c.oi(d+h)}}}},t.prototype.U_=function(t,e){var i=this;if(null!==this.o_){t.save();var n=this.o_,r=this.V_(),o=this.F_(),s=this.m_?"right":"left";r.forEach((function(r){if(r.fi()){var a=r.dt($a(i._i));t.save(),a.H(t,o,i.f_,n.Ft,s,e),t.restore()}})),t.restore()}},t.prototype.H_=function(t,e){var i=this;if(null!==this.o_&&null!==this._i){t.save();var n=this.o_,r=this.Di.M_().jt(),o=[],s=this.Di.z_(),a=r.Tf().nn(s,this._i);a.length&&o.push(a);var l=this.F_(),u=this.m_?"right":"left";o.forEach((function(r){r.forEach((function(r){t.save(),r.dt($a(i._i)).H(t,l,i.f_,n.Ft,u,e),t.restore()}))})),t.restore()}},t.prototype.K_=function(t){this.p_.style.cursor=1===t?"ns-resize":"default"},t.prototype.Eu=function(){var t=this.O_();this.v_<t&&this.Di.M_().jt().Ce(),this.v_=t},t.prototype.w_=function(t){this.c_.g(),this.c_=new ah(t.S,t.A,t.D)},t}();function uh(t,e,i,n,r){t.$&&t.$(e,i,n,r)}function ch(t,e,i,n,r){t.H(e,i,n,r)}function hh(t,e){return t.tn(e)}function fh(t,e){return void 0!==t.Pe?t.Pe(e):[]}var ph=function(){function t(t,e){var i=this;this.o_=new Hc(0,0),this.X_=null,this.Z_=null,this.J_=null,this.G_=!1,this.Q_=new el,this.td=0,this.nd=!1,this.sd=null,this.hd=!1,this.rd=null,this.ed=null,this.__=!1,this.d_=function(){i.__||null===i.ud||i.pi().Wr()},this.b_=function(){i.__||null===i.ud||i.pi().Wr()},this.ad=t,this.ud=e,this.ud.ro().u(this.od.bind(this),this,!0),this.ld=document.createElement("td"),this.ld.style.padding="0",this.ld.style.position="relative";var n=document.createElement("div");
13n.style.width="100%",n.style.height="100%",n.style.position="relative",n.style.overflow="hidden",this.fd=document.createElement("td"),this.fd.style.padding="0",this.vd=document.createElement("td"),this.vd.style.padding="0",this.ld.appendChild(n),this.g_=Uc(n,new Hc(16,16)),this.g_.subscribeCanvasConfigured(this.d_);var r=this.g_.canvas;r.style.position="absolute",r.style.zIndex="1",r.style.left="0",r.style.top="0",this.y_=Uc(n,new Hc(16,16)),this.y_.subscribeCanvasConfigured(this.b_);var o=this.y_.canvas;o.style.position="absolute",o.style.zIndex="2",o.style.left="0",o.style.top="0",this._d=document.createElement("tr"),this._d.appendChild(this.fd),this._d.appendChild(this.ld),this._d.appendChild(this.vd),this.dd(),this.A_=new eh(this.y_.canvas,this,{_v:function(){return null===i.sd&&!i.ad.W().handleScroll.vertTouchDrag},dv:function(){return null===i.sd&&!i.ad.W().handleScroll.horzTouchDrag}})}return t.prototype.g=function(){null!==this.X_&&this.X_.g(),null!==this.Z_&&this.Z_.g(),this.y_.unsubscribeCanvasConfigured(this.b_),this.y_.destroy(),this.g_.unsubscribeCanvasConfigured(this.d_),this.g_.destroy(),null!==this.ud&&this.ud.ro().M(this),this.A_.g()},t.prototype.z_=function(){return $a(this.ud)},t.prototype.wd=function(e){null!==this.ud&&this.ud.ro().M(this),this.ud=e,null!==this.ud&&this.ud.ro().u(t.prototype.od.bind(this),this,!0),this.dd()},t.prototype.M_=function(){return this.ad},t.prototype.B_=function(){return this._d},t.prototype.dd=function(){if(null!==this.ud&&(this.Md(),0!==this.pi()._t().length)){if(null!==this.X_){var t=this.ud.Ya();this.X_.Si($a(t))}if(null!==this.Z_){var e=this.ud.$a();this.Z_.Si($a(e))}}},t.prototype.bd=function(){null!==this.X_&&this.X_.vt(),null!==this.Z_&&this.Z_.vt()},t.prototype.Wa=function(){return null!==this.ud?this.ud.Wa():0},t.prototype.za=function(t){this.ud&&this.ud.za(t)},t.prototype.ov=function(t){if(this.ud){this.md();var e=t.Yv,i=t.$v;this.pd(e,i)}},t.prototype.Tv=function(t){this.md(),this.gd(),this.pd(t.Yv,t.$v)},t.prototype.lv=function(t){if(this.ud){this.md();var e=t.Yv,i=t.$v;this.pd(e,i);var n=this.$h(e,i);this.pi().yf(n&&{kf:n.kf,yd:n.yd})}},t.prototype.kv=function(t){if(null!==this.ud){this.md();var e=t.Yv,i=t.$v;if(this.Q_.p()){var n=this.pi().Tf().Mt();this.Q_.m(n,{x:e,y:i})}}},t.prototype.bv=function(t){this.md(),this.kd(t),this.pd(t.Yv,t.$v)},t.prototype.yv=function(t){null!==this.ud&&(this.md(),this.nd=!1,this.Nd(t))},t.prototype.zv=function(t){if(this.nd=!0,null===this.sd){var e={x:t.Yv,y:t.$v};this.xd(e,e)}},t.prototype.Wv=function(t){null!==this.ud&&(this.md(),this.ud.jt().yf(null),this.Cd())},t.prototype.Sd=function(){return this.Q_},t.prototype.Lv=function(){this.td=1,this.Td()},t.prototype.Ev=function(t,e){if(this.ad.W().handleScale.pinch){var i=5*(e-this.td);this.td=e,this.pi().Ef(t.tt,i)}},t.prototype.Cv=function(t){if(this.nd=!1,this.hd=null!==this.sd,this.gd(),null!==this.sd){var e=this.pi().Tf();this.rd={x:e.$t(),y:e.Kt()},this.sd={x:t.Yv,y:t.$v}}},t.prototype.wv=function(t){if(null!==this.ud){var e=t.Yv,i=t.$v;if(null===this.sd)this.kd(t);else{this.hd=!1;var n=$a(this.rd),r=n.x+(e-this.sd.x),o=n.y+(i-this.sd.y);this.pd(r,o)}}},t.prototype.pv=function(t){0===this.M_().W().trackingMode.exitMode&&(this.hd=!0),this.Dd(),this.Nd(t)},t.prototype.$h=function(t,e){var i=this.ud;if(null===i)return null;for(var n=0,r=i.oa();n<r.length;n++){var o=r[n],s=this.Ad(o.tn(i),t,e);if(null!==s)return{kf:o,i_:s.i_,yd:s.yd}}return null},t.prototype.Bd=function(t,e){$a("left"===e?this.X_:this.Z_).P_(new Hc(t,this.o_.Ot))},t.prototype.Ld=function(){return this.o_},t.prototype.P_=function(t){if(t.Ft<0||t.Ot<0)throw new Error("Try to set invalid size to PaneWidget "+JSON.stringify(t));this.o_.br(t)||(this.o_=t,this.__=!0,this.g_.resizeCanvas({width:t.Ft,height:t.Ot}),this.y_.resizeCanvas({width:t.Ft,height:t.Ot}),this.__=!1,this.ld.style.width=t.Ft+"px",this.ld.style.height=t.Ot+"px")},t.prototype.Ed=function(){var t=$a(this.ud);t.Ha(t.Ya()),t.Ha(t.$a());for(var e=0,i=t.Ge();e<i.length;e++){var n=i[e];if(t.lh(n)){var r=n.Ct();null!==r&&t.Ha(r),n.hn()}}},t.prototype.Y_=function(){return this.g_.canvas},t.prototype.R_=function(t){if(0!==t&&null!==this.ud){if(t>1&&this.Ed(),null!==this.X_&&this.X_.R_(t),null!==this.Z_&&this.Z_.R_(t),1!==t){var e=Gc(this.g_.canvas);e.save(),this.j_(e,this.g_.pixelRatio),this.ud&&(this.Fd(e,this.g_.pixelRatio),this.Od(e,this.g_.pixelRatio),this.Vd(e,this.g_.pixelRatio,hh)),e.restore(
13)}var i=Gc(this.y_.canvas);i.clearRect(0,0,Math.ceil(this.o_.Ft*this.y_.pixelRatio),Math.ceil(this.o_.Ot*this.y_.pixelRatio)),this.Vd(i,this.g_.pixelRatio,fh),this.Pd(i,this.y_.pixelRatio)}},t.prototype.Wd=function(){return this.X_},t.prototype.zd=function(){return this.Z_},t.prototype.od=function(){null!==this.ud&&this.ud.ro().M(this),this.ud=null},t.prototype.j_=function(t,e){var i=this;_l(t,e,(function(){var e=i.pi(),n=e.Zf(),r=e.Xf();n===r?Cl(t,0,0,i.o_.Ft,i.o_.Ot,r):Ml(t,0,0,i.o_.Ft,i.o_.Ot,n,r)}))},t.prototype.Fd=function(t,e){var i=$a(this.ud),n=i.eo().ou().dt(i.Yt(),i.Ht());null!==n&&(t.save(),n.H(t,e,!1),t.restore())},t.prototype.Od=function(t,e){var i=this.pi().Sf();this.Rd(t,e,hh,uh,i),this.Rd(t,e,hh,ch,i)},t.prototype.Pd=function(t,e){this.Rd(t,e,hh,ch,this.pi().Tf())},t.prototype.Vd=function(t,e,i){for(var n=$a(this.ud).oa(),r=0,o=n;r<o.length;r++){var s=o[r];this.Rd(t,e,i,uh,s)}for(var a=0,l=n;a<l.length;a++)s=l[a],this.Rd(t,e,i,ch,s)},t.prototype.Rd=function(t,e,i,n,r){for(var o=$a(this.ud),s=i(r,o),a=o.Yt(),l=o.Ht(),u=o.jt().gf(),c=null!==u&&u.kf===r,h=null!==u&&c&&void 0!==u.yd?u.yd.Kh:void 0,f=0,p=s;f<p.length;f++){var d=p[f].dt(a,l);null!==d&&(t.save(),n(d,t,e,c,h),t.restore())}},t.prototype.Ad=function(t,e,i){for(var n=0,r=t;n<r.length;n++){var o=r[n],s=o.dt(this.o_.Ot,this.o_.Ft);if(null!==s&&s.$h){var a=s.$h(e,i);if(null!==a)return{i_:o,yd:a}}}return null},t.prototype.Md=function(){if(null!==this.ud){var t=this.ad,e=this.ud.Ya().W().visible,i=this.ud.$a().W().visible;e||null===this.X_||(this.fd.removeChild(this.X_.B_()),this.X_.g(),this.X_=null),i||null===this.Z_||(this.vd.removeChild(this.Z_.B_()),this.Z_.g(),this.Z_=null);var n=t.jt().qf();e&&null===this.X_&&(this.X_=new lh(this,t.W().layout,n,"left"),this.fd.appendChild(this.X_.B_())),i&&null===this.Z_&&(this.Z_=new lh(this,t.W().layout,n,"right"),this.vd.appendChild(this.Z_.B_()))}},t.prototype.Id=function(t){return t.Gv&&this.nd||null!==this.sd},t.prototype.jd=function(t){return Math.max(0,Math.min(t,this.o_.Ft-1))},t.prototype.qd=function(t){return Math.max(0,Math.min(t,this.o_.Ot-1))},t.prototype.pd=function(t,e){this.pi().Rf(this.jd(t),this.qd(e),$a(this.ud))},t.prototype.Cd=function(){this.pi().If()},t.prototype.Dd=function(){this.hd&&(this.sd=null,this.Cd())},t.prototype.xd=function(t,e){this.sd=t,this.hd=!1,this.pd(e.x,e.y);var i=this.pi().Tf();this.rd={x:i.$t(),y:i.Kt()}},t.prototype.pi=function(){return this.ad.jt()},t.prototype.Ud=function(){var t=this.pi(),e=this.z_(),i=e.ji();t.Qa(e,i),t.Pf(),this.J_=null,this.G_=!1},t.prototype.Nd=function(t){var e=this;if(this.G_){var i=performance.now();if(null!==this.ed&&this.ed.xh(t.Yv,i),null===this.ed||this.ed.cc(i))this.Ud();else{var n=this.pi(),r=n.bt(),o=this.ed,s=function(){if(!o._c()){var t=performance.now(),i=o.cc(t);if(!o._c()){var a=r.Nl();n.Vf(o.fc(t)),a===r.Nl()&&(i=!0,e.ed=null)}i?e.Ud():requestAnimationFrame(s)}};requestAnimationFrame(s)}}},t.prototype.md=function(){this.sd=null},t.prototype.gd=function(){if(this.ud){if(this.Td(),document.activeElement!==document.body&&document.activeElement!==document.documentElement)$a(document.activeElement).blur();else{var t=document.getSelection();null!==t&&t.removeAllRanges()}!this.ud.ji().wi()&&this.pi().bt().wi()}},t.prototype.kd=function(t){if(null!==this.ud){var e=this.pi();if(!e.bt().wi()){var i=this.ad.W(),n=i.handleScroll,r=i.kineticScroll;if(n.pressedMouseMove&&!t.Gv||(n.horzTouchDrag||n.vertTouchDrag)&&t.Gv){var o=this.ud.ji(),s=performance.now();null!==this.J_||this.Id(t)||(this.J_={x:t.Rv,y:t.Iv,So:s,Yv:t.Yv,$v:t.$v}),null!==this.ed&&this.ed.lc(t.Yv,s),null===this.J_||this.G_||this.J_.x===t.Rv&&this.J_.y===t.Iv||(null===this.ed&&(t.Gv&&r.touch||!t.Gv&&r.mouse)&&(this.ed=new Zc(.2,7,.997,15),this.ed.lc(this.J_.Yv,this.J_.So),this.ed.lc(t.Yv,s)),o.wi()||e.Ja(this.ud,o,t.$v),e.Of(t.Yv),this.G_=!0),this.G_&&(o.wi()||e.Ga(this.ud,o,t.$v),e.Vf(t.Yv))}}}},t.prototype.Td=function(){var t=performance.now(),e=null===this.ed||this.ed.cc(t);null!==this.ed&&(e||this.Ud()),null!==this.ed&&(this.ed.dc(),this.ed=null)},t}(),dh=function(){function t(t,e,i,n,r){var o=this;this.ft=!0,this.o_=new Hc(0,0),this.d_=function(){return o.R_(3)}
13,this.m_="left"===t,this.cf=i.qf,this.zi=e,this.Hd=n,this.Yd=r,this.p_=document.createElement("div"),this.p_.style.width="25px",this.p_.style.height="100%",this.p_.style.overflow="hidden",this.g_=Uc(this.p_,new Hc(16,16)),this.g_.subscribeCanvasConfigured(this.d_)}return t.prototype.g=function(){this.g_.unsubscribeCanvasConfigured(this.d_),this.g_.destroy()},t.prototype.B_=function(){return this.p_},t.prototype.Ld=function(){return this.o_},t.prototype.P_=function(t){if(t.Ft<0||t.Ot<0)throw new Error("Try to set invalid size to PriceAxisStub "+JSON.stringify(t));this.o_.br(t)||(this.o_=t,this.g_.resizeCanvas({width:t.Ft,height:t.Ot}),this.p_.style.width="".concat(t.Ft,"px"),this.p_.style.minWidth="".concat(t.Ft,"px"),this.p_.style.height="".concat(t.Ot,"px"),this.ft=!0)},t.prototype.R_=function(t){if((!(t<3)||this.ft)&&0!==this.o_.Ft&&0!==this.o_.Ot){this.ft=!1;var e=Gc(this.g_.canvas);this.j_(e,this.g_.pixelRatio),this.Rs(e,this.g_.pixelRatio)}},t.prototype.Y_=function(){return this.g_.canvas},t.prototype.Rs=function(t,e){if(this.Hd()){var i=this.o_.Ft;t.save(),t.fillStyle=this.zi.timeScale.borderColor;var n=Math.floor(this.cf.W().N*e),r=this.m_?Math.round(i*e)-n:0;t.fillRect(r,0,n,n),t.restore()}},t.prototype.j_=function(t,e){var i=this;_l(t,e,(function(){Cl(t,0,0,i.o_.Ft,i.o_.Ot,i.Yd())}))},t}();function vh(t,e){return t.Po>e.Po?t:e}var mh=function(){function t(t){var e=this;this.$d=null,this.Kd=null,this.k=null,this.Xd=!1,this.o_=new Hc(0,0),this.Zd=new el,this.f_=new gu(5),this.__=!1,this.d_=function(){e.__||e.ad.jt().Wr()},this.b_=function(){e.__||e.ad.jt().Wr()},this.ad=t,this.zi=t.W().layout,this.Jd=document.createElement("tr"),this.Gd=document.createElement("td"),this.Gd.style.padding="0",this.Qd=document.createElement("td"),this.Qd.style.padding="0",this.p_=document.createElement("td"),this.p_.style.height="25px",this.p_.style.padding="0",this.tw=document.createElement("div"),this.tw.style.width="100%",this.tw.style.height="100%",this.tw.style.position="relative",this.tw.style.overflow="hidden",this.p_.appendChild(this.tw),this.g_=Uc(this.tw,new Hc(16,16)),this.g_.subscribeCanvasConfigured(this.d_);var i=this.g_.canvas;i.style.position="absolute",i.style.zIndex="1",i.style.left="0",i.style.top="0",this.y_=Uc(this.tw,new Hc(16,16)),this.y_.subscribeCanvasConfigured(this.b_);var n=this.y_.canvas;n.style.position="absolute",n.style.zIndex="2",n.style.left="0",n.style.top="0",this.Jd.appendChild(this.Gd),this.Jd.appendChild(this.p_),this.Jd.appendChild(this.Qd),this.iw(),this.ad.jt().Pa().u(this.iw.bind(this),this),this.A_=new eh(this.y_.canvas,this,{_v:function(){return!0},dv:function(){return!1}})}return t.prototype.g=function(){this.A_.g(),null!==this.$d&&this.$d.g(),null!==this.Kd&&this.Kd.g(),this.y_.unsubscribeCanvasConfigured(this.b_),this.y_.destroy(),this.g_.unsubscribeCanvasConfigured(this.d_),this.g_.destroy()},t.prototype.B_=function(){return this.Jd},t.prototype.nw=function(){return this.$d},t.prototype.sw=function(){return this.Kd},t.prototype.Tv=function(t){if(!this.Xd){this.Xd=!0;var e=this.ad.jt();!e.bt().wi()&&this.ad.W().handleScale.axisPressedMouseMove.time&&e.Lf(t.Yv)}},t.prototype.Cv=function(t){this.Tv(t)},t.prototype.Dv=function(){var t=this.ad.jt();!t.bt().wi()&&this.Xd&&(this.Xd=!1,this.ad.W().handleScale.axisPressedMouseMove.time&&t.zf()
13)},t.prototype.bv=function(t){var e=this.ad.jt();!e.bt().wi()&&this.ad.W().handleScale.axisPressedMouseMove.time&&e.Wf(t.Yv)},t.prototype.wv=function(t){this.bv(t)},t.prototype.yv=function(){this.Xd=!1;var t=this.ad.jt();t.bt().wi()&&!this.ad.W().handleScale.axisPressedMouseMove.time||t.zf()},t.prototype.pv=function(){this.yv()},t.prototype.nv=function(){this.ad.W().handleScale.axisDoubleClickReset&&this.ad.jt().pn()},t.prototype.Gc=function(){this.nv()},t.prototype.ov=function(){this.ad.jt().W().handleScale.axisPressedMouseMove.time&&this.K_(1)},t.prototype.Wv=function(){this.K_(0)},t.prototype.Ld=function(){return this.o_},t.prototype.hw=function(){return this.Zd},t.prototype.rw=function(t,e,i){this.o_&&this.o_.br(t)||(this.o_=t,this.__=!0,this.g_.resizeCanvas({width:t.Ft,height:t.Ot}),this.y_.resizeCanvas({width:t.Ft,height:t.Ot}),this.__=!1,this.p_.style.width=t.Ft+"px",this.p_.style.height=t.Ot+"px",this.Zd.m(t)),null!==this.$d&&this.$d.P_(new Hc(e,t.Ot)),null!==this.Kd&&this.Kd.P_(new Hc(i,t.Ot))},t.prototype.ew=function(){var t=this.uw();return Math.ceil(t.N+t.C+t.S+t.O+t.B)},t.prototype.vt=function(){this.ad.jt().bt().au()},t.prototype.Y_=function(){return this.g_.canvas},t.prototype.R_=function(t){if(0!==t){if(1!==t){var e=Gc(this.g_.canvas);this.j_(e,this.g_.pixelRatio),this.Rs(e,this.g_.pixelRatio),this.q_(e,this.g_.pixelRatio),null!==this.$d&&this.$d.R_(t),null!==this.Kd&&this.Kd.R_(t)}var i=Gc(this.y_.canvas),n=this.y_.pixelRatio;i.clearRect(0,0,Math.ceil(this.o_.Ft*n),Math.ceil(this.o_.Ot*n)),this.aw([this.ad.jt().Tf()],i,n)}},t.prototype.j_=function(t,e){var i=this;_l(t,e,(function(){Cl(t,0,0,i.o_.Ft,i.o_.Ot,i.ad.jt().Xf())}))},t.prototype.Rs=function(t,e){if(this.ad.W().timeScale.borderVisible){t.save(),t.fillStyle=this.ow();var i=Math.max(1,Math.floor(this.uw().N*e));t.fillRect(0,0,Math.ceil(this.o_.Ft*e),i),t.restore()}},t.prototype.q_=function(t,e){var i=this,n=this.ad.jt().bt().au();if(n&&0!==n.length){var r=n.reduce(vh,n[0]).Po;r>30&&r<50&&(r=30),t.save(),t.strokeStyle=this.ow();var o=this.uw(),s=o.N+o.C+o.O+o.S-o.V;t.textAlign="center",t.fillStyle=this.ow();var a=Math.floor(this.uw().N*e),l=Math.max(1,Math.floor(e)),u=Math.floor(.5*e);if(this.ad.jt().bt().W().borderVisible){t.beginPath();for(var c=Math.round(o.C*e),h=n.length;h--;){var f=Math.round(n[h].su*e);t.rect(f-u,a,l,c)}t.fill()}t.fillStyle=this.j(),_l(t,e,(function(){t.font=i.lw();for(var e=0,o=n;e<o.length;e++)if((c=o[e]).Po<r){var a=c.Sl?i.fw(t,c.su,c.yu):c.su;t.fillText(c.yu,a,s)}t.font=i.cw();for(var l=0,u=n;l<u.length;l++){var c;(c=u[l]).Po>=r&&(a=c.Sl?i.fw(t,c.su,c.yu):c.su,t.fillText(c.yu,a,s))}})),t.restore()}},t.prototype.fw=function(t,e,i){var n=this.f_.Qt(t,i),r=n/2,o=Math.floor(e-r)+.5;return o<0?e+=Math.abs(0-o):o+n>this.o_.Ft&&(e-=Math.abs(this.o_.Ft-(o+n))),e},t.prototype.aw=function(t,e,i){for(var n=this.uw(),r=0,o=t;r<o.length;r++)for(var s=0,a=o[r].Ti();s<a.length;s++){var l=a[s];e.save(),l.dt().H(e,n,i),e.restore()}},t.prototype.ow=function(){return this.ad.W().timeScale.borderColor},t.prototype.j=function(){return this.zi.textColor},t.prototype.R=function(){return this.zi.fontSize},t.prototype.lw=function(){return hl(this.R(),this.zi.fontFamily)},t.prototype.cw=function(){return hl(this.R(),this.zi.fontFamily,"bold")},t.prototype.uw=function(){null===this.k&&(this.k={N:1,V:NaN,O:NaN,B:NaN,mi:NaN,C:3,S:NaN,T:"",bi:new gu});var t=this.k,e=this.lw();if(t.T!==e){var i=this.R();t.S=i,t.T=e,t.O=Math.ceil(i/2.5),t.B=t.O,t.mi=Math.ceil(i/2),t.V=Math.round(this.R()/5),t.bi.ih()}return this.k},t.prototype.K_=function(t){this.p_.style.cursor=1===t?"ew-resize":"default"},t.prototype.iw=function(){var t=this.ad.jt(),e=t.W();e.leftPriceScale.visible||null===this.$d||(this.Gd.removeChild(this.$d.B_()),this.$d.g(),this.$d=null),e.rightPriceScale.visible||null===this.Kd||(this.Qd.removeChild(this.Kd.B_()),this.Kd.g(),this.Kd=null);var i={qf:this.ad.jt().qf()},n=function(){return e.leftPriceScale.borderVisible&&t.bt().W().borderVisible},r=function(){return t.Xf()};e.leftPriceScale.visible&&null===this.$d&&(this.$d=new dh("left",e,i,n,r),this.Gd.appendChild(this.$d.B_())),e.rightPriceScale.visible&&null===this.Kd&&(this.Kd=new dh("right",e,i,n,r),this.Qd.appendChild(this.Kd.B_()))},t}(),yh=function(){function t(t,e){var i;this._w=[],this.dw=0,this.xu=0,this.hh=0,this.ww=0,this.Mw=0,this.bw=null,this.mw=!1,this.Q_=new el,this.af=new el,this.zi=e,this.Jd=document.createElement("div"),this.Jd.classList.add("tv-lightweight-charts"),this.Jd.style.overflow="hidden",this.Jd.style.width="100%",this.Jd.style.height="100%",(i=this.Jd).style.userSelect="none",i.style.webkitUserSelect="none",i.style.msUserSelect="none",i.style.MozUserSelect="none",i.style.webkitTapHighlightColor="transparent",this.pw=document.createElement("table"),this.pw.setAttribute("cellspacing","0"),this.Jd.appendChild(this.pw),this.gw=this.yw.bind(this),this.Jd.addEventListener("wheel",this.gw,{passive:!1}),this.pi=new $c(this.ff.bind(this),this.zi),this.jt().Df().u(this.kw.bind(this),this),this.Nw=new mh(this),this.pw.appendChild(this.Nw.B_());var n=this.zi.width,r=this.zi.height;if(0===n||0===r){var o=t.getBoundingClientRect();0===n&&(n=Math.floor(o.width),n-=n%2),0===r&&(r=Math.floor(o.height),r-=r%2)}this.xw(n,r),this.Cw(),t.appendChild(this.Jd),this.Sw(),this.pi.bt().Pl().u(this.pi.Ce.bind(this.pi),this),this.pi.Pa().u(this.pi.Ce.bind(this.pi),this)}return t.prototype.jt=function(){return this.pi},t.prototype.W=function(){return this.zi},t.prototype.Tw=function(){return this._w},t.prototype.Dw=function(){return this.Nw},t.prototype.g=function(){this.Jd.removeEventListener("wheel",this.gw),0!==this.dw&&window.cancelAnimationFrame(this.dw),this.pi.Df().M(this),this.pi.bt().Pl().M(this),this.pi.Pa().M(this),this.pi.g();for(var t=0,e=this._w;t<e.length;t++){var i=e[t];this.pw.removeChild(i.B_()),i.Sd().M(this),i.g()}this._w=[],$a(this.Nw).g(),null!==this.Jd.parentElement&&this.Jd.parentElement.removeChild(this.Jd),this.af.g(),this.Q_.g()}
13,t.prototype.xw=function(t,e,i){if(void 0===i&&(i=!1),this.xu!==e||this.hh!==t){this.xu=e,this.hh=t;var n=e+"px",r=t+"px";$a(this.Jd).style.height=n,$a(this.Jd).style.width=r,this.pw.style.height=n,this.pw.style.width=r,i?this.Aw(new Al(3)):this.pi.Ce()}},t.prototype.R_=function(t){void 0===t&&(t=new Al(3));for(var e=0;e<this._w.length;e++)this._w[e].R_(t.wn(e).vn);this.zi.timeScale.visible&&this.Nw.R_(t.dn())},t.prototype.Pr=function(t){this.pi.Pr(t),this.Sw();var e=t.width||this.hh,i=t.height||this.xu;this.xw(e,i)},t.prototype.Sd=function(){return this.Q_},t.prototype.Df=function(){return this.af},t.prototype.Bw=function(){var t=this;null!==this.bw&&(this.Aw(this.bw),this.bw=null);var e=this._w[0],i=Yc(document,new Hc(this.hh,this.xu)),n=Gc(i),r=Kc(i);return _l(n,r,(function(){var i=0,r=0,o=function(e){for(var o=0;o<t._w.length;o++){var s=t._w[o],a=s.Ld().Ot,l=$a("left"===e?s.Wd():s.zd()),u=l.Y_();n.drawImage(u,i,r,l.W_(),a),r+=a}};t.Lw()&&(o("left"),i=$a(e.Wd()).W_()),r=0;for(var s=0;s<t._w.length;s++){var a=t._w[s],l=a.Ld(),u=a.Y_();n.drawImage(u,i,r,l.Ft,l.Ot),r+=l.Ot}i+=e.Ld().Ft,t.Ew()&&(r=0,o("right"));var c=function(e){var o=$a("left"===e?t.Nw.nw():t.Nw.sw()),s=o.Ld(),a=o.Y_();n.drawImage(a,i,r,s.Ft,s.Ot)};if(t.zi.timeScale.visible){i=0,t.Lw()&&(c("left"),i=$a(e.Wd()).W_());var h=t.Nw.Ld();u=t.Nw.Y_(),n.drawImage(u,i,r,h.Ft,h.Ot),t.Ew()&&(i+=e.Ld().Ft,c("right"),n.restore())}})),i},t.prototype.Fw=function(t){return"none"===t||"left"===t&&!this.Lw()||"right"===t&&!this.Ew()||0===this._w.length?0:$a("left"===t?this._w[0].Wd():this._w[0].zd()).W_()},t.prototype.Ow=function(){for(var t=0,e=0,i=0,n=0,r=this._w;n<r.length;n++){var o=r[n];this.Lw()&&(e=Math.max(e,$a(o.Wd()).O_())),this.Ew()&&(i=Math.max(i,$a(o.zd()).O_())),t+=o.Wa()}var s=this.hh,a=this.xu,l=Math.max(s-e-i,0),u=this.zi.timeScale.visible,c=u?this.Nw.ew():0;c%2&&(c+=1);for(var h=0+c,f=a<h?0:a-h,p=f/t,d=0,v=0;v<this._w.length;++v){(o=this._w[v]).wd(this.pi.Cf()[v]);var m,y;y=v===this._w.length-1?f-d:Math.round(o.Wa()*p),d+=m=Math.max(y,2),o.P_(new Hc(l,m)),this.Lw()&&o.Bd(e,"left"),this.Ew()&&o.Bd(i,"right"),o.z_()&&this.pi.Af(o.z_(),m)}this.Nw.rw(new Hc(u?l:0,c),u?e:0,u?i:0),this.pi.Ra(l),this.ww!==e&&(this.ww=e),this.Mw!==i&&(this.Mw=i)},t.prototype.yw=function(t){var e=t.deltaX/100,i=-t.deltaY/100;if(0!==e&&this.zi.handleScroll.mouseWheel||0!==i&&this.zi.handleScale.mouseWheel){switch(t.cancelable&&t.preventDefault(),t.deltaMode){case t.DOM_DELTA_PAGE:e*=120,i*=120;break;case t.DOM_DELTA_LINE:e*=32,i*=32}if(0!==i&&this.zi.handleScale.mouseWheel){var n=Math.sign(i)*Math.min(1,Math.abs(i)),r=t.clientX-this.Jd.getBoundingClientRect().left;this.jt().Ef(r,n)}0!==e&&this.zi.handleScroll.mouseWheel&&this.jt().Ff(-80*e)}},t.prototype.Aw=function(t){var e,i=t.dn();3===i&&this.Vw(),3!==i&&2!==i||(this.Pw(t),this.Ww(t),this.Nw.vt(),this._w.forEach((function(t){t.bd()})),3===(null===(e=this.bw)||void 0===e?void 0:e.dn())&&(this.bw.Nn(t),this.Vw(),this.Pw(this.bw),this.Ww(this.bw),t=this.bw,this.bw=null)),this.R_(t)},t.prototype.Ww=function(t){for(var e=0,i=t.kn();e<i.length;e++){var n=i[e];this.xn(n)}},t.prototype.Pw=function(t){for(var e=this.pi.Cf(),i=0;i<e.length;i++)t.wn(i)._n&&e[i].so()},t.prototype.xn=function(t){var e=this.pi.bt();switch(t.bn){case 0:e.zl();break;case 1:e.Rl(t.St);break;case 2:e.gn(t.St);break;case 3:e.yn(t.St);break;case 4:e.Tl()}},t.prototype.ff=function(t){var e=this;null!==this.bw?this.bw.Nn(t):this.bw=t,this.mw||(this.mw=!0,this.dw=window.requestAnimationFrame((function(){if(e.mw=!1,e.dw=0,null!==e.bw){var t=e.bw;e.bw=null,e.Aw(t)}})))},t.prototype.Vw=function(){this.Cw()},t.prototype.Cw=function(){for(var t=this.pi.Cf(),e=t.length,i=this._w.length,n=e;n<i;n++){var r=Ra(this._w.pop());this.pw.removeChild(r.B_()),r.Sd().M(this),r.g()}for(n=i;n<e;n++)(r=new ph(this,t[n])).Sd().u(this.zw.bind(this),this),this._w.push(r),this.pw.insertBefore(r.B_(),this.Nw.B_());for(n=0;n<e;n++){var o=t[n];(r=this._w[n]).z_()!==o?r.wd(o):r.dd()}this.Sw(),this.Ow()},t.prototype.Rw=function(t,e){var i,n=new Map;if(null!==t&&this.pi._t().forEach((function(e){var i=e.er(t);null!==i&&n.set(e,i)})),null!==t){var r=this.pi.bt().gi(t);null!==r&&(i=r)}var o=this.jt().gf(),s=null!==o&&o.kf instanceof Ju?o.kf:void 0,a=null!==o&&void 0!==o.yd?o.yd.Zh:void 0;return{rt:i,Iw:e||void 0,jw:s,qw:n,Uw:a}},t.prototype.zw=function(t,e){var i=this;this.Q_.m((function(){return i.Rw(t,e)}))},t.prototype.kw=function(t,e){var i=this;this.af.m((function(){return i.Rw(t,e)}))},t.prototype.Sw=function(){var t=this.zi.timeScale.visible?"":"none";this.Nw.B_().style.display=t},t.prototype.Lw=function(){return this._w[0].z_().Ya().W().visible},t.prototype.Ew=function(){return this._w[0].z_().$a().W().visible},t}();
13function gh(t,e,i){var n=i.value;return{vs:e,rt:t,St:[n,n,n,n]}}function bh(t,e,i){var n=i.value,r={vs:e,rt:t,St:[n,n,n,n]};return"color"in i&&void 0!==i.color&&(r.A=i.color),r}function wh(t){return void 0!==t.St}function Sh(t){return function(e,i,n){return void 0===(r=n).open&&void 0===r.value?{rt:e,vs:i}:t(e,i,n);var r}}var _h={Candlestick:Sh((function(t,e,i){var n={vs:e,rt:t,St:[i.open,i.high,i.low,i.close]};return"color"in i&&void 0!==i.color&&(n.A=i.color),"borderColor"in i&&void 0!==i.borderColor&&(n.Tt=i.borderColor),"wickColor"in i&&void 0!==i.wickColor&&(n.qs=i.wickColor),n})),Bar:Sh((function(t,e,i){var n={vs:e,rt:t,St:[i.open,i.high,i.low,i.close]};return"color"in i&&void 0!==i.color&&(n.A=i.color),n})),Area:Sh(gh),Baseline:Sh(gh),Histogram:Sh(bh),Line:Sh(bh)};function Ch(t){return _h[t]}function Mh(t){return 60*t*60*1e3}function kh(t){return 60*t*1e3}var xh=[{Hw:1e3,Po:10},{Hw:kh(1),Po:20},{Hw:kh(5),Po:21},{Hw:kh(30),Po:22},{Hw:Mh(1),Po:30},{Hw:Mh(3),Po:31},{Hw:Mh(6),Po:32},{Hw:Mh(12),Po:33}];function Th(t,e){if(t.getUTCFullYear()!==e.getUTCFullYear())return 70;if(t.getUTCMonth()!==e.getUTCMonth())return 60;if(t.getUTCDate()!==e.getUTCDate())return 50;for(var i=xh.length-1;i>=0;--i)if(Math.floor(e.getTime()/xh[i].Hw)!==Math.floor(t.getTime()/xh[i].Hw))return xh[i].Po;return 0}function Eh(t,e){if(void 0===e&&(e=0),0!==t.length){for(var i=0===e?null:t[e-1].rt.So,n=null!==i?new Date(1e3*i):null,r=0,o=e;o<t.length;++o){var s=t[o],a=new Date(1e3*s.rt.So);null!==n&&(s.Vo=Th(a,n)),r+=s.rt.So-(i||s.rt.So),i=s.rt.So,n=a}if(0===e&&t.length>1){var l=Math.ceil(r/(t.length-1)),u=new Date(1e3*(t[0].rt.So-l));t[0].Vo=Th(new Date(1e3*t[0].rt.So),u)}}}function Dh(t){if(!Vc(t))throw new Error("time must be of type BusinessDay");var e=new Date(Date.UTC(t.year,t.month-1,t.day,0,0,0,0));return{So:Math.round(e.getTime()/1e3),Co:t}}function Lh(t){if(!Wc(t))throw new Error("time must be of type isUTCTimestamp");return{So:t}}function Oh(t){return 0===t.length?null:Vc(t[0].time)?Dh:Lh}function Ih(t){return Wc(t)?Lh(t):Vc(t)?Dh(t):Dh(Bh(t))}function Bh(t){var e=new Date(t);if(isNaN(e.getTime()))throw new Error("Invalid date string=".concat(t,", expected format=yyyy-mm-dd"));return{day:e.getUTCDate(),month:e.getUTCMonth()+1,year:e.getUTCFullYear()}}function Ph(t){ol(t.time)&&(t.time=Bh(t.time))}function Ah(t){return{vs:0,Yw:new Map,Ve:t}}function Nh(t){if(void 0!==t&&0!==t.length)return{$w:t[0].rt.So,Kw:t[t.length-1].rt.So}}var Fh=function(){function t(){this.Xw=new Map,this.Zw=new Map,this.Jw=new Map,this.Gw=[]}return t.prototype.g=function(){this.Xw.clear(),this.Zw.clear(),this.Jw.clear(),this.Gw=[]},t.prototype.Qw=function(t,e){var i=this,n=0!==this.Xw.size,r=!1,o=this.Zw.get(t);if(void 0!==o)if(1===this.Zw.size)n=!1,r=!0,this.Xw.clear();else for(var s=0,a=this.Gw;s<a.length;s++)a[s].pointData.Yw.delete(t)&&(r=!0);var l=[];if(0!==e.length){e.forEach(Ph);var u=$a(Oh(e)),c=Ch(t.Rr());l=e.map((function(e){var n=u(e.time),o=i.Xw.get(n.So);void 0===o&&(o=Ah(n),i.Xw.set(n.So,o),r=!0);var s=c(n,o.vs,e);return o.Yw.set(t,s),s}))}n&&this.tM(),this.iM(t,l);var h=-1;if(r){var f=[];this.Xw.forEach((function(t){f.push({Vo:0,rt:t.Ve,pointData:t})})),f.sort((function(t,e){return t.rt.So-e.rt.So})),h=this.nM(f)}return this.sM(t,h,function(t,e){var i=Nh(t),n=Nh(e);if(void 0!==i&&void 0!==n)return{Ae:i.Kw>=n.Kw&&i.$w>=n.$w}}(this.Zw.get(t),o))},t.prototype.Yf=function(t){return this.Qw(t,[])},t.prototype.hM=function(t,e){Ph(e);var i=$a(Oh([e]))(e.time),n=this.Jw.get(t);if(void 0!==n&&i.So<n.So)throw new Error("Cannot update oldest data, last time=".concat(n.So,", new time=").concat(i.So));var r=this.Xw.get(i.So),o=void 0===r;void 0===r&&(r=Ah(i),this.Xw.set(i.So,r));var s=Ch(t.Rr())(i,r.vs,e);r.Yw.set(t,s),this.rM(t,s);var a={Ae:wh(s)};if(!o)return this.sM(t,-1,a);var l={Vo:0,rt:r.Ve,pointData:r},u=Kl(this.Gw,l.rt.So,(function(t,e){return t.rt.So<e}));this.Gw.splice(u,0,l);for(var c=u;c<this.Gw.length;++c)zh(this.Gw[c].pointData,c);return Eh(this.Gw,u),this.sM(t,u,a)},t.prototype.rM=function(t,e){var i=this.Zw.get(t);void 0===i&&(i=[],this.Zw.set(t,i));var n=0!==i.length?i[i.length-1]:null;null===n||e.rt.So>n.rt.So?wh(e)&&i.push(e):wh(e)?i[i.length-1]=e:i.splice(-1,1),this.Jw.set(t,e.rt)},t.prototype.iM=function(t,e){0!==e.length?(this.Zw.set(t,e.filter(wh)),this.Jw.set(t,e[e.length-1].rt)):(this.Zw.delete(t),this.Jw.delete(t))},t.prototype.tM=function(){for(var t=0,e=this.Gw;t<e.length;t++){var i=e[t];0===i.pointData.Yw.size&&this.Xw.delete(i.rt.So)}},t.prototype.nM=function(t){for(var e=-1,i=0;i<this.Gw.length&&i<t.length;++i){var n=this.Gw[i],r=t[i];if(n.rt.So!==r.rt.So){e=i;break}r.Vo=n.Vo,zh(r.pointData,i)}if(-1===e&&this.Gw.length!==t.length&&(e=Math.min(this.Gw.length,t.length)),-1===e)return-1;for(i=e;i<t.length;++i)zh(t[i].pointData,i);return Eh(t,e),this.Gw=t,e},t.prototype.eM=function(){if(0===this.Zw.size)return null;var t=0;return this.Zw.forEach((function(e){0!==e.length&&(t=Math.max(t,e[e.length-1].vs))})),t}
13,t.prototype.sM=function(t,e,i){var n={uM:new Map,bt:{ml:this.eM()}};if(-1!==e)this.Zw.forEach((function(e,r){n.uM.set(r,{ph:e,aM:r===t?i:void 0})})),this.Zw.has(t)||n.uM.set(t,{ph:[],aM:i}),n.bt.oM=this.Gw,n.bt.lM=e;else{var r=this.Zw.get(t);n.uM.set(t,{ph:r||[],aM:i})}return n},t}();function zh(t,e){t.vs=e,t.Yw.forEach((function(t){t.vs=e}))}var Rh={color:"#FF0000",price:0,lineStyle:2,lineWidth:1,lineVisible:!0,axisLabelVisible:!0,title:""},$h=function(){function t(t){this.Lr=t}return t.prototype.applyOptions=function(t){this.Lr.Pr(t)},t.prototype.options=function(){return this.Lr.W()},t.prototype.fM=function(){return this.Lr},t}();function jh(t){var e=t.overlay,i=function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(i[n[r]]=t[n[r]])}return i}(t,["overlay"]);return e&&(i.priceScaleId=""),i}var Vh=function(){function t(t,e,i){this.Kn=t,this.cM=e,this.vM=i}return t.prototype.priceFormatter=function(){return this.Kn.qe()},t.prototype.priceToCoordinate=function(t){var e=this.Kn.kt();return null===e?null:this.Kn.Ct().xt(t,e.St)},t.prototype.coordinateToPrice=function(t){var e=this.Kn.kt();return null===e?null:this.Kn.Ct().qi(t,e.St)},t.prototype.barsInLogicalRange=function(t){if(null===t)return null;var e=new Oc(new Tc(t.from,t.to)).jo(),i=this.Kn.an();if(i.wi())return null;var n=i.ne(e.In(),1),r=i.ne(e.jn(),-1),o=$a(i.Qr()),s=$a(i.un());if(null!==n&&null!==r&&n.vs>r.vs)return{barsBefore:t.from-o,barsAfter:s-t.to};var a={barsBefore:null===n||n.vs===o?t.from-o:n.vs-o,barsAfter:null===r||r.vs===s?s-t.to:s-r.vs};return null!==n&&null!==r&&(a.from=n.rt.Co||n.rt.So,a.to=r.rt.Co||r.rt.So),a},t.prototype.setData=function(t){this.Kn.Rr(),this.cM._M(this.Kn,t)},t.prototype.update=function(t){this.Kn.Rr(),this.cM.dM(this.Kn,t)},t.prototype.setMarkers=function(t){var e=t.map((function(t){return Qa(Qa({},t),{time:Ih(t.time)})}));this.Kn.Le(e)},t.prototype.applyOptions=function(t){var e=jh(t);this.Kn.Pr(e)},t.prototype.options=function(){return al(this.Kn.W())},t.prototype.priceScale=function(){return this.vM.priceScale(this.Kn.Ct().Ke())}
13,t.prototype.createPriceLine=function(t){var e=il(al(Rh),t),i=this.Kn.Ee(e);return new $h(i)},t.prototype.removePriceLine=function(t){this.Kn.Fe(t.fM())},t.prototype.seriesType=function(){return this.Kn.Rr()},t}(),Wh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ja(e,t),e.prototype.applyOptions=function(e){jc(e),t.prototype.applyOptions.call(this,e)},e}(Vh),Hh={autoScale:!0,mode:0,invertScale:!1,alignLabels:!0,borderVisible:!0,borderColor:"#2B2B43",entireTextOnly:!1,visible:!1,drawTicks:!0,scaleMargins:{bottom:.1,top:.2}},Kh={color:"rgba(0, 0, 0, 0)",visible:!1,fontSize:48,fontFamily:cl,fontStyle:"",text:"",horzAlign:"center",vertAlign:"center"},Gh={width:0,height:0,layout:{background:{type:"solid",color:"#FFFFFF"},textColor:"#191919",fontSize:11,fontFamily:cl},crosshair:{vertLine:{color:"#758696",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:"#4c525e"},horzLine:{color:"#758696",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:"#4c525e"},mode:1},grid:{vertLines:{color:"#D6DCDE",style:0,visible:!0},horzLines:{color:"#D6DCDE",style:0,visible:!0}},overlayPriceScales:Qa({},Hh),leftPriceScale:Qa(Qa({},Hh),{visible:!1}),rightPriceScale:Qa(Qa({},Hh),{visible:!0}),timeScale:{rightOffset:0,barSpacing:6,minBarSpacing:.5,fixLeftEdge:!1,fixRightEdge:!1,lockVisibleTimeRangeOnResize:!1,rightBarStaysOnScroll:!1,borderVisible:!0,borderColor:"#2B2B43",visible:!0,timeVisible:!1,secondsVisible:!0,shiftVisibleRangeOnNewBar:!0},watermark:Kh,localization:{locale:Jc?navigator.language:"",dateFormat:"dd MMM 'yy"},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0},handleScale:{axisPressedMouseMove:{time:!0,price:!0},axisDoubleClickReset:!0,mouseWheel:!0,pinch:!0},kineticScroll:{mouse:!1,touch:!0},trackingMode:{exitMode:1}},Yh={upColor:"#26a69a",downColor:"#ef5350",wickVisible:!0,borderVisible:!0,borderColor:"#378658",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"#737375",wickUpColor:"#26a69a",wickDownColor:"#ef5350"},Uh={upColor:"#26a69a",downColor:"#ef5350",openVisible:!0,thinBars:!0},Xh={color:"#2196f3",lineStyle:0,lineWidth:3,lineType:0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBackgroundColor:"",lastPriceAnimation:0},qh={topColor:"rgba( 46, 220, 135, 0.4)",bottomColor:"rgba( 40, 221, 100, 0)",lineColor:"#33D778",lineStyle:0,lineWidth:3,lineType:0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBackgroundColor:"",lastPriceAnimation:0},Zh={baseValue:{type:"price",price:0},topFillColor1:"rgba(38, 166, 154, 0.28)",topFillColor2:"rgba(38, 166, 154, 0.05)",topLineColor:"rgba(38, 166, 154, 1)",bottomFillColor1:"rgba(239, 83, 80, 0.05)",bottomFillColor2:"rgba(239, 83, 80, 0.28)",bottomLineColor:"rgba(239, 83, 80, 1)",lineWidth:3,lineStyle:0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBackgroundColor:"",lastPriceAnimation:0},Jh={color:"#26a69a",base:0},Qh={title:"",visible:!0,lastValueVisible:!0,priceLineVisible:!0,priceLineSource:0,priceLineWidth:1,priceLineColor:"",priceLineStyle:2,baseLineVisible:!0,baseLineWidth:1,baseLineColor:"#B2B5BE",baseLineStyle:0,priceFormat:{type:"price",precision:2,minMove:.01}},tf=function(){function t(t,e){this.wM=t,this.MM=e}return t.prototype.applyOptions=function(t){this.wM.jt().Nf(this.MM,t)},t.prototype.options=function(){return this._i().W()},t.prototype.width=function(){return Pl(this.MM)?this.wM.Fw("left"===this.MM?"left":"right"):0},t.prototype._i=function(){return $a(this.wM.jt().xf(this.MM)).Ct},t}(),ef=function(){function t(t,e){this.bM=new el,this.Go=new el,this.Zd=new el,this.pi=t,this.Da=t.bt(),this.Nw=e,this.Da.Ol().u(this.mM.bind(this)),this.Da.Vl().u(this.pM.bind(this)),this.Nw.hw().u(this.gM.bind(this))}return t.prototype.g=function(){this.Da.Ol().M(this),this.Da.Vl().M(this),this.Nw.hw().M(this),this.bM.g(),this.Go.g(),this.Zd.g()},t.prototype.scrollPosition=function(){return this.Da.Nl()},t.prototype.scrollToPosition=function(t,e){e?this.Da.Fl(t,1e3):this.pi.yn(t)},t.prototype.scrollToRealTime=function(){this.Da.El()},t.prototype.getVisibleRange=function(){var t,e,i=this.Da.cl();return null===i?null:{from:null!==(t=i.from.Co)&&void 0!==t?t:i.from.So,to:null!==(e=i.to.Co)&&void 0!==e?e:i.to.So}},t.prototype.setVisibleRange=function(t){var e={from:Ih(t.from),to:Ih(t.to)},i=this.Da.wl(e);this.pi.$f(i)},t.prototype.getVisibleLogicalRange=function(){var t=this.Da.fl();return null===t?null:{from:t.In(),to:t.jn()}},t.prototype.setVisibleLogicalRange=function(t){za(t.from<=t.to,"The from index cannot be after the to index."),this.pi.$f(t)},t.prototype.resetTimeScale=function(){this.pi.pn()},t.prototype.fitContent=function(){this.pi.zl()},t.prototype.logicalToCoordinate=function(t){var e=this.pi.bt();return e.wi()?null:e.At(t)},t.prototype.coordinateToLogical=function(t){return this.Da.wi()?null:this.Da.pl(t)},t.prototype.timeToCoordinate=function(t){var e=Ih(t),i=this.Da.Ze(e,!1);return null===i?null:this.Da.At(i)},t.prototype.coordinateToTime=function(t){var e,i=this.pi.bt(),n=i.pl(t),r=i.gi(n);return null===r?null:null!==(e=r.Co)&&void 0!==e?e:r.So},t.prototype.width=function(){return this.Nw.Ld().Ft},t.prototype.height=function(){return this.Nw.Ld().Ot},t.prototype.subscribeVisibleTimeRangeChange=function(t){this.bM.u(t)},t.prototype.unsubscribeVisibleTimeRangeChange=function(t){this.bM._(t)},t.prototype.subscribeVisibleLogicalRangeChange=function(t){this.Go.u(t)},t.prototype.unsubscribeVisibleLogicalRangeChange=function(t){this.Go._(t)},t.prototype.subscribeSizeChange=function(t){this.Zd.u(t)},t.prototype.unsubscribeSizeChange=function(t){this.Zd._(t)},t.prototype.applyOptions=function(t){this.Da.Pr(t)},t.prototype.options=function(){return al(this.Da.W())},t.prototype.mM=function(){this.bM.p()&&this.bM.m(this.getVisibleRange())},t.prototype.pM=function(){this.Go.p()&&this.Go.m(this.getVisibleLogicalRange())},t.prototype.gM=function(t){this.Zd.m(t.Ft,t.Ot)},t}();function nf(t){if(void 0!==t&&"custom"!==t.type){var e=t;void 0!==e.minMove&&void 0===e.precision&&(e.precision=function(t){if(t>=1)return 0;for(var e=0;e<8;e++){var i=Math.round(t);if(Math.abs(i-t)<1e-8)return e;t*=10}return e}(e.minMove))}}function rf(t){return function(t){if(sl(t.handleScale)){var e=t.handleScale;t.handleScale={axisDoubleClickReset:e,axisPressedMouseMove:{time:e,price:e},mouseWheel:e,pinch:e}}else if(void 0!==t.handleScale&&sl(t.handleScale.axisPressedMouseMove)){var i=t.handleScale.axisPressedMouseMove;t.handleScale.axisPressedMouseMove={time:i,price:i}}var n=t.handleScroll;sl(n)&&(t.handleScroll={horzTouchDrag:n,vertTouchDrag:n,mouseWheel:n,pressedMouseMove:n})}(t),function(t){if(t.priceScale){t.leftPriceScale=t.leftPriceScale||{},t.rightPriceScale=t.rightPriceScale||{};var e=t.priceScale.position;delete t.priceScale.position,t.leftPriceScale=il(t.leftPriceScale,t.priceScale),t.rightPriceScale=il(t.rightPriceScale,t.priceScale),"left"===e&&(t.leftPriceScale.visible=!0,t.rightPriceScale.visible=!1),"right"===e&&(t.leftPriceScale.visible=!1,t.rightPriceScale.visible=!0),"n
13one"===e&&(t.leftPriceScale.visible=!1,t.rightPriceScale.visible=!1),t.overlayPriceScales=t.overlayPriceScales||{},void 0!==t.priceScale.invertScale&&(t.overlayPriceScales.invertScale=t.priceScale.invertScale),void 0!==t.priceScale.scaleMargins&&(t.overlayPriceScales.scaleMargins=t.priceScale.scaleMargins)}}(t),(e=t).layout&&e.layout.backgroundColor&&!e.layout.background&&(e.layout.background={type:"solid",color:e.layout.backgroundColor}),t;var e}var of=function(){function t(t,e){var i=this;this.yM=new Fh,this.kM=new Map,this.NM=new Map,this.xM=new el,this.CM=new el;var n=void 0===e?al(Gh):il(al(Gh),rf(e));this.wM=new yh(t,n),this.wM.Sd().u((function(t){i.xM.p()&&i.xM.m(i.SM(t()))}),this),this.wM.Df().u((function(t){i.CM.p()&&i.CM.m(i.SM(t()))}),this);var r=this.wM.jt();this.TM=new ef(r,this.wM.Dw())}return t.prototype.remove=function(){this.wM.Sd().M(this),this.wM.Df().M(this),this.TM.g(),this.wM.g(),this.kM.clear(),this.NM.clear(),this.xM.g(),this.CM.g(),this.yM.g()},t.prototype.resize=function(t,e,i){this.wM.xw(t,e,i)},t.prototype.addAreaSeries=function(t){void 0===t&&(t={}),nf((t=jh(t)).priceFormat);var e=il(al(Qh),qh,t),i=this.wM.jt().Uf("Area",e),n=new Vh(i,this,this);return this.kM.set(n,i),this.NM.set(i,n),n},t.prototype.addBaselineSeries=function(t){void 0===t&&(t={}),nf((t=jh(t)).priceFormat);var e=il(al(Qh),al(Zh),t),i=this.wM.jt().Uf("Baseline",e),n=new Vh(i,this,this);return this.kM.set(n,i),this.NM.set(i,n),n},t.prototype.addBarSeries=function(t){void 0===t&&(t={}),nf((t=jh(t)).priceFormat);var e=il(al(Qh),Uh,t),i=this.wM.jt().Uf("Bar",e),n=new Vh(i,this,this);return this.kM.set(n,i),this.NM.set(i,n),n},t.prototype.addCandlestickSeries=function(t){void 0===t&&(t={}),jc(t=jh(t)),nf(t.priceFormat);var e=il(al(Qh),Yh,t),i=this.wM.jt().Uf("Candlestick",e),n=new Wh(i,this,this);return this.kM.set(n,i),this.NM.set(i,n),n},t.prototype.addHistogramSeries=function(t){void 0===t&&(t={}),nf((t=jh(t)).priceFormat);var e=il(al(Qh),Jh,t),i=this.wM.jt().Uf("Histogram",e),n=new Vh(i,this,this);return this.kM.set(n,i),this.NM.set(i,n),n},t.prototype.addLineSeries=function(t){void 0===t&&(t={}),nf((t=jh(t)).priceFormat);var e=il(al(Qh),Xh,t),i=this.wM.jt().Uf("Line",e),n=new Vh(i,this,this);return this.kM.set(n,i),this.NM.set(i,n),n},t.prototype.removeSeries=function(t){var e=Ra(this.kM.get(t)),i=this.yM.Yf(e);this.wM.jt().Yf(e),this.DM(i),this.kM.delete(t),this.NM.delete(e)},t.prototype._M=function(t,e){this.DM(this.yM.Qw(t,e))},t.prototype.dM=function(t,e){this.DM(this.yM.hM(t,e))},t.prototype.subscribeClick=function(t){this.xM.u(t)},t.prototype.unsubscribeClick=function(t){this.xM._(t)},t.prototype.subscribeCrosshairMove=function(t){this.CM.u(t)},t.prototype.unsubscribeCrosshairMove=function(t){this.CM._(t)},t.prototype.priceScale=function(t){return void 0===t&&(t=this.wM.jt().Kf()),new tf(this.wM,t)},t.prototype.timeScale=function(){return this.TM},t.prototype.applyOptions=function(t){this.wM.Pr(rf(t))},t.prototype.options=function(){return this.wM.W()},t.prototype.takeScreenshot=function(){return this.wM.Bw()},t.prototype.DM=function(t){var e=this.wM.jt();e.jf(t.bt.ml,t.bt.oM,t.bt.lM),t.uM.forEach((function(t,e){return e.Z(t.ph,t.aM)})),e.yl()},t.prototype.AM=function(t){return Ra(this.NM.get(t))},t.prototype.SM=function(t){var e=this,i=new Map;t.qw.forEach((function(t,n){i.set(e.AM(n),t)}));var n=void 0===t.jw?void 0:this.AM(t.jw);return{time:t.rt&&(t.rt.Co||t.rt.So),point:t.Iw,hoveredSeries:n,hoveredMarkerId:t.Uw,seriesPrices:i}},t}();const sf="area",af={bar:"addBarSeries",line:"addLineSeries",baseline:"addBaselineSeries",area:"addAreaSeries",candlestick:"addCandlestickSeries",histogram:"addHistogramSeries"},lf="floating",uf={name:"LightweightCharts",props:{chartData:{type:Array,default:()=>[]},chartOptions:{type:Object,default:()=>({})},toolTipMargin:{type:[Number,String],default:8},toolTipType:{type:String,default:lf},hasLegends:{type:Boolean,default:!1},priceFormatter:{type:Function,default:t=>pt(t,2)},timeFormatter:{type:Function,default:t=>H(t,"MM-dd")}},data(){return{chart:null,typeSeries:[],tooltipInfo:{},tooltipStyle:{display:"none"},options:{layout:{textColor:qt["--app--color--blue-grey-dark"],background:{type:"solid",color:"white"}},grid:{vertLines:{visible:!1},horzLines:{color:qt["--app--color--blue-grey-lighter"]}},rightPriceScale:{borderColor:qt["--app--color--blue-grey-lighter"],scaleMargins:{top:.05,bottom:.05}},leftPriceScale:{borderColor:qt["--app--color--blue-grey-lighter"],scaleMargins:{top:.05,bottom:.05}},timeScale:{fixLeftEdge:!0,fixRightEdge:!0,borderColor:qt["--app--color--blue-grey-lighter"],tickMarkFormatter:this.timeFormatter},crosshair:{vertLine:{color:qt["--app--color--blue-grey-dark"],labelVisible:!1},horzLine:{color:qt["--app--color--blue-grey-dark"],labelVisible:!1}},handleScale:{axisPressedMouseMove:{price:!1}},localization:{priceFormatter:this.priceFormatter}},legends:[]}},computed:{computedChartOptions(){return Xt({},this.options,this.chartOptions)},hasTooltip(){return!!this.$slots.tooltip}},watch:{chartData:{deep:!0,handler(){this.legends=[],this.removeAllSeries(),this.addAllSeries()}}},created(){this.resizeChartThrottle=Ct(this.resizeChart,300)},mounted(){this.$refs.lightweightChart&&!this.chart&&(this.chart=function(t,e){var i;if(ol(t)){var n=document.getElementById(t);za(null!==n,"Cannot find element in DOM with id=".concat(t)),i=n}else i=t;return new of(i,e)}(this.$refs.lightweightChart,this.computedChartOptions),this.addAllSeries(),window.addEventListener("resize",this.resizeChartThrottle))},beforeUnmount(){window.removeEventListener("resize",this.resizeChartThrottle),this.reset()},methods:{reset(){this.chart&&(this.chart.remove(),this.tooltipUnsubscribe(),this.chart=null,this.typeSeries=null)},addAllSeries(){this.chartData.length>0&&(this.chartData.forEach((({chartType:t,data:e,typeStyleOptions:i},n)=>{const r=this.chart[af[t]](i);r.setData(e),this.typeSeries.push(r),this.legends.push(`${n}`)})),this.chart.timeScale().fitContent(),this.tooltipInitialize())},addSeries(t){if(this.chartData.length>0){const{chartType:e,data:i,typeStyleOptions:n}=this.chartData[t],r=this.chart[af[e]](n);r.setData(i),this.typeSeries.push(r)}}
13,removeAllSeries(){this.chart&&this.typeSeries&&(this.typeSeries.forEach((t=>{this.chart.removeSeries(t)})),this.typeSeries=[])},removeSeries(t){this.chart&&this.typeSeries[t]&&(this.chart.removeSeries(this.typeSeries[t]),this.typeSeries.splice(t,1))},resizeChart(){if(this.chart){const t=this.$refs.lightweightChart.getBoundingClientRect();this.chart.resize(t.width,t.height)}},async tooltipHandler(t){const{clientWidth:e,clientHeight:i}=this.$refs.lightweightChart;if(void 0===t.point||!t.time||t.point.x<0||t.point.x>e||t.point.y<0||t.point.y>i)this.tooltipStyle={display:"none"};else{const n=this.chartData.reduce(((e,i,n)=>{if(this.legends.includes(`${n}`)){const n=i.data.find((e=>e.time===t.time));e.push(n)}return e}),[]),r=t.seriesPrices.get(this.typeSeries[0]),o=this.typeSeries[0]?this.typeSeries[0].priceToCoordinate(r):null;if(null===o)return;this.tooltipInfo={origin:t,price:r,extraData:n,time:t.time},this.tooltipStyle={display:"inline-block"},await this.$nextTick();const{clientWidth:s,clientHeight:a}=this.$refs.tooltip;let l=0,u=0;if(this.toolTipType===lf){const n=t.point.x-s/2;l=Math.max(0,Math.min(e-s,n)),u=o-a-this.toolTipMargin,u<=0&&(u=Math.max(0,Math.min(i-a-this.toolTipMargin,o+this.toolTipMargin)))}else l=t.point.x+this.toolTipMargin+s/2,l>e-s&&(l=Math.max(0,t.point.x+this.toolTipMargin-s)),u=t.point.y-a-this.toolTipMargin;this.tooltipStyle={...this.tooltipStyle,left:`${l}px`,top:`${u}px`}}},tooltipInitialize(){this.hasTooltip&&this.chart.subscribeCrosshairMove(this.tooltipHandler)},tooltipUnsubscribe(){this.hasTooltip&&this.chart.unsubscribeCrosshairMove(this.tooltipHandler)},onChangeLegends(t,e){if(t||!(this.legends.length<=1))if(t)this.legends.push(`${e}`),this.addSeries(e);else{const t=this.legends.indexOf(`${e}`);this.legends.splice(t,1),this.removeSeries(t)}}}},cf={class:"lightweight-chart-container"},hf={ref:"lightweightChart",class:"chart"},ff={key:1,class:"chart-legend"};const pf=qe(uf,[["render",function(t,e,a,u,h,v){const m=i("Checkbox");return r(),f("div",cf,[s("div",hf,null,512),v.hasTooltip?(r(),f("div",{key:0,ref:"tooltip",class:"lightweight-chart-tooltip",style:V(h.tooltipStyle),onMousemove:e[0]||(e[0]=O((()=>{}),["stop"]))},[E(t.$slots,"tooltip",{info:h.tooltipInfo},void 0,!0)],36)):I("",!0),E(t.$slots,"default",{},void 0,!0),a.hasLegends?(r(),f("div",ff,[(r(!0),f(p,null,d(a.chartData,((e,i)=>(r(),n(m,{key:e.legend.id,style:V({"--checkbox-square-background-color":e.legend.color}),label:`${i}`,value:h.legends.includes(`${i}`),onInput:t=>v.onChangeLegends(t,i)},{default:o((()=>[c(l(t.$t(e.legend.legendName)),1)])),_:2},1032,["style","label","value","onInput"])))),128))])):I("",!0)])}],["__scopeId","data-v-95aaa661"]]),df={class:"market-chart"},vf={class:"chart-tooltip"},mf={class:"tooltip-date"},yf={class:"tooltip-price"},gf={class:"link-text"},bf=qe(y({__name:"MarketChart",props:{marketChart:{default:()=>({})},priceFormats:{default:()=>({})}},emits:["update:marketChart"],setup(t,{emit:e}){const{marketDetailLightweightChartsOptions:i}=lt,n=t,c=e,h=_(),p=g({get:()=>n.marketChart,set(t){c("update:marketChart",t)}}),d=g((()=>[{name:h.t("t.24h"),value:We.twentyFourHour},{name:h.t("t.1w"),value:We.oneWeek},{name:h.t("t.1m"),value:We.oneMonth},{name:h.t("t.1y"),value:We.oneYear},{name:h.t("t.5y"),value:We.fiveYear}]));function v(t){const{period:e}=p.value.filter;switch(!0){case e===We.twentyFourHour:return H(t,"HH:mm");case e===We.oneWeek:case e===We.oneMonth:return H(t,"MMM dd HH:mm");case e===We.oneYear:case e===We.fiveYear:return H(t,"MMM dd")}}return(t,e)=>(r(),f("div",df,[a(La,{result:p.value.filter.period,"onUpdate:result":e[0]||(e[0]=t=>p.value.filter.period=t),class:"chart-period-selector",size:u(Da).M,list:d.value},null,8,["result","size","list"]),a(pf,{class:"chart",chartData:p.value.chartData,timeFormatter:v,chartOptions:u(i)},{tooltip:o((({info:e})=>[s("div",vf,[s("div",mf,l(t.$filters.formatDate(e.time,"MM/dd/yyyy HH:mm")),1),s("div",yf,l(t.$filters.formatNumber(e.price,t.priceFormats.marketPrice)),1)])])),default:o((()=>[s("a",{class:"trading-view-link",target:"_blank",href:"https://www.tradingview.com"},[a(xa,{class:"trading-view-icon"}),s("span",gf,l(t.$t("t.chartByTradingView")),1)])])),_:1},8,["chartData","chartOptions"])]))}}),[["__scopeId","data-v-229df90a"]]),wf={class:"market-change"},Sf={class:"high-low-compare-container"},_f={class:"market-change-info-title"},Cf={class:"high-low-compare"},Mf={class:"price-container"},kf={class:"price-type"},xf={class:"price-value",dir:"ltr"},Tf={class:"price-container"},Ef={class:"price-type"},Df={class:"price-value",dir:"ltr"},Lf={class:"others-info"},Of={class:"change-info"},If={class:"market-change-info-title"},Bf={class:"volume-info"},Pf={class:"market-change-info-title"},Af={class:"volume-value",dir:"ltr"},Nf={class:"market-cap-info"},Ff={class:"market-change-info-title"},zf={class:"market-cap-value",dir:"ltr"},Rf=qe(y({__name:"MarketChange",props:{market:{default:()=>({})},marketCap:{default:null},priceFormats:{default:()=>({})},priceChangeFormatter:{type:Function,default:t=>Number(t).toString()}},setup(t){const{enable24hVolume:e}=Nt;return(t,i)=>(r(),f("div",wf,[s("div",Sf,[s("div",_f,[s("span",null,l(t.$t("t.24h"))+" "+l(t.$t("t.high"))+"/"+l(t.$t("t.low")),1)]),s("div",Cf,[s("div",Mf,[s("div",kf,l(t.$t("t.high")),1
13),s("div",xf,l(t.$filters.formatNumber(t.market.highestPrice,t.priceFormats.marketPrice)),1)]),i[0]||(i[0]=s("div",{class:"separator"},null,-1)),s("div",Tf,[s("div",Ef,l(t.$t("t.low")),1),s("div",Df,l(t.$filters.formatNumber(t.market.lowestPrice,t.priceFormats.marketPrice)),1)])])]),s("div",Lf,[s("div",Of,[s("div",If,l(t.$t("marketTokenDetail.marketInfo.change.title",{period:t.$t("t.24h")})),1),s("div",{dir:"ltr",class:b(["change-value",{increase:t.market.change>0,decrease:t.market.change<0}])},l(t.priceChangeFormatter(t.market.change)),3)]),u(e)?(r(),f(p,{key:0},[i[1]||(i[1]=s("div",{class:"separator"},null,-1)),s("div",Bf,[s("div",Pf,l(t.$t("marketTokenDetail.marketInfo.volume.title",{period:t.$t("t.24h")})),1),s("div",Af,l(t.$filters.formatNumber(t.market.volume,t.priceFormats.marketVolume)),1)])],64)):I("",!0),i[2]||(i[2]=s("div",{class:"separator"},null,-1)),s("div",Nf,[s("div",Ff,l(t.$t("marketTokenDetail.marketInfo.marketCap.title")),1),s("div",zf,l(t.$filters.formatNumber(t.marketCap,t.priceFormats.marketCap)),1)])])]))}}),[["__scopeId","data-v-aa42f59d"]]),$f={class:"market-summary"},jf={class:"title"},Vf={class:"content"},Wf={dir:"ltr"},Hf={dir:"ltr"},Kf={dir:"ltr"},Gf={dir:"ltr"},Yf={dir:"ltr"},Uf={dir:"ltr"},Xf={dir:"ltr"},qf={dir:"ltr"},Zf=qe(y({__name:"MarketSummary",props:{currencyInfo:{default:()=>({})},computedQuote:{default:""},market:{default:()=>({})},marketCap:{default:null},priceFormats:{default:()=>({})},priceChangeFormatter:{type:Function,default:t=>Number(t).toString()},symbolInfo:{default:()=>({})}},setup(t){const e=t,n=g((()=>pt(e.market.lastPrice,e.priceFormats.marketPrice))),u=g((()=>pt(e.marketCap,e.priceFormats.marketCap))),c=g((()=>pt(e.market.volume,e.priceFormats.marketVolume))),h=g((()=>e.priceChangeFormatter(e.market.change,{isHidePlus:!0}))),p=g((()=>pt(e.market.lowestPrice,e.priceFormats.marketPrice))),d=g((()=>pt(e.market.highestPrice,e.priceFormats.marketPrice)));return(t,e)=>{const v=i("i18n-t");return r(),f("div",$f,[s("div",jf,l(t.$t("marketTokenDetail.summary.title",{currency:t.currencyInfo.shortName})),1),s("div",Vf,[a(v,{keypath:"marketTokenDetail.summary.description",class:"summary-description",tag:"div"},{currency:o((()=>[s("span",Wf,l(t.symbolInfo.marketSymbol),1)])),quote:o((()=>[s("span",Hf,l(t.computedQuote),1)])),lastPrice:o((()=>[s("span",Kf,l(n.value),1)])),marketCap:o((()=>[s("span",Gf,l(u.value),1)])),volume:o((()=>[s("span",Yf,l(c.value),1)])),change:o((()=>[s("span",Uf,l(h.value),1)])),lowestPrice:o((()=>[s("span",Xf,l(p.value),1)])),highestPrice:o((()=>[s("span",qf,l(d.value),1)])),_:1})])])}}}),[["__scopeId","data-v-895bfac1"]]),Jf={class:"admin-banner"},Qf=["src"],tp=qe(y({__name:"AdminBanner",props:{adminBannerInfo:{default:()=>({})}},setup(t){const e=t,i=g((()=>e.adminBannerInfo.url?"a":"div"));return(t,e)=>(r(),f("div",Jf,[(r(),n(m(i.value),{class:"admin-banner-link",href:t.adminBannerInfo.url},{default:o((()=>[s("img",{class:"image",src:t.adminBannerInfo.image},null,8,Qf)])),_:1},8,["href"]))]))}}),[["__scopeId","data-v-1904e5a6"]]),ep=["innerHTML"],ip=qe(y({__name:"AdminArticle",props:{article:{default:""}},setup(t){const e=C(!1),i=C(!1),n=C(!0),o=k("containerRef"),a=k("articleRef");const l=Ct((function(t){var e;const{offsetHeight:r,scrollTop:o}=t.target;i.value=r+o>=((null==(e=a.value)?void 0:e.offsetHeight)??0),n.value=0===o}),300);return x((()=>{var t,i;e.value=((null==(t=o.value)?void 0:t.offsetHeight)??0)<((null==(i=a.value)?void 0:i.offsetHeight)??0)})),(t,c)=>(r(),f("div",{ref_key:"containerRef",ref:o,class:b(["admin-article",{"show-more-article":e.value&&!i.value,"show-previous-article":e.value&&!n.value}]),onScroll:c[0]||(c[0]=(...t)=>u(l)&&u(l)(...t))},[s("div",{ref_key:"articleRef",ref:a,class:"article-context",innerHTML:t.article},null,8,ep)],34))}}),[["__scopeId","data-v-36895227"]]),np=["href"],rp={class:"left image-container"},op=["src"],sp={class:"right"},ap={class:"blog-date"},lp={class:"blog-title"},up=["innerHTML"],cp=qe(y({__name:"AdminBlogs",props:{blogs:{default:()=>[]},isSlideMode:{type:Boolean,default:!1}},setup(t){const e=t,i=g((()=>e.isSlideMode&&!h.value)),a=g((()=>i.value?Je:"div")),c=g((()=>0===e.blogs.length)),h=g((()=>1===e.blogs.length)),y=g((()=>i.value?{isShowCustomPaging:!0,autoWidth:!0,options:{loop:!0,autoplay:!0,interval:3e3}}:{}));return(t,e)=>{const h=w("track");return c.value?I("",!0):(r(),n(m(a.value),v({key:0},y.value,{class:["blogs",{"blog-list":!i.value,"slider-blogs":i.value}]}),{default:o((()=>[(r(!0),f(p,null,d(t.blogs,(e=>(r(),f("div",{key:e.id,class:"blog-item-wrapper"},[S((r(),f("a",{class:"blog-item",target:"_blank",href:e.link},[s("div",rp,[s("img",{class:"image",src:e.imageUrl},null,8,op)]),s("div",sp,[s("div",ap,l(t.$filters.formatDate(e.publishedDate,"MMMM dd, yyyy")),1),s("div",lp,l(e.title),
131),s("div",{class:"blog-content",innerHTML:e.excerpt},null,8,up)])],8,np)),[[h,{mixpanel:{name:u(Yi)},posthog:{name:u(Yi)}}]])])))),128))])),_:1},16,["class"]))}}}),[["__scopeId","data-v-bc630fad"]]),hp={BUY:"BUY",SELL:"SELL"},fp={ORDER_TYPE:hp.BUY,BASE_TYPE:"crypto",TIMELINE_TIME:1e5},pp={INIT:"init",CONFIRMED:"confirmed",TIMEOUT:"timeout",REFRESH:"refresh",FORCE:"force"},dp="otc_contact_form",vp="otcContext";function mp(){const t=C(fp.ORDER_TYPE),e=C(pp.INIT),i=C({});function n(){i.value={},e.value=pp.INIT}return K(vp,(t=>{const e={};return Object.defineProperties(e,Object.keys(t).reduce(((e,i)=>{const n={enumerable:!0},r=t[i]||{};return"function"==typeof r?n.value=r:"get"in r&&r.get&&(n.get=r.get),e[i]=n,e}),{})),e})({quoteState:{get:()=>e.value},setQuoteState:t=>{e.value=t||pp.INIT},clearQuote:n})),{orderType:t,quoteState:e,quoteData:i,clearQuote:n}}function yp(){const t=G(vp);if(!t)throw new Error("useOtcQuoteInjector must be used within useOtcQuoteProvider");return t}const gp=Y("otcStore",(()=>{const{getAssetScaleByCurrency:t}=Zt(),e=C(),i=C([]),n=C({}),r=g((()=>i.value.map((t=>t.assetName))));async function o(){try{const e=await Qt.getOtcMarkets();i.value=e.map((e=>{const{alias:i,assetName:r,supportQuoteCurrencies:o,minBaseSize:s,maxBaseSize:a,minQuoteSizes:l,maxQuoteSizes:u}=e;i&&r!==i&&(n.value[r]=i);const c=t(r);return{assetName:r,supportQuoteCurrencies:o,minBaseSize:D(s).dp(c,D.ROUND_UP).toFixed(),maxBaseSize:D(a).dp(c,D.ROUND_DOWN).toFixed(),minQuoteSizes:l,maxQuoteSizes:u}}))}catch(r){}finally{0===i.value.length&&(e.value=setTimeout(o,1e3))}}const s=Jt(o,300);return{otcCurrencies:i,currencyAliasMap:n,otcFromCurrencies:r,fetchMarkets:o,debounceFetchMarkets:s,clearRetryFetchMarketTimer:function(){clearTimeout(e.value)}}})),bp={assetName:"",supportQuoteCurrencies:[],minBaseSize:"",maxBaseSize:"",minQuoteSizes:[],maxQuoteSizes:[]},wp={currency:"",minQuoteSize:"",maxQuoteSize:""},Sp={class:"otc-block border-box"},_p=qe(y({__name:"OtcBlock",props:{theme:{default:""}},setup:t=>(t,e)=>(r(),f("div",Sp,[E(t.$slots,"default",{},void 0,!0)]))}),[["__scopeId","data-v-69fc71be"]]),Cp=["readonly","placeholder"],Mp=qe(y({__name:"OtcInput",props:{isNewStyle:{type:Boolean,default:!1},radioValue:{default:()=>Date.now()},radio:{default:""},model:{default:""},readonly:{type:Boolean,default:!1},refName:{default:"otcCryptoInput"},currentRef:{default:""},placeholder:{default:"-"},onSubmitClick:{type:Function,default:()=>{}},decimalLimit:{default:te}},emits:["keydown","update:model","update:radio","update:currentRef"],setup(t,{expose:e,emit:a}){const l=t,u=a,c=C(null),h=C(null),p=g((()=>{var t,e;return l.isNewStyle?(null==(e=null==(t=c.value)?void 0:t.$refs)?void 0:e[l.refName])??null:h.value})),v=g({get:()=>l.model||"",set(t){let e=String(t);if("."===e&&(e="0."),isNaN(Number(e)))return;let i=e;if(i.includes(".")){i.split(".")[1].length>Number(l.decimalLimit)&&(i=D(i).toFixed(Number(l.decimalLimit),D.ROUND_DOWN))}u("update:model",i)}});function m(){"0"!==l.model&&l.onSubmitClick()}function y(){u("update:radio",l.radioValue),u("update:currentRef",l.refName)}return e({focus:function(){var t;null==(t=p.value)||t.focus(),u("update:radio",l.radioValue)},onRadioClick:y}),x((()=>{var t;l.currentRef===l.refName&&(null==(t=p.value)||t.focus())})),(t,e)=>{const a=i("BrandInput");return t.isNewStyle?(r(),n(a,{key:0,ref_key:"brandInput",ref:c,value:v.value,"onUpdate:value":e[0]||(e[0]=t=>v.value=t),isPrice:"",isBrandNewStyle:"",class:"common-input text-align-right",readonly:t.readonly,placeholder:t.placeholder,refName:t.refName,onKeydown:[e[1]||(e[1]=e=>t.$emit("keydown",e)),U(m,["enter"])],onClick:y},L({_:2},[d(t.$slots,((e,i)=>({name:i,fn:o((()=>[E(t.$slots,i,{},void 0,!0)]))})))]),1032,["value","readonly","placeholder","refName"])):(r(),f("div",{key:1,class:"otc-input",onClick:y,onKeydown:[e[3]||(e[3]=e=>t.$emit("keydown",e)),U(m,["enter"])]},[S(s("input",{ref:t=>h.value=t,"onUpdate:modelValue":e[2]||(e[2]=t=>v.value=t),class:"otc-input-block-input__input",readonly:t.readonly,placeholder:t.placeholder,"aria-autocomplete":"none"},null,8,Cp),[[X,v.value]]),E(t.$slots,"suffix",{},void 0,!0)],32))}}}),[["__scopeId","data-v-1bd25a7b"]]),kp=qe(y({__name:"OtcButton",props:{isNewStyle:{type:Boolean,default:!1},text:{default:""},styleType:{default:""},disabled:{type:Boolean,default:!1},isFill:{type:Boolean,default:!1}
13,noBackground:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1}},emits:["click"],setup(t){const e=t,i=g((()=>e.isNewStyle?{green:e.styleType===hp.BUY,red:e.styleType===hp.SELL,block:e.isFill,"no-background":e.noBackground}:["otc-button",{"otc-button--buy":e.styleType===hp.BUY,"otc-button--sell":e.styleType===hp.SELL,"otc-button--disabled":e.disabled,"otc-button--fill":e.isFill,"no-background":e.noBackground}]));return(t,e)=>(r(),n(m(t.isNewStyle?"BaseButton":"span"),{size:"large",class:b(i.value),disabled:t.disabled,onClick:e[0]||(e[0]=e=>t.$emit("click",e))},{default:o((()=>[c(l(t.text),1)])),_:1},8,["class","disabled"]))}}),[["__scopeId","data-v-49563ff9"]]),xp={key:0,class:"content-wrap"},Tp={class:"action-wrapper"},Ep={class:"info-wrap"},Dp={key:0,class:"text"},Lp={key:1,class:"text"},Op={key:2,class:"balance"},Ip={key:0,class:"invalid-message"},Bp={class:"action-wrapper"},Pp={class:"info-wrap"},Ap={key:0,class:"text"},Np={key:1,class:"text"},Fp={key:2,class:"balance"},zp={key:0,class:"invalid-message"},Rp={class:"otc-panel-footer"},$p={class:"try-time"},jp=qe(y({__name:"OtcPanelForm",props:{data:{default:()=>({})},isQuoteWaiting:{type:Boolean,default:!1},orderType:{default:fp.ORDER_TYPE},customCryptoType:{default:null},isNewStyle:{type:Boolean,default:!1},isHideDropdown:{type:Boolean,default:!1},isShowDepositWithCreditCard:{type:Boolean,default:!0},isCustomSubmit:{type:Boolean,default:!1},isHideBalance:{type:Boolean,default:!1},isShowSeparator:{type:Boolean,default:!1}},emits:["update:data","onOrderTypeChange","update:isQuoteWaiting","updateMarketList","update:inputUpdate","submit"],setup(i,{emit:c}){const{enableCreditCard:h,otcDefaultSelect:p,debitCardLogoList:d}=lt,v={crypto:fp.BASE_TYPE,fiat:"fiat"},m="inputFiat",y="inputCrypto",k=i,x=c,T=q(),E=t(),L=_(),O=it(),{isTradingCountry:B,currencyMap:A,loginState:N,lang:F,isSubAccount:z}=e(O),{getAssetScaleByCurrency:R}=Zt(),{showIdVerificationRequiredDialog:j}=gi(),{captureEvent:V}=vt(),W=gp(),{otcCurrencies:H,otcFromCurrencies:K}=e(W),G=yp(),Y=C(null),X=C(null),Z=C({}),J=C(v.crypto),Q=C(""),tt=C(T.params.buyCurrency||p.buyCurrency),et=C(""),nt=C(T.params.payCurrency||p.payCurrency),rt=C("otcCryptoInput"),ot=C(0),st=C(!1),at=g((()=>!!k.isShowDepositWithCreditCard&&(!!h&&(!z.value&&((null==d?void 0:d.length)??!1))))),ut=g((()=>N.value)),ct=g((()=>0===H.value.length||0===Object.keys(A.value).length)),ht=g({get:()=>k.data,set(t){x("update:data",t)}}),ft=g({get:()=>G.quoteState,set(t){G.setQuoteState(t)}}),dt=g((()=>k.orderType===hp.BUY)),mt=g((()=>J.value===v.crypto)),yt=g((()=>J.value===v.fiat)),gt=g((()=>Boolean(Object.keys(ht.value).length))),bt=g((()=>!B.value||!(Q.value||et.value)||Ft.value||zt.value)),wt=g((()=>{const t=dt.value?nt.value:tt.value,e=R(t),{available:i=0}=function(t){const e=Rt(t);return A.value[e]||{}}(t),n=D(i).dp(e,D.ROUND_DOWN).toFixed();return ee(n)})),St=g((()=>`${L.t("convert.available.mobile")} ${wt.value} ${dt.value?nt.value:tt.value}`)),_t=g((()=>dt.value?L.t("otc.button.quote.buy"):L.t("otc.button.quote.sell"))),Ct=g((()=>0===ot.value||3===ot.value?"":`(Trying... ${ot.value})`)),Mt=g((()=>H.value.find((t=>t.assetName===tt.value))||bp)),kt=g((()=>{let t=[],e=[];const{supportQuoteCurrencies:i,minQuoteSizes:n,maxQuoteSizes:r}=Mt.value;return i.forEach(((i,o)=>{const s=Rt(i),a=A.value[s];if(!a)return;const l=R(s),u={currency:i,minQuoteSize:D(n[o]).dp(l,D.ROUND_UP).toFixed(),maxQuoteSize:D(r[o]).dp(l,D.ROUND_DOWN).toFixed()};a.available?t.push(u):e.push(u)})),t=t.sort(ie((t=>t.currency))),e=e.sort(ie((t=>t.currency))),t.concat(e)})),xt=g((()=>kt.value.map((t=>t.currency)))),Tt=g((()=>kt.value.find((t=>t.currency===nt.value))||wp)),Et=g((()=>ne(wt.value))),Dt=g((()=>Et.value<=0)),Lt=g((()=>({orderAmountInBaseCurrency:mt.value?Q.value:"0",orderAmountInQuoteCurrency:yt.value?et.value:"0",side:k.orderType,baseCurrency:tt.value,quoteCurrency:nt.value}))),Ot=g((()=>{const{minBaseSize:t,maxBaseSize:e}=Mt.value;return`${t}-${e}`})),It=g((()=>R(tt.value))),Bt=g((()=>{const{minQuoteSize:t,maxQuoteSize:e}=Tt.value;return`${t}-${e}`})),Pt=g((()=>R(nt.value))),At=g((()=>{const{minBaseSize:t,maxBaseSize:e}=Mt.value,i=D(Q.value);return i.lt(t)?L.t("otc.limit.min.v2",{min:t}):i.gt(e)?L.t("otc.limit.max.v2",{max:e}):""})),Nt=g((()=>{const{minQuoteSize:t,maxQuoteSize:e}=Tt.value,i=D(et.value);return i.lt(t)?L.t("otc.limit.min.v2",{min:Jt(t)}):i.gt(e)?L.t("otc.limit.max.v2",{max:Jt(e)}):""})),Ft=g((()=>Boolean(At.value))),zt=g((()=>Boolean(Nt.value)));function Rt(t){return Z.value[t]||t}function $t(){x("update:inputUpdate",!0)}function jt(t,e){var i,n;switch(t.preventDefault(),e){case m:null==(i=Y.value)||i.focus();break;case y:null==(n=X.value)||n.focus()}}function Vt(){ft.value=gt.value?pp.FORCE:pp.INIT,k.isCustomSubmit?x("submit",Lt.value):Gt()}function Wt(){ot.value=0}async function Ht(t,e){try{return await Qt.getOtcQuote(t)}catch(i){if(function(t){ot.value=3-t+1}(e),1===e)throw i;return await new Promise((t=>setTimeout(t,3e3))),Ht(t,e-1)}}function Gt(){st.value=!0,""!==Q.value||""!==et.value?Ht(Lt.value,3).then(Yt).catch(Ut).finally((()=>{st.value=!1})):G.clearQuote()}function Yt(t){var e;x("update:isQuoteWaiting",!0),Wt(),e=t,ht.value={quoteState:ft.value,quoteId:e.quoteId,orderType:k.orderType,buyCurrency:tt.value,payCurrency:nt.value,cryptoAmount:dt.value?e.receiveAmount:e.deductAmount,priceEachCrypto:e.priceInOrderCurrency,totalPrice:dt.value?e.deductAmount:e.receiveAmount,usdPrice:e.priceInUSD,expiredTime:1e3*e.ttl},[pp.TIMEOUT,pp.FORCE].includes(ft.value)&&(ft.value=pp.REFRESH)}function Ut(){x("update:isQuoteWaiting",!0),Wt(),G.clearQuote(),x("update:isQuoteWaiting",!1)}function Xt(){ue({entryChannel:ce.otc}),V("deposit_entrance",{entry_channel:"otc"}),E.push({name:Kt.DEPOSIT,params:{lang:F.value},query:{currency:lt.baseCurrency,provider:fe.PIQ,method:he.CREDIT_CARD}})}async function qt(){await P(),dt.value?et.value=Et.value:Q.value=Et.value}function Jt(t){return pt(t,{minDigits:0})}return $((async()=>{await W.debounceFetchMarkets(),async function(){const{orderAmountInBaseCurrency:t,orderAmountInQuoteCurrency:e,side:i,baseCurrency:n,quoteCurrency:r}=T.query;n&&(tt.value=n),r&&(nt.value=r),Number(t)?(J.value=v.crypto,await P(),Q.value=Number(t)):Number(e)&&(J.value=v.fiat,await P(),et.value=Number(e)),i&&x("onOrderTypeChange",i
13),bt.value||(Vt(),E.replace({query:{}}))}()})),M(ct,(async t=>{t||await P()})),M((()=>T.params),(({buyCurrency:t,payCurrency:e})=>{t&&(tt.value=t),e&&(nt.value=e)})),M(nt,(()=>{et.value="",$t()})),M([Q,et],(()=>{$t()})),M((()=>G.quoteState),(t=>{t===pp.TIMEOUT&&Gt()})),M(J,(()=>{Q.value="",et.value=""})),M((()=>k.customCryptoType),(t=>{t&&(tt.value=t)}),{immediate:!0}),M(tt,((t,e)=>{Q.value="",t===nt.value?nt.value=xt.value.includes(e)?e:xt.value[0]:xt.value.includes(nt.value)?$t():nt.value=xt.value[0]})),M((()=>k.orderType),(()=>{x("onOrderTypeChange",k.orderType),x("update:isQuoteWaiting",!1)})),M(K,(t=>{x("updateMarketList",t),t.length&&!t.includes(tt.value)&&(tt.value=t[0])}),{deep:!0}),(t,e)=>{const i=w("loading");return S((r(),n(_p,{class:b(["otc-panel-form",{"show-input-separator":t.isShowSeparator}])},{default:o((()=>[ct.value?I("",!0):(r(),f("div",xp,[s("div",Tp,[s("div",Ep,[dt.value?(r(),f("span",Dp,l(t.$t("t.buy")),1)):(r(),f("span",Lp,l(t.$t("t.sell")),1)),!dt.value&&ut.value?(r(),f("span",Op,l(St.value),1)):I("",!0)]),s("div",{class:b(["input-wrap",{"input-invalid":Ft.value}])},[a(ti,{id:u(se)("input_amount_from"),ref_key:"inputCryptoRef",ref:X,radio:J.value,"onUpdate:radio":e[0]||(e[0]=t=>J.value=t),model:Q.value,"onUpdate:model":e[1]||(e[1]=t=>Q.value=t),currentRef:rt.value,"onUpdate:currentRef":e[2]||(e[2]=t=>rt.value=t),selectedCurrency:tt.value,"onUpdate:selectedCurrency":e[3]||(e[3]=t=>tt.value=t),class:"input-currency-dropdown",inputComponent:Mp,radioValue:v.crypto,isNewStyle:t.isNewStyle,refName:"otcCryptoInput",onSubmitClick:Vt,placeholder:Ot.value,decimalLimit:It.value,isShowMaxBtn:!dt.value,isMaxBtnDisable:Dt.value,appliedCurrencyList:u(K),currencyAliasMap:Z.value,showBalance:!dt.value,showI18nAssetName:dt.value,isFilterShown:!1,barTextSize:t.isNewStyle?u(oe).BIG:u(oe).BIGGER,isHideDropdown:t.isHideDropdown,sortingStrategy:u(re).FIXED_PRIORITY,currencyDropdownIdPrefix:"otc_panel_form",currencyDropdownIdSuffix:"buy",isAppendListToBody:"",onMaxClick:qt,onKeydown:e[4]||(e[4]=U((t=>jt(t,m)),["tab"]))},null,8,["id","radio","model","currentRef","selectedCurrency","radioValue","isNewStyle","placeholder","decimalLimit","isShowMaxBtn","isMaxBtnDisable","appliedCurrencyList","currencyAliasMap","showBalance","showI18nAssetName","barTextSize","isHideDropdown","sortingStrategy"])],2),At.value?(r(),f("div",Ip,l(At.value),1)):I("",!0)]),s("div",Bp,[s("div",Pp,[dt.value?(r(),f("span",Ap,l(t.$t("otc.wallet.pay")),1)):(r(),f("span",Np,l(t.$t("otc.wallet.sell")),1)),dt.value&&ut.value&&!t.isHideBalance?(r(),f("span",Fp,l(St.value),1)):I("",!0)]),s("div",{class:b(["input-wrap",{"input-invalid":zt.value}])},[a(ti,{ref_key:"inputFiatRef",ref:Y,model:et.value,"onUpdate:model":e[5]||(e[5]=t=>et.value=t),radio:J.value,"onUpdate:radio":e[6]||(e[6]=t=>J.value=t),currentRef:rt.value,"onUpdate:currentRef":e[7]||(e[7]=t=>rt.value=t),selectedCurrency:nt.value,"onUpdate:selectedCurrency":e[8]||(e[8]=t=>nt.value=t),class:"input-currency-dropdown",inputComponent:Mp,radioValue:v.fiat,isNewStyle:t.isNewStyle,unitText:nt.value,refName:"otcFiatInput",onSubmitClick:Vt,placeholder:Bt.value,decimalLimit:Pt.value,isShowMaxBtn:dt.value,isMaxBtnDisable:Dt.value,walletAction:u(ae).OTC,appliedCurrencyList:xt.value,showBalance:dt.value,showI18nAssetName:!dt.value,barTextSize:t.isNewStyle?u(oe).BIG:u(oe).BIGGER,isHideDropdown:t.isHideDropdown,sortingStrategy:dt.value?u(re).BALANCE_DESC:u(re).TOKEN_NAME_ASC,currencyDropdownIdPrefix:"otc_panel_form",currencyDropdownIdSuffix:"pay_with",isAppendListToBody:"",onMaxClick:qt,onKeydown:e[9]||(e[9]=U((t=>jt(t,y)),["tab"]))},null,8,["model","radio","currentRef","selectedCurrency","radioValue","isNewStyle","unitText","placeholder","decimalLimit","isShowMaxBtn","isMaxBtnDisable","walletAction","appliedCurrencyList","showBalance","showI18nAssetName","barTextSize","isHideDropdown","sortingStrategy"])],2),Nt.value?(r(),f("div",zp,l(Nt.value),1)):I("",!0)]),at.value&&dt.value?(r(),f("div",{key:0,class:"deposit-wrap",onClick:Xt},[s("span",null,l(t.$t("otc.deposit.credit_card")),1),a(Mi)])):I("",!0)])),s("div",Rp,[a(kp,{class:"otc-panel-form__button",isNewStyle:t.isNewStyle,text:_t.value,disabled:bt.value||st.value||t.isQuoteWaiting,styleType:t.orderType,isFill:!0,isLoading:st.value,onClick:e[10]||(e[10]=t=>{j(le.OTC.BUY)||Vt()})},null,8,["isNewStyle","text","disabled","styleType","isLoading"]),s("div",$p,l(Ct.value),1)])])),_:1},8,["class"])),[[i,ct.value]])}}}),[["__scopeId","data-v-d35cabf4"]]),Vp={class:"otc-card"},Wp=qe(y({__name:"OtcForm",props:{symbolInfo:{default:()=>({})}},emits:["updateOtcMarketList"],setup(i,{emit:n}){const o=t(),s=it(),{lang:l}=e(s),{quoteData:c}=mp(),h=n,p=C(!1);function d(t){h("updateOtcMarketList",t)}function v(t){!function({trading_pair:t=""}={}){const{captureEvent:e}=vt();mt.track(Gi,{s1:t}),e(Gi,{trading_pair:t})}({trading_pair:t.baseCurrency}),o.push({name:Kt.OTC,params:{lang:l.value},query:t})}return(t,e)=>(r(),f("div",Vp,[a(jp,{data:u(c),"onUpdate:data":e[0]||(e[0]=t=>Z(c)?c.value=t:null),inputUpdate:p.value,"onUpdate:inputUpdate":e[1]||(e[1]=t=>p.value=t),isNewStyle:"",isHideDropdown:"",isCustomSubmit:"",isHideBalance:"",isShowSeparator:"",orderType:u(hp).BUY,isShowDepositWithCreditCard:!1,customCryptoType:t.symbolInfo.baseCurrency,onUpdateMarketList:d,onSubmit:v},null,8,["data","inputUpdate","orderType","customCryptoType"])]))}}),[["__scopeId","data-v-6709a8a4"]]),Hp={class:"card"},Kp={key:0,class:"card-title"},Gp={class:"card-content"};const Yp=qe({}
13,[["render",function(t,e){return r(),f("div",Hp,[t.$slots.title?(r(),f("div",Kp,[E(t.$slots,"title",{},void 0,!0)])):I("",!0),s("div",Gp,[E(t.$slots,"default",{},void 0,!0)])])}],["__scopeId","data-v-43ead243"]]),Up={class:"trade-info"},Xp={class:"trade-pair"},qp={class:"trade-symbol"},Zp={key:0,class:"trade-quote"},Jp={class:"trade-detail"},Qp={class:"trade-action"},td=qe(y({__name:"MarketTrade",props:{markets:{default:()=>[]},currencyType:{default:""},currencyInfo:{}},setup(t){const{spotTradeDefaultQuoteCurrency:e}=lt;return(t,h)=>{const v=i("BaseButton"),m=i("RouterLink"),y=w("track");return r(),n(Yp,{class:"market-trade"},{title:o((()=>[c(l(t.$t("marketTokenDetail.tradeNow.title"))+" ",1),a(He,{class:"card-icon"})])),default:o((()=>[(r(!0),f(p,null,d(t.markets,(i=>{var n,h;return S((r(),f("div",{key:i.symbol},[a(m,{class:"trade-item",to:i.route},{default:o((()=>[a(dt,{size:"24",class:"trade-icon",showName:!1,type:t.currencyType,name:t.currencyInfo.shortName},null,8,["type","name"]),s("div",Up,[s("div",Xp,[s("span",qp,l(i.symbol),1),i.isSpot?(r(),f("span",Zp," / "+l(u(e)),1)):I("",!0)]),s("div",Jp,[s("span",null,l(t.$filters.digitalCurrency(t.currencyInfo.shortName)),1)])]),s("div",Qp,[a(v,{class:"primary",size:u(nt).XS},{default:o((()=>[c(l(t.$t("t.trade")),1)])),_:1},8,["size"])])])),_:2},1032,["to"])])),[[y,{mixpanel:{name:u(Li),props:{s1:u(Ei).tradeNow,s2:(null==(n=i.route.params)?void 0:n.id)||"",s3:u(Di).detail}},posthog:{name:u(Li),props:{tab:u(Ei).tradeNow,trading_pair:(null==(h=i.route.params)?void 0:h.id)||"",page:u(Di).detail}}}]])})),128))])),_:1})}}}),[["__scopeId","data-v-e3f1545a"]]),ed={class:"card-content"},id={class:"overview-currency"},nd={class:"overview-currency-short-name"},rd={class:"overview-currency-name"},od={class:"overview-trade"},sd={class:"overview-price",dir:"ltr"},ad=qe(y({__name:"MarketOverview",props:{isSlideMode:{type:Boolean,default:!1},quote:{default:lt.baseCurrency},tradeOverview:{default:()=>[]},priceFormats:{default:()=>({})},priceChangeFormatter:{type:Function,default:t=>t}},setup(t){const h=t,y=it(),{lang:_}=e(y),{getMarketSymbolFromBaseCurrency:C}=xt(),M=g((()=>h.isSlideMode?Je:"div")),k=g((()=>h.isSlideMode?{isShowCustomPaging:!0,options:{loop:!0,autoplay:!0,interval:3e3}}:{}));function x(t){return C(t)}return(t,e)=>{const h=i("RouterLink"),y=w("track");return r(),n(m(M.value),v(k.value,{class:"market-overview"}),{default:o((()=>[(r(!0),f(p,null,d(t.tradeOverview,(e=>(r(),f("div",{key:e.title,class:b({"card-container":t.isLargeSize})},[a(Yp,null,{title:o((()=>[c(l(e.title)+" ",1),(r(),n(m(e.icon),{class:"card-icon"}))])),default:o((()=>[s("div",ed,[(r(!0),f(p,null,d(e.list,(i=>S((r(),f("div",{key:i.baseCurrency},[a(h,{class:"overview-trade-list-item",to:{name:"tradingId",params:{lang:u(_),id:`${x(i.baseCurrency)}-${t.quote}`}}},{default:o((()=>{var e;return[a(dt,{size:"24",class:"overview-icon",showName:!1,name:i.baseCurrency},null,8,["name"]),s("div",id,[s("div",nd,l(x(i.baseCurrency)),1),s("div",rd,l(t.$filters.digitalCurrency(i.baseCurrency)),1)]),s("div",od,[s("div",sd,l(t.$filters.formatNumber(i.price,(null==(e=t.priceFormats)?void 0:e.overviewPrice)||0)),1),s("div",{class:b(["overview-change",{increase:i.change>0,decrease:i.change<0}]),dir:"ltr"},l(t.priceChangeFormatter(i.change)),3)])]})),_:2},1032,["to"])])),[[y,{mixpanel:{name:u(Li),props:{s1:e.trackKey,s2:`${x(i.baseCurrency)}-${t.quote}`,s3:u(Di).detail}},posthog:{name:u(Li),props:{tab:e.trackKey,trading_pair:`${x(i.baseCurrency)}-${t.quote}`,page:u(Di).detail}}}]]))),128))])])),_:2},1024)],2)))),128))])),_:1},16)}}}),[["__scopeId","data-v-5e8932d8"]]),ld="/tradeview",ud={getHistory:t=>pe.get(`${ld}/history`,{params:t}),getHistoryInAutoTrader:t=>pe.get(`${ld}/history/autotrader`,{params:t})},cd={class:"market-token-detail"},hd={class:"wrapper"},fd={class:"page-navigation"},pd={class:"text"},dd={class:"name"},vd={class:"short-name"},md={class:"info-container"},yd={class:"container-left"},gd={class:"market-section"},bd={key:0,class:"market-section"},wd={key:1,class:"market-section"},Sd={class:"container-right"},_d={key:0,class:"market-section"},Cd={class:"otc-card"},Md={class:"market-section trade-info-section"},kd={key:1,class:"market-section mobile-blogs-sections"},xd=qe(y({__name:"MarketTokenDetail",setup(t){const{enableOtc:c,spotTradeDefaultQuoteCurrency:p,isEnableMarketDetailArticlesBanner:d,isEnableMarketDetailArticles:v,isEnableMarketDetailBlogs:m}=lt,y=de(qt["--app--color--primary-light"]);y&&(y.opacity=.7);const b=de(qt["--app--color--primary-light"]);b&&(b.opacity=.05);const w={lineColor:qt["--app--color--primary-light"],topColor:null==y?void 0:y.formatRgb(),bottomColor:null==b?void 0:b.formatRgb(),lastValueVisible:!1,priceLineVisible:!1},C=q(),k=h(),x=_(),T=it(),{lang:E,currencyMap:L}=e(T),O=ve(),{marketStatsMap:B}=e(O),P=_e(),{spotMainQuoteCurrency:A}=e(P),N=J({lastPrice:0,change:0,highestPrice:0,lowestPrice:0,volume:0,circulatingSupply:0}),F=J({filter:{period:We.twentyFourHour},chartData:[]}),z=J({url:"",imageLangMapper:{}}),R=J({langMapper:{}}),$=J({list:[]}),j=J({list:[]}),V=J({newListings:[],topGainers:[],topLosers:[],highestVolume:[]}),W=xt(),{marketMap:H}=e(W),K=g((()=>k.state.futures.marketList)),G=g((()=>k.state.futures.marketMap)),{getSpotBaseCurrencyFromMarketSymbol
13:Y,getExchangeInfoBySymbol:U}=W,X=g((()=>{var t,e;return(null==(t=nt.value)?void 0:t.baseCurrency)&&(null==(e=rt.value)?void 0:e.symbol)})),Z=g((()=>{const{symbol:t=""}=C.params,e=t.split("-");let[i,n=Ke]=e;return{currency:i,quote:n,futuresSymbol:t,pair:t}})),nt=g((()=>{var t,e;const{futuresSymbol:i,pair:n}=Z.value,r=null==(t=G.value)?void 0:t[i],o={...null==(e=B.value)?void 0:e[n],priceFilter:U(n).priceDecimal},s=r||o,a=!!r;return s?Object.assign({},s,{isFutures:a,baseCurrency:a?null==r?void 0:r.baseCurrency:null==o?void 0:o.name,marketSymbol:a?"":null==o?void 0:o.name}):{}})),rt=g((()=>{var t,e,i;const n=Y(null==(t=nt.value)?void 0:t.marketSymbol),r=L.value[n];return Object.assign({fullName:(null==(e=nt.value)?void 0:e.isFutures)?me(null==(i=nt.value)?void 0:i.symbol,!0):null==r?void 0:r.shortName},r)})),ot=g((()=>{var t;return Ge.digitalCurrency(null==(t=rt.value)?void 0:t.shortName)})),st=g((()=>{var t;return(null==(t=rt.value)?void 0:t.isFiat)?ye.FIAT:ye.COIN})),at=g((()=>{var t,e,i;return(null==(t=nt.value)?void 0:t.isFutures)?null==(e=nt.value)?void 0:e.quoteCurrency:null==(i=Z.value)?void 0:i.quote})),ut=g((()=>{var t;return{marketPrice:{prefix:"$",formatKey:(null==(t=nt.value)?void 0:t.priceFilter)??0},marketVolume:{prefix:"$",formatKey:2},marketCap:{prefix:"$",formatKey:0,defaultValue:"-"},overviewPrice:{prefix:"$",formatKey:"max8"}}})),ct=g((()=>0==N.circulatingSupply?null:D(N.lastPrice).times(N.circulatingSupply).toNumber())),ht=g((()=>({image:z.imageLangMapper[E.value]??z.imageLangMapper[lt.defaultLanguage],url:z.url}
13))),ft=g((()=>!!ht.value.image)),vt=g((()=>R.langMapper[E.value]??R.langMapper[lt.defaultLanguage])),mt=g((()=>{var t;return(null==(t=nt.value)?void 0:t.marketSymbol)&&j.list.includes(nt.value.marketSymbol)})),yt=g((()=>{var t;const e=H.value[null==(t=nt.value)?void 0:t.marketSymbol];return e?[{...e,symbol:e.symbol,isSpot:!0,fullName:rt.value.name,route:{name:Ye,params:{id:`${e.symbol}-${p}`,lang:E.value}}}]:[]})),gt=g((()=>K.value.reduce(((t,e)=>{const i=G.value[e]||{};return i.baseCurrency===rt.value.shortName&&t.push({...i,isSpot:!1,fullName:me(i.symbol,!0),route:{name:Ue,params:{id:i.symbol,lang:E.value}}}),t}),[]))),bt=g((()=>[...yt.value,...gt.value])),St=g((()=>[{title:x.t("markets.newListings"),icon:Ce,trackKey:Ei.newListing,list:V.newListings},{title:x.t("markets.topGainers"),icon:wt,trackKey:Ei.topGainers,list:V.topGainers},{title:x.t("markets.topLosers"),icon:Ji,trackKey:Ei.topLosers,list:V.topLosers},{title:x.t("markets.highestVolume"),icon:Me,trackKey:Ei.highestVolume,list:V.highestVolume}].filter((t=>!!t.list.length))));function Ct(t,{isHidePlus:e=!1}={}){return null===t?"-":pt(D(t).times(100).toNumber(),{prefix:t>0&&!e?"+":"",formatKey:"max2",postfix:"%"})}async function Mt(){try{const t=new Date;let e;e=nt.value.isFutures?nt.value.tradingViewSymbol:Z.value.pair;const i={symbol:e,from:t,to:tt(t),resolution:"15"};switch(F.filter.period){case We.oneWeek:i.from=et(t,{weeks:1}),i.resolution="60";break;case We.oneMonth:i.from=et(t,{months:1}),i.resolution="360";break;case We.oneYear:i.from=et(t,{years:1}),i.resolution="1D";break;case We.fiveYear:i.from=et(t,{years:5}),i.resolution="1W";break;case We.twentyFourHour:default:i.from=et(t,{days:1}),i.resolution="15"}i.from=tt(i.from);const n=await ud.getHistory(i),{c:r,t:o}=n.data;if(o&&r){const t=o.map(((t,e)=>({time:1e3*t,value:r[e]})));F.chartData=[{chartType:sf,data:t,typeStyleOptions:w}]}else F.chartData=[]}catch(t){}}function kt(t){j.list=t}return M(X,(t=>{t&&async function(){var t;if(null==(t=nt.value)?void 0:t.isFutures)return;(async function(){var t;try{const{data:e}=await _t.getMarketDetail({baseCurrency:null==(t=nt.value)?void 0:t.baseCurrency,quoteCurrency:p});N.lastPrice=e.price,N.change=e.change,N.highestPrice=e.high,N.lowestPrice=e.low,N.volume=e.volume,N.circulatingSupply=e.circulatingSupply}catch(e){}})(),Mt(),async function(){if(!d)return;try{(await _t.getAdminMarketTokenGeneralSetting()).data.forEach((({settingType:t,settingMetadata:e})=>{const i=JSON.parse(e);switch(t){case be.banner:z.url=i[0].url;break;case be.image:z.imageLangMapper=i.reduce(((t,e)=>(t[e.lang]=e.imageName,t)),{})}}))}catch(t){}}(),async function(){var t;if(!v)return;try{const e=await _t.getAdminMarketTokenInfoDetail({tokenName:null==(t=nt.value)?void 0:t.baseCurrency});R.langMapper=e.data.reduce(((t,e)=>(t[e.lang]=e.tokenContent,t)),{})}catch(e){}}(),async function(){var t,e;if(!m)return;try{const[i,n]=await Promise.all([_t.getAdminLatestBlogs({page:1,pageSize:2}),_t.getAdminTokenBlogs()]),r=(null==(t=i.data)?void 0:t.posts)||[];$.list=r.concat((null==(e=n.data)?void 0:e.posts)||[]).slice(0,4)}catch(i){}}(),async function(){try{const t=await _t.getMarketsOverview({currency:A.value}),{newListings:e,topGainers:i,topLosers:n,highestVolume:r}=t.data;V.newListings=e.sort(((t,e)=>t.change-e.change)),V.topGainers=i,V.topLosers=n,V.highestVolume=r}catch(t){}}()}()}),{immediate:!0}),M(H,(()=>{const{symbol:t}=C.params,e=t.split("-")[0];Object.keys(H.value).length&&!H.value[e]&&window.location.replace(`/${E.value}/page-not-found`)}),{immediate:!0}),M((()=>F.filter),(()=>{Mt()}),{deep:!0}),(t,e)=>{const h=i("RouterLink");return r(),f("div",cd,[s("div",hd,[s("div",fd,[a(h,{class:"go-previous",to:{name:u(Kt).MARKETS,params:{lang:u(E)}}},{default:o((()=>[a(ge,{class:"icon"}),s("span",pd,l(t.$t("marketTokenDetail.navigation.goPrevious")),1)])),_:1},8,["to"])]),a(dt,{size:"32",class:"currency-info",type:st.value,name:rt.value.shortName},{default:o((()=>[s("span",dd,l(ot.value),1),s("span",vd,l(nt.value.marketSymbol),1)])),_:1},8,["type","name"]),s("div",md,[s("div",yd,[s("section",gd,[a(ka,{market:N,priceFormats:ut.value,priceChangeFormatter:Ct},null,8,["market","priceFormats"]),a(bf,{marketChart:F,"onUpdate:marketChart":e[0]||(e[0]=t=>F=t),class:"chart-container",priceFormats:ut.value},null,8,["marketChart","priceFormats"]),a(Rf,{class:"market-change-info",market:N,marketCap:ct.value,priceFormats:ut.value,priceChangeFormatter:Ct},null,8,["market","marketCap","priceFormats"]),a(Zf,{class:"market-summary-info",currencyInfo:rt.value,computedQuote:at.value,market:N,marketCap:ct.value,priceFormats:ut.value,priceChangeFormatter:Ct,symbolInfo:nt.value},null,8,["currencyInfo","computedQuote","market","marketCap","priceFormats","symbolInfo"]),ft.value?(r(),n(tp,{key:0,class:"admin-banner-info",adminBannerInfo:ht.value},null,8,["adminBannerInfo"])):I("",!0)]),vt.value?(r(),f("section",bd,[a(ip,{article:vt.value},null,8,["article"])])):I("",!0),t.isMobile?I("",!0):(r(),f("section",wd,[a(cp,{blogs:$.list},null,8,["blogs"])]))]),s("div",Sd,[X.value&&u(c)?S((r(),f("section",_d,[s("div",Cd,[a(Wp,{symbolInfo:nt.value,onUpdateOtcMarketList:kt},null,8,["symbolInfo"])])],512)),[[Q,mt.value]]):I("",!0),s("section",Md,[a(td,{markets:bt.value,currencyType:st.value,currencyInfo:rt.value},null,8,["markets","currencyType","currencyInfo"]),St.value.length?(r(),n(ad,{key:0,class:"market-overview-info",isSlideMode:t.isMobile,quote:at.value,tradeOverview:St.value,priceFormats:ut.value,priceChangeFormatter:Ct},null,8,["isSlideMode","quote","tradeOverview","priceFormats"])):I("",!0)]),t.isMobile?(r(),f("section",kd,[a(cp,{isSlideMode:"",blogs:$.list},null,8,["blogs"])])):I("",!0)])])])])}}}),[["__scopeId","data-v-c980a765"]]),Td=Object.freeze(Object.defineProperty({__proto__:null,default:xd},Symbol.toStringTag,{value:"Module"})),Ed={class:"information-card"},Dd={key:0,class:"information-card-title"},Ld={class:"information-card-content"};const Od=qe({},[["render",function(t,e){return r(),f("div",Ed,[t.$slots.title?(r(),f("div",Dd,[E(t.$slots,"title",{},void 0,!0)])):I("",!0),s("div",Ld,[E(t.$slots,"default",{},void 0,!0)])])}],["__scopeId","data-v-99da8942"]]),Id={__name:"Echart",props:{options:{type:Object,required:!0},notMerge:{type:Boolean,default:!0},height:{type:[String,Number],default:"auto"}},setup(t,{expose:e}){const i=t;ni([oi,si,ai,li,ui,ci,hi,fi,pi]);const n=C(null);let o=null;function s(){o&&o.setOption(i.options,i.notMerge)}const a=Ct((function(){o&&o.resize()}),100);return M((()=>i.options),s,{deep:!0}),x((async()=>{o||(await P(),o=ri(n.value,{},{height:i.height}),s(),window.addEventListener("resize",a))})),T((()=>{o&&(window.removeEventListener("resize",a),o.dispose(),o=null)})),e({echartInstance:o}),(t,e)=>(r(),f("div",{ref_key:"echartRef",ref:n,class:"common-echart"},null,512))}},Bd={__name:"PerformanceChart",props:{markets:{type:Array,required:!0}},setup(t){const e=t,i=[[.0601,1/0],[.04,.0601],[.02,.04],[0,.02],[-.02,0],[-.04,-.02],[-.0601,-.04],[-1/0,-.0601]],o=i.findIndex((([t])=>0==t)),s=g((()=>e.markets.map((t=>t[Oe.changeBy24Hour])).reduce(((t,e)=>{if(we(e)){const n=Number(e);t[i.findIndex((([t,e])=>t<=n&&n<e))]++}return t}),Array.from({length:i.length},(()=>0))))),a=g((()=>({grid:{left:0,right:0,top:30,bottom:20}
13,xAxis:{type:"category",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{interval:0,color:Xe("--content-neutral-500",document.body),formatter(t,e){const[n,r]=i[e];if(n===-1/0){return`> ${pt(D(r).abs().times(100).toNumber(),0)}%`}if(r===1/0){return`> ${pt(D(n).times(100).toNumber(),0)}%`}const o=i[e].map((t=>Math.abs(t)));o.sort();const[s,a]=o;return`${pt(D(s).times(100).toNumber(),0)}-${pt(D(a).times(100).toNumber(),0)}%`}},data:i},yAxis:{show:!1,type:"value"},series:[{type:"bar",cursor:"default",label:{show:!0,position:"top",fontSize:14,color:Xe("--content-neutral-500",document.body)},data:s.value.map(((t,e)=>({value:t,itemStyle:{color:Xe(e<=o?"--compbg-green-300":"--compbg-red-400",document.body)}})))}]})));return(t,e)=>(r(),n(u(Id),{options:a.value,height:"238px"},null,8,["options"]))}},Pd={class:"winning-losing-comparison"},Ad={class:"progress-bar"},Nd={class:"comparison-content"},Fd={class:"winning-markets"},zd={class:"comparison-title"},Rd={class:"market-count"},$d={class:"losing-markets"},jd={class:"market-count"},Vd={class:"comparison-title"},Wd=qe(y({__name:"WinningLosingMarketsComparison",props:{info:{}},setup(t){const e=t,i=J({winningCount:g((()=>e.info.overview.winCount)),losingCount:g((()=>e.info.overview.lossCount))}),n=g((()=>D(i.winningCount).div(D(i.winningCount).plus(i.losingCount)).decimalPlaces(6,D.ROUND_FLOOR).times(100).toNumber()));return(t,e)=>(r(),f("div",Pd,[s("div",Ad,[s("div",{class:"winner-progress",style:V({"--winning-percentage":`${n.value}%`})},null,4)]),s("div",Nd,[s("div",Fd,[s("div",zd,l(t.$t("market.sector.winnerMarkets")),1),s("div",Rd,l(u(pt)(i.winningCount,0)),1)]),e[0]||(e[0]=s("div",null,"/",-1)),s("div",$d,[s("div",jd,l(u(pt)(i.losingCount,0)),1),s("div",Vd,l(t.$t("market.sector.losingMarkets")),1)])])]))}}),[["__scopeId","data-v-566dd10c"]]),Hd={class:"sector-information"},Kd={class:"information-left information-column"},Gd={class:"information-column-top"},Yd={class:"information-column-bottom"},Ud={class:"information-right"},Xd={class:"performance-overview"},qd=qe(y({__name:"SectorInformation",props:{info:{},markets:{}},setup:t=>(t,e)=>(r(),f("section",Hd,[s("div",Kd,[s("div",Gd,[a(Od,{class:"column-card"},{title:o((()=>[c(l(t.$t("t.avgPriceChanges")),1)])),default:o((()=>[a(En,{class:"information-price-change",value:t.info.overview.change},null,8,["value"])])),_:1})]),s("div",Yd,[a(Od,{class:"column-card"},{title:o((()=>[c(l(t.$t("markets.marketCap",{baseCurrency:u(ft)})),1)])),default:o((()=>[a(In,{class:"information-market-cap",value:t.info.overview.marketCap},null,8,["value"])])),_:1})])]),s("div",Ud,[a(Od,null,{title:o((()=>[c(l(t.$t("market.sector.detail.performanceReview")),1)])),default:o((()=>[s("div",Xd,[a(Bd,{markets:t.markets},null,8,["markets"]),a(Wd,{class:"winning-losing-comparison",info:t.info},null,8,["info"])])])),_:1})])]))}),[["__scopeId","data-v-842e5345"]]),Zd={class:"sector-table-container market-sector-page-function-wrap"},Jd={class:"filters"},Qd={class:"filters-left"},tv={class:"table-title"},ev={class:"filters-right"},iv={class:"search-input-container"},nv=qe(y({__name:"SectorTable",props:{markets:{},quoteCurrency:{}},setup(h){const{enableNewMarketsPageTokenDetail:p}=lt,d=h,v=_(),m=t(),y=bt(),b=it(),{lang:k}=e(b),{sortKey:x,sortDirection:T,onSorting:E}=Qe(),D=C(""),L=C(1),B=g((()=>[{gtm:{event:"marketSectorDetailSorting",target:x.value,type:T.value},watch:`${x.value}-${T.value}`},{gtm:t=>({event:p&&y.isMobile?"marketSectorDetailOpenTokenDetail":"marketSectorDetailOpenTrade",symbol
13:t.symbol,target:d.quoteCurrency,trackItem:"row"}),mixpanel:{name:Li,props:t=>({s1:Ei.sector,s2:t.symbol,s3:Di.main})},posthog:{name:Li,props:t=>({tab:Ei.sector,trading_pair:t.symbol,page:Di.main})},emit:"onClickRow"},{gtm:{event:"marketSectorDetailPageChanged",target:L.value},watch:L.value}])),P=g((()=>[{id:Oe.name,label:v.t("t.name"),isSortable:!0,isShow:!0},{id:Oe.lastPrice,label:v.t("msg.lastPrice"),isSortable:!0,textAlign:"right",isShow:y.isLargeSize},{id:Oe.changeBy24Hour,label:v.t("markets.24hChange"),isSortable:!0,textAlign:"right",isShow:y.isLargeSize},{id:Oe.volumeBy24Hour,label:v.t("markets.24hVol",{baseCurrency:d.quoteCurrency}),textAlign:"right",isSortable:!0,isShow:y.isLargeSize},{id:Oe.marketCap,label:y.isMobile?v.t("t.cap"):v.t("markets.marketCap",{baseCurrency:d.quoteCurrency}),isSortable:!y.isMobile,textAlign:"right",isShow:y.isLargeSize},{id:Oe.actions,label:"",textAlign:"right",isShow:y.isLargeSize},{id:Oe.mobilePrice,sortId:Oe.lastPrice,label:v.t("msg.lastPrice"),textAlign:"right",isSortable:!0,rowColSpan:0,isShow:y.isMobile},{id:Oe.mobileVolume,sortId:Oe.volumeBy24Hour,label:v.t("t.vol"),textAlign:"right",isSortable:!0,rowColSpan:2,isShow:y.isMobile},{id:Oe.mobileChange,sortId:Oe.changeBy24Hour,label:v.t("t.24hChg"),textAlign:"right",columnClassName:"mobile-change-column",isSortable:!0,isShow:y.isMobile}].filter((t=>t.isShow)))),A=g((()=>{const t=u(D).toUpperCase(),e=u(x),i=u(T);let n=d.markets.slice();switch(t&&(n=d.markets.filter((e=>{var i,n;return!t||e[Oe.name].toUpperCase().includes(t)||(null==(n=null==(i=e.displayName)?void 0:i.toUpperCase())?void 0:n.includes(t))}))),e){case Oe.name:n.sort(((t,n)=>i===Mt.asc?t[e].localeCompare(n[e]):n[e].localeCompare(t[e])));break;case Oe.lastPrice:case Oe.changeBy24Hour:case Oe.volumeBy24Hour:case Oe.marketCap:n.sort(((t,n)=>on(t[e],n[e],i)))}return n}));M((()=>({searchKey:u(D),sortKey:u(x),sortDirection:u(T)})),(()=>{L.value=1}),{deep:!0});const N=g((()=>A.value.slice(20*(L.value-1),20*L.value)));function F(t){var e;L.value=t,null==(e=document.querySelector(".market-sector-page-function-wrap"))||e.scrollIntoView({behavior:"smooth",block:"start"})}function z(t){let e;e=p&&y.isMobile?{name:Kt.MARKET_TOKEN_DETAIL,params:{lang:k.value,symbol:`${t.symbol}-${d.quoteCurrency}`}}:{name:"tradingId",params:{lang:k.value,id:`${t.symbol}-${d.quoteCurrency}`}},window.open(m.resolve(e).href,"_blank")}return(t,e)=>{const h=i("RouterLink"),d=w("track");return r(),f("div",Zd,[s("div",Jd,[s("div",Qd,[s("div",tv,l(t.$t("t.tokenList")),1)]),s("div",ev,[s("div",iv,[S(a(Ut,{value:D.value,"onUpdate:value":e[0]||(e[0]=t=>D.value=t),width:"100%",height:"32px"},null,8,["value"]),[[d,{gtm:{event:"marketSectorDetailSearchKey",searchTerm:D.value},watch:D.value,delay:300}]])])])]),S((r(),n(Gt,{class:"sector-table",isSortingControllable:"",keepPagination:"",currentSortKey:u(x),currentSortDirection:u(T),columns:P.value,rows:N.value,total:A.value.length,pageSize:20,page:L.value,onSort:u(E),onChangePage:F,onOnClickRow:z},{empty:o((()=>[a(yn,{searchText:D.value},null,8,["searchText"])])),[`cell(${u(Oe).name})`]:o((({info:t})=>[a(xn,{isShowIcon:"",symbol:t.symbol,currency:t.currency,displayName:t.displayName},null,8,["symbol","currency","displayName"])])),[`cell(${u(Oe).lastPrice})`]:o((({value:e,info:i})=>[a(Tn,{value:e,formatKey:i.priceFilter,currencySymbol:i.currencySymbol,currency:t.quoteCurrency},null,8,["value","formatKey","currencySymbol","currency"])])),[`cell(${u(Oe).changeBy24Hour})`]:o((({value:t})=>[a(En,{value:t},null,8,["value"])])),[`cell(${u(Oe).volumeBy24Hour})`]:o((({value:t})=>[a(Ln,{value:t},null,8,["value"])])),[`cell(${u(Oe).marketCap})`]:o((({value:t})=>[a(In,{value:t},null,8,["value"])])),[`cell(${u(Oe).actions})`]:o((({info:i})=>[u(p)?S((r(),n(h,{key:0,class:"action-link",to:{name:u(Kt).MARKET_TOKEN_DETAIL,params:{lang:u(k),symbol:`${i.symbol}-${t.quoteCurrency}`}},target:"_blank",rel:"noreferrer noopener",onClick:e[1]||(e[1]=O((()=>{}),["stop"]))},{default:o((()=>[c(l(t.$t("t.details")),1)])),_:2},1032,["to"])),[[d,{gtm:{event:"marketSectorDetailOpenTokenDetail",symbol
13:i.symbol,target:t.quoteCurrency,trackItem:"link"},mixpanel:{name:u(Ki)},posthog:{name:u(Ki)}}]]):I("",!0),S((r(),n(h,{class:"action-link",to:{name:"tradingId",params:{lang:u(k),id:`${i.symbol}-${t.quoteCurrency}`}},target:"_blank",rel:"noreferrer noopener",onClick:e[2]||(e[2]=O((()=>{}),["stop"]))},{default:o((()=>[c(l(t.$t("t.trade")),1)])),_:2},1032,["to"])),[[d,{gtm:{event:"marketSectorDetailOpenTrade",symbol:i.symbol,target:t.quoteCurrency,trackItem:"link"},mixpanel:{name:u(Li),props:{s1:u(Ei).sector,s2:i.symbol,s3:u(Di).main}},posthog:{name:u(Li),props:{tab:u(Ei).sector,trading_pair:i.symbol,page:u(Di).main}}}]])])),[`cell(${u(Oe).mobileVolume})`]:o((({info:e})=>[a(Tn,{value:e[u(Oe).lastPrice],formatKey:e.priceFilter,currencySymbol:e.currencySymbol,currency:t.quoteCurrency},null,8,["value","formatKey","currencySymbol","currency"]),a(Ln,{class:"mobile-volume",value:e[u(Oe).volumeBy24Hour]},null,8,["value"])])),[`cell(${u(Oe).mobileChange})`]:o((({info:t})=>[a(En,{value:t[u(Oe).changeBy24Hour]},null,8,["value"])])),_:2},1032,["currentSortKey","currentSortDirection","columns","rows","total","page","onSort"])),[[d,B.value]])])}}}),[["__scopeId","data-v-fedff5a3"]]),rv={class:"sector-detail"},ov={class:"inner-container"},sv={class:"navigator"},av={class:"title-container"},lv={class:"title-left"},uv={class:"title-right"},cv={class:"token-count"},hv=qe(y({__name:"SectorDetail",setup(h){const{spotTradeDefaultQuoteCurrency:v}=lt,m=q(),y=t(),b=it(),{lang:_}=e(b),C=g((()=>function(t=""){return t.toUpperCase().replace("-","_")}(m.params.sector))),{sectorList:M}=ea((()=>({code:C.value,errorCallback:L}))),k=g((()=>{var t;return(null==(t=M.value)?void 0:t[0])||{}})),x=J({overview:k,markets:g((()=>{var t;return(null==(t=k.value)?void 0:t.symbols)||[]}))}),{spotMarketList:T}=sn((()=>({quoteCurrency:"",spotFavoriteMarkets:[],rawSpotMarketsData:x.markets.map((t=>({...t,baseCurrency:t.tradeCurrency,price:t.lastPrice})))}))),E=g((()=>{var t;return null==(t=x.overview)?void 0:t.top3Symbols}));function D(){y.back()}function L(){y.replace({name:Kt.MARKETS,params:{lang:_.value},state:{type:Ve.SECTOR}})}return $((()=>{C.value||L()})),(t,e)=>{const h=i("i18n-t"),m=w("track");return r(),f("div",rv,[s("div",ov,[s("div",sv,[S((r(),f("span",{class:"back-link",onClick:D},[a(ge,{class:"back-icon"}),c(" "+l(t.$t("marketTokenDetail.navigation.goPrevious")),1)])),[[m,{gtm:{event:"marketSectorDetailBackToMarket"}}]])]),s("div",av,[s("div",lv,l(x.overview.name),1),s("div",uv,[a(ia,{class:"stacked-container"},{default:o((()=>[(r(!0),f(p,null,d(E.value,(t=>(r(),n(dt,{key:t.symbol,showName:!1,name:t.baseCurrency,size:"24"},null,8,["name"])))),128))])),_:1}),s("div",cv,l(t.$t("t.coin.tokens",{coin:u(T).length})),1)])]),a(h,{keypath:`market.sector.descriptions.${C.value}`,class:"sector-description",tag:"div"},null,8,["keypath"]),a(qd,{class:"sector-information",info:x,markets:u(T)},null,8,["info","markets"]),a(nv,{class:"sector-tokens-table",markets:u(T),quoteCurrency:u(v)},null,8,["markets","quoteCurrency"])])])}}}),[["__scopeId","data-v-ca1c210f"]]),fv=Object.freeze(Object.defineProperty({__proto__:null,default:hv},Symbol.toStringTag,{value:"Module"}));export{Mi as D,La as L,Td as M,fp as O,en as S,ud as T,Id as _,hp as a,yp as b,pp as c,kp as d,_p as e,mp as f,jp as g,gp as h,dp as i,Mp as j,Da as k,_a as l,fv as m,gi as u};
14//# sourceMappingURL=B7TQbCQK.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.