PageSourceSearch

https://www.tapbit.com/_next_app/price/0.1.227/_next/static/chunks/8966.147c295927cdf917.js

js tapbit.com collected 2026-10-03 21:42:51 UTC 9,323 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="83d6f023-36a8-4f13-96ee-a617d7f601df",e._sentryDebugIdIdentifier="sentry-dbid-83d6f023-36a8-4f13-96ee-a617d7f601df")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8966],{5694:(e,t,r)=>{r.d(t,{w:()=>f});var n=r(83054),i=r(19490),o=r(122);function a(e){return"1"===e.tradeUnit?"Cont":"2"===e.tradeUnit?"USDT":e.baseAsset}function c(e){let{quantityCont:t,tradeUnit:r,multiplier:i,price:o,usdtPrecision:a}=e;return(0,n.Sm)({quantityCont:t,tradeUnit:r,multiplier:i,price:o,usdtPrecision:a})}function u(e){let{quantity:t,tradeUnit:r,multiplier:i,price:o,usdtCost:a,costOne:c,isCalculator:u}=e;return(0,n.KP)({quantity:t,tradeUnit:r,multiplier:i,price:o,usdtCost:a,costOne:c,isCalculator:u})}function l(e){let{tradeUnit:t,contractPrecision:r,coinPrecision:n}=e;return"1"===t?0:"2"===t?r:n}function s(e,t,r){return"".concat((0,i.iT)((Number.isFinite(e)?e:0).toFixed(t))," ").concat(r)}function g(e){let{displayQuantity:t,side:r="buy",tradeUnit:n,multiplier:i,usdtCost:a,oneContCostBuy:c,oneContCostSell:u,calcPrice:l,coinPrecision:g,baseAsset:m}=e;if(!t||!i)return s(0,g,m);let d=new o.A(0);if("0"===n)d=new o.A(t);else if("1"===n)d=new o.A(t).mul(i||0);else if("1"===a){let e=new o.A("buy"===r?c||0:u||0);d=(e.gt(0)?new o.A(t).div(e).toDecimalPlaces(0,o.A.ROUND_DOWN):new o.A(0)).mul(i||0)}else d=(l?new o.A(t).div(new o.A(l).mul(i||0)).toDecimalPlaces(0,o.A.ROUND_DOWN):new o.A(0)).mul(i||0);return"2"===n&&d.lt(i||0)&&(d=new o.A(0)),s(d.toNumber(),g,m)}function m(e){let{quantityCont:t,side:r="buy",tradeUnit:n,multiplier:o,price:a,quantityPrecision:u,unitLabel:l,usdtCost:s,oneContCostBuy:m,oneContCostSell:d,coinPrecision:f,baseAsset:p}=e,v=c({quantityCont:t,tradeUnit:n,multiplier:o,price:a}),b="".concat((0,i.iT)(Number(v).toFixed(u))," ").concat(l);if("0"===n)return b;let N=g({displayQuantity:Number(v),side:r,tradeUnit:n,multiplier:o,usdtCost:s,oneContCostBuy:m,oneContCostSell:d,calcPrice:a,coinPrecision:f,baseAsset:p});return"".concat(b," ").concat("1"===n?"=":"≈"," ").concat(N)}function d(e){let{quantityCont:t,side:r="buy",tradeUnit:n,multiplier:a,price:u,quantityPrecision:l,unitLabel:g,usdtCost:m,oneContCostBuy:d,oneContCostSell:f,coinPrecision:p,baseAsset:v}=e;if("0"===n){let e=c({quantityCont:t,tradeUnit:n,multiplier:a,price:u});return"".concat((0,i.iT)(Number(e).toFixed(l))," ").concat(g)}if("1"===n){let e="".concat((0,i.iT)(Number(t).toFixed(l))," ").concat(g);return"".concat(e," = ").concat(s(t*a,p,v))}let b=c({quantityCont:t,tradeUnit:"2",multiplier:a,price:u}),N="".concat((0,i.iT)(new o.A(b).toDecimalPlaces(l,o.A.ROUND_DOWN).toFixed(l))," ").concat(g);return"".concat(N," ≈ ").concat(s(t*a,p,v))}let f=(0,r(41809).v)(()=>({getDisplayUnitLabel:a,convertContToDisplay:c,convertDisplayToCont:u,getQuantityPrecisionByUnit:l,formatBaseAssetQuantityValue:s,getBaseAssetHintValue:g,getQuantityDisplayText:m,getConfirmQuantityDisplayText:d}))},10522:(e,t,r)=>{r.d(t,{Jh:()=>c,Mr:()=>a});var n=r(47387),i=r(41809);let o=e=>({symbol:e,activeTab:"open",orderType:n.hv.get("orderType")||"limit",triggerPrice:"",orderPrice:"",quantity:"",longQuantity:"",shortQuantity:"",percentage:0,isPercentage:!1,checkedTpsl:!1,takeProfitPrice:"",stopLossPrice:"",tpOrderPrice:"",slOrderPrice:"",takeProfitRate:"",stopLossRate:"",takeProfitRateAbout:"",stopLossRateAbout:"",triggerWay:"mark",tpTriggerWay:"mark",slTriggerWay:"mark",tpPriceType:"market",slPriceType:"market",tpslActiveTab:"openLong",tpslAdvancedEdited:!1,tradeUnit:n.hv.get("tradeUnit")||"0",usdtCost:"1"===n.hv.get("usdtCost")?"1":"0",marginMode:"crossed",positionMode:"merged",longLeverage:10,shortLeverage:10}),a=(0,i.v)((e,t)=>({form:o("BTC-USDT"),initialize:(t,r)=>e(e=>{if(e.form.symbol===t)return e;let n=Number((null==r?void 0:r.longLeverage)||0),i=Number((null==r?void 0:r.shortLeverage)||0);return{form:{...o(t),marginMode:e.form.marginMode,...n>0?{longLeverage:n}:{},...i>0?{shortLeverage:i}:{}}}}),update:t=>e(e=>({form:{...e.form,...t}})),setOrderType:t=>{n.hv.set({orderType:t}),e(e=>({form:{...e.form,orderType:t,triggerPrice:"planLimit"===t||"planMarket"===t?e.form.triggerPrice:"",orderPrice:"market"===t||"planMarket"===t?"":e.form.orderPrice}}))},setTradeUnit:(t,r)=>{n.hv.set({tradeUnit:t,..."2"===t&&r?{usdtCost:r}:{}}),e(e=>({form:{...e.form,tradeUnit:t,..."2"===t&&r?{usdtCost:r}:{}}}))},resetQuantity:()=>e(e=>({form:{...e.form,quantity:"",longQuantity:"",shortQuantity:"",percentage:0}}))}));function c(e){a.setState(t=>({form:{...t.form,...e}}))}},20449:(e,t,r)=>{r.d(t,{$3:()=>a,P8:()=>c});var n=r(47387),i=r(26212);let o=e=>{let{namespace:t,preferences:r,symbols:n}=e,i=e=>{let t=e||n.getCurrent();return n.getConfig(t)},o=e=>{let i=e||n.getCurrent();return Number(r.get("".concat(t,".leverage_").concat(i))||10)};return{getConfig(e){var t;return(null==(t=i(e))?void 0:t.leverages)||""},getOptions(e){var t;return((null==(t=i(e))?void 0:t.leverages)||"").split(",").filter(
1Boolean).map(e=>({label:"".concat(e,"X"),value:Number(e)}))},getCurrent:e=>o(e),setCurrent(e,i){let o=i||n.getCurrent();r.set({["".concat(t,".leverage_").concat(o)]:e})},getLongLeverage(e){let i=e||n.getCurrent();return Number(r.get("".concat(t,".long_leverage_").concat(i))||o(i)||10)},setLongLeverage(e,i){let o=i||n.getCurrent();r.set({["".concat(t,".long_leverage_").concat(o)]:e})},getShortLeverage(e){let i=e||n.getCurrent();return Number(r.get("".concat(t,".short_leverage_").concat(i))||o(i)||10)},setShortLeverage(e,i){let o=i||n.getCurrent();r.set({["".concat(t,".short_leverage_").concat(o)]:e})}}},a=o({namespace:"contract_futures",preferences:n.hv,symbols:i.ep}),c=o({namespace:"contract_simul",preferences:n.Nm,symbols:i.UP})},51430:(e,t,r)=>{r.d(t,{eh:()=>a,n7:()=>i,qQ:()=>o});var n=r(122);function i(e,t){let r=Number(e);return Number.isNaN(r)?"0":new n.A(r).toFixed(t,n.A.ROUND_UP)}function o(e,t){let r=Number(e);return Number.isNaN(r)?"0":new n.A(r).toFixed(t,n.A.ROUND_DOWN)}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=Number(e);return r>0?function(e,t){let r=Number(e);return Number.isNaN(r)?"0":new n.A(r).toFixed(t,n.A.ROUND_FLOOR)}(r,t):function(e,t){let r=Number(e);return Number.isNaN(r)?"0":new n.A(r).toFixed(t,n.A.ROUND_CEIL)}(r,t)}},70464:(e,t,r)=>{r.d(t,{DG:()=>a,Rw:()=>i,vX:()=>o});var n=r(5694);function i(e){return n.w.getState().getDisplayUnitLabel(e)}function o(e){return n.w.getState().convertContToDisplay(e)}function a(e){return n.w.getState().convertDisplayToCont(e)}},77962:(e,t,r)=>{r.d(t,{N:()=>c});var n=r(41809);let i=e=>({symbol:e,direction:"NEUTRAL",leverage:10,lowerPrice:"",upperPrice:"",gridCount:"",type:"ARITHMETIC",margin:"",triggerType:"",triggerPrice:"",stopTriggerType:"",stopLowerPrice:"",stopUpperPrice:"",closeOnStop:"YES"}),o=()=>{},a={changeForm:o,copyStrategy:o,submit:o,confirmSubmit:o,changeLeverage:o,changeMarginByPercent:o},c=(0,n.v)(e=>({activeTab:"recommend",form:i("BTC-SWAP"),advancedOpen:!1,runtime:{serviceSymbol:"BTC-SWAP",displaySymbol:"BTCUSDT",baseAsset:"BTC",balance:0,lastPrice:0,markPrice:0,isLoggedIn:!1,recommendations:[],recommendationsLoading:!1,computeData:{},gridCountMin:2,gridCountMax:50,minMargin:0,maxLeverage:150,leverageTiers:[],multiplier:0,contractPrecision:2,sliderPercent:0,perGridProfitText:"--",validationError:"",submitting:!1},initialize:t=>e(e=>e.form.symbol===t?e:{form:{...i(t),leverage:e.form.leverage}}),setActiveTab:t=>e({activeTab:t}),updateForm:t=>e(e=>({form:{...e.form,...t}})),setAdvancedOpen:t=>e({advancedOpen:t}),syncRuntime:t=>e(e=>({runtime:{...e.runtime,...t}})),actions:a,syncActions:t=>e({actions:t}),resetAfterSuccess:()=>e(e=>({advancedOpen:!1,form:{...e.form,lowerPrice:"",upperPrice:"",gridCount:"",margin:"",triggerType:"",triggerPrice:"",stopTriggerType:"",stopLowerPrice:"",stopUpperPrice:"",closeOnStop:"YES"}}))}))},83054:(e,t,r)=>{r.d(t,{DF:()=>o,KP:()=>u,SD:()=>c,Sm:()=>a});var n=r(122),i=r(51430);function o(e){var t;let r=String(e||0);return r.includes(".")&&(null==(t=r.split(".")[1])?void 0:t.length)||0}function a(e){let{quantityCont:t,tradeUnit:r,multiplier:i,price:o,usdtPrecision:a=8}=e;if(!t)return 0;if("1"===r)return Number(t);let c=new n.A(i||0),u=new n.A(t||0);return"2"===r?u.mul(c).mul(o||0).toDecimalPlaces(a,n.A.ROUND_DOWN).toNumber():u.mul(c).toNumber()}function c(e){let{quantityCont:t,tradeUnit:r,multiplier:o,price:a,quantityPrecision:c,usdtPrecision:u}=e;if("2"===r&&a){let e=new n.A(t||0).mul(o||0).mul(Number(a)).toNumber();return(0,i.qQ)(e,null!=u?u:c)}return new n.A(t||0).mul("1"===r?1:o||0).toFixed(c)}function u(e){let{quantity:t,tradeUnit:r,multiplier:i,price:a,usdtCost:c,costOne:u,isCalculator:l}=e;if(!t)return 0;if("1"===r)return Number(t);let s=new n.A(i||0);if("2"===r){if("1"===c&&u&&!l)return new n.A(t).div(u).toDecimalPlaces(0,n.A.ROUND_DOWN).toNumber();if(s.lte(0)||!a)return 0;let e=new n.A(t).div(a),r=o(i);return(u?e.gt(0)&&e.lt(s.mul(2))?s:e.toDecimalPlaces(r,n.A.ROUND_DOWN):e.toDecimalPlaces(r,n.A.ROUND_UP)).div(s).toDecimalPlaces(0,n.A.ROUND_DOWN).toNumber()}return s.lte(0)?0:new n.A(t).div(s).toDecimalPlaces(0,n.A.ROUND_DOWN).toNumber()}}}]);

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.