PageSourceSearch

https://langchao.org/_next/static/chunks/837-0c53e2ebea3544e3.js

js langchao.org collected 2026-10-09 17:41:25 UTC 11,886 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[837],{58837:function(e,t,n){var o=n(64836).default,i=n(75263).default;t.Z=void 0;var a=i(n(67294)),l=o(n(93967)),r=o(n(66940)),u=o(n(2105)),c=n(7177),d=o(n(65693)),s=o(n(73691)),__rest=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)0>t.indexOf(o[i])&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n};let m=a.forwardRef((e,t)=>{let n=(0,u.default)(),{prefixCls:o,className:i,rootClassName:m,block:f,options:h=[],size:g="middle",style:b,vertical:v,shape:p="default",name:S=n}=e,y=__rest(e,["prefixCls","className","rootClassName","block","options","size","style","vertical","shape","name"]),{getPrefixCls:$,direction:w,className:k,style:C}=(0,c.useComponentConfig)("segmented"),O=$("segmented",o),[x,M,E]=(0,s.default)(O),P=(0,d.default)(g),Z=a.useMemo(()=>h.map(e=>{if("object"==typeof e&&(null==e?void 0:e.icon)){let{icon:t,label:n}=e,o=__rest(e,["icon","label"]);return Object.assign(Object.assign({},o),{label:a.createElement(a.Fragment,null,a.createElement("span",{className:`${O}-item-icon`},t),n&&a.createElement("span",null,n))})}return e}),[h,O]),j=(0,l.default)(i,m,k,{[`${O}-block`]:f,[`${O}-sm`]:"small"===P,[`${O}-lg`]:"large"===P,[`${O}-vertical`]:v,[`${O}-shape-${p}`]:"round"===p},M,E),H=Object.assign(Object.assign({},C),b);return x(a.createElement(r.default,Object.assign({},y,{name:S,className:j,style:H,options:Z,ref:t,prefixCls:O,direction:w,vertical:v})))});t.Z=m},73691:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.prepareComponentToken=t.default=void 0;var o=n(13880),i=n(98078),a=n(3184);function getItemDisabledStyle(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function getItemSelectedStyle(e){return{background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}}let l=Object.assign({overflow:"hidden"},i.textEllipsis),genSegmentedStyle=e=>{let{componentCls:t}=e,n=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),a=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),r=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,i.resetComponent)(e)),{display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`}),(0,i.genFocusStyle)(e)),{[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${(0,o.unit)(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":Object.assign(Object.assign({},getItemSelectedStyle(e)),{color:e.itemSelectedColor}),"&-focused":(0,i.genFocusOutline)(e),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,transition:`opacity ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,pointerEvents:"none"},[`&:not(${t}-item-selected):not(${t}-item-disabled)`]:{"&:hover, &:active":{color:e.itemHoverColor},"&:hover::after":{opacity:1,backgroundColor:e.itemHoverBg},"&:active::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":Object.assign({minHeight:n,lineHeight:(0,o.unit)(n),padding:`0 ${(0,o.unit)(e.segmentedPaddingHorizontal)}`},l),"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:Object.assign(Object.assign({},getItemSelectedStyle(e)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${(0,o.unit)(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:a,lineHeight:(0,o.unit)(a),padding:`0 ${(0,o.unit)(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:r,lineHeight:(0,o.unit)(r),padding:`0 ${(0,o.unit)(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),getItemDisabledStyle(`&-disabled ${t}-item`,e)),getItemDisabledStyle(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}})}},prepareComponentToken=e=>{let{colorTextLabel:t,colorText:n,colorFillSecondary:o,colorBgElevated:i,colorFill:a,lineWidthBold:l,colorBgLayout:r}=e;return{trackPadding:l,trackBg:r,itemColor:t,itemHoverColor:n,itemHoverBg:o,itemSelectedBg:i,itemActiveBg:a,itemSelectedColor:n}};t.prepareComponentToken=prepareComponentToken,t.default=(0,a.genStyleHooks)("Segmented",e=>{let{lineWidth:t,calc:n}=e,o=(0,a.mergeToken)(e,{segmentedPaddingHorizontal:n(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:n(e.controlPaddingHorizontalSM).sub(t).equal()});return genSegmentedStyle(o)},prepareComponentToken)},66940:function(e,t,n){n.r(t),n.d(t,{default:function(){return p}});var o=n(87462),i=n(97685),a=n(91),l=n(4942),r=n(1413),u=n(71002),c=n(93967),d=n.n(c),s=n(21770),m=n(98423),f=n(42550),h=n(67294),g=n(29372),b=n(8410),calcThumbStyle=function(e,t){if(!e)return null;var n={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return t?{left:0,right:0,width:0,top:n.top,bottom:n.bottom,height:n.height}:{left:n.left,right:n.right,width:n.width,top:0,bottom:0,height:0}},toPX=function(e){return void 0!==e?"".concat(e,"px"):void 0};function MotionThumb(e){var t=e.prefixCls,n=e.containerRef,o=e.value,a=e.getValueIndex,l=e.motionName,u=e.onMotionStart,c=e.onMotionEnd,s=e.direction,m=e.vertical,v=void 0!==m&&m,p=h.useRef(null),S=h.useState(o),y=(0,i.Z)(S,2),$=y[0],w=y[1],findValueElement=function(e){var o,i=a(e),l=null===(o=n.current)||void 0===o?void 0:o.querySelectorAll(".".concat(t,"-item"))[i];return(null==l?void 0:l.offsetParent)&&l},k=h.useState(null),C=(0,i.Z)(k,2),O=C[0],x=C[1],M=h.useState(null),E=(0,i.Z)(M,2),P=E[0],Z=E[1];(0,b.Z)(function(){if($!==o){var e=findValueElement($),t=findValueElement(o),n=calcThumbStyle(e,v),i=calcThumbStyle(t,v);w(o),x(n),Z(i),e&&t?u():c()}},[o]);var j=h.useMemo(function(){if(v){var e;return toPX(null!==(e=null==O?void 0:O.top)&&void 0!==e?e:0)}return"rtl"===s?toPX(-(null==O?void 0:O.right)):toPX(null==O?void 0:O.left)},[v,s,O]),H=h.useMemo(function(){if(v){var e;return toPX(null!==(e=null==P?void 0:P.top)&&void 0!==e?e:0)}return"rtl"===s?toPX(-(null==P?void 0:P.right)):toPX(null==P?void 0:P.left)},[v,s,P]);return O&&P?h.createElement(g.default,{visible:!0,motionName:l,motionAppear:!0,onAppearStart:function(){return v?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"}},onAppearActive:function(){return v?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"}},onVisibleChanged:function(){x(null),Z(null),c()}},function(e,n){var o=e.className,i=e.style,a=(0,r.Z)((0,r.Z)({},i),{},{"--thumb-start-left":j,"--thumb-start-width":toPX(null==O?void 0:O.width),"--thumb-active-left":H,"--thumb-active-width":toPX(null==P?void 0:P.width),"--thumb-start-top":j,"--thumb-start-height":toPX(null==O?void 0:O.height),"--thumb-active-top":H,"--thumb-active-height":toPX(null==P?void 0:P.height)}),l={ref:(0,f.sQ)(p,n),style:a,className:d()("".concat(t,"-thumb"),o)};return h.createElement("div",l)}):null}var v=["prefixCls","direction","vertical","options","disabled","defaultValue","value","name","onChange","className","motionName"],InternalSegmentedOption=function(e){var t=e.prefixCls,n=e.className,o=e.disabled,i=e.checked,a=e.label,r=e.title,u=e.value,c=e.name,s=e.onCh
1ange,m=e.onFocus,f=e.onBlur,g=e.onKeyDown,b=e.onKeyUp,v=e.onMouseDown;return h.createElement("label",{className:d()(n,(0,l.Z)({},"".concat(t,"-item-disabled"),o)),onMouseDown:v},h.createElement("input",{name:c,className:"".concat(t,"-item-input"),type:"radio",disabled:o,checked:i,onChange:function(e){o||s(e,u)},onFocus:m,onBlur:f,onKeyDown:g,onKeyUp:b}),h.createElement("div",{className:"".concat(t,"-item-label"),title:r},a))},p=h.forwardRef(function(e,t){var n,c=e.prefixCls,g=void 0===c?"rc-segmented":c,b=e.direction,p=e.vertical,S=e.options,y=void 0===S?[]:S,$=e.disabled,w=e.defaultValue,k=e.value,C=e.name,O=e.onChange,x=e.className,M=void 0===x?"":x,E=e.motionName,P=void 0===E?"thumb-motion":E,Z=(0,a.Z)(e,v),j=h.useRef(null),H=h.useMemo(function(){return(0,f.sQ)(j,t)},[j,t]),N=h.useMemo(function(){return y.map(function(e){if("object"===(0,u.Z)(e)&&null!==e){var t=function(e){if(void 0!==e.title)return e.title;if("object"!==(0,u.Z)(e.label)){var t;return null===(t=e.label)||void 0===t?void 0:t.toString()}}(e);return(0,r.Z)((0,r.Z)({},e),{},{title:t})}return{label:null==e?void 0:e.toString(),title:null==e?void 0:e.toString(),value:e}})},[y]),R=(0,s.Z)(null===(n=N[0])||void 0===n?void 0:n.value,{value:k,defaultValue:w}),D=(0,i.Z)(R,2),I=D[0],X=D[1],T=h.useState(!1),B=(0,i.Z)(T,2),z=B[0],A=B[1],handleChange=function(e,t){X(t),null==O||O(t)},_=(0,m.Z)(Z,["children"]),K=h.useState(!1),V=(0,i.Z)(K,2),F=V[0],q=V[1],L=h.useState(!1),U=(0,i.Z)(L,2),W=U[0],G=U[1],handleFocus=function(){G(!0)},handleBlur=function(){G(!1)},handleMouseDown=function(){q(!1)},handleKeyUp=function(e){"Tab"===e.key&&q(!0)},onOffset=function(e){var t=N.findIndex(function(e){return e.value===I}),n=N.length,o=N[(t+e+n)%n];o&&(X(o.value),null==O||O(o.value))},handleKeyDown=function(e){switch(e.key){case"ArrowLeft":case"ArrowUp":onOffset(-1);break;case"ArrowRight":case"ArrowDown":onOffset(1)}};return h.createElement("div",(0,o.Z)({role:"radiogroup","aria-label":"segmented control",tabIndex:$?void 0:0,"aria-orientation":p?"vertical":"horizontal"},_,{className:d()(g,(0,l.Z)((0,l.Z)((0,l.Z)({},"".concat(g,"-rtl"),"rtl"===b),"".concat(g,"-disabled"),$),"".concat(g,"-vertical"),p),M),ref:H}),h.createElement("div",{className:"".concat(g,"-group")},h.createElement(MotionThumb,{vertical:p,prefixCls:g,value:I,containerRef:j,motionName:"".concat(g,"-").concat(P),direction:b,getValueIndex:function(e){return N.findIndex(function(t){return t.value===e})},onMotionStart:function(){A(!0)},onMotionEnd:function(){A(!1)}}),N.map(function(e){return h.createElement(InternalSegmentedOption,(0,o.Z)({},e,{name:C,key:e.value,prefixCls:g,className:d()(e.className,"".concat(g,"-item"),(0,l.Z)((0,l.Z)({},"".concat(g,"-item-selected"),e.value===I&&!z),"".concat(g,"-item-focused"),W&&F&&e.value===I)),checked:e.value===I,onChange:handleChange,onFocus:handleFocus,onBlur:handleBlur,onKeyDown:handleKeyDown,onKeyUp:handleKeyUp,onMouseDown:handleMouseDown,disabled:!!$||!!e.disabled}))})))})}}]);

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