diff --git a/assets/index-c0e4768f.css b/assets/index-c0e4768f.css new file mode 100644 index 0000000..36a10e3 --- /dev/null +++ b/assets/index-c0e4768f.css @@ -0,0 +1,9 @@ +@charset "UTF-8";@import"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap";@import"https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@500&display=swap";@import"https://fonts.googleapis.com/css2?family=Pacifico";.main{display:flex;flex-direction:column;min-height:100vh;justify-content:space-between}.container{width:100%;max-width:800px;margin:auto}.header{background-color:#e6eaff}.header>div{padding:80px 32px}.logo-name{display:flex;justify-content:flex-start;align-items:center;gap:24px}.logo-name .name{font-size:64px;font-weight:500;color:#f93}.logo-name .logo{width:64px}.tagline{margin-bottom:16px;font-weight:500;font-size:16px;color:#686868}.install{margin-top:16px;font-size:16px;color:#484848;background-color:#f8f8f8;padding:8px 24px;border-radius:8px;font-family:Roboto Mono;font-weight:500;display:inline-block}.highlights{margin:48px 0;font-size:16px;color:#484848;list-style:none;padding:0;line-height:2}.highlights li:before{content:"✓";padding-right:10px;color:#55c610;font-weight:900}.github{display:flex;align-items:center;gap:16px;font-weight:500;font-size:16px;color:#24292f;margin-top:32px}.github img{width:24px}.body{padding:32px}.footer{padding:20px;border-top:1px solid #e8e8e8;text-align:center;margin-top:64px}.footer a{padding:0 5px;font-size:24px;text-decoration:none;background:linear-gradient(148deg,#4568dc 0%,#b06ab3 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;font-family:Pacifico,monospace}/*! +* Cropper.js v1.5.13 +* https://fengyuanchen.github.io/cropperjs +* +* Copyright 2015-present Chen Fengyuan +* Released under the MIT license +* +* Date: 2022-11-20T05:30:43.444Z +*/.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.cropper-container img{backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-canvas,.cropper-crop-box,.cropper-drag-box,.cropper-modal,.cropper-wrap-box{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-canvas,.cropper-wrap-box{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:33.33333%;left:0;top:33.33333%;width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:33.33333%;top:0;width:33.33333%}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:after,.cropper-center:before{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width:768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width:992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width:1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}.jinie{--jinie-bg: #f0f0f0;--jinie-bg-canvas: #ffffff;--jinie-icon-reset: #888888;--jinie-icon-done: #74bf2c;--jinie-icon-cancel: #e83b41;--jinie-icon-border: #b8b8b8;--jinie-rotation-bg: #d8d8d8;--jinie-rotation-fg: #686868;--jinie-progress-bg: #0002;--jinie-progress-fg: #2e78c8}.jinie-dark{--jinie-bg: #101010;--jinie-bg-canvas: #181818;--jinie-icon-reset: #b8b8b8;--jinie-icon-done: #356703;--jinie-icon-cancel: #77060d;--jinie-icon-border: #282828;--jinie-rotation-bg: #282828;--jinie-rotation-fg: #b8b8b8;--jinie-progress-bg: #b8b8b8;--jinie-progress-fg: #296aaf}.jinie{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1000000000;display:flex;flex-direction:column;background-color:var(--jinie-bg)}.jinie .jinie-image-box{padding:1rem;height:90vh;background-color:var(--jinie-bg-canvas)}.jinie .jinie-image-box>div{height:100%}.jinie .jinie-editor{height:10vh;width:100%;margin:auto;max-width:600px;display:flex;gap:1rem}.jinie .jinie-editor .jinie-rotation{padding:.25rem 1rem .25rem .25rem;width:calc(100% - 5rem);display:flex;align-items:center}.jinie .jinie-editor .jinie-rotation input{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;background-color:var(--jinie-rotation-bg);height:.25rem;outline:none;border:none}.jinie .jinie-editor .jinie-rotation input::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--jinie-rotation-fg);border-radius:50%;width:1rem;height:1rem;cursor:pointer}.jinie .jinie-editor .jinie-buttons{display:flex;justify-content:space-between;width:10rem;gap:.5rem}.jinie .jinie-editor .jinie-buttons>div{width:100%}.jinie .jinie-editor .jinie-icon{display:flex;justify-content:center;align-items:center;cursor:pointer;width:2rem}.jinie .jinie-editor .jinie-icon:hover svg{border:1px solid var(--jinie-icon-border)}.jinie .jinie-editor .jinie-icon svg{width:2.5rem;height:2.5rem;border-radius:50%;padding:.25rem}.jinie .jinie-editor .jinie-buttons-reset{fill:var(--jinie-icon-reset)}.jinie .jinie-editor .jinie-buttons-cancel{fill:var(--jinie-icon-cancel)}.jinie .jinie-editor .jinie-buttons-done{fill:var(--jinie-icon-done)}.jinie-progress{width:100%;height:8px;border-radius:100px;background-color:var(--jinie-progress-bg);z-index:1;overflow:hidden;pointer-events:none}.jinie-progress .jinie-progress-filled{width:0%;height:100%;background-color:var(--jinie-progress-fg);transition:all .3s ease}.cropper-modal{background-color:var(--jinie-bg-canvas)}._title_1nj27_1{font-weight:500;margin-top:16px;margin-bottom:64px;border-bottom:1px solid #e8e8e8;padding-bottom:32px;font-size:24px}._label_1nj27_10{margin:32px 0 16px;font-weight:500}._break_1nj27_15{margin:64px 0;height:1px;background-color:#e8e8e8;width:100%}._uploadedImg_1nj27_22{margin:64px auto;max-width:400px;padding:32px;border:1px solid #e8e8e8;cursor:pointer}._uploadedImg_1nj27_22:hover{border-color:red}._uploadedImg_1nj27_22 img{background-color:#e8e8e8;background-image:url(/jinie/texture.png)}._maxSizeRange_1nj27_37{margin-top:32px;display:flex;align-items:center}._maxSizeRange_1nj27_37 input{margin-right:20px}._theme_1nj27_47{display:inline-flex;margin:32px 0;gap:16px;padding:4px 8px}._theme_1nj27_47>div{background-color:#f8f8f8;cursor:pointer;padding:4px 16px}._theme_1nj27_47 ._active_1nj27_58{border-bottom:2px solid #484848}*,:after,*:before{box-sizing:border-box}body{margin:0;font-family:Roboto;color:#282828;line-height:1.5}a{text-decoration:none}img{width:100%} diff --git a/assets/index-fd6d20b8.js b/assets/index-fd6d20b8.js new file mode 100644 index 0000000..a392be5 --- /dev/null +++ b/assets/index-fd6d20b8.js @@ -0,0 +1,49 @@ +var Bf=Object.defineProperty;var Ff=(e,t,n)=>t in e?Bf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var K=(e,t,n)=>(Ff(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function Hf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cu={exports:{}},Hi={},fu={exports:{}},O={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Pr=Symbol.for("react.element"),Vf=Symbol.for("react.portal"),Wf=Symbol.for("react.fragment"),$f=Symbol.for("react.strict_mode"),Yf=Symbol.for("react.profiler"),Xf=Symbol.for("react.provider"),Qf=Symbol.for("react.context"),Kf=Symbol.for("react.forward_ref"),Gf=Symbol.for("react.suspense"),Zf=Symbol.for("react.memo"),Jf=Symbol.for("react.lazy"),Ua=Symbol.iterator;function qf(e){return e===null||typeof e!="object"?null:(e=Ua&&e[Ua]||e["@@iterator"],typeof e=="function"?e:null)}var du={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},hu=Object.assign,pu={};function Un(e,t,n){this.props=e,this.context=t,this.refs=pu,this.updater=n||du}Un.prototype.isReactComponent={};Un.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Un.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function mu(){}mu.prototype=Un.prototype;function Bo(e,t,n){this.props=e,this.context=t,this.refs=pu,this.updater=n||du}var Fo=Bo.prototype=new mu;Fo.constructor=Bo;hu(Fo,Un.prototype);Fo.isPureReactComponent=!0;var Ba=Array.isArray,vu=Object.prototype.hasOwnProperty,Ho={current:null},gu={key:!0,ref:!0,__self:!0,__source:!0};function yu(e,t,n){var r,i={},l=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(l=""+t.key),t)vu.call(t,r)&&!gu.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,Z=_[H];if(0>>1;Hi(Hn,L))Hti(Ur,Hn)?(_[H]=Ur,_[Ht]=L,H=Ht):(_[H]=Hn,_[it]=L,H=it);else if(Hti(Ur,L))_[H]=Ur,_[Ht]=L,H=Ht;else break e}}return M}function i(_,M){var L=_.sortIndex-M.sortIndex;return L!==0?L:_.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var s=[],u=[],c=1,f=null,d=3,g=!1,y=!1,x=!1,D=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(_){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=_)r(u),M.sortIndex=M.expirationTime,t(s,M);else break;M=n(u)}}function w(_){if(x=!1,m(_),!y)if(n(s)!==null)y=!0,Ve(C);else{var M=n(u);M!==null&&vt(w,M.startTime-_)}}function C(_,M){y=!1,x&&(x=!1,p(N),N=-1),g=!0;var L=d;try{for(m(M),f=n(s);f!==null&&(!(f.expirationTime>M)||_&&!ee());){var H=f.callback;if(typeof H=="function"){f.callback=null,d=f.priorityLevel;var Z=H(f.expirationTime<=M);M=e.unstable_now(),typeof Z=="function"?f.callback=Z:f===n(s)&&r(s),m(M)}else r(s);f=n(s)}if(f!==null)var Ft=!0;else{var it=n(u);it!==null&&vt(w,it.startTime-M),Ft=!1}return Ft}finally{f=null,d=L,g=!1}}var v=!1,E=null,N=-1,j=5,T=-1;function ee(){return!(e.unstable_now()-T_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(_){switch(d){case 1:case 2:case 3:var M=3;break;default:M=d}var L=d;d=M;try{return _()}finally{d=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,M){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var L=d;d=_;try{return M()}finally{d=L}},e.unstable_scheduleCallback=function(_,M,L){var H=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0H?(_.sortIndex=L,t(u,_),n(s)===null&&_===n(u)&&(x?(p(N),N=-1):x=!0,vt(w,L-H))):(_.sortIndex=Z,t(s,_),y||g||(y=!0,Ve(C))),_},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(_){var M=d;return function(){var L=d;d=M;try{return _.apply(this,arguments)}finally{d=L}}}})(ku);Su.exports=ku;var ud=Su.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Eu=kn,Le=ud;function S(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jl=Object.prototype.hasOwnProperty,cd=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ha={},Va={};function fd(e){return jl.call(Va,e)?!0:jl.call(Ha,e)?!1:cd.test(e)?Va[e]=!0:(Ha[e]=!0,!1)}function dd(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function hd(e,t,n,r){if(t===null||typeof t>"u"||dd(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ye(e,t,n,r,i,l,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=o}var ue={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ue[e]=new ye(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ue[t]=new ye(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ue[e]=new ye(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ue[e]=new ye(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ue[e]=new ye(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ue[e]=new ye(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ue[e]=new ye(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ue[e]=new ye(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ue[e]=new ye(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wo=/[\-:]([a-z])/g;function $o(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Wo,$o);ue[t]=new ye(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Wo,$o);ue[t]=new ye(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Wo,$o);ue[t]=new ye(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ue[e]=new ye(e,1,!1,e.toLowerCase(),null,!1,!1)});ue.xlinkHref=new ye("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ue[e]=new ye(e,1,!1,e.toLowerCase(),null,!0,!0)});function Yo(e,t,n,r){var i=ue.hasOwnProperty(t)?ue[t]:null;(i!==null?i.type!==0:r||!(2a||i[o]!==l[a]){var s=` +`+i[o].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=o&&0<=a);break}}}finally{ol=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?er(e):""}function pd(e){switch(e.tag){case 5:return er(e.type);case 16:return er("Lazy");case 13:return er("Suspense");case 19:return er("SuspenseList");case 0:case 2:case 15:return e=al(e.type,!1),e;case 11:return e=al(e.type.render,!1),e;case 1:return e=al(e.type,!0),e;default:return""}}function Bl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case un:return"Fragment";case sn:return"Portal";case Il:return"Profiler";case Xo:return"StrictMode";case Al:return"Suspense";case Ul:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _u:return(e.displayName||"Context")+".Consumer";case Nu:return(e._context.displayName||"Context")+".Provider";case Qo:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ko:return t=e.displayName||null,t!==null?t:Bl(e.type)||"Memo";case wt:t=e._payload,e=e._init;try{return Bl(e(t))}catch{}}return null}function md(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Bl(t);case 8:return t===Xo?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function jt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Du(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vd(e){var t=Du(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,l.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Hr(e){e._valueTracker||(e._valueTracker=vd(e))}function Tu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Du(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function vi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Fl(e,t){var n=t.checked;return Q({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function $a(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=jt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Mu(e,t){t=t.checked,t!=null&&Yo(e,"checked",t,!1)}function Hl(e,t){Mu(e,t);var n=jt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Vl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vl(e,t.type,jt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ya(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Vl(e,t,n){(t!=="number"||vi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var tr=Array.isArray;function En(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Vr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function mr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ir={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},gd=["Webkit","ms","Moz","O"];Object.keys(ir).forEach(function(e){gd.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ir[t]=ir[e]})});function Ou(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ir.hasOwnProperty(e)&&ir[e]?(""+t).trim():t+"px"}function ju(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Ou(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var yd=Q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Yl(e,t){if(t){if(yd[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(S(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(S(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(S(61))}if(t.style!=null&&typeof t.style!="object")throw Error(S(62))}}function Xl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ql=null;function Go(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kl=null,Cn=null,Nn=null;function Ka(e){if(e=Ir(e)){if(typeof Kl!="function")throw Error(S(280));var t=e.stateNode;t&&(t=Xi(t),Kl(e.stateNode,e.type,t))}}function Iu(e){Cn?Nn?Nn.push(e):Nn=[e]:Cn=e}function Au(){if(Cn){var e=Cn,t=Nn;if(Nn=Cn=null,Ka(e),t)for(e=0;e>>=0,e===0?32:31-(Td(e)/Md|0)|0}var Wr=64,$r=4194304;function nr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function xi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=nr(a):(l&=o,l!==0&&(r=nr(l)))}else o=n&~i,o!==0?r=nr(o):l!==0&&(r=nr(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Or(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ke(t),e[t]=n}function Od(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=or),rs=String.fromCharCode(32),is=!1;function rc(e,t){switch(e){case"keyup":return sh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ic(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cn=!1;function ch(e,t){switch(e){case"compositionend":return ic(t);case"keypress":return t.which!==32?null:(is=!0,rs);case"textInput":return e=t.data,e===rs&&is?null:e;default:return null}}function fh(e,t){if(cn)return e==="compositionend"||!ra&&rc(e,t)?(e=tc(),ai=ea=Et=null,cn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ss(n)}}function sc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?sc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function uc(){for(var e=window,t=vi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=vi(e.document)}return t}function ia(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xh(e){var t=uc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&sc(n.ownerDocument.documentElement,n)){if(r!==null&&ia(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=us(n,l);var o=us(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,fn=null,eo=null,sr=null,to=!1;function cs(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;to||fn==null||fn!==vi(r)||(r=fn,"selectionStart"in r&&ia(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),sr&&Sr(sr,r)||(sr=r,r=Ei(eo,"onSelect"),0pn||(e.current=ao[pn],ao[pn]=null,pn--)}function U(e,t){pn++,ao[pn]=e.current,e.current=t}var It={},pe=Ut(It),Ce=Ut(!1),Jt=It;function Ln(e,t){var n=e.type.contextTypes;if(!n)return It;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ne(e){return e=e.childContextTypes,e!=null}function Ni(){F(Ce),F(pe)}function gs(e,t,n){if(pe.current!==It)throw Error(S(168));U(pe,t),U(Ce,n)}function yc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(S(108,md(e)||"Unknown",i));return Q({},n,r)}function _i(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||It,Jt=pe.current,U(pe,e),U(Ce,Ce.current),!0}function ys(e,t,n){var r=e.stateNode;if(!r)throw Error(S(169));n?(e=yc(e,t,Jt),r.__reactInternalMemoizedMergedChildContext=e,F(Ce),F(pe),U(pe,e)):F(Ce),U(Ce,n)}var at=null,Qi=!1,Sl=!1;function wc(e){at===null?at=[e]:at.push(e)}function Lh(e){Qi=!0,wc(e)}function Bt(){if(!Sl&&at!==null){Sl=!0;var e=0,t=A;try{var n=at;for(A=1;e>=o,i-=o,st=1<<32-Ke(t)+i|n<N?(j=E,E=null):j=E.sibling;var T=d(p,E,m[N],w);if(T===null){E===null&&(E=j);break}e&&E&&T.alternate===null&&t(p,E),h=l(T,h,N),v===null?C=T:v.sibling=T,v=T,E=j}if(N===m.length)return n(p,E),$&&$t(p,N),C;if(E===null){for(;NN?(j=E,E=null):j=E.sibling;var ee=d(p,E,T.value,w);if(ee===null){E===null&&(E=j);break}e&&E&&ee.alternate===null&&t(p,E),h=l(ee,h,N),v===null?C=ee:v.sibling=ee,v=ee,E=j}if(T.done)return n(p,E),$&&$t(p,N),C;if(E===null){for(;!T.done;N++,T=m.next())T=f(p,T.value,w),T!==null&&(h=l(T,h,N),v===null?C=T:v.sibling=T,v=T);return $&&$t(p,N),C}for(E=r(p,E);!T.done;N++,T=m.next())T=g(E,p,N,T.value,w),T!==null&&(e&&T.alternate!==null&&E.delete(T.key===null?N:T.key),h=l(T,h,N),v===null?C=T:v.sibling=T,v=T);return e&&E.forEach(function(ze){return t(p,ze)}),$&&$t(p,N),C}function D(p,h,m,w){if(typeof m=="object"&&m!==null&&m.type===un&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Fr:e:{for(var C=m.key,v=h;v!==null;){if(v.key===C){if(C=m.type,C===un){if(v.tag===7){n(p,v.sibling),h=i(v,m.props.children),h.return=p,p=h;break e}}else if(v.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===wt&&Ns(C)===v.type){n(p,v.sibling),h=i(v,m.props),h.ref=Qn(p,v,m),h.return=p,p=h;break e}n(p,v);break}else t(p,v);v=v.sibling}m.type===un?(h=Zt(m.props.children,p.mode,w,m.key),h.return=p,p=h):(w=mi(m.type,m.key,m.props,null,p.mode,w),w.ref=Qn(p,h,m),w.return=p,p=w)}return o(p);case sn:e:{for(v=m.key;h!==null;){if(h.key===v)if(h.tag===4&&h.stateNode.containerInfo===m.containerInfo&&h.stateNode.implementation===m.implementation){n(p,h.sibling),h=i(h,m.children||[]),h.return=p,p=h;break e}else{n(p,h);break}else t(p,h);h=h.sibling}h=Tl(m,p.mode,w),h.return=p,p=h}return o(p);case wt:return v=m._init,D(p,h,v(m._payload),w)}if(tr(m))return y(p,h,m,w);if(Vn(m))return x(p,h,m,w);Jr(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,h!==null&&h.tag===6?(n(p,h.sibling),h=i(h,m),h.return=p,p=h):(n(p,h),h=Dl(m,p.mode,w),h.return=p,p=h),o(p)):n(p,h)}return D}var On=zc(!0),Dc=zc(!1),Ar={},tt=Ut(Ar),Nr=Ut(Ar),_r=Ut(Ar);function Kt(e){if(e===Ar)throw Error(S(174));return e}function ha(e,t){switch(U(_r,t),U(Nr,e),U(tt,Ar),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:$l(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=$l(t,e)}F(tt),U(tt,t)}function jn(){F(tt),F(Nr),F(_r)}function Tc(e){Kt(_r.current);var t=Kt(tt.current),n=$l(t,e.type);t!==n&&(U(Nr,e),U(tt,n))}function pa(e){Nr.current===e&&(F(tt),F(Nr))}var Y=Ut(0);function Li(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var kl=[];function ma(){for(var e=0;en?n:4,e(!0);var r=El.transition;El.transition={};try{e(!1),t()}finally{A=n,El.transition=r}}function Yc(){return He().memoizedState}function Ih(e,t,n){var r=Pt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xc(e))Qc(t,n);else if(n=Ec(e,t,n,r),n!==null){var i=ve();Ge(n,e,r,i),Kc(n,t,r)}}function Ah(e,t,n){var r=Pt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xc(e))Qc(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var o=t.lastRenderedState,a=l(o,n);if(i.hasEagerState=!0,i.eagerState=a,Ze(a,o)){var s=t.interleaved;s===null?(i.next=i,fa(t)):(i.next=s.next,s.next=i),t.interleaved=i;return}}catch{}finally{}n=Ec(e,t,i,r),n!==null&&(i=ve(),Ge(n,e,r,i),Kc(n,t,r))}}function Xc(e){var t=e.alternate;return e===X||t!==null&&t===X}function Qc(e,t){ur=Pi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Kc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jo(e,n)}}var Oi={readContext:Fe,useCallback:fe,useContext:fe,useEffect:fe,useImperativeHandle:fe,useInsertionEffect:fe,useLayoutEffect:fe,useMemo:fe,useReducer:fe,useRef:fe,useState:fe,useDebugValue:fe,useDeferredValue:fe,useTransition:fe,useMutableSource:fe,useSyncExternalStore:fe,useId:fe,unstable_isNewReconciler:!1},Uh={readContext:Fe,useCallback:function(e,t){return qe().memoizedState=[e,t===void 0?null:t],e},useContext:Fe,useEffect:zs,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,fi(4194308,4,Fc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fi(4194308,4,e,t)},useInsertionEffect:function(e,t){return fi(4,2,e,t)},useMemo:function(e,t){var n=qe();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=qe();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ih.bind(null,X,e),[r.memoizedState,e]},useRef:function(e){var t=qe();return e={current:e},t.memoizedState=e},useState:_s,useDebugValue:xa,useDeferredValue:function(e){return qe().memoizedState=e},useTransition:function(){var e=_s(!1),t=e[0];return e=jh.bind(null,e[1]),qe().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=X,i=qe();if($){if(n===void 0)throw Error(S(407));n=n()}else{if(n=t(),le===null)throw Error(S(349));bt&30||Lc(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,zs(Oc.bind(null,r,l,e),[e]),r.flags|=2048,Tr(9,Pc.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=qe(),t=le.identifierPrefix;if($){var n=ut,r=st;n=(r&~(1<<32-Ke(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=zr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[be]=t,e[Cr]=r,rf(e,t,!1,!1),t.stateNode=e;e:{switch(o=Xl(n,r),n){case"dialog":B("cancel",e),B("close",e),i=r;break;case"iframe":case"object":case"embed":B("load",e),i=r;break;case"video":case"audio":for(i=0;iAn&&(t.flags|=128,r=!0,Kn(l,!1),t.lanes=4194304)}else{if(!r)if(e=Li(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Kn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!o.alternate&&!$)return de(t),null}else 2*J()-l.renderingStartTime>An&&n!==1073741824&&(t.flags|=128,r=!0,Kn(l,!1),t.lanes=4194304);l.isBackwards?(o.sibling=t.child,t.child=o):(n=l.last,n!==null?n.sibling=o:t.child=o,l.last=o)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=J(),t.sibling=null,n=Y.current,U(Y,r?n&1|2:n&1),t):(de(t),null);case 22:case 23:return _a(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Te&1073741824&&(de(t),t.subtreeFlags&6&&(t.flags|=8192)):de(t),null;case 24:return null;case 25:return null}throw Error(S(156,t.tag))}function Xh(e,t){switch(oa(t),t.tag){case 1:return Ne(t.type)&&Ni(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jn(),F(Ce),F(pe),ma(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return pa(t),null;case 13:if(F(Y),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));Pn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F(Y),null;case 4:return jn(),null;case 10:return ca(t.type._context),null;case 22:case 23:return _a(),null;case 24:return null;default:return null}}var br=!1,he=!1,Qh=typeof WeakSet=="function"?WeakSet:Set,z=null;function yn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){G(e,t,r)}else n.current=null}function xo(e,t,n){try{n()}catch(r){G(e,t,r)}}var Is=!1;function Kh(e,t){if(no=Si,e=uc(),ia(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var o=0,a=-1,s=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var g;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==l||r!==0&&f.nodeType!==3||(s=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(g=f.firstChild)!==null;)d=f,f=g;for(;;){if(f===e)break t;if(d===n&&++u===i&&(a=o),d===l&&++c===r&&(s=o),(g=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=g}n=a===-1||s===-1?null:{start:a,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(ro={focusedElem:e,selectionRange:n},Si=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,D=y.memoizedState,p=t.stateNode,h=p.getSnapshotBeforeUpdate(t.elementType===t.type?x:Ye(t.type,x),D);p.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(S(163))}}catch(w){G(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return y=Is,Is=!1,y}function cr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&xo(t,n,l)}i=i.next}while(i!==r)}}function Zi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function So(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function af(e){var t=e.alternate;t!==null&&(e.alternate=null,af(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[be],delete t[Cr],delete t[oo],delete t[Mh],delete t[Rh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sf(e){return e.tag===5||e.tag===3||e.tag===4}function As(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ko(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ci));else if(r!==4&&(e=e.child,e!==null))for(ko(e,t,n),e=e.sibling;e!==null;)ko(e,t,n),e=e.sibling}function Eo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Eo(e,t,n),e=e.sibling;e!==null;)Eo(e,t,n),e=e.sibling}var ae=null,Xe=!1;function gt(e,t,n){for(n=n.child;n!==null;)uf(e,t,n),n=n.sibling}function uf(e,t,n){if(et&&typeof et.onCommitFiberUnmount=="function")try{et.onCommitFiberUnmount(Vi,n)}catch{}switch(n.tag){case 5:he||yn(n,t);case 6:var r=ae,i=Xe;ae=null,gt(e,t,n),ae=r,Xe=i,ae!==null&&(Xe?(e=ae,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ae.removeChild(n.stateNode));break;case 18:ae!==null&&(Xe?(e=ae,n=n.stateNode,e.nodeType===8?xl(e.parentNode,n):e.nodeType===1&&xl(e,n),wr(e)):xl(ae,n.stateNode));break;case 4:r=ae,i=Xe,ae=n.stateNode.containerInfo,Xe=!0,gt(e,t,n),ae=r,Xe=i;break;case 0:case 11:case 14:case 15:if(!he&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,o=l.destroy;l=l.tag,o!==void 0&&(l&2||l&4)&&xo(n,t,o),i=i.next}while(i!==r)}gt(e,t,n);break;case 1:if(!he&&(yn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){G(n,t,a)}gt(e,t,n);break;case 21:gt(e,t,n);break;case 22:n.mode&1?(he=(r=he)||n.memoizedState!==null,gt(e,t,n),he=r):gt(e,t,n);break;default:gt(e,t,n)}}function Us(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Qh),t.forEach(function(r){var i=rp.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function We(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~l}if(r=i,r=J()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Zh(r/1960))-r,10e?16:e,Ct===null)var r=!1;else{if(e=Ct,Ct=null,Ai=0,I&6)throw Error(S(331));var i=I;for(I|=4,z=e.current;z!==null;){var l=z,o=l.child;if(z.flags&16){var a=l.deletions;if(a!==null){for(var s=0;sJ()-Ca?Gt(e,0):Ea|=n),_e(e,t)}function gf(e,t){t===0&&(e.mode&1?(t=$r,$r<<=1,!($r&130023424)&&($r=4194304)):t=1);var n=ve();e=ht(e,t),e!==null&&(Or(e,t,n),_e(e,n))}function np(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function rp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(S(314))}r!==null&&r.delete(t),gf(e,n)}var yf;yf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ce.current)Ee=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ee=!1,$h(e,t,n);Ee=!!(e.flags&131072)}else Ee=!1,$&&t.flags&1048576&&xc(t,Di,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;di(e,t),e=t.pendingProps;var i=Ln(t,pe.current);zn(t,n),i=ga(null,t,r,e,i,n);var l=ya();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ne(r)?(l=!0,_i(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,da(t),i.updater=Ki,t.stateNode=i,i._reactInternals=t,ho(t,r,e,n),t=vo(null,t,r,!0,l,n)):(t.tag=0,$&&l&&la(t),me(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(di(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lp(r),e=Ye(r,e),i){case 0:t=mo(null,t,r,e,n);break e;case 1:t=Ps(null,t,r,e,n);break e;case 11:t=Rs(null,t,r,e,n);break e;case 14:t=Ls(null,t,r,Ye(r.type,e),n);break e}throw Error(S(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),mo(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),Ps(e,t,r,i,n);case 3:e:{if(ef(t),e===null)throw Error(S(387));r=t.pendingProps,l=t.memoizedState,i=l.element,Cc(e,t),Ri(t,r,null,n);var o=t.memoizedState;if(r=o.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=In(Error(S(423)),t),t=Os(e,t,r,n,i);break e}else if(r!==i){i=In(Error(S(424)),t),t=Os(e,t,r,n,i);break e}else for(Me=Mt(t.stateNode.containerInfo.firstChild),Re=t,$=!0,Qe=null,n=Dc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Pn(),r===i){t=pt(e,t,n);break e}me(e,t,r,n)}t=t.child}return t;case 5:return Tc(t),e===null&&uo(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,o=i.children,io(r,i)?o=null:l!==null&&io(r,l)&&(t.flags|=32),bc(e,t),me(e,t,o,n),t.child;case 6:return e===null&&uo(t),null;case 13:return tf(e,t,n);case 4:return ha(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=On(t,null,r,n):me(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),Rs(e,t,r,i,n);case 7:return me(e,t,t.pendingProps,n),t.child;case 8:return me(e,t,t.pendingProps.children,n),t.child;case 12:return me(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,o=i.value,U(Ti,r._currentValue),r._currentValue=o,l!==null)if(Ze(l.value,o)){if(l.children===i.children&&!Ce.current){t=pt(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var a=l.dependencies;if(a!==null){o=l.child;for(var s=a.firstContext;s!==null;){if(s.context===r){if(l.tag===1){s=ct(-1,n&-n),s.tag=2;var u=l.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),co(l.return,n,t),a.lanes|=n;break}s=s.next}}else if(l.tag===10)o=l.type===t.type?null:l.child;else if(l.tag===18){if(o=l.return,o===null)throw Error(S(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),co(o,n,t),o=l.sibling}else o=l.child;if(o!==null)o.return=l;else for(o=l;o!==null;){if(o===t){o=null;break}if(l=o.sibling,l!==null){l.return=o.return,o=l;break}o=o.return}l=o}me(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,zn(t,n),i=Fe(i),r=r(i),t.flags|=1,me(e,t,r,n),t.child;case 14:return r=t.type,i=Ye(r,t.pendingProps),i=Ye(r.type,i),Ls(e,t,r,i,n);case 15:return Jc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ye(r,i),di(e,t),t.tag=1,Ne(r)?(e=!0,_i(t)):e=!1,zn(t,n),_c(t,r,i),ho(t,r,i,n),vo(null,t,r,!0,e,n);case 19:return nf(e,t,n);case 22:return qc(e,t,n)}throw Error(S(156,t.tag))};function wf(e,t){return $u(e,t)}function ip(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ue(e,t,n,r){return new ip(e,t,n,r)}function Da(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lp(e){if(typeof e=="function")return Da(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Qo)return 11;if(e===Ko)return 14}return 2}function Ot(e,t){var n=e.alternate;return n===null?(n=Ue(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function mi(e,t,n,r,i,l){var o=2;if(r=e,typeof e=="function")Da(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case un:return Zt(n.children,i,l,t);case Xo:o=8,i|=8;break;case Il:return e=Ue(12,n,t,i|2),e.elementType=Il,e.lanes=l,e;case Al:return e=Ue(13,n,t,i),e.elementType=Al,e.lanes=l,e;case Ul:return e=Ue(19,n,t,i),e.elementType=Ul,e.lanes=l,e;case zu:return qi(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Nu:o=10;break e;case _u:o=9;break e;case Qo:o=11;break e;case Ko:o=14;break e;case wt:o=16,r=null;break e}throw Error(S(130,e==null?e:typeof e,""))}return t=Ue(o,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function Zt(e,t,n,r){return e=Ue(7,e,r,t),e.lanes=n,e}function qi(e,t,n,r){return e=Ue(22,e,r,t),e.elementType=zu,e.lanes=n,e.stateNode={isHidden:!1},e}function Dl(e,t,n){return e=Ue(6,e,null,t),e.lanes=n,e}function Tl(e,t,n){return t=Ue(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function op(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ul(0),this.expirationTimes=ul(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ul(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ta(e,t,n,r,i,l,o,a,s){return e=new op(e,t,n,a,s),t===1?(t=1,l===!0&&(t|=8)):t=0,l=Ue(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},da(l),e}function ap(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ef)}catch(e){console.error(e)}}Ef(),xu.exports=Pe;var dp=xu.exports,Xs=dp;Ol.createRoot=Xs.createRoot,Ol.hydrateRoot=Xs.hydrateRoot;function hp({children:e}){return k.jsxs("div",{className:"main",children:[k.jsxs("div",{children:[k.jsx("div",{className:"header",children:k.jsxs("div",{className:"container",children:[k.jsxs("div",{className:"logo-name",children:[k.jsx("div",{className:"logo",children:k.jsx("img",{src:"/jinie/logo.png"})}),k.jsx("div",{className:"name",children:"Jinie"})]}),k.jsx("div",{className:"tagline",children:"Simple Image Editing & Compression Tool"}),k.jsx("div",{className:"install",children:"npm i jinie"}),k.jsxs("ul",{className:"highlights",children:[k.jsx("li",{children:"Simple implementation"}),k.jsx("li",{children:"Responsive with light/dark theme"}),k.jsx("li",{children:"In-built image compression"})]}),k.jsx("a",{href:"https://github.com/neilveil/jinie",target:"_blank",children:k.jsxs("div",{className:"github",children:[k.jsx("img",{src:"/github.svg"}),k.jsx("span",{children:"Docs  ➞"})]})})]})}),k.jsx("div",{className:"body container",children:e})]}),k.jsxs("div",{className:"footer",children:["Developed by",k.jsx("a",{target:"_blank",href:"https://github.com/neilveil",children:"neilveil"})]})]})}/*! + * Cropper.js v1.5.13 + * https://fengyuanchen.github.io/cropperjs + * + * Copyright 2015-present Chen Fengyuan + * Released under the MIT license + * + * Date: 2022-11-20T05:30:46.114Z + */function Qs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Cf(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n
',Mp=Number.isNaN||rt.isNaN;function P(e){return typeof e=="number"&&!Mp(e)}var ou=function(t){return t>0&&t<1/0};function Ml(e){return typeof e>"u"}function nn(e){return Do(e)==="object"&&e!==null}var Rp=Object.prototype.hasOwnProperty;function xn(e){if(!nn(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&Rp.call(n,"isPrototypeOf")}catch{return!1}}function xe(e){return typeof e=="function"}var Lp=Array.prototype.slice;function Pf(e){return Array.from?Array.from(e):Lp.call(e)}function b(e,t){return e&&xe(t)&&(Array.isArray(e)||P(e.length)?Pf(e).forEach(function(n,r){t.call(e,n,r,e)}):nn(e)&&Object.keys(e).forEach(function(n){t.call(e,e[n],n,e)})),e}var W=Object.assign||function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i0&&r.forEach(function(l){nn(l)&&Object.keys(l).forEach(function(o){t[o]=l[o]})}),t},Pp=/\.\d*(?:0|9){12}\d*$/;function Tn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Pp.test(e)?Math.round(e*t)/t:e}var Op=/^width|height|left|top|marginLeft|marginTop$/;function Nt(e,t){var n=e.style;b(t,function(r,i){Op.test(i)&&P(r)&&(r="".concat(r,"px")),n[i]=r})}function jp(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function re(e,t){if(t){if(P(e.length)){b(e,function(r){re(r,t)});return}if(e.classList){e.classList.add(t);return}var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function nt(e,t){if(t){if(P(e.length)){b(e,function(n){nt(n,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function Sn(e,t,n){if(t){if(P(e.length)){b(e,function(r){Sn(r,t,n)});return}n?re(e,t):nt(e,t)}}var Ip=/([a-z\d])([A-Z])/g;function Aa(e){return e.replace(Ip,"$1-$2").toLowerCase()}function Ao(e,t){return nn(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Aa(t)))}function Lr(e,t,n){nn(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(Aa(t)),n)}function Ap(e,t){if(nn(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(Aa(t)))}var Of=/\s\s*/,jf=function(){var e=!1;if(rl){var t=!1,n=function(){},r=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(l){t=l}});rt.addEventListener("test",n,r),rt.removeEventListener("test",n,r)}return e}();function $e(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=n;t.trim().split(Of).forEach(function(l){if(!jf){var o=e.listeners;o&&o[l]&&o[l][n]&&(i=o[l][n],delete o[l][n],Object.keys(o[l]).length===0&&delete o[l],Object.keys(o).length===0&&delete e.listeners)}e.removeEventListener(l,i,r)})}function je(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=n;t.trim().split(Of).forEach(function(l){if(r.once&&!jf){var o=e.listeners,a=o===void 0?{}:o;i=function(){delete a[l][n],e.removeEventListener(l,i,r);for(var u=arguments.length,c=new Array(u),f=0;fMath.abs(n)&&(n=d)})}),n}function ri(e,t){var n=e.pageX,r=e.pageY,i={endX:n,endY:r};return t?i:Cf({startX:n,startY:r},i)}function Fp(e){var t=0,n=0,r=0;return b(e,function(i){var l=i.startX,o=i.startY;t+=l,n+=o,r+=1}),t/=r,n/=r,{pageX:t,pageY:n}}function _t(e){var t=e.aspectRatio,n=e.height,r=e.width,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",l=ou(r),o=ou(n);if(l&&o){var a=n*t;i==="contain"&&a>r||i==="cover"&&a90?{width:s,height:a}:{width:a,height:s}}function Vp(e,t,n,r){var i=t.aspectRatio,l=t.naturalWidth,o=t.naturalHeight,a=t.rotate,s=a===void 0?0:a,u=t.scaleX,c=u===void 0?1:u,f=t.scaleY,d=f===void 0?1:f,g=n.aspectRatio,y=n.naturalWidth,x=n.naturalHeight,D=r.fillColor,p=D===void 0?"transparent":D,h=r.imageSmoothingEnabled,m=h===void 0?!0:h,w=r.imageSmoothingQuality,C=w===void 0?"low":w,v=r.maxWidth,E=v===void 0?1/0:v,N=r.maxHeight,j=N===void 0?1/0:N,T=r.minWidth,ee=T===void 0?0:T,ze=r.minHeight,we=ze===void 0?0:ze,De=document.createElement("canvas"),ce=De.getContext("2d"),Ve=_t({aspectRatio:g,width:E,height:j}),vt=_t({aspectRatio:g,width:ee,height:we},"cover"),_=Math.min(Ve.width,Math.max(vt.width,y)),M=Math.min(Ve.height,Math.max(vt.height,x)),L=_t({aspectRatio:i,width:E,height:j}),H=_t({aspectRatio:i,width:ee,height:we},"cover"),Z=Math.min(L.width,Math.max(H.width,l)),Ft=Math.min(L.height,Math.max(H.height,o)),it=[-Z/2,-Ft/2,Z,Ft];return De.width=Tn(_),De.height=Tn(M),ce.fillStyle=p,ce.fillRect(0,0,_,M),ce.save(),ce.translate(_/2,M/2),ce.rotate(s*Math.PI/180),ce.scale(c,d),ce.imageSmoothingEnabled=m,ce.imageSmoothingQuality=C,ce.drawImage.apply(ce,[e].concat(Nf(it.map(function(Hn){return Math.floor(Tn(Hn))})))),ce.restore(),De}var Af=String.fromCharCode;function Wp(e,t,n){var r="";n+=t;for(var i=t;i0;)n.push(Af.apply(null,Pf(i.subarray(0,r)))),i=i.subarray(r);return"data:".concat(t,";base64,").concat(btoa(n.join("")))}function Qp(e){var t=new DataView(e),n;try{var r,i,l;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var o=t.byteLength,a=2;a+1=8&&(l=u+f)}}}if(l){var d=t.getUint16(l,r),g,y;for(y=0;y=0?l:Rf),height:Math.max(r.offsetHeight,o>=0?o:Lf)};this.containerData=a,Nt(i,{width:a.width,height:a.height}),re(t,Se),nt(i,Se)},initCanvas:function(){var t=this.containerData,n=this.imageData,r=this.options.viewMode,i=Math.abs(n.rotate)%180===90,l=i?n.naturalHeight:n.naturalWidth,o=i?n.naturalWidth:n.naturalHeight,a=l/o,s=t.width,u=t.height;t.height*a>t.width?r===3?s=t.height*a:u=t.width/a:r===3?u=t.width/a:s=t.height*a;var c={aspectRatio:a,naturalWidth:l,naturalHeight:o,width:s,height:u};this.canvasData=c,this.limited=r===1||r===2,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=W({},c)},limitCanvas:function(t,n){var r=this.options,i=this.containerData,l=this.canvasData,o=this.cropBoxData,a=r.viewMode,s=l.aspectRatio,u=this.cropped&&o;if(t){var c=Number(r.minCanvasWidth)||0,f=Number(r.minCanvasHeight)||0;a>1?(c=Math.max(c,i.width),f=Math.max(f,i.height),a===3&&(f*s>c?c=f*s:f=c/s)):a>0&&(c?c=Math.max(c,u?o.width:0):f?f=Math.max(f,u?o.height:0):u&&(c=o.width,f=o.height,f*s>c?c=f*s:f=c/s));var d=_t({aspectRatio:s,width:c,height:f});c=d.width,f=d.height,l.minWidth=c,l.minHeight=f,l.maxWidth=1/0,l.maxHeight=1/0}if(n)if(a>(u?0:1)){var g=i.width-l.width,y=i.height-l.height;l.minLeft=Math.min(0,g),l.minTop=Math.min(0,y),l.maxLeft=Math.max(0,g),l.maxTop=Math.max(0,y),u&&this.limited&&(l.minLeft=Math.min(o.left,o.left+(o.width-l.width)),l.minTop=Math.min(o.top,o.top+(o.height-l.height)),l.maxLeft=o.left,l.maxTop=o.top,a===2&&(l.width>=i.width&&(l.minLeft=Math.min(0,g),l.maxLeft=Math.max(0,g)),l.height>=i.height&&(l.minTop=Math.min(0,y),l.maxTop=Math.max(0,y))))}else l.minLeft=-l.width,l.minTop=-l.height,l.maxLeft=i.width,l.maxTop=i.height},renderCanvas:function(t,n){var r=this.canvasData,i=this.imageData;if(n){var l=Hp({width:i.naturalWidth*Math.abs(i.scaleX||1),height:i.naturalHeight*Math.abs(i.scaleY||1),degree:i.rotate||0}),o=l.width,a=l.height,s=r.width*(o/r.naturalWidth),u=r.height*(a/r.naturalHeight);r.left-=(s-r.width)/2,r.top-=(u-r.height)/2,r.width=s,r.height=u,r.aspectRatio=o/a,r.naturalWidth=o,r.naturalHeight=a,this.limitCanvas(!0,!1)}(r.width>r.maxWidth||r.widthr.maxHeight||r.heightn.width?l.height=l.width/r:l.width=l.height*r),this.cropBoxData=l,this.limitCropBox(!0,!0),l.width=Math.min(Math.max(l.width,l.minWidth),l.maxWidth),l.height=Math.min(Math.max(l.height,l.minHeight),l.maxHeight),l.width=Math.max(l.minWidth,l.width*i),l.height=Math.max(l.minHeight,l.height*i),l.left=n.left+(n.width-l.width)/2,l.top=n.top+(n.height-l.height)/2,l.oldLeft=l.left,l.oldTop=l.top,this.initialCropBoxData=W({},l)},limitCropBox:function(t,n){var r=this.options,i=this.containerData,l=this.canvasData,o=this.cropBoxData,a=this.limited,s=r.aspectRatio;if(t){var u=Number(r.minCropBoxWidth)||0,c=Number(r.minCropBoxHeight)||0,f=a?Math.min(i.width,l.width,l.width+l.left,i.width-l.left):i.width,d=a?Math.min(i.height,l.height,l.height+l.top,i.height-l.top):i.height;u=Math.min(u,i.width),c=Math.min(c,i.height),s&&(u&&c?c*s>u?c=u/s:u=c*s:u?c=u/s:c&&(u=c*s),d*s>f?d=f/s:f=d*s),o.minWidth=Math.min(u,f),o.minHeight=Math.min(c,d),o.maxWidth=f,o.maxHeight=d}n&&(a?(o.minLeft=Math.max(0,l.left),o.minTop=Math.max(0,l.top),o.maxLeft=Math.min(i.width,l.left+l.width)-o.width,o.maxTop=Math.min(i.height,l.top+l.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=i.width-o.width,o.maxTop=i.height-o.height))},renderCropBox:function(){var t=this.options,n=this.containerData,r=this.cropBoxData;(r.width>r.maxWidth||r.widthr.maxHeight||r.height=n.width&&r.height>=n.height?zf:ja),Nt(this.cropBox,W({width:r.width,height:r.height},hr({translateX:r.left,translateY:r.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Mn(this.element,Lo,this.getData())}},Zp={initPreview:function(){var t=this.element,n=this.crossOrigin,r=this.options.preview,i=n?this.crossOriginUrl:this.url,l=t.alt||"The image to preview",o=document.createElement("img");if(n&&(o.crossOrigin=n),o.src=i,o.alt=l,this.viewBox.appendChild(o),this.viewBoxImage=o,!!r){var a=r;typeof r=="string"?a=t.ownerDocument.querySelectorAll(r):r.querySelector&&(a=[r]),this.previews=a,b(a,function(s){var u=document.createElement("img");Lr(s,ni,{width:s.offsetWidth,height:s.offsetHeight,html:s.innerHTML}),n&&(u.crossOrigin=n),u.src=i,u.alt=l,u.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',s.innerHTML="",s.appendChild(u)})}},resetPreview:function(){b(this.previews,function(t){var n=Ao(t,ni);Nt(t,{width:n.width,height:n.height}),t.innerHTML=n.html,Ap(t,ni)})},preview:function(){var t=this.imageData,n=this.canvasData,r=this.cropBoxData,i=r.width,l=r.height,o=t.width,a=t.height,s=r.left-n.left-t.left,u=r.top-n.top-t.top;!this.cropped||this.disabled||(Nt(this.viewBoxImage,W({width:o,height:a},hr(W({translateX:-s,translateY:-u},t)))),b(this.previews,function(c){var f=Ao(c,ni),d=f.width,g=f.height,y=d,x=g,D=1;i&&(D=d/i,x=l*D),l&&x>g&&(D=g/l,y=i*D,x=g),Nt(c,{width:y,height:x}),Nt(c.getElementsByTagName("img")[0],W({width:o*D,height:a*D},hr(W({translateX:-s*D,translateY:-u*D},t))))}))}},Jp={bind:function(){var t=this.element,n=this.options,r=this.cropper;xe(n.cropstart)&&je(t,jo,n.cropstart),xe(n.cropmove)&&je(t,Oo,n.cropmove),xe(n.cropend)&&je(t,Po,n.cropend),xe(n.crop)&&je(t,Lo,n.crop),xe(n.zoom)&&je(t,Io,n.zoom),je(r,qs,this.onCropStart=this.cropStart.bind(this)),n.zoomable&&n.zoomOnWheel&&je(r,ru,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),n.toggleDragModeOnDblclick&&je(r,Js,this.onDblclick=this.dblclick.bind(this)),je(t.ownerDocument,bs,this.onCropMove=this.cropMove.bind(this)),je(t.ownerDocument,eu,this.onCropEnd=this.cropEnd.bind(this)),n.responsive&&je(window,nu,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,n=this.options,r=this.cropper;xe(n.cropstart)&&$e(t,jo,n.cropstart),xe(n.cropmove)&&$e(t,Oo,n.cropmove),xe(n.cropend)&&$e(t,Po,n.cropend),xe(n.crop)&&$e(t,Lo,n.crop),xe(n.zoom)&&$e(t,Io,n.zoom),$e(r,qs,this.onCropStart),n.zoomable&&n.zoomOnWheel&&$e(r,ru,this.onWheel,{passive:!1,capture:!0}),n.toggleDragModeOnDblclick&&$e(r,Js,this.onDblclick),$e(t.ownerDocument,bs,this.onCropMove),$e(t.ownerDocument,eu,this.onCropEnd),n.responsive&&$e(window,nu,this.onResize)}},qp={resize:function(){if(!this.disabled){var t=this.options,n=this.container,r=this.containerData,i=n.offsetWidth/r.width,l=n.offsetHeight/r.height,o=Math.abs(i-1)>Math.abs(l-1)?i:l;if(o!==1){var a,s;t.restore&&(a=this.getCanvasData(),s=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(b(a,function(u,c){a[c]=u*o})),this.setCropBoxData(b(s,function(u,c){s[c]=u*o})))}}},dblclick:function(){this.disabled||this.options.dragMode===Mf||this.setDragMode(jp(this.dragBox,Mo)?Tf:Ia)},wheel:function(t){var n=this,r=Number(this.options.wheelZoomRatio)||.1,i=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){n.wheeling=!1},50),t.deltaY?i=t.deltaY>0?1:-1:t.wheelDelta?i=-t.wheelDelta/120:t.detail&&(i=t.detail>0?1:-1),this.zoom(-i*r,t)))},cropStart:function(t){var n=t.buttons,r=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(P(n)&&n!==1||P(r)&&r!==0||t.ctrlKey))){var i=this.options,l=this.pointers,o;t.changedTouches?b(t.changedTouches,function(a){l[a.identifier]=ri(a)}):l[t.pointerId||0]=ri(t),Object.keys(l).length>1&&i.zoomable&&i.zoomOnTouch?o=Df:o=Ao(t.target,Rr),Np.test(o)&&Mn(this.element,jo,{originalEvent:t,action:o})!==!1&&(t.preventDefault(),this.action=o,this.cropping=!1,o===_f&&(this.cropping=!0,re(this.dragBox,Fi)))}},cropMove:function(t){var n=this.action;if(!(this.disabled||!n)){var r=this.pointers;t.preventDefault(),Mn(this.element,Oo,{originalEvent:t,action:n})!==!1&&(t.changedTouches?b(t.changedTouches,function(i){W(r[i.identifier]||{},ri(i,!0))}):W(r[t.pointerId||0]||{},ri(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var n=this.action,r=this.pointers;t.changedTouches?b(t.changedTouches,function(i){delete r[i.identifier]}):delete r[t.pointerId||0],n&&(t.preventDefault(),Object.keys(r).length||(this.action=""),this.cropping&&(this.cropping=!1,Sn(this.dragBox,Fi,this.cropped&&this.options.modal)),Mn(this.element,Po,{originalEvent:t,action:n}))}}},bp={change:function(t){var n=this.options,r=this.canvasData,i=this.containerData,l=this.cropBoxData,o=this.pointers,a=this.action,s=n.aspectRatio,u=l.left,c=l.top,f=l.width,d=l.height,g=u+f,y=c+d,x=0,D=0,p=i.width,h=i.height,m=!0,w;!s&&t.shiftKey&&(s=f&&d?f/d:1),this.limited&&(x=l.minLeft,D=l.minTop,p=x+Math.min(i.width,r.width,r.left+r.width),h=D+Math.min(i.height,r.height,r.top+r.height));var C=o[Object.keys(o)[0]],v={x:C.endX-C.startX,y:C.endY-C.startY},E=function(j){switch(j){case Vt:g+v.x>p&&(v.x=p-g);break;case Wt:u+v.xh&&(v.y=h-y);break}};switch(a){case ja:u+=v.x,c+=v.y;break;case Vt:if(v.x>=0&&(g>=p||s&&(c<=D||y>=h))){m=!1;break}E(Vt),f+=v.x,f<0&&(a=Wt,f=-f,u-=f),s&&(d=f/s,c+=(l.height-d)/2);break;case yt:if(v.y<=0&&(c<=D||s&&(u<=x||g>=p))){m=!1;break}E(yt),d-=v.y,c+=v.y,d<0&&(a=an,d=-d,c-=d),s&&(f=d*s,u+=(l.width-f)/2);break;case Wt:if(v.x<=0&&(u<=x||s&&(c<=D||y>=h))){m=!1;break}E(Wt),f-=v.x,u+=v.x,f<0&&(a=Vt,f=-f,u-=f),s&&(d=f/s,c+=(l.height-d)/2);break;case an:if(v.y>=0&&(y>=h||s&&(u<=x||g>=p))){m=!1;break}E(an),d+=v.y,d<0&&(a=yt,d=-d,c-=d),s&&(f=d*s,u+=(l.width-f)/2);break;case Zn:if(s){if(v.y<=0&&(c<=D||g>=p)){m=!1;break}E(yt),d-=v.y,c+=v.y,f=d*s}else E(yt),E(Vt),v.x>=0?gD&&(d-=v.y,c+=v.y):(d-=v.y,c+=v.y);f<0&&d<0?(a=bn,d=-d,f=-f,c-=d,u-=f):f<0?(a=Jn,f=-f,u-=f):d<0&&(a=qn,d=-d,c-=d);break;case Jn:if(s){if(v.y<=0&&(c<=D||u<=x)){m=!1;break}E(yt),d-=v.y,c+=v.y,f=d*s,u+=l.width-f}else E(yt),E(Wt),v.x<=0?u>x?(f-=v.x,u+=v.x):v.y<=0&&c<=D&&(m=!1):(f-=v.x,u+=v.x),v.y<=0?c>D&&(d-=v.y,c+=v.y):(d-=v.y,c+=v.y);f<0&&d<0?(a=qn,d=-d,f=-f,c-=d,u-=f):f<0?(a=Zn,f=-f,u-=f):d<0&&(a=bn,d=-d,c-=d);break;case bn:if(s){if(v.x<=0&&(u<=x||y>=h)){m=!1;break}E(Wt),f-=v.x,u+=v.x,d=f/s}else E(an),E(Wt),v.x<=0?u>x?(f-=v.x,u+=v.x):v.y>=0&&y>=h&&(m=!1):(f-=v.x,u+=v.x),v.y>=0?y=0&&(g>=p||y>=h)){m=!1;break}E(Vt),f+=v.x,d=f/s}else E(an),E(Vt),v.x>=0?g=0&&y>=h&&(m=!1):f+=v.x,v.y>=0?y0?a=v.y>0?qn:Zn:v.x<0&&(u-=f,a=v.y>0?bn:Jn),v.y<0&&(c-=d),this.cropped||(nt(this.cropBox,Se),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}m&&(l.width=f,l.height=d,l.left=u,l.top=c,this.action=a,this.renderCropBox()),b(o,function(N){N.startX=N.endX,N.startY=N.endY})}},em={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&re(this.dragBox,Fi),nt(this.cropBox,Se),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=W({},this.initialImageData),this.canvasData=W({},this.initialCanvasData),this.cropBoxData=W({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(W(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),nt(this.dragBox,Fi),re(this.cropBox,Se)),this},replace:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),n?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,b(this.previews,function(r){r.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,nt(this.cropper,Gs)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,re(this.cropper,Gs)),this},destroy:function(){var t=this.element;return t[V]?(t[V]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=this.canvasData,i=r.left,l=r.top;return this.moveTo(Ml(t)?t:i+Number(t),Ml(n)?n:l+Number(n))},moveTo:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=this.canvasData,i=!1;return t=Number(t),n=Number(n),this.ready&&!this.disabled&&this.options.movable&&(P(t)&&(r.left=t,i=!0),P(n)&&(r.top=n,i=!0),i&&this.renderCanvas(!0)),this},zoom:function(t,n){var r=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(r.width*t/r.naturalWidth,null,n)},zoomTo:function(t,n,r){var i=this.options,l=this.canvasData,o=l.width,a=l.height,s=l.naturalWidth,u=l.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&i.zoomable){var c=s*t,f=u*t;if(Mn(this.element,Io,{ratio:t,oldRatio:o/s,originalEvent:r})===!1)return this;if(r){var d=this.pointers,g=If(this.cropper),y=d&&Object.keys(d).length?Fp(d):{pageX:r.pageX,pageY:r.pageY};l.left-=(c-o)*((y.pageX-g.left-l.left)/o),l.top-=(f-a)*((y.pageY-g.top-l.top)/a)}else xn(n)&&P(n.x)&&P(n.y)?(l.left-=(c-o)*((n.x-l.left)/o),l.top-=(f-a)*((n.y-l.top)/a)):(l.left-=(c-o)/2,l.top-=(f-a)/2);l.width=c,l.height=f,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),P(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var n=this.imageData.scaleY;return this.scale(t,P(n)?n:1)},scaleY:function(t){var n=this.imageData.scaleX;return this.scale(P(n)?n:1,t)},scale:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=this.imageData,i=!1;return t=Number(t),n=Number(n),this.ready&&!this.disabled&&this.options.scalable&&(P(t)&&(r.scaleX=t,i=!0),P(n)&&(r.scaleY=n,i=!0),i&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.options,r=this.imageData,i=this.canvasData,l=this.cropBoxData,o;if(this.ready&&this.cropped){o={x:l.left-i.left,y:l.top-i.top,width:l.width,height:l.height};var a=r.width/r.naturalWidth;if(b(o,function(c,f){o[f]=c/a}),t){var s=Math.round(o.y+o.height),u=Math.round(o.x+o.width);o.x=Math.round(o.x),o.y=Math.round(o.y),o.width=u-o.x,o.height=s-o.y}}else o={x:0,y:0,width:0,height:0};return n.rotatable&&(o.rotate=r.rotate||0),n.scalable&&(o.scaleX=r.scaleX||1,o.scaleY=r.scaleY||1),o},setData:function(t){var n=this.options,r=this.imageData,i=this.canvasData,l={};if(this.ready&&!this.disabled&&xn(t)){var o=!1;n.rotatable&&P(t.rotate)&&t.rotate!==r.rotate&&(r.rotate=t.rotate,o=!0),n.scalable&&(P(t.scaleX)&&t.scaleX!==r.scaleX&&(r.scaleX=t.scaleX,o=!0),P(t.scaleY)&&t.scaleY!==r.scaleY&&(r.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var a=r.width/r.naturalWidth;P(t.x)&&(l.left=t.x*a+i.left),P(t.y)&&(l.top=t.y*a+i.top),P(t.width)&&(l.width=t.width*a),P(t.height)&&(l.height=t.height*a),this.setCropBoxData(l)}return this},getContainerData:function(){return this.ready?W({},this.containerData):{}},getImageData:function(){return this.sized?W({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,n={};return this.ready&&b(["left","top","width","height","naturalWidth","naturalHeight"],function(r){n[r]=t[r]}),n},setCanvasData:function(t){var n=this.canvasData,r=n.aspectRatio;return this.ready&&!this.disabled&&xn(t)&&(P(t.left)&&(n.left=t.left),P(t.top)&&(n.top=t.top),P(t.width)?(n.width=t.width,n.height=t.width/r):P(t.height)&&(n.height=t.height,n.width=t.height*r),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,n;return this.ready&&this.cropped&&(n={left:t.left,top:t.top,width:t.width,height:t.height}),n||{}},setCropBoxData:function(t){var n=this.cropBoxData,r=this.options.aspectRatio,i,l;return this.ready&&this.cropped&&!this.disabled&&xn(t)&&(P(t.left)&&(n.left=t.left),P(t.top)&&(n.top=t.top),P(t.width)&&t.width!==n.width&&(i=!0,n.width=t.width),P(t.height)&&t.height!==n.height&&(l=!0,n.height=t.height),r&&(i?n.height=n.width/r:l&&(n.width=n.height*r)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var n=this.canvasData,r=Vp(this.image,this.imageData,n,t);if(!this.cropped)return r;var i=this.getData(),l=i.x,o=i.y,a=i.width,s=i.height,u=r.width/Math.floor(n.naturalWidth);u!==1&&(l*=u,o*=u,a*=u,s*=u);var c=a/s,f=_t({aspectRatio:c,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),d=_t({aspectRatio:c,width:t.minWidth||0,height:t.minHeight||0},"cover"),g=_t({aspectRatio:c,width:t.width||(u!==1?r.width:a),height:t.height||(u!==1?r.height:s)}),y=g.width,x=g.height;y=Math.min(f.width,Math.max(d.width,y)),x=Math.min(f.height,Math.max(d.height,x));var D=document.createElement("canvas"),p=D.getContext("2d");D.width=Tn(y),D.height=Tn(x),p.fillStyle=t.fillColor||"transparent",p.fillRect(0,0,y,x);var h=t.imageSmoothingEnabled,m=h===void 0?!0:h,w=t.imageSmoothingQuality;p.imageSmoothingEnabled=m,w&&(p.imageSmoothingQuality=w);var C=r.width,v=r.height,E=l,N=o,j,T,ee,ze,we,De;E<=-a||E>C?(E=0,j=0,ee=0,we=0):E<=0?(ee=-E,E=0,j=Math.min(C,a+E),we=j):E<=C&&(ee=0,j=Math.min(a,C-E),we=j),j<=0||N<=-s||N>v?(N=0,T=0,ze=0,De=0):N<=0?(ze=-N,N=0,T=Math.min(v,s+N),De=T):N<=v&&(ze=0,T=Math.min(s,v-N),De=T);var ce=[E,N,j,T];if(we>0&&De>0){var Ve=y/a;ce.push(ee*Ve,ze*Ve,we*Ve,De*Ve)}return p.drawImage.apply(p,[r].concat(Nf(ce.map(function(vt){return Math.floor(Tn(vt))})))),D},setAspectRatio:function(t){var n=this.options;return!this.disabled&&!Ml(t)&&(n.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var n=this.options,r=this.dragBox,i=this.face;if(this.ready&&!this.disabled){var l=t===Ia,o=n.movable&&t===Tf;t=l||o?t:Mf,n.dragMode=t,Lr(r,Rr,t),Sn(r,Mo,l),Sn(r,Ro,o),n.cropBoxMovable||(Lr(i,Rr,t),Sn(i,Mo,l),Sn(i,Ro,o))}return this}},tm=rt.Cropper,Uf=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(pp(this,e),!t||!Dp.test(t.tagName))throw new Error("The first argument is required and must be an or element.");this.element=t,this.options=W({},lu,xn(n)&&n),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return mp(e,[{key:"init",value:function(){var n=this.element,r=n.tagName.toLowerCase(),i;if(!n[V]){if(n[V]=this,r==="img"){if(this.isImg=!0,i=n.getAttribute("src")||"",this.originalUrl=i,!i)return;i=n.src}else r==="canvas"&&window.HTMLCanvasElement&&(i=n.toDataURL());this.load(i)}}},{key:"load",value:function(n){var r=this;if(n){this.url=n,this.imageData={};var i=this.element,l=this.options;if(!l.rotatable&&!l.scalable&&(l.checkOrientation=!1),!l.checkOrientation||!window.ArrayBuffer){this.clone();return}if(_p.test(n)){zp.test(n)?this.read(Yp(n)):this.clone();return}var o=new XMLHttpRequest,a=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=a,o.onerror=a,o.ontimeout=a,o.onprogress=function(){o.getResponseHeader("content-type")!==iu&&o.abort()},o.onload=function(){r.read(o.response)},o.onloadend=function(){r.reloading=!1,r.xhr=null},l.checkCrossOrigin&&au(n)&&i.crossOrigin&&(n=su(n)),o.open("GET",n,!0),o.responseType="arraybuffer",o.withCredentials=i.crossOrigin==="use-credentials",o.send()}}},{key:"read",value:function(n){var r=this.options,i=this.imageData,l=Qp(n),o=0,a=1,s=1;if(l>1){this.url=Xp(n,iu);var u=Kp(l);o=u.rotate,a=u.scaleX,s=u.scaleY}r.rotatable&&(i.rotate=o),r.scalable&&(i.scaleX=a,i.scaleY=s),this.clone()}},{key:"clone",value:function(){var n=this.element,r=this.url,i=n.crossOrigin,l=r;this.options.checkCrossOrigin&&au(r)&&(i||(i="anonymous"),l=su(r)),this.crossOrigin=i,this.crossOriginUrl=l;var o=document.createElement("img");i&&(o.crossOrigin=i),o.src=l||r,o.alt=n.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),re(o,Zs),n.parentNode.insertBefore(o,n.nextSibling)}},{key:"start",value:function(){var n=this,r=this.image;r.onload=null,r.onerror=null,this.sizing=!0;var i=rt.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(rt.navigator.userAgent),l=function(u,c){W(n.imageData,{naturalWidth:u,naturalHeight:c,aspectRatio:u/c}),n.initialImageData=W({},n.imageData),n.sizing=!1,n.sized=!0,n.build()};if(r.naturalWidth&&!i){l(r.naturalWidth,r.naturalHeight);return}var o=document.createElement("img"),a=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){l(o.width,o.height),i||a.removeChild(o)},o.src=r.src,i||(o.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",a.appendChild(o))}},{key:"stop",value:function(){var n=this.image;n.onload=null,n.onerror=null,n.parentNode.removeChild(n),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var n=this.element,r=this.options,i=this.image,l=n.parentNode,o=document.createElement("div");o.innerHTML=Tp;var a=o.querySelector(".".concat(V,"-container")),s=a.querySelector(".".concat(V,"-canvas")),u=a.querySelector(".".concat(V,"-drag-box")),c=a.querySelector(".".concat(V,"-crop-box")),f=c.querySelector(".".concat(V,"-face"));this.container=l,this.cropper=a,this.canvas=s,this.dragBox=u,this.cropBox=c,this.viewBox=a.querySelector(".".concat(V,"-view-box")),this.face=f,s.appendChild(i),re(n,Se),l.insertBefore(a,n.nextSibling),nt(i,Zs),this.initPreview(),this.bind(),r.initialAspectRatio=Math.max(0,r.initialAspectRatio)||NaN,r.aspectRatio=Math.max(0,r.aspectRatio)||NaN,r.viewMode=Math.max(0,Math.min(3,Math.round(r.viewMode)))||0,re(c,Se),r.guides||re(c.getElementsByClassName("".concat(V,"-dashed")),Se),r.center||re(c.getElementsByClassName("".concat(V,"-center")),Se),r.background&&re(a,"".concat(V,"-bg")),r.highlight||re(f,Sp),r.cropBoxMovable&&(re(f,Ro),Lr(f,Rr,ja)),r.cropBoxResizable||(re(c.getElementsByClassName("".concat(V,"-line")),Se),re(c.getElementsByClassName("".concat(V,"-point")),Se)),this.render(),this.ready=!0,this.setDragMode(r.dragMode),r.autoCrop&&this.crop(),this.setData(r.data),xe(r.ready)&&je(n,tu,r.ready,{once:!0}),Mn(n,tu)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var n=this.cropper.parentNode;n&&n.removeChild(this.cropper),nt(this.element,Se)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=tm,e}},{key:"setDefaults",value:function(n){W(lu,xn(n)&&n)}}]),e}();W(Uf.prototype,Gp,Zp,Jp,qp,bp,em);function nm(e,t,n,r){return new(n||(n=Promise))(function(i,l){function o(u){try{s(r.next(u))}catch(c){l(c)}}function a(u){try{s(r.throw(u))}catch(c){l(c)}}function s(u){var c;u.done?i(u.value):(c=u.value,c instanceof n?c:new n(function(f){f(c)})).then(o,a)}s((r=r.apply(e,t||[])).next())})}function rm(e,t){var n,r,i,l,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return l={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function a(s){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(i=o.trys,!((i=i.length>0&&i[i.length-1])||c[0]!==6&&c[0]!==2)){o=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]=t.size)return[2,f({status:d.size>n?"already-compressed":"success",compressedImg:t})];if(!(d.size>n))return[2,f({status:"success",compressedImg:d})];if(d.size===y)return[2,f({status:"max-compression-reached"})];if(y=d.size,u<=++g)return[2,f({status:"max-iterations-exceeded"})];if(Date.now()-x>c)return[2,f({status:"time-out"})];p.label=6;case 6:if(t.size>d.size)return[3,1];p.label=7;case 7:return[2]}})})})};const Uo=window.URL||window.webkitURL,R=class R extends Pl.Component{constructor(){super(...arguments);K(this,"componentDidMount",()=>R._this=this);K(this,"cropper",null);K(this,"img","");K(this,"imgRef",Pl.createRef());K(this,"state",{img:"",rotation:0,progress:0});K(this,"onRotate",n=>{R.processing||this.setState({rotation:n.target.value},()=>this.cropper.rotateTo(this.state.rotation))});K(this,"onReset",()=>{R.processing||this.setState({rotation:0},()=>this.cropper.reset())});K(this,"close",()=>{R.processing||(this.setState({img:""}),this.cropper.destroy(),this.cropper=null,R.icon=null,R.fill=null,R.maxSize=null,R.onReady=null,R.onCancel=null,R.processing=!1,document.body.style.overflow="unset")});K(this,"onCancel",()=>{R.onCancel&&R.onCancel("canceled"),this.close()});K(this,"onDone",async()=>{if(R.processing)return;R.processing=!0,this.cropper.disable();let n="image/png";const r={};R.fill&&(r.fillColor=R.fill),R.icon||(n="image/jpeg",R.fill||(r.fillColor="#ffffff"));let i=this.cropper.getCroppedCanvas(r).toDataURL(n);if(i=await lm(i),R.maxSize&&!R.icon){const{status:l,compressedImg:o}=await uu({img:i,maxSize:R.maxSize,onProgress:({progress:a})=>this.setState({progress:a})});l==="success"&&(i=o)}R.onReady&&R.onReady(i),R.processing=!1,this.close()});K(this,"render",()=>this.state.img?k.jsxs("div",{className:"jinie jinie-"+this.props.theme,children:[k.jsxs("div",{className:"jinie-editor",children:[k.jsx("div",{className:"jinie-rotation",children:this.state.progress?k.jsx("div",{className:"jinie-progress",children:k.jsx("div",{className:"jinie-progress-filled",style:{width:this.state.progress+"%"}})}):k.jsx("input",{value:this.state.rotation,min:-180,max:180,step:.1,onChange:this.onRotate,type:"range"})}),k.jsxs("div",{className:"jinie-buttons",children:[k.jsx("div",{onClick:this.onReset,className:"jinie-icon jinie-icon-reset",children:Ll.reset}),k.jsx("div",{onClick:this.onCancel,className:"jinie-icon jinie-icon-cancel",children:Ll.cancel}),k.jsx("div",{onClick:this.onDone,className:"jinie-icon jinie-icon-done",children:Ll.done})]})]}),k.jsx("div",{className:"jinie-image-box",children:k.jsx("div",{children:k.jsx("img",{width:"100%",ref:n=>this.imgRef=n,src:this.state.img})})})]}):null)}};K(R,"_this"),K(R,"defaultProps",{theme:"light"}),K(R,"init",async({img:n,onReady:r,onCancel:i,aspectRatio:l,icon:o,fill:a,minWidth:s=32,minHeight:u=32,minSize:c,maxSize:f})=>{if(!n)return;const{width:d,height:g,size:y}=await om(n);if(d{const x={};l&&(x.aspectRatio=l),s&&(x.minCropBoxWidth=s),u&&(x.minCropBoxHeight=u),R._this.cropper=new Uf(R._this.imgRef,{dragMode:"move",autoCrop:!0,autoCropArea:1,background:!1,highlight:!0,...x}),o&&(R.icon=o),a&&(R.fill=a),f&&(R.maxSize=f),r&&(R.onReady=r),i&&(R.onCancel=i)}),document.body.style.overflow="hidden"}),K(R,"icon",null),K(R,"fill",null),K(R,"maxSize",null),K(R,"onReady",null),K(R,"onCancel",null),K(R,"processing",!1),K(R,"CompressionLoop",n=>uu(n));let ot=R;const Ll={reset:k.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",enableBackground:"new 0 0 24 24",height:"24px",viewBox:"0 0 24 24",width:"24px",className:"jinie-buttons-reset",children:[k.jsx("g",{children:k.jsx("path",{d:"M0,0h24v24H0V0z",fill:"none"})}),k.jsx("g",{children:k.jsx("g",{children:k.jsx("path",{d:"M6,13c0-1.65,0.67-3.15,1.76-4.24L6.34,7.34C4.9,8.79,4,10.79,4,13c0,4.08,3.05,7.44,7,7.93v-2.02 C8.17,18.43,6,15.97,6,13z M20,13c0-4.42-3.58-8-8-8c-0.06,0-0.12,0.01-0.18,0.01l1.09-1.09L11.5,2.5L8,6l3.5,3.5l1.41-1.41 l-1.08-1.08C11.89,7.01,11.95,7,12,7c3.31,0,6,2.69,6,6c0,2.97-2.17,5.43-5,5.91v2.02C16.95,20.44,20,17.08,20,13z"})})})]}),cancel:k.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",className:"jinie-buttons-cancel",children:[k.jsx("path",{d:"M0 0h24v24H0V0z",fill:"none"}),k.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"})]}),done:k.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",className:"jinie-buttons-done",children:[k.jsx("path",{d:"M0 0h24v24H0V0z",fill:"none"}),k.jsx("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"})]}),flipX:k.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",children:[k.jsx("path",{d:"M0 0h24v24H0V0z",fill:"none"}),k.jsx("path",{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"})]}),flipY:k.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",style:{transform:"rotate(90deg)"},children:[k.jsx("path",{d:"M0 0h24v24H0V0z",fill:"none"}),k.jsx("path",{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"})]}),zoomIn:k.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",children:[k.jsx("path",{d:"M0 0h24v24H0V0z",fill:"none"}),k.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zm.5-7H9v2H7v1h2v2h1v-2h2V9h-2z"})]}),zoomOut:k.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",children:[k.jsx("path",{d:"M0 0h24v24H0V0z",fill:"none"}),k.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"})]})},lm=e=>new Promise(async(t,n)=>{try{const i=await(await fetch(e)).blob();t(i)}catch(r){n(r)}}),om=e=>new Promise((t,n)=>{const r=new Image,i=Uo.createObjectURL(e);r.onload=()=>{t({width:r.width,height:r.height,size:e.size}),Uo.revokeObjectURL(i)},r.onerror=l=>n(l),r.src=i}),am="_title_1nj27_1",sm="_label_1nj27_10",um="_uploadedImg_1nj27_22",cm="_maxSizeRange_1nj27_37",fm="_theme_1nj27_47",dm="_active_1nj27_58",oe={title:am,label:sm,break:"_break_1nj27_15",uploadedImg:um,maxSizeRange:cm,theme:fm,active:dm};function hm(){const[e,t]=kn.useState(""),[n,r]=kn.useState(1e3),[i,l]=kn.useState("light");return k.jsxs("div",{children:[k.jsx(ot,{theme:i}),e?k.jsx("div",{className:oe.uploadedImg,onClick:()=>t(""),children:k.jsx("img",{src:e})}):k.jsxs("div",{children:[k.jsx("div",{className:oe.title,children:"Examples"}),k.jsx("div",{className:oe.label,children:"Simple image editor"}),k.jsx("input",{type:"file",accept:"image/jpeg",onChange:async o=>{e&&window.URL.revokeObjectURL(e);const a=o.target.files[0];ot.init({img:a,onReady:s=>t(window.URL.createObjectURL(s))})}}),k.jsx("div",{className:oe.break}),k.jsx("div",{className:oe.label,children:"Upload with compression"}),k.jsx("input",{type:"file",accept:"image/jpeg",onChange:async o=>{e&&window.URL.revokeObjectURL(e);const a=o.target.files[0];ot.init({img:a,onReady:s=>t(window.URL.createObjectURL(s)),maxSize:n})}}),k.jsxs("div",{className:oe.maxSizeRange,children:[k.jsx("input",{type:"range",min:100,max:2e3,step:100,value:n,onChange:o=>r(o.target.value)}),k.jsxs("label",{children:[n?`Compress to: ${n} KB`:"No compression!"," "]})]}),k.jsx("div",{className:oe.break}),k.jsx("div",{className:oe.label,children:"Upload square png image with transparent background"}),k.jsx("input",{type:"file",accept:"image/png",onChange:async o=>{e&&window.URL.revokeObjectURL(e);const a=o.target.files[0];ot.init({img:a,onReady:s=>t(window.URL.createObjectURL(s)),aspectRatio:1,icon:!0})}}),k.jsx("div",{className:oe.break}),k.jsx("div",{className:oe.label,children:"Upload png image with red background"}),k.jsx("input",{type:"file",accept:"image/png",onChange:async o=>{e&&window.URL.revokeObjectURL(e);const a=o.target.files[0];ot.init({img:a,onReady:s=>t(window.URL.createObjectURL(s)),aspectRatio:1,icon:!0,fill:"#ff0000"})}}),k.jsx("div",{className:oe.break}),k.jsx("div",{className:oe.label,children:"Min width & height to be 512px"}),k.jsx("input",{type:"file",accept:"image/png",onChange:async o=>{e&&window.URL.revokeObjectURL(e);const a=o.target.files[0];ot.init({img:a,onReady:s=>t(window.URL.createObjectURL(s)),onCancel:s=>console.log(s),minWidth:512,minHeight:512})}}),k.jsx("div",{className:oe.break}),k.jsx("div",{className:oe.label,children:"Light/Dark Theme"}),k.jsxs("div",{className:oe.theme,children:[k.jsx("div",{className:i==="light"?oe.active:"",onClick:()=>l("light"),children:"Light"}),k.jsx("div",{className:i==="dark"?oe.active:"",onClick:()=>l("dark"),children:"Dark"})]}),k.jsx("br",{}),k.jsx("input",{type:"file",accept:"image/jpeg",onChange:async o=>{e&&window.URL.revokeObjectURL(e);const a=o.target.files[0];ot.init({img:a,onReady:s=>t(window.URL.createObjectURL(s))})}})]})]})}Ol.createRoot(document.getElementById("root")).render(k.jsx(Pl.StrictMode,{children:k.jsx(hp,{children:k.jsx(hm,{})})})); diff --git a/github.svg b/github.svg new file mode 100644 index 0000000..37fa923 --- /dev/null +++ b/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..8592558 --- /dev/null +++ b/index.html @@ -0,0 +1,25 @@ + + + + + + + + + Jinie - Simple Image Editing & Compression Tool + + + + + + + + + + + +
Jinie
Simple Image Editing & Compression Tool
npm i jinie
  • Simple implementation
  • Responsive with light/dark theme
  • In-built image compression
Docs  âžž
Examples
Simple image editor
Upload with compression
Upload square png image with transparent background
Upload png image with red background
Min width & height to be 512px
Light/Dark Theme
Light
Dark

+ + + + \ No newline at end of file diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..c76e1f9 Binary files /dev/null and b/logo.png differ diff --git a/texture.png b/texture.png new file mode 100644 index 0000000..77e7abd Binary files /dev/null and b/texture.png differ