PageSourceSearch

https://www.cm-pet.com/dist/js/frontend/chunk/6227.dec760982d586b7d.js

js cm-pet.com collected 2026-10-08 21:20:19 UTC 11,949 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwinshop=self.webpackChunkwinshop||[]).push([[6227],{206227:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o});r(667294);var n=r(971143),i=r(785893);const o=function(e){return(0,i.jsx)("div",{className:"col-12",children:(0,i.jsx)(n.Jr,{name:e.title,title:e.title,rule:["required"],value:e.value,message:"請勾選此核可方塊",children:(0,i.jsxs)("div",{className:"form-check",children:[(0,i.jsx)("input",{className:"form-check-input",type:"checkbox",value:e.value,id:"optometry__privacy",name:e.name,onChange:function(t){t.target.checked?e.onChange({target:{value:"是"}}):e.onChange({target:{value:""}})}}),(0,i.jsxs)("label",{className:"form-check-label",htmlFor:"optometry__privacy",children:["我已詳細閱讀 ",(0,i.jsx)("a",{href:"/privacy-policy",target:"_blank",children:"隱私權政策"})," 及 ",(0,i.jsx)("a",{href:"/privacy-policy",target:"_blank",children:"客戶權利義務條款"})," ,並同意接受以上內容。"]})]})})})}},971143:(e,t,r)=>{r.d(t,{Jr:()=>o.Z,ZU:()=>u,cX:()=>h});var n=r(667294),i=r(480484),o=r(550674),s=r(785893);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}const u=function(e){var t=(0,n.useContext)(i.Z),r=t.refs,o=t.result,u=function(){switch(!0){case!o:t=window.pageYOffset,n=collect(r).map(function(e){return"object"===a(e)&&void 0!==e.current&&null!==e.current?e.current.getBoundingClientRect().top:0}).values().sort().first(),i=0!==n?t+n-30:t,window.scrollTo({top:i,behavior:"smooth"});break;case e.disabled:break;case"function"==typeof e.sender:e.sender()}var t,n,i};return(0,s.jsx)("div",{onClick:function(){return u()},style:{display:"contents"},children:e.children})};function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function f(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:t+""}function p(e,t,r){return t=b(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,r||[],b(e).constructor):t.apply(e,r))}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(y=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var h=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=p(this,t,[e])).state={result:null},r.results={},r.refs={},r.register=r.register.bind(r),r.unRegister=r.unRegister.bind(r),r.statistic=r.statistic.bind(r),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(t,e),r=t,o=[{key:"register",value:function(e){var t=this.results;void 0===t[e]&&(t[e]=!1)}},{key:"unRegister",value:function(e){var t=this.results;void 0!==t[e]&&(delete t[e],this.statistic(e,!0))}},{key:"statistic",value:function(e,t,r){var n,i,o,s=this,a=this.results,u=null,c=collect(a);void 0!==a[e]&&(a[e]=t),t?delete this.refs[e]:this.refs=Object.assign({},this.refs,(n={},o=r,(i=f(i=e))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o,n)),u=!(c.count()>0)||c.reduce(function(e,t){return t||(e=!1),e},!0),u!==this.state.result&&this.setState({result:u},function(){"function"==typeof s.props.result&&s.props.result(s.state.result)})}},{key:"render",value:function(){return(0,s.jsx)(n.Fragment,{children:(0,s.jsx)(i.R,{value:{url:this.props.url,register:this.register,unRegister:this.unRegister,statistic:this.statistic,refs:this.refs,result:this.state.result},children:this.props.children})})}}],o&&l(r.prototype,o),a&&l(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,a}(n.Component)},550674:(e,t,r)=>{r.d(t,{Z:()=>v});
1var n=r(667294),i=r(483465),o=r.n(i),s=r(480484),a=r(785893);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t,r){return(t=y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,s,a=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function y(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:t+""}function b(e,t,r){return t=h(t),function(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var v=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=b(this,t,[e])).state={name:r.props.name||"",rule:r.props.rule||[],params:{},value:"",message:"",replacement:{},result:!1},r.checkRef=n.createRef(),r.valid=r.valid.bind(r),r.statistic=null,r.unRegister=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),r=t,(i=[{key:"message",value:function(){return void 0===this.props.message||Helper.isEmpty(this.props.message)?langf.get("validation.".concat(this.state.message),this.state.replacement):this.props.message}},{key:"contextSet",value:function(e,t){null===this.statistic&&(this.statistic=e),null===this.unRegister&&(this.unRegister=t)}},{key:"regexTest",value:function(e,t){var r=e.replace(/^regex:\/(.*)\/([gmixXsuUAJD]*)$/,"$1"),n=e.replace(/^regex:\/(.*)\/([gmixXsuUAJD]*)$/,"$2");return new RegExp(r,n).test(t)}},{key:"typeCompare",value:function(e){return e.replace(/^(min|max|size):([\d]+)$/,"$1-$2").split("-")}},{key:"valueCheck",value:function(e,t){var r=o()(this.state.rule),n=l(this.typeCompare(e),2),i=n[0],s=n[1],a=!0,u="",f={attribute:this.props.title||this.state.name},p={};switch(!0){case r.indexOf("nullable")>=0&&Helper.isEmpty(t):a=!0;break;case/^regex:/.test(e):(a=this.regexTest(e,t))||(u="regex");break;case/^(min|max|size):([\d]+)$/.test(e)&&(r.indexOf("number")>=0||r.indexOf("integer")>=0||r.indexOf("numeric")>=0):switch(i){case"min":a=t>=Number(s);break;case"max":a=t<=Number(s);break;case"size":a=t===Number(s)}a||(u="".concat(i,".numeric"),f=Object.assign(f,c({},i,s)),p=c({},i,s));break;case/^(min|max|size):([\d]+)$/.test(e)&&(r.indexOf("string")>=0||r.indexOf("text")>=0):switch(i){case"min":a=!!(Helper.isEmpty(t)||t.length>=Number(s));break;case"max":a=!!(Helper.isEmpty(t)||t.length<=Number(s));break;case"size":a=!(!Helper.isEmpty(t)&&t.length!==Number(s))}a||(u="".concat(i,".string"),f=Object.assign(f,c({},i,s)),p=c({},i,s));break;case"boolean"===e:(a=!("boolean"!=typeof t&&"number"!=typeof t&&"1"!==t&&"0"!==t&&Helper.isEmpty(t)))||(u="boolean");break;case"required"===e&&Helper.isEmpty(t):(a=!1)||(u="required");break;case"text"===e:case"string"===e:(a=!(Helper.isEmpty(t)||/^[\s]*$/.test(t)))||
1(u="string");break;case"number"===e:case"numeric"===e:case"integer"===e:(a=!!Helper.isNumber(t))||(u="numeric");break;case"email"===e:(a=!!Helper.isEmail(t))||(u="email")}return Helper.isEmpty(u)||this.setState({message:u,replacement:f,params:p}),a}},{key:"valid",value:function(e){var t=this,r=o()(this.state.rule),n=collect(r).map(function(r){return t.valueCheck(r,e)}).reduce(function(e,t){return e||(t=!1),t},!0);!0===(void 0!==this.props.disabled&&this.props.disabled)&&(n=!0),this.setState({result:n},function(){null!==t.statistic&&t.statistic(t.state.name,n,t.checkRef)})}},{key:"componentDidMount",value:function(){this.valid(this.props.value)}},{key:"componentDidUpdate",value:function(){var e=this;this.props.value!==this.state.value&&this.setState({value:this.props.value},function(){return e.valid(e.state.value)}),collect(this.props.rule).toJson()!==collect(this.state.rule).toJson()&&this.setState({rule:this.props.rule},function(){return e.valid(e.state.value)})}},{key:"componentWillUnmount",value:function(){null!==this.unRegister&&this.unRegister(this.state.name)}},{key:"render",value:function(){var e=this;return(0,a.jsx)(s.Z.Consumer,{children:function(t){return void 0===t?e.props.children:(t.register(e.state.name),e.contextSet(t.statistic,t.unRegister),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{ref:e.checkRef}),e.props.children,(0,a.jsx)("small",{className:e.props.className||"form-text text-danger",style:{display:e.state.result?"none":"inline-block"},children:e.state.message?e.message():null})]}))}})}}])&&p(r.prototype,i),u&&p(r,u),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i,u}(n.Component)},480484:(e,t,r)=>{r.d(t,{R:()=>i,Z:()=>o});var n=r(667294).createContext(),i=n.Provider;const o=n}}]);

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.