PageSourceSearch

https://duomai.com/_next/static/chunks/5756-d451821e0954ae37.js

js duomai.com collected 2026-10-01 11:58:45 UTC 10,348 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5756],{66337:function(){!function(){"use strict";if("object"==typeof window){if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype){"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});return}var t=function(t){for(var e=t,n=r(e);n;)n=r(e=n.ownerDocument);return e}(window.document),e=[],n=null,o=null;s.prototype.THROTTLE_TIMEOUT=100,s.prototype.POLL_INTERVAL=null,s.prototype.USE_MUTATION_OBSERVER=!0,s._setupCrossOriginUpdater=function(){return n||(n=function(t,n){o=t&&n?f(t,n):a(),e.forEach(function(t){t._checkForIntersections()})}),n},s._resetCrossOriginUpdater=function(){n=null,o=null},s.prototype.observe=function(t){if(!this._observationTargets.some(function(e){return e.element==t})){if(!(t&&1==t.nodeType))throw Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},s.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},s.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},s.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},s.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter(function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]})},s.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map(function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},s.prototype._monitorIntersections=function(e){var n=e.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(e)){var o=this._checkForIntersections,i=null,s=null;if(this.POLL_INTERVAL?i=n.setInterval(o,this.POLL_INTERVAL):(u(n,"resize",o,!0),u(e,"scroll",o,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(s=new n.MutationObserver(o)).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push(function(){var t=e.defaultView;t&&(i&&t.clearInterval(i),c(t,"resize",o,!0)),c(e,"scroll",o,!0),s&&s.disconnect()}),e!=(this.root&&(this.root.ownerDocument||this.root)||t)){var h=r(e);h&&this._monitorIntersections(h.ownerDocument)}}},s.prototype._unmonitorIntersections=function(e){var n=this._monitoringDocuments.indexOf(e);if(-1!=n){var o=this.root&&(this.root.ownerDocument||this.root)||t;if(!this._observationTargets.some(function(t){var n=t.element.ownerDocument;if(n==e)return!0;for(;n&&n!=o;){var i=r(n);if((n=i&&i.ownerDocument)==e)return!0}return!1})){var i=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),i(),e!=o){var s=r(e);s&&this._unmonitorIntersections(s.ownerDocument)}}}},s.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e<t.length;e++)t[e]()},s.prototype._checkForIntersections=function(){if(this.root||!n||o){var t=this._rootIsInDom(),e=t?this._getRootRect():a();this._observationTargets.forEach(function(o){var r=o.element,s=h(r),u=this._rootContainsTarget(r),c=o.entry,l=t&&u&&this._computeTargetAndRootIntersection(r,s,e),f=null;this._rootContainsTarget(r)?(!n||this.root)&&(f=e):f=a();var p=o.entry=new i({time:window.performance&&performance.now&&performance.now(),target:r,boundingClientRect:s,rootBounds:f,intersectionRect:l});c?t&&u?this._hasCrossedThreshold(c,p)&&this._queuedEntries.push(p):c&&c.isIntersecting&&this._queuedEntries.push(p):this._queuedEntries.push(p)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},s.prototype._computeTargetAndRootIntersection=function(e,r,i){if("none"!=window.getComputedStyle(e).display){for(var s=r,u=d(e),c=!1;!c&&u;){var a=null,l=1==u.nodeType?window.getComputedStyle(u):{};if("none"==l.display)return null;if(u==this.root||9==u.nodeType){if(c=!0,u==this.root||u==t)n&&!this.root?o&&(0!=o.width||0!=o.height)?a=o:(u=null,a=null,s=null):a=i;else{var p=d(u),g=p&&h(p),m=p&&this._computeTargetAndRootIntersection(p,g,i);g&&m?(u=p,a=f(g,m)):(u=null,s=null)}}else{var v=u.ownerDocument;u!=v.body&&u!=v.documentElement&&"visible"!=l.overflow&&(a=h(u))}
1if(a&&(s=function(t,e){var n=Math.max(t.top,e.top),o=Math.min(t.bottom,e.bottom),r=Math.max(t.left,e.left),i=Math.min(t.right,e.right),s=i-r,u=o-n;return s>=0&&u>=0&&{top:n,bottom:o,left:r,right:i,width:s,height:u}||null}(a,s)),!s)break;u=u&&d(u)}return s}},s.prototype._getRootRect=function(){var e;if(this.root&&!g(this.root))e=h(this.root);else{var n=g(this.root)?this.root:t,o=n.documentElement,r=n.body;e={top:0,left:0,right:o.clientWidth||r.clientWidth,width:o.clientWidth||r.clientWidth,bottom:o.clientHeight||r.clientHeight,height:o.clientHeight||r.clientHeight}}return this._expandRectByRootMargin(e)},s.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map(function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100}),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},s.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,o=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==o)for(var r=0;r<this.thresholds.length;r++){var i=this.thresholds[r];if(i==n||i==o||i<n!=i<o)return!0}},s.prototype._rootIsInDom=function(){return!this.root||p(t,this.root)},s.prototype._rootContainsTarget=function(e){var n=this.root&&(this.root.ownerDocument||this.root)||t;return p(n,e)&&(!this.root||n==e.ownerDocument)},s.prototype._registerInstance=function(){0>e.indexOf(this)&&e.push(this)},s.prototype._unregisterInstance=function(){var t=e.indexOf(this);-1!=t&&e.splice(t,1)},window.IntersectionObserver=s,window.IntersectionObserverEntry=i}function r(t){try{return t.defaultView&&t.defaultView.frameElement||null}catch(t){return null}}function i(t){this.time=t.time,this.target=t.target,this.rootBounds=l(t.rootBounds),this.boundingClientRect=l(t.boundingClientRect),this.intersectionRect=l(t.intersectionRect||a()),this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,n=e.width*e.height,o=this.intersectionRect,r=o.width*o.height;n?this.intersectionRatio=Number((r/n).toFixed(4)):this.intersectionRatio=this.isIntersecting?1:0}function s(t,e){var n,o,r,i=e||{};if("function"!=typeof t)throw Error("callback must be a function");if(i.root&&1!=i.root.nodeType&&9!=i.root.nodeType)throw Error("root must be a Document or Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),o=this.THROTTLE_TIMEOUT,r=null,function(){r||(r=setTimeout(function(){n(),r=null},o))}),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(i.rootMargin),this.thresholds=this._initThresholds(i.threshold),this.root=i.root||null,this.rootMargin=this._rootMarginValues.map(function(t){return t.value+t.unit}).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function u(t,e,n,o){"function"==typeof t.addEventListener?t.addEventListener(e,n,o||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function c(t,e,n,o){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,o||!1):"function"==typeof t.detachEvent&&t.detachEvent("on"+e,n)}function h(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):a()}function a(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function l(t){return!t||"x"in t?t:{top:t.top,y:t.top,bottom:t.bottom,left:t.left,x:t.left,right:t.right,width:t.width,height:t.height}}function f(t,e){var n=e.top-t.top,o=e.left-t.left;return{top:n,left:o,height:e.height,width:e.width,bottom:n+e.height,right:o+e.width}}function p(t,e){for(var n=e;n;){if(n==t)return!0;n=d(n)}return!1}function d(e){var n=e.parentNode;return 9==e.nodeType&&e!=t?r(e):(n&&n.assignedSlot&&(n=n.assignedSlot.parentNode),n&&11==n.nodeType&&n.host)?n.host:n}function g(t){return t&&9===t.nodeType}}()},5756:function(t,e,n){"use strict";var o=n(97582);n(66337);var r=n(67294),i=n(86250),s=n(35974);e.Z=function(t,e){var n=(0,o.CR)((0,r.useState)(),2),u=n[0],c=n[1],h=(0,o.CR)((0,r.useState)(),2),a=h[0],l=h[1];return(0,s.Z)(function(){var n=(0,i.n)(t);if(n){var r=new IntersectionObserver(function(t){var e,n;try{for(var r=(0,o.XA)(t),i=r.next();!i.done;i=r.next()){var s=i.value;l(s.intersectionRatio),c(s.isIntersecting)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},(0,o.pi)((0,o.pi)({},e),{root:(0,i.n)(null==e?void 0:e.root)}));return r.observe(n),function(){r.disconnect()}}},[null==e?void 0:e.rootMargin,null==e?void 0:e.threshold],t),[u,a]}},86250:function(t,e,n){"use strict";n.d(e,{n:function(){return i}});var o=n(8370),r=n(54466);function i(t,e){return r.Z?t?(0,o.mf)(t)?t():"current"in t?t.current:t:e:void 0}},35974:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var o,r=n(67294),i=n(46558),s=n(35456),u=n(86250),c=(o=r.useEffect,function(t,e,n){var c=(0,r.useRef)(!1),h=(0,r.useRef)([]),a=(0,r.useRef)([]),l=(0,r.useRef)();o(function(){var o,r=(Array.isArray(n)?n:[n]).map(function(t){return(0,u.n)(t)});if(!c.current){c.current=!0,h.current=r,a.current=e,l.current=t();return}
1r.length===h.current.length&&(0,s.Z)(r,h.current)&&(0,s.Z)(e,a.current)||(null===(o=l.current)||void 0===o||o.call(l),h.current=r,a.current=e,l.current=t())}),(0,i.Z)(function(){var t;null===(t=l.current)||void 0===t||t.call(l),c.current=!1})})}}]);

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.