@opencompass-fe/oc-webkit-eval 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
import f from"../../assets/svg/footer/zhihu.svg.js";import v from"../../assets/svg/footer/github.svg.js";import d from"../../assets/svg/footer/twitter.svg.js";import C from"../../assets/svg/footer/wechat.svg.js";import{Popover as h}from"antd";import s from"./footer.module.less.js";import e,{useContext as
|
|
1
|
+
import f from"../../assets/svg/footer/zhihu.svg.js";import v from"../../assets/svg/footer/github.svg.js";import d from"../../assets/svg/footer/twitter.svg.js";import C from"../../assets/svg/footer/wechat.svg.js";import{Popover as h}from"antd";import s from"./footer.module.less.js";import e,{useContext as l,useEffect as k,useMemo as E}from"react";import{OcContext as N}from"../../providers/OcContext.js";import{OcConfigContext as w}from"../../providers/OcConfigContext.js";import j from"../header/hooks/useUrl.js";import x from"classnames";import O from"../../assets/svg/blueNewLogo.svg.js";import L from"../../assets/svg/blueNewLogoEn.svg.js";const y=o=>{const{setConfig:r,config:c}=l(w),{locales:n}=l(N),{locale:m}=c;k(()=>{r(o)},[o]);const{urls:i}=j(),a=(t,u)=>{u?window.open(t):window.location.href=t},g=[{img:f,link:"https://www.zhihu.com/people/jue-qi-36-21",outlink:!0},{img:v,link:"https://github.com/open-compass",outlink:!0},{img:d,link:"https://x.com/OpenCompassX",outlink:!0}],p=E(()=>m==="en-US"?L:O,[m]);return e.createElement("div",{className:x(s.footer,o.isSticky&&s.stickyFooter,o.customClassname)},e.createElement("img",{className:s.left,src:p,alt:""}),e.createElement("div",{className:s.center},e.createElement("span",null,"\xA9 2023-2025 OpenCompass All Rights Reserved"),e.createElement("div",{className:s.columnLine}),e.createElement("span",{className:s.icp,onClick:()=>{window.open("https://beian.miit.gov.cn/#/Integrated/index")}},"\u6CAAICP\u59072021009351\u53F7-23"),e.createElement("div",{className:s.columnLine}),e.createElement("span",{className:s.link,onClick:()=>a(`${i==null?void 0:i.VITE_COMPASS_URL}old-policy`)},n==null?void 0:n.agreement)),e.createElement("div",{className:s.right},g.map(t=>e.createElement("div",{key:t.link,onClick:()=>a(t.link,t.outlink),className:s.logo},e.createElement("img",{src:t.img,alt:""}))),e.createElement(h,{content:e.createElement("img",{src:"https://opencompass.oss-cn-shanghai.aliyuncs.com/image/qrcode_compass.png",className:s.qrCode,alt:"qrCode"})},e.createElement("div",{className:s.logo},e.createElement("img",{src:C,alt:""})))))};export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import n,{useContext as S,useState as L,useRef as
|
|
1
|
+
import n,{useContext as S,useState as L,useRef as j,useEffect as R,useMemo as I}from"react";import B from"../../extraComponents/button/button.js";import{goCommon as D,goHub as W,goRank as V,goRules as x,goKit as H,goData as M,goOCHome as O,clickArena as z,goAnnualBenchmark as P,clickContributeBenchmarks as K}from"../../google-log/home.js";import t from"./header.module.less.js";import F from"./components/create-online-evaluation/component/evaluation-button/evaluation-button.js";import"./components/create-online-evaluation/component/create-evaluation/create-evaluation.js";import"antd";import"./components/create-online-evaluation/component/pre-create-evaluation/index.module.less.js";import{OcContext as Y}from"../../providers/OcContext.js";import G from"./hooks/useUrl.js";import{OcConfigContext as Z}from"../../providers/OcConfigContext.js";import s from"classnames";import"./firstHeader.module.less.js";import q from"../../assets/svg/newLogo.svg.js";import J from"../../assets/svg/newLogoEn.svg.js";import Q from"../../extraComponents/icon-font/index.js";import X from"../../assets/svg/blueNewLogo.svg.js";import ee from"../../assets/svg/blueNewLogoEn.svg.js";import{useLocation as te}from"react-router-dom";import"@ant-design/icons";import{webTypeEnum as m}from"../../constants/enums.js";import"../../mobile/components/top-nav/top-nav.module.less.js";import"../top-nav/shared.js";import"../top-nav/top-nav.module.less.js";import"react-device-detect";import"../side-nav/side-nav.module.less.js";import"../footer/footer.module.less.js";import"../dropdown/dropdown.module.less.js";import{useSize as oe}from"ahooks";import"../footer-expansion/footer-expansion.module.less.js";import"../md-render/index.js";import"../../helper/index.js";import"./components/create-online-evaluation/component/sidebar/sidebar.module.less.js";import ne from"../../assets/svg/left-wing.svg.js";import ae from"../../assets/svg/right-wing.svg.js";import le from"../../assets/svg/arrow.svg.js";var f;(function(r){r.llm="large-model",r.aiComputingSystem="computing-system",r.embodiedIntelligence="embodied-intelligence",r.industryVerticals="ecosystem/finance",r.safety="safety",r.safetyRank="safety-rank",r.rankDetail="safety/rank",r.evaluationPlan="evaluation-plan"})(f||(f={}));const U="YearEvaluationNotion",se=r=>{const{webType:i,navMenuList:h,isLLM:v,isTop:g,isScrollDown:c}=r,{locales:l}=S(Y),{config:w}=S(Z),[u,p]=L(!1),[N,E]=L(!1),{urls:e}=G(),{pathname:C}=te(),{locale:a}=w,_=j(),d=oe(_);R(()=>{if(a==="zh-CN"){p(!1);return}c?(d==null?void 0:d.width)<1665?p(!0):p(!1):(d==null?void 0:d.width)<1464?p(!0):p(!1)},[d==null?void 0:d.width,c,a]);const k=I(()=>Array.isArray(h)&&h.length>0?h:[{title:{zh:"\u9879\u76EE\u4ECB\u7ECD",en:"Introduction"},key:"largeModel",href:`${e==null?void 0:e.VITE_COMPASS_URL}${f.llm}`,onClick:D,isActive:C.startsWith(f.llm)},{title:{zh:"\u8BC4\u6D4B\u96C6\u793E\u533A",en:"CompassHub"},key:"CompassHub",href:e==null?void 0:e.VITE_HUB_URL,onClick:W,isActive:location.href.startsWith(e==null?void 0:e.VITE_HUB_URL)},{title:{zh:"\u8BC4\u6D4B\u699C\u5355",en:"CompassRank"},key:"CompassRank",href:`${e==null?void 0:e.VITE_RANK_URL}/old-home`,onClick:V,isActive:location.href.startsWith(e==null?void 0:e.VITE_RANK_URL)||location.href.startsWith(e==null?void 0:e.VITE_SPECIAL_LIST_URL)},{title:{zh:"\u699C\u5355\u89C4\u5219",en:"Rules"},key:"Rules",href:`${e==null?void 0:e.VITE_COMPASS_URL}old-rule`,onClick:x,isActive:location.href.startsWith(`${e==null?void 0:e.VITE_COMPASS_URL}old-rule`)},{title:{zh:"\u8BC4\u6D4B\u5DE5\u5177",en:"CompassKit"},key:"CompassKit",isExternal:!0,href:{zh:"https://github.com/open-compass/",en:"https://github.com/open-compass/"},onClick:H,isActive:!1},{title:{zh:"\u4F7F\u7528\u6307\u5357",en:"Docs"},key:"Docs",isExternal:!0,href:{zh:`${e==null?void 0:e.VITE_DOC_URL_ZH}`,en:`${e==null?void 0:e.VITE_DOC_URL}`},isActive:location.href.startsWith(e==null?void 0:e.VITE_DOC_URL)},{title:{zh:"\u6D66\u6C5F\u79D1\u5B66\u8BC4\u6D4B\u5171\u521B\u8BA1\u5212",en:"AI4S Program"},key:"collaboration",href:`${e==null?void 0:e.VITE_DATA_URL}/old-home`,onClick:M,isActive:location.href.startsWith(`${e==null?void 0:e.VITE_DATA_URL}`)}],[e,C,h,location.href]),A=I(()=>i===m.blueWeb||i===m.miniWeb||i===m.transparentWeb?a==="en-US"?J:q:a==="en-US"?ee:X,[i,a]),T=o=>{window.open(o)};return R(()=>{!v||!localStorage.getItem(`${U}`)&&location.href.startsWith(e==null?void 0:e.VITE_HUB_URL)&&(E(!1),localStorage.setItem(`${U}`,"1"))},[v,e]),n.createElement("header",{className:s(t.header,a==="en-US"&&c&&t.enHeader,t.secondMenu,a!=="en-US"&&c&&t.zhHeader,i!==m.lightWeb&&c&&t.topSecondMenu,i===m.lightWeb&&c&&t.topSecondMenuHub,i===m.lightWeb&&t.lightSecondMenu,i===m.transparentWeb&&!g&&!c&&t.blueBackSecondHeaderBox,i===m.lightWeb&&!g&&!c&&t.lightBackSecondMenu),ref:_},n.createElement("div",{className:t.headerLeft},c&&n.createElement("a",{className:t.logo,href:`${e==null?void 0:e.VITE_COMPASS_URL}old-home?lang=${a}`,onClick:o=>{o.preventDefault(),O(a,"header",`${e==null?void 0:e.VITE_COMPASS_URL}old-home`)}},n.createElement("img",{src:A,alt:"logo"})),n.createElement("div",{className:t.menus},k==null?void 0:k.map(o=>n.createElement("a",{key:o.key,className:s(t.menuItem,o.isActive&&t.activeMenuItem),style:{fontWeight:o.href===window.location.origin?600:400},target:o.isExternal?"_blank":"_self",href:`${o.href}${o.isExternal?"":`?lang=${a}`}`,rel:"noreferrer",onClick:$=>{var b,y;$.preventDefault(),o.isExternal?T(a==="zh-CN"?`${(b=o.href)==null?void 0:b.zh}`:`${(y=o.href)==null?void 0:y.en}`):o.onClick&&o.onClick(a,o.key,o.href)}},(o==null?void 0:o.customNode)&&(o==null?void 0:o.customNode),o.title[a==null?void 0:a.split("-")[0]],o.isExternal&&n.createElement(Q,{type:"icon-GotoOutline",style:{marginLeft:4,fontSize:"16px"}}))),v&&n.createElement(n.Fragment,null,n.createElement("a",{className:s(t.menuItem,location.href.startsWith((e==null?void 0:e.VITE_COMPASS_URL)+"arena")&&t.activeMenuItem),href:`${e==null?void 0:e.VITE_COMPASS_URL}arena?lang=${a}`,target:"_blank",rel:"noreferrer",onClick:o=>{o.preventDefault(),z(a,{key:"llm"},e==null?void 0:e.VITE_COMPASS_URL)}},n.createElement("div",{className:t.arenaWords},l==null?void 0:l.arena))),v&&n.createElement("div",{onClick:()=>{P(a,"CompassHub",`${e==null?void 0:e.VITE_HUB_URL}/2025-annual-benchmark`)},className:s(t.yearEvaluation,u&&t.wrapYearEvaluation)},n.createElement("div",{className:t.innerBtn},n.createElement("img",{src:ne,className:s(u?t.wrapLeftWing:t.leftWing,t.wing)}),n.createElement("img",{src:ae,className:s(u?t.wrapRightWing:t.rightWing,t.wing)})),n.createElement("div",{className:s(u&&t.wrapStyle,t.innerYearEvaluation)},l==null?void 0:l.yearEvaluation),N&&n.createElement(n.Fragment,null,n.createElement("img",{src:le,className:s(u&&t.wrapArrow,t.arrow)}),n.createElement("div",{className:s(u&&t.wrapModalContainer,t.modalContainer)},n.createElement("span",{className:t.title},l==null?void 0:l.yearEvaluationTitle),n.createElement("div",{className:t.body},l==null?void 0:l.yearEvaluationDesc),n.createElement("div",{className:t.footer},n.createElement(B,{className:t.knownButton,type:"primary",onClick:o=>{o.stopPropagation(),E(!1)}},l==null?void 0:l.yearEvaluationKnown))))))),v&&n.createElement("div",{className:t.headerRight},n.createElement("a",{href:`${e==null?void 0:e.VITE_HUB_URL}/dataset-submit?lang=${a}`,className:s(t.addDatasetBtn,t.contributeBtn,u&&t.wrapBtn),onClick:o=>{o.preventDefault(),K(a,e==null?void 0:e.VITE_HUB_URL)}},l==null?void 0:l.contributeBenchmarks),n.createElement(F,null,n.createElement("div",{className:s(u&&t.wrapBtn,t.addDatasetBtn)},l==null?void 0:l.onlineEvaluation))))};export{f as BigCompassModuleEnum,se as default};
|
package/dist/google-log/home.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=(o,n,e)=>{window.gtag("event","go_OC",{event_source:n}),window.location.href=`${e}?lang=${o}`},c=(o,n,e)=>{window.gtag("go_rank",{event_source:n});const a=e.replace(/\/$/,"").replace(/\/old-home$/,"");window.location.href=`${a}/old-home?lang=${o}`},
|
|
1
|
+
const t=(o,n,e)=>{window.gtag("event","go_OC",{event_source:n}),window.location.href=`${e}?lang=${o}`},c=(o,n,e)=>{window.gtag("go_rank",{event_source:n});const a=e.replace(/\/$/,"").replace(/\/old-home$/,"");window.location.href=`${a}/old-home?lang=${o}`},l=(o,n,e)=>{window.gtag("go_hub",{event_source:n}),window.location.href=`${e}?lang=${o}`},r=(o,n,e)=>{window.gtag("go_hub",{event_source:n}),window.location.href=`${e}?lang=${o}`},g=(o,n,e)=>{window.gtag("go_kit",{event_source:n}),window.open(`${e}?lang=${o}`)},i=(o,n)=>{window.gtag("contribute_benchmarks",{event_source:"header"}),window.location.href=`${n}/dataset-submit?lang=${o}`},w=(o,n,e)=>{window.gtag("go_rules",{event_source:n});const a=e.replace(/\/$/,"").replace(/\/old-rule$/,"");window.location.href=`${a}/old-rule?lang=${o}`},s=(o,n,e)=>{window.gtag("click_arena",{event_source:"rank-header"}),n==="mm"?window.open(`${e}arena/multimodal?lang=${o}`):window.open(`${e}arena?lang=${o}`)},d=(o,n,e)=>{window.gtag("go_collaboration",{event_source:"collaboration"});const a=e.replace(/\/$/,"").replace(/\/old-home$/,"");window.location.href=`${a}/old-home?lang=${o}`},$=(o,n,e)=>{window.gtag("go_collaboration",{event_source:n}),window.location.href=`${e}?lang=${o}`},u=(o,n,e)=>{window.gtag("goInternDiscoveryEvalKit",{event_source:n}),window.open(`${e}?lang=${o}`)};export{s as clickArena,i as clickContributeBenchmarks,r as goAnnualBenchmark,$ as goCommon,d as goData,l as goHub,u as goInternDiscoveryEvalKit,g as goKit,t as goOCHome,c as goRank,w as goRules};
|