addseed-web/out/_next/static/chunks/509-36bf167139dd39ae.js

1 line
20 KiB
JavaScript
Raw Normal View History

2024-10-17 15:52:06 +08:00
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[509],{6509:function(e,t,n){n.d(t,{default:function(){return o.a}});var r=n(6196),o=n.n(r)},712:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return r}}),n(2168);let r=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6650:function(e,t,n){function r(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return r}}),n(2168),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6196:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return P}});let r=n(8806),o=n(881),i=r._(n(4149)),a=n(8301),u=n(2570),l=n(8120),s=n(3331),c=n(712),f=n(4072),d=n(1223),p=n(5232),h=n(6650),m=n(1221),g=n(9024),y=new Set;function b(e,t,n,r,o,i){if("undefined"!=typeof window&&(i||(0,u.isLocalURL)(t))){if(!r.bypassPrefetchedCheck){let o=t+"%"+n+"%"+(void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0);if(y.has(o))return;y.add(o)}(async()=>i?e.prefetch(t,o):e.prefetch(t,n,r))().catch(e=>{})}}function _(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let P=i.default.forwardRef(function(e,t){let n,r;let{href:l,as:y,children:P,prefetch:v=null,passHref:R,replace:O,shallow:j,scroll:E,locale:S,onClick:w,onMouseEnter:x,onTouchStart:M,legacyBehavior:N=!1,...C}=e;n=P,N&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let k=i.default.useContext(f.RouterContext),I=i.default.useContext(d.AppRouterContext),T=null!=k?k:I,L=!k,U=!1!==v,A=null===v?g.PrefetchKind.AUTO:g.PrefetchKind.FULL,{href:W,as:D}=i.default.useMemo(()=>{if(!k){let e=_(l);return{href:e,as:y?_(y):e}}let[e,t]=(0,a.resolveHref)(k,l,!0);return{href:e,as:y?(0,a.resolveHref)(k,y):t||e}},[k,l,y]),z=i.default.useRef(W),K=i.default.useRef(D);N&&(r=i.default.Children.only(n));let q=N?r&&"object"==typeof r&&r.ref:t,[F,$,B]=(0,p.useIntersection)({rootMargin:"200px"}),Y=i.default.useCallback(e=>{(K.current!==D||z.current!==W)&&(B(),K.current=D,z.current=W),F(e),q&&("function"==typeof q?q(e):"object"==typeof q&&(q.current=e))},[D,q,W,B,F]);i.default.useEffect(()=>{T&&$&&U&&b(T,W,D,{locale:S},{kind:A},L)},[D,W,$,S,U,null==k?void 0:k.locale,T,L,A]);let Q={ref:Y,onClick(e){N||"function"!=typeof w||w(e),N&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),T&&!e.defaultPrevented&&function(e,t,n,r,o,a,l,s,c){let{nodeName:f}=e.currentTarget;if("A"===f.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,u.isLocalURL)(n)))return;e.preventDefault();let d=()=>{let e=null==l||l;"beforePopState"in t?t[o?"replace":"push"](n,r,{shallow:a,locale:s,scroll:e}):t[o?"replace":"push"](r||n,{scroll:e})};c?i.default.startTransition(d):d()}(e,T,W,D,O,j,E,S,L)},onMouseEnter(e){N||"function"!=typeof x||x(e),N&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),T&&(U||!L)&&b(T,W,D,{locale:S,priority:!0,bypassPrefetchedCheck:!0},{kind:A},L)},onTouchStart:function(e){N||"function"!=typeof M||M(e),N&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),T&&(U||!L)&&b(T,W,D,{locale:S,priority:!0,bypassPrefetchedCheck:!0},{kind:A},L)}};if((0,s.isAbsoluteUrl)(D))Q.href=D;else if(!N||R||"a"===r.type&&!("href"in r.props)){let e=void 0!==S?S:null==k?void 0:k.locale,t=(null==k?void 0:k.isLocaleDomain)&&(0,h.getDomainLocale)(D,e,null==k?void 0:k.locales,null==k?void 0:k.domainLocales);Q.href=