schemas/libraries/typia/download_compiled/minified.js
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=((n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)))(o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e._validateReport=void 0,e._validateReport=e=>{let t=t=>{if(e.length===0)return!0;let n=e[e.length-1].path;return t.length>n.length||n.substring(0,t.length)!==t};return(n,r)=>(n&&t(r.path)&&(r.value===void 0&&(r.description??=["The value at this path is `undefined`.",``,`Please fill the \`${r.expected}\` typed value next time.`].join(` `)),e.push(r)),!1)}}))(),1);(()=>{let e=e=>typeof e.id==`number`&&e.created instanceof Date&&typeof e.title==`string`&&1<=e.title.length&&e.title.length<=100&&typeof e.brand==`string`&&1<=e.brand.length&&e.brand.length<=30&&typeof e.description==`string`&&1<=e.description.length&&e.description.length<=500&&typeof e.price==`number`&&1<=e.price&&e.price<=1e4&&(e.discount===null||typeof e.discount==`number`&&1<=e.discount&&e.discount<=100)&&typeof e.quantity==`number`&&1<=e.quantity&&e.quantity<=10&&Array.isArray(e.tags)&&1<=e.tags.length&&e.tags.length<=30&&e.tags.every(e=>typeof e==`string`)&&Array.isArray(e.images)&&e.images.every(e=>typeof e==`object`&&!!e&&t(e))&&Array.isArray(e.ratings)&&e.ratings.every(e=>typeof e==`object`&&!!e&&n(e)),t=e=>typeof e.id==`number`&&e.created instanceof Date&&typeof e.title==`string`&&1<=e.title.length&&e.title.length<=100&&(e.type===`jpg`||e.type===`png`)&&typeof e.size==`number`&&typeof e.url==`string`&&/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu.test(e.url),n=e=>typeof e.id==`number`&&typeof e.stars==`number`&&1<=e.stars&&e.stars<=5&&typeof e.title==`string`&&1<=e.title.length&&e.title.length<=100&&typeof e.text==`string`&&1<=e.text.length&&e.text.length<=1e3&&Array.isArray(e.images)&&e.images.every(e=>typeof e==`object`&&!!e&&t(e)),r=(e,t,n=!0)=>[typeof e.id==`number`||l(n,{path:t+`.id`,expected:`number`,value:e.id}),e.created instanceof Date||l(n,{path:t+`.created`,expected:`Date`,value:e.created}),typeof e.title==`string`&&(1<=e.title.length||l(n,{path:t+`.title`,expected:`string & MinLength<1>`,value:e.title}))&&(e.title.length<=100||l(n,{path:t+`.title`,expected:`string & MaxLength<100>`,value:e.title}))||l(n,{path:t+`.title`,expected:`(string & MinLength<1> & MaxLength<100>)`,value:e.title}),typeof e.brand==`string`&&(1<=e.brand.length||l(n,{path:t+`.brand`,expected:`string & MinLength<1>`,value:e.brand}))&&(e.brand.length<=30||l(n,{path:t+`.brand`,expected:`string & MaxLength<30>`,value:e.brand}))||l(n,{path:t+`.brand`,expected:`(string & MinLength<1> & MaxLength<30>)`,value:e.brand}),typeof e.description==`string`&&(1<=e.description.length||l(n,{path:t+`.description`,expected:`string & MinLength<1>`,value:e.description}))&&(e.description.length<=500||l(n,{path:t+`.description`,expected:`string & MaxLength<500>`,value:e.description}))||l(n,{path:t+`.description`,expected:`(string & MinLength<1> & MaxLength<500>)`,value:e.description}),typeof e.price==`number`&&(1<=e.price||l(n,{path:t+`.price`,expected:`number & Minimum<1>`,value:e.price}))&&(e.price<=1e4||l(n,{path:t+`.price`,expected:`number & Maximum<10000>`,value:e.price}))||l(n,{path:t+`.price`,expected:`(number & Minimum<1> & Maximum<10000>)`,value:e.price}),e.discount===null||typeof e.discount==`number`&&(1<=e.discount||l(n,{path:t+`.discount`,expected:`number & Minimum<1>`,value:e.discount}))&&(e.discount<=100||l(n,{path:t+`.discount`,expected:`number & Maximum<100>`,value:e.discount}))||l(n,{path:t+`.discount`,expected:`((number & Minimum<1> & Maximum<100>) | null)`,value:e.discount}),typeof e.quantity==`number`&&(1<=e.quantity||l(n,{path:t+`.quantity`,expected:`number & Minimum<1>`,value:e.quantity}))&&(e.quantity<=10||l(n,{path:t+`.quantity`,expected:`number & Maximum<10>`,value:e.quantity}))||l(n,{path:t+`.quantity`,expected:`(number & Minimum<1> & Maximum<10>)`,value:e.quantity}),(Array.isArray(e.tags)||l(n,{path:t+`.tags`,expected:`(Array<string> & MinItems<1> & MaxItems<30>)`,value:e.tags}))&&(1<=e.tags.length||l(n,{path:t+`.tags`,expected:`Array<> & MinItems<1>`,value:e.tags}))&&(e.tags.length<=30||l(n,{path:t+`.tags`,expected:`Array<> & MaxItems<30>`,value:e.tags}))&&e.tags.map((e,r)=>typeof e==`string`||l(n,{path:t+`.tags[`+r+`]`,expected:`string`,value:e})).every(e=>e)||l(n,{path:t+`.tags`,expected:`(Array<string> & MinItems<1> & MaxItems<30>)`,value:e.tags}),(Array.isArray(e.images)||l(n,{path:t+`.images`,expected:`Array<ImageSchema>`,value:e.images}))&&e.images.map((e,r)=>(typeof e==`object`&&!!e||l(n,{path:t+`.images[`+r+`]`,expected:`ImageSchema`,value:e}))&&i(e,t+`.images[`+r+`]`,n)||l(n,{path:t+`.images[`+r+`]`,expected:`ImageSchema`,value:e})).every(e=>e)||l(n,{path:t+`.images`,expected:`Array<ImageSchema>`,value:e.images}),(Array.isArray(e.ratings)||l(n,{path:t+`.ratings`,expected:`Array<RatingSchema>`,value:e.ratings}))&&e.ratings.map((e,r)=>(typeof e==`object`&&!!e||l(n,{path:t+`.ratings[`+r+`]`,expected:`RatingSchema`,value:e}))&&a(e,t+`.ratings[`+r+`]`,n)||l(n,{path:t+`.ratings[`+r+`]`,expected:`RatingSchema`,value:e})).every(e=>e)||l(n,{path:t+`.ratings`,expected:`Array<RatingSchema>`,value:e.ratings})].every(e=>e),i=(e,t,n=!0)=>[typeof e.id==`number`||l(n,{path:t+`.id`,expected:`number`,value:e.id}),e.created instanceof Date||l(n,{path:t+`.created`,expected:`Date`,value:e.created}),typeof e.title==`string`&&(1<=e.title.length||l(n,{path:t+`.title`,expected:`string & MinLength<1>`,value:e.title}))&&(e.title.length<=100||l(n,{path:t+`.title`,expected:`string & MaxLength<100>`,value:e.title}))||l(n,{path:t+`.title`,expected:`(string & MinLength<1> & MaxLength<100>)`,value:e.title}),e.type===`jpg`||e.type===`png`||l(n,{path:t+`.type`,expected:`("jpg" | "png")`,value:e.type}),typeof e.size==`number`||l(n,{path:t+`.size`,expected:`number`,value:e.size}),typeof e.url==`string`&&(/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu.test(e.url)||l(n,{path:t+`.url`,expected:`string & Format<"url">`,value:e.url}))||l(n,{path:t+`.url`,expected:`(string & Format<"url">)`,value:e.url})].every(e=>e),a=(e,t,n=!0)=>[typeof e.id==`number`||l(n,{path:t+`.id`,expected:`number`,value:e.id}),typeof e.stars==`number`&&(1<=e.stars||l(n,{path:t+`.stars`,expected:`number & Minimum<1>`,value:e.stars}))&&(e.stars<=5||l(n,{path:t+`.stars`,expected:`number & Maximum<5>`,value:e.stars}))||l(n,{path:t+`.stars`,expected:`(number & Minimum<1> & Maximum<5>)`,value:e.stars}),typeof e.title==`string`&&(1<=e.title.length||l(n,{path:t+`.title`,expected:`string & MinLength<1>`,value:e.title}))&&(e.title.length<=100||l(n,{path:t+`.title`,expected:`string & MaxLength<100>`,value:e.title}))||l(n,{path:t+`.title`,expected:`(string & MinLength<1> & MaxLength<100>)`,value:e.title}),typeof e.text==`string`&&(1<=e.text.length||l(n,{path:t+`.text`,expected:`string & MinLength<1>`,value:e.text}))&&(e.text.length<=1e3||l(n,{path:t+`.text`,expected:`string & MaxLength<1000>`,value:e.text}))||l(n,{path:t+`.text`,expected:`(string & MinLength<1> & MaxLength<1000>)`,value:e.text}),(Array.isArray(e.images)||l(n,{path:t+`.images`,expected:`Array<ImageSchema>`,value:e.images}))&&e.images.map((e,r)=>(typeof e==`object`&&!!e||l(n,{path:t+`.images[`+r+`]`,expected:`ImageSchema`,value:e}))&&i(e,t+`.images[`+r+`]`,n)||l(n,{path:t+`.images[`+r+`]`,expected:`ImageSchema`,value:e})).every(e=>e)||l(n,{path:t+`.images`,expected:`Array<ImageSchema>`,value:e.images})].every(e=>e),o=t=>typeof t==`object`&&!!t&&e(t),s,l;return e=>{if(!1===o(e)){s=[],l=c._validateReport(s),((e,t,n=!0)=>(typeof e==`object`&&!!e||l(!0,{path:t+``,expected:`__type`,value:e}))&&r(e,t+``,!0)||l(!0,{path:t+``,expected:`__type`,value:e}))(e,`$input`,!0);let t=s.length===0;return t?{success:t,data:e}:{success:t,errors:s,data:e}}return{success:!0,data:e}}})()({});