stock-sdk 2.0.0-beta.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -23
- package/dist/{adapters-C0s5bM8O.d.cts → adapters-BvE63CMd.d.cts} +16 -1
- package/dist/{adapters-C0s5bM8O.d.ts → adapters-BvE63CMd.d.ts} +16 -1
- package/dist/{addIndicators-TPEcddTW.d.cts → addIndicators-DwEr9RKK.d.cts} +207 -191
- package/dist/{addIndicators-TPEcddTW.d.ts → addIndicators-DwEr9RKK.d.ts} +207 -191
- package/dist/cache.cjs +1 -1
- package/dist/cache.js +1 -1
- package/dist/chunk-2PYGJ5I5.cjs +1 -0
- package/dist/chunk-3NSUE34F.cjs +1 -0
- package/dist/chunk-4PVVFEOQ.js +1 -0
- package/dist/chunk-C4CA7QBB.cjs +1 -0
- package/dist/chunk-D2MGPO3R.js +1 -0
- package/dist/{chunk-JYHHLB34.js → chunk-DU7MCVLJ.js} +1 -1
- package/dist/{chunk-SPLQXFFF.js → chunk-F3KZXCVO.js} +1 -1
- package/dist/chunk-G5KF73BW.js +1 -0
- package/dist/chunk-GBHWMR2O.js +1 -0
- package/dist/chunk-LCX5Q36O.js +1 -0
- package/dist/chunk-PMERLSCU.cjs +1 -0
- package/dist/{chunk-DOOAXFSS.cjs → chunk-TVIEKKDQ.cjs} +1 -1
- package/dist/{chunk-BGZ4ZUAF.cjs → chunk-WCBK5KYA.cjs} +1 -1
- package/dist/chunk-YR2SVSXB.cjs +1 -0
- package/dist/cli.cjs +17 -16
- package/dist/cli.js +17 -16
- package/dist/errors.d.cts +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/{index-B0PXWAkv.d.cts → index-mlzPfoON.d.cts} +12 -0
- package/dist/{index-B0PXWAkv.d.ts → index-mlzPfoON.d.ts} +12 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/dist/indicators.cjs +1 -1
- package/dist/indicators.d.cts +55 -5
- package/dist/indicators.d.ts +55 -5
- package/dist/indicators.js +1 -1
- package/dist/mcp.cjs +5 -5
- package/dist/mcp.d.cts +3 -3
- package/dist/mcp.d.ts +3 -3
- package/dist/mcp.js +5 -5
- package/dist/screener.cjs +1 -1
- package/dist/screener.js +1 -1
- package/dist/{sdk-CGd_HgIM.d.ts → sdk-Cg_jTmTk.d.cts} +21 -527
- package/dist/{sdk-C_Agv5AV.d.cts → sdk-DOz03n_v.d.ts} +21 -527
- package/dist/signals.cjs +1 -1
- package/dist/signals.d.cts +1 -1
- package/dist/signals.d.ts +1 -1
- package/dist/signals.js +1 -1
- package/dist/symbols.cjs +1 -1
- package/dist/symbols.d.cts +2 -2
- package/dist/symbols.d.ts +2 -2
- package/dist/symbols.js +1 -1
- package/package.json +6 -10
- package/dist/chunk-333W3ADG.js +0 -1
- package/dist/chunk-4RR2H3DC.js +0 -1
- package/dist/chunk-66NWE54C.cjs +0 -1
- package/dist/chunk-6JEP4QK7.cjs +0 -1
- package/dist/chunk-HFN6G5M4.js +0 -1
- package/dist/chunk-LRE63M2C.js +0 -1
- package/dist/chunk-NMRUSAWS.cjs +0 -1
- package/dist/chunk-PVSDXLQP.cjs +0 -1
- package/dist/chunk-XVLG3G7T.cjs +0 -1
- package/dist/chunk-ZAQ7DTRY.js +0 -1
package/dist/chunk-PVSDXLQP.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } async function _asyncOptionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = await fn(value); } else if (op === 'call' || op === 'optionalCall') { value = await fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkNMRUSAWScjs = require('./chunk-NMRUSAWS.cjs');var _chunk6JEP4QK7cjs = require('./chunk-6JEP4QK7.cjs');var _chunk66NWE54Ccjs = require('./chunk-66NWE54C.cjs');var _chunkDOOAXFSScjs = require('./chunk-DOOAXFSS.cjs');var _chunk4Q7UQ5Q3cjs = require('./chunk-4Q7UQ5Q3.cjs');var _chunk4VDLQK6Fcjs = require('./chunk-4VDLQK6F.cjs');var w=(t,e)=>t*60+e,Gr={A:{tz:_chunk66NWE54Ccjs.pa.CN,open:[[w(9,30),w(11,30)],[w(13,0),w(15,0)]],lunchBreak:[w(11,30),w(13,0)],tradingWeekdays:[1,2,3,4,5]},HK:{tz:_chunk66NWE54Ccjs.pa.HK,open:[[w(9,30),w(12,0)],[w(13,0),w(16,0)]],lunchBreak:[w(12,0),w(13,0)],tradingWeekdays:[1,2,3,4,5]},US:{tz:_chunk66NWE54Ccjs.pa.US,open:[[w(9,30),w(16,0)]],tradingWeekdays:[1,2,3,4,5]}};function Ze(t,e){if(t==null)return Xe(new Date,e);if(t instanceof Date)return Xe(t,e);let n=t.trim();if(/^\d{4}-\d{2}-\d{2}$/.test(n))return n;if(/^\d{8}$/.test(n))return`${n.slice(0,4)}-${n.slice(4,6)}-${n.slice(6,8)}`;let r=new Date(n);if(!Number.isNaN(r.getTime()))return Xe(r,e);throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Unsupported date input: ${JSON.stringify(t)}. Expected 'YYYY-MM-DD', 'YYYYMMDD', or Date.`)}function Xe(t,e){return new Intl.DateTimeFormat("en-CA",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit"}).format(t)}function Yr(t,e){let n=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,weekday:"short",hour:"2-digit",minute:"2-digit"}),r={};for(let l of n.formatToParts(t))l.type!=="literal"&&(r[l.type]=l.value);let o=parseInt(_nullishCoalesce(r.hour, () => ("0")),10);o===24&&(o=0);let i=parseInt(_nullishCoalesce(r.minute, () => ("0")),10),u=_nullishCoalesce({Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6,Sun:7}[_nullishCoalesce(r.weekday, () => (""))], () => (0));return{minutes:o*60+i,weekday:u}}function Je(t,e){let n=0,r=t.length;for(;n<r;){let o=n+r>>>1;t[o]<e?n=o+1:r=o}return n}var oe=class{constructor(e){this.quoteService=e}async isTradingDay(e){let n=Ze(e,_chunk66NWE54Ccjs.pa.CN),r=await this.quoteService.getTradingCalendar(),o=Je(r,n);return o<r.length&&r[o]===n}async nextTradingDay(e){let n=Ze(e,_chunk66NWE54Ccjs.pa.CN),r=await this.quoteService.getTradingCalendar(),o=Je(r,n);if(o<r.length&&r[o]===n&&(o+=1),o>=r.length)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`nextTradingDay: ${n} \u4E4B\u540E\u6CA1\u6709\u53EF\u7528\u4EA4\u6613\u65E5 (\u65E5\u5386\u6700\u5927\u65E5\u671F ${_nullishCoalesce(r[r.length-1], () => ("N/A"))})`);return r[o]}async prevTradingDay(e){let n=Ze(e,_chunk66NWE54Ccjs.pa.CN),r=await this.quoteService.getTradingCalendar(),i=Je(r,n)-1;if(i<0)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`prevTradingDay: ${n} \u4E4B\u524D\u6CA1\u6709\u53EF\u7528\u4EA4\u6613\u65E5 (\u65E5\u5386\u6700\u5C0F\u65E5\u671F ${_nullishCoalesce(r[0], () => ("N/A"))})`);return r[i]}getMarketStatus(e="A",n=new Date){let r=Gr[e],{minutes:o,weekday:i}=Yr(n,r.tz);if(!r.tradingWeekdays.includes(i))return"closed";let a=r.open[0][0],u=r.open[r.open.length-1][1];if(o<a)return"pre_market";if(o>=u)return"after_hours";for(let[l,c]of r.open)if(o>=l&&o<c)return"open";return r.lunchBreak&&o>=r.lunchBreak[0]&&o<r.lunchBreak[1]?"lunch_break":"closed"}};var F={};_chunk4VDLQK6Fcjs.a.call(void 0, F,{getAShareCodeList:()=>ln,getAllHKQuotesByCodes:()=>gn,getAllQuotesByCodes:()=>pn,getAllUSQuotesByCodes:()=>mn,getFullQuotes:()=>ve,getFundCodeList:()=>fn,getFundFlow:()=>rn,getFundQuotes:()=>sn,getHKCodeList:()=>dn,getHKQuotes:()=>Le,getPanelLargeOrder:()=>on,getSimpleQuotes:()=>nn,getTodayTimeline:()=>an,getTradingCalendar:()=>yn,getUSCodeList:()=>cn,getUSQuotes:()=>Ke,parseFullQuote:()=>et,parseFundFlow:()=>nt,parseFundQuote:()=>st,parseHKQuote:()=>ot,parsePanelLargeOrder:()=>rt,parseSimpleQuote:()=>tt,parseUSQuote:()=>it,search:()=>Tn});function et(t){let e=[];for(let i=0;i<5;i++)e.push({price:_chunk66NWE54Ccjs.c.call(void 0, t[9+i*2]),volume:_chunk66NWE54Ccjs.c.call(void 0, t[10+i*2])});let n=[];for(let i=0;i<5;i++)n.push({price:_chunk66NWE54Ccjs.c.call(void 0, t[19+i*2]),volume:_chunk66NWE54Ccjs.c.call(void 0, t[20+i*2])});let r=_nullishCoalesce(t[30], () => ("")),o=_chunk66NWE54Ccjs.ra.call(void 0, r,_chunk66NWE54Ccjs.pa.CN);return{marketId:_nullishCoalesce(t[0], () => ("")),name:_nullishCoalesce(t[1], () => ("")),code:_nullishCoalesce(t[2], () => ("")),price:_chunk66NWE54Ccjs.c.call(void 0, t[3]),prevClose:_chunk66NWE54Ccjs.c.call(void 0, t[4]),open:_chunk66NWE54Ccjs.c.call(void 0, t[5]),volume:_chunk66NWE54Ccjs.c.call(void 0, t[6]),outerVolume:_chunk66NWE54Ccjs.c.call(void 0, t[7]),innerVolume:_chunk66NWE54Ccjs.c.call(void 0, t[8]),bid:e,ask:n,time:r,timestamp:o.timestamp,tz:o.tz,change:_chunk66NWE54Ccjs.c.call(void 0, t[31]),changePercent:_chunk66NWE54Ccjs.c.call(void 0, t[32]),high:_chunk66NWE54Ccjs.c.call(void 0, t[33]),low:_chunk66NWE54Ccjs.c.call(void 0, t[34]),volume2:_chunk66NWE54Ccjs.c.call(void 0, t[36]),amount:_chunk66NWE54Ccjs.c.call(void 0, t[37]),turnoverRate:_chunk66NWE54Ccjs.d.call(void 0, t[38]),pe:_chunk66NWE54Ccjs.d.call(void 0, t[39]),amplitude:_chunk66NWE54Ccjs.d.call(void 0, t[43]),circulatingMarketCap:_chunk66NWE54Ccjs.d.call(void 0, t[44]),totalMarketCap:_chunk66NWE54Ccjs.d.call(void 0, t[45]),pb:_chunk66NWE54Ccjs.d.call(void 0, t[46]),limitUp:_chunk66NWE54Ccjs.d.call(void 0, t[47]),limitDown:_chunk66NWE54Ccjs.d.call(void 0, t[48]),volumeRatio:_chunk66NWE54Ccjs.d.call(void 0, t[49]),avgPrice:_chunk66NWE54Ccjs.d.call(void 0, t[51]),peStatic:_chunk66NWE54Ccjs.d.call(void 0, t[52]),peDynamic:_chunk66NWE54Ccjs.d.call(void 0, t[53]),high52w:_chunk66NWE54Ccjs.d.call(void 0, t[67]),low52w:_chunk66NWE54Ccjs.d.call(void 0, t[68]),circulatingShares:_chunk66NWE54Ccjs.d.call(void 0, t[72]),totalShares:_chunk66NWE54Ccjs.d.call(void 0, t[73]),market:"CN",assetType:"stock",source:"tencent"}}function tt(t){return{marketId:_nullishCoalesce(t[0], () => ("")),name:_nullishCoalesce(t[1], () => ("")),code:_nullishCoalesce(t[2], () => ("")),price:_chunk66NWE54Ccjs.c.call(void 0, t[3]),change:_chunk66NWE54Ccjs.c.call(void 0, t[4]),changePercent:_chunk66NWE54Ccjs.c.call(void 0, t[5]),volume:_chunk66NWE54Ccjs.c.call(void 0, t[6]),amount:_chunk66NWE54Ccjs.c.call(void 0, t[7]),marketCap:_chunk66NWE54Ccjs.d.call(void 0, t[9]),marketType:_nullishCoalesce(t[10], () => ("")),market:"CN",assetType:"stock",source:"tencent"}}function nt(t){let e=_nullishCoalesce(t[13], () => ("")),n=_chunk66NWE54Ccjs.ra.call(void 0, e,_chunk66NWE54Ccjs.pa.CN);return{code:_nullishCoalesce(t[0], () => ("")),mainInflow:_chunk66NWE54Ccjs.c.call(void 0, t[1]),mainOutflow:_chunk66NWE54Ccjs.c.call(void 0, t[2]),mainNet:_chunk66NWE54Ccjs.c.call(void 0, t[3]),mainNetRatio:_chunk66NWE54Ccjs.c.call(void 0, t[4]),retailInflow:_chunk66NWE54Ccjs.c.call(void 0, t[5]),retailOutflow:_chunk66NWE54Ccjs.c.call(void 0, t[6]),retailNet:_chunk66NWE54Ccjs.c.call(void 0, t[7]),retailNetRatio:_chunk66NWE54Ccjs.c.call(void 0, t[8]),totalFlow:_chunk66NWE54Ccjs.c.call(void 0, t[9]),name:_nullishCoalesce(t[12], () => ("")),date:e,timestamp:n.timestamp,tz:n.tz}}function rt(t){return{buyLargeRatio:_chunk66NWE54Ccjs.c.call(void 0, t[0]),buySmallRatio:_chunk66NWE54Ccjs.c.call(void 0, t[1]),sellLargeRatio:_chunk66NWE54Ccjs.c.call(void 0, t[2]),sellSmallRatio:_chunk66NWE54Ccjs.c.call(void 0, t[3])}}function ot(t){let e=_nullishCoalesce(t[30], () => ("")),n=_chunk66NWE54Ccjs.ra.call(void 0, e,_chunk66NWE54Ccjs.pa.HK);return{marketId:_nullishCoalesce(t[0], () => ("")),name:_nullishCoalesce(t[1], () => ("")),code:_nullishCoalesce(t[2], () => ("")),price:_chunk66NWE54Ccjs.c.call(void 0, t[3]),prevClose:_chunk66NWE54Ccjs.c.call(void 0, t[4]),open:_chunk66NWE54Ccjs.c.call(void 0, t[5]),volume:_chunk66NWE54Ccjs.c.call(void 0, t[6]),time:e,timestamp:n.timestamp,tz:n.tz,change:_chunk66NWE54Ccjs.c.call(void 0, t[31]),changePercent:_chunk66NWE54Ccjs.c.call(void 0, t[32]),high:_chunk66NWE54Ccjs.c.call(void 0, t[33]),low:_chunk66NWE54Ccjs.c.call(void 0, t[34]),amount:_chunk66NWE54Ccjs.c.call(void 0, t[37]),lotSize:_chunk66NWE54Ccjs.d.call(void 0, t[40]),circulatingMarketCap:_chunk66NWE54Ccjs.d.call(void 0, t[44]),totalMarketCap:_chunk66NWE54Ccjs.d.call(void 0, t[45]),currency:_nullishCoalesce(t[t.length-3], () => ("")),market:"HK",assetType:"stock",source:"tencent"}}function it(t){let e=_nullishCoalesce(t[30], () => ("")),n=_chunk66NWE54Ccjs.ra.call(void 0, e,_chunk66NWE54Ccjs.pa.US);return{marketId:_nullishCoalesce(t[0], () => ("")),name:_nullishCoalesce(t[1], () => ("")),code:_nullishCoalesce(t[2], () => ("")),price:_chunk66NWE54Ccjs.c.call(void 0, t[3]),prevClose:_chunk66NWE54Ccjs.c.call(void 0, t[4]),open:_chunk66NWE54Ccjs.c.call(void 0, t[5]),volume:_chunk66NWE54Ccjs.c.call(void 0, t[6]),time:e,timestamp:n.timestamp,tz:n.tz,change:_chunk66NWE54Ccjs.c.call(void 0, t[31]),changePercent:_chunk66NWE54Ccjs.c.call(void 0, t[32]),high:_chunk66NWE54Ccjs.c.call(void 0, t[33]),low:_chunk66NWE54Ccjs.c.call(void 0, t[34]),amount:_chunk66NWE54Ccjs.c.call(void 0, t[37]),turnoverRate:_chunk66NWE54Ccjs.d.call(void 0, t[38]),pe:_chunk66NWE54Ccjs.d.call(void 0, t[39]),amplitude:_chunk66NWE54Ccjs.d.call(void 0, t[43]),totalMarketCap:_chunk66NWE54Ccjs.d.call(void 0, t[45]),pb:_chunk66NWE54Ccjs.d.call(void 0, t[47]),high52w:_chunk66NWE54Ccjs.d.call(void 0, t[48]),low52w:_chunk66NWE54Ccjs.d.call(void 0, t[49]),market:"US",assetType:"stock",source:"tencent"}}function st(t){let e=_nullishCoalesce(t[8], () => ("")),n=_chunk66NWE54Ccjs.ra.call(void 0, e,_chunk66NWE54Ccjs.pa.CN);return{code:_nullishCoalesce(t[0], () => ("")),name:_nullishCoalesce(t[1], () => ("")),nav:_chunk66NWE54Ccjs.c.call(void 0, t[5]),accNav:_chunk66NWE54Ccjs.c.call(void 0, t[6]),change:_chunk66NWE54Ccjs.c.call(void 0, t[7]),navDate:e,timestamp:n.timestamp,tz:n.tz,market:"CN",assetType:"fund",source:"tencent"}}async function ve(t,e){if(!e||e.length===0)return[];let n=await t.getTencentQuote(e.join(",")),r=new Set(e);return n.filter(o=>r.has(o.key)&&o.fields&&o.fields.length>5&&o.fields[0]!=="").map(o=>et(o.fields))}async function nn(t,e){if(!e||e.length===0)return[];let n=e.map(i=>`s_${i}`),r=await t.getTencentQuote(n.join(",")),o=new Set(n);return r.filter(i=>o.has(i.key)&&i.fields&&i.fields.length>5&&i.fields[0]!=="").map(i=>tt(i.fields))}async function rn(t,e){if(!e||e.length===0)return[];let n=e.map(i=>`ff_${i}`),r=await t.getTencentQuote(n.join(",")),o=new Set(n);return r.filter(i=>o.has(i.key)&&i.fields&&i.fields.length>=14&&i.fields[0]!=="").map(i=>nt(i.fields))}async function on(t,e){if(!e||e.length===0)return[];let n=e.map(i=>`s_pk${i}`),r=await t.getTencentQuote(n.join(",")),o=new Set(n);return r.filter(i=>o.has(i.key)&&i.fields&&i.fields.length>=4&&i.fields[0]!=="").map(i=>rt(i.fields))}async function Le(t,e){if(!e||e.length===0)return[];let n=e.map(i=>`hk${i}`),r=await t.getTencentQuote(n.join(",")),o=new Set(n);return r.filter(i=>o.has(i.key)&&i.fields&&i.fields.length>5&&i.fields[0]!=="").map(i=>ot(i.fields))}async function Ke(t,e){if(!e||e.length===0)return[];let n=e.map(i=>`us${i}`),r=await t.getTencentQuote(n.join(",")),o=new Set(n);return r.filter(i=>o.has(i.key)&&i.fields&&i.fields.length>5&&i.fields[0]!=="").map(i=>it(i.fields))}async function sn(t,e){if(!e||e.length===0)return[];let n=e.map(i=>`jj${i}`),r=await t.getTencentQuote(n.join(",")),o=new Set(n);return r.filter(i=>o.has(i.key)&&i.fields&&i.fields.length>=9&&i.fields[0]!=="").map(i=>st(i.fields))}async function an(t,e){let n=`${_chunk66NWE54Ccjs.g}?code=${encodeURIComponent(e)}`,r=await t.get(n,{responseType:"json",provider:"tencent"});if(r.code!==0)throw new (0, _chunk4Q7UQ5Q3cjs.g)(r.msg||"API error","tencent",n);let o=_optionalChain([r, 'access', _2 => _2.data, 'optionalAccess', _3 => _3[e]]);if(!o){let y=_chunk66NWE54Ccjs.ra.call(void 0, "",_chunk66NWE54Ccjs.pa.CN);return{code:e,date:"",timestamp:y.timestamp,tz:y.tz,preClose:0,data:[]}}let i=_nullishCoalesce(_optionalChain([o, 'access', _4 => _4.data, 'optionalAccess', _5 => _5.data]), () => ([])),a=_nullishCoalesce(_optionalChain([o, 'access', _6 => _6.data, 'optionalAccess', _7 => _7.date]), () => ("")),u=_nullishCoalesce(_optionalChain([o, 'access', _8 => _8.qt, 'optionalAccess', _9 => _9[e]]), () => ([])),l=parseFloat(_nullishCoalesce(u[4], () => ("")))||0,c=!1;for(let y of i){let T=y.split(" "),C=parseFloat(T[1])||0,h=parseInt(T[2],10)||0,m=parseFloat(T[3])||0;if(h>0&&C>0){m/h>C*50&&(c=!0);break}}let g=i.map(y=>{let T=y.split(" "),C=T[0],h=`${C.slice(0,2)}:${C.slice(2,4)}`,m=parseInt(T[2],10)||0,O=parseFloat(T[3])||0,I=c?m*100:m,N=I>0?O/I:0,P=_chunk66NWE54Ccjs.sa.call(void 0, a,h,_chunk66NWE54Ccjs.pa.CN);return{time:h,timestamp:P.timestamp,tz:P.tz,price:parseFloat(T[1])||0,volume:I,amount:O,avgPrice:Math.round(N*100)/100}}),S=_chunk66NWE54Ccjs.ra.call(void 0, a,_chunk66NWE54Ccjs.pa.CN);return{code:e,date:a,timestamp:S.timestamp,tz:S.tz,preClose:l,data:g}}var un=_chunkDOOAXFSScjs.b.call(void 0, "tencent:code-lists",{defaultTTL:360*60*1e3,maxSize:16});async function at(t,e,n){return un.getOrFetch(e,async()=>await _asyncOptionalChain([(await t.get(n,{responseType:"json"})), 'optionalAccess', async _10 => _10.list])||[])}function Vr(t,e){let n=t.replace(/^(sh|sz|bj)/,"");switch(e){case"sh":return n.startsWith("6");case"sz":return n.startsWith("0")||n.startsWith("3");case"bj":return n.startsWith("4")||n.startsWith("8")||n.startsWith("92");case"kc":return n.startsWith("688");case"cy":return n.startsWith("30");default:return!0}}async function ln(t,e){let n=_nullishCoalesce(_optionalChain([e, 'optionalAccess', _11 => _11.simple]), () => (!1)),r=_optionalChain([e, 'optionalAccess', _12 => _12.market]),i=await at(t,"a-share:full",_chunk66NWE54Ccjs.h);return r&&(i=i.filter(a=>Vr(a,r))),n?i.map(a=>a.replace(/^(sh|sz|bj)/,"")):i.slice()}var Wr={NASDAQ:"105.",NYSE:"106.",AMEX:"107."};async function cn(t,e){let n=_nullishCoalesce(_optionalChain([e, 'optionalAccess', _13 => _13.simple]), () => (!1)),r=_optionalChain([e, 'optionalAccess', _14 => _14.market]),i=(await at(t,"us:full",_chunk66NWE54Ccjs.i)).slice();if(r){let a=Wr[r];i=i.filter(u=>u.startsWith(a))}return n?i.map(a=>a.replace(/^\d{3}\./,"")):i}async function dn(t){return(await at(t,"hk:full",_chunk66NWE54Ccjs.j)).slice()}async function pn(t,e,n={}){let{batchSize:r=_chunk66NWE54Ccjs.Z,concurrency:o=_chunk66NWE54Ccjs.$,onProgress:i}=n;_chunk66NWE54Ccjs.ba.call(void 0, r,"batchSize"),_chunk66NWE54Ccjs.ba.call(void 0, o,"concurrency");let a=Math.min(r,_chunk66NWE54Ccjs._),u=_chunk66NWE54Ccjs.fa.call(void 0, e,a),l=u.length,c=0,g=u.map(y=>async()=>{let T=await ve(t,y);return c++,i&&i(c,l),T});return(await _chunk66NWE54Ccjs.ga.call(void 0, g,o,!0)).flat()}async function gn(t,e,n={}){let{batchSize:r=_chunk66NWE54Ccjs.Z,concurrency:o=_chunk66NWE54Ccjs.$,onProgress:i}=n;_chunk66NWE54Ccjs.ba.call(void 0, r,"batchSize"),_chunk66NWE54Ccjs.ba.call(void 0, o,"concurrency");let a=Math.min(r,_chunk66NWE54Ccjs._),u=_chunk66NWE54Ccjs.fa.call(void 0, e,a),l=u.length,c=0,g=u.map(y=>async()=>{let T=await Le(t,y);return c++,i&&i(c,l),T});return(await _chunk66NWE54Ccjs.ga.call(void 0, g,o,!0)).flat()}async function mn(t,e,n={}){let{batchSize:r=_chunk66NWE54Ccjs.Z,concurrency:o=_chunk66NWE54Ccjs.$,onProgress:i}=n;_chunk66NWE54Ccjs.ba.call(void 0, r,"batchSize"),_chunk66NWE54Ccjs.ba.call(void 0, o,"concurrency");let a=Math.min(r,_chunk66NWE54Ccjs._),u=_chunk66NWE54Ccjs.fa.call(void 0, e,a),l=u.length,c=0,g=u.map(y=>async()=>{let T=await Ke(t,y);return c++,i&&i(c,l),T});return(await _chunk66NWE54Ccjs.ga.call(void 0, g,o,!0)).flat()}async function fn(t){return(await un.getOrFetch("fund:full",async()=>(await t.get(_chunk66NWE54Ccjs.k,{responseType:"text"})).split(",").slice(1).filter(o=>o.trim()))).slice()}var Zr=_chunkDOOAXFSScjs.b.call(void 0, "tencent:trade-calendar",{defaultTTL:720*60*1e3,maxSize:4});async function yn(t){return(await Zr.getOrFetch("a-share",async()=>{let n=await t.get(_chunk66NWE54Ccjs.l);return!n||n.trim()===""?[]:n.trim().split(",").map(r=>r.trim()).filter(r=>r.length>0)})).slice()}var Sn="https://smartbox.gtimg.cn/s3/";function Xr(t){return t.replace(/\\u([0-9a-fA-F]{4})/g,(e,n)=>String.fromCharCode(parseInt(n,16)))}function Jr(t){let e=t.toUpperCase();return e.startsWith("QDII")||e.startsWith("ETF")||e.startsWith("LOF")||e.startsWith("KJ")||e.startsWith("JJ")||e.includes("FUND")?"fund":e.startsWith("GP")||e.includes("STOCK")?"stock":e==="ZS"||e.includes("INDEX")?"index":e.startsWith("ZQ")||e.includes("BOND")?"bond":e.startsWith("QH")||e.includes("FUTURE")?"futures":e.startsWith("QZ")||e.includes("OPTION")?"option":"other"}function eo(t){return!t||t==="N"?[]:t.split("^").filter(Boolean).map(n=>{let r=n.split("~"),o=r[0]||"",i=r[1]||"",a=Xr(r[2]||""),u=r[4]||"";return{code:o+i,name:a,market:o,type:u,category:Jr(u)}})}function to(t){return new Promise((e,n)=>{let r=`${Sn}?v=2&t=all&q=${encodeURIComponent(t)}`;window.v_hint="";let o=document.createElement("script");o.src=r,o.charset="utf-8",o.onload=()=>{let i=window.v_hint||"";document.body.removeChild(o),e(i)},o.onerror=()=>{document.body.removeChild(o),n(new (0, _chunk4Q7UQ5Q3cjs.a)({code:"NETWORK_ERROR",message:"Network error calling Smartbox",url:r}))},document.body.appendChild(o)})}async function no(t,e){let n=`${Sn}?v=2&t=all&q=${encodeURIComponent(e)}`,o=(await t.get(n)).match(/v_hint="([^"]*)"/);return o?o[1]:""}function ro(){return typeof window<"u"&&typeof document<"u"}async function Tn(t,e){if(!e||!e.trim())return[];let n;return ro()?n=await to(e):n=await no(t,e),eo(n)}var p={};_chunk4VDLQK6Fcjs.a.call(void 0, p,{extractVariety:()=>gt,fetchDatacenter:()=>lt,fetchDatacenterList:()=>D,getBlockTradeDailyStat:()=>vr,getBlockTradeDetail:()=>kr,getBlockTradeMarketStat:()=>Nr,getBoardChanges:()=>Er,getCFFEXOptionQuotes:()=>Jn,getComexInventory:()=>or,getConceptConstituents:()=>Bn,getConceptKline:()=>Un,getConceptList:()=>Kn,getConceptMinuteKline:()=>xn,getConceptSpot:()=>wn,getDividendDetail:()=>Hn,getDragonTigerBranchRank:()=>Pr,getDragonTigerDetail:()=>Ir,getDragonTigerInstitution:()=>_r,getDragonTigerStockSeatDetail:()=>Fr,getDragonTigerStockStats:()=>Or,getFundDividendList:()=>zn,getFundEstimate:()=>Gn,getFundFlowRank:()=>dr,getFundNavHistory:()=>jn,getFundRankHistory:()=>Yn,getFuturesHistoryKline:()=>Wn,getFuturesInventory:()=>rr,getFuturesInventorySymbols:()=>nr,getFuturesMarketCode:()=>mt,getGlobalFuturesKline:()=>Xn,getGlobalFuturesSpot:()=>Zn,getHKHistoryKline:()=>Rn,getHKMinuteKline:()=>An,getHistoryKline:()=>hn,getIndividualFundFlow:()=>lr,getIndustryConstituents:()=>kn,getIndustryKline:()=>vn,getIndustryList:()=>Mn,getIndustryMinuteKline:()=>Ln,getIndustrySpot:()=>Nn,getMarginAccountInfo:()=>Lr,getMarginTargetList:()=>Kr,getMarketFundFlow:()=>cr,getMinuteKline:()=>Cn,getNorthboundFlowSummary:()=>Sr,getNorthboundHistory:()=>hr,getNorthboundHoldingRank:()=>Tr,getNorthboundIndividual:()=>Cr,getNorthboundMinute:()=>yr,getOptionLHB:()=>er,getSectorFundFlowHistory:()=>gr,getSectorFundFlowRank:()=>pr,getStockChanges:()=>Ar,getUSHistoryKline:()=>En,getUSMinuteKline:()=>Dn,getZTPool:()=>Rr});async function ut(t,e,n,r,o=100,i){let a=[],u=1,l=0;do{let c=new URLSearchParams({...n,pn:String(u),pz:String(o),fields:r}),g=`${e}?${c.toString()}`,y=await _asyncOptionalChain([(await t.get(g,{responseType:"json"})), 'optionalAccess', async _15 => _15.data]);if(!y||!Array.isArray(y.diff))break;u===1&&(l=_nullishCoalesce(y.total, () => (0)));let T=y.diff.map((C,h)=>i(C,a.length+h+1));if(a.push(...T),T.length===0)break;u++}while(a.length<l);return a}function L(t){let[e,n,r,o,i,a,u,l,c,g,S]=t.split(",");return{date:e,open:_chunk66NWE54Ccjs.e.call(void 0, n),close:_chunk66NWE54Ccjs.e.call(void 0, r),high:_chunk66NWE54Ccjs.e.call(void 0, o),low:_chunk66NWE54Ccjs.e.call(void 0, i),volume:_chunk66NWE54Ccjs.e.call(void 0, a),amount:_chunk66NWE54Ccjs.e.call(void 0, u),amplitude:_chunk66NWE54Ccjs.e.call(void 0, l),changePercent:_chunk66NWE54Ccjs.e.call(void 0, c),change:_chunk66NWE54Ccjs.e.call(void 0, g),turnoverRate:_chunk66NWE54Ccjs.e.call(void 0, S)}}async function K(t,e,n){let r=`${e}?${n.toString()}`,o=await t.get(r,{responseType:"json"});return{klines:_optionalChain([o, 'optionalAccess', _16 => _16.data, 'optionalAccess', _17 => _17.klines])||[],name:_optionalChain([o, 'optionalAccess', _18 => _18.data, 'optionalAccess', _19 => _19.name]),code:_optionalChain([o, 'optionalAccess', _20 => _20.data, 'optionalAccess', _21 => _21.code])}}async function hn(t,e,n={}){let{period:r="daily",adjust:o="qfq",startDate:i="19700101",endDate:a="20500101"}=n;_chunk66NWE54Ccjs.ca.call(void 0, r),_chunk66NWE54Ccjs.ea.call(void 0, o);let u=_chunk6JEP4QK7cjs.d.call(void 0, e,{market:"CN"}),l=_chunk6JEP4QK7cjs.f.call(void 0, u),c=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61,f116",ut:_chunk66NWE54Ccjs.H,klt:_chunk66NWE54Ccjs.ha.call(void 0, r),fqt:_chunk66NWE54Ccjs.ia.call(void 0, o),secid:l,beg:i,end:a}),g=_chunk66NWE54Ccjs.m,{klines:S}=await K(t,g,c);return S.length===0?[]:S.map(y=>{let T=L(y),C=_chunk66NWE54Ccjs.ra.call(void 0, T.date,_chunk66NWE54Ccjs.pa.CN);return{...T,timestamp:C.timestamp,tz:C.tz,code:u.code}})}async function Cn(t,e,n={}){let{period:r="1",adjust:o="qfq",startDate:i="1979-09-01 09:32:00",endDate:a="2222-01-01 09:32:00"}=n;_chunk66NWE54Ccjs.da.call(void 0, r),_chunk66NWE54Ccjs.ea.call(void 0, o);let u=_chunk6JEP4QK7cjs.f.call(void 0, _chunk6JEP4QK7cjs.d.call(void 0, e,{market:"CN"}));if(r==="1"){let l=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13",fields2:"f51,f52,f53,f54,f55,f56,f57,f58",ut:_chunk66NWE54Ccjs.H,ndays:"5",iscr:"0",secid:u}),c=`${_chunk66NWE54Ccjs.n}?${l.toString()}`,S=await _asyncOptionalChain([(await t.get(c,{responseType:"json"})), 'optionalAccess', async _22 => _22.data, 'optionalAccess', async _23 => _23.trends]);if(!Array.isArray(S)||S.length===0)return[];let y=i.replace("T"," ").slice(0,16),T=a.replace("T"," ").slice(0,16);return T.length===10&&(T+=" 23:59"),S.map(C=>{let[h,m,O,I,N,P,k,X]=C.split(","),B=_chunk66NWE54Ccjs.ra.call(void 0, h,_chunk66NWE54Ccjs.pa.CN);return{time:h,timestamp:B.timestamp,tz:B.tz,open:_chunk66NWE54Ccjs.e.call(void 0, m),close:_chunk66NWE54Ccjs.e.call(void 0, O),high:_chunk66NWE54Ccjs.e.call(void 0, I),low:_chunk66NWE54Ccjs.e.call(void 0, N),volume:_chunk66NWE54Ccjs.e.call(void 0, P),amount:_chunk66NWE54Ccjs.e.call(void 0, k),avgPrice:_chunk66NWE54Ccjs.e.call(void 0, X)}}).filter(C=>C.time>=y&&C.time<=T)}else{let l=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",ut:_chunk66NWE54Ccjs.H,klt:r,fqt:_chunk66NWE54Ccjs.ia.call(void 0, o||""),secid:u,beg:"0",end:"20500000"}),c=_chunk66NWE54Ccjs.m,{klines:g}=await K(t,c,l);if(g.length===0)return[];let S=i.replace("T"," ").slice(0,16),y=a.replace("T"," ").slice(0,16);return y.length===10&&(y+=" 23:59"),g.map(T=>{let C=L(T),h=_chunk66NWE54Ccjs.ra.call(void 0, C.date,_chunk66NWE54Ccjs.pa.CN);return{...C,time:C.date,timestamp:h.timestamp,tz:h.tz}}).filter(T=>T.time>=S&&T.time<=y)}}function we(t){return async function(n,r,o={}){let{period:i="daily",adjust:a="qfq",startDate:u="19700101",endDate:l="20500101"}=o;_chunk66NWE54Ccjs.ca.call(void 0, i),_chunk66NWE54Ccjs.ea.call(void 0, a);let c=t.normalizeSymbol(r),g=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",ut:_chunk66NWE54Ccjs.H,klt:_chunk66NWE54Ccjs.ha.call(void 0, i),fqt:_chunk66NWE54Ccjs.ia.call(void 0, a),secid:c.secid,beg:u,end:l,lmt:"1000000"}),{klines:S,name:y,code:T}=await K(n,t.url,g);if(S.length===0)return[];let C=t.resolveResultMeta?t.resolveResultMeta(r,c,{code:T,name:y}):{code:T||c.fallbackCode,name:y||""};return S.map(h=>{let m=L(h),O=_chunk66NWE54Ccjs.ra.call(void 0, m.date,t.tz),I={...m,timestamp:O.timestamp,tz:O.tz,code:C.code,name:C.name};return t.enrichItem(I)})}}var oo=we({url:_chunk66NWE54Ccjs.o,tz:_chunk66NWE54Ccjs.pa.HK,normalizeSymbol:t=>{let e=t.replace(/^hk/i,"").padStart(5,"0");return{secid:`116.${e}`,fallbackCode:e}},enrichItem:t=>({...t,currency:"HKD",lotSize:null})});async function Rn(t,e,n={}){return oo(t,e,n)}async function An(t,e,n={}){let{period:r="1",adjust:o="qfq",startDate:i="1979-09-01 09:32:00",endDate:a="2222-01-01 09:32:00",ndays:u=1}=n;_chunk66NWE54Ccjs.da.call(void 0, r),_chunk66NWE54Ccjs.ea.call(void 0, o);let l=e.replace(/^hk/i,"").padStart(5,"0"),c=`116.${l}`,g=h=>{let m=_chunk66NWE54Ccjs.qa.call(void 0, h,_chunk66NWE54Ccjs.pa.CN);return{time:_chunk66NWE54Ccjs.ta.call(void 0, m,_chunk66NWE54Ccjs.pa.HK)||h,timestamp:m}};if(r==="1"){let h=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13",fields2:"f51,f52,f53,f54,f55,f56,f57,f58",ut:_chunk66NWE54Ccjs.H,ndays:String(u),iscr:"0",secid:c}),m=`${_chunk66NWE54Ccjs.q}?${h.toString()}`,I=await _asyncOptionalChain([(await t.get(m,{responseType:"json"})), 'optionalAccess', async _24 => _24.data, 'optionalAccess', async _25 => _25.trends]);if(!Array.isArray(I)||I.length===0)return[];let N=i.replace("T"," ").slice(0,16),P=a.replace("T"," ").slice(0,16);return P.length===10&&(P+=" 23:59"),I.map(k=>{let[X,B,ee,G,Y,Ue,xe,He]=k.split(","),{time:qe,timestamp:Qe}=g(X);return{time:qe,timestamp:Qe,tz:_chunk66NWE54Ccjs.pa.HK,open:_chunk66NWE54Ccjs.e.call(void 0, B),close:_chunk66NWE54Ccjs.e.call(void 0, ee),high:_chunk66NWE54Ccjs.e.call(void 0, G),low:_chunk66NWE54Ccjs.e.call(void 0, Y),volume:_chunk66NWE54Ccjs.e.call(void 0, Ue),amount:_chunk66NWE54Ccjs.e.call(void 0, xe),avgPrice:_chunk66NWE54Ccjs.e.call(void 0, He),currency:"HKD",code:l}}).filter(k=>k.time>=N&&k.time<=P)}let S=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",ut:_chunk66NWE54Ccjs.H,klt:r,fqt:_chunk66NWE54Ccjs.ia.call(void 0, o),secid:c,beg:"0",end:"20500000"}),{klines:y}=await K(t,_chunk66NWE54Ccjs.o,S);if(y.length===0)return[];let T=i.replace("T"," ").slice(0,16),C=a.replace("T"," ").slice(0,16);return C.length===10&&(C+=" 23:59"),y.map(h=>{let m=L(h),{time:O,timestamp:I}=g(m.date);return{time:O,timestamp:I,tz:_chunk66NWE54Ccjs.pa.HK,open:m.open,close:m.close,high:m.high,low:m.low,volume:m.volume,amount:m.amount,amplitude:m.amplitude,changePercent:m.changePercent,change:m.change,turnoverRate:m.turnoverRate,currency:"HKD",code:l}}).filter(h=>h.time>=T&&h.time<=C)}var io=we({url:_chunk66NWE54Ccjs.p,tz:_chunk66NWE54Ccjs.pa.US,normalizeSymbol:t=>({secid:t,fallbackCode:t.split(".")[1]||t}),resolveResultMeta:(t,e,n)=>({code:n.code||e.fallbackCode,name:n.name||""}),enrichItem:t=>({...t,currency:"USD"})});async function En(t,e,n={}){return io(t,e,n)}async function Dn(t,e,n={}){let{period:r="1",adjust:o="qfq",startDate:i="1979-09-01 09:32:00",endDate:a="2222-01-01 09:32:00",ndays:u=1}=n;_chunk66NWE54Ccjs.da.call(void 0, r),_chunk66NWE54Ccjs.ea.call(void 0, o);let l=e,c=e.split(".")[1]||e,g=h=>{let m=_chunk66NWE54Ccjs.qa.call(void 0, h,_chunk66NWE54Ccjs.pa.CN);return{time:_chunk66NWE54Ccjs.ta.call(void 0, m,_chunk66NWE54Ccjs.pa.US)||h,timestamp:m}};if(r==="1"){let h=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13",fields2:"f51,f52,f53,f54,f55,f56,f57,f58",ut:_chunk66NWE54Ccjs.H,ndays:String(u),iscr:"0",secid:l}),m=`${_chunk66NWE54Ccjs.r}?${h.toString()}`,I=await _asyncOptionalChain([(await t.get(m,{responseType:"json"})), 'optionalAccess', async _26 => _26.data, 'optionalAccess', async _27 => _27.trends]);if(!Array.isArray(I)||I.length===0)return[];let N=i.replace("T"," ").slice(0,16),P=a.replace("T"," ").slice(0,16);return P.length===10&&(P+=" 23:59"),I.map(k=>{let[X,B,ee,G,Y,Ue,xe,He]=k.split(","),{time:qe,timestamp:Qe}=g(X);return{time:qe,timestamp:Qe,tz:_chunk66NWE54Ccjs.pa.US,open:_chunk66NWE54Ccjs.e.call(void 0, B),close:_chunk66NWE54Ccjs.e.call(void 0, ee),high:_chunk66NWE54Ccjs.e.call(void 0, G),low:_chunk66NWE54Ccjs.e.call(void 0, Y),volume:_chunk66NWE54Ccjs.e.call(void 0, Ue),amount:_chunk66NWE54Ccjs.e.call(void 0, xe),avgPrice:_chunk66NWE54Ccjs.e.call(void 0, He),currency:"USD",code:c}}).filter(k=>k.time>=N&&k.time<=P)}let S=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",ut:_chunk66NWE54Ccjs.H,klt:r,fqt:_chunk66NWE54Ccjs.ia.call(void 0, o),secid:l,beg:"0",end:"20500000"}),{klines:y}=await K(t,_chunk66NWE54Ccjs.p,S);if(y.length===0)return[];let T=i.replace("T"," ").slice(0,16),C=a.replace("T"," ").slice(0,16);return C.length===10&&(C+=" 23:59"),y.map(h=>{let m=L(h),{time:O,timestamp:I}=g(m.date);return{time:O,timestamp:I,tz:_chunk66NWE54Ccjs.pa.US,open:m.open,close:m.close,high:m.high,low:m.low,volume:m.volume,amount:m.amount,amplitude:m.amplitude,changePercent:m.changePercent,change:m.change,turnoverRate:m.turnoverRate,currency:"USD",code:c}}).filter(h=>h.time>=T&&h.time<=C)}function In(t){let e=_chunkDOOAXFSScjs.b.call(void 0, `eastmoney:board-code-map:${t.type}`,{defaultTTL:36e5,maxSize:4});return{async getCode(n,r,o){if(r.startsWith("BK"))return r;let a=(await e.getOrFetch("name-code-map",async()=>{let u=await o(n);return Object.fromEntries(u.map(l=>[l.name,l.code]))}))[r];if(!a)throw new (0, _chunk4Q7UQ5Q3cjs.d)(`${t.errorPrefix}: ${r}`,"eastmoney");return a}}}async function On(t,e){let n={po:"1",np:"1",ut:"bd1d9ddb04089700cf9c27f6f7426281",fltt:"2",invt:"2",fid:e.type==="concept"?"f12":"f3",fs:e.fsFilter},r=e.type==="concept"?"f2,f3,f4,f8,f12,f14,f15,f16,f17,f18,f20,f21,f24,f25,f22,f33,f11,f62,f128,f124,f107,f104,f105,f136":"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f12,f13,f14,f15,f16,f17,f18,f20,f21,f23,f24,f25,f26,f22,f33,f11,f62,f128,f136,f115,f152,f124,f107,f104,f105,f140,f141,f207,f208,f209,f222",o=await ut(t,e.listUrl,n,r,100,(i,a)=>({rank:a,name:String(_nullishCoalesce(i.f14, () => (""))),code:String(_nullishCoalesce(i.f12, () => (""))),price:_chunk66NWE54Ccjs.f.call(void 0, i.f2),change:_chunk66NWE54Ccjs.f.call(void 0, i.f4),changePercent:_chunk66NWE54Ccjs.f.call(void 0, i.f3),totalMarketCap:_chunk66NWE54Ccjs.f.call(void 0, i.f20),turnoverRate:_chunk66NWE54Ccjs.f.call(void 0, i.f8),riseCount:_chunk66NWE54Ccjs.f.call(void 0, i.f104),fallCount:_chunk66NWE54Ccjs.f.call(void 0, i.f105),leadingStock:i.f128?String(i.f128):null,leadingStockChangePercent:_chunk66NWE54Ccjs.f.call(void 0, i.f136)}));return o.sort((i,a)=>(_nullishCoalesce(a.changePercent, () => (0)))-(_nullishCoalesce(i.changePercent, () => (0)))),o.forEach((i,a)=>{i.rank=a+1}),o}async function _n(t,e,n){let r=new URLSearchParams({fields:"f43,f44,f45,f46,f47,f48,f170,f171,f168,f169",mpi:"1000",invt:"2",fltt:"1",secid:`90.${e}`}),o=`${n}?${r.toString()}`,a=await _asyncOptionalChain([(await t.get(o,{responseType:"json"})), 'optionalAccess', async _28 => _28.data]);return a?[{key:"f43",name:"\u6700\u65B0",divide:!0},{key:"f44",name:"\u6700\u9AD8",divide:!0},{key:"f45",name:"\u6700\u4F4E",divide:!0},{key:"f46",name:"\u5F00\u76D8",divide:!0},{key:"f47",name:"\u6210\u4EA4\u91CF",divide:!1},{key:"f48",name:"\u6210\u4EA4\u989D",divide:!1},{key:"f170",name:"\u6DA8\u8DCC\u5E45",divide:!0},{key:"f171",name:"\u632F\u5E45",divide:!0},{key:"f168",name:"\u6362\u624B\u7387",divide:!0},{key:"f169",name:"\u6DA8\u8DCC\u989D",divide:!0}].map(({key:l,name:c,divide:g})=>{let S=a[l],y=null;return typeof S=="number"&&!isNaN(S)&&(y=g?S/100:S),{item:c,value:y}}):[]}async function Pn(t,e,n){let r={po:"1",np:"1",ut:"bd1d9ddb04089700cf9c27f6f7426281",fltt:"2",invt:"2",fid:"f3",fs:`b:${e} f:!50`};return ut(t,n,r,"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f12,f13,f14,f15,f16,f17,f18,f20,f21,f23,f24,f25,f22,f11,f62,f128,f136,f115,f152,f45",100,(i,a)=>({rank:a,code:String(_nullishCoalesce(i.f12, () => (""))),name:String(_nullishCoalesce(i.f14, () => (""))),price:_chunk66NWE54Ccjs.f.call(void 0, i.f2),changePercent:_chunk66NWE54Ccjs.f.call(void 0, i.f3),change:_chunk66NWE54Ccjs.f.call(void 0, i.f4),volume:_chunk66NWE54Ccjs.f.call(void 0, i.f5),amount:_chunk66NWE54Ccjs.f.call(void 0, i.f6),amplitude:_chunk66NWE54Ccjs.f.call(void 0, i.f7),high:_chunk66NWE54Ccjs.f.call(void 0, i.f15),low:_chunk66NWE54Ccjs.f.call(void 0, i.f16),open:_chunk66NWE54Ccjs.f.call(void 0, i.f17),prevClose:_chunk66NWE54Ccjs.f.call(void 0, i.f18),turnoverRate:_chunk66NWE54Ccjs.f.call(void 0, i.f8),pe:_chunk66NWE54Ccjs.f.call(void 0, i.f9),pb:_chunk66NWE54Ccjs.f.call(void 0, i.f23)}))}async function Fn(t,e,n,r={}){let{period:o="daily",adjust:i="",startDate:a="19700101",endDate:u="20500101"}=r;_chunk66NWE54Ccjs.ca.call(void 0, o),_chunk66NWE54Ccjs.ea.call(void 0, i);let l=new URLSearchParams({secid:`90.${e}`,fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",klt:_chunk66NWE54Ccjs.ha.call(void 0, o),fqt:_chunk66NWE54Ccjs.ia.call(void 0, i),beg:a,end:u,smplmt:"10000",lmt:"1000000"}),{klines:c}=await K(t,n,l);return c.length===0?[]:c.map(g=>L(g))}async function bn(t,e,n,r,o={}){let{period:i="5"}=o;if(_chunk66NWE54Ccjs.da.call(void 0, i),i==="1"){let a=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13",fields2:"f51,f52,f53,f54,f55,f56,f57,f58",iscr:"0",ndays:"1",secid:`90.${e}`}),u=`${r}?${a.toString()}`,c=await _asyncOptionalChain([(await t.get(u,{responseType:"json"})), 'optionalAccess', async _29 => _29.data, 'optionalAccess', async _30 => _30.trends]);return!Array.isArray(c)||c.length===0?[]:c.map(g=>{let[S,y,T,C,h,m,O,I]=g.split(","),N=_chunk66NWE54Ccjs.e.call(void 0, I);return{time:S,open:_chunk66NWE54Ccjs.e.call(void 0, y),close:_chunk66NWE54Ccjs.e.call(void 0, T),high:_chunk66NWE54Ccjs.e.call(void 0, C),low:_chunk66NWE54Ccjs.e.call(void 0, h),volume:_chunk66NWE54Ccjs.e.call(void 0, m),amount:_chunk66NWE54Ccjs.e.call(void 0, O),price:N}})}else{let a=new URLSearchParams({secid:`90.${e}`,fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",klt:i,fqt:"1",beg:"0",end:"20500101",smplmt:"10000",lmt:"1000000"}),u=`${n}?${a.toString()}`,c=await _asyncOptionalChain([(await t.get(u,{responseType:"json"})), 'optionalAccess', async _31 => _31.data, 'optionalAccess', async _32 => _32.klines]);return!Array.isArray(c)||c.length===0?[]:c.map(g=>{let[S,y,T,C,h,m,O,I,N,P,k]=g.split(",");return{time:S,open:_chunk66NWE54Ccjs.e.call(void 0, y),close:_chunk66NWE54Ccjs.e.call(void 0, T),high:_chunk66NWE54Ccjs.e.call(void 0, C),low:_chunk66NWE54Ccjs.e.call(void 0, h),changePercent:_chunk66NWE54Ccjs.e.call(void 0, N),change:_chunk66NWE54Ccjs.e.call(void 0, P),volume:_chunk66NWE54Ccjs.e.call(void 0, m),amount:_chunk66NWE54Ccjs.e.call(void 0, O),amplitude:_chunk66NWE54Ccjs.e.call(void 0, I),turnoverRate:_chunk66NWE54Ccjs.e.call(void 0, k)}})}}function Be(t){let e=In(t);async function n(o){return On(o,t)}async function r(o,i){return e.getCode(o,i,n)}return{async getList(o){return n(o)},async getSpot(o,i){let a=await r(o,i);return _n(o,a,t.spotUrl)},async getConstituents(o,i){let a=await r(o,i);return Pn(o,a,t.consUrl)},async getKline(o,i,a={}){let u=await r(o,i);return Fn(o,u,t.klineUrl,a)},async getMinuteKline(o,i,a={}){let u=await r(o,i);return bn(o,u,t.klineUrl,t.trendsUrl,a)}}}var so={type:"industry",fsFilter:"m:90 t:2 f:!50",listUrl:_chunk66NWE54Ccjs.s,spotUrl:_chunk66NWE54Ccjs.t,consUrl:_chunk66NWE54Ccjs.u,klineUrl:_chunk66NWE54Ccjs.v,trendsUrl:_chunk66NWE54Ccjs.w,errorPrefix:"\u672A\u627E\u5230\u884C\u4E1A\u677F\u5757"},ie=Be(so);async function Mn(t){return ie.getList(t)}async function Nn(t,e){return ie.getSpot(t,e)}async function kn(t,e){return ie.getConstituents(t,e)}async function vn(t,e,n={}){return ie.getKline(t,e,n)}async function Ln(t,e,n={}){return ie.getMinuteKline(t,e,n)}var ao={type:"concept",fsFilter:"m:90 t:3 f:!50",listUrl:_chunk66NWE54Ccjs.x,spotUrl:_chunk66NWE54Ccjs.y,consUrl:_chunk66NWE54Ccjs.z,klineUrl:_chunk66NWE54Ccjs.A,trendsUrl:_chunk66NWE54Ccjs.B,errorPrefix:"\u672A\u627E\u5230\u6982\u5FF5\u677F\u5757"},se=Be(ao);async function Kn(t){return se.getList(t)}async function wn(t,e){return se.getSpot(t,e)}async function Bn(t,e){return se.getConstituents(t,e)}async function Un(t,e,n={}){return se.getKline(t,e,n)}async function xn(t,e,n={}){return se.getMinuteKline(t,e,n)}async function lt(t,e,n){let{reportName:r,columns:o="ALL",filter:i,sortColumns:a,sortTypes:u,pageSize:l=500,startPage:c=1,fetchAllPages:g=!0,maxPages:S=1e3,quoteColumns:y,quoteType:T,extraParams:C}=e,h=[],m=c,O=1,I=0,N=0;do{let P=new URLSearchParams({reportName:r,columns:o,pageSize:String(l),pageNumber:String(m),source:"WEB",client:"WEB"});if(i&&P.set("filter",i),a&&P.set("sortColumns",a),u&&P.set("sortTypes",u),y&&P.set("quoteColumns",y),T&&P.set("quoteType",T),C)for(let[G,Y]of Object.entries(C))P.set(G,Y);let k=`${_chunk66NWE54Ccjs.C}?${P.toString()}`,B=await _asyncOptionalChain([(await t.get(k,{responseType:"json"})), 'optionalAccess', async _33 => _33.result]);if(!B||!Array.isArray(B.data))break;m===c&&(O=_nullishCoalesce(B.pages, () => (1)),I=_nullishCoalesce(B.count, () => (B.data.length)));let ee=B.data.map((G,Y)=>n(G,h.length+Y));if(h.push(...ee),m++,N++,!g)break}while(m<=O&&N<S);return g&&N>=S&&m<=O&&console.warn(`[stock-sdk] fetchDatacenter("${r}") truncated at maxPages=${S} (server reports ${O} pages). Pass a larger \`maxPages\` to fetch the full dataset.`),{data:h,total:I,pages:O}}async function D(t,e,n){return(await lt(t,e,n)).data}function M(t){if(t==null)return"";let e=String(t),n=e.match(/^(\d{4}-\d{2}-\d{2})/);return n?n[1]:e}function Z(t){if(!t)return null;let e=t.match(/^(\d{4}-\d{2}-\d{2})/);return e?e[1]:null}function uo(t){return{code:_nullishCoalesce(t.SECURITY_CODE, () => ("")),name:_nullishCoalesce(t.SECURITY_NAME_ABBR, () => ("")),reportDate:Z(t.REPORT_DATE),planNoticeDate:Z(t.PLAN_NOTICE_DATE),disclosureDate:Z(_nullishCoalesce(t.PUBLISH_DATE, () => (t.PLAN_NOTICE_DATE))),assignTransferRatio:_nullishCoalesce(t.BONUS_IT_RATIO, () => (null)),bonusRatio:_nullishCoalesce(t.BONUS_RATIO, () => (null)),transferRatio:_nullishCoalesce(t.IT_RATIO, () => (null)),dividendPretax:_nullishCoalesce(t.PRETAX_BONUS_RMB, () => (null)),dividendDesc:_nullishCoalesce(t.IMPL_PLAN_PROFILE, () => (null)),dividendYield:_nullishCoalesce(t.DIVIDENT_RATIO, () => (null)),eps:_nullishCoalesce(t.BASIC_EPS, () => (null)),bps:_nullishCoalesce(t.BVPS, () => (null)),capitalReserve:_nullishCoalesce(t.PER_CAPITAL_RESERVE, () => (null)),unassignedProfit:_nullishCoalesce(t.PER_UNASSIGN_PROFIT, () => (null)),netProfitYoy:_nullishCoalesce(t.PNP_YOY_RATIO, () => (null)),totalShares:_nullishCoalesce(t.TOTAL_SHARES, () => (null)),equityRecordDate:Z(t.EQUITY_RECORD_DATE),exDividendDate:Z(t.EX_DIVIDEND_DATE),payDate:Z(t.PAY_DATE),assignProgress:_nullishCoalesce(t.ASSIGN_PROGRESS, () => (null)),noticeDate:Z(t.NOTICE_DATE)}}async function Hn(t,e){let n=e.replace(/^(sh|sz|bj)/,"");return D(t,{reportName:"RPT_SHAREBONUS_DET",sortColumns:"REPORT_DATE",sortTypes:"-1",pageSize:500,filter:`(SECURITY_CODE="${n}")`},r=>uo(r))}var lo="https://fund.eastmoney.com/Data/funddataIndex_Interface.aspx",Qn="https://fund.eastmoney.com/pingzhongdata",co="https://fundgz.1234567.com.cn/js";function po(){return typeof document<"u"&&typeof window<"u"}var go=1e4;function mo(){return new Date().getFullYear()}function fo(t,e){let n=new URLSearchParams({dt:"8",page:String(e),rank:_nullishCoalesce(t.rank, () => ("FSRQ")),sort:_nullishCoalesce(t.sort, () => ("desc")),gs:"",ftype:_nullishCoalesce(t.fundType, () => ("")),year:String(_nullishCoalesce(t.year, () => (mo())))});return`${lo}?${n.toString()}`}function ct(t){if(!t)return null;let e=t.trim().match(/^(\d{4}-\d{2}-\d{2})/);return e?e[1]:null}function yo(t){if(t===void 0||t==="")return null;let e=Number(t);return Number.isFinite(e)?e:null}function So(t){return{code:_nullishCoalesce(t[0], () => ("")),name:_nullishCoalesce(t[1], () => ("")),equityRecordDate:ct(t[2]),exDividendDate:ct(t[3]),dividendPerShare:yo(t[4]),payDate:ct(t[5])}}async function dt(t,e,n){let r=fo(e,n),o=await _chunk66NWE54Ccjs.na.call(void 0, r,["pageinfo","jjfh_data"],{client:t}),i=_nullishCoalesce(o.pageinfo, () => ([0,0,n])),[a=0,u=0,l=n]=i;return{items:(_nullishCoalesce(o.jjfh_data, () => ([]))).map(So),totalPages:a,pageSize:u,currentPage:l}}async function zn(t,e={}){if(e.page==="all"){let o=await dt(t,e,1),i=o.items;for(let a=2;a<=o.totalPages;a++){let u=await dt(t,e,a);i=i.concat(u.items)}return e.code&&(i=i.filter(a=>a.code===e.code)),{items:i,totalPages:o.totalPages,pageSize:o.pageSize,currentPage:-1}}let n=_nullishCoalesce(e.page, () => (1)),r=await dt(t,e,n);return e.code?{...r,items:r.items.filter(o=>o.code===e.code)}:r}function To(t){if(t===void 0||t===""||t===null)return null;let e=typeof t=="number"?t:Number(t);return Number.isFinite(e)?e:null}function $n(t){return new Date(t).toISOString().slice(0,10)}async function jn(t,e){let n=`${Qn}/${encodeURIComponent(e)}.js`,r=await _chunk66NWE54Ccjs.na.call(void 0, n,["fS_code","fS_name","Data_netWorthTrend","Data_ACWorthTrend"],{client:t}),o=_nullishCoalesce(r.Data_netWorthTrend, () => ([])),i=new Map;for(let u of _nullishCoalesce(r.Data_ACWorthTrend, () => ([])))Array.isArray(u)&&u.length>=2&&i.set(u[0],u[1]);let a=o.map(u=>({date:$n(u.x),timestamp:u.x,nav:u.y,accNav:i.has(u.x)?i.get(u.x):null,dailyReturn:To(u.equityReturn),unitMoney:_nullishCoalesce(u.unitMoney, () => (""))}));return{code:_nullishCoalesce(r.fS_code, () => (e)),name:_nullishCoalesce(r.fS_name, () => (null)),items:a}}function ho(t,e,n=go){let r=`${co}/${encodeURIComponent(e)}.js?rt=${Date.now()}`;return po()?_chunk66NWE54Ccjs.la.call(void 0, "fundgz:jsonpgz",()=>Co(r,n)):Ro(t,r)}function Co(t,e){return new Promise((n,r)=>{let o=document.createElement("script"),i=window,a=i.jsonpgz,u=!1,l=()=>{if(o.parentNode&&o.parentNode.removeChild(o),a===void 0)try{delete i.jsonpgz}catch (e2){}else i.jsonpgz=a},c=setTimeout(()=>{u||(u=!0,l(),r(new (0, _chunk4Q7UQ5Q3cjs.a)({code:"TIMEOUT",message:`fundgz JSONP timed out after ${e}ms: ${t}`,url:t,details:{timeout:e}})))},e);i.jsonpgz=g=>{u||(u=!0,clearTimeout(c),l(),n(_nullishCoalesce(g, () => ({}))))},o.onerror=()=>{u||(u=!0,clearTimeout(c),l(),r(new (0, _chunk4Q7UQ5Q3cjs.a)({code:"NETWORK_ERROR",message:`fundgz JSONP script load failed: ${t}`,url:t})))},o.src=t,document.head.appendChild(o)})}async function Ro(t,e){let r=(await t.get(e,{responseType:"text",provider:"eastmoney"})).trim();if(!r)return{};try{return _chunk66NWE54Ccjs.ja.call(void 0, r)}catch (e3){return{}}}function pt(t){if(t===void 0||t===""||t==="--")return null;let e=Number(t);return Number.isFinite(e)?e:null}async function Gn(t,e){let n=await ho(t,e);return{code:_nullishCoalesce(n.fundcode, () => (e)),name:_nullishCoalesce(n.name, () => (null)),navDate:_optionalChain([n, 'access', _34 => _34.jzrq, 'optionalAccess', _35 => _35.trim, 'call', _36 => _36()])?n.jzrq.trim():null,nav:pt(n.dwjz),estimatedNav:pt(n.gsz),estimatedChangePercent:pt(n.gszzl),estimateTime:_optionalChain([n, 'access', _37 => _37.gztime, 'optionalAccess', _38 => _38.trim, 'call', _39 => _39()])?n.gztime.trim():null}}function qn(t){if(t===void 0||t===""||t===null)return null;let e=typeof t=="number"?t:Number(t);return Number.isFinite(e)?e:null}async function Yn(t,e){let n=`${Qn}/${encodeURIComponent(e)}.js`,r=await _chunk66NWE54Ccjs.na.call(void 0, n,["fS_code","fS_name","Data_rateInSimilarType","Data_rateInSimilarPersent"],{client:t}),o=_nullishCoalesce(r.Data_rateInSimilarType, () => ([])),i=new Map;for(let u of _nullishCoalesce(r.Data_rateInSimilarPersent, () => ([])))Array.isArray(u)&&u.length>=2&&i.set(u[0],u[1]);let a=o.map(u=>({date:$n(u.x),timestamp:u.x,rank:qn(u.y),total:qn(u.sc),percentile:i.has(u.x)?i.get(u.x):null}));return{code:_nullishCoalesce(r.fS_code, () => (e)),name:_nullishCoalesce(r.fS_name, () => (null)),items:a}}function gt(t){let e=t.match(/^([a-zA-Z]+)/);if(!e)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid futures symbol: "${t}". Expected format: variety + contract (e.g., rb2605, RBM, IF2604)`);return e[1]}function Vn(t){return _nullishCoalesce(_nullishCoalesce(_chunk66NWE54Ccjs.N[t], () => (_chunk66NWE54Ccjs.N[t.toLowerCase()])), () => (_chunk66NWE54Ccjs.N[t.toUpperCase()]))}function mt(t){let e=Vn(t);if(!e&&t.length>1&&t.endsWith("M")&&(e=Vn(t.slice(0,-1))),!e){let r=Object.keys(_chunk66NWE54Ccjs.N).join(", ");throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Unknown futures variety: "${t}". Supported varieties: ${r}`)}let n=_chunk66NWE54Ccjs.M[e];if(n===void 0)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`No market code found for exchange: ${e}`);return n}function Ao(t){let e=L(t),n=t.split(",");return{...e,openInterest:n.length>12?_chunk66NWE54Ccjs.e.call(void 0, n[12]):null}}async function Wn(t,e,n={}){let{period:r="daily",startDate:o="19700101",endDate:i="20500101"}=n;_chunk66NWE54Ccjs.ca.call(void 0, r);let a=gt(e),l=`${mt(a)}.${e}`,c=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61,f62,f63,f64",ut:_chunk66NWE54Ccjs.H,klt:_chunk66NWE54Ccjs.ha.call(void 0, r),fqt:"0",secid:l,beg:o,end:i}),{klines:g,name:S,code:y}=await K(t,_chunk66NWE54Ccjs.J,c);return g.length===0?[]:g.map(T=>({...Ao(T),code:y||e,name:S||""}))}async function Zn(t,e={}){let n=_nullishCoalesce(e.pageSize, () => (20)),r=[],o=0,i=0;do{let a=new URLSearchParams({orderBy:"dm",sort:"desc",pageSize:String(n),pageIndex:String(o),token:_chunk66NWE54Ccjs.L,field:"dm,sc,name,p,zsjd,zde,zdf,f152,o,h,l,zjsj,vol,wp,np,ccl",blockName:"callback"}),u=`${_chunk66NWE54Ccjs.K}?${a.toString()}`,l=await t.get(u,{responseType:"json"});if(!l||!Array.isArray(l.list))break;o===0&&(i=_nullishCoalesce(l.total, () => (0)));let c=l.list.map(Eo);r.push(...c),o++}while(r.length<i);return r}function Eo(t){return{code:t.dm||"",name:t.name||"",price:_chunk66NWE54Ccjs.e.call(void 0, String(t.p)),change:_chunk66NWE54Ccjs.e.call(void 0, String(t.zde)),changePercent:_chunk66NWE54Ccjs.e.call(void 0, String(t.zdf)),open:_chunk66NWE54Ccjs.e.call(void 0, String(t.o)),high:_chunk66NWE54Ccjs.e.call(void 0, String(t.h)),low:_chunk66NWE54Ccjs.e.call(void 0, String(t.l)),prevSettle:_chunk66NWE54Ccjs.e.call(void 0, String(t.zjsj)),volume:_chunk66NWE54Ccjs.e.call(void 0, String(t.vol)),buyVolume:_chunk66NWE54Ccjs.e.call(void 0, String(t.wp)),sellVolume:_chunk66NWE54Ccjs.e.call(void 0, String(t.np)),openInterest:_chunk66NWE54Ccjs.e.call(void 0, String(t.ccl))}}function Do(t){let e=L(t),n=t.split(",");return{...e,openInterest:n.length>12?_chunk66NWE54Ccjs.e.call(void 0, n[12]):null}}function Io(t){let e=t.match(/^([A-Z]+)/);if(!e)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid global futures symbol: "${t}". Expected format like HG00Y, CL2507`);return e[1]}async function Xn(t,e,n={}){let{period:r="daily",startDate:o="19700101",endDate:i="20500101"}=n;_chunk66NWE54Ccjs.ca.call(void 0, r);let a=n.marketCode;if(a===void 0){let y=Io(e);if(a=_chunk66NWE54Ccjs.O[y],a===void 0){let T=Object.keys(_chunk66NWE54Ccjs.O).join(", ");throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Unknown global futures variety: "${y}". Supported: ${T}. Or specify marketCode manually via options.`)}}let u=`${a}.${e}`,l=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61,f62,f63,f64",ut:_chunk66NWE54Ccjs.H,klt:_chunk66NWE54Ccjs.ha.call(void 0, r),fqt:"0",secid:u,beg:o,end:i}),{klines:c,name:g,code:S}=await K(t,_chunk66NWE54Ccjs.J,l);return c.length===0?[]:c.map(y=>({...Do(y),code:S||e,name:g||""}))}async function Jn(t,e={}){let{pageSize:n=2e4}=e,r=new URLSearchParams({orderBy:"zdf",sort:"desc",pageSize:String(n),pageIndex:"0",token:_chunk66NWE54Ccjs.L,field:"dm,sc,name,p,zsjd,zde,zdf,f152,vol,cje,ccl,xqj,syr,rz,zjsj,o"}),o=`${_chunk66NWE54Ccjs.W}?${r.toString()}`,a=await _asyncOptionalChain([(await t.get(o,{responseType:"json"})), 'optionalAccess', async _40 => _40.list]);return Array.isArray(a)?a.map(u=>({code:String(_nullishCoalesce(u.dm, () => (""))),name:String(_nullishCoalesce(u.name, () => (""))),price:_chunk66NWE54Ccjs.f.call(void 0, u.p),change:_chunk66NWE54Ccjs.f.call(void 0, u.zde),changePercent:_chunk66NWE54Ccjs.f.call(void 0, u.zdf),volume:_chunk66NWE54Ccjs.f.call(void 0, u.vol),amount:_chunk66NWE54Ccjs.f.call(void 0, u.cje),openInterest:_chunk66NWE54Ccjs.f.call(void 0, u.ccl),strikePrice:_chunk66NWE54Ccjs.f.call(void 0, u.xqj),remainDays:_chunk66NWE54Ccjs.f.call(void 0, u.syr),dailyChange:_chunk66NWE54Ccjs.f.call(void 0, u.rz),prevSettle:_chunk66NWE54Ccjs.f.call(void 0, u.zjsj),open:_chunk66NWE54Ccjs.f.call(void 0, u.o)})):[]}async function er(t,e,n){let r=new URLSearchParams({type:"RPT_IF_BILLBOARD_TD",sty:"ALL",p:"1",ps:"200",source:"IFBILLBOARD",client:"WEB",ut:_chunk66NWE54Ccjs.I,filter:`(SECURITY_CODE="${e}")(TRADE_DATE='${n}')`}),o=`${_chunk66NWE54Ccjs.X}?${r.toString()}`,a=await _asyncOptionalChain([(await t.get(o,{responseType:"json"})), 'optionalAccess', async _41 => _41.result, 'optionalAccess', async _42 => _42.data]);if(!Array.isArray(a))return[];function u(l){if(!l)return"";let c=String(l),g=c.match(/^(\d{4}-\d{2}-\d{2})/);return g?g[1]:c}return a.map(l=>({tradeType:String(_nullishCoalesce(l.TRADE_TYPE, () => (""))),date:u(l.TRADE_DATE),symbol:String(_nullishCoalesce(l.SECURITY_CODE, () => (""))),targetName:String(_nullishCoalesce(l.TARGET_NAME, () => (""))),memberName:String(_nullishCoalesce(l.MEMBER_NAME_ABBR, () => (""))),rank:_nullishCoalesce(_chunk66NWE54Ccjs.f.call(void 0, l.MEMBER_RANK), () => (0)),sellVolume:_chunk66NWE54Ccjs.f.call(void 0, l.SELL_VOLUME),sellVolumeChange:_chunk66NWE54Ccjs.f.call(void 0, l.SELL_VOLUME_CHANGE),netSellVolume:_chunk66NWE54Ccjs.f.call(void 0, l.NET_SELL_VOLUME),sellVolumeRatio:_chunk66NWE54Ccjs.f.call(void 0, l.SELL_VOLUME_RATIO),buyVolume:_chunk66NWE54Ccjs.f.call(void 0, l.BUY_VOLUME),buyVolumeChange:_chunk66NWE54Ccjs.f.call(void 0, l.BUY_VOLUME_CHANGE),netBuyVolume:_chunk66NWE54Ccjs.f.call(void 0, l.NET_BUY_VOLUME),buyVolumeRatio:_chunk66NWE54Ccjs.f.call(void 0, l.BUY_VOLUME_RATIO),sellPosition:_chunk66NWE54Ccjs.f.call(void 0, l.SELL_POSITION),sellPositionChange:_chunk66NWE54Ccjs.f.call(void 0, l.SELL_POSITION_CHANGE),netSellPosition:_chunk66NWE54Ccjs.f.call(void 0, l.NET_SELL_POSITION),sellPositionRatio:_chunk66NWE54Ccjs.f.call(void 0, l.SELL_POSITION_RATIO),buyPosition:_chunk66NWE54Ccjs.f.call(void 0, l.BUY_POSITION),buyPositionChange:_chunk66NWE54Ccjs.f.call(void 0, l.BUY_POSITION_CHANGE),netBuyPosition:_chunk66NWE54Ccjs.f.call(void 0, l.NET_BUY_POSITION),buyPositionRatio:_chunk66NWE54Ccjs.f.call(void 0, l.BUY_POSITION_RATIO)}))}var Oo={gold:"EMI00069026",silver:"EMI00069027"};function tr(t){if(!t)return"";let e=String(t),n=e.match(/^(\d{4}-\d{2}-\d{2})/);return n?n[1]:e}async function nr(t){return D(t,{reportName:"RPT_FUTU_POSITIONCODE",columns:"TRADE_MARKET_CODE,TRADE_CODE,TRADE_TYPE",filter:'(IS_MAINCODE="1")',pageSize:500,fetchAllPages:!1},e=>({code:String(_nullishCoalesce(e.TRADE_CODE, () => (""))),name:String(_nullishCoalesce(e.TRADE_TYPE, () => (""))),marketCode:String(_nullishCoalesce(e.TRADE_MARKET_CODE, () => ("")))}))}async function rr(t,e,n={}){let{startDate:r="2020-10-28",pageSize:o=500}=n,i=e.toUpperCase();return D(t,{reportName:"RPT_FUTU_STOCKDATA",columns:"SECURITY_CODE,TRADE_DATE,ON_WARRANT_NUM,ADDCHANGE",filter:`(SECURITY_CODE="${i}")(TRADE_DATE>='${r}')`,pageSize:o,sortColumns:"TRADE_DATE",sortTypes:"-1"},a=>({code:String(_nullishCoalesce(a.SECURITY_CODE, () => (e))),date:tr(a.TRADE_DATE),inventory:_chunk66NWE54Ccjs.f.call(void 0, a.ON_WARRANT_NUM),change:_chunk66NWE54Ccjs.f.call(void 0, a.ADDCHANGE)}))}async function or(t,e,n={}){let r=Oo[e];if(!r)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid COMEX symbol: "${e}". Must be "gold" or "silver".`);let{pageSize:o=500}=n,i={gold:"\u9EC4\u91D1",silver:"\u767D\u94F6"};return D(t,{reportName:"RPT_FUTUOPT_GOLDSIL",sortColumns:"REPORT_DATE",sortTypes:"-1",pageSize:o,filter:`(INDICATOR_ID1="${r}")(@STORAGE_TON<>"NULL")`},a=>({date:tr(a.REPORT_DATE),name:_nullishCoalesce(i[e], () => (e)),storageTon:_chunk66NWE54Ccjs.f.call(void 0, a.STORAGE_TON),storageOunce:_chunk66NWE54Ccjs.f.call(void 0, a.STORAGE_OUNCE)}))}var ir={daily:"101",weekly:"102",monthly:"103"},ft="f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61,f62,f63,f64,f65";function sr(t){let e=t.split(",");return{date:_nullishCoalesce(e[0], () => ("")),mainNetInflow:_chunk66NWE54Ccjs.e.call(void 0, e[1]),smallNetInflow:_chunk66NWE54Ccjs.e.call(void 0, e[2]),mediumNetInflow:_chunk66NWE54Ccjs.e.call(void 0, e[3]),largeNetInflow:_chunk66NWE54Ccjs.e.call(void 0, e[4]),superLargeNetInflow:_chunk66NWE54Ccjs.e.call(void 0, e[5]),mainNetInflowPercent:_chunk66NWE54Ccjs.e.call(void 0, e[6]),smallNetInflowPercent:_chunk66NWE54Ccjs.e.call(void 0, e[7]),mediumNetInflowPercent:_chunk66NWE54Ccjs.e.call(void 0, e[8]),largeNetInflowPercent:_chunk66NWE54Ccjs.e.call(void 0, e[9]),superLargeNetInflowPercent:_chunk66NWE54Ccjs.e.call(void 0, e[10]),close:_chunk66NWE54Ccjs.e.call(void 0, e[11]),changePercent:_chunk66NWE54Ccjs.e.call(void 0, e[12])}}function _o(t){let e=t.split(",");return{date:_nullishCoalesce(e[0], () => ("")),mainNetInflow:_chunk66NWE54Ccjs.e.call(void 0, e[1]),smallNetInflow:_chunk66NWE54Ccjs.e.call(void 0, e[2]),mediumNetInflow:_chunk66NWE54Ccjs.e.call(void 0, e[3]),largeNetInflow:_chunk66NWE54Ccjs.e.call(void 0, e[4]),superLargeNetInflow:_chunk66NWE54Ccjs.e.call(void 0, e[5]),mainNetInflowPercent:_chunk66NWE54Ccjs.e.call(void 0, e[6]),smallNetInflowPercent:_chunk66NWE54Ccjs.e.call(void 0, e[7]),mediumNetInflowPercent:_chunk66NWE54Ccjs.e.call(void 0, e[8]),largeNetInflowPercent:_chunk66NWE54Ccjs.e.call(void 0, e[9]),superLargeNetInflowPercent:_chunk66NWE54Ccjs.e.call(void 0, e[10]),shClose:_chunk66NWE54Ccjs.e.call(void 0, e[11]),shChangePercent:_chunk66NWE54Ccjs.e.call(void 0, e[12]),szClose:_chunk66NWE54Ccjs.e.call(void 0, e[13]),szChangePercent:_chunk66NWE54Ccjs.e.call(void 0, e[14])}}var ar={today:{fid:"f62",fields:"f12,f14,f2,f3,f62,f184,f66,f69,f72,f75,f78,f81,f84,f87,f124",changePercentField:"f3",mainNet:"f62",mainPct:"f184",superLargeNet:"f66",superLargePct:"f69",largeNet:"f72",largePct:"f75",mediumNet:"f78",mediumPct:"f81",smallNet:"f84",smallPct:"f87"},"3day":{fid:"f267",fields:"f12,f14,f2,f127,f267,f268,f269,f270,f271,f272,f273,f274,f275,f276,f124",changePercentField:"f127",mainNet:"f267",mainPct:"f268",superLargeNet:"f269",superLargePct:"f270",largeNet:"f271",largePct:"f272",mediumNet:"f273",mediumPct:"f274",smallNet:"f275",smallPct:"f276"},"5day":{fid:"f164",fields:"f12,f14,f2,f109,f164,f165,f166,f167,f168,f169,f170,f171,f172,f173,f124",changePercentField:"f109",mainNet:"f164",mainPct:"f165",superLargeNet:"f166",superLargePct:"f167",largeNet:"f168",largePct:"f169",mediumNet:"f170",mediumPct:"f171",smallNet:"f172",smallPct:"f173"},"10day":{fid:"f174",fields:"f12,f14,f2,f160,f174,f175,f176,f177,f178,f179,f180,f181,f182,f183,f124",changePercentField:"f160",mainNet:"f174",mainPct:"f175",superLargeNet:"f176",superLargePct:"f177",largeNet:"f178",largePct:"f179",mediumNet:"f180",mediumPct:"f181",smallNet:"f182",smallPct:"f183"}},Po={industry:"m:90+t:2",concept:"m:90+t:3",region:"m:90+t:1"},Fo="m:0+t:6+f:!2,m:0+t:13+f:!2,m:0+t:80+f:!2,m:1+t:2+f:!2,m:1+t:23+f:!2,m:0+t:7+f:!2,m:1+t:3+f:!2";async function ur(t,e,n=100,r=1e3){let o=[],i=1,a=0;do{let u=new URLSearchParams({...e,pn:String(i),pz:String(n)}),l=`${_chunk66NWE54Ccjs.E}?${u.toString()}`,g=await _asyncOptionalChain([(await t.get(l,{responseType:"json"})), 'optionalAccess', async _43 => _43.data]);if(!g||!Array.isArray(g.diff)||(i===1&&(a=_nullishCoalesce(g.total, () => (0))),o.push(...g.diff),o.length>=a||g.diff.length<n))break;i++}while(o.length<a&&i<=r);return i>r&&o.length<a&&console.warn(`[stock-sdk] fetchClistAllPages truncated at maxPages=${r} (server reports total=${a}, fetched=${o.length}). Pass a larger \`maxPages\` to fetch the full dataset.`),o}async function lr(t,e,n={}){let{period:r="daily"}=n,o=ir[r];if(!o)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid period: ${r}. Must be daily/weekly/monthly.`);let i=_chunk6JEP4QK7cjs.f.call(void 0, _chunk6JEP4QK7cjs.d.call(void 0, e,{market:"CN"})),a=new URLSearchParams({lmt:"0",klt:o,secid:i,fields1:"f1,f2,f3,f7",fields2:ft,ut:_chunk66NWE54Ccjs.I}),u=`${_chunk66NWE54Ccjs.D}?${a.toString()}`,c=await _asyncOptionalChain([(await t.get(u,{responseType:"json"})), 'optionalAccess', async _44 => _44.data, 'optionalAccess', async _45 => _45.klines]);return!Array.isArray(c)||c.length===0?[]:c.map(sr)}async function cr(t){let e=new URLSearchParams({lmt:"0",klt:"101",secid:"1.000001",secid2:"0.399001",fields1:"f1,f2,f3,f7",fields2:ft,ut:_chunk66NWE54Ccjs.I}),n=`${_chunk66NWE54Ccjs.D}?${e.toString()}`,o=await _asyncOptionalChain([(await t.get(n,{responseType:"json"})), 'optionalAccess', async _46 => _46.data, 'optionalAccess', async _47 => _47.klines]);return!Array.isArray(o)||o.length===0?[]:o.map(_o)}async function dr(t,e={}){let{indicator:n="today"}=e,r=ar[n];if(!r)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid indicator: ${n}.`);let o={fid:r.fid,po:"1",np:"1",fltt:"2",invt:"2",ut:_chunk66NWE54Ccjs.I,fs:Fo,fields:r.fields};return(await ur(t,o,100)).map(a=>({code:String(_nullishCoalesce(a.f12, () => (""))),name:String(_nullishCoalesce(a.f14, () => (""))),price:_chunk66NWE54Ccjs.f.call(void 0, a.f2),changePercent:_chunk66NWE54Ccjs.f.call(void 0, a[r.changePercentField]),mainNetInflow:_chunk66NWE54Ccjs.f.call(void 0, a[r.mainNet]),mainNetInflowPercent:_chunk66NWE54Ccjs.f.call(void 0, a[r.mainPct]),superLargeNetInflow:_chunk66NWE54Ccjs.f.call(void 0, a[r.superLargeNet]),superLargeNetInflowPercent:_chunk66NWE54Ccjs.f.call(void 0, a[r.superLargePct]),largeNetInflow:_chunk66NWE54Ccjs.f.call(void 0, a[r.largeNet]),largeNetInflowPercent:_chunk66NWE54Ccjs.f.call(void 0, a[r.largePct]),mediumNetInflow:_chunk66NWE54Ccjs.f.call(void 0, a[r.mediumNet]),mediumNetInflowPercent:_chunk66NWE54Ccjs.f.call(void 0, a[r.mediumPct]),smallNetInflow:_chunk66NWE54Ccjs.f.call(void 0, a[r.smallNet]),smallNetInflowPercent:_chunk66NWE54Ccjs.f.call(void 0, a[r.smallPct])}))}async function pr(t,e={}){let{indicator:n="today",sectorType:r="industry"}=e,o=ar[n];if(!o)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid indicator: ${n}.`);let i=Po[r];if(!i)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid sectorType: ${r}.`);let a=`${o.fields},f204,f205`,u={fid:o.fid,po:"1",np:"1",fltt:"2",invt:"2",ut:_chunk66NWE54Ccjs.I,fs:i,fields:a};return(await ur(t,u,100)).map(c=>({code:String(_nullishCoalesce(c.f12, () => (""))),name:String(_nullishCoalesce(c.f14, () => (""))),changePercent:_chunk66NWE54Ccjs.f.call(void 0, c[o.changePercentField]),mainNetInflow:_chunk66NWE54Ccjs.f.call(void 0, c[o.mainNet]),mainNetInflowPercent:_chunk66NWE54Ccjs.f.call(void 0, c[o.mainPct]),superLargeNetInflow:_chunk66NWE54Ccjs.f.call(void 0, c[o.superLargeNet]),largeNetInflow:_chunk66NWE54Ccjs.f.call(void 0, c[o.largeNet]),mediumNetInflow:_chunk66NWE54Ccjs.f.call(void 0, c[o.mediumNet]),smallNetInflow:_chunk66NWE54Ccjs.f.call(void 0, c[o.smallNet]),topStockCode:c.f204?String(c.f204):void 0,topStockName:c.f205?String(c.f205):void 0}))}async function gr(t,e,n={}){let{period:r="daily"}=n,o=ir[r];if(!o)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid period: ${r}. Must be daily/weekly/monthly.`);let i=e.includes(".")?e:`90.${e}`,a=new URLSearchParams({lmt:"0",klt:o,secid:i,fields1:"f1,f2,f3,f7",fields2:ft,ut:_chunk66NWE54Ccjs.I}),u=`${_chunk66NWE54Ccjs.D}?${a.toString()}`,c=await _asyncOptionalChain([(await t.get(u,{responseType:"json"})), 'optionalAccess', async _48 => _48.data, 'optionalAccess', async _49 => _49.klines]);return!Array.isArray(c)||c.length===0?[]:c.map(sr)}var bo={today:"1","3day":"3","5day":"5","10day":"10",month:"M",quarter:"Q",year:"Y"},Mo={shanghai:"001",shenzhen:"003"};function mr(t,e){let n=t.split(",");return{date:e,time:_nullishCoalesce(n[0], () => ("")),shanghaiNetInflow:_chunk66NWE54Ccjs.e.call(void 0, n[1]),shenzhenNetInflow:_chunk66NWE54Ccjs.e.call(void 0, n[3]),totalNetInflow:_chunk66NWE54Ccjs.e.call(void 0, n[5])}}async function yr(t,e="north"){let n=new URLSearchParams({fields1:"f1,f2,f3,f4",fields2:"f51,f54,f52,f58,f53,f62,f56,f57,f60,f61",ut:_chunk66NWE54Ccjs.I}),r=`${_chunk66NWE54Ccjs.F}?${n.toString()}`,i=await _asyncOptionalChain([(await t.get(r,{responseType:"json"})), 'optionalAccess', async _50 => _50.data]);if(!i)return[];if(e==="south"){let l=_nullishCoalesce(i.n2s, () => ([])),c=_nullishCoalesce(i.n2sDate, () => (""));return l.map(g=>mr(g,fr(c)))}let a=_nullishCoalesce(i.s2n, () => ([])),u=_nullishCoalesce(i.s2nDate, () => (""));return a.map(l=>mr(l,fr(u)))}function fr(t){return t?/^\d{8}$/.test(t)?`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}`:t:""}async function Sr(t){return D(t,{reportName:"RPT_MUTUAL_QUOTA",columns:"TRADE_DATE,MUTUAL_TYPE,BOARD_TYPE,MUTUAL_TYPE_NAME,FUNDS_DIRECTION,INDEX_CODE,INDEX_NAME,BOARD_CODE",quoteColumns:"status~07~BOARD_CODE,dayNetAmtIn~07~BOARD_CODE,dayAmtRemain~07~BOARD_CODE,dayAmtThreshold~07~BOARD_CODE,f104~07~BOARD_CODE,f105~07~BOARD_CODE,f106~07~BOARD_CODE,f3~03~INDEX_CODE~INDEX_f3,netBuyAmt~07~BOARD_CODE",quoteType:"0",sortColumns:"MUTUAL_TYPE",sortTypes:"1",pageSize:2e3,fetchAllPages:!1},e=>({date:M(e.TRADE_DATE),type:String(_nullishCoalesce(e.MUTUAL_TYPE, () => (""))),boardName:String(_nullishCoalesce(e.MUTUAL_TYPE_NAME, () => (""))),direction:String(_nullishCoalesce(e.FUNDS_DIRECTION, () => (""))),status:String(_nullishCoalesce(e.status, () => (""))),netBuyAmount:_chunk66NWE54Ccjs.f.call(void 0, e.netBuyAmt),netInflow:_chunk66NWE54Ccjs.f.call(void 0, e.dayNetAmtIn),remainAmount:_chunk66NWE54Ccjs.f.call(void 0, e.dayAmtRemain),upCount:_chunk66NWE54Ccjs.f.call(void 0, e.f104),flatCount:_chunk66NWE54Ccjs.f.call(void 0, e.f106),downCount:_chunk66NWE54Ccjs.f.call(void 0, e.f105),indexCode:String(_nullishCoalesce(e.INDEX_CODE, () => (""))),indexName:String(_nullishCoalesce(e.INDEX_NAME, () => (""))),indexChangePercent:_chunk66NWE54Ccjs.f.call(void 0, e.INDEX_f3)}))}async function Tr(t,e={}){let{market:n="all",period:r="5day",date:o}=e,i=bo[r];if(!i)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid period: ${r}.`);let a=[`(INTERVAL_TYPE="${i}")`];return o&&a.push(`(TRADE_DATE='${o}')`),n!=="all"&&a.push(`(MUTUAL_TYPE="${Mo[n]}")`),D(t,{reportName:"RPT_MUTUAL_STOCK_NORTHSTA",columns:"ALL",sortColumns:"ADD_MARKET_CAP",sortTypes:"-1",pageSize:500,filter:a.join("")},u=>({date:M(u.TRADE_DATE),code:String(_nullishCoalesce(u.SECURITY_CODE, () => (""))),name:String(_nullishCoalesce(_nullishCoalesce(u.SECURITY_NAME, () => (u.SECURITY_NAME_ABBR)), () => (""))),close:_chunk66NWE54Ccjs.f.call(void 0, u.CLOSE_PRICE),changePercent:_chunk66NWE54Ccjs.f.call(void 0, u.CHANGE_RATE),holdShares:_chunk66NWE54Ccjs.f.call(void 0, u.HOLD_SHARES),holdMarketValue:_chunk66NWE54Ccjs.f.call(void 0, u.HOLD_MARKET_CAP),holdRatioFloat:_chunk66NWE54Ccjs.f.call(void 0, u.HOLD_RATIO),holdRatioTotal:_chunk66NWE54Ccjs.f.call(void 0, u.A_SHARES_RATIO),addShares:_chunk66NWE54Ccjs.f.call(void 0, u.ADD_SHARES),addMarketValue:_chunk66NWE54Ccjs.f.call(void 0, u.ADD_MARKET_CAP),addMarketValuePercent:_chunk66NWE54Ccjs.f.call(void 0, u.ADD_MARKET_CAP_PROPORTION),sector:String(_nullishCoalesce(u.BOARD_NAME, () => ("")))}))}async function hr(t,e="north",n={}){let{startDate:r,endDate:o}=n,i=[e==="north"?'(BOARD_TYPE="1")':'(BOARD_TYPE="0")'];return r&&i.push(`(TRADE_DATE>='${r}')`),o&&i.push(`(TRADE_DATE<='${o}')`),D(t,{reportName:"RPT_MUTUAL_DEAL_HISTORY",columns:"ALL",sortColumns:"TRADE_DATE",sortTypes:"-1",pageSize:500,filter:i.join("")},a=>({date:M(a.TRADE_DATE),netBuyAmount:_chunk66NWE54Ccjs.f.call(void 0, a.NET_DEAL_AMT),buyAmount:_chunk66NWE54Ccjs.f.call(void 0, a.BUY_AMT),sellAmount:_chunk66NWE54Ccjs.f.call(void 0, a.SELL_AMT),accNetBuyAmount:_chunk66NWE54Ccjs.f.call(void 0, a.ACCUM_DEAL_AMT),netInflow:_chunk66NWE54Ccjs.f.call(void 0, a.FUND_INFLOW),remainAmount:_chunk66NWE54Ccjs.f.call(void 0, a.QUOTA_BALANCE),topStockCode:a.LEAD_STOCKS_CODE?String(a.LEAD_STOCKS_CODE):null,topStockName:a.LEAD_STOCKS_NAME?String(a.LEAD_STOCKS_NAME):null,topStockChangePercent:_chunk66NWE54Ccjs.f.call(void 0, a.LS_CHANGE_RATE)}))}async function Cr(t,e,n={}){let r=e.replace(/^(sh|sz|bj)/i,""),{startDate:o,endDate:i}=n,a=[`(SECURITY_CODE="${r}")`];return o&&a.push(`(TRADE_DATE>='${o}')`),i&&a.push(`(TRADE_DATE<='${i}')`),D(t,{reportName:"RPT_MUTUAL_HOLDSTOCKNORTH_STA",columns:"ALL",sortColumns:"TRADE_DATE",sortTypes:"-1",pageSize:500,filter:a.join("")},u=>({date:M(u.TRADE_DATE),holdShares:_chunk66NWE54Ccjs.f.call(void 0, u.HOLD_SHARES),holdMarketValue:_chunk66NWE54Ccjs.f.call(void 0, u.HOLD_MARKET_CAP),holdRatioFloat:_chunk66NWE54Ccjs.f.call(void 0, u.HOLD_RATIO),holdRatioTotal:_chunk66NWE54Ccjs.f.call(void 0, u.A_SHARES_RATIO),close:_chunk66NWE54Ccjs.f.call(void 0, u.CLOSE_PRICE),changePercent:_chunk66NWE54Ccjs.f.call(void 0, u.CHANGE_RATE)}))}var No={zt:{path:"/getTopicZTPool",sort:"fbt:asc"},yesterday:{path:"/getYesterdayZTPool",sort:"zs:desc"},strong:{path:"/getTopicQSPool",sort:"zdp:desc"},sub_new:{path:"/getTopicCXPool",sort:"ods:asc"},broken:{path:"/getTopicZBPool",sort:"fbt:asc"},dt:{path:"/getTopicDTPool",sort:"fund:asc"}},ko={rocket_launch:"8201",quick_rebound:"8202",large_buy:"8193",limit_up_seal:"4",limit_down_open:"32",big_buy_order:"64",auction_up:"8207",high_open_5d:"8209",gap_up:"8211",high_60d:"8213",surge_60d:"8215",accelerate_down:"8204",high_dive:"8203",large_sell:"8194",limit_down_seal:"8",limit_up_open:"16",big_sell_order:"128",auction_down:"8208",low_open_5d:"8210",gap_down:"8212",low_60d:"8214",drop_60d:"8216"},vo={8201:"\u706B\u7BAD\u53D1\u5C04",8202:"\u5FEB\u901F\u53CD\u5F39",8193:"\u5927\u7B14\u4E70\u5165",4:"\u5C01\u6DA8\u505C\u677F",32:"\u6253\u5F00\u8DCC\u505C\u677F",64:"\u6709\u5927\u4E70\u76D8",8207:"\u7ADE\u4EF7\u4E0A\u6DA8",8209:"\u9AD8\u5F005\u65E5\u7EBF",8211:"\u5411\u4E0A\u7F3A\u53E3",8213:"60\u65E5\u65B0\u9AD8",8215:"60\u65E5\u5927\u5E45\u4E0A\u6DA8",8204:"\u52A0\u901F\u4E0B\u8DCC",8203:"\u9AD8\u53F0\u8DF3\u6C34",8194:"\u5927\u7B14\u5356\u51FA",8:"\u5C01\u8DCC\u505C\u677F",16:"\u6253\u5F00\u6DA8\u505C\u677F",128:"\u6709\u5927\u5356\u76D8",8208:"\u7ADE\u4EF7\u4E0B\u8DCC",8210:"\u4F4E\u5F005\u65E5\u7EBF",8212:"\u5411\u4E0B\u7F3A\u53E3",8214:"60\u65E5\u65B0\u4F4E",8216:"60\u65E5\u5927\u5E45\u4E0B\u8DCC"};function yt(t){if(t==null)return"";let e=String(t).padStart(6,"0");return`${e.slice(0,2)}:${e.slice(2,4)}:${e.slice(4,6)}`}function Lo(t){if(!t||typeof t!="object")return"";let e=t;return`${_nullishCoalesce(e.days, () => (""))}/${_nullishCoalesce(e.ct, () => (""))}`}function Ko(t){let e=_chunk66NWE54Ccjs.f.call(void 0, t.p),n=_chunk66NWE54Ccjs.f.call(void 0, t.tp);return{code:String(_nullishCoalesce(_nullishCoalesce(t.c, () => (t.m)), () => (""))),name:String(_nullishCoalesce(t.n, () => (""))),price:e!==null?e/1e3:null,changePercent:_chunk66NWE54Ccjs.f.call(void 0, t.zdp),limitPrice:n!==null?n/1e3:null,amount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(t.amount, () => (t.zb))),floatMarketValue:_chunk66NWE54Ccjs.f.call(void 0, t.ltsz),totalMarketValue:_chunk66NWE54Ccjs.f.call(void 0, t.tshare),turnoverRate:_chunk66NWE54Ccjs.f.call(void 0, t.hs),continuousBoardCount:_chunk66NWE54Ccjs.f.call(void 0, t.lbc),firstBoardTime:t.fbt!==void 0&&t.fbt!==null?yt(t.fbt):null,lastBoardTime:t.lbt!==void 0&&t.lbt!==null?yt(t.lbt):null,boardAmount:_chunk66NWE54Ccjs.f.call(void 0, t.fund),sealAmount:_chunk66NWE54Ccjs.f.call(void 0, t.fund),failedCount:_chunk66NWE54Ccjs.f.call(void 0, t.zbc),industry:String(_nullishCoalesce(t.hybk, () => (""))),ztStatistics:Lo(t.zttj),amplitude:_chunk66NWE54Ccjs.f.call(void 0, t.zf),speed:_chunk66NWE54Ccjs.f.call(void 0, t.zs)}}function wo(t){if(t)return/^\d{8}$/.test(t)?t:t.replace(/-/g,"")}function Bo(){let t=new Date(Date.now()+288e5),e=t.getUTCFullYear(),n=String(t.getUTCMonth()+1).padStart(2,"0"),r=String(t.getUTCDate()).padStart(2,"0");return`${e}${n}${r}`}async function Rr(t,e="zt",n){let r=No[e];if(!r)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid ZTPool type: ${e}.`);let o=_nullishCoalesce(wo(n), () => (Bo())),i=new URLSearchParams({ut:_chunk66NWE54Ccjs.H,dpt:"wz.ztzt",Pageindex:"0",pagesize:"10000",sort:r.sort,date:o}),a=`${_chunk66NWE54Ccjs.G}${r.path}?${i.toString()}`,l=await _asyncOptionalChain([(await t.get(a,{responseType:"json"})), 'optionalAccess', async _51 => _51.data, 'optionalAccess', async _52 => _52.pool]);return!Array.isArray(l)||l.length===0?[]:l.map(Ko)}async function Ar(t,e="large_buy"){let n=ko[e];if(!n)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid StockChangeType: ${e}.`);let r=new URLSearchParams({type:n,pageindex:"0",pagesize:"5000",ut:_chunk66NWE54Ccjs.H,dpt:"wzchanges"}),o=`${_chunk66NWE54Ccjs.G}/getAllStockChanges?${r.toString()}`,a=await _asyncOptionalChain([(await t.get(o,{responseType:"json"})), 'optionalAccess', async _53 => _53.data, 'optionalAccess', async _54 => _54.allstock]);return!Array.isArray(a)||a.length===0?[]:a.map(u=>{let l=String(_nullishCoalesce(u.t, () => (n)));return{time:yt(u.tm),code:String(_nullishCoalesce(u.c, () => (""))),name:String(_nullishCoalesce(u.n, () => (""))),changeType:e,changeTypeLabel:_nullishCoalesce(vo[l], () => ("")),info:String(_nullishCoalesce(u.i, () => ("")))}})}async function Er(t){let e=new URLSearchParams({ut:_chunk66NWE54Ccjs.H,dpt:"wzchanges",pageindex:"0",pagesize:"5000"}),n=`${_chunk66NWE54Ccjs.G}/getAllBKChanges?${e.toString()}`,o=await _asyncOptionalChain([(await t.get(n,{responseType:"json"})), 'optionalAccess', async _55 => _55.data, 'optionalAccess', async _56 => _56.allbk]);return!Array.isArray(o)||o.length===0?[]:o.map(i=>{let a=_nullishCoalesce(i.ms, () => ({})),u=a.m===0?"\u5927\u7B14\u4E70\u5165":a.m===1?"\u5927\u7B14\u5356\u51FA":"",l={},c=_nullishCoalesce(i.bkdf, () => (i.bkdfdis));if(c&&typeof c=="object")for(let[g,S]of Object.entries(c))l[g]=Number(S)||0;return{name:String(_nullishCoalesce(i.bkn, () => (""))),changePercent:_chunk66NWE54Ccjs.f.call(void 0, i.bkz),mainNetInflow:_chunk66NWE54Ccjs.f.call(void 0, i.bkj),totalChangeCount:_chunk66NWE54Ccjs.f.call(void 0, i.bkc),topStockCode:String(_nullishCoalesce(a.c, () => (""))),topStockName:String(_nullishCoalesce(a.n, () => (""))),topStockDirection:u,changeTypeDistribution:l}})}var Dr={"1month":"01","3month":"02","6month":"03","1year":"04"};function ae(t){return/^\d{8}$/.test(t)?`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}`:t}async function Ir(t,e){let n=ae(e.startDate),r=ae(e.endDate);return D(t,{reportName:"RPT_DAILYBILLBOARD_DETAILSNEW",columns:"SECURITY_CODE,SECUCODE,SECURITY_NAME_ABBR,TRADE_DATE,EXPLAIN,CLOSE_PRICE,CHANGE_RATE,BILLBOARD_NET_AMT,BILLBOARD_BUY_AMT,BILLBOARD_SELL_AMT,BILLBOARD_DEAL_AMT,ACCUM_AMOUNT,DEAL_NET_RATIO,DEAL_AMOUNT_RATIO,TURNOVERRATE,FREE_MARKET_CAP,EXPLANATION,D1_CLOSE_ADJCHRATE,D2_CLOSE_ADJCHRATE,D5_CLOSE_ADJCHRATE,D10_CLOSE_ADJCHRATE",sortColumns:"SECURITY_CODE,TRADE_DATE",sortTypes:"1,-1",pageSize:5e3,filter:`(TRADE_DATE<='${r}')(TRADE_DATE>='${n}')`},o=>({code:String(_nullishCoalesce(o.SECURITY_CODE, () => (""))),name:String(_nullishCoalesce(o.SECURITY_NAME_ABBR, () => (""))),date:M(o.TRADE_DATE),close:_chunk66NWE54Ccjs.f.call(void 0, o.CLOSE_PRICE),changePercent:_chunk66NWE54Ccjs.f.call(void 0, o.CHANGE_RATE),netBuyAmount:_chunk66NWE54Ccjs.f.call(void 0, o.BILLBOARD_NET_AMT),buyAmount:_chunk66NWE54Ccjs.f.call(void 0, o.BILLBOARD_BUY_AMT),sellAmount:_chunk66NWE54Ccjs.f.call(void 0, o.BILLBOARD_SELL_AMT),dealAmount:_chunk66NWE54Ccjs.f.call(void 0, o.BILLBOARD_DEAL_AMT),totalAmount:_chunk66NWE54Ccjs.f.call(void 0, o.ACCUM_AMOUNT),netBuyRatio:_chunk66NWE54Ccjs.f.call(void 0, o.DEAL_NET_RATIO),dealAmountRatio:_chunk66NWE54Ccjs.f.call(void 0, o.DEAL_AMOUNT_RATIO),turnoverRate:_chunk66NWE54Ccjs.f.call(void 0, o.TURNOVERRATE),floatMarketValue:_chunk66NWE54Ccjs.f.call(void 0, o.FREE_MARKET_CAP),reason:String(_nullishCoalesce(_nullishCoalesce(o.EXPLANATION, () => (o.EXPLAIN)), () => (""))),afterChange1d:_chunk66NWE54Ccjs.f.call(void 0, o.D1_CLOSE_ADJCHRATE),afterChange2d:_chunk66NWE54Ccjs.f.call(void 0, o.D2_CLOSE_ADJCHRATE),afterChange5d:_chunk66NWE54Ccjs.f.call(void 0, o.D5_CLOSE_ADJCHRATE),afterChange10d:_chunk66NWE54Ccjs.f.call(void 0, o.D10_CLOSE_ADJCHRATE)}))}async function Or(t,e="1month"){let n=Dr[e];if(!n)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid period: ${e}.`);return D(t,{reportName:"RPT_BILLBOARD_TRADEALL",columns:"ALL",sortColumns:"BILLBOARD_TIMES,LATEST_TDATE,SECURITY_CODE",sortTypes:"-1,-1,1",pageSize:5e3,filter:`(STATISTICS_CYCLE="${n}")`},r=>({code:String(_nullishCoalesce(r.SECURITY_CODE, () => (""))),name:String(_nullishCoalesce(r.SECURITY_NAME_ABBR, () => (""))),latestDate:M(r.LATEST_TDATE),close:_chunk66NWE54Ccjs.f.call(void 0, r.CLOSE_PRICE),changePercent:_chunk66NWE54Ccjs.f.call(void 0, r.CHANGE_RATE),count:_chunk66NWE54Ccjs.f.call(void 0, r.BILLBOARD_TIMES),totalBuyAmount:_chunk66NWE54Ccjs.f.call(void 0, r.BILLBOARD_BUY_AMT),totalSellAmount:_chunk66NWE54Ccjs.f.call(void 0, r.BILLBOARD_SELL_AMT),totalNetAmount:_chunk66NWE54Ccjs.f.call(void 0, r.BILLBOARD_NET_AMT),totalDealAmount:_chunk66NWE54Ccjs.f.call(void 0, r.BILLBOARD_DEAL_AMT),buyOrgCount:_chunk66NWE54Ccjs.f.call(void 0, r.ORG_BUY_TIMES),sellOrgCount:_chunk66NWE54Ccjs.f.call(void 0, r.ORG_SELL_TIMES)}))}async function _r(t,e){let n=ae(e.startDate),r=ae(e.endDate);return D(t,{reportName:"RPT_ORGANIZATION_TRADE_DETAILS",columns:"ALL",sortColumns:"TRADE_DATE,SECURITY_CODE",sortTypes:"-1,1",pageSize:5e3,filter:`(TRADE_DATE<='${r}')(TRADE_DATE>='${n}')`},o=>({code:String(_nullishCoalesce(o.SECURITY_CODE, () => (""))),name:String(_nullishCoalesce(o.SECURITY_NAME_ABBR, () => (""))),date:M(o.TRADE_DATE),close:_chunk66NWE54Ccjs.f.call(void 0, o.CLOSE_PRICE),changePercent:_chunk66NWE54Ccjs.f.call(void 0, o.CHANGE_RATE),buyOrgCount:_chunk66NWE54Ccjs.f.call(void 0, o.BUY_TIMES),sellOrgCount:_chunk66NWE54Ccjs.f.call(void 0, o.SELL_TIMES),orgBuyAmount:_chunk66NWE54Ccjs.f.call(void 0, o.BUY_AMT),orgSellAmount:_chunk66NWE54Ccjs.f.call(void 0, o.SELL_AMT),orgNetAmount:_chunk66NWE54Ccjs.f.call(void 0, o.NET_AMT)}))}async function Pr(t,e="1month"){let n=Dr[e];if(!n)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Invalid period: ${e}.`);return D(t,{reportName:"RPT_BILLBOARD_TRADEDETAILS",columns:"ALL",sortColumns:"TOTAL_BUYER_SALESTIMES",sortTypes:"-1",pageSize:5e3,filter:`(STATISTICS_CYCLE="${n}")`},r=>({code:String(_nullishCoalesce(r.OPERATEDEPT_CODE, () => (""))),name:String(_nullishCoalesce(r.OPERATEDEPT_NAME, () => (""))),totalBuyAmount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(r.TOTAL_BUYAMT, () => (r.BUY_AMT))),totalSellAmount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(r.TOTAL_SELLAMT, () => (r.SELL_AMT))),buyCount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(r.TOTAL_BUYER_SALESTIMES, () => (r.BUY_TIMES))),sellCount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(r.TOTAL_SELLER_SALESTIMES, () => (r.SELL_TIMES))),totalCount:_chunk66NWE54Ccjs.f.call(void 0, r.TOTAL_TIMES)}))}async function Fr(t,e,n){let r=e.replace(/^(sh|sz|bj)/i,""),o=ae(n),i=`(SECURITY_CODE="${r}")(TRADE_DATE='${o}')`,[a,u]=await Promise.all([D(t,{reportName:"RPT_BILLBOARD_DAILYDETAILSBUY",columns:"ALL",sortColumns:"BUY_AMT_REAL",sortTypes:"-1",pageSize:100,filter:i},(l,c)=>({rank:_nullishCoalesce(_chunk66NWE54Ccjs.f.call(void 0, l.RANK), () => (c+1)),branchName:String(_nullishCoalesce(l.OPERATEDEPT_NAME, () => (""))),buyAmount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(l.BUY_AMT_REAL, () => (l.BUY_AMT))),buyAmountRatio:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(l.BUY_RATIO_TOTAL, () => (l.BUY_AMT_RATIO))),sellAmount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(l.SELL_AMT_REAL, () => (l.SELL_AMT))),sellAmountRatio:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(l.SELL_RATIO_TOTAL, () => (l.SELL_AMT_RATIO))),netAmount:_chunk66NWE54Ccjs.f.call(void 0, l.NET_AMT),side:"buy"})),D(t,{reportName:"RPT_BILLBOARD_DAILYDETAILSSELL",columns:"ALL",sortColumns:"SELL_AMT_REAL",sortTypes:"-1",pageSize:100,filter:i},(l,c)=>({rank:_nullishCoalesce(_chunk66NWE54Ccjs.f.call(void 0, l.RANK), () => (c+1)),branchName:String(_nullishCoalesce(l.OPERATEDEPT_NAME, () => (""))),buyAmount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(l.BUY_AMT_REAL, () => (l.BUY_AMT))),buyAmountRatio:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(l.BUY_RATIO_TOTAL, () => (l.BUY_AMT_RATIO))),sellAmount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(l.SELL_AMT_REAL, () => (l.SELL_AMT))),sellAmountRatio:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(l.SELL_RATIO_TOTAL, () => (l.SELL_AMT_RATIO))),netAmount:_chunk66NWE54Ccjs.f.call(void 0, l.NET_AMT),side:"sell"}))]);return[...a,...u]}function br(t){if(t)return/^\d{8}$/.test(t)?`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}`:t}function Mr(t){if(!t)return"";let e=br(t.startDate),n=br(t.endDate),r=[];return e&&r.push(`(TRADE_DATE>='${e}')`),n&&r.push(`(TRADE_DATE<='${n}')`),r.join("")}async function Nr(t){return D(t,{reportName:"PRT_BLOCKTRADE_MARKET_STA",columns:"ALL",sortColumns:"TRADE_DATE",sortTypes:"-1",pageSize:500},e=>({date:M(e.TRADE_DATE),shClose:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(e.CLOSE_PRICE, () => (e.SH_CLOSE_PRICE))),shChangePercent:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(e.CHANGE_RATE, () => (e.SH_CHANGE_RATE))),totalAmount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(e.TURNOVER, () => (e.TOTAL_AMOUNT))),premiumAmount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(e.PREMIUM_TURNOVER, () => (e.PREMIUM_AMOUNT))),premiumRatio:_chunk66NWE54Ccjs.f.call(void 0, e.PREMIUM_RATIO),discountAmount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(e.DISCOUNT_TURNOVER, () => (e.DISCOUNT_AMOUNT))),discountRatio:_chunk66NWE54Ccjs.f.call(void 0, e.DISCOUNT_RATIO)}))}async function kr(t,e={}){let n=Mr(e);return D(t,{reportName:"RPT_BLOCK_TRADE_DETAIL",columns:"ALL",sortColumns:"TRADE_DATE,SECURITY_CODE",sortTypes:"-1,1",pageSize:5e3,filter:n||void 0},r=>({code:String(_nullishCoalesce(r.SECURITY_CODE, () => (""))),name:String(_nullishCoalesce(r.SECURITY_NAME_ABBR, () => (""))),date:M(r.TRADE_DATE),close:_chunk66NWE54Ccjs.f.call(void 0, r.CLOSE_PRICE),changePercent:_chunk66NWE54Ccjs.f.call(void 0, r.CHANGE_RATE),dealPrice:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(r.DEAL_PRICE, () => (r.PRICE))),dealVolume:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(r.DEAL_VOLUME, () => (r.VOLUME))),dealAmount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(r.DEAL_AMT, () => (r.TURNOVER))),premiumRate:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(r.PREMIUM_RATIO, () => (r.PREMIUM_RATE))),buyBranch:String(_nullishCoalesce(_nullishCoalesce(r.BUYER_DEPT, () => (r.BUYER_OPERATEDEPT_NAME)), () => (""))),sellBranch:String(_nullishCoalesce(_nullishCoalesce(r.SELLER_DEPT, () => (r.SELLER_OPERATEDEPT_NAME)), () => ("")))}))}async function vr(t,e={}){let n=Mr(e);return D(t,{reportName:"RPT_BLOCK_TRADE_STA",columns:"ALL",sortColumns:"TRADE_DATE,DEAL_AMT",sortTypes:"-1,-1",pageSize:5e3,filter:n||void 0},r=>({code:String(_nullishCoalesce(r.SECURITY_CODE, () => (""))),name:String(_nullishCoalesce(r.SECURITY_NAME_ABBR, () => (""))),date:M(r.TRADE_DATE),changePercent:_chunk66NWE54Ccjs.f.call(void 0, r.CHANGE_RATE),close:_chunk66NWE54Ccjs.f.call(void 0, r.CLOSE_PRICE),dealCount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(r.DEAL_NUM, () => (r.DEAL_COUNT))),dealTotalAmount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(r.DEAL_AMT, () => (r.TOTAL_AMOUNT))),dealTotalVolume:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(r.DEAL_VOLUME, () => (r.TOTAL_VOLUME))),premiumAmount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(r.PREMIUM_AMT, () => (r.PREMIUM_AMOUNT))),discountAmount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(r.DISCOUNT_AMT, () => (r.DISCOUNT_AMOUNT)))}))}async function Lr(t){return D(t,{reportName:"RPTA_WEB_MARGIN_DAILYTRADE",columns:"ALL",sortColumns:"STATISTICS_DATE",sortTypes:"-1",pageSize:500},e=>({date:M(_nullishCoalesce(e.STATISTICS_DATE, () => (e.TRADE_DATE))),finBalance:_chunk66NWE54Ccjs.f.call(void 0, e.FIN_BALANCE),loanBalance:_chunk66NWE54Ccjs.f.call(void 0, e.LOAN_BALANCE),finBuyAmount:_chunk66NWE54Ccjs.f.call(void 0, e.FIN_BUY_AMT),loanSellAmount:_chunk66NWE54Ccjs.f.call(void 0, e.LOAN_SELL_AMT),investorCount:_chunk66NWE54Ccjs.f.call(void 0, _nullishCoalesce(e.OPERATE_INVESTOR_NUM, () => (e.INVESTOR_NUM))),liabilityInvestorCount:_chunk66NWE54Ccjs.f.call(void 0, e.MARGIN_INVESTOR_NUM),totalGuarantee:_chunk66NWE54Ccjs.f.call(void 0, e.TOTAL_GUARANTEE),avgGuaranteeRatio:_chunk66NWE54Ccjs.f.call(void 0, e.AVG_GUARANTEE_RATIO)}))}async function Kr(t,e){let n=e?`(TRADE_DATE='${e}')`:void 0;return D(t,{reportName:"RPT_MARGIN_TRADE_DETAIL",columns:"ALL",sortColumns:"FIN_BALANCE",sortTypes:"-1",pageSize:5e3,filter:n},r=>({code:String(_nullishCoalesce(r.SECURITY_CODE, () => (""))),name:String(_nullishCoalesce(r.SECURITY_NAME_ABBR, () => (""))),date:M(r.TRADE_DATE),finBalance:_chunk66NWE54Ccjs.f.call(void 0, r.FIN_BALANCE),finBuyAmount:_chunk66NWE54Ccjs.f.call(void 0, r.FIN_BUY_AMT),finRepayAmount:_chunk66NWE54Ccjs.f.call(void 0, r.FIN_REPAY_AMT),loanBalance:_chunk66NWE54Ccjs.f.call(void 0, r.LOAN_BALANCE),loanSellVolume:_chunk66NWE54Ccjs.f.call(void 0, r.LOAN_SELL_VOLUME),loanRepayVolume:_chunk66NWE54Ccjs.f.call(void 0, r.LOAN_REPAY_VOLUME)}))}var x={};_chunk4VDLQK6Fcjs.a.call(void 0, x,{getCommodityOptionKline:()=>jr,getCommodityOptionSpot:()=>$r,getETFOption5DayMinute:()=>zr,getETFOptionDailyKline:()=>Qr,getETFOptionExpireDay:()=>xr,getETFOptionMinute:()=>qr,getETFOptionMonths:()=>Ur,getIndexOptionKline:()=>Br,getIndexOptionSpot:()=>wr});function Uo(t){return{buyVolume:_chunk66NWE54Ccjs.f.call(void 0, t[0]),buyPrice:_chunk66NWE54Ccjs.f.call(void 0, t[1]),price:_chunk66NWE54Ccjs.f.call(void 0, t[2]),askPrice:_chunk66NWE54Ccjs.f.call(void 0, t[3]),askVolume:_chunk66NWE54Ccjs.f.call(void 0, t[4]),openInterest:_chunk66NWE54Ccjs.f.call(void 0, t[5]),change:_chunk66NWE54Ccjs.f.call(void 0, t[6]),strikePrice:_chunk66NWE54Ccjs.f.call(void 0, t[7]),symbol:_nullishCoalesce(t[8], () => (""))}}function xo(t){return{buyVolume:_chunk66NWE54Ccjs.f.call(void 0, t[0]),buyPrice:_chunk66NWE54Ccjs.f.call(void 0, t[1]),price:_chunk66NWE54Ccjs.f.call(void 0, t[2]),askPrice:_chunk66NWE54Ccjs.f.call(void 0, t[3]),askVolume:_chunk66NWE54Ccjs.f.call(void 0, t[4]),openInterest:_chunk66NWE54Ccjs.f.call(void 0, t[5]),change:_chunk66NWE54Ccjs.f.call(void 0, t[6]),strikePrice:null,symbol:_nullishCoalesce(t[7], () => (""))}}async function wr(t,e){let n=`${_chunk66NWE54Ccjs.P}?type=futures&product=${t}&exchange=cffex&pinzhong=${e}`,r=await _chunk66NWE54Ccjs.ka.call(void 0, n),o=_nullishCoalesce(_optionalChain([r, 'optionalAccess', _57 => _57.result, 'optionalAccess', _58 => _58.data, 'optionalAccess', _59 => _59.up]), () => ([])),i=_nullishCoalesce(_optionalChain([r, 'optionalAccess', _60 => _60.result, 'optionalAccess', _61 => _61.data, 'optionalAccess', _62 => _62.down]), () => ([]));return{calls:o.map(Uo),puts:i.map(xo)}}async function Br(t){let e=`${_chunk66NWE54Ccjs.Q}?symbol=${t}`,n=await _chunk66NWE54Ccjs.ka.call(void 0, e,{callbackMode:"path"});return Array.isArray(n)?n.map(r=>({date:r.d,open:_chunk66NWE54Ccjs.f.call(void 0, r.o),high:_chunk66NWE54Ccjs.f.call(void 0, r.h),low:_chunk66NWE54Ccjs.f.call(void 0, r.l),close:_chunk66NWE54Ccjs.f.call(void 0, r.c),volume:_chunk66NWE54Ccjs.f.call(void 0, r.v)})):[]}async function Ur(t){let e=`${_chunk66NWE54Ccjs.R}?exchange=null&cate=${encodeURIComponent(t)}`,r=await _asyncOptionalChain([(await _chunk66NWE54Ccjs.ka.call(void 0, e)), 'optionalAccess', async _63 => _63.result, 'optionalAccess', async _64 => _64.data]),o=_nullishCoalesce(_optionalChain([r, 'optionalAccess', _65 => _65.contractMonth]), () => ([]));return{months:o.length>1?o.slice(1):o,stockId:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _66 => _66.stockId]), () => ("")),cateId:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _67 => _67.cateId]), () => ("")),cateList:_nullishCoalesce(_optionalChain([r, 'optionalAccess', _68 => _68.cateList]), () => ([]))}}async function xr(t,e){let n=`${_chunk66NWE54Ccjs.S}?exchange=null&cate=${encodeURIComponent(t)}&date=${e}`,r=await _chunk66NWE54Ccjs.ka.call(void 0, n),o=_optionalChain([r, 'optionalAccess', _69 => _69.result, 'optionalAccess', _70 => _70.data, 'optionalAccess', _71 => _71.remainderDays]);if(typeof o=="number"&&o<0){let a=`${_chunk66NWE54Ccjs.S}?exchange=null&cate=${encodeURIComponent("XD"+t)}&date=${e}`;r=await _chunk66NWE54Ccjs.ka.call(void 0, a)}let i=_optionalChain([r, 'optionalAccess', _72 => _72.result, 'optionalAccess', _73 => _73.data]);return{expireDay:_nullishCoalesce(_optionalChain([i, 'optionalAccess', _74 => _74.expireDay]), () => ("")),remainderDays:_nullishCoalesce(_optionalChain([i, 'optionalAccess', _75 => _75.remainderDays]), () => (0)),stockId:_nullishCoalesce(_optionalChain([i, 'optionalAccess', _76 => _76.stockId]), () => ("")),name:_nullishCoalesce(_optionalChain([i, 'optionalAccess', _77 => _77.other, 'optionalAccess', _78 => _78.name]), () => (""))}}function Hr(t){let e="";return t.map(n=>(n.d&&(e=n.d),{time:n.i,date:e,price:_chunk66NWE54Ccjs.f.call(void 0, n.p),volume:_chunk66NWE54Ccjs.f.call(void 0, n.v),openInterest:_chunk66NWE54Ccjs.f.call(void 0, n.t),avgPrice:_chunk66NWE54Ccjs.f.call(void 0, n.a)}))}async function qr(t){let e=`CON_OP_${t}`,n=`${_chunk66NWE54Ccjs.T}?symbol=${e}`,o=await _asyncOptionalChain([(await _chunk66NWE54Ccjs.ka.call(void 0, n)), 'optionalAccess', async _79 => _79.result, 'optionalAccess', async _80 => _80.data]);return Array.isArray(o)?Hr(o):[]}async function Qr(t){let e=`CON_OP_${t}`,n=`${_chunk66NWE54Ccjs.U}?symbol=${e}`,r=await _chunk66NWE54Ccjs.ka.call(void 0, n,{callbackMode:"path"});return Array.isArray(r)?r.map(o=>({date:o.d,open:_chunk66NWE54Ccjs.f.call(void 0, o.o),high:_chunk66NWE54Ccjs.f.call(void 0, o.h),low:_chunk66NWE54Ccjs.f.call(void 0, o.l),close:_chunk66NWE54Ccjs.f.call(void 0, o.c),volume:_chunk66NWE54Ccjs.f.call(void 0, o.v)})):[]}async function zr(t){let e=`CON_OP_${t}`,n=`${_chunk66NWE54Ccjs.V}?symbol=${e}`,o=await _asyncOptionalChain([(await _chunk66NWE54Ccjs.ka.call(void 0, n)), 'optionalAccess', async _81 => _81.result, 'optionalAccess', async _82 => _82.data]);if(!Array.isArray(o))return[];let i=[];for(let a of o)Array.isArray(a)&&i.push(...Hr(a));return i}function Ho(t){return{buyVolume:_chunk66NWE54Ccjs.f.call(void 0, t[0]),buyPrice:_chunk66NWE54Ccjs.f.call(void 0, t[1]),price:_chunk66NWE54Ccjs.f.call(void 0, t[2]),askPrice:_chunk66NWE54Ccjs.f.call(void 0, t[3]),askVolume:_chunk66NWE54Ccjs.f.call(void 0, t[4]),openInterest:_chunk66NWE54Ccjs.f.call(void 0, t[5]),change:_chunk66NWE54Ccjs.f.call(void 0, t[6]),strikePrice:_chunk66NWE54Ccjs.f.call(void 0, t[7]),symbol:_nullishCoalesce(t[8], () => (""))}}function qo(t){return{buyVolume:_chunk66NWE54Ccjs.f.call(void 0, t[0]),buyPrice:_chunk66NWE54Ccjs.f.call(void 0, t[1]),price:_chunk66NWE54Ccjs.f.call(void 0, t[2]),askPrice:_chunk66NWE54Ccjs.f.call(void 0, t[3]),askVolume:_chunk66NWE54Ccjs.f.call(void 0, t[4]),openInterest:_chunk66NWE54Ccjs.f.call(void 0, t[5]),change:_chunk66NWE54Ccjs.f.call(void 0, t[6]),strikePrice:null,symbol:_nullishCoalesce(t[7], () => (""))}}async function $r(t,e){let n=_chunk66NWE54Ccjs.Y[t];if(!n)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`Unknown commodity option variety: "${t}". Available: ${Object.keys(_chunk66NWE54Ccjs.Y).join(", ")}`);let r=`${_chunk66NWE54Ccjs.P}?type=futures&product=${n.product}&exchange=${n.exchange}&pinzhong=${e}`,o=await _chunk66NWE54Ccjs.ka.call(void 0, r),i=_nullishCoalesce(_optionalChain([o, 'optionalAccess', _83 => _83.result, 'optionalAccess', _84 => _84.data, 'optionalAccess', _85 => _85.up]), () => ([])),a=_nullishCoalesce(_optionalChain([o, 'optionalAccess', _86 => _86.result, 'optionalAccess', _87 => _87.data, 'optionalAccess', _88 => _88.down]), () => ([]));return{calls:i.map(Ho),puts:a.map(qo)}}async function jr(t){let e=`${_chunk66NWE54Ccjs.Q}?symbol=${t}`,n=await _chunk66NWE54Ccjs.ka.call(void 0, e,{callbackMode:"path"});return Array.isArray(n)?n.map(r=>({date:r.d,open:_chunk66NWE54Ccjs.f.call(void 0, r.o),high:_chunk66NWE54Ccjs.f.call(void 0, r.h),low:_chunk66NWE54Ccjs.f.call(void 0, r.l),close:_chunk66NWE54Ccjs.f.call(void 0, r.c),volume:_chunk66NWE54Ccjs.f.call(void 0, r.v)})):[]}var _=class{constructor(e){this.client=e}};var ue=class extends _{constructor(e){super(e)}getFundDividendList(e){return p.getFundDividendList(this.client,e)}getFundNavHistory(e){return p.getFundNavHistory(this.client,e)}getFundEstimate(e){return p.getFundEstimate(this.client,e)}getFundRankHistory(e){return p.getFundRankHistory(this.client,e)}};var le=class extends _{constructor(e){super(e)}getFullQuotes(e){return F.getFullQuotes(this.client,e)}getSimpleQuotes(e){return F.getSimpleQuotes(this.client,e)}getHKQuotes(e){return F.getHKQuotes(this.client,e)}getUSQuotes(e){return F.getUSQuotes(this.client,e)}getFundQuotes(e){return F.getFundQuotes(this.client,e)}getFundFlow(e){return F.getFundFlow(this.client,e)}getPanelLargeOrder(e){return F.getPanelLargeOrder(this.client,e)}getTodayTimeline(e){return F.getTodayTimeline(this.client,e)}search(e){return F.search(this.client,e)}getAShareCodeList(e){return F.getAShareCodeList(this.client,e)}getUSCodeList(e){return F.getUSCodeList(this.client,e)}getHKCodeList(){return F.getHKCodeList(this.client)}getFundCodeList(){return F.getFundCodeList(this.client)}async getAllAShareQuotes(e={}){let{market:n,...r}=e,o=await this.getAShareCodeList({market:n});return F.getAllQuotesByCodes(this.client,o,r)}async getAllHKShareQuotes(e={}){let n=await this.getHKCodeList();return F.getAllHKQuotesByCodes(this.client,n,e)}async getAllUSShareQuotes(e={}){let{market:n,...r}=e,o=await this.getUSCodeList({simple:!0,market:n});return F.getAllUSQuotesByCodes(this.client,o,r)}getAllQuotesByCodes(e,n={}){return F.getAllQuotesByCodes(this.client,e,n)}batchRaw(e){return this.client.getTencentQuote(e)}getTradingCalendar(){return F.getTradingCalendar(this.client)}getDividendDetail(e){return p.getDividendDetail(this.client,e)}};var ce=class extends _{constructor(e){super(e)}getIndustryList(){return p.getIndustryList(this.client)}getIndustrySpot(e){return p.getIndustrySpot(this.client,e)}getIndustryConstituents(e){return p.getIndustryConstituents(this.client,e)}getIndustryKline(e,n){return p.getIndustryKline(this.client,e,n)}getIndustryMinuteKline(e,n){return p.getIndustryMinuteKline(this.client,e,n)}getConceptList(){return p.getConceptList(this.client)}getConceptSpot(e){return p.getConceptSpot(this.client,e)}getConceptConstituents(e){return p.getConceptConstituents(this.client,e)}getConceptKline(e,n){return p.getConceptKline(this.client,e,n)}getConceptMinuteKline(e,n){return p.getConceptMinuteKline(this.client,e,n)}};var de=class extends _{constructor(e){super(e)}getHistoryKline(e,n){return p.getHistoryKline(this.client,e,n)}getMinuteKline(e,n){return p.getMinuteKline(this.client,e,n)}getHKHistoryKline(e,n){return p.getHKHistoryKline(this.client,e,n)}getHKMinuteKline(e,n){return p.getHKMinuteKline(this.client,e,n)}getUSHistoryKline(e,n){return p.getUSHistoryKline(this.client,e,n)}getUSMinuteKline(e,n){return p.getUSMinuteKline(this.client,e,n)}};var pe=class extends _{constructor(e){super(e)}getFuturesKline(e,n){return p.getFuturesHistoryKline(this.client,e,n)}getGlobalFuturesSpot(e){return p.getGlobalFuturesSpot(this.client,e)}getGlobalFuturesKline(e,n){return p.getGlobalFuturesKline(this.client,e,n)}getFuturesInventorySymbols(){return p.getFuturesInventorySymbols(this.client)}getFuturesInventory(e,n){return p.getFuturesInventory(this.client,e,n)}getComexInventory(e,n){return p.getComexInventory(this.client,e,n)}};var ge=class extends _{constructor(e){super(e)}getIndexOptionSpot(e,n){return x.getIndexOptionSpot(e,n)}getIndexOptionKline(e){return x.getIndexOptionKline(e)}getCFFEXOptionQuotes(e){return p.getCFFEXOptionQuotes(this.client,e)}getETFOptionMonths(e){return x.getETFOptionMonths(e)}getETFOptionExpireDay(e,n){return x.getETFOptionExpireDay(e,n)}getETFOptionMinute(e){return x.getETFOptionMinute(e)}getETFOptionDailyKline(e){return x.getETFOptionDailyKline(e)}getETFOption5DayMinute(e){return x.getETFOption5DayMinute(e)}getCommodityOptionSpot(e,n){return x.getCommodityOptionSpot(e,n)}getCommodityOptionKline(e){return x.getCommodityOptionKline(e)}getOptionLHB(e,n){return p.getOptionLHB(this.client,e,n)}};var me=class{constructor(e,n){this.klineService=e;this.quoteService=n}detectMarket(e){try{let n=_chunk6JEP4QK7cjs.d.call(void 0, e);return n.market==="HK"?"HK":n.market==="US"?"US":"A"}catch (e4){return"A"}}calcActualStartDate(e,n,r=1.5){let o=this.toCompactDate(e),i=Math.ceil(n*r),a=new Date(parseInt(o.slice(0,4)),parseInt(o.slice(4,6))-1,parseInt(o.slice(6,8)));a.setDate(a.getDate()-i);let u=a.getFullYear(),l=String(a.getMonth()+1).padStart(2,"0"),c=String(a.getDate()).padStart(2,"0");return`${u}${l}${c}`}calcActualStartDateByCalendar(e,n,r){if(!r||r.length===0)return;let o=this.normalizeDate(e),i=r.findIndex(u=>u>=o);i===-1&&(i=r.length-1);let a=Math.max(0,i-n);return this.toCompactDate(r[a])}normalizeDate(e){return e.includes("-")?e:e.length===8?`${e.slice(0,4)}-${e.slice(4,6)}-${e.slice(6,8)}`:e}toCompactDate(e){return e.replace(/-/g,"")}dateToTimestamp(e){let n=e.includes("-")?e:`${e.slice(0,4)}-${e.slice(4,6)}-${e.slice(6,8)}`;return new Date(n).getTime()}async getKlineWithIndicators(e,n={}){let{startDate:r,endDate:o,indicators:i={}}=n,a=_nullishCoalesce(n.market, () => (this.detectMarket(e))),{requiredBars:u}=_chunkNMRUSAWScjs.u.call(void 0, i),l={A:1.5,HK:1.46,US:1.45},c;if(r)if(a==="A")try{let T=await this.quoteService.getTradingCalendar();c=_nullishCoalesce(this.calcActualStartDateByCalendar(r,u,T), () => (this.calcActualStartDate(r,u,l[a])))}catch (e5){c=this.calcActualStartDate(r,u,l[a])}else c=this.calcActualStartDate(r,u,l[a]);let g={period:n.period,adjust:n.adjust,startDate:c,endDate:n.endDate?this.toCompactDate(n.endDate):void 0},S;switch(a){case"HK":S=await this.klineService.getHKHistoryKline(e,g);break;case"US":S=await this.klineService.getUSHistoryKline(e,g);break;default:S=await this.klineService.getHistoryKline(e,g)}if(r&&S.length<u)switch(a){case"HK":S=await this.klineService.getHKHistoryKline(e,{...g,startDate:void 0});break;case"US":S=await this.klineService.getUSHistoryKline(e,{...g,startDate:void 0});break;default:S=await this.klineService.getHistoryKline(e,{...g,startDate:void 0})}let y=_chunkNMRUSAWScjs.v.call(void 0, S,i);if(r){let T=this.dateToTimestamp(r),C=o?this.dateToTimestamp(o):1/0;return y.filter(h=>{let m=this.dateToTimestamp(h.date);return m>=T&&m<=C})}return y}};var fe=class extends _{constructor(e){super(e)}getIndividualFundFlow(e,n){return p.getIndividualFundFlow(this.client,e,n)}getMarketFundFlow(){return p.getMarketFundFlow(this.client)}getFundFlowRank(e){return p.getFundFlowRank(this.client,e)}getSectorFundFlowRank(e){return p.getSectorFundFlowRank(this.client,e)}getSectorFundFlowHistory(e,n){return p.getSectorFundFlowHistory(this.client,e,n)}};var ye=class extends _{constructor(e){super(e)}getNorthboundMinute(e){return p.getNorthboundMinute(this.client,e)}getNorthboundFlowSummary(){return p.getNorthboundFlowSummary(this.client)}getNorthboundHoldingRank(e){return p.getNorthboundHoldingRank(this.client,e)}getNorthboundHistory(e,n){return p.getNorthboundHistory(this.client,e,n)}getNorthboundIndividual(e,n){return p.getNorthboundIndividual(this.client,e,n)}};var Se=class extends _{constructor(e){super(e)}getZTPool(e,n){return p.getZTPool(this.client,e,n)}getStockChanges(e){return p.getStockChanges(this.client,e)}getBoardChanges(){return p.getBoardChanges(this.client)}};var Te=class extends _{constructor(e){super(e)}getDragonTigerDetail(e){return p.getDragonTigerDetail(this.client,e)}getDragonTigerStockStats(e){return p.getDragonTigerStockStats(this.client,e)}getDragonTigerInstitution(e){return p.getDragonTigerInstitution(this.client,e)}getDragonTigerBranchRank(e){return p.getDragonTigerBranchRank(this.client,e)}getDragonTigerStockSeatDetail(e,n){return p.getDragonTigerStockSeatDetail(this.client,e,n)}};var he=class extends _{constructor(e){super(e)}getBlockTradeMarketStat(){return p.getBlockTradeMarketStat(this.client)}getBlockTradeDetail(e){return p.getBlockTradeDetail(this.client,e)}getBlockTradeDailyStat(e){return p.getBlockTradeDailyStat(this.client,e)}getMarginAccountInfo(){return p.getMarginAccountInfo(this.client)}getMarginTargetList(e){return p.getMarginTargetList(this.client,e)}};var St=class{constructor(e={}){this._ns={};this.client=new (0, _chunk66NWE54Ccjs.aa)(e),this.quoteService=new le(this.client),this.boardService=new ce(this.client),this.klineService=new de(this.client),this.futuresService=new pe(this.client),this.optionsService=new ge(this.client),this.indicatorService=new me(this.klineService,this.quoteService),this.fundFlowService=new fe(this.client),this.northboundService=new ye(this.client),this.marketEventService=new Se(this.client),this.dragonTigerService=new Te(this.client),this.dataService=new he(this.client),this.tradingCalendarService=new oe(this.quoteService),this.fundService=new ue(this.client)}memoNs(e,n){var r;return_nullishCoalesce((r=this._ns)[e], () => ((r[e]=n())))}get quotes(){return this.memoNs("quotes",()=>{let e=this.quoteService;return{cn:e.getFullQuotes.bind(e),cnSimple:e.getSimpleQuotes.bind(e),hk:e.getHKQuotes.bind(e),us:e.getUSQuotes.bind(e),fund:e.getFundQuotes.bind(e),fundFlow:e.getFundFlow.bind(e),largeOrder:e.getPanelLargeOrder.bind(e),timeline:e.getTodayTimeline.bind(e)}})}get codes(){return this.memoNs("codes",()=>{let e=this.quoteService;return{cn:e.getAShareCodeList.bind(e),us:e.getUSCodeList.bind(e),hk:e.getHKCodeList.bind(e),fund:e.getFundCodeList.bind(e)}})}get batch(){return this.memoNs("batch",()=>{let e=this.quoteService;return{cn:e.getAllAShareQuotes.bind(e),hk:e.getAllHKShareQuotes.bind(e),us:e.getAllUSShareQuotes.bind(e),byCodes:e.getAllQuotesByCodes.bind(e),raw:e.batchRaw.bind(e)}})}get kline(){return this.memoNs("kline",()=>{let e=this.klineService,n=this.indicatorService;return{cn:e.getHistoryKline.bind(e),cnMinute:e.getMinuteKline.bind(e),hk:e.getHKHistoryKline.bind(e),hkMinute:e.getHKMinuteKline.bind(e),us:e.getUSHistoryKline.bind(e),usMinute:e.getUSMinuteKline.bind(e),withIndicators:n.getKlineWithIndicators.bind(n)}})}get board(){return this.memoNs("board",()=>{let e=this.boardService;return{industry:{list:e.getIndustryList.bind(e),spot:e.getIndustrySpot.bind(e),constituents:e.getIndustryConstituents.bind(e),kline:e.getIndustryKline.bind(e),minuteKline:e.getIndustryMinuteKline.bind(e)},concept:{list:e.getConceptList.bind(e),spot:e.getConceptSpot.bind(e),constituents:e.getConceptConstituents.bind(e),kline:e.getConceptKline.bind(e),minuteKline:e.getConceptMinuteKline.bind(e)}}})}get options(){return this.memoNs("options",()=>{let e=this.optionsService;return{index:{spot:e.getIndexOptionSpot.bind(e),kline:e.getIndexOptionKline.bind(e)},etf:{months:e.getETFOptionMonths.bind(e),expireDay:e.getETFOptionExpireDay.bind(e),minute:e.getETFOptionMinute.bind(e),dailyKline:e.getETFOptionDailyKline.bind(e),fiveDayMinute:e.getETFOption5DayMinute.bind(e)},commodity:{spot:e.getCommodityOptionSpot.bind(e),kline:e.getCommodityOptionKline.bind(e)},cffex:{quotes:e.getCFFEXOptionQuotes.bind(e)},lhb:e.getOptionLHB.bind(e)}})}get futures(){return this.memoNs("futures",()=>{let e=this.futuresService;return{kline:e.getFuturesKline.bind(e),globalSpot:e.getGlobalFuturesSpot.bind(e),globalKline:e.getGlobalFuturesKline.bind(e),inventorySymbols:e.getFuturesInventorySymbols.bind(e),inventory:e.getFuturesInventory.bind(e),comexInventory:e.getComexInventory.bind(e)}})}get fundFlow(){return this.memoNs("fundFlow",()=>{let e=this.fundFlowService;return{individual:e.getIndividualFundFlow.bind(e),market:e.getMarketFundFlow.bind(e),rank:e.getFundFlowRank.bind(e),sectorRank:e.getSectorFundFlowRank.bind(e),sectorHistory:e.getSectorFundFlowHistory.bind(e)}})}get northbound(){return this.memoNs("northbound",()=>{let e=this.northboundService;return{minute:e.getNorthboundMinute.bind(e),summary:e.getNorthboundFlowSummary.bind(e),holdingRank:e.getNorthboundHoldingRank.bind(e),history:e.getNorthboundHistory.bind(e),individual:e.getNorthboundIndividual.bind(e)}})}get marketEvent(){return this.memoNs("marketEvent",()=>{let e=this.marketEventService;return{ztPool:e.getZTPool.bind(e),stockChanges:e.getStockChanges.bind(e),boardChanges:e.getBoardChanges.bind(e)}})}get dragonTiger(){return this.memoNs("dragonTiger",()=>{let e=this.dragonTigerService;return{detail:e.getDragonTigerDetail.bind(e),stockStats:e.getDragonTigerStockStats.bind(e),institution:e.getDragonTigerInstitution.bind(e),branchRank:e.getDragonTigerBranchRank.bind(e),seatDetail:e.getDragonTigerStockSeatDetail.bind(e)}})}get blockTrade(){return this.memoNs("blockTrade",()=>{let e=this.dataService;return{marketStat:e.getBlockTradeMarketStat.bind(e),detail:e.getBlockTradeDetail.bind(e),dailyStat:e.getBlockTradeDailyStat.bind(e)}})}get margin(){return this.memoNs("margin",()=>{let e=this.dataService;return{accountInfo:e.getMarginAccountInfo.bind(e),targetList:e.getMarginTargetList.bind(e)}})}get fund(){return this.memoNs("fund",()=>{let e=this.fundService;return{dividendList:e.getFundDividendList.bind(e),navHistory:e.getFundNavHistory.bind(e),estimate:e.getFundEstimate.bind(e),rankHistory:e.getFundRankHistory.bind(e)}})}get calendar(){return this.memoNs("calendar",()=>{let e=this.tradingCalendarService;return{isTradingDay:e.isTradingDay.bind(e),nextTradingDay:e.nextTradingDay.bind(e),prevTradingDay:e.prevTradingDay.bind(e),marketStatus:e.getMarketStatus.bind(e)}})}get reference(){return this.memoNs("reference",()=>{let e=this.quoteService;return{dividendDetail:e.getDividendDetail.bind(e),tradingCalendar:e.getTradingCalendar.bind(e)}})}getFullQuotes(e){return this.quoteService.getFullQuotes(e)}getSimpleQuotes(e){return this.quoteService.getSimpleQuotes(e)}getHKQuotes(e){return this.quoteService.getHKQuotes(e)}getUSQuotes(e){return this.quoteService.getUSQuotes(e)}getFundQuotes(e){return this.quoteService.getFundQuotes(e)}getFundFlow(e){return this.quoteService.getFundFlow(e)}getPanelLargeOrder(e){return this.quoteService.getPanelLargeOrder(e)}getTodayTimeline(e){return this.quoteService.getTodayTimeline(e)}getIndustryList(){return this.boardService.getIndustryList()}getIndustrySpot(e){return this.boardService.getIndustrySpot(e)}getIndustryConstituents(e){return this.boardService.getIndustryConstituents(e)}getIndustryKline(e,n){return this.boardService.getIndustryKline(e,n)}getIndustryMinuteKline(e,n){return this.boardService.getIndustryMinuteKline(e,n)}getConceptList(){return this.boardService.getConceptList()}getConceptSpot(e){return this.boardService.getConceptSpot(e)}getConceptConstituents(e){return this.boardService.getConceptConstituents(e)}getConceptKline(e,n){return this.boardService.getConceptKline(e,n)}getConceptMinuteKline(e,n){return this.boardService.getConceptMinuteKline(e,n)}getHistoryKline(e,n){return this.klineService.getHistoryKline(e,n)}getMinuteKline(e,n){return this.klineService.getMinuteKline(e,n)}getHKHistoryKline(e,n){return this.klineService.getHKHistoryKline(e,n)}getHKMinuteKline(e,n){return this.klineService.getHKMinuteKline(e,n)}getUSHistoryKline(e,n){return this.klineService.getUSHistoryKline(e,n)}getUSMinuteKline(e,n){return this.klineService.getUSMinuteKline(e,n)}search(e){return this.quoteService.search(e)}getAShareCodeList(e){return this.quoteService.getAShareCodeList(e)}getUSCodeList(e){return this.quoteService.getUSCodeList(e)}getHKCodeList(){return this.quoteService.getHKCodeList()}getFundCodeList(){return this.quoteService.getFundCodeList()}getAllAShareQuotes(e={}){return this.quoteService.getAllAShareQuotes(e)}getAllHKShareQuotes(e={}){return this.quoteService.getAllHKShareQuotes(e)}getAllUSShareQuotes(e={}){return this.quoteService.getAllUSShareQuotes(e)}getAllQuotesByCodes(e,n={}){return this.quoteService.getAllQuotesByCodes(e,n)}batchRaw(e){return this.quoteService.batchRaw(e)}getTradingCalendar(){return this.quoteService.getTradingCalendar()}isTradingDay(e){return this.tradingCalendarService.isTradingDay(e)}nextTradingDay(e){return this.tradingCalendarService.nextTradingDay(e)}prevTradingDay(e){return this.tradingCalendarService.prevTradingDay(e)}getMarketStatus(e="A"){return this.tradingCalendarService.getMarketStatus(e)}getDividendDetail(e){return this.quoteService.getDividendDetail(e)}getFuturesKline(e,n){return this.futuresService.getFuturesKline(e,n)}getGlobalFuturesSpot(e){return this.futuresService.getGlobalFuturesSpot(e)}getGlobalFuturesKline(e,n){return this.futuresService.getGlobalFuturesKline(e,n)}getFuturesInventorySymbols(){return this.futuresService.getFuturesInventorySymbols()}getFuturesInventory(e,n){return this.futuresService.getFuturesInventory(e,n)}getComexInventory(e,n){return this.futuresService.getComexInventory(e,n)}getIndexOptionSpot(e,n){return this.optionsService.getIndexOptionSpot(e,n)}getIndexOptionKline(e){return this.optionsService.getIndexOptionKline(e)}getCFFEXOptionQuotes(e){return this.optionsService.getCFFEXOptionQuotes(e)}getETFOptionMonths(e){return this.optionsService.getETFOptionMonths(e)}getETFOptionExpireDay(e,n){return this.optionsService.getETFOptionExpireDay(e,n)}getETFOptionMinute(e){return this.optionsService.getETFOptionMinute(e)}getETFOptionDailyKline(e){return this.optionsService.getETFOptionDailyKline(e)}getETFOption5DayMinute(e){return this.optionsService.getETFOption5DayMinute(e)}getCommodityOptionSpot(e,n){return this.optionsService.getCommodityOptionSpot(e,n)}getCommodityOptionKline(e){return this.optionsService.getCommodityOptionKline(e)}getOptionLHB(e,n){return this.optionsService.getOptionLHB(e,n)}getKlineWithIndicators(e,n={}){return this.indicatorService.getKlineWithIndicators(e,n)}getIndividualFundFlow(e,n){return this.fundFlowService.getIndividualFundFlow(e,n)}getMarketFundFlow(){return this.fundFlowService.getMarketFundFlow()}getFundFlowRank(e){return this.fundFlowService.getFundFlowRank(e)}getSectorFundFlowRank(e){return this.fundFlowService.getSectorFundFlowRank(e)}getSectorFundFlowHistory(e,n){return this.fundFlowService.getSectorFundFlowHistory(e,n)}getNorthboundMinute(e){return this.northboundService.getNorthboundMinute(e)}getNorthboundFlowSummary(){return this.northboundService.getNorthboundFlowSummary()}getNorthboundHoldingRank(e){return this.northboundService.getNorthboundHoldingRank(e)}getNorthboundHistory(e,n){return this.northboundService.getNorthboundHistory(e,n)}getNorthboundIndividual(e,n){return this.northboundService.getNorthboundIndividual(e,n)}getZTPool(e,n){return this.marketEventService.getZTPool(e,n)}getStockChanges(e){return this.marketEventService.getStockChanges(e)}getBoardChanges(){return this.marketEventService.getBoardChanges()}getDragonTigerDetail(e){return this.dragonTigerService.getDragonTigerDetail(e)}getDragonTigerStockStats(e){return this.dragonTigerService.getDragonTigerStockStats(e)}getDragonTigerInstitution(e){return this.dragonTigerService.getDragonTigerInstitution(e)}getDragonTigerBranchRank(e){return this.dragonTigerService.getDragonTigerBranchRank(e)}getDragonTigerStockSeatDetail(e,n){return this.dragonTigerService.getDragonTigerStockSeatDetail(e,n)}getBlockTradeMarketStat(){return this.dataService.getBlockTradeMarketStat()}getBlockTradeDetail(e){return this.dataService.getBlockTradeDetail(e)}getBlockTradeDailyStat(e){return this.dataService.getBlockTradeDailyStat(e)}getMarginAccountInfo(){return this.dataService.getMarginAccountInfo()}getMarginTargetList(e){return this.dataService.getMarginTargetList(e)}getFundDividendList(e){return this.fundService.getFundDividendList(e)}getFundNavHistory(e){return this.fundService.getFundNavHistory(e)}getFundEstimate(e){return this.fundService.getFundEstimate(e)}getFundRankHistory(e){return this.fundService.getFundRankHistory(e)}},Ku= exports.d =St;exports.a = oe; exports.b = ue; exports.c = St; exports.d = Ku;
|
package/dist/chunk-XVLG3G7T.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _chunk4Q7UQ5Q3cjs = require('./chunk-4Q7UQ5Q3.cjs');function P(b){let e=b.slice(),d={where(t){return e=e.filter(t),d},sortBy(t,c="desc"){let f=c==="asc"?1:-1;return e=e.slice().sort((s,n)=>{let m=t(s),p=t(n),a=Number.isFinite(m),l=Number.isFinite(p);return!a&&!l?0:a?l?(m-p)*f:-1:1}),d},top(t){if(!Number.isInteger(t)||t<0)throw new (0, _chunk4Q7UQ5Q3cjs.e)(`top(n): n must be a non-negative integer, got ${t}`,{n:t});return e.slice(0,t)},toArray(){return e.slice()}};return d}function R(b){let e=b.close;return e!=null&&Number.isFinite(e)?e:null}function v(b){let{klines:e,strategy:d,initialCapital:t=1e5,fee:c=0,getClose:f=R}=b,s=t,n=0,m=0,p=-1,a=0,l=[],o=[],T=(r,i)=>{let u=(i/m*(1-c)*(1-c)-1)*100;l.push({entryIndex:p,exitIndex:r,entryPrice:m,exitPrice:i,returnPercent:u})};for(let r=0;r<e.length;r++){let i=f(e[r]),u=i!=null&&Number.isFinite(i)&&i>0?i:null,x=d(e[r],r,e);u!=null&&(a=u,x==="buy"&&n===0?(n=s*(1-c)/u,m=u,p=r,s=0):x==="sell"&&n>0&&(s=n*u*(1-c),T(r,u),n=0));let C=s+n*(_nullishCoalesce(u, () => (a)));o.push(C)}n>0&&a>0&&(s=n*a*(1-c),T(e.length-1,a),n=0,o.length>0&&(o[o.length-1]=s));let h=o.length?o[o.length-1]:t,S=(h/t-1)*100,B=l.filter(r=>r.returnPercent>0).length,w=l.length?B/l.length*100:0,y=-1/0,g=0;for(let r of o){r>y&&(y=r);let i=y>0?(y-r)/y*100:0;i>g&&(g=i)}return{initialCapital:t,finalEquity:h,totalReturn:S,winRate:w,maxDrawdown:g,tradeCount:l.length,trades:l,equityCurve:o}}exports.a = P; exports.b = v;
|
package/dist/chunk-ZAQ7DTRY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as p,b as f,e as _,h as L,k as T,l as S}from"./chunk-UBIQBXQ7.js";function A(t){return new TextDecoder("gbk").decode(t)}function k(t){let e=t.split(";").map(n=>n.trim()).filter(Boolean),r=[];for(let n of e){let o=n.indexOf("=");if(o<0)continue;let s=n.slice(0,o).trim();s.startsWith("v_")&&(s=s.slice(2));let a=n.slice(o+1).trim();a.startsWith('"')&&a.endsWith('"')&&(a=a.slice(1,-1));let i=a.split("~");r.push({key:s,fields:i})}return r}function se(t){if(!t||t==="")return 0;let e=parseFloat(t);return Number.isNaN(e)?0:e}function ie(t){if(!t||t==="")return null;let e=parseFloat(t);return Number.isNaN(e)?null:e}function W(t){if(!t||t===""||t==="-")return null;let e=parseFloat(t);return Number.isNaN(e)?null:e}function ae(t){return t==null?null:W(String(t))}var ce=new Set(["daily","weekly","monthly"]),ue=new Set(["1","5","15","30","60"]),le=new Set(["","qfq","hfq"]);function P(t,e){if(!Number.isFinite(t)||!Number.isInteger(t)||t<=0)throw new _(`${e} must be a positive integer`,{argument:e,value:t})}function pe(t){if(!ce.has(t))throw new _("period must be one of: daily, weekly, monthly",{argument:"period",value:t})}function de(t){if(!ue.has(t))throw new _("period must be one of: 1, 5, 15, 30, 60",{argument:"period",value:t})}function me(t){if(!le.has(t))throw new _("adjust must be one of: '', 'qfq', 'hfq'",{argument:"adjust",value:t})}function he(t,e){P(e,"chunkSize");let r=[];for(let n=0;n<t.length;n+=e)r.push(t.slice(n,n+e));return r}async function fe(t,e,r=!1){if(P(e,"concurrency"),t.length===0)return[];let n=r?new Array(t.length):[],o=0,s=Array.from({length:Math.min(e,t.length)},async()=>{for(;;){let a=o++;if(a>=t.length)return;let i=await t[a]();r?n[a]=i:n.push(i)}});return await Promise.all(s),n}function Ee(t){return{daily:"101",weekly:"102",monthly:"103"}[t]}function Te(t){return{"":"0",qfq:"1",hfq:"2"}[t]}var _e=typeof document<"u"&&typeof window<"u",ge=0;function X(){return`__stock_sdk_jsonp_${Date.now()}_${ge++}`}function $(t){let e=t,r=e.indexOf("*/");r!==-1&&(e=e.slice(r+2).trim());let n=e.indexOf("(");if(n===-1)throw new p({code:"PARSE_ERROR",message:"Invalid JSONP response: no opening parenthesis found"});let o=e.lastIndexOf(")");if(o===-1||o<=n)throw new p({code:"PARSE_ERROR",message:"Invalid JSONP response: no closing parenthesis found"});let s=e.slice(n+1,o);try{return JSON.parse(s)}catch(a){throw new p({code:"PARSE_ERROR",message:"Invalid JSONP response: payload is not valid JSON",cause:a})}}function Re(t,e){let{timeout:r=15e3,callbackParam:n="callback",callbackMode:o="query"}=e;return new Promise((s,a)=>{let i=X(),u;if(o==="path")u=t.replace("{callback}",i);else{let R=t.includes("?")?"&":"?";u=`${t}${R}${n}=${i}`}let c=document.createElement("script"),l=!1,m=window,d=()=>{c.parentNode&&c.parentNode.removeChild(c),delete m[i]},E=setTimeout(()=>{l||(l=!0,d(),a(new p({code:"TIMEOUT",message:`JSONP request timed out after ${r}ms: ${t}`,url:t,details:{timeout:r}})))},r);m[i]=R=>{l||(l=!0,clearTimeout(E),d(),s(R))},c.onerror=()=>{l||(l=!0,clearTimeout(E),d(),a(new p({code:"NETWORK_ERROR",message:`JSONP script load failed: ${t}`,url:t})))},c.src=u,document.head.appendChild(c)})}async function ye(t,e){let{timeout:r=15e3,callbackParam:n="callback",callbackMode:o="query"}=e,s=X(),a;if(o==="path")a=t.replace("{callback}",s);else{let c=t.includes("?")?"&":"?";a=`${t}${c}${n}=${s}`}let i=new AbortController,u=setTimeout(()=>i.abort(),r);try{let c=await fetch(a,{signal:i.signal});if(!c.ok)throw new f(c.status,c.statusText,t);let l=await c.text();return $(l)}catch(c){throw c instanceof DOMException&&c.name==="AbortError"?new p({code:"TIMEOUT",message:`JSONP request timed out after ${r}ms: ${t}`,url:t,details:{timeout:r}}):c}finally{clearTimeout(u)}}function Se(t,e={}){return _e?Re(t,e):ye(t,e)}var z=new Map;async function b(t,e){let n=(z.get(t)??Promise.resolve()).then(e,e);return z.set(t,n.then(()=>{},()=>{})),n}function Oe(){return typeof document<"u"&&typeof window<"u"}var Ce=15e3,xe="jsVars";async function Le(t,e,r={}){let n=r.timeout??Ce;return Oe()?b(xe,()=>Ae(t,e,n)):ke(t,e,n,r.headers,r.client)}function N(t,e){let r={};for(let n of e){let o=Pe(t,n);o!==void 0&&(r[n]=o)}return r}function Ae(t,e,r){return new Promise((n,o)=>{let s=document.createElement("script"),a=!1,i=()=>{s.parentNode&&s.parentNode.removeChild(s)},u=setTimeout(()=>{a||(a=!0,i(),o(new p({code:"TIMEOUT",message:`fetchJsVars timed out after ${r}ms: ${t}`,url:t,details:{timeout:r}})))},r);s.onload=()=>{if(a)return;a=!0,clearTimeout(u);let c=window,l={};for(let m of e)if(m in c){l[m]=c[m];try{delete c[m]}catch{}}i(),n(l)},s.onerror=()=>{a||(a=!0,clearTimeout(u),i(),o(new p({code:"NETWORK_ERROR",message:`fetchJsVars script load failed: ${t}`,url:t})))},s.src=t,document.head.appendChild(s)})}async function ke(t,e,r,n,o){if(o){let i=await o.get(t,{responseType:"text"});return N(i,e)}let s=new AbortController,a=setTimeout(()=>s.abort(),r);try{let i=await fetch(t,{signal:s.signal,headers:n});if(!i.ok)throw new f(i.status,i.statusText,t);let u=await i.text();return N(u,e)}catch(i){throw i instanceof DOMException&&i.name==="AbortError"?new p({code:"TIMEOUT",message:`fetchJsVars timed out after ${r}ms: ${t}`,url:t,details:{timeout:r}}):i}finally{clearTimeout(a)}}function Pe(t,e){let n=new RegExp(`(?:^|[^\\w$])(?:var|let|const)\\s+${be(e)}\\s*=\\s*`,"m").exec(t);if(!n)return;let o=n.index+n[0].length,s=Ne(t,o),a=t.slice(o,s).trim();try{return JSON.parse(a)}catch{return}}function be(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ne(t,e){let r=0,n=null;for(let o=e;o<t.length;o++){let s=t[o];if(n){if(s==="\\"){o++;continue}s===n&&(n=null);continue}if(s==='"'||s==="'"){n=s;continue}if(s==="["||s==="{"||s==="("){r++;continue}if(s==="]"||s==="}"||s===")"){r--;continue}if(s===";"&&r===0)return o}return t.length}var Ue={CN:"Asia/Shanghai",HK:"Asia/Hong_Kong",US:"America/New_York"};function Me(t){if(!t)return null;let e=t.trim();if(!e)return null;let r=/^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2}))?$/.exec(e);if(r)return{year:+r[1],month:+r[2],day:+r[3],hour:+r[4],minute:+r[5],second:r[6]?+r[6]:0};let n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);return n?{year:+n[1],month:+n[2],day:+n[3],hour:0,minute:0,second:0}:/^\d{14}$/.test(e)?{year:+e.slice(0,4),month:+e.slice(4,6),day:+e.slice(6,8),hour:+e.slice(8,10),minute:+e.slice(10,12),second:+e.slice(12,14)}:/^\d{8}$/.test(e)?{year:+e.slice(0,4),month:+e.slice(4,6),day:+e.slice(6,8),hour:0,minute:0,second:0}:null}var Z=new Map;function J(t,e,r){let n=`${t}|${e}|${JSON.stringify(r)}`,o=Z.get(n);return o||(o=new Intl.DateTimeFormat(t,{timeZone:e,...r}),Z.set(n,o)),o}function j(t,e){let r=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second),o=J("en-US",e,{hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).formatToParts(new Date(r)),s={};for(let c of o)c.type!=="literal"&&(s[c.type]=c.value);let a=parseInt(s.hour??"0",10);a===24&&(a=0);let i=Date.UTC(parseInt(s.year??"0",10),parseInt(s.month??"1",10)-1,parseInt(s.day??"1",10),a,parseInt(s.minute??"0",10),parseInt(s.second??"0",10)),u=r-i;return r+u}function Ie(t,e){let r=(t||"").trim(),n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(r)??/^(\d{4})(\d{2})(\d{2})$/.exec(r);if(!n)return null;let o=/^(\d{2}):(\d{2})(?::(\d{2}))?$/.exec((e||"").trim());return o?{year:+n[1],month:+n[2],day:+n[3],hour:+o[1],minute:+o[2],second:o[3]?+o[3]:0}:null}function Y(t,e){let r=Me(t);return r?j(r,e):NaN}function V(t){return Number.isNaN(t)?null:t}function we(t,e){return{timestamp:V(Y(t,e)),tz:e}}function ve(t,e,r){let n=Ie(t,e);return n?{timestamp:V(j(n,r)),tz:r}:{timestamp:null,tz:r}}function Fe(t,e){if(t==null||!Number.isFinite(t))return"";let r=J("sv-SE",e,{hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(t)),n=r.match(/^(\d{4}-\d{2}-\d{2})[ T](\d{2}):(\d{2})/);if(!n)return r;let o=n[2]==="24"?"00":n[2];return`${n[1]} ${o}:${n[3]}`}var U="https://qt.gtimg.cn",De="https://web.ifzq.gtimg.cn/appstock/app/minute/query",He="https://assets.linkdiary.cn/shares/zh_a_list.json",qe="https://assets.linkdiary.cn/shares/us_list.json",Be="https://assets.linkdiary.cn/shares/hk_list.json",Ke="https://assets.linkdiary.cn/shares/fund_list",jt="https://assets.linkdiary.cn/shares/trade-data-list.txt";var Ge="https://push2his.eastmoney.com/api/qt/stock/kline/get",We="https://push2his.eastmoney.com/api/qt/stock/trends2/get",Xe="https://33.push2his.eastmoney.com/api/qt/stock/kline/get",$e="https://63.push2his.eastmoney.com/api/qt/stock/kline/get",ze="https://33.push2his.eastmoney.com/api/qt/stock/trends2/get",Ze="https://63.push2his.eastmoney.com/api/qt/stock/trends2/get",Je="https://17.push2.eastmoney.com/api/qt/clist/get",je="https://91.push2.eastmoney.com/api/qt/stock/get",Ye="https://29.push2.eastmoney.com/api/qt/clist/get",Ve="https://7.push2his.eastmoney.com/api/qt/stock/kline/get",Qe="https://push2his.eastmoney.com/api/qt/stock/trends2/get",et="https://79.push2.eastmoney.com/api/qt/clist/get",tt="https://91.push2.eastmoney.com/api/qt/stock/get",rt="https://29.push2.eastmoney.com/api/qt/clist/get",nt="https://91.push2his.eastmoney.com/api/qt/stock/kline/get",ot="https://push2his.eastmoney.com/api/qt/stock/trends2/get",st="https://datacenter-web.eastmoney.com/api/data/v1/get",it="https://push2his.eastmoney.com/api/qt/stock/fflow/daykline/get",at="https://push2.eastmoney.com/api/qt/clist/get",ct="https://push2.eastmoney.com/api/qt/kamtbs.rtmin/get",ut="https://push2ex.eastmoney.com",lt="7eea3edcaed734bea9cbfc24409ed989",pt="b2884a393a59ad64002292a3e90d46a5",dt="https://push2his.eastmoney.com/api/qt/stock/kline/get",mt="https://futsseapi.eastmoney.com/list/COMEX,NYMEX,COBOT,SGX,NYBOT,LME,MDEX,TOCOM,IPE",ht="58b2fa8f54638b60b87d69b31969089c",ft={SHFE:113,DCE:114,CZCE:115,INE:142,CFFEX:220,GFEX:225},Et={cu:"SHFE",al:"SHFE",zn:"SHFE",pb:"SHFE",au:"SHFE",ag:"SHFE",rb:"SHFE",wr:"SHFE",fu:"SHFE",ru:"SHFE",bu:"SHFE",hc:"SHFE",ni:"SHFE",sn:"SHFE",sp:"SHFE",ss:"SHFE",ao:"SHFE",br:"SHFE",c:"DCE",a:"DCE",b:"DCE",m:"DCE",y:"DCE",p:"DCE",l:"DCE",v:"DCE",j:"DCE",jm:"DCE",i:"DCE",jd:"DCE",pp:"DCE",cs:"DCE",eg:"DCE",eb:"DCE",pg:"DCE",lh:"DCE",WH:"CZCE",CF:"CZCE",SR:"CZCE",TA:"CZCE",OI:"CZCE",MA:"CZCE",FG:"CZCE",RM:"CZCE",SF:"CZCE",SM:"CZCE",ZC:"CZCE",AP:"CZCE",CJ:"CZCE",UR:"CZCE",SA:"CZCE",PF:"CZCE",PK:"CZCE",PX:"CZCE",SH:"CZCE",sc:"INE",nr:"INE",lu:"INE",bc:"INE",ec:"INE",IF:"CFFEX",IC:"CFFEX",IH:"CFFEX",IM:"CFFEX",TS:"CFFEX",TF:"CFFEX",T:"CFFEX",TL:"CFFEX",si:"GFEX",lc:"GFEX",ps:"GFEX",pt:"GFEX",pd:"GFEX"},Tt={HG:101,GC:101,SI:101,QI:101,QO:101,MGC:101,CL:102,NG:102,RB:102,HO:102,PA:102,PL:102,ZW:103,ZM:103,ZS:103,ZC:103,ZL:103,ZR:103,YM:103,NQ:103,ES:103,SB:108,CT:108,LCPT:109,LZNT:109,LALT:109},_t="https://stock.finance.sina.com.cn/futures/api/openapi.php/OptionService.getOptionData",gt="https://stock.finance.sina.com.cn/futures/api/jsonp.php/{callback}/FutureOptionAllService.getOptionDayline",Rt="https://stock.finance.sina.com.cn/futures/api/openapi.php/StockOptionService.getStockName",yt="https://stock.finance.sina.com.cn/futures/api/openapi.php/StockOptionService.getRemainderDay",St="https://stock.finance.sina.com.cn/futures/api/openapi.php/StockOptionDaylineService.getOptionMinline",Ot="https://stock.finance.sina.com.cn/futures/api/jsonp_v2.php/{callback}/StockOptionDaylineService.getSymbolInfo",Ct="https://stock.finance.sina.com.cn/futures/api/openapi.php/StockOptionDaylineService.getFiveDayLine",xt="https://futsseapi.eastmoney.com/list/option/221",Lt="https://datacenter-web.eastmoney.com/api/data/get";var At={au:{product:"au_o",exchange:"shfe"},ag:{product:"ag_o",exchange:"shfe"},cu:{product:"cu_o",exchange:"shfe"},al:{product:"al_o",exchange:"shfe"},zn:{product:"zn_o",exchange:"shfe"},ru:{product:"ru_o",exchange:"shfe"},sc:{product:"sc_o",exchange:"ine"},m:{product:"m_o",exchange:"dce"},c:{product:"c_o",exchange:"dce"},i:{product:"i_o",exchange:"dce"},p:{product:"p_o",exchange:"dce"},pp:{product:"pp_o",exchange:"dce"},l:{product:"l_o",exchange:"dce"},v:{product:"v_o",exchange:"dce"},pg:{product:"pg_o",exchange:"dce"},y:{product:"y_o",exchange:"dce"},a:{product:"a_o",exchange:"dce"},b:{product:"b_o",exchange:"dce"},eg:{product:"eg_o",exchange:"dce"},eb:{product:"eb_o",exchange:"dce"},SR:{product:"SR_o",exchange:"czce"},CF:{product:"CF_o",exchange:"czce"},TA:{product:"TA_o",exchange:"czce"},MA:{product:"MA_o",exchange:"czce"},RM:{product:"RM_o",exchange:"czce"},OI:{product:"OI_o",exchange:"czce"},PK:{product:"PK_o",exchange:"czce"},PF:{product:"PF_o",exchange:"czce"},SA:{product:"SA_o",exchange:"czce"},UR:{product:"UR_o",exchange:"czce"}},M=3e4,kt=500,Pt=500,bt=7,I=3,w=1e3,v=3e4,F=2,D=[408,429,500,502,503,504];var O=class{constructor(e={}){this.acquireChain=Promise.resolve();let r=e.requestsPerSecond??5;this.maxTokens=e.maxBurst??r,this.tokens=this.maxTokens,this.refillRate=r/1e3,this.lastRefillTime=Date.now()}refill(){let e=Date.now(),n=(e-this.lastRefillTime)*this.refillRate;this.tokens=Math.min(this.maxTokens,this.tokens+n),this.lastRefillTime=e}tryAcquire(){return this.refill(),this.tokens>=1?(this.tokens-=1,!0):!1}getWaitTime(){if(this.refill(),this.tokens>=1)return 0;let e=1-this.tokens;return Math.ceil(e/this.refillRate)}async acquire(){let e=this.acquireChain,r;this.acquireChain=new Promise(n=>{r=n});try{await e;let n=this.getWaitTime();n>0&&await this.sleep(n),this.refill(),this.tokens-=1}finally{r()}}sleep(e){return new Promise(r=>setTimeout(r,e))}getAvailableTokens(){return this.refill(),this.tokens}};var Q=["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Safari/605.1.15","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0"],H=0;function Nt(){return typeof window<"u"&&typeof window.document<"u"}function ee(){if(Nt())return;let t=Q[H];return H=(H+1)%Q.length,t}var g=class extends p{constructor(e="Circuit breaker is OPEN"){super({code:"CIRCUIT_OPEN",message:e}),this.name="CircuitBreakerError"}},C=class{constructor(e={}){this.state="CLOSED";this.failureCount=0;this.lastFailureTime=0;this.halfOpenSuccessCount=0;this.failureThreshold=e.failureThreshold??5,this.resetTimeout=e.resetTimeout??3e4,this.halfOpenRequests=e.halfOpenRequests??1,this.onStateChange=e.onStateChange}getState(){return this.checkStateTransition(),this.state}canRequest(){switch(this.checkStateTransition(),this.state){case"CLOSED":return!0;case"OPEN":return!1;case"HALF_OPEN":return this.halfOpenSuccessCount<this.halfOpenRequests}}recordSuccess(){this.checkStateTransition(),this.state==="HALF_OPEN"?(this.halfOpenSuccessCount++,this.halfOpenSuccessCount>=this.halfOpenRequests&&this.transitionTo("CLOSED")):this.state==="CLOSED"&&(this.failureCount=0)}recordFailure(){this.lastFailureTime=Date.now(),this.state==="HALF_OPEN"?this.transitionTo("OPEN"):this.state==="CLOSED"&&(this.failureCount++,this.failureCount>=this.failureThreshold&&this.transitionTo("OPEN"))}checkStateTransition(){this.state==="OPEN"&&Date.now()-this.lastFailureTime>=this.resetTimeout&&this.transitionTo("HALF_OPEN")}transitionTo(e){if(this.state===e)return;let r=this.state;this.state=e,e==="CLOSED"?(this.failureCount=0,this.halfOpenSuccessCount=0):e==="HALF_OPEN"&&(this.halfOpenSuccessCount=0),this.onStateChange?.(r,e)}reset(){this.transitionTo("CLOSED"),this.failureCount=0,this.halfOpenSuccessCount=0,this.lastFailureTime=0}async execute(e){if(!this.canRequest())throw new g;try{let r=await e();return this.recordSuccess(),r}catch(r){throw this.recordFailure(),r}}getStats(){return{state:this.getState(),failureCount:this.failureCount,lastFailureTime:this.lastFailureTime,halfOpenSuccessCount:this.halfOpenSuccessCount}}};var Ut=3e4,Mt=1,te=["push2his.eastmoney.com","7.push2his.eastmoney.com","33.push2his.eastmoney.com","63.push2his.eastmoney.com","91.push2his.eastmoney.com"],re=["17.push2.eastmoney.com","29.push2.eastmoney.com","79.push2.eastmoney.com","91.push2.eastmoney.com"];function It(t,e){return e!=="eastmoney"?[t]:t.includes("push2his.eastmoney.com")?te:t.includes("push2.eastmoney.com")?re:[t]}function wt(t){return Array.from(new Set(t))}var x=class{constructor(e=Ut,r=Mt){this.cooldownMs=e;this.failureThreshold=r;this.states=new Map}getCandidateUrls(e,r){let n;try{n=new URL(e)}catch{return[e]}let o=Date.now(),s=It(n.hostname,r);if(s.length<=1)return[e];let a=s.filter(c=>{let l=this.states.get(c);return!l||l.cooldownUntil<=o}),i=s.filter(c=>{let l=this.states.get(c);return l&&l.cooldownUntil>o});return wt([...a.includes(n.hostname)?[n.hostname]:[],...a.filter(c=>c!==n.hostname),...i.includes(n.hostname)?[n.hostname]:[],...i.filter(c=>c!==n.hostname)]).map(c=>{let l=new URL(e);return l.hostname=c,l.toString()})}recordSuccess(e){let r=this.safeGetHost(e);if(!r)return;let n=this.getState(r);n.failureCount=0,n.cooldownUntil=0,n.successCount++,n.lastErrorCode=void 0}recordFailure(e,r){let n=this.safeGetHost(e);if(!n)return;let o=this.getState(n);o.failureCount++,o.lastFailureAt=Date.now(),o.lastErrorCode=T(r),o.failureCount>=this.failureThreshold&&(o.cooldownUntil=Date.now()+this.cooldownMs)}shouldFallback(e){let r=T(e);return r==="NETWORK_ERROR"||r==="TIMEOUT"||r==="PARSE_ERROR"?!0:e instanceof f?e.status===408||e.status===429||e.status>=500:!1}getStats(e){let r=Array.from(this.states.values()).map(o=>({...o}));if(!e)return r;if(e!=="eastmoney")return[];let n=new Set([...te,...re]);return r.filter(o=>n.has(o.host))}safeGetHost(e){try{return new URL(e).hostname}catch{return null}}getState(e){let r=this.states.get(e);if(r)return r;let n={host:e,failureCount:0,successCount:0,cooldownUntil:0,lastFailureAt:0};return this.states.set(e,n),n}};function vt(t){return{maxRetries:t?.maxRetries??I,baseDelay:t?.baseDelay??w,maxDelay:t?.maxDelay??v,backoffMultiplier:t?.backoffMultiplier??F,retryableStatusCodes:t?.retryableStatusCodes??D,retryOnNetworkError:t?.retryOnNetworkError??!0,retryOnTimeout:t?.retryOnTimeout??!0,onRetry:t?.onRetry}}function Ft(t,e){let r={...t??{}};return e&&(Object.keys(r).some(o=>o.toLowerCase()==="user-agent")||(r["User-Agent"]=e)),r}function ne(t,e){return e?{timeout:e.timeout??t.timeout,retry:e.retry?{...t.retry??{},...e.retry}:t.retry?{...t.retry}:void 0,headers:{...t.headers??{},...e.headers??{}},userAgent:e.userAgent??t.userAgent,rateLimit:e.rateLimit?{...t.rateLimit??{},...e.rateLimit}:t.rateLimit?{...t.rateLimit}:void 0,rotateUserAgent:e.rotateUserAgent??t.rotateUserAgent,circuitBreaker:e.circuitBreaker?{...t.circuitBreaker??{},...e.circuitBreaker}:t.circuitBreaker?{...t.circuitBreaker}:void 0}:{...t,headers:{...t.headers??{}},retry:t.retry?{...t.retry}:void 0,rateLimit:t.rateLimit?{...t.rateLimit}:void 0,circuitBreaker:t.circuitBreaker?{...t.circuitBreaker}:void 0}}function q(t={}){return{timeout:t.timeout??M,retry:vt(t.retry),headers:Ft(t.headers,t.userAgent),rotateUserAgent:t.rotateUserAgent??!1,rateLimit:t.rateLimit?{...t.rateLimit}:void 0,circuitBreaker:t.circuitBreaker?{...t.circuitBreaker}:void 0}}function oe(t,e){if(e)return e;try{let r=new URL(t).hostname;if(r.includes("eastmoney.com"))return"eastmoney";if(r.includes("gtimg.cn"))return"tencent";if(r.includes("sina.com.cn"))return"sina";if(r.includes("linkdiary.cn"))return"linkdiary"}catch{return"unknown"}return"unknown"}var B=Symbol("stock-sdk:timeout");function Dt(t){if(t instanceof DOMException&&t.name==="AbortError")return!0;if(t instanceof Error){if(t.name==="AbortError")return!0;let e=t.cause;if((e instanceof Error||e instanceof DOMException)&&e.name==="AbortError")return!0}return!1}var K=()=>{};function Ht(t){let e=t.filter(i=>!!i);if(e.length===0)return{signal:void 0,cleanup:K};if(e.length===1)return{signal:e[0],cleanup:K};let r=AbortSignal.any;if(typeof r=="function")return{signal:r(e),cleanup:K};let n=new AbortController,o=i=>{n.signal.aborted||n.abort(i)},s=[];for(let i of e){if(i.aborted){o(i.reason);break}let u=()=>o(i.reason);i.addEventListener("abort",u,{once:!0}),s.push({s:i,handler:u})}let a=()=>{for(let{s:i,handler:u}of s)i.removeEventListener("abort",u)};return{signal:n.signal,cleanup:a}}var G=class{constructor(e={}){this.baseUrl=e.baseUrl??U;let r={timeout:e.timeout,retry:e.retry,headers:e.headers,userAgent:e.userAgent,rateLimit:e.rateLimit,rotateUserAgent:e.rotateUserAgent,circuitBreaker:e.circuitBreaker};this.defaultPolicy=q(r),this.providerPolicies={},this.runtimeStates=new Map,this.fallbackManager=new x,this.fetchImpl=e.fetchImpl,this.clientSignal=e.signal,this.hooks=e.hooks;for(let[n,o]of Object.entries(e.providerPolicies??{})){let s=ne(r,o);this.providerPolicies[n]=q(s)}}getProviderState(e){let r=this.runtimeStates.get(e);if(r)return r;let n=this.providerPolicies[e]??this.defaultPolicy,o={policy:n,rateLimiter:n.rateLimit?new O(n.rateLimit):null,circuitBreaker:n.circuitBreaker?new C(n.circuitBreaker):null};return this.runtimeStates.set(e,o),o}getTimeout(){return this.defaultPolicy.timeout}getHostHealth(e){return this.fallbackManager.getStats(e)}safe(e){try{e()}catch{}}toSdkError(e){return e instanceof p?e:new p({code:T(e)??"NETWORK_ERROR",message:e.message,provider:e.provider,url:e.url,status:e.status,details:e.details,cause:e})}calculateDelay(e,r){return Math.min(r.baseDelay*Math.pow(r.backoffMultiplier,e),r.maxDelay)+Math.random()*100}sleep(e){return new Promise(r=>setTimeout(r,e))}shouldRetry(e,r,n){if(r>=n.maxRetries)return!1;let o=T(e);return o==="ABORTED"?!1:o==="TIMEOUT"?n.retryOnTimeout:o==="NETWORK_ERROR"?n.retryOnNetworkError:e instanceof f?n.retryableStatusCodes.includes(e.status):!1}async executeWithRetry(e,r,n,o=0){try{return await e(o)}catch(s){let a=S(s,n),i={provider:n.provider,url:n.url,timeout:n.timeout,attempt:o,responseType:n.responseType};if(this.safe(()=>this.hooks?.onError?.(i,this.toSdkError(a))),this.safe(()=>this.hooks?.trace?.("error",i)),this.shouldRetry(a,o,r)){let u=this.calculateDelay(o,r);return r.onRetry&&r.onRetry(o+1,a,u),this.safe(()=>this.hooks?.onRetry?.(i,this.toSdkError(a),u)),this.safe(()=>this.hooks?.trace?.("retry",i)),await this.sleep(u),this.executeWithRetry(e,r,n,o+1)}throw a}}async performRequest(e,r,n,o="text",s={},a=0){r.rateLimiter&&await r.rateLimiter.acquire();let i=new AbortController,u=setTimeout(()=>i.abort(B),r.policy.timeout),{signal:c,cleanup:l}=Ht([i.signal,s.signal,this.clientSignal]),m=s.fetchImpl??this.fetchImpl??globalThis.fetch,d={...r.policy.headers};if(r.policy.rotateUserAgent){let h=ee();if(h){for(let y of Object.keys(d))y.toLowerCase()==="user-agent"&&delete d[y];d["User-Agent"]=h}}let E={provider:n,url:e,timeout:r.policy.timeout,attempt:a,responseType:o};this.safe(()=>this.hooks?.onRequest?.(E)),this.safe(()=>this.hooks?.trace?.("request",E));let R=Date.now();try{let h=await m(e,{signal:c,headers:d});if(this.safe(()=>this.hooks?.onResponse?.(E,{status:h.status,durationMs:Date.now()-R})),this.safe(()=>this.hooks?.trace?.("response",E)),!h.ok)throw new f(h.status,h.statusText,e,n);switch(o){case"json":try{return await h.json()}catch(y){throw new p({code:"PARSE_ERROR",message:`Failed to parse JSON response from ${e}`,provider:n,url:e,cause:y})}case"arraybuffer":return await h.arrayBuffer();default:return await h.text()}}catch(h){throw(s.signal?.aborted&&s.signal.reason!==B||this.clientSignal?.aborted&&this.clientSignal.reason!==B)&&Dt(h)?new L("Request aborted by external signal",n,e):h}finally{clearTimeout(u),l()}}async get(e,r={}){let n=oe(e,r.provider),o=this.getProviderState(n);if(o.circuitBreaker&&!o.circuitBreaker.canRequest())throw new g("Circuit breaker is OPEN, request rejected");let s={fetchImpl:r.fetchImpl,signal:r.signal},a=this.fallbackManager.getCandidateUrls(e,n),i;for(let u=0;u<a.length;u++){let c=a[u],l=u===0?o.policy.retry:{...o.policy.retry,maxRetries:0};try{let m=await this.executeWithRetry(d=>this.performRequest(c,o,n,r.responseType,s,d),l,{provider:n,url:c,timeout:o.policy.timeout,responseType:r.responseType});return o.circuitBreaker?.recordSuccess(),this.fallbackManager.recordSuccess(c),m}catch(m){let d=S(m,{provider:n,url:c,timeout:o.policy.timeout});if(i=d,this.fallbackManager.recordFailure(c,d),u<a.length-1&&this.fallbackManager.shouldFallback(d)){this.safe(()=>this.hooks?.trace?.("fallback",{provider:n,url:c,timeout:o.policy.timeout,attempt:0,responseType:r.responseType}));continue}throw o.circuitBreaker?.recordFailure(),this.toSdkError(d)}}throw o.circuitBreaker?.recordFailure(),i?this.toSdkError(i):new g("Request failed without a concrete error")}async getTencentQuote(e){let r=`${this.baseUrl}/?q=${encodeURIComponent(e)}`,n=await this.get(r,{responseType:"arraybuffer",provider:"tencent"}),o=A(n);return k(o)}};export{A as a,k as b,se as c,ie as d,W as e,ae as f,De as g,He as h,qe as i,Be as j,Ke as k,jt as l,Ge as m,We as n,Xe as o,$e as p,ze as q,Ze as r,Je as s,je as t,Ye as u,Ve as v,Qe as w,et as x,tt as y,rt as z,nt as A,ot as B,st as C,it as D,at as E,ct as F,ut as G,lt as H,pt as I,dt as J,mt as K,ht as L,ft as M,Et as N,Tt as O,_t as P,gt as Q,Rt as R,yt as S,St as T,Ot as U,Ct as V,xt as W,Lt as X,At as Y,kt as Z,Pt as _,bt as $,G as aa,P as ba,pe as ca,de as da,me as ea,he as fa,fe as ga,Ee as ha,Te as ia,$ as ja,Se as ka,b as la,xe as ma,Le as na,N as oa,Ue as pa,Y as qa,we as ra,ve as sa,Fe as ta};
|