import{A as Ee,R as pe,s as Be,j as vt,r as Ki,C as Gi,B as Wi}from"./index.52c19e01.js";import"./formatNumber.710686f0.js";import{T as Zi}from"./TextField.ca0ae25e.js";var zt;try{zt=Map}catch{}var Kt;try{Kt=Set}catch{}function xn(e,n,t){if(!e||typeof e!="object"||typeof e=="function")return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);if(Array.isArray(e))return e.map(Gt);if(zt&&e instanceof zt)return new Map(Array.from(e.entries()));if(Kt&&e instanceof Kt)return new Set(Array.from(e.values()));if(e instanceof Object){n.push(e);var r=Object.create(e);t.push(r);for(var i in e){var c=n.findIndex(function(y){return y===e[i]});r[i]=c>-1?t[c]:xn(e[i],n,t)}return r}return e}function Gt(e){return xn(e,[],[])}const Yi=Object.prototype.toString,Xi=Error.prototype.toString,Qi=RegExp.prototype.toString,Ji=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",eo=/^Symbol\((.*)\)(.*)$/;function to(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Ar(e,n=!1){if(e==null||e===!0||e===!1)return""+e;const t=typeof e;if(t==="number")return to(e);if(t==="string")return n?`"${e}"`:e;if(t==="function")return"[Function "+(e.name||"anonymous")+"]";if(t==="symbol")return Ji.call(e).replace(eo,"Symbol($1)");const r=Yi.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+Xi.call(e)+"]":r==="RegExp"?Qi.call(e):null}function nt(e,n){let t=Ar(e,n);return t!==null?t:JSON.stringify(e,function(r,i){let c=Ar(this[r],n);return c!==null?c:i},2)}let Ie={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:n,value:t,originalValue:r})=>{let i=r!=null&&r!==t,c=`${e} must be a \`${n}\` type, but the final value was: \`${nt(t,!0)}\``+(i?` (cast from the value \`${nt(r,!0)}\`).`:".");return t===null&&(c+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),c},defined:"${path} must be defined"},Te={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Re={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Wt={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},ro={isValue:"${path} field must be ${value}"},Zt={noUnknown:"${path} field has unspecified keys: ${unknown}"},no={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"};Object.assign(Object.create(null),{mixed:Ie,string:Te,number:Re,date:Wt,object:Zt,array:no,boolean:ro});var io=Object.prototype,oo=io.hasOwnProperty;function ao(e,n){return e!=null&&oo.call(e,n)}var lo=ao,so=Array.isArray,Ce=so,uo=typeof Ee=="object"&&Ee&&Ee.Object===Object&&Ee,An=uo,fo=An,co=typeof self=="object"&&self&&self.Object===Object&&self,ho=fo||co||Function("return this")(),Le=ho,po=Le,vo=po.Symbol,Tt=vo,kr=Tt,kn=Object.prototype,yo=kn.hasOwnProperty,go=kn.toString,et=kr?kr.toStringTag:void 0;function mo(e){var n=yo.call(e,et),t=e[et];try{e[et]=void 0;var r=!0}catch{}var i=go.call(e);return r&&(n?e[et]=t:delete e[et]),i}var bo=mo,_o=Object.prototype,Oo=_o.toString;function Eo(e){return Oo.call(e)}var wo=Eo,Tr=Tt,xo=bo,Ao=wo,ko="[object Null]",To="[object Undefined]",Sr=Tr?Tr.toStringTag:void 0;function So(e){return e==null?e===void 0?To:ko:Sr&&Sr in Object(e)?xo(e):Ao(e)}var it=So;function qo(e){return e!=null&&typeof e=="object"}var ot=qo,No=it,Po=ot,Fo="[object Symbol]";function Lo(e){return typeof e=="symbol"||Po(e)&&No(e)==Fo}var sr=Lo,Ro=Ce,Do=sr,$o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Co=/^\w*$/;function Io(e,n){if(Ro(e))return!1;var t=typeof e;return t=="number"||t=="symbol"||t=="boolean"||e==null||Do(e)?!0:Co.test(e)||!$o.test(e)||n!=null&&e in Object(n)}var ur=Io;function jo(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var fr=jo,Mo=it,Bo=fr,Uo="[object AsyncFunction]",Vo="[object Function]",Ho="[object GeneratorFunction]",zo="[object Proxy]";function Ko(e){if(!Bo(e))return!1;var n=Mo(e);return n==Vo||n==Ho||n==Uo||n==zo}var Tn=Ko,Go=Le,Wo=Go["__core-js_shared__"],Zo=Wo,Ct=Zo,qr=function(){var e=/[^.]+$/.exec(Ct&&Ct.keys&&Ct.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Yo(e){return!!qr&&qr in e}var Xo=Yo,Qo=Function.prototype,Jo=Qo.toString;function ea(e){if(e!=null){try{return Jo.call(e)}catch{}try{return e+""}catch{}}return""}var Sn=ea,ta=Tn,ra=Xo,na=fr,ia=Sn,oa=/[\\^$.*+?()[\]{}|]/g,aa=/^\[object .+?Constructor\]$/,la=Function.prototype,sa=Object.prototype,ua=la.toString,fa=sa.hasOwnProperty,ca=RegExp("^"+ua.call(fa).replace(oa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ha(e){if(!na(e)||ra(e))return!1;var n=ta(e)?ca:aa;return n.test(ia(e))}var da=ha;function pa(e,n){return e==null?void 0:e[n]}var va=pa,ya=da,ga=va;function ma(e,n){var t=ga(e,n);return ya(t)?t:void 0}var Ue=ma,ba=Ue,_a=ba(Object,"create"),St=_a,Nr=St;function Oa(){this.__data__=Nr?Nr(null):{},this.size=0}var Ea=Oa;function wa(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var xa=wa,Aa=St,ka="__lodash_hash_undefined__",Ta=Object.prototype,Sa=Ta.hasOwnProperty;function qa(e){var n=this.__data__;if(Aa){var t=n[e];return t===ka?void 0:t}return Sa.call(n,e)?n[e]:void 0}var Na=qa,Pa=St,Fa=Object.prototype,La=Fa.hasOwnProperty;function Ra(e){var n=this.__data__;return Pa?n[e]!==void 0:La.call(n,e)}var Da=Ra,$a=St,Ca="__lodash_hash_undefined__";function Ia(e,n){var t=this.__data__;return this.size+=this.has(e)?0:1,t[e]=$a&&n===void 0?Ca:n,this}var ja=Ia,Ma=Ea,Ba=xa,Ua=Na,Va=Da,Ha=ja;function Ze(e){var n=-1,t=e==null?0:e.length;for(this.clear();++n-1}var ll=al,sl=qt;function ul(e,n){var t=this.__data__,r=sl(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this}var fl=ul,cl=Ga,hl=tl,dl=il,pl=ll,vl=fl;function Ye(e){var n=-1,t=e==null?0:e.length;for(this.clear();++n-1&&e%1==0&&e-1&&e%1==0&&e<=Ts}var pr=Ss,qs=sr,Ns=1/0;function Ps(e){if(typeof e=="string"||qs(e))return e;var n=e+"";return n=="0"&&1/e==-Ns?"-0":n}var Ft=Ps,Fs=Fn,Ls=Rn,Rs=Ce,Ds=Dn,$s=pr,Cs=Ft;function Is(e,n,t){n=Fs(n,e);for(var r=-1,i=n.length,c=!1;++re&&e.__isYupSchema__;class Us{constructor(n,t){if(this.fn=void 0,this.refs=n,this.refs=n,typeof t=="function"){this.fn=t;return}if(!yt(t,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:c}=t,y=typeof r=="function"?r:(...O)=>O.every(g=>g===r);this.fn=function(...O){let g=O.pop(),_=O.pop(),p=y(...O)?i:c;if(!!p)return typeof p=="function"?p(_):_.concat(p.resolve(g))}}resolve(n,t){let r=this.refs.map(c=>c.getValue(t==null?void 0:t.value,t==null?void 0:t.parent,t==null?void 0:t.context)),i=this.fn.apply(n,r.concat(n,t));if(i===void 0||i===n)return n;if(!Cn(i))throw new TypeError("conditions must return a schema object");return i.resolve(t)}}function In(e){return e==null?[]:[].concat(e)}function Yt(){return Yt=Object.assign||function(e){for(var n=1;nnt(t[c])):typeof n=="function"?n(t):n}static isError(n){return n&&n.name==="ValidationError"}constructor(n,t,r,i){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=t,this.path=r,this.type=i,this.errors=[],this.inner=[],In(n).forEach(c=>{we.isError(c)?(this.errors.push(...c.errors),this.inner=this.inner.concat(c.inner.length?c.inner:c)):this.errors.push(c)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,we)}}const Hs=e=>{let n=!1;return(...t)=>{n||(n=!0,e(...t))}};function Xt(e,n){let{endEarly:t,tests:r,args:i,value:c,errors:y,sort:O,path:g}=e,_=Hs(n),p=r.length;const l=[];if(y=y||[],!p)return y.length?_(new we(y,c,g)):_(null,c);for(let o=0;oO))return!1;var _=c.get(e),p=c.get(n);if(_&&p)return _==n&&p==e;var l=-1,o=!0,a=t&ic?new ec:void 0;for(c.set(e,n),c.set(n,e);++l=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=n};var Kd=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Xn=/^\d+$/,Gd=/^\d/,Wd=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Zd=/^\s*(['"]?)(.*?)(\1)\s*$/,gr=512,rn=new Ve(gr),nn=new Ve(gr),on=new Ve(gr),Lt={Cache:Ve,split:ir,normalizePath:Mt,setter:function(e){var n=Mt(e);return nn.get(e)||nn.set(e,function(r,i){for(var c=0,y=n.length,O=r;c=0)&&(t[i]=e[i]);return t}function ht(e){function n(t,r){let{value:i,path:c="",label:y,options:O,originalValue:g,sync:_}=t,p=ep(t,["value","path","label","options","originalValue","sync"]);const{name:l,test:o,params:a,message:v}=e;let{parent:h,context:d}=O;function f(S){return $e.isRef(S)?S.getValue(i,h,d):S}function u(S={}){const A=Yn(bt({value:i,originalValue:g,label:y,path:S.path||c},a,S.params),f),k=new we(we.formatError(S.message||v,A),i,A.path,S.type||l);return k.params=A,k}let m=bt({path:c,parent:h,type:l,createError:u,resolve:f,options:O,originalValue:g},p);if(!_){try{Promise.resolve(o.call(m,i,m)).then(S=>{we.isError(S)?r(S):S?r(null,S):r(u())}).catch(r)}catch(S){r(S)}return}let s;try{var b;if(s=o.call(m,i,m),typeof((b=s)==null?void 0:b.then)=="function")throw new Error(`Validation test of type: "${m.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(S){r(S);return}we.isError(s)?r(s):s?r(null,s):r(u())}return n.OPTIONS=e,n}let tp=e=>e.substr(0,e.length-1).substr(1);function rp(e,n,t,r=t){let i,c,y;return n?(Lt.forEach(n,(O,g,_)=>{let p=g?tp(O):O;if(e=e.resolve({context:r,parent:i,value:t}),e.innerType){let l=_?parseInt(p,10):0;if(t&&l>=t.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${O}, in the path: ${n}. because there is no value at that index. `);i=t,t=t&&t[l],e=e.innerType}if(!_){if(!e.fields||!e.fields[p])throw new Error(`The schema does not contain the path: ${n}. (failed at: ${y} which is a type: "${e._type}")`);i=t,t=t&&t[p],e=e.fields[p]}c=p,y=g?"["+O+"]":"."+O}),{schema:e,parent:i,parentPath:c}):{parent:i,parentPath:n,schema:e}}class _t{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const n=[];for(const t of this.list)n.push(t);for(const[,t]of this.refs)n.push(t.describe());return n}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(n){return this.toArray().reduce((t,r)=>t.concat($e.isRef(r)?n(r):r),[])}add(n){$e.isRef(n)?this.refs.set(n.key,n):this.list.add(n)}delete(n){$e.isRef(n)?this.refs.delete(n.key):this.list.delete(n)}clone(){const n=new _t;return n.list=new Set(this.list),n.refs=new Map(this.refs),n}merge(n,t){const r=this.clone();return n.list.forEach(i=>r.add(i)),n.refs.forEach(i=>r.add(i)),t.list.forEach(i=>r.delete(i)),t.refs.forEach(i=>r.delete(i)),r}}function xe(){return xe=Object.assign||function(e){for(var n=1;n{this.typeError(Ie.notType)}),this.type=(n==null?void 0:n.type)||"mixed",this.spec=xe({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},n==null?void 0:n.spec)}get _type(){return this.type}_typeCheck(n){return!0}clone(n){if(this._mutate)return n&&Object.assign(this.spec,n),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeError=this._typeError,t._whitelistError=this._whitelistError,t._blacklistError=this._blacklistError,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.exclusiveTests=xe({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=Gt(xe({},this.spec,n)),t}label(n){let t=this.clone();return t.spec.label=n,t}meta(...n){if(n.length===0)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},n[0]),t}withMutation(n){let t=this._mutate;this._mutate=!0;let r=n(this);return this._mutate=t,r}concat(n){if(!n||n===this)return this;if(n.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${n.type}`);let t=this,r=n.clone();const i=xe({},t.spec,r.spec);return r.spec=i,r._typeError||(r._typeError=t._typeError),r._whitelistError||(r._whitelistError=t._whitelistError),r._blacklistError||(r._blacklistError=t._blacklistError),r._whitelist=t._whitelist.merge(n._whitelist,n._blacklist),r._blacklist=t._blacklist.merge(n._blacklist,n._whitelist),r.tests=t.tests,r.exclusiveTests=t.exclusiveTests,r.withMutation(c=>{n.tests.forEach(y=>{c.test(y.OPTIONS)})}),r.transforms=[...t.transforms,...r.transforms],r}isType(n){return this.spec.nullable&&n===null?!0:this._typeCheck(n)}resolve(n){let t=this;if(t.conditions.length){let r=t.conditions;t=t.clone(),t.conditions=[],t=r.reduce((i,c)=>c.resolve(i,n),t),t=t.resolve(n)}return t}cast(n,t={}){let r=this.resolve(xe({value:n},t)),i=r._cast(n,t);if(n!==void 0&&t.assert!==!1&&r.isType(i)!==!0){let c=nt(n),y=nt(i);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${r._type}". attempted value: ${c} `+(y!==c?`result of cast: ${y}`:""))}return i}_cast(n,t){let r=n===void 0?n:this.transforms.reduce((i,c)=>c.call(this,i,n,this),n);return r===void 0&&(r=this.getDefault()),r}_validate(n,t={},r){let{sync:i,path:c,from:y=[],originalValue:O=n,strict:g=this.spec.strict,abortEarly:_=this.spec.abortEarly}=t,p=n;g||(p=this._cast(p,xe({assert:!1},t)));let l={value:p,path:c,options:t,originalValue:O,schema:this,label:this.spec.label,sync:i,from:y},o=[];this._typeError&&o.push(this._typeError);let a=[];this._whitelistError&&a.push(this._whitelistError),this._blacklistError&&a.push(this._blacklistError),Xt({args:l,value:p,path:c,sync:i,tests:o,endEarly:_},v=>{if(v)return void r(v,p);Xt({tests:this.tests.concat(a),args:l,path:c,sync:i,value:p,endEarly:_},r)})}validate(n,t,r){let i=this.resolve(xe({},t,{value:n}));return typeof r=="function"?i._validate(n,t,r):new Promise((c,y)=>i._validate(n,t,(O,g)=>{O?y(O):c(g)}))}validateSync(n,t){let r=this.resolve(xe({},t,{value:n})),i;return r._validate(n,xe({},t,{sync:!0}),(c,y)=>{if(c)throw c;i=y}),i}isValid(n,t){return this.validate(n,t).then(()=>!0,r=>{if(we.isError(r))return!1;throw r})}isValidSync(n,t){try{return this.validateSync(n,t),!0}catch(r){if(we.isError(r))return!1;throw r}}_getDefault(){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this):Gt(n)}getDefault(n){return this.resolve(n||{})._getDefault()}default(n){return arguments.length===0?this._getDefault():this.clone({default:n})}strict(n=!0){let t=this.clone();return t.spec.strict=n,t}_isPresent(n){return n!=null}defined(n=Ie.defined){return this.test({message:n,name:"defined",exclusive:!0,test(t){return t!==void 0}})}required(n=Ie.required){return this.clone({presence:"required"}).withMutation(t=>t.test({message:n,name:"required",exclusive:!0,test(r){return this.schema._isPresent(r)}}))}notRequired(){let n=this.clone({presence:"optional"});return n.tests=n.tests.filter(t=>t.OPTIONS.name!=="required"),n}nullable(n=!0){return this.clone({nullable:n!==!1})}transform(n){let t=this.clone();return t.transforms.push(n),t}test(...n){let t;if(n.length===1?typeof n[0]=="function"?t={test:n[0]}:t=n[0]:n.length===2?t={name:n[0],test:n[1]}:t={name:n[0],message:n[1],test:n[2]},t.message===void 0&&(t.message=Ie.default),typeof t.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),i=ht(t),c=t.exclusive||t.name&&r.exclusiveTests[t.name]===!0;if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(r.exclusiveTests[t.name]=!!t.exclusive),r.tests=r.tests.filter(y=>!(y.OPTIONS.name===t.name&&(c||y.OPTIONS.test===i.OPTIONS.test))),r.tests.push(i),r}when(n,t){!Array.isArray(n)&&typeof n!="string"&&(t=n,n=".");let r=this.clone(),i=In(n).map(c=>new $e(c));return i.forEach(c=>{c.isSibling&&r.deps.push(c.key)}),r.conditions.push(new Us(i,t)),r}typeError(n){let t=this.clone();return t._typeError=ht({message:n,name:"typeError",test(r){return r!==void 0&&!this.schema.isType(r)?this.createError({params:{type:this.schema._type}}):!0}}),t}oneOf(n,t=Ie.oneOf){let r=this.clone();return n.forEach(i=>{r._whitelist.add(i),r._blacklist.delete(i)}),r._whitelistError=ht({message:t,name:"oneOf",test(i){if(i===void 0)return!0;let c=this.schema._whitelist,y=c.resolveAll(this.resolve);return y.includes(i)?!0:this.createError({params:{values:c.toArray().join(", "),resolved:y}})}}),r}notOneOf(n,t=Ie.notOneOf){let r=this.clone();return n.forEach(i=>{r._blacklist.add(i),r._whitelist.delete(i)}),r._blacklistError=ht({message:t,name:"notOneOf",test(i){let c=this.schema._blacklist,y=c.resolveAll(this.resolve);return y.includes(i)?this.createError({params:{values:c.toArray().join(", "),resolved:y}}):!0}}),r}strip(n=!0){let t=this.clone();return t.spec.strip=n,t}describe(){const n=this.clone(),{label:t,meta:r}=n.spec;return{meta:r,label:t,type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,y,O)=>O.findIndex(g=>g.name===c.name)===y)}}}_e.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])_e.prototype[`${e}At`]=function(n,t,r={}){const{parent:i,parentPath:c,schema:y}=rp(this,n,t,r.context);return y[e](i&&i[c],xe({},r,{parent:i,path:n}))};for(const e of["equals","is"])_e.prototype[e]=_e.prototype.oneOf;for(const e of["not","nope"])_e.prototype[e]=_e.prototype.notOneOf;_e.prototype.optional=_e.prototype.notRequired;const np=_e;np.prototype;const ye=e=>e==null;let ip=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,op=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,ap=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,lp=e=>ye(e)||e===e.trim(),sp={}.toString();function up(){return new Qn}class Qn extends _e{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(n){if(this.isType(n)||Array.isArray(n))return n;const t=n!=null&&n.toString?n.toString():n;return t===sp?n:t})})}_typeCheck(n){return n instanceof String&&(n=n.valueOf()),typeof n=="string"}_isPresent(n){return super._isPresent(n)&&!!n.length}length(n,t=Te.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:n},test(r){return ye(r)||r.length===this.resolve(n)}})}min(n,t=Te.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:n},test(r){return ye(r)||r.length>=this.resolve(n)}})}max(n,t=Te.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:n},test(r){return ye(r)||r.length<=this.resolve(n)}})}matches(n,t){let r=!1,i,c;return t&&(typeof t=="object"?{excludeEmptyString:r=!1,message:i,name:c}=t:i=t),this.test({name:c||"matches",message:i||Te.matches,params:{regex:n},test:y=>ye(y)||y===""&&r||y.search(n)!==-1})}email(n=Te.email){return this.matches(ip,{name:"email",message:n,excludeEmptyString:!0})}url(n=Te.url){return this.matches(op,{name:"url",message:n,excludeEmptyString:!0})}uuid(n=Te.uuid){return this.matches(ap,{name:"uuid",message:n,excludeEmptyString:!1})}ensure(){return this.default("").transform(n=>n===null?"":n)}trim(n=Te.trim){return this.transform(t=>t!=null?t.trim():t).test({message:n,name:"trim",test:lp})}lowercase(n=Te.lowercase){return this.transform(t=>ye(t)?t:t.toLowerCase()).test({message:n,name:"string_case",exclusive:!0,test:t=>ye(t)||t===t.toLowerCase()})}uppercase(n=Te.uppercase){return this.transform(t=>ye(t)?t:t.toUpperCase()).test({message:n,name:"string_case",exclusive:!0,test:t=>ye(t)||t===t.toUpperCase()})}}up.prototype=Qn.prototype;let fp=e=>e!=+e;function cp(){return new Jn}class Jn extends _e{constructor(){super({type:"number"}),this.withMutation(()=>{this.transform(function(n){let t=n;if(typeof t=="string"){if(t=t.replace(/\s/g,""),t==="")return NaN;t=+t}return this.isType(t)?t:parseFloat(t)})})}_typeCheck(n){return n instanceof Number&&(n=n.valueOf()),typeof n=="number"&&!fp(n)}min(n,t=Re.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:n},test(r){return ye(r)||r>=this.resolve(n)}})}max(n,t=Re.max){return this.test({message:t,name:"max",exclusive:!0,params:{max:n},test(r){return ye(r)||r<=this.resolve(n)}})}lessThan(n,t=Re.lessThan){return this.test({message:t,name:"max",exclusive:!0,params:{less:n},test(r){return ye(r)||rthis.resolve(n)}})}positive(n=Re.positive){return this.moreThan(0,n)}negative(n=Re.negative){return this.lessThan(0,n)}integer(n=Re.integer){return this.test({name:"integer",message:n,test:t=>ye(t)||Number.isInteger(t)})}truncate(){return this.transform(n=>ye(n)?n:n|0)}round(n){var t;let r=["ceil","floor","round","trunc"];if(n=((t=n)==null?void 0:t.toLowerCase())||"round",n==="trunc")return this.truncate();if(r.indexOf(n.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(i=>ye(i)?i:Math[n](i))}}cp.prototype=Jn.prototype;var hp=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function dp(e){var n=[1,4,5,6,7,10,11],t=0,r,i;if(i=hp.exec(e)){for(var c=0,y;y=n[c];++c)i[y]=+i[y]||0;i[2]=(+i[2]||1)-1,i[3]=+i[3]||1,i[7]=i[7]?String(i[7]).substr(0,3):0,(i[8]===void 0||i[8]==="")&&(i[9]===void 0||i[9]==="")?r=+new Date(i[1],i[2],i[3],i[4],i[5],i[6],i[7]):(i[8]!=="Z"&&i[9]!==void 0&&(t=i[10]*60+i[11],i[9]==="+"&&(t=0-t)),r=Date.UTC(i[1],i[2],i[3],i[4],i[5]+t,i[6],i[7]))}else r=Date.parse?Date.parse(e):NaN;return r}let ei=new Date(""),pp=e=>Object.prototype.toString.call(e)==="[object Date]";class ti extends _e{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(n){return this.isType(n)?n:(n=dp(n),isNaN(n)?ei:new Date(n))})})}_typeCheck(n){return pp(n)&&!isNaN(n.getTime())}prepareParam(n,t){let r;if($e.isRef(n))r=n;else{let i=this.cast(n);if(!this._typeCheck(i))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(n,t=Wt.min){let r=this.prepareParam(n,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:n},test(i){return ye(i)||i>=this.resolve(r)}})}max(n,t=Wt.max){let r=this.prepareParam(n,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:n},test(i){return ye(i)||i<=this.resolve(r)}})}}ti.INVALID_DATE=ei;ti.prototype;function vp(e,n,t,r){var i=-1,c=e==null?0:e.length;for(r&&c&&(t=e[++i]);++ii?0:i+n),t=t>i?i:t,t<0&&(t+=i),i=n>t?0:t-n>>>0,n>>>=0;for(var c=Array(i);++r=r?e:kv(e,n,t)}var Sv=Tv,qv="\\ud800-\\udfff",Nv="\\u0300-\\u036f",Pv="\\ufe20-\\ufe2f",Fv="\\u20d0-\\u20ff",Lv=Nv+Pv+Fv,Rv="\\ufe0e\\ufe0f",Dv="\\u200d",$v=RegExp("["+Dv+qv+Lv+Rv+"]");function Cv(e){return $v.test(e)}var yi=Cv;function Iv(e){return e.split("")}var jv=Iv,gi="\\ud800-\\udfff",Mv="\\u0300-\\u036f",Bv="\\ufe20-\\ufe2f",Uv="\\u20d0-\\u20ff",Vv=Mv+Bv+Uv,Hv="\\ufe0e\\ufe0f",zv="["+gi+"]",or="["+Vv+"]",ar="\\ud83c[\\udffb-\\udfff]",Kv="(?:"+or+"|"+ar+")",mi="[^"+gi+"]",bi="(?:\\ud83c[\\udde6-\\uddff]){2}",_i="[\\ud800-\\udbff][\\udc00-\\udfff]",Gv="\\u200d",Oi=Kv+"?",Ei="["+Hv+"]?",Wv="(?:"+Gv+"(?:"+[mi,bi,_i].join("|")+")"+Ei+Oi+")*",Zv=Ei+Oi+Wv,Yv="(?:"+[mi+or+"?",or,bi,_i,zv].join("|")+")",Xv=RegExp(ar+"(?="+ar+")|"+Yv+Zv,"g");function Qv(e){return e.match(Xv)||[]}var Jv=Qv,ey=jv,ty=yi,ry=Jv;function ny(e){return ty(e)?ry(e):ey(e)}var iy=ny,oy=Sv,ay=yi,ly=iy,sy=at;function uy(e){return function(n){n=sy(n);var t=ay(n)?ly(n):void 0,r=t?t[0]:n.charAt(0),i=t?oy(t,1).join(""):n.slice(1);return r[e]()+i}}var fy=uy,cy=fy,hy=cy("toUpperCase"),dy=hy,py=at,vy=dy;function yy(e){return vy(py(e).toLowerCase())}var gy=yy,my=gy,by=vi,_y=by(function(e,n,t){return n=n.toLowerCase(),e+(t?my(n):n)}),Oy=_y,Ey=jn,wy=Bn,xy=Zn;function Ay(e,n){var t={};return n=xy(n),wy(e,function(r,i,c){Ey(t,n(r,i,c),r)}),t}var ky=Ay,br={exports:{}};br.exports=function(e){return wi(Ty(e),e)};br.exports.array=wi;function wi(e,n){var t=e.length,r=new Array(t),i={},c=t,y=Sy(n),O=qy(e);for(n.forEach(function(_){if(!O.has(_[0])||!O.has(_[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});c--;)i[c]||g(e[c],c,new Set);return r;function g(_,p,l){if(l.has(_)){var o;try{o=", node was:"+JSON.stringify(_)}catch{o=""}throw new Error("Cyclic dependency"+o)}if(!O.has(_))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(_));if(!i[p]){i[p]=!0;var a=y.get(_)||new Set;if(a=Array.from(a),p=a.length){l.add(_);do{var v=a[--p];g(v,O.get(v),l)}while(p);l.delete(_)}r[--t]=_}}}function Ty(e){for(var n=new Set,t=0,r=e.length;t`${y}-${O}`));function c(y,O){let g=Lt.split(y)[0];r.add(g),i.has(`${O}-${g}`)||t.push([O,g])}for(const y in e)if(yt(e,y)){let O=e[y];r.add(y),$e.isRef(O)&&O.isSibling?c(O.path,y):Cn(O)&&"deps"in O&&O.deps.forEach(g=>c(g,y))}return br.exports.array(Array.from(r),t).reverse()}function cn(e,n){let t=1/0;return e.some((r,i)=>{var c;if(((c=n.path)==null?void 0:c.indexOf(r))!==-1)return t=i,!0}),t}function xi(e){return(n,t)=>cn(e,n)-cn(e,t)}function Ke(){return Ke=Object.assign||function(e){for(var n=1;nObject.prototype.toString.call(e)==="[object Object]";function Py(e,n){let t=Object.keys(e.fields);return Object.keys(n).filter(r=>t.indexOf(r)===-1)}const Fy=xi([]);class Ai extends _e{constructor(n){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=Fy,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(r){if(typeof r=="string")try{r=JSON.parse(r)}catch{r=null}return this.isType(r)?r:null}),n&&this.shape(n)})}_typeCheck(n){return hn(n)||typeof n=="function"}_cast(n,t={}){var r;let i=super._cast(n,t);if(i===void 0)return this.getDefault();if(!this._typeCheck(i))return i;let c=this.fields,y=(r=t.stripUnknown)!=null?r:this.spec.noUnknown,O=this._nodes.concat(Object.keys(i).filter(l=>this._nodes.indexOf(l)===-1)),g={},_=Ke({},t,{parent:g,__validating:t.__validating||!1}),p=!1;for(const l of O){let o=c[l],a=yt(i,l);if(o){let v,h=i[l];_.path=(t.path?`${t.path}.`:"")+l,o=o.resolve({value:h,context:t.context,parent:g});let d="spec"in o?o.spec:void 0,f=d==null?void 0:d.strict;if(d!=null&&d.strip){p=p||l in i;continue}v=!t.__validating||!f?o.cast(i[l],_):i[l],v!==void 0&&(g[l]=v)}else a&&!y&&(g[l]=i[l]);g[l]!==i[l]&&(p=!0)}return p?g:i}_validate(n,t={},r){let i=[],{sync:c,from:y=[],originalValue:O=n,abortEarly:g=this.spec.abortEarly,recursive:_=this.spec.recursive}=t;y=[{schema:this,value:O},...y],t.__validating=!0,t.originalValue=O,t.from=y,super._validate(n,t,(p,l)=>{if(p){if(!we.isError(p)||g)return void r(p,l);i.push(p)}if(!_||!hn(l)){r(i[0]||null,l);return}O=O||l;let o=this._nodes.map(a=>(v,h)=>{let d=a.indexOf(".")===-1?(t.path?`${t.path}.`:"")+a:`${t.path||""}["${a}"]`,f=this.fields[a];if(f&&"validate"in f){f.validate(l[a],Ke({},t,{path:d,from:y,strict:!0,parent:l,originalValue:O[a]}),h);return}h(null)});Xt({sync:c,tests:o,value:l,errors:i,endEarly:g,sort:this._sortErrors,path:t.path},r)})}clone(n){const t=super.clone(n);return t.fields=Ke({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(n){let t=super.concat(n),r=t.fields;for(let[i,c]of Object.entries(this.fields)){const y=r[i];y===void 0?r[i]=c:y instanceof _e&&c instanceof _e&&(r[i]=c.concat(y))}return t.withMutation(()=>t.shape(r,this._excludedEdges))}getDefaultFromShape(){let n={};return this._nodes.forEach(t=>{const r=this.fields[t];n[t]="default"in r?r.getDefault():void 0}),n}_getDefault(){if("default"in this.spec)return super._getDefault();if(!!this._nodes.length)return this.getDefaultFromShape()}shape(n,t=[]){let r=this.clone(),i=Object.assign(r.fields,n);return r.fields=i,r._sortErrors=xi(Object.keys(i)),t.length&&(Array.isArray(t[0])||(t=[t]),r._excludedEdges=[...r._excludedEdges,...t]),r._nodes=Ny(i,r._excludedEdges),r}pick(n){const t={};for(const r of n)this.fields[r]&&(t[r]=this.fields[r]);return this.clone().withMutation(r=>(r.fields={},r.shape(t)))}omit(n){const t=this.clone(),r=t.fields;t.fields={};for(const i of n)delete r[i];return t.withMutation(()=>t.shape(r))}from(n,t,r){let i=Lt.getter(n,!0);return this.transform(c=>{if(c==null)return c;let y=c;return yt(c,n)&&(y=Ke({},c),r||delete y[n],y[t]=i(c)),y})}noUnknown(n=!0,t=Zt.noUnknown){typeof n=="string"&&(t=n,n=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:t,test(i){if(i==null)return!0;const c=Py(this.schema,i);return!n||c.length===0||this.createError({params:{unknown:c.join(", ")}})}});return r.spec.noUnknown=n,r}unknown(n=!0,t=Zt.noUnknown){return this.noUnknown(!n,t)}transformKeys(n){return this.transform(t=>t&&ky(t,(r,i)=>n(i)))}camelCase(){return this.transformKeys(Oy)}snakeCase(){return this.transformKeys(fn)}constantCase(){return this.transformKeys(n=>fn(n).toUpperCase())}describe(){let n=super.describe();return n.fields=Yn(this.fields,t=>t.describe()),n}}function Ly(e){return new Ai(e)}Ly.prototype=Ai.prototype;var lt=e=>e.type==="checkbox",Ge=e=>e instanceof Date,be=e=>e==null;const ki=e=>typeof e=="object";var ve=e=>!be(e)&&!Array.isArray(e)&&ki(e)&&!Ge(e),Ti=e=>ve(e)&&e.target?lt(e.target)?e.target.checked:e.target.value:e,Ry=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Si=(e,n)=>e.has(Ry(n)),Dy=e=>{const n=e.constructor&&e.constructor.prototype;return ve(n)&&n.hasOwnProperty("isPrototypeOf")},_r=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Fe(e){let n;const t=Array.isArray(e);if(e instanceof Date)n=new Date(e);else if(e instanceof Set)n=new Set(e);else if(!(_r&&(e instanceof Blob||e instanceof FileList))&&(t||ve(e)))if(n=t?[]:{},!Array.isArray(e)&&!Dy(e))n=e;else for(const r in e)n[r]=Fe(e[r]);else return e;return n}var st=e=>Array.isArray(e)?e.filter(Boolean):[],de=e=>e===void 0,te=(e,n,t)=>{if(!n||!ve(e))return t;const r=st(n.split(/[,[\].]+?/)).reduce((i,c)=>be(i)?i:i[c],e);return de(r)||r===e?de(e[n])?t:e[n]:r};const Ot={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Se={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Pe={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},qi=pe.createContext(null),Rt=()=>pe.useContext(qi),$y=e=>{const{children:n,...t}=e;return pe.createElement(qi.Provider,{value:t},n)};var Ni=(e,n,t,r=!0)=>{const i={defaultValues:n._defaultValues};for(const c in e)Object.defineProperty(i,c,{get:()=>{const y=c;return n._proxyFormState[y]!==Se.all&&(n._proxyFormState[y]=!r||Se.all),t&&(t[y]=!0),e[y]}});return i},Ae=e=>ve(e)&&!Object.keys(e).length,Pi=(e,n,t,r)=>{t(e);const{name:i,...c}=e;return Ae(c)||Object.keys(c).length>=Object.keys(n).length||Object.keys(c).find(y=>n[y]===(!r||Se.all))},dt=e=>Array.isArray(e)?e:[e],Fi=(e,n,t)=>t&&n?e===n:!e||!n||e===n||dt(e).some(r=>r&&(r.startsWith(n)||n.startsWith(r)));function Or(e){const n=pe.useRef(e);n.current=e,pe.useEffect(()=>{const t=!e.disabled&&n.current.subject&&n.current.subject.subscribe({next:n.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}function Cy(e){const n=Rt(),{control:t=n.control,disabled:r,name:i,exact:c}=e||{},[y,O]=pe.useState(t._formState),g=pe.useRef(!0),_=pe.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),p=pe.useRef(i);return p.current=i,Or({disabled:r,next:l=>g.current&&Fi(p.current,l.name,c)&&Pi(l,_.current,t._updateFormState)&&O({...t._formState,...l}),subject:t._subjects.state}),pe.useEffect(()=>{g.current=!0;const l=t._proxyFormState.isDirty&&t._getDirty();return l!==t._formState.isDirty&&t._subjects.state.next({isDirty:l}),_.current.isValid&&t._updateValid(!0),()=>{g.current=!1}},[t]),Ni(y,t,_.current,!1)}var Ne=e=>typeof e=="string",Li=(e,n,t,r,i)=>Ne(e)?(r&&n.watch.add(e),te(t,e,i)):Array.isArray(e)?e.map(c=>(r&&n.watch.add(c),te(t,c))):(r&&(n.watchAll=!0),t);function Iy(e){const n=Rt(),{control:t=n.control,name:r,defaultValue:i,disabled:c,exact:y}=e||{},O=pe.useRef(r);O.current=r,Or({disabled:c,subject:t._subjects.values,next:p=>{Fi(O.current,p.name,y)&&_(Fe(Li(O.current,t._names,p.values||t._formValues,!1,i)))}});const[g,_]=pe.useState(t._getWatch(r,i));return pe.useEffect(()=>t._removeUnmounted()),g}var Er=e=>/^\w*$/.test(e),Ri=e=>st(e.replace(/["|']|\]/g,"").split(/\.|\[/));function ue(e,n,t){let r=-1;const i=Er(n)?[n]:Ri(n),c=i.length,y=c-1;for(;++r{const _=r._options.shouldUnregister||i,p=(l,o)=>{const a=te(r._fields,l);a&&(a._f.mount=o)};if(p(t,!0),_){const l=Fe(te(r._options.defaultValues,t));ue(r._defaultValues,t,l),de(te(r._formValues,t))&&ue(r._formValues,t,l)}return()=>{(c?_&&!r._state.action:_)?r.unregister(t):p(t,!1)}},[t,r,c,i]),{field:{name:t,value:y,onChange:pe.useCallback(_=>g.current.onChange({target:{value:Ti(_),name:t},type:Ot.CHANGE}),[t]),onBlur:pe.useCallback(()=>g.current.onBlur({target:{value:te(r._formValues,t),name:t},type:Ot.BLUR}),[t,r]),ref:_=>{const p=te(r._fields,t);p&&_&&(p._f.ref={focus:()=>_.focus(),select:()=>_.select(),setCustomValidity:l=>_.setCustomValidity(l),reportValidity:()=>_.reportValidity()})}},formState:O,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!te(O.errors,t)},isDirty:{enumerable:!0,get:()=>!!te(O.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!te(O.touchedFields,t)},error:{enumerable:!0,get:()=>te(O.errors,t)}})}}const My=e=>e.render(jy(e));var Di=(e,n,t,r,i)=>n?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[r]:i||!0}}:{};const lr=(e,n,t)=>{for(const r of t||Object.keys(e)){const i=te(e,r);if(i){const{_f:c,...y}=i;if(c&&n(c.name)){if(c.ref.focus){c.ref.focus();break}else if(c.refs&&c.refs[0].focus){c.refs[0].focus();break}}else ve(y)&&lr(y,n)}}};var dn=e=>({isOnSubmit:!e||e===Se.onSubmit,isOnBlur:e===Se.onBlur,isOnChange:e===Se.onChange,isOnAll:e===Se.all,isOnTouch:e===Se.onTouched}),pn=(e,n,t)=>!t&&(n.watchAll||n.watch.has(e)||[...n.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length)))),By=(e,n,t)=>{const r=st(te(e,t));return ue(r,"root",n[t]),ue(e,t,r),e},We=e=>typeof e=="boolean",wr=e=>e.type==="file",De=e=>typeof e=="function",Et=e=>{if(!_r)return!1;const n=e?e.ownerDocument:0;return e instanceof(n&&n.defaultView?n.defaultView.HTMLElement:HTMLElement)},pt=e=>Ne(e),xr=e=>e.type==="radio",wt=e=>e instanceof RegExp;const vn={value:!1,isValid:!1},yn={value:!0,isValid:!0};var $i=e=>{if(Array.isArray(e)){if(e.length>1){const n=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:n,isValid:!!n.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!de(e[0].attributes.value)?de(e[0].value)||e[0].value===""?yn:{value:e[0].value,isValid:!0}:yn:vn}return vn};const gn={isValid:!1,value:null};var Ci=e=>Array.isArray(e)?e.reduce((n,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:n,gn):gn;function mn(e,n,t="validate"){if(pt(e)||Array.isArray(e)&&e.every(pt)||We(e)&&!e)return{type:t,message:pt(e)?e:"",ref:n}}var He=e=>ve(e)&&!wt(e)?e:{value:e,message:""},bn=async(e,n,t,r,i)=>{const{ref:c,refs:y,required:O,maxLength:g,minLength:_,min:p,max:l,pattern:o,validate:a,name:v,valueAsNumber:h,mount:d,disabled:f}=e._f,u=te(n,v);if(!d||f)return{};const m=y?y[0]:c,s=w=>{r&&m.reportValidity&&(m.setCustomValidity(We(w)?"":w||""),m.reportValidity())},b={},S=xr(c),A=lt(c),k=S||A,N=(h||wr(c))&&de(c.value)&&de(u)||Et(c)&&c.value===""||u===""||Array.isArray(u)&&!u.length,x=Di.bind(null,v,t,b),E=(w,T,P,R=Pe.maxLength,U=Pe.minLength)=>{const V=w?T:P;b[v]={type:w?R:U,message:V,ref:c,...x(w?R:U,V)}};if(i?!Array.isArray(u)||!u.length:O&&(!k&&(N||be(u))||We(u)&&!u||A&&!$i(y).isValid||S&&!Ci(y).isValid)){const{value:w,message:T}=pt(O)?{value:!!O,message:O}:He(O);if(w&&(b[v]={type:Pe.required,message:T,ref:m,...x(Pe.required,T)},!t))return s(T),b}if(!N&&(!be(p)||!be(l))){let w,T;const P=He(l),R=He(p);if(!be(u)&&!isNaN(u)){const U=c.valueAsNumber||u&&+u;be(P.value)||(w=U>P.value),be(R.value)||(T=Unew Date(new Date().toDateString()+" "+D),ee=c.type=="time",j=c.type=="week";Ne(P.value)&&u&&(w=ee?V(u)>V(P.value):j?u>P.value:U>new Date(P.value)),Ne(R.value)&&u&&(T=ee?V(u)+w.value,R=!be(T.value)&&u.length<+T.value;if((P||R)&&(E(P,w.message,T.message),!t))return s(b[v].message),b}if(o&&!N&&Ne(u)){const{value:w,message:T}=He(o);if(wt(w)&&!u.match(w)&&(b[v]={type:Pe.pattern,message:T,ref:c,...x(Pe.pattern,T)},!t))return s(T),b}if(a){if(De(a)){const w=await a(u,n),T=mn(w,m);if(T&&(b[v]={...T,...x(Pe.validate,T.message)},!t))return s(T.message),b}else if(ve(a)){let w={};for(const T in a){if(!Ae(w)&&!t)break;const P=mn(await a[T](u,n),m,T);P&&(w={...P,...x(T,P.message)},s(P.message),t&&(b[v]=w))}if(!Ae(w)&&(b[v]={ref:m,...w},!t))return b}}return s(!0),b};function Uy(e,n){const t=n.slice(0,-1).length;let r=0;for(;r{for(const c of e)c.next&&c.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(c=>c!==i)}}),unsubscribe:()=>{e=[]}}}var xt=e=>be(e)||!ki(e);function Me(e,n){if(xt(e)||xt(n))return e===n;if(Ge(e)&&Ge(n))return e.getTime()===n.getTime();const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(const i of t){const c=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const y=n[i];if(Ge(c)&&Ge(y)||ve(c)&&ve(y)||Array.isArray(c)&&Array.isArray(y)?!Me(c,y):c!==y)return!1}}return!0}var Ii=e=>e.type==="select-multiple",Hy=e=>xr(e)||lt(e),Ut=e=>Et(e)&&e.isConnected,ji=e=>{for(const n in e)if(De(e[n]))return!0;return!1};function At(e,n={}){const t=Array.isArray(e);if(ve(e)||t)for(const r in e)Array.isArray(e[r])||ve(e[r])&&!ji(e[r])?(n[r]=Array.isArray(e[r])?[]:{},At(e[r],n[r])):be(e[r])||(n[r]=!0);return n}function Mi(e,n,t){const r=Array.isArray(e);if(ve(e)||r)for(const i in e)Array.isArray(e[i])||ve(e[i])&&!ji(e[i])?de(n)||xt(t[i])?t[i]=Array.isArray(e[i])?At(e[i],[]):{...At(e[i])}:Mi(e[i],be(n)?{}:n[i],t[i]):t[i]=!Me(e[i],n[i]);return t}var Vt=(e,n)=>Mi(e,n,At(n)),Bi=(e,{valueAsNumber:n,valueAsDate:t,setValueAs:r})=>de(e)?e:n?e===""?NaN:e&&+e:t&&Ne(e)?new Date(e):r?r(e):e;function Ht(e){const n=e.ref;if(!(e.refs?e.refs.every(t=>t.disabled):n.disabled))return wr(n)?n.files:xr(n)?Ci(e.refs).value:Ii(n)?[...n.selectedOptions].map(({value:t})=>t):lt(n)?$i(e.refs).value:Bi(de(n.value)?e.ref.value:n.value,e)}var zy=(e,n,t,r)=>{const i={};for(const c of e){const y=te(n,c);y&&ue(i,c,y._f)}return{criteriaMode:t,names:[...e],fields:i,shouldUseNativeValidation:r}},tt=e=>de(e)?e:wt(e)?e.source:ve(e)?wt(e.value)?e.value.source:e.value:e,Ky=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function _n(e,n,t){const r=te(e,t);if(r||Er(t))return{error:r,name:t};const i=t.split(".");for(;i.length;){const c=i.join("."),y=te(n,c),O=te(e,c);if(y&&!Array.isArray(y)&&t!==c)return{name:t};if(O&&O.type)return{name:c,error:O};i.pop()}return{name:t}}var Gy=(e,n,t,r,i)=>i.isOnAll?!1:!t&&i.isOnTouch?!(n||e):(t?r.isOnBlur:i.isOnBlur)?!e:(t?r.isOnChange:i.isOnChange)?e:!0,Wy=(e,n)=>!st(te(e,n)).length&&ge(e,n);const Zy={mode:Se.onSubmit,reValidateMode:Se.onChange,shouldFocusError:!0};function Yy(e={},n){let t={...Zy,...e},r={submitCount:0,isDirty:!1,isLoading:De(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},i={},c=ve(t.defaultValues)||ve(t.values)?Fe(t.defaultValues||t.values)||{}:{},y=t.shouldUnregister?{}:Fe(c),O={action:!1,mount:!1,watch:!1},g={mount:new Set,unMount:new Set,array:new Set,watch:new Set},_,p=0;const l={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},o={values:Bt(),array:Bt(),state:Bt()},a=e.resetOptions&&e.resetOptions.keepDirtyValues,v=dn(t.mode),h=dn(t.reValidateMode),d=t.criteriaMode===Se.all,f=C=>Z=>{clearTimeout(p),p=setTimeout(C,Z)},u=async C=>{if(l.isValid||C){const Z=t.resolver?Ae((await N()).errors):await E(i,!0);Z!==r.isValid&&o.state.next({isValid:Z})}},m=C=>l.isValidating&&o.state.next({isValidating:C}),s=(C,Z=[],Y,B,M=!0,K=!0)=>{if(B&&Y){if(O.action=!0,K&&Array.isArray(te(i,C))){const X=Y(te(i,C),B.argA,B.argB);M&&ue(i,C,X)}if(K&&Array.isArray(te(r.errors,C))){const X=Y(te(r.errors,C),B.argA,B.argB);M&&ue(r.errors,C,X),Wy(r.errors,C)}if(l.touchedFields&&K&&Array.isArray(te(r.touchedFields,C))){const X=Y(te(r.touchedFields,C),B.argA,B.argB);M&&ue(r.touchedFields,C,X)}l.dirtyFields&&(r.dirtyFields=Vt(c,y)),o.state.next({name:C,isDirty:T(C,Z),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ue(y,C,Z)},b=(C,Z)=>{ue(r.errors,C,Z),o.state.next({errors:r.errors})},S=(C,Z,Y,B)=>{const M=te(i,C);if(M){const K=te(y,C,de(Y)?te(c,C):Y);de(K)||B&&B.defaultChecked||Z?ue(y,C,Z?K:Ht(M._f)):U(C,K),O.mount&&u()}},A=(C,Z,Y,B,M)=>{let K=!1,X=!1;const Q={name:C};if(!Y||B){l.isDirty&&(X=r.isDirty,r.isDirty=Q.isDirty=T(),K=X!==Q.isDirty);const ne=Me(te(c,C),Z);X=te(r.dirtyFields,C),ne?ge(r.dirtyFields,C):ue(r.dirtyFields,C,!0),Q.dirtyFields=r.dirtyFields,K=K||l.dirtyFields&&X!==!ne}if(Y){const ne=te(r.touchedFields,C);ne||(ue(r.touchedFields,C,Y),Q.touchedFields=r.touchedFields,K=K||l.touchedFields&&ne!==Y)}return K&&M&&o.state.next(Q),K?Q:{}},k=(C,Z,Y,B)=>{const M=te(r.errors,C),K=l.isValid&&We(Z)&&r.isValid!==Z;if(e.delayError&&Y?(_=f(()=>b(C,Y)),_(e.delayError)):(clearTimeout(p),_=null,Y?ue(r.errors,C,Y):ge(r.errors,C)),(Y?!Me(M,Y):M)||!Ae(B)||K){const X={...B,...K&&We(Z)?{isValid:Z}:{},errors:r.errors,name:C};r={...r,...X},o.state.next(X)}m(!1)},N=async C=>t.resolver(y,t.context,zy(C||g.mount,i,t.criteriaMode,t.shouldUseNativeValidation)),x=async C=>{const{errors:Z}=await N();if(C)for(const Y of C){const B=te(Z,Y);B?ue(r.errors,Y,B):ge(r.errors,Y)}else r.errors=Z;return Z},E=async(C,Z,Y={valid:!0})=>{for(const B in C){const M=C[B];if(M){const{_f:K,...X}=M;if(K){const Q=g.array.has(K.name),ne=await bn(M,y,d,t.shouldUseNativeValidation&&!Z,Q);if(ne[K.name]&&(Y.valid=!1,Z))break;!Z&&(te(ne,K.name)?Q?By(r.errors,ne,K.name):ue(r.errors,K.name,ne[K.name]):ge(r.errors,K.name))}X&&await E(X,Z,Y)}}return Y.valid},w=()=>{for(const C of g.unMount){const Z=te(i,C);Z&&(Z._f.refs?Z._f.refs.every(Y=>!Ut(Y)):!Ut(Z._f.ref))&&F(C)}g.unMount=new Set},T=(C,Z)=>(C&&Z&&ue(y,C,Z),!Me(q(),c)),P=(C,Z,Y)=>Li(C,g,{...O.mount?y:de(Z)?c:Ne(C)?{[C]:Z}:Z},Y,Z),R=C=>st(te(O.mount?y:c,C,e.shouldUnregister?te(c,C,[]):[])),U=(C,Z,Y={})=>{const B=te(i,C);let M=Z;if(B){const K=B._f;K&&(!K.disabled&&ue(y,C,Bi(Z,K)),M=Et(K.ref)&&be(Z)?"":Z,Ii(K.ref)?[...K.ref.options].forEach(X=>X.selected=M.includes(X.value)):K.refs?lt(K.ref)?K.refs.length>1?K.refs.forEach(X=>(!X.defaultChecked||!X.disabled)&&(X.checked=Array.isArray(M)?!!M.find(Q=>Q===X.value):M===X.value)):K.refs[0]&&(K.refs[0].checked=!!M):K.refs.forEach(X=>X.checked=X.value===M):wr(K.ref)?K.ref.value="":(K.ref.value=M,K.ref.type||o.values.next({name:C,values:{...y}})))}(Y.shouldDirty||Y.shouldTouch)&&A(C,M,Y.shouldTouch,Y.shouldDirty,!0),Y.shouldValidate&&D(C)},V=(C,Z,Y)=>{for(const B in Z){const M=Z[B],K=`${C}.${B}`,X=te(i,K);(g.array.has(C)||!xt(M)||X&&!X._f)&&!Ge(M)?V(K,M,Y):U(K,M,Y)}},ee=(C,Z,Y={})=>{const B=te(i,C),M=g.array.has(C),K=Fe(Z);ue(y,C,K),M?(o.array.next({name:C,values:{...y}}),(l.isDirty||l.dirtyFields)&&Y.shouldDirty&&o.state.next({name:C,dirtyFields:Vt(c,y),isDirty:T(C,K)})):B&&!B._f&&!be(K)?V(C,K,Y):U(C,K,Y),pn(C,g)&&o.state.next({...r}),o.values.next({name:C,values:{...y}}),!O.mount&&n()},j=async C=>{const Z=C.target;let Y=Z.name,B=!0;const M=te(i,Y),K=()=>Z.type?Ht(M._f):Ti(C);if(M){let X,Q;const ne=K(),oe=C.type===Ot.BLUR||C.type===Ot.FOCUS_OUT,le=!Ky(M._f)&&!t.resolver&&!te(r.errors,Y)&&!M._f.deps||Gy(oe,te(r.touchedFields,Y),r.isSubmitted,h,v),me=pn(Y,g,oe);ue(y,Y,ne),oe?(M._f.onBlur&&M._f.onBlur(C),_&&_(0)):M._f.onChange&&M._f.onChange(C);const Oe=A(Y,ne,oe,!1),fe=!Ae(Oe)||me;if(!oe&&o.values.next({name:Y,type:C.type,values:{...y}}),le)return l.isValid&&u(),fe&&o.state.next({name:Y,...me?{}:Oe});if(!oe&&me&&o.state.next({...r}),m(!0),t.resolver){const{errors:ut}=await N([Y]),he=_n(r.errors,i,Y),ke=_n(ut,i,he.name||Y);X=ke.error,Y=ke.name,Q=Ae(ut)}else X=(await bn(M,y,d,t.shouldUseNativeValidation))[Y],B=isNaN(ne)||ne===te(y,Y,ne),B&&(X?Q=!1:l.isValid&&(Q=await E(i,!0)));B&&(M._f.deps&&D(M._f.deps),k(Y,Q,X,Oe))}},D=async(C,Z={})=>{let Y,B;const M=dt(C);if(m(!0),t.resolver){const K=await x(de(C)?C:M);Y=Ae(K),B=C?!M.some(X=>te(K,X)):Y}else C?(B=(await Promise.all(M.map(async K=>{const X=te(i,K);return await E(X&&X._f?{[K]:X}:X)}))).every(Boolean),!(!B&&!r.isValid)&&u()):B=Y=await E(i);return o.state.next({...!Ne(C)||l.isValid&&Y!==r.isValid?{}:{name:C},...t.resolver||!C?{isValid:Y}:{},errors:r.errors,isValidating:!1}),Z.shouldFocus&&!B&&lr(i,K=>K&&te(r.errors,K),C?M:g.mount),B},q=C=>{const Z={...c,...O.mount?y:{}};return de(C)?Z:Ne(C)?te(Z,C):C.map(Y=>te(Z,Y))},L=(C,Z)=>({invalid:!!te((Z||r).errors,C),isDirty:!!te((Z||r).dirtyFields,C),isTouched:!!te((Z||r).touchedFields,C),error:te((Z||r).errors,C)}),$=C=>{C&&dt(C).forEach(Z=>ge(r.errors,Z)),o.state.next({errors:C?r.errors:{}})},z=(C,Z,Y)=>{const B=(te(i,C,{_f:{}})._f||{}).ref;ue(r.errors,C,{...Z,ref:B}),o.state.next({name:C,errors:r.errors,isValid:!1}),Y&&Y.shouldFocus&&B&&B.focus&&B.focus()},H=(C,Z)=>De(C)?o.values.subscribe({next:Y=>C(P(void 0,Z),Y)}):P(C,Z,!0),F=(C,Z={})=>{for(const Y of C?dt(C):g.mount)g.mount.delete(Y),g.array.delete(Y),Z.keepValue||(ge(i,Y),ge(y,Y)),!Z.keepError&&ge(r.errors,Y),!Z.keepDirty&&ge(r.dirtyFields,Y),!Z.keepTouched&&ge(r.touchedFields,Y),!t.shouldUnregister&&!Z.keepDefaultValue&&ge(c,Y);o.values.next({values:{...y}}),o.state.next({...r,...Z.keepDirty?{isDirty:T()}:{}}),!Z.keepIsValid&&u()},I=(C,Z={})=>{let Y=te(i,C);const B=We(Z.disabled);return ue(i,C,{...Y||{},_f:{...Y&&Y._f?Y._f:{ref:{name:C}},name:C,mount:!0,...Z}}),g.mount.add(C),Y?B&&ue(y,C,Z.disabled?void 0:te(y,C,Ht(Y._f))):S(C,!0,Z.value),{...B?{disabled:Z.disabled}:{},...t.shouldUseNativeValidation?{required:!!Z.required,min:tt(Z.min),max:tt(Z.max),minLength:tt(Z.minLength),maxLength:tt(Z.maxLength),pattern:tt(Z.pattern)}:{},name:C,onChange:j,onBlur:j,ref:M=>{if(M){I(C,Z),Y=te(i,C);const K=de(M.value)&&M.querySelectorAll&&M.querySelectorAll("input,select,textarea")[0]||M,X=Hy(K),Q=Y._f.refs||[];if(X?Q.find(ne=>ne===K):K===Y._f.ref)return;ue(i,C,{_f:{...Y._f,...X?{refs:[...Q.filter(Ut),K,...Array.isArray(te(c,C))?[{}]:[]],ref:{type:K.type,name:C}}:{ref:K}}}),S(C,!1,void 0,K)}else Y=te(i,C,{}),Y._f&&(Y._f.mount=!1),(t.shouldUnregister||Z.shouldUnregister)&&!(Si(g.array,C)&&O.action)&&g.unMount.add(C)}}},G=()=>t.shouldFocusError&&lr(i,C=>C&&te(r.errors,C),g.mount),W=(C,Z)=>async Y=>{Y&&(Y.preventDefault&&Y.preventDefault(),Y.persist&&Y.persist());let B=Fe(y);if(o.state.next({isSubmitting:!0}),t.resolver){const{errors:M,values:K}=await N();r.errors=M,B=K}else await E(i);ge(r.errors,"root"),Ae(r.errors)?(o.state.next({errors:{}}),await C(B,Y)):(Z&&await Z({...r.errors},Y),G(),setTimeout(G)),o.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ae(r.errors),submitCount:r.submitCount+1,errors:r.errors})},J=(C,Z={})=>{te(i,C)&&(de(Z.defaultValue)?ee(C,te(c,C)):(ee(C,Z.defaultValue),ue(c,C,Z.defaultValue)),Z.keepTouched||ge(r.touchedFields,C),Z.keepDirty||(ge(r.dirtyFields,C),r.isDirty=Z.defaultValue?T(C,te(c,C)):T()),Z.keepError||(ge(r.errors,C),l.isValid&&u()),o.state.next({...r}))},re=(C,Z={})=>{const Y=C||c,B=Fe(Y),M=C&&!Ae(C)?B:c;if(Z.keepDefaultValues||(c=Y),!Z.keepValues){if(Z.keepDirtyValues||a)for(const K of g.mount)te(r.dirtyFields,K)?ue(M,K,te(y,K)):ee(K,te(M,K));else{if(_r&&de(C))for(const K of g.mount){const X=te(i,K);if(X&&X._f){const Q=Array.isArray(X._f.refs)?X._f.refs[0]:X._f.ref;if(Et(Q)){const ne=Q.closest("form");if(ne){ne.reset();break}}}}i={}}y=e.shouldUnregister?Z.keepDefaultValues?Fe(c):{}:B,o.array.next({values:{...M}}),o.values.next({values:{...M}})}g={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!O.mount&&n(),O.mount=!l.isValid||!!Z.keepIsValid,O.watch=!!e.shouldUnregister,o.state.next({submitCount:Z.keepSubmitCount?r.submitCount:0,isDirty:Z.keepDirty?r.isDirty:!!(Z.keepDefaultValues&&!Me(C,c)),isSubmitted:Z.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:Z.keepDirtyValues?r.dirtyFields:Z.keepDefaultValues&&C?Vt(c,C):{},touchedFields:Z.keepTouched?r.touchedFields:{},errors:Z.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},ie=(C,Z)=>re(De(C)?C(y):C,Z),ae=(C,Z={})=>{const Y=te(i,C),B=Y&&Y._f;if(B){const M=B.refs?B.refs[0]:B.ref;M.focus&&(M.focus(),Z.shouldSelect&&M.select())}},se=C=>{r={...r,...C}};return De(t.defaultValues)&&t.defaultValues().then(C=>{ie(C,t.resetOptions),o.state.next({isLoading:!1})}),{control:{register:I,unregister:F,getFieldState:L,_executeSchema:N,_getWatch:P,_getDirty:T,_updateValid:u,_removeUnmounted:w,_updateFieldArray:s,_getFieldArray:R,_reset:re,_updateFormState:se,_subjects:o,_proxyFormState:l,get _fields(){return i},get _formValues(){return y},get _state(){return O},set _state(C){O=C},get _defaultValues(){return c},get _names(){return g},set _names(C){g=C},get _formState(){return r},set _formState(C){r=C},get _options(){return t},set _options(C){t={...t,...C}}},trigger:D,register:I,handleSubmit:W,watch:H,setValue:ee,getValues:q,reset:ie,resetField:J,clearErrors:$,unregister:F,setError:z,setFocus:ae,getFieldState:L}}function fg(e={}){const n=pe.useRef(),[t,r]=pe.useState({isDirty:!1,isValidating:!1,isLoading:De(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:De(e.defaultValues)?void 0:e.defaultValues});n.current||(n.current={...Yy(e,()=>r(c=>({...c}))),formState:t});const i=n.current.control;return i._options=e,Or({subject:i._subjects.state,next:c=>{Pi(c,i._proxyFormState,i._updateFormState,!0)&&r({...i._formState})}}),pe.useEffect(()=>{e.values&&!Me(e.values,i._defaultValues)&&i._reset(e.values,i._options.resetOptions)},[e.values,i]),pe.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),n.current.formState=Ni(t,i),n.current}var On=function(e,n,t){if(e&&"reportValidity"in e){var r=te(t,n);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},Ui=function(e,n){var t=function(i){var c=n.fields[i];c&&c.ref&&"reportValidity"in c.ref?On(c.ref,i,e):c.refs&&c.refs.forEach(function(y){return On(y,i,e)})};for(var r in n.fields)t(r)},Xy=function(e,n){n.shouldUseNativeValidation&&Ui(e,n);var t={};for(var r in e){var i=te(n.fields,r);ue(t,r,Object.assign(e[r],{ref:i&&i.ref}))}return t},cg=function(e,n,t){return n===void 0&&(n={}),t===void 0&&(t={}),function(r,i,c){try{return Promise.resolve(function(y,O){try{var g=(n.context,Promise.resolve(e[t.mode==="sync"?"validateSync":"validate"](r,Object.assign({abortEarly:!1},n,{context:i}))).then(function(_){return c.shouldUseNativeValidation&&Ui({},c),{values:t.rawValues?r:_,errors:{}}}))}catch(_){return O(_)}return g&&g.then?g.then(void 0,O):g}(0,function(y){if(!y.inner)throw y;return{values:{},errors:Xy((O=y,g=!c.shouldUseNativeValidation&&c.criteriaMode==="all",(O.inner||[]).reduce(function(_,p){if(_[p.path]||(_[p.path]={message:p.message,type:p.type}),g){var l=_[p.path].types,o=l&&l[p.type];_[p.path]=Di(p.path,g,_,p.type,o?[].concat(o,p.message):p.message)}return _},{})),c)};var O,g}))}catch(y){return Promise.reject(y)}}};Be("div")(({theme:e})=>({width:144,height:144,margin:"auto",borderRadius:"50%",padding:e.spacing(1),border:`1px dashed ${e.palette.grey[50032]}`}));Be("div")({zIndex:0,width:"100%",height:"100%",outline:"none",display:"flex",overflow:"hidden",borderRadius:"50%",position:"relative",alignItems:"center",justifyContent:"center","& > *":{width:"100%",height:"100%"},"&:hover":{cursor:"pointer","& .placeholder":{zIndex:9}}});Be("div")(({theme:e})=>({display:"flex",position:"absolute",alignItems:"center",flexDirection:"column",justifyContent:"center",color:e.palette.text.secondary,backgroundColor:e.palette.background.neutral,transition:e.transitions.create("opacity",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.shorter}),"&:hover":{opacity:.72}}));Be("div")(({theme:e})=>({outline:"none",padding:e.spacing(5,1),borderRadius:e.shape.borderRadius,backgroundColor:e.palette.background.neutral,border:`1px dashed ${e.palette.grey[50032]}`,"&:hover":{opacity:.72,cursor:"pointer"}}));Be("div")(({theme:e})=>({outline:"none",overflow:"hidden",position:"relative",padding:e.spacing(5,1),borderRadius:e.shape.borderRadius,transition:e.transitions.create("padding"),backgroundColor:e.palette.background.neutral,border:`1px dashed ${e.palette.grey[50032]}`,"&:hover":{opacity:.72,cursor:"pointer"}}));function hg({children:e,onSubmit:n,methods:t,encType:r}){return vt($y,{...t,children:vt("form",{onSubmit:n,encType:r,children:e})})}var Qy=yr;function Jy(e,n){return Qy(e,n)}var eg=Jy,Vi={exports:{}};/*! * Quill Editor v1.3.7 * https://quilljs.com/ * Copyright (c) 2014, Jason Chen * Copyright (c) 2013, salesforce.com */(function(e,n){(function(r,i){e.exports=i()})(typeof self<"u"?self:Ee,function(){return function(t){var r={};function i(c){if(r[c])return r[c].exports;var y=r[c]={i:c,l:!1,exports:{}};return t[c].call(y.exports,y,y.exports,i),y.l=!0,y.exports}return i.m=t,i.c=r,i.d=function(c,y,O){i.o(c,y)||Object.defineProperty(c,y,{configurable:!1,enumerable:!0,get:O})},i.n=function(c){var y=c&&c.__esModule?function(){return c.default}:function(){return c};return i.d(y,"a",y),y},i.o=function(c,y){return Object.prototype.hasOwnProperty.call(c,y)},i.p="",i(i.s=109)}([function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=i(17),y=i(18),O=i(19),g=i(45),_=i(46),p=i(47),l=i(48),o=i(49),a=i(12),v=i(32),h=i(33),d=i(31),f=i(1),u={Scope:f.Scope,create:f.create,find:f.find,query:f.query,register:f.register,Container:c.default,Format:y.default,Leaf:O.default,Embed:l.default,Scroll:g.default,Block:p.default,Inline:_.default,Text:o.default,Attributor:{Attribute:a.default,Class:v.default,Style:h.default,Store:d.default}};r.default=u},function(t,r,i){var c=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,u){f.__proto__=u}||function(f,u){for(var m in u)u.hasOwnProperty(m)&&(f[m]=u[m])};return function(f,u){d(f,u);function m(){this.constructor=f}f.prototype=u===null?Object.create(u):(m.prototype=u.prototype,new m)}}();Object.defineProperty(r,"__esModule",{value:!0});var y=function(d){c(f,d);function f(u){var m=this;return u="[Parchment] "+u,m=d.call(this,u)||this,m.message=u,m.name=m.constructor.name,m}return f}(Error);r.ParchmentError=y;var O={},g={},_={},p={};r.DATA_KEY="__blot";var l;(function(d){d[d.TYPE=3]="TYPE",d[d.LEVEL=12]="LEVEL",d[d.ATTRIBUTE=13]="ATTRIBUTE",d[d.BLOT=14]="BLOT",d[d.INLINE=7]="INLINE",d[d.BLOCK=11]="BLOCK",d[d.BLOCK_BLOT=10]="BLOCK_BLOT",d[d.INLINE_BLOT=6]="INLINE_BLOT",d[d.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",d[d.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",d[d.ANY=15]="ANY"})(l=r.Scope||(r.Scope={}));function o(d,f){var u=v(d);if(u==null)throw new y("Unable to create "+d+" blot");var m=u,s=d instanceof Node||d.nodeType===Node.TEXT_NODE?d:m.create(f);return new m(s,f)}r.create=o;function a(d,f){return f===void 0&&(f=!1),d==null?null:d[r.DATA_KEY]!=null?d[r.DATA_KEY].blot:f?a(d.parentNode,f):null}r.find=a;function v(d,f){f===void 0&&(f=l.ANY);var u;if(typeof d=="string")u=p[d]||O[d];else if(d instanceof Text||d.nodeType===Node.TEXT_NODE)u=p.text;else if(typeof d=="number")d&l.LEVEL&l.BLOCK?u=p.block:d&l.LEVEL&l.INLINE&&(u=p.inline);else if(d instanceof HTMLElement){var m=(d.getAttribute("class")||"").split(/\s+/);for(var s in m)if(u=g[m[s]],u)break;u=u||_[d.tagName]}return u==null?null:f&l.LEVEL&u.scope&&f&l.TYPE&u.scope?u:null}r.query=v;function h(){for(var d=[],f=0;f1)return d.map(function(s){return h(s)});var u=d[0];if(typeof u.blotName!="string"&&typeof u.attrName!="string")throw new y("Invalid definition");if(u.blotName==="abstract")throw new y("Cannot register abstract class");if(p[u.blotName||u.attrName]=u,typeof u.keyName=="string")O[u.keyName]=u;else if(u.className!=null&&(g[u.className]=u),u.tagName!=null){Array.isArray(u.tagName)?u.tagName=u.tagName.map(function(s){return s.toUpperCase()}):u.tagName=u.tagName.toUpperCase();var m=Array.isArray(u.tagName)?u.tagName:[u.tagName];m.forEach(function(s){(_[s]==null||u.className==null)&&(_[s]=u)})}return u}r.register=h},function(t,r,i){var c=i(51),y=i(11),O=i(3),g=i(20),_=String.fromCharCode(0),p=function(l){Array.isArray(l)?this.ops=l:l!=null&&Array.isArray(l.ops)?this.ops=l.ops:this.ops=[]};p.prototype.insert=function(l,o){var a={};return l.length===0?this:(a.insert=l,o!=null&&typeof o=="object"&&Object.keys(o).length>0&&(a.attributes=o),this.push(a))},p.prototype.delete=function(l){return l<=0?this:this.push({delete:l})},p.prototype.retain=function(l,o){if(l<=0)return this;var a={retain:l};return o!=null&&typeof o=="object"&&Object.keys(o).length>0&&(a.attributes=o),this.push(a)},p.prototype.push=function(l){var o=this.ops.length,a=this.ops[o-1];if(l=O(!0,{},l),typeof a=="object"){if(typeof l.delete=="number"&&typeof a.delete=="number")return this.ops[o-1]={delete:a.delete+l.delete},this;if(typeof a.delete=="number"&&l.insert!=null&&(o-=1,a=this.ops[o-1],typeof a!="object"))return this.ops.unshift(l),this;if(y(l.attributes,a.attributes)){if(typeof l.insert=="string"&&typeof a.insert=="string")return this.ops[o-1]={insert:a.insert+l.insert},typeof l.attributes=="object"&&(this.ops[o-1].attributes=l.attributes),this;if(typeof l.retain=="number"&&typeof a.retain=="number")return this.ops[o-1]={retain:a.retain+l.retain},typeof l.attributes=="object"&&(this.ops[o-1].attributes=l.attributes),this}}return o===this.ops.length?this.ops.push(l):this.ops.splice(o,0,l),this},p.prototype.chop=function(){var l=this.ops[this.ops.length-1];return l&&l.retain&&!l.attributes&&this.ops.pop(),this},p.prototype.filter=function(l){return this.ops.filter(l)},p.prototype.forEach=function(l){this.ops.forEach(l)},p.prototype.map=function(l){return this.ops.map(l)},p.prototype.partition=function(l){var o=[],a=[];return this.forEach(function(v){var h=l(v)?o:a;h.push(v)}),[o,a]},p.prototype.reduce=function(l,o){return this.ops.reduce(l,o)},p.prototype.changeLength=function(){return this.reduce(function(l,o){return o.insert?l+g.length(o):o.delete?l-o.delete:l},0)},p.prototype.length=function(){return this.reduce(function(l,o){return l+g.length(o)},0)},p.prototype.slice=function(l,o){l=l||0,typeof o!="number"&&(o=1/0);for(var a=[],v=g.iterator(this.ops),h=0;h0&&a.next(h.retain-d)}for(var f=new p(v);o.hasNext()||a.hasNext();)if(a.peekType()==="insert")f.push(a.next());else if(o.peekType()==="delete")f.push(o.next());else{var u=Math.min(o.peekLength(),a.peekLength()),m=o.next(u),s=a.next(u);if(typeof s.retain=="number"){var b={};typeof m.retain=="number"?b.retain=u:b.insert=m.insert;var S=g.attributes.compose(m.attributes,s.attributes,typeof m.retain=="number");if(S&&(b.attributes=S),f.push(b),!a.hasNext()&&y(f.ops[f.ops.length-1],b)){var A=new p(o.rest());return f.concat(A).chop()}}else typeof s.delete=="number"&&typeof m.retain=="number"&&f.push(s)}return f.chop()},p.prototype.concat=function(l){var o=new p(this.ops.slice());return l.ops.length>0&&(o.push(l.ops[0]),o.ops=o.ops.concat(l.ops.slice(1))),o},p.prototype.diff=function(l,o){if(this.ops===l.ops)return new p;var a=[this,l].map(function(u){return u.map(function(m){if(m.insert!=null)return typeof m.insert=="string"?m.insert:_;var s=u===l?"on":"with";throw new Error("diff() called "+s+" non-document")}).join("")}),v=new p,h=c(a[0],a[1],o),d=g.iterator(this.ops),f=g.iterator(l.ops);return h.forEach(function(u){for(var m=u[1].length;m>0;){var s=0;switch(u[0]){case c.INSERT:s=Math.min(f.peekLength(),m),v.push(f.next(s));break;case c.DELETE:s=Math.min(m,d.peekLength()),d.next(s),v.delete(s);break;case c.EQUAL:s=Math.min(d.peekLength(),f.peekLength(),m);var b=d.next(s),S=f.next(s);y(b.insert,S.insert)?v.retain(s,g.attributes.diff(b.attributes,S.attributes)):v.push(S).delete(s);break}m-=s}}),v.chop()},p.prototype.eachLine=function(l,o){o=o||` `;for(var a=g.iterator(this.ops),v=new p,h=0;a.hasNext();){if(a.peekType()!=="insert")return;var d=a.peek(),f=g.length(d)-a.peekLength(),u=typeof d.insert=="string"?d.insert.indexOf(o,f)-f:-1;if(u<0)v.push(a.next());else if(u>0)v.push(a.next(u));else{if(l(v,a.next(1).attributes||{},h)===!1)return;h+=1,v=new p}}v.length()>0&&l(v,{},h)},p.prototype.transform=function(l,o){if(o=!!o,typeof l=="number")return this.transformPosition(l,o);for(var a=g.iterator(this.ops),v=g.iterator(l.ops),h=new p;a.hasNext()||v.hasNext();)if(a.peekType()==="insert"&&(o||v.peekType()!=="insert"))h.retain(g.length(a.next()));else if(v.peekType()==="insert")h.push(v.next());else{var d=Math.min(a.peekLength(),v.peekLength()),f=a.next(d),u=v.next(d);if(f.delete)continue;u.delete?h.push(u):h.retain(d,g.attributes.transform(f.attributes,u.attributes,o))}return h.chop()},p.prototype.transformPosition=function(l,o){o=!!o;for(var a=g.iterator(this.ops),v=0;a.hasNext()&&v<=l;){var h=a.peekLength(),d=a.peekType();if(a.next(),d==="delete"){l-=Math.min(h,l-v);continue}else d==="insert"&&(v"u"||i.call(a,d)},p=function(a,v){y&&v.name==="__proto__"?y(a,v.name,{enumerable:!0,configurable:!0,value:v.newValue,writable:!0}):a[v.name]=v.newValue},l=function(a,v){if(v==="__proto__")if(i.call(a,v)){if(O)return O(a,v).value}else return;return a[v]};t.exports=function o(){var a,v,h,d,f,u,m=arguments[0],s=1,b=arguments.length,S=!1;for(typeof m=="boolean"&&(S=m,m=arguments[1]||{},s=2),(m==null||typeof m!="object"&&typeof m!="function")&&(m={});s0&&(P1&&arguments[1]!==void 0?arguments[1]:!1;if(R&&(P===0||P>=this.length()-A)){var U=this.clone();return P===0?(this.parent.insertBefore(U,this),this):(this.parent.insertBefore(U,this.next),U)}else{var V=y(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"split",this).call(this,P,R);return this.cache={},V}}}]),w}(o.default.Block);N.blotName="block",N.tagName="P",N.defaultChild="break",N.allowedChildren=[d.default,o.default.Embed,u.default];function x(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return E==null||(typeof E.formats=="function"&&(w=(0,g.default)(w,E.formats())),E.parent==null||E.parent.blotName=="scroll"||E.parent.statics.scope!==E.statics.scope)?w:x(E.parent,w)}r.bubbleFormats=x,r.BlockEmbed=k,r.default=N},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.overload=r.expandConfig=void 0;var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},y=function(){function j(D,q){var L=[],$=!0,z=!1,H=void 0;try{for(var F=D[Symbol.iterator](),I;!($=(I=F.next()).done)&&(L.push(I.value),!(q&&L.length===q));$=!0);}catch(G){z=!0,H=G}finally{try{!$&&F.return&&F.return()}finally{if(z)throw H}}return L}return function(D,q){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return j(D,q);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function(){function j(D,q){for(var L=0;L2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof q!="string"){var H=q.attrName||q.blotName;typeof H=="string"?this.register("formats/"+H,q,L):Object.keys(q).forEach(function(F){$.register(F,q[F],L)})}else this.imports[q]!=null&&!z&&T.warn("Overwriting "+q+" with",L),this.imports[q]=L,(q.startsWith("blots/")||q.startsWith("formats/"))&&L.blotName!=="abstract"?f.default.register(L):q.startsWith("modules")&&typeof L.register=="function"&&L.register()}}]);function j(D){var q=this,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(w(this,j),this.options=R(D,L),this.container=this.options.container,this.container==null)return T.error("Invalid Quill container",D);this.options.debug&&j.debug(this.options.debug);var $=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new a.default,this.scroll=f.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new l.default(this.scroll),this.selection=new m.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(a.default.events.EDITOR_CHANGE,function(H){H===a.default.events.TEXT_CHANGE&&q.root.classList.toggle("ql-blank",q.editor.isBlank())}),this.emitter.on(a.default.events.SCROLL_UPDATE,function(H,F){var I=q.selection.lastRange,G=I&&I.length===0?I.index:void 0;U.call(q,function(){return q.editor.update(null,F,G)},H)});var z=this.clipboard.convert(`
`+$+"


");this.setContents(z),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return O(j,[{key:"addContainer",value:function(q){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof q=="string"){var $=q;q=document.createElement("div"),q.classList.add($)}return this.container.insertBefore(q,L),q}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(q,L,$){var z=this,H=V(q,L,$),F=y(H,4);return q=F[0],L=F[1],$=F[3],U.call(this,function(){return z.editor.deleteText(q,L)},$,q,-1*L)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(q),this.container.classList.toggle("ql-disabled",!q)}},{key:"focus",value:function(){var q=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=q,this.scrollIntoView()}},{key:"format",value:function(q,L){var $=this,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:a.default.sources.API;return U.call(this,function(){var H=$.getSelection(!0),F=new _.default;if(H==null)return F;if(f.default.query(q,f.default.Scope.BLOCK))F=$.editor.formatLine(H.index,H.length,E({},q,L));else{if(H.length===0)return $.selection.format(q,L),F;F=$.editor.formatText(H.index,H.length,E({},q,L))}return $.setSelection(H,a.default.sources.SILENT),F},z)}},{key:"formatLine",value:function(q,L,$,z,H){var F=this,I=void 0,G=V(q,L,$,z,H),W=y(G,4);return q=W[0],L=W[1],I=W[2],H=W[3],U.call(this,function(){return F.editor.formatLine(q,L,I)},H,q,0)}},{key:"formatText",value:function(q,L,$,z,H){var F=this,I=void 0,G=V(q,L,$,z,H),W=y(G,4);return q=W[0],L=W[1],I=W[2],H=W[3],U.call(this,function(){return F.editor.formatText(q,L,I)},H,q,0)}},{key:"getBounds",value:function(q){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,$=void 0;typeof q=="number"?$=this.selection.getBounds(q,L):$=this.selection.getBounds(q.index,q.length);var z=this.container.getBoundingClientRect();return{bottom:$.bottom-z.top,height:$.height,left:$.left-z.left,right:$.right-z.left,top:$.top-z.top,width:$.width}}},{key:"getContents",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-q,$=V(q,L),z=y($,2);return q=z[0],L=z[1],this.editor.getContents(q,L)}},{key:"getFormat",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof q=="number"?this.editor.getFormat(q,L):this.editor.getFormat(q.index,q.length)}},{key:"getIndex",value:function(q){return q.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(q){return this.scroll.leaf(q)}},{key:"getLine",value:function(q){return this.scroll.line(q)}},{key:"getLines",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof q!="number"?this.scroll.lines(q.index,q.length):this.scroll.lines(q,L)}},{key:"getModule",value:function(q){return this.theme.modules[q]}},{key:"getSelection",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return q&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-q,$=V(q,L),z=y($,2);return q=z[0],L=z[1],this.editor.getText(q,L)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(q,L,$){var z=this,H=arguments.length>3&&arguments[3]!==void 0?arguments[3]:j.sources.API;return U.call(this,function(){return z.editor.insertEmbed(q,L,$)},H,q)}},{key:"insertText",value:function(q,L,$,z,H){var F=this,I=void 0,G=V(q,0,$,z,H),W=y(G,4);return q=W[0],I=W[2],H=W[3],U.call(this,function(){return F.editor.insertText(q,L,I)},H,q,L.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(q,L,$){this.clipboard.dangerouslyPasteHTML(q,L,$)}},{key:"removeFormat",value:function(q,L,$){var z=this,H=V(q,L,$),F=y(H,4);return q=F[0],L=F[1],$=F[3],U.call(this,function(){return z.editor.removeFormat(q,L)},$,q)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(q){var L=this,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a.default.sources.API;return U.call(this,function(){q=new _.default(q);var z=L.getLength(),H=L.editor.deleteText(0,z),F=L.editor.applyDelta(q),I=F.ops[F.ops.length-1];I!=null&&typeof I.insert=="string"&&I.insert[I.insert.length-1]===` `&&(L.editor.deleteText(L.getLength()-1,1),F.delete(1));var G=H.compose(F);return G},$)}},{key:"setSelection",value:function(q,L,$){if(q==null)this.selection.setRange(null,L||j.sources.API);else{var z=V(q,L,$),H=y(z,4);q=H[0],L=H[1],$=H[3],this.selection.setRange(new u.Range(q,L),$),$!==a.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(q){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a.default.sources.API,$=new _.default().insert(q);return this.setContents($,L)}},{key:"update",value:function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a.default.sources.USER,L=this.scroll.update(q);return this.selection.update(q),L}},{key:"updateContents",value:function(q){var L=this,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a.default.sources.API;return U.call(this,function(){return q=new _.default(q),L.editor.applyDelta(q,$)},$,!0)}}]),j}();P.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},P.events=a.default.events,P.sources=a.default.sources,P.version="1.3.7",P.imports={delta:_.default,parchment:f.default,"core/module":h.default,"core/theme":N.default};function R(j,D){if(D=(0,b.default)(!0,{container:j,modules:{clipboard:!0,keyboard:!0,history:!0}},D),!D.theme||D.theme===P.DEFAULTS.theme)D.theme=N.default;else if(D.theme=P.import("themes/"+D.theme),D.theme==null)throw new Error("Invalid theme "+D.theme+". Did you register it?");var q=(0,b.default)(!0,{},D.theme.DEFAULTS);[q,D].forEach(function(z){z.modules=z.modules||{},Object.keys(z.modules).forEach(function(H){z.modules[H]===!0&&(z.modules[H]={})})});var L=Object.keys(q.modules).concat(Object.keys(D.modules)),$=L.reduce(function(z,H){var F=P.import("modules/"+H);return F==null?T.error("Cannot load "+H+" module. Are you sure you registered it?"):z[H]=F.DEFAULTS||{},z},{});return D.modules!=null&&D.modules.toolbar&&D.modules.toolbar.constructor!==Object&&(D.modules.toolbar={container:D.modules.toolbar}),D=(0,b.default)(!0,{},P.DEFAULTS,{modules:$},q,D),["bounds","container","scrollingContainer"].forEach(function(z){typeof D[z]=="string"&&(D[z]=document.querySelector(D[z]))}),D.modules=Object.keys(D.modules).reduce(function(z,H){return D.modules[H]&&(z[H]=D.modules[H]),z},{}),D}function U(j,D,q,L){if(this.options.strict&&!this.isEnabled()&&D===a.default.sources.USER)return new _.default;var $=q==null?null:this.getSelection(),z=this.editor.delta,H=j();if($!=null&&(q===!0&&(q=$.index),L==null?$=ee($,H,D):L!==0&&($=ee($,q,L,D)),this.setSelection($,a.default.sources.SILENT)),H.length()>0){var F,I=[a.default.events.TEXT_CHANGE,H,z,D];if((F=this.emitter).emit.apply(F,[a.default.events.EDITOR_CHANGE].concat(I)),D!==a.default.sources.SILENT){var G;(G=this.emitter).emit.apply(G,I)}}return H}function V(j,D,q,L,$){var z={};return typeof j.index=="number"&&typeof j.length=="number"?typeof D!="number"?($=L,L=q,q=D,D=j.length,j=j.index):(D=j.length,j=j.index):typeof D!="number"&&($=L,L=q,q=D,D=0),(typeof q>"u"?"undefined":c(q))==="object"?(z=q,$=L):typeof q=="string"&&(L!=null?z[q]=L:$=q),$=$||a.default.sources.API,[j,D,z,$]}function ee(j,D,q,L){if(j==null)return null;var $=void 0,z=void 0;if(D instanceof _.default){var H=[j.index,j.index+j.length].map(function(W){return D.transformPosition(W,L!==a.default.sources.USER)}),F=y(H,2);$=F[0],z=F[1]}else{var I=[j.index,j.index+j.length].map(function(W){return W=0?W+q:Math.max(D,W+q)}),G=y(I,2);$=G[0],z=G[1]}return new u.Range($,z-$)}r.expandConfig=R,r.overload=V,r.default=P},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function d(f,u){for(var m=0;m0){var s=this.parent.isolate(this.offset(),this.length());this.moveChildren(s),s.wrap(this)}}}],[{key:"compare",value:function(m,s){var b=f.order.indexOf(m),S=f.order.indexOf(s);return b>=0||S>=0?b-S:m===s?0:m1?S-1:0),k=1;k1&&arguments[1]!==void 0?arguments[1]:{};c(this,O),this.quill=g,this.options=_};y.DEFAULTS={},r.default=y},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=["error","warn","log","info"],y="warn";function O(_){if(c.indexOf(_)<=c.indexOf(y)){for(var p,l=arguments.length,o=Array(l>1?l-1:0),a=1;a0&&typeof o[0]!="number")}function l(o,a,v){var h,d;if(_(o)||_(a)||o.prototype!==a.prototype)return!1;if(O(o))return O(a)?(o=c.call(o),a=c.call(a),g(o,a,v)):!1;if(p(o)){if(!p(a)||o.length!==a.length)return!1;for(h=0;h=0;h--)if(f[h]!=u[h])return!1;for(h=f.length-1;h>=0;h--)if(d=f[h],!g(o[d],a[d],v))return!1;return typeof o==typeof a}},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=i(1),y=function(){function O(g,_,p){p===void 0&&(p={}),this.attrName=g,this.keyName=_;var l=c.Scope.TYPE&c.Scope.ATTRIBUTE;p.scope!=null?this.scope=p.scope&c.Scope.LEVEL|l:this.scope=c.Scope.ATTRIBUTE,p.whitelist!=null&&(this.whitelist=p.whitelist)}return O.keys=function(g){return[].map.call(g.attributes,function(_){return _.name})},O.prototype.add=function(g,_){return this.canAdd(g,_)?(g.setAttribute(this.keyName,_),!0):!1},O.prototype.canAdd=function(g,_){var p=c.query(g,c.Scope.BLOT&(this.scope|c.Scope.TYPE));return p==null?!1:this.whitelist==null?!0:typeof _=="string"?this.whitelist.indexOf(_.replace(/["']/g,""))>-1:this.whitelist.indexOf(_)>-1},O.prototype.remove=function(g){g.removeAttribute(this.keyName)},O.prototype.value=function(g){var _=g.getAttribute(this.keyName);return this.canAdd(g,_)&&_?_:""},O}();r.default=y},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Code=void 0;var c=function(){function k(N,x){var E=[],w=!0,T=!1,P=void 0;try{for(var R=N[Symbol.iterator](),U;!(w=(U=R.next()).done)&&(E.push(U.value),!(x&&E.length===x));w=!0);}catch(V){T=!0,P=V}finally{try{!w&&R.return&&R.return()}finally{if(T)throw P}}return E}return function(N,x){if(Array.isArray(N))return N;if(Symbol.iterator in Object(N))return k(N,x);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),y=function(){function k(N,x){for(var E=0;E=E+w)){var U=this.newlineIndex(E,!0)+1,V=R-U+1,ee=this.isolate(U,V),j=ee.next;ee.format(T,P),j instanceof N&&j.formatAt(0,E-U+w-V,T,P)}}}},{key:"insertAt",value:function(E,w,T){if(T==null){var P=this.descendant(f.default,E),R=c(P,2),U=R[0],V=R[1];U.insertAt(V,w)}}},{key:"length",value:function(){var E=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` `)?E:E+1}},{key:"newlineIndex",value:function(E){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(w)return this.domNode.textContent.slice(0,E).lastIndexOf(` `);var T=this.domNode.textContent.slice(E).indexOf(` `);return T>-1?E+T:-1}},{key:"optimize",value:function(E){this.domNode.textContent.endsWith(` `)||this.appendChild(l.default.create("text",` `)),O(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"optimize",this).call(this,E);var w=this.next;w!=null&&w.prev===this&&w.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===w.statics.formats(w.domNode)&&(w.optimize(E),w.moveChildren(this),w.remove())}},{key:"replace",value:function(E){O(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"replace",this).call(this,E),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(w){var T=l.default.find(w);T==null?w.parentNode.removeChild(w):T instanceof l.default.Embed?T.remove():T.unwrap()})}}],[{key:"create",value:function(E){var w=O(N.__proto__||Object.getPrototypeOf(N),"create",this).call(this,E);return w.setAttribute("spellcheck",!1),w}},{key:"formats",value:function(){return!0}}]),N}(a.default);A.blotName="code-block",A.tagName="PRE",A.TAB=" ",r.Code=S,r.default=A},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},y=function(){function j(D,q){var L=[],$=!0,z=!1,H=void 0;try{for(var F=D[Symbol.iterator](),I;!($=(I=F.next()).done)&&(L.push(I.value),!(q&&L.length===q));$=!0);}catch(G){z=!0,H=G}finally{try{!$&&F.return&&F.return()}finally{if(z)throw H}}return L}return function(D,q){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return j(D,q);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function(){function j(D,q){for(var L=0;L=z&&!W.endsWith(` `)&&($=!0),L.scroll.insertAt(H,W);var J=L.scroll.line(H),re=y(J,2),ie=re[0],ae=re[1],se=(0,E.default)({},(0,u.bubbleFormats)(ie));if(ie instanceof m.default){var C=ie.descendant(a.default.Leaf,ae),Z=y(C,1),Y=Z[0];se=(0,E.default)(se,(0,u.bubbleFormats)(Y))}G=l.default.attributes.diff(se,G)||{}}else if(c(F.insert)==="object"){var B=Object.keys(F.insert)[0];if(B==null)return H;L.scroll.insertAt(H,B,F.insert[B])}z+=I}return Object.keys(G).forEach(function(M){L.scroll.formatAt(H,I,M,G[M])}),H+I},0),q.reduce(function(H,F){return typeof F.delete=="number"?(L.scroll.deleteAt(H,F.delete),H):H+(F.retain||F.insert.length||1)},0),this.scroll.batchEnd(),this.update(q)}},{key:"deleteText",value:function(q,L){return this.scroll.deleteAt(q,L),this.update(new _.default().retain(q).delete(L))}},{key:"formatLine",value:function(q,L){var $=this,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(z).forEach(function(H){if(!($.scroll.whitelist!=null&&!$.scroll.whitelist[H])){var F=$.scroll.lines(q,Math.max(L,1)),I=L;F.forEach(function(G){var W=G.length();if(!(G instanceof h.default))G.format(H,z[H]);else{var J=q-G.offset($.scroll),re=G.newlineIndex(J+I)-J+1;G.formatAt(J,re,H,z[H])}I-=W})}}),this.scroll.optimize(),this.update(new _.default().retain(q).retain(L,(0,A.default)(z)))}},{key:"formatText",value:function(q,L){var $=this,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(z).forEach(function(H){$.scroll.formatAt(q,L,H,z[H])}),this.update(new _.default().retain(q).retain(L,(0,A.default)(z)))}},{key:"getContents",value:function(q,L){return this.delta.slice(q,q+L)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(q,L){return q.concat(L.delta())},new _.default)}},{key:"getFormat",value:function(q){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,$=[],z=[];L===0?this.scroll.path(q).forEach(function(F){var I=y(F,1),G=I[0];G instanceof m.default?$.push(G):G instanceof a.default.Leaf&&z.push(G)}):($=this.scroll.lines(q,L),z=this.scroll.descendants(a.default.Leaf,q,L));var H=[$,z].map(function(F){if(F.length===0)return{};for(var I=(0,u.bubbleFormats)(F.shift());Object.keys(I).length>0;){var G=F.shift();if(G==null)return I;I=V((0,u.bubbleFormats)(G),I)}return I});return E.default.apply(E.default,H)}},{key:"getText",value:function(q,L){return this.getContents(q,L).filter(function($){return typeof $.insert=="string"}).map(function($){return $.insert}).join("")}},{key:"insertEmbed",value:function(q,L,$){return this.scroll.insertAt(q,L,$),this.update(new _.default().retain(q).insert(T({},L,$)))}},{key:"insertText",value:function(q,L){var $=this,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return L=L.replace(/\r\n/g,` `).replace(/\r/g,` `),this.scroll.insertAt(q,L),Object.keys(z).forEach(function(H){$.scroll.formatAt(q,L.length,H,z[H])}),this.update(new _.default().retain(q).insert(L,(0,A.default)(z)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var q=this.scroll.children.head;return q.statics.blotName!==m.default.blotName||q.children.length>1?!1:q.children.head instanceof b.default}},{key:"removeFormat",value:function(q,L){var $=this.getText(q,L),z=this.scroll.line(q+L),H=y(z,2),F=H[0],I=H[1],G=0,W=new _.default;F!=null&&(F instanceof h.default?G=F.newlineIndex(I)-I+1:G=F.length()-I,W=F.delta().slice(I,I+G-1).insert(` `));var J=this.getContents(q,L+G),re=J.diff(new _.default().insert($).concat(W)),ie=new _.default().retain(q).concat(re);return this.applyDelta(ie)}},{key:"update",value:function(q){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,z=this.delta;if(L.length===1&&L[0].type==="characterData"&&L[0].target.data.match(R)&&a.default.find(L[0].target)){var H=a.default.find(L[0].target),F=(0,u.bubbleFormats)(H),I=H.offset(this.scroll),G=L[0].oldValue.replace(f.default.CONTENTS,""),W=new _.default().insert(G),J=new _.default().insert(H.value()),re=new _.default().retain(I).concat(W.diff(J,$));q=re.reduce(function(ie,ae){return ae.insert?ie.insert(ae.insert,F):ie.push(ae)},new _.default),this.delta=z.compose(q)}else this.delta=this.getDelta(),(!q||!(0,N.default)(z.compose(q),this.delta))&&(q=z.diff(this.delta,$));return q}}]),j}();function V(j,D){return Object.keys(D).reduce(function(q,L){return j[L]==null||(D[L]===j[L]?q[L]=D[L]:Array.isArray(D[L])?D[L].indexOf(j[L])<0&&(q[L]=D[L].concat([j[L]])):q[L]=[D[L],j[L]]),q},{})}function ee(j){return j.reduce(function(D,q){if(q.insert===1){var L=(0,A.default)(q.attributes);return delete L.image,D.insert({image:q.attributes.image},L)}if(q.attributes!=null&&(q.attributes.list===!0||q.attributes.bullet===!0)&&(q=(0,A.default)(q),q.attributes.list?q.attributes.list="ordered":(q.attributes.list="bullet",delete q.attributes.bullet)),typeof q.insert=="string"){var $=q.insert.replace(/\r\n/g,` `).replace(/\r/g,` `);return D.insert($,q.attributes)}return D.push(q)},new _.default)}r.default=U},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var c=function(){function k(N,x){var E=[],w=!0,T=!1,P=void 0;try{for(var R=N[Symbol.iterator](),U;!(w=(U=R.next()).done)&&(E.push(U.value),!(x&&E.length===x));w=!0);}catch(V){T=!0,P=V}finally{try{!w&&R.return&&R.return()}finally{if(T)throw P}}return E}return function(N,x){if(Array.isArray(N))return N;if(Symbol.iterator in Object(N))return k(N,x);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),y=function(){function k(N,x){for(var E=0;E1&&arguments[1]!==void 0?arguments[1]:0;m(this,k),this.index=N,this.length=x},S=function(){function k(N,x){var E=this;m(this,k),this.emitter=x,this.scroll=N,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=g.default.create("cursor",this),this.lastRange=this.savedRange=new b(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){E.mouseDown||setTimeout(E.update.bind(E,v.default.sources.USER),1)}),this.emitter.on(v.default.events.EDITOR_CHANGE,function(w,T){w===v.default.events.TEXT_CHANGE&&T.length()>0&&E.update(v.default.sources.SILENT)}),this.emitter.on(v.default.events.SCROLL_BEFORE_UPDATE,function(){if(!!E.hasFocus()){var w=E.getNativeRange();w!=null&&w.start.node!==E.cursor.textNode&&E.emitter.once(v.default.events.SCROLL_UPDATE,function(){try{E.setNativeRange(w.start.node,w.start.offset,w.end.node,w.end.offset)}catch{}})}}),this.emitter.on(v.default.events.SCROLL_OPTIMIZE,function(w,T){if(T.range){var P=T.range,R=P.startNode,U=P.startOffset,V=P.endNode,ee=P.endOffset;E.setNativeRange(R,U,V,ee)}}),this.update(v.default.sources.SILENT)}return y(k,[{key:"handleComposition",value:function(){var x=this;this.root.addEventListener("compositionstart",function(){x.composing=!0}),this.root.addEventListener("compositionend",function(){if(x.composing=!1,x.cursor.parent){var E=x.cursor.restore();if(!E)return;setTimeout(function(){x.setNativeRange(E.startNode,E.startOffset,E.endNode,E.endOffset)},1)}})}},{key:"handleDragging",value:function(){var x=this;this.emitter.listenDOM("mousedown",document.body,function(){x.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){x.mouseDown=!1,x.update(v.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(x,E){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[x])){this.scroll.update();var w=this.getNativeRange();if(!(w==null||!w.native.collapsed||g.default.query(x,g.default.Scope.BLOCK))){if(w.start.node!==this.cursor.textNode){var T=g.default.find(w.start.node,!1);if(T==null)return;if(T instanceof g.default.Leaf){var P=T.split(w.start.offset);T.parent.insertBefore(this.cursor,P)}else T.insertBefore(this.cursor,w.start.node);this.cursor.attach()}this.cursor.format(x,E),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(x){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=this.scroll.length();x=Math.min(x,w-1),E=Math.min(x+E,w-1)-x;var T=void 0,P=this.scroll.leaf(x),R=c(P,2),U=R[0],V=R[1];if(U==null)return null;var ee=U.position(V,!0),j=c(ee,2);T=j[0],V=j[1];var D=document.createRange();if(E>0){D.setStart(T,V);var q=this.scroll.leaf(x+E),L=c(q,2);if(U=L[0],V=L[1],U==null)return null;var $=U.position(V,!0),z=c($,2);return T=z[0],V=z[1],D.setEnd(T,V),D.getBoundingClientRect()}else{var H="left",F=void 0;return T instanceof Text?(V0&&(H="right")),{bottom:F.top+F.height,height:F.height,left:F[H],right:F[H],top:F.top,width:0}}}},{key:"getNativeRange",value:function(){var x=document.getSelection();if(x==null||x.rangeCount<=0)return null;var E=x.getRangeAt(0);if(E==null)return null;var w=this.normalizeNative(E);return s.info("getNativeRange",w),w}},{key:"getRange",value:function(){var x=this.getNativeRange();if(x==null)return[null,null];var E=this.normalizedToRange(x);return[E,x]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(x){var E=this,w=[[x.start.node,x.start.offset]];x.native.collapsed||w.push([x.end.node,x.end.offset]);var T=w.map(function(U){var V=c(U,2),ee=V[0],j=V[1],D=g.default.find(ee,!0),q=D.offset(E.scroll);return j===0?q:D instanceof g.default.Container?q+D.length():q+D.index(ee,j)}),P=Math.min(Math.max.apply(Math,u(T)),this.scroll.length()-1),R=Math.min.apply(Math,[P].concat(u(T)));return new b(R,P-R)}},{key:"normalizeNative",value:function(x){if(!A(this.root,x.startContainer)||!x.collapsed&&!A(this.root,x.endContainer))return null;var E={start:{node:x.startContainer,offset:x.startOffset},end:{node:x.endContainer,offset:x.endOffset},native:x};return[E.start,E.end].forEach(function(w){for(var T=w.node,P=w.offset;!(T instanceof Text)&&T.childNodes.length>0;)if(T.childNodes.length>P)T=T.childNodes[P],P=0;else if(T.childNodes.length===P)T=T.lastChild,P=T instanceof Text?T.data.length:T.childNodes.length+1;else break;w.node=T,w.offset=P}),E}},{key:"rangeToNative",value:function(x){var E=this,w=x.collapsed?[x.index]:[x.index,x.index+x.length],T=[],P=this.scroll.length();return w.forEach(function(R,U){R=Math.min(P-1,R);var V=void 0,ee=E.scroll.leaf(R),j=c(ee,2),D=j[0],q=j[1],L=D.position(q,U!==0),$=c(L,2);V=$[0],q=$[1],T.push(V,q)}),T.length<2&&(T=T.concat(T)),T}},{key:"scrollIntoView",value:function(x){var E=this.lastRange;if(E!=null){var w=this.getBounds(E.index,E.length);if(w!=null){var T=this.scroll.length()-1,P=this.scroll.line(Math.min(E.index,T)),R=c(P,1),U=R[0],V=U;if(E.length>0){var ee=this.scroll.line(Math.min(E.index+E.length,T)),j=c(ee,1);V=j[0]}if(!(U==null||V==null)){var D=x.getBoundingClientRect();w.topD.bottom&&(x.scrollTop+=w.bottom-D.bottom)}}}}},{key:"setNativeRange",value:function(x,E){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x,T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:E,P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(s.info("setNativeRange",x,E,w,T),!(x!=null&&(this.root.parentNode==null||x.parentNode==null||w.parentNode==null))){var R=document.getSelection();if(R!=null)if(x!=null){this.hasFocus()||this.root.focus();var U=(this.getNativeRange()||{}).native;if(U==null||P||x!==U.startContainer||E!==U.startOffset||w!==U.endContainer||T!==U.endOffset){x.tagName=="BR"&&(E=[].indexOf.call(x.parentNode.childNodes,x),x=x.parentNode),w.tagName=="BR"&&(T=[].indexOf.call(w.parentNode.childNodes,w),w=w.parentNode);var V=document.createRange();V.setStart(x,E),V.setEnd(w,T),R.removeAllRanges(),R.addRange(V)}}else R.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(x){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;if(typeof E=="string"&&(w=E,E=!1),s.info("setRange",x),x!=null){var T=this.rangeToNative(x);this.setNativeRange.apply(this,u(T).concat([E]))}else this.setNativeRange(null);this.update(w)}},{key:"update",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.default.sources.USER,E=this.lastRange,w=this.getRange(),T=c(w,2),P=T[0],R=T[1];if(this.lastRange=P,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,o.default)(E,this.lastRange)){var U;!this.composing&&R!=null&&R.native.collapsed&&R.start.node!==this.cursor.textNode&&this.cursor.restore();var V=[v.default.events.SELECTION_CHANGE,(0,p.default)(this.lastRange),(0,p.default)(E),x];if((U=this.emitter).emit.apply(U,[v.default.events.EDITOR_CHANGE].concat(V)),x!==v.default.sources.SILENT){var ee;(ee=this.emitter).emit.apply(ee,V)}}}}]),k}();function A(k,N){try{N.parentNode}catch{return!1}return N instanceof Text&&(N=N.parentNode),k.contains(N)}r.Range=b,r.default=S},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function v(h,d){for(var f=0;f0&&(a+=1),[this.parent.domNode,a]},p.prototype.value=function(){var l;return l={},l[this.statics.blotName]=this.statics.value(this.domNode)||!0,l},p.scope=O.Scope.INLINE_BLOT,p}(y.default);r.default=g},function(t,r,i){var c=i(11),y=i(3),O={attributes:{compose:function(_,p,l){typeof _!="object"&&(_={}),typeof p!="object"&&(p={});var o=y(!0,{},p);l||(o=Object.keys(o).reduce(function(v,h){return o[h]!=null&&(v[h]=o[h]),v},{}));for(var a in _)_[a]!==void 0&&p[a]===void 0&&(o[a]=_[a]);return Object.keys(o).length>0?o:void 0},diff:function(_,p){typeof _!="object"&&(_={}),typeof p!="object"&&(p={});var l=Object.keys(_).concat(Object.keys(p)).reduce(function(o,a){return c(_[a],p[a])||(o[a]=p[a]===void 0?null:p[a]),o},{});return Object.keys(l).length>0?l:void 0},transform:function(_,p,l){if(typeof _!="object")return p;if(typeof p=="object"){if(!l)return p;var o=Object.keys(p).reduce(function(a,v){return _[v]===void 0&&(a[v]=p[v]),a},{});return Object.keys(o).length>0?o:void 0}}},iterator:function(_){return new g(_)},length:function(_){return typeof _.delete=="number"?_.delete:typeof _.retain=="number"?_.retain:typeof _.insert=="string"?_.insert.length:1}};function g(_){this.ops=_,this.index=0,this.offset=0}g.prototype.hasNext=function(){return this.peekLength()<1/0},g.prototype.next=function(_){_||(_=1/0);var p=this.ops[this.index];if(p){var l=this.offset,o=O.length(p);if(_>=o-l?(_=o-l,this.index+=1,this.offset=0):this.offset+=_,typeof p.delete=="number")return{delete:_};var a={};return p.attributes&&(a.attributes=p.attributes),typeof p.retain=="number"?a.retain=_:typeof p.insert=="string"?a.insert=p.insert.substr(l,_):a.insert=p.insert,a}else return{retain:1/0}},g.prototype.peek=function(){return this.ops[this.index]},g.prototype.peekLength=function(){return this.ops[this.index]?O.length(this.ops[this.index])-this.offset:1/0},g.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},g.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var _=this.offset,p=this.index,l=this.next(),o=this.ops.slice(this.index);return this.offset=_,this.index=p,[l].concat(o)}else return[]},t.exports=O},function(t,r){var i=function(){function c(h,d){return d!=null&&h instanceof d}var y;try{y=Map}catch{y=function(){}}var O;try{O=Set}catch{O=function(){}}var g;try{g=Promise}catch{g=function(){}}function _(h,d,f,u,m){typeof d=="object"&&(f=d.depth,u=d.prototype,m=d.includeNonEnumerable,d=d.circular);var s=[],b=[],S=typeof Buffer<"u";typeof d>"u"&&(d=!0),typeof f>"u"&&(f=1/0);function A(k,N){if(k===null)return null;if(N===0)return k;var x,E;if(typeof k!="object")return k;if(c(k,y))x=new y;else if(c(k,O))x=new O;else if(c(k,g))x=new g(function(D,q){k.then(function(L){D(A(L,N-1))},function(L){q(A(L,N-1))})});else if(_.__isArray(k))x=[];else if(_.__isRegExp(k))x=new RegExp(k.source,v(k)),k.lastIndex&&(x.lastIndex=k.lastIndex);else if(_.__isDate(k))x=new Date(k.getTime());else{if(S&&Buffer.isBuffer(k))return Buffer.allocUnsafe?x=Buffer.allocUnsafe(k.length):x=new Buffer(k.length),k.copy(x),x;c(k,Error)?x=Object.create(k):typeof u>"u"?(E=Object.getPrototypeOf(k),x=Object.create(E)):(x=Object.create(u),E=u)}if(d){var w=s.indexOf(k);if(w!=-1)return b[w];s.push(k),b.push(x)}c(k,y)&&k.forEach(function(D,q){var L=A(q,N-1),$=A(D,N-1);x.set(L,$)}),c(k,O)&&k.forEach(function(D){var q=A(D,N-1);x.add(q)});for(var T in k){var P;E&&(P=Object.getOwnPropertyDescriptor(E,T)),!(P&&P.set==null)&&(x[T]=A(k[T],N-1))}if(Object.getOwnPropertySymbols)for(var R=Object.getOwnPropertySymbols(k),T=0;T0){if(V instanceof o.BlockEmbed||q instanceof o.BlockEmbed){this.optimize();return}if(V instanceof f.default){var L=V.newlineIndex(V.length(),!0);if(L>-1&&(V=V.split(L+1),V===q)){this.optimize();return}}else if(q instanceof f.default){var $=q.newlineIndex(0);$>-1&&q.split($+1)}var z=q.children.head instanceof h.default?null:q.children.head;V.moveChildren(q,z),V.remove()}this.optimize()}},{key:"enable",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",T)}},{key:"formatAt",value:function(T,P,R,U){this.whitelist!=null&&!this.whitelist[R]||(O(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"formatAt",this).call(this,T,P,R,U),this.optimize())}},{key:"insertAt",value:function(T,P,R){if(!(R!=null&&this.whitelist!=null&&!this.whitelist[P])){if(T>=this.length())if(R==null||_.default.query(P,_.default.Scope.BLOCK)==null){var U=_.default.create(this.statics.defaultChild);this.appendChild(U),R==null&&P.endsWith(` `)&&(P=P.slice(0,-1)),U.insertAt(0,P,R)}else{var V=_.default.create(P,R);this.appendChild(V)}else O(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertAt",this).call(this,T,P,R);this.optimize()}}},{key:"insertBefore",value:function(T,P){if(T.statics.scope===_.default.Scope.INLINE_BLOT){var R=_.default.create(this.statics.defaultChild);R.appendChild(T),T=R}O(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertBefore",this).call(this,T,P)}},{key:"leaf",value:function(T){return this.path(T).pop()||[null,-1]}},{key:"line",value:function(T){return T===this.length()?this.line(T-1):this.descendant(k,T)}},{key:"lines",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,R=function U(V,ee,j){var D=[],q=j;return V.children.forEachAt(ee,j,function(L,$,z){k(L)?D.push(L):L instanceof _.default.Container&&(D=D.concat(U(L,$,q))),q-=z}),D};return R(this,T,P)}},{key:"optimize",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(O(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"optimize",this).call(this,T,P),T.length>0&&this.emitter.emit(l.default.events.SCROLL_OPTIMIZE,T,P))}},{key:"path",value:function(T){return O(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"path",this).call(this,T).slice(1)}},{key:"update",value:function(T){if(this.batch!==!0){var P=l.default.sources.USER;typeof T=="string"&&(P=T),Array.isArray(T)||(T=this.observer.takeRecords()),T.length>0&&this.emitter.emit(l.default.events.SCROLL_BEFORE_UPDATE,P,T),O(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"update",this).call(this,T.concat([])),T.length>0&&this.emitter.emit(l.default.events.SCROLL_UPDATE,P,T)}}}]),E}(_.default.Scroll);N.blotName="scroll",N.className="ql-editor",N.tagName="DIV",N.defaultChild="block",N.allowedChildren=[a.default,o.BlockEmbed,m.default],r.default=N},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},y=function(){function F(I,G){var W=[],J=!0,re=!1,ie=void 0;try{for(var ae=I[Symbol.iterator](),se;!(J=(se=ae.next()).done)&&(W.push(se.value),!(G&&W.length===G));J=!0);}catch(C){re=!0,ie=C}finally{try{!J&&ae.return&&ae.return()}finally{if(re)throw ie}}return W}return function(I,G){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return F(I,G);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function(){function F(I,G){for(var W=0;W1&&arguments[1]!==void 0?arguments[1]:{},re=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ie=H(W);if(ie==null||ie.key==null)return R.warn("Attempted to add invalid keyboard binding",ie);typeof J=="function"&&(J={handler:J}),typeof re=="function"&&(re={handler:re}),ie=(0,a.default)(ie,J,re),this.bindings[ie.key]=this.bindings[ie.key]||[],this.bindings[ie.key].push(ie)}},{key:"listen",value:function(){var W=this;this.quill.root.addEventListener("keydown",function(J){if(!J.defaultPrevented){var re=J.which||J.keyCode,ie=(W.bindings[re]||[]).filter(function(he){return I.match(J,he)});if(ie.length!==0){var ae=W.quill.getSelection();if(!(ae==null||!W.quill.hasFocus())){var se=W.quill.getLine(ae.index),C=y(se,2),Z=C[0],Y=C[1],B=W.quill.getLeaf(ae.index),M=y(B,2),K=M[0],X=M[1],Q=ae.length===0?[K,X]:W.quill.getLeaf(ae.index+ae.length),ne=y(Q,2),oe=ne[0],le=ne[1],me=K instanceof m.default.Text?K.value().slice(0,X):"",Oe=oe instanceof m.default.Text?oe.value().slice(le):"",fe={collapsed:ae.length===0,empty:ae.length===0&&Z.length()<=1,format:W.quill.getFormat(ae),offset:Y,prefix:me,suffix:Oe},ut=ie.some(function(he){if(he.collapsed!=null&&he.collapsed!==fe.collapsed||he.empty!=null&&he.empty!==fe.empty||he.offset!=null&&he.offset!==fe.offset)return!1;if(Array.isArray(he.format)){if(he.format.every(function(ke){return fe.format[ke]==null}))return!1}else if(c(he.format)==="object"&&!Object.keys(he.format).every(function(ke){return he.format[ke]===!0?fe.format[ke]!=null:he.format[ke]===!1?fe.format[ke]==null:(0,l.default)(he.format[ke],fe.format[ke])}))return!1;return he.prefix!=null&&!he.prefix.test(fe.prefix)||he.suffix!=null&&!he.suffix.test(fe.suffix)?!1:he.handler.call(W,ae,fe)!==!0});ut&&J.preventDefault()}}}})}}]),I}(N.default);V.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},V.DEFAULTS={bindings:{bold:z("bold"),italic:z("italic"),underline:z("underline"),indent:{key:V.keys.TAB,format:["blockquote","indent","list"],handler:function(I,G){if(G.collapsed&&G.offset!==0)return!0;this.quill.format("indent","+1",b.default.sources.USER)}},outdent:{key:V.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(I,G){if(G.collapsed&&G.offset!==0)return!0;this.quill.format("indent","-1",b.default.sources.USER)}},"outdent backspace":{key:V.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(I,G){G.format.indent!=null?this.quill.format("indent","-1",b.default.sources.USER):G.format.list!=null&&this.quill.format("list",!1,b.default.sources.USER)}},"indent code-block":$(!0),"outdent code-block":$(!1),"remove tab":{key:V.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(I){this.quill.deleteText(I.index-1,1,b.default.sources.USER)}},tab:{key:V.keys.TAB,handler:function(I){this.quill.history.cutoff();var G=new h.default().retain(I.index).delete(I.length).insert(" ");this.quill.updateContents(G,b.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(I.index+1,b.default.sources.SILENT)}},"list empty enter":{key:V.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(I,G){this.quill.format("list",!1,b.default.sources.USER),G.format.indent&&this.quill.format("indent",!1,b.default.sources.USER)}},"checklist enter":{key:V.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(I){var G=this.quill.getLine(I.index),W=y(G,2),J=W[0],re=W[1],ie=(0,a.default)({},J.formats(),{list:"checked"}),ae=new h.default().retain(I.index).insert(` `,ie).retain(J.length()-re-1).retain(1,{list:"unchecked"});this.quill.updateContents(ae,b.default.sources.USER),this.quill.setSelection(I.index+1,b.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:V.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(I,G){var W=this.quill.getLine(I.index),J=y(W,2),re=J[0],ie=J[1],ae=new h.default().retain(I.index).insert(` `,G.format).retain(re.length()-ie-1).retain(1,{header:null});this.quill.updateContents(ae,b.default.sources.USER),this.quill.setSelection(I.index+1,b.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(I,G){var W=G.prefix.length,J=this.quill.getLine(I.index),re=y(J,2),ie=re[0],ae=re[1];if(ae>W)return!0;var se=void 0;switch(G.prefix.trim()){case"[]":case"[ ]":se="unchecked";break;case"[x]":se="checked";break;case"-":case"*":se="bullet";break;default:se="ordered"}this.quill.insertText(I.index," ",b.default.sources.USER),this.quill.history.cutoff();var C=new h.default().retain(I.index-ae).delete(W+1).retain(ie.length()-2-ae).retain(1,{list:se});this.quill.updateContents(C,b.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(I.index-W,b.default.sources.SILENT)}},"code exit":{key:V.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(I){var G=this.quill.getLine(I.index),W=y(G,2),J=W[0],re=W[1],ie=new h.default().retain(I.index+J.length()-re-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(ie,b.default.sources.USER)}},"embed left":ee(V.keys.LEFT,!1),"embed left shift":ee(V.keys.LEFT,!0),"embed right":ee(V.keys.RIGHT,!1),"embed right shift":ee(V.keys.RIGHT,!0)}};function ee(F,I){var G,W=F===V.keys.LEFT?"prefix":"suffix";return G={key:F,shiftKey:I,altKey:null},E(G,W,/^$/),E(G,"handler",function(re){var ie=re.index;F===V.keys.RIGHT&&(ie+=re.length+1);var ae=this.quill.getLeaf(ie),se=y(ae,1),C=se[0];return C instanceof m.default.Embed?(F===V.keys.LEFT?I?this.quill.setSelection(re.index-1,re.length+1,b.default.sources.USER):this.quill.setSelection(re.index-1,b.default.sources.USER):I?this.quill.setSelection(re.index,re.length+1,b.default.sources.USER):this.quill.setSelection(re.index+re.length+1,b.default.sources.USER),!1):!0}),G}function j(F,I){if(!(F.index===0||this.quill.getLength()<=1)){var G=this.quill.getLine(F.index),W=y(G,1),J=W[0],re={};if(I.offset===0){var ie=this.quill.getLine(F.index-1),ae=y(ie,1),se=ae[0];if(se!=null&&se.length()>1){var C=J.formats(),Z=this.quill.getFormat(F.index-1,1);re=f.default.attributes.diff(C,Z)||{}}}var Y=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(I.prefix)?2:1;this.quill.deleteText(F.index-Y,Y,b.default.sources.USER),Object.keys(re).length>0&&this.quill.formatLine(F.index-Y,Y,re,b.default.sources.USER),this.quill.focus()}}function D(F,I){var G=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(I.suffix)?2:1;if(!(F.index>=this.quill.getLength()-G)){var W={},J=0,re=this.quill.getLine(F.index),ie=y(re,1),ae=ie[0];if(I.offset>=ae.length()-1){var se=this.quill.getLine(F.index+1),C=y(se,1),Z=C[0];if(Z){var Y=ae.formats(),B=this.quill.getFormat(F.index,1);W=f.default.attributes.diff(Y,B)||{},J=Z.length()}}this.quill.deleteText(F.index,G,b.default.sources.USER),Object.keys(W).length>0&&this.quill.formatLine(F.index+J-1,G,W,b.default.sources.USER)}}function q(F){var I=this.quill.getLines(F),G={};if(I.length>1){var W=I[0].formats(),J=I[I.length-1].formats();G=f.default.attributes.diff(J,W)||{}}this.quill.deleteText(F,b.default.sources.USER),Object.keys(G).length>0&&this.quill.formatLine(F.index,1,G,b.default.sources.USER),this.quill.setSelection(F.index,b.default.sources.SILENT),this.quill.focus()}function L(F,I){var G=this;F.length>0&&this.quill.scroll.deleteAt(F.index,F.length);var W=Object.keys(I.format).reduce(function(J,re){return m.default.query(re,m.default.Scope.BLOCK)&&!Array.isArray(I.format[re])&&(J[re]=I.format[re]),J},{});this.quill.insertText(F.index,` `,W,b.default.sources.USER),this.quill.setSelection(F.index+1,b.default.sources.SILENT),this.quill.focus(),Object.keys(I.format).forEach(function(J){W[J]==null&&(Array.isArray(I.format[J])||J!=="link"&&G.quill.format(J,I.format[J],b.default.sources.USER))})}function $(F){return{key:V.keys.TAB,shiftKey:!F,format:{"code-block":!0},handler:function(G){var W=m.default.query("code-block"),J=G.index,re=G.length,ie=this.quill.scroll.descendant(W,J),ae=y(ie,2),se=ae[0],C=ae[1];if(se!=null){var Z=this.quill.getIndex(se),Y=se.newlineIndex(C,!0)+1,B=se.newlineIndex(Z+C+re),M=se.domNode.textContent.slice(Y,B).split(` `);C=0,M.forEach(function(K,X){F?(se.insertAt(Y+C,W.TAB),C+=W.TAB.length,X===0?J+=W.TAB.length:re+=W.TAB.length):K.startsWith(W.TAB)&&(se.deleteAt(Y+C,W.TAB.length),C-=W.TAB.length,X===0?J-=W.TAB.length:re-=W.TAB.length),C+=K.length+1}),this.quill.update(b.default.sources.USER),this.quill.setSelection(J,re,b.default.sources.SILENT)}}}}function z(F){return{key:F[0].toUpperCase(),shortKey:!0,handler:function(G,W){this.quill.format(F,!W.format[F],b.default.sources.USER)}}}function H(F){if(typeof F=="string"||typeof F=="number")return H({key:F});if((typeof F>"u"?"undefined":c(F))==="object"&&(F=(0,_.default)(F,!1)),typeof F.key=="string")if(V.keys[F.key.toUpperCase()]!=null)F.key=V.keys[F.key.toUpperCase()];else if(F.key.length===1)F.key=F.key.toUpperCase().charCodeAt(0);else return null;return F.shortKey&&(F[U]=F.shortKey,delete F.shortKey),F}r.default=V,r.SHORTKEY=U},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function f(u,m){var s=[],b=!0,S=!1,A=void 0;try{for(var k=u[Symbol.iterator](),N;!(b=(N=k.next()).done)&&(s.push(N.value),!(m&&s.length===m));b=!0);}catch(x){S=!0,A=x}finally{try{!b&&k.return&&k.return()}finally{if(S)throw A}}return s}return function(u,m){if(Array.isArray(u))return u;if(Symbol.iterator in Object(u))return f(u,m);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),y=function f(u,m,s){u===null&&(u=Function.prototype);var b=Object.getOwnPropertyDescriptor(u,m);if(b===void 0){var S=Object.getPrototypeOf(u);return S===null?void 0:f(S,m,s)}else{if("value"in b)return b.value;var A=b.get;return A===void 0?void 0:A.call(s)}},O=function(){function f(u,m){for(var s=0;s-1}r.default=a,r.sanitize=v},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},y=function(){function d(f,u){for(var m=0;m1&&arguments[1]!==void 0?arguments[1]:!1,s=this.container.querySelector(".ql-selected");if(u!==s&&(s!=null&&s.classList.remove("ql-selected"),u!=null&&(u.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(u.parentNode.children,u),u.hasAttribute("data-value")?this.label.setAttribute("data-value",u.getAttribute("data-value")):this.label.removeAttribute("data-value"),u.hasAttribute("data-label")?this.label.setAttribute("data-label",u.getAttribute("data-label")):this.label.removeAttribute("data-label"),m))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":c(Event))==="object"){var b=document.createEvent("Event");b.initEvent("change",!0,!0),this.select.dispatchEvent(b)}this.close()}}},{key:"update",value:function(){var u=void 0;if(this.select.selectedIndex>-1){var m=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];u=this.select.options[this.select.selectedIndex],this.selectItem(m)}else this.selectItem(null);var s=u!=null&&u!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",s)}}]),d}();r.default=h},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=i(0),y=R(c),O=i(5),g=R(O),_=i(4),p=R(_),l=i(16),o=R(l),a=i(25),v=R(a),h=i(24),d=R(h),f=i(35),u=R(f),m=i(6),s=R(m),b=i(22),S=R(b),A=i(7),k=R(A),N=i(55),x=R(N),E=i(42),w=R(E),T=i(23),P=R(T);function R(U){return U&&U.__esModule?U:{default:U}}g.default.register({"blots/block":p.default,"blots/block/embed":_.BlockEmbed,"blots/break":o.default,"blots/container":v.default,"blots/cursor":d.default,"blots/embed":u.default,"blots/inline":s.default,"blots/scroll":S.default,"blots/text":k.default,"modules/clipboard":x.default,"modules/history":w.default,"modules/keyboard":P.default}),y.default.register(p.default,o.default,d.default,s.default,S.default,k.default),r.default=g.default},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=i(1),y=function(){function O(g){this.domNode=g,this.domNode[c.DATA_KEY]={blot:this}}return Object.defineProperty(O.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),O.create=function(g){if(this.tagName==null)throw new c.ParchmentError("Blot definition missing tagName");var _;return Array.isArray(this.tagName)?(typeof g=="string"&&(g=g.toUpperCase(),parseInt(g).toString()===g&&(g=parseInt(g))),typeof g=="number"?_=document.createElement(this.tagName[g-1]):this.tagName.indexOf(g)>-1?_=document.createElement(g):_=document.createElement(this.tagName[0])):_=document.createElement(this.tagName),this.className&&_.classList.add(this.className),_},O.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},O.prototype.clone=function(){var g=this.domNode.cloneNode(!1);return c.create(g)},O.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[c.DATA_KEY]},O.prototype.deleteAt=function(g,_){var p=this.isolate(g,_);p.remove()},O.prototype.formatAt=function(g,_,p,l){var o=this.isolate(g,_);if(c.query(p,c.Scope.BLOT)!=null&&l)o.wrap(p,l);else if(c.query(p,c.Scope.ATTRIBUTE)!=null){var a=c.create(this.statics.scope);o.wrap(a),a.format(p,l)}},O.prototype.insertAt=function(g,_,p){var l=p==null?c.create("text",_):c.create(_,p),o=this.split(g);this.parent.insertBefore(l,o)},O.prototype.insertInto=function(g,_){_===void 0&&(_=null),this.parent!=null&&this.parent.children.remove(this);var p=null;g.children.insertBefore(this,_),_!=null&&(p=_.domNode),(this.domNode.parentNode!=g.domNode||this.domNode.nextSibling!=p)&&g.domNode.insertBefore(this.domNode,p),this.parent=g,this.attach()},O.prototype.isolate=function(g,_){var p=this.split(g);return p.split(_),p},O.prototype.length=function(){return 1},O.prototype.offset=function(g){return g===void 0&&(g=this.parent),this.parent==null||this==g?0:this.parent.children.offset(this)+this.parent.offset(g)},O.prototype.optimize=function(g){this.domNode[c.DATA_KEY]!=null&&delete this.domNode[c.DATA_KEY].mutations},O.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},O.prototype.replace=function(g){g.parent!=null&&(g.parent.insertBefore(this,g.next),g.remove())},O.prototype.replaceWith=function(g,_){var p=typeof g=="string"?c.create(g,_):g;return p.replace(this),p},O.prototype.split=function(g,_){return g===0?this:this.next},O.prototype.update=function(g,_){},O.prototype.wrap=function(g,_){var p=typeof g=="string"?c.create(g,_):g;return this.parent!=null&&this.parent.insertBefore(p,this.next),p.appendChild(this),p},O.blotName="abstract",O}();r.default=y},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=i(12),y=i(32),O=i(33),g=i(1),_=function(){function p(l){this.attributes={},this.domNode=l,this.build()}return p.prototype.attribute=function(l,o){o?l.add(this.domNode,o)&&(l.value(this.domNode)!=null?this.attributes[l.attrName]=l:delete this.attributes[l.attrName]):(l.remove(this.domNode),delete this.attributes[l.attrName])},p.prototype.build=function(){var l=this;this.attributes={};var o=c.default.keys(this.domNode),a=y.default.keys(this.domNode),v=O.default.keys(this.domNode);o.concat(a).concat(v).forEach(function(h){var d=g.query(h,g.Scope.ATTRIBUTE);d instanceof c.default&&(l.attributes[d.attrName]=d)})},p.prototype.copy=function(l){var o=this;Object.keys(this.attributes).forEach(function(a){var v=o.attributes[a].value(o.domNode);l.format(a,v)})},p.prototype.move=function(l){var o=this;this.copy(l),Object.keys(this.attributes).forEach(function(a){o.attributes[a].remove(o.domNode)}),this.attributes={}},p.prototype.values=function(){var l=this;return Object.keys(this.attributes).reduce(function(o,a){return o[a]=l.attributes[a].value(l.domNode),o},{})},p}();r.default=_},function(t,r,i){var c=this&&this.__extends||function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,l){p.__proto__=l}||function(p,l){for(var o in l)l.hasOwnProperty(o)&&(p[o]=l[o])};return function(p,l){_(p,l);function o(){this.constructor=p}p.prototype=l===null?Object.create(l):(o.prototype=l.prototype,new o)}}();Object.defineProperty(r,"__esModule",{value:!0});var y=i(12);function O(_,p){var l=_.getAttribute("class")||"";return l.split(/\s+/).filter(function(o){return o.indexOf(p+"-")===0})}var g=function(_){c(p,_);function p(){return _!==null&&_.apply(this,arguments)||this}return p.keys=function(l){return(l.getAttribute("class")||"").split(/\s+/).map(function(o){return o.split("-").slice(0,-1).join("-")})},p.prototype.add=function(l,o){return this.canAdd(l,o)?(this.remove(l),l.classList.add(this.keyName+"-"+o),!0):!1},p.prototype.remove=function(l){var o=O(l,this.keyName);o.forEach(function(a){l.classList.remove(a)}),l.classList.length===0&&l.removeAttribute("class")},p.prototype.value=function(l){var o=O(l,this.keyName)[0]||"",a=o.slice(this.keyName.length+1);return this.canAdd(l,a)?a:""},p}(y.default);r.default=g},function(t,r,i){var c=this&&this.__extends||function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,l){p.__proto__=l}||function(p,l){for(var o in l)l.hasOwnProperty(o)&&(p[o]=l[o])};return function(p,l){_(p,l);function o(){this.constructor=p}p.prototype=l===null?Object.create(l):(o.prototype=l.prototype,new o)}}();Object.defineProperty(r,"__esModule",{value:!0});var y=i(12);function O(_){var p=_.split("-"),l=p.slice(1).map(function(o){return o[0].toUpperCase()+o.slice(1)}).join("");return p[0]+l}var g=function(_){c(p,_);function p(){return _!==null&&_.apply(this,arguments)||this}return p.keys=function(l){return(l.getAttribute("style")||"").split(";").map(function(o){var a=o.split(":");return a[0].trim()})},p.prototype.add=function(l,o){return this.canAdd(l,o)?(l.style[O(this.keyName)]=o,!0):!1},p.prototype.remove=function(l){l.style[O(this.keyName)]="",l.getAttribute("style")||l.removeAttribute("style")},p.prototype.value=function(l){var o=l.style[O(this.keyName)];return this.canAdd(l,o)?o:""},p}(y.default);r.default=g},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function g(_,p){for(var l=0;lN&&this.stack.undo.length>0){var x=this.stack.undo.pop();k=k.compose(x.undo),S=x.redo.compose(S)}else this.lastRecorded=N;this.stack.undo.push({redo:S,undo:k}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(S){this.stack.undo.forEach(function(A){A.undo=S.transform(A.undo,!0),A.redo=S.transform(A.redo,!0)}),this.stack.redo.forEach(function(A){A.undo=S.transform(A.undo,!0),A.redo=S.transform(A.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),s}(l.default);d.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function f(m){var s=m.ops[m.ops.length-1];return s==null?!1:s.insert!=null?typeof s.insert=="string"&&s.insert.endsWith(` `):s.attributes!=null?Object.keys(s.attributes).some(function(b){return O.default.query(b,O.default.Scope.BLOCK)!=null}):!1}function u(m){var s=m.reduce(function(S,A){return S+=A.delete||0,S},0),b=m.length()-s;return f(m)&&(b-=1),b}r.default=d,r.getLastChangeIndex=u},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var c=function(){function L($,z){for(var H=0;H0&&arguments[0]!==void 0?arguments[0]:"link",F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),F!=null?this.textbox.value=F:H!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+H)||""),this.root.setAttribute("data-mode",H)}},{key:"restoreFocus",value:function(){var H=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=H}},{key:"save",value:function(){var H=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var F=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",H,o.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",H,o.default.sources.USER)),this.quill.root.scrollTop=F;break}case"video":H=D(H);case"formula":{if(!H)break;var I=this.quill.getSelection(!0);if(I!=null){var G=I.index+I.length;this.quill.insertEmbed(G,this.root.getAttribute("data-mode"),H,o.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(G+1," ",o.default.sources.USER),this.quill.setSelection(G+2,o.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),$}(k.default);function D(L){var $=L.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||L.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return $?($[1]||"https")+"://www.youtube.com/embed/"+$[2]+"?showinfo=0":($=L.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?($[1]||"https")+"://player.vimeo.com/video/"+$[2]+"/":L}function q(L,$){var z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;$.forEach(function(H){var F=document.createElement("option");H===z?F.setAttribute("selected","selected"):F.setAttribute("value",H),L.appendChild(F)})}r.BaseTooltip=j,r.default=ee},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function y(){this.head=this.tail=null,this.length=0}return y.prototype.append=function(){for(var O=[],g=0;g1&&this.append.apply(this,O.slice(1))},y.prototype.contains=function(O){for(var g,_=this.iterator();g=_();)if(g===O)return!0;return!1},y.prototype.insertBefore=function(O,g){!O||(O.next=g,g!=null?(O.prev=g.prev,g.prev!=null&&(g.prev.next=O),g.prev=O,g===this.head&&(this.head=O)):this.tail!=null?(this.tail.next=O,O.prev=this.tail,this.tail=O):(O.prev=null,this.head=this.tail=O),this.length+=1)},y.prototype.offset=function(O){for(var g=0,_=this.head;_!=null;){if(_===O)return g;g+=_.length(),_=_.next}return-1},y.prototype.remove=function(O){!this.contains(O)||(O.prev!=null&&(O.prev.next=O.next),O.next!=null&&(O.next.prev=O.prev),O===this.head&&(this.head=O.next),O===this.tail&&(this.tail=O.prev),this.length-=1)},y.prototype.iterator=function(O){return O===void 0&&(O=this.head),function(){var g=O;return O!=null&&(O=O.next),g}},y.prototype.find=function(O,g){g===void 0&&(g=!1);for(var _,p=this.iterator();_=p();){var l=_.length();if(Ov?_(a,O-v,Math.min(g,v+d-O)):_(a,0,Math.min(d,O+g-v)),v+=d}},y.prototype.map=function(O){return this.reduce(function(g,_){return g.push(O(_)),g},[])},y.prototype.reduce=function(O,g){for(var _,p=this.iterator();_=p();)g=O(g,_);return g},y}();r.default=c},function(t,r,i){var c=this&&this.__extends||function(){var l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var v in a)a.hasOwnProperty(v)&&(o[v]=a[v])};return function(o,a){l(o,a);function v(){this.constructor=o}o.prototype=a===null?Object.create(a):(v.prototype=a.prototype,new v)}}();Object.defineProperty(r,"__esModule",{value:!0});var y=i(17),O=i(1),g={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},_=100,p=function(l){c(o,l);function o(a){var v=l.call(this,a)||this;return v.scroll=v,v.observer=new MutationObserver(function(h){v.update(h)}),v.observer.observe(v.domNode,g),v.attach(),v}return o.prototype.detach=function(){l.prototype.detach.call(this),this.observer.disconnect()},o.prototype.deleteAt=function(a,v){this.update(),a===0&&v===this.length()?this.children.forEach(function(h){h.remove()}):l.prototype.deleteAt.call(this,a,v)},o.prototype.formatAt=function(a,v,h,d){this.update(),l.prototype.formatAt.call(this,a,v,h,d)},o.prototype.insertAt=function(a,v,h){this.update(),l.prototype.insertAt.call(this,a,v,h)},o.prototype.optimize=function(a,v){var h=this;a===void 0&&(a=[]),v===void 0&&(v={}),l.prototype.optimize.call(this,v);for(var d=[].slice.call(this.observer.takeRecords());d.length>0;)a.push(d.pop());for(var f=function(b,S){S===void 0&&(S=!0),!(b==null||b===h)&&b.domNode.parentNode!=null&&(b.domNode[O.DATA_KEY].mutations==null&&(b.domNode[O.DATA_KEY].mutations=[]),S&&f(b.parent))},u=function(b){b.domNode[O.DATA_KEY]==null||b.domNode[O.DATA_KEY].mutations==null||(b instanceof y.default&&b.children.forEach(u),b.optimize(v))},m=a,s=0;m.length>0;s+=1){if(s>=_)throw new Error("[Parchment] Maximum optimize iterations reached");for(m.forEach(function(b){var S=O.find(b.target,!0);S!=null&&(S.domNode===b.target&&(b.type==="childList"?(f(O.find(b.previousSibling,!1)),[].forEach.call(b.addedNodes,function(A){var k=O.find(A,!1);f(k,!1),k instanceof y.default&&k.children.forEach(function(N){f(N,!1)})})):b.type==="attributes"&&f(S.prev)),f(S))}),this.children.forEach(u),m=[].slice.call(this.observer.takeRecords()),d=m.slice();d.length>0;)a.push(d.pop())}},o.prototype.update=function(a,v){var h=this;v===void 0&&(v={}),a=a||this.observer.takeRecords(),a.map(function(d){var f=O.find(d.target,!0);return f==null?null:f.domNode[O.DATA_KEY].mutations==null?(f.domNode[O.DATA_KEY].mutations=[d],f):(f.domNode[O.DATA_KEY].mutations.push(d),null)}).forEach(function(d){d==null||d===h||d.domNode[O.DATA_KEY]==null||d.update(d.domNode[O.DATA_KEY].mutations||[],v)}),this.domNode[O.DATA_KEY].mutations!=null&&l.prototype.update.call(this,this.domNode[O.DATA_KEY].mutations,v),this.optimize(a,v)},o.blotName="scroll",o.defaultChild="block",o.scope=O.Scope.BLOCK_BLOT,o.tagName="DIV",o}(y.default);r.default=p},function(t,r,i){var c=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,o){l.__proto__=o}||function(l,o){for(var a in o)o.hasOwnProperty(a)&&(l[a]=o[a])};return function(l,o){p(l,o);function a(){this.constructor=l}l.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}}();Object.defineProperty(r,"__esModule",{value:!0});var y=i(18),O=i(1);function g(p,l){if(Object.keys(p).length!==Object.keys(l).length)return!1;for(var o in p)if(p[o]!==l[o])return!1;return!0}var _=function(p){c(l,p);function l(){return p!==null&&p.apply(this,arguments)||this}return l.formats=function(o){if(o.tagName!==l.tagName)return p.formats.call(this,o)},l.prototype.format=function(o,a){var v=this;o===this.statics.blotName&&!a?(this.children.forEach(function(h){h instanceof y.default||(h=h.wrap(l.blotName,!0)),v.attributes.copy(h)}),this.unwrap()):p.prototype.format.call(this,o,a)},l.prototype.formatAt=function(o,a,v,h){if(this.formats()[v]!=null||O.query(v,O.Scope.ATTRIBUTE)){var d=this.isolate(o,a);d.format(v,h)}else p.prototype.formatAt.call(this,o,a,v,h)},l.prototype.optimize=function(o){p.prototype.optimize.call(this,o);var a=this.formats();if(Object.keys(a).length===0)return this.unwrap();var v=this.next;v instanceof l&&v.prev===this&&g(a,v.formats())&&(v.moveChildren(this),v.remove())},l.blotName="inline",l.scope=O.Scope.INLINE_BLOT,l.tagName="SPAN",l}(y.default);r.default=_},function(t,r,i){var c=this&&this.__extends||function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,l){p.__proto__=l}||function(p,l){for(var o in l)l.hasOwnProperty(o)&&(p[o]=l[o])};return function(p,l){_(p,l);function o(){this.constructor=p}p.prototype=l===null?Object.create(l):(o.prototype=l.prototype,new o)}}();Object.defineProperty(r,"__esModule",{value:!0});var y=i(18),O=i(1),g=function(_){c(p,_);function p(){return _!==null&&_.apply(this,arguments)||this}return p.formats=function(l){var o=O.query(p.blotName).tagName;if(l.tagName!==o)return _.formats.call(this,l)},p.prototype.format=function(l,o){O.query(l,O.Scope.BLOCK)!=null&&(l===this.statics.blotName&&!o?this.replaceWith(p.blotName):_.prototype.format.call(this,l,o))},p.prototype.formatAt=function(l,o,a,v){O.query(a,O.Scope.BLOCK)!=null?this.format(a,v):_.prototype.formatAt.call(this,l,o,a,v)},p.prototype.insertAt=function(l,o,a){if(a==null||O.query(o,O.Scope.INLINE)!=null)_.prototype.insertAt.call(this,l,o,a);else{var v=this.split(l),h=O.create(o,a);v.parent.insertBefore(h,v)}},p.prototype.update=function(l,o){navigator.userAgent.match(/Trident/)?this.build():_.prototype.update.call(this,l,o)},p.blotName="block",p.scope=O.Scope.BLOCK_BLOT,p.tagName="P",p}(y.default);r.default=g},function(t,r,i){var c=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,p){_.__proto__=p}||function(_,p){for(var l in p)p.hasOwnProperty(l)&&(_[l]=p[l])};return function(_,p){g(_,p);function l(){this.constructor=_}_.prototype=p===null?Object.create(p):(l.prototype=p.prototype,new l)}}();Object.defineProperty(r,"__esModule",{value:!0});var y=i(19),O=function(g){c(_,g);function _(){return g!==null&&g.apply(this,arguments)||this}return _.formats=function(p){},_.prototype.format=function(p,l){g.prototype.formatAt.call(this,0,this.length(),p,l)},_.prototype.formatAt=function(p,l,o,a){p===0&&l===this.length()?this.format(o,a):g.prototype.formatAt.call(this,p,l,o,a)},_.prototype.formats=function(){return this.statics.formats(this.domNode)},_}(y.default);r.default=O},function(t,r,i){var c=this&&this.__extends||function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,l){p.__proto__=l}||function(p,l){for(var o in l)l.hasOwnProperty(o)&&(p[o]=l[o])};return function(p,l){_(p,l);function o(){this.constructor=p}p.prototype=l===null?Object.create(l):(o.prototype=l.prototype,new o)}}();Object.defineProperty(r,"__esModule",{value:!0});var y=i(19),O=i(1),g=function(_){c(p,_);function p(l){var o=_.call(this,l)||this;return o.text=o.statics.value(o.domNode),o}return p.create=function(l){return document.createTextNode(l)},p.value=function(l){var o=l.data;return o.normalize&&(o=o.normalize()),o},p.prototype.deleteAt=function(l,o){this.domNode.data=this.text=this.text.slice(0,l)+this.text.slice(l+o)},p.prototype.index=function(l,o){return this.domNode===l?o:-1},p.prototype.insertAt=function(l,o,a){a==null?(this.text=this.text.slice(0,l)+o+this.text.slice(l),this.domNode.data=this.text):_.prototype.insertAt.call(this,l,o,a)},p.prototype.length=function(){return this.text.length},p.prototype.optimize=function(l){_.prototype.optimize.call(this,l),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof p&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},p.prototype.position=function(l,o){return[this.domNode,l]},p.prototype.split=function(l,o){if(o===void 0&&(o=!1),!o){if(l===0)return this;if(l===this.length())return this.next}var a=O.create(this.domNode.splitText(l));return this.parent.insertBefore(a,this.next),this.text=this.statics.value(this.domNode),a},p.prototype.update=function(l,o){var a=this;l.some(function(v){return v.type==="characterData"&&v.target===a.domNode})&&(this.text=this.statics.value(this.domNode))},p.prototype.value=function(){return this.text},p.blotName="text",p.scope=O.Scope.INLINE_BLOT,p}(y.default);r.default=g},function(t,r,i){var c=document.createElement("div");if(c.classList.toggle("test-class",!1),c.classList.contains("test-class")){var y=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(O,g){return arguments.length>1&&!this.contains(O)==!g?g:y.call(this,O)}}String.prototype.startsWith||(String.prototype.startsWith=function(O,g){return g=g||0,this.substr(g,O.length)===O}),String.prototype.endsWith||(String.prototype.endsWith=function(O,g){var _=this.toString();(typeof g!="number"||!isFinite(g)||Math.floor(g)!==g||g>_.length)&&(g=_.length),g-=O.length;var p=_.indexOf(O,g);return p!==-1&&p===g}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(g){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof g!="function")throw new TypeError("predicate must be a function");for(var _=Object(this),p=_.length>>>0,l=arguments[1],o,a=0;ab.length?s:b,k=s.length>b.length?b:s,N=A.indexOf(k);if(N!=-1)return S=[[c,A.substring(0,N)],[y,k],[c,A.substring(N+k.length)]],s.length>b.length&&(S[0][0]=S[2][0]=i),S;if(k.length==1)return[[i,s],[c,b]];var x=a(s,b);if(x){var E=x[0],w=x[1],T=x[2],P=x[3],R=x[4],U=O(E,T),V=O(w,P);return U.concat([[y,R]],V)}return _(s,b)}function _(s,b){for(var S=s.length,A=b.length,k=Math.ceil((S+A)/2),N=k,x=2*k,E=new Array(x),w=new Array(x),T=0;TS)V+=2;else if(z>A)U+=2;else if(R){var H=N+P-q;if(H>=0&&H=F)return p(s,b,$,z)}}}for(var I=-D+ee;I<=D-j;I+=2){var H=N+I,F;I==-D||I!=D&&w[H-1]S)j+=2;else if(G>A)ee+=2;else if(!R){var L=N+P-I;if(L>=0&&L=F)return p(s,b,$,z)}}}}return[[i,s],[c,b]]}function p(s,b,S,A){var k=s.substring(0,S),N=b.substring(0,A),x=s.substring(S),E=b.substring(A),w=O(k,N),T=O(x,E);return w.concat(T)}function l(s,b){if(!s||!b||s.charAt(0)!=b.charAt(0))return 0;for(var S=0,A=Math.min(s.length,b.length),k=A,N=0;Sb.length?s:b,A=s.length>b.length?b:s;if(S.length<4||A.length*2=V.length?[$,z,H,F,L]:null}var N=k(S,A,Math.ceil(S.length/4)),x=k(S,A,Math.ceil(S.length/2)),E;if(!N&&!x)return null;x?N?E=N[4].length>x[4].length?N:x:E=x:E=N;var w,T,P,R;s.length>b.length?(w=E[0],T=E[1],P=E[2],R=E[3]):(P=E[0],R=E[1],w=E[2],T=E[3]);var U=E[4];return[w,T,P,R,U]}function v(s){s.push([y,""]);for(var b=0,S=0,A=0,k="",N="",x;b1?(S!==0&&A!==0&&(x=l(N,k),x!==0&&(b-S-A>0&&s[b-S-A-1][0]==y?s[b-S-A-1][1]+=N.substring(0,x):(s.splice(0,0,[y,N.substring(0,x)]),b++),N=N.substring(x),k=k.substring(x)),x=o(N,k),x!==0&&(s[b][1]=N.substring(N.length-x)+s[b][1],N=N.substring(0,N.length-x),k=k.substring(0,k.length-x))),S===0?s.splice(b-A,S+A,[c,N]):A===0?s.splice(b-S,S+A,[i,k]):s.splice(b-S-A,S+A,[i,k],[c,N]),b=b-S-A+(S?1:0)+(A?1:0)+1):b!==0&&s[b-1][0]==y?(s[b-1][1]+=s[b][1],s.splice(b,1)):b++,A=0,S=0,k="",N="";break}s[s.length-1][1]===""&&s.pop();var E=!1;for(b=1;b0&&A.splice(k+2,0,[x[0],E]),m(A,k,3)}else return s}function u(s){for(var b=!1,S=function(x){return x.charCodeAt(0)>=56320&&x.charCodeAt(0)<=57343},A=function(x){return x.charCodeAt(x.length-1)>=55296&&x.charCodeAt(x.length-1)<=56319},k=2;k0&&N.push(s[k]);return N}function m(s,b,S){for(var A=b+S-1;A>=0&&A>=b-1;A--)if(A+1\r?\n +\<"),this.convert();var Q=this.quill.getFormat(this.quill.selection.savedRange.index);if(Q[A.default.blotName]){var ne=this.container.innerText;return this.container.innerHTML="",new l.default().insert(ne,T({},A.default.blotName,Q[A.default.blotName]))}var oe=this.prepareMatching(),le=y(oe,2),me=le[0],Oe=le[1],fe=I(this.container,me,Oe);return H(fe,` `)&&fe.ops[fe.ops.length-1].attributes==null&&(fe=fe.compose(new l.default().retain(fe.length()-1).delete(1))),V.log("convert",this.container.innerHTML,fe),this.container.innerHTML="",fe}},{key:"dangerouslyPasteHTML",value:function(X,Q){var ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.default.sources.API;if(typeof X=="string")this.quill.setContents(this.convert(X),Q),this.quill.setSelection(0,h.default.sources.SILENT);else{var oe=this.convert(Q);this.quill.updateContents(new l.default().retain(X).concat(oe),ne),this.quill.setSelection(X+oe.length(),h.default.sources.SILENT)}}},{key:"onPaste",value:function(X){var Q=this;if(!(X.defaultPrevented||!this.quill.isEnabled())){var ne=this.quill.getSelection(),oe=new l.default().retain(ne.index),le=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(h.default.sources.SILENT),setTimeout(function(){oe=oe.concat(Q.convert()).delete(ne.length),Q.quill.updateContents(oe,h.default.sources.USER),Q.quill.setSelection(oe.length()-ne.length,h.default.sources.SILENT),Q.quill.scrollingContainer.scrollTop=le,Q.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var X=this,Q=[],ne=[];return this.matchers.forEach(function(oe){var le=y(oe,2),me=le[0],Oe=le[1];switch(me){case Node.TEXT_NODE:ne.push(Oe);break;case Node.ELEMENT_NODE:Q.push(Oe);break;default:[].forEach.call(X.container.querySelectorAll(me),function(fe){fe[ee]=fe[ee]||[],fe[ee].push(Oe)});break}}),[Q,ne]}}]),M}(m.default);L.DEFAULTS={matchers:[],matchVisual:!0};function $(B,M,K){return(typeof M>"u"?"undefined":c(M))==="object"?Object.keys(M).reduce(function(X,Q){return $(X,Q,M[Q])},B):B.reduce(function(X,Q){return Q.attributes&&Q.attributes[M]?X.push(Q):X.insert(Q.insert,(0,_.default)({},T({},M,K),Q.attributes))},new l.default)}function z(B){if(B.nodeType!==Node.ELEMENT_NODE)return{};var M="__ql-computed-style";return B[M]||(B[M]=window.getComputedStyle(B))}function H(B,M){for(var K="",X=B.ops.length-1;X>=0&&K.length-1}function I(B,M,K){return B.nodeType===B.TEXT_NODE?K.reduce(function(X,Q){return Q(B,X)},new l.default):B.nodeType===B.ELEMENT_NODE?[].reduce.call(B.childNodes||[],function(X,Q){var ne=I(Q,M,K);return Q.nodeType===B.ELEMENT_NODE&&(ne=M.reduce(function(oe,le){return le(Q,oe)},ne),ne=(Q[ee]||[]).reduce(function(oe,le){return le(Q,oe)},ne)),X.concat(ne)},new l.default):new l.default}function G(B,M,K){return $(K,B,!0)}function W(B,M){var K=a.default.Attributor.Attribute.keys(B),X=a.default.Attributor.Class.keys(B),Q=a.default.Attributor.Style.keys(B),ne={};return K.concat(X).concat(Q).forEach(function(oe){var le=a.default.query(oe,a.default.Scope.ATTRIBUTE);le!=null&&(ne[le.attrName]=le.value(B),ne[le.attrName])||(le=D[oe],le!=null&&(le.attrName===oe||le.keyName===oe)&&(ne[le.attrName]=le.value(B)||void 0),le=q[oe],le!=null&&(le.attrName===oe||le.keyName===oe)&&(le=q[oe],ne[le.attrName]=le.value(B)||void 0))}),Object.keys(ne).length>0&&(M=$(M,ne)),M}function J(B,M){var K=a.default.query(B);if(K==null)return M;if(K.prototype instanceof a.default.Embed){var X={},Q=K.value(B);Q!=null&&(X[K.blotName]=Q,M=new l.default().insert(X,K.formats(B)))}else typeof K.formats=="function"&&(M=$(M,K.blotName,K.formats(B)));return M}function re(B,M){return H(M,` `)||M.insert(` `),M}function ie(){return new l.default}function ae(B,M){var K=a.default.query(B);if(K==null||K.blotName!=="list-item"||!H(M,` `))return M;for(var X=-1,Q=B.parentNode;!Q.classList.contains("ql-clipboard");)(a.default.query(Q)||{}).blotName==="list"&&(X+=1),Q=Q.parentNode;return X<=0?M:M.compose(new l.default().retain(M.length()-1).retain(1,{indent:X}))}function se(B,M){return H(M,` `)||(F(B)||M.length()>0&&B.nextSibling&&F(B.nextSibling))&&M.insert(` `),M}function C(B,M){if(F(B)&&B.nextElementSibling!=null&&!H(M,` `)){var K=B.offsetHeight+parseFloat(z(B).marginTop)+parseFloat(z(B).marginBottom);B.nextElementSibling.offsetTop>B.offsetTop+K*1.5&&M.insert(` `)}return M}function Z(B,M){var K={},X=B.style||{};return X.fontStyle&&z(B).fontStyle==="italic"&&(K.italic=!0),X.fontWeight&&(z(B).fontWeight.startsWith("bold")||parseInt(z(B).fontWeight)>=700)&&(K.bold=!0),Object.keys(K).length>0&&(M=$(M,K)),parseFloat(X.textIndent||0)>0&&(M=new l.default().insert(" ").concat(M)),M}function Y(B,M){var K=B.data;if(B.parentNode.tagName==="O:P")return M.insert(K.trim());if(K.trim().length===0&&B.parentNode.classList.contains("ql-clipboard"))return M;if(!z(B.parentNode).whiteSpace.startsWith("pre")){var X=function(ne,oe){return oe=oe.replace(/[^\u00a0]/g,""),oe.length<1&&ne?" ":oe};K=K.replace(/\r\n/g," ").replace(/\n/g," "),K=K.replace(/\s\s+/g,X.bind(X,!0)),(B.previousSibling==null&&F(B.parentNode)||B.previousSibling!=null&&F(B.previousSibling))&&(K=K.replace(/^\s+/,X.bind(X,!1))),(B.nextSibling==null&&F(B.parentNode)||B.nextSibling!=null&&F(B.nextSibling))&&(K=K.replace(/\s+$/,X.bind(X,!1)))}return M.insert(K)}r.default=L,r.matchAttributor=W,r.matchBlot=J,r.matchNewline=se,r.matchSpacing=C,r.matchText=Y},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function v(h,d){for(var f=0;f '},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function v(h,d){for(var f=0;fa.right&&(h=a.right-v.right,this.root.style.left=l+h+"px"),v.lefta.bottom){var d=v.bottom-v.top,f=p.bottom-p.top+d;this.root.style.top=o-f+"px",this.root.classList.add("ql-flip")}return h}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),g}();r.default=O},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function x(E,w){var T=[],P=!0,R=!1,U=void 0;try{for(var V=E[Symbol.iterator](),ee;!(P=(ee=V.next()).done)&&(T.push(ee.value),!(w&&T.length===w));P=!0);}catch(j){R=!0,U=j}finally{try{!P&&V.return&&V.return()}finally{if(R)throw U}}return T}return function(E,w){if(Array.isArray(E))return E;if(Symbol.iterator in Object(E))return x(E,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),y=function x(E,w,T){E===null&&(E=Function.prototype);var P=Object.getOwnPropertyDescriptor(E,w);if(P===void 0){var R=Object.getPrototypeOf(E);return R===null?void 0:x(R,w,T)}else{if("value"in P)return P.value;var U=P.get;return U===void 0?void 0:U.call(T)}},O=function(){function x(E,w){for(var T=0;T','','',''].join(""),r.default=k},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=i(29),y=Q(c),O=i(36),g=i(38),_=i(64),p=i(65),l=Q(p),o=i(66),a=Q(o),v=i(67),h=Q(v),d=i(37),f=i(26),u=i(39),m=i(40),s=i(56),b=Q(s),S=i(68),A=Q(S),k=i(27),N=Q(k),x=i(69),E=Q(x),w=i(70),T=Q(w),P=i(71),R=Q(P),U=i(72),V=Q(U),ee=i(73),j=Q(ee),D=i(13),q=Q(D),L=i(74),$=Q(L),z=i(75),H=Q(z),F=i(57),I=Q(F),G=i(41),W=Q(G),J=i(28),re=Q(J),ie=i(59),ae=Q(ie),se=i(60),C=Q(se),Z=i(61),Y=Q(Z),B=i(108),M=Q(B),K=i(62),X=Q(K);function Q(ne){return ne&&ne.__esModule?ne:{default:ne}}y.default.register({"attributors/attribute/direction":g.DirectionAttribute,"attributors/class/align":O.AlignClass,"attributors/class/background":d.BackgroundClass,"attributors/class/color":f.ColorClass,"attributors/class/direction":g.DirectionClass,"attributors/class/font":u.FontClass,"attributors/class/size":m.SizeClass,"attributors/style/align":O.AlignStyle,"attributors/style/background":d.BackgroundStyle,"attributors/style/color":f.ColorStyle,"attributors/style/direction":g.DirectionStyle,"attributors/style/font":u.FontStyle,"attributors/style/size":m.SizeStyle},!0),y.default.register({"formats/align":O.AlignClass,"formats/direction":g.DirectionClass,"formats/indent":_.IndentClass,"formats/background":d.BackgroundStyle,"formats/color":f.ColorStyle,"formats/font":u.FontClass,"formats/size":m.SizeClass,"formats/blockquote":l.default,"formats/code-block":q.default,"formats/header":a.default,"formats/list":h.default,"formats/bold":b.default,"formats/code":D.Code,"formats/italic":A.default,"formats/link":N.default,"formats/script":E.default,"formats/strike":T.default,"formats/underline":R.default,"formats/image":V.default,"formats/video":j.default,"formats/list/item":v.ListItem,"modules/formula":$.default,"modules/syntax":H.default,"modules/toolbar":I.default,"themes/bubble":M.default,"themes/snow":X.default,"ui/icons":W.default,"ui/picker":re.default,"ui/icon-picker":C.default,"ui/color-picker":ae.default,"ui/tooltip":Y.default},!0),r.default=y.default},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var c=function(){function h(d,f){for(var u=0;u0&&this.children.tail.format(A,k)}},{key:"formats",value:function(){return v({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(A,k){if(A instanceof u)y(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertBefore",this).call(this,A,k);else{var N=k==null?this.length():k.offset(this),x=this.split(N);x.parent.insertBefore(A,x)}}},{key:"optimize",value:function(A){y(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,A);var k=this.next;k!=null&&k.prev===this&&k.statics.blotName===this.statics.blotName&&k.domNode.tagName===this.domNode.tagName&&k.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(k.moveChildren(this),k.remove())}},{key:"replace",value:function(A){if(A.statics.blotName!==this.statics.blotName){var k=g.default.create(this.statics.defaultChild);A.moveChildren(k),this.appendChild(k)}y(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"replace",this).call(this,A)}}]),b}(o.default);m.blotName="list",m.scope=g.default.Scope.BLOCK_BLOT,m.tagName=["OL","UL"],m.defaultChild="list-item",m.allowedChildren=[u],r.ListItem=u,r.default=m},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=i(56),y=O(c);function O(o){return o&&o.__esModule?o:{default:o}}function g(o,a){if(!(o instanceof a))throw new TypeError("Cannot call a class as a function")}function _(o,a){if(!o)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&(typeof a=="object"||typeof a=="function")?a:o}function p(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof a);o.prototype=Object.create(a&&a.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),a&&(Object.setPrototypeOf?Object.setPrototypeOf(o,a):o.__proto__=a)}var l=function(o){p(a,o);function a(){return g(this,a),_(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return a}(y.default);l.blotName="italic",l.tagName=["EM","I"],r.default=l},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function v(h,d){for(var f=0;f-1?s?this.domNode.setAttribute(m,s):this.domNode.removeAttribute(m):y(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"format",this).call(this,m,s)}}],[{key:"create",value:function(m){var s=y(f.__proto__||Object.getPrototypeOf(f),"create",this).call(this,m);return typeof m=="string"&&s.setAttribute("src",this.sanitize(m)),s}},{key:"formats",value:function(m){return v.reduce(function(s,b){return m.hasAttribute(b)&&(s[b]=m.getAttribute(b)),s},{})}},{key:"match",value:function(m){return/\.(jpe?g|gif|png)$/.test(m)||/^data:image\/.+;base64/.test(m)}},{key:"sanitize",value:function(m){return(0,_.sanitize)(m,["http","https","data"])?m:"//:0"}},{key:"value",value:function(m){return m.getAttribute("src")}}]),f}(g.default.Embed);h.blotName="image",h.tagName="IMG",r.default=h},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0});var c=function(){function d(f,u){for(var m=0;m-1?s?this.domNode.setAttribute(m,s):this.domNode.removeAttribute(m):y(f.prototype.__proto__||Object.getPrototypeOf(f.prototype),"format",this).call(this,m,s)}}],[{key:"create",value:function(m){var s=y(f.__proto__||Object.getPrototypeOf(f),"create",this).call(this,m);return s.setAttribute("frameborder","0"),s.setAttribute("allowfullscreen",!0),s.setAttribute("src",this.sanitize(m)),s}},{key:"formats",value:function(m){return v.reduce(function(s,b){return m.hasAttribute(b)&&(s[b]=m.getAttribute(b)),s},{})}},{key:"sanitize",value:function(m){return _.default.sanitize(m)}},{key:"value",value:function(m){return m.getAttribute("src")}}]),f}(O.BlockEmbed);h.blotName="video",h.className="ql-video",h.tagName="IFRAME",r.default=h},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var c=function(){function m(s,b){for(var S=0;S0||this.cachedText==null)&&(this.domNode.innerHTML=N(x),this.domNode.normalize(),this.attach()),this.cachedText=x)}}]),A}(v.default);m.className="ql-syntax";var s=new g.default.Attributor.Class("token","hljs",{scope:g.default.Scope.INLINE}),b=function(S){u(A,S),c(A,null,[{key:"register",value:function(){p.default.register(s,!0),p.default.register(m,!0)}}]);function A(k,N){d(this,A);var x=f(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,k,N));if(typeof x.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var E=null;return x.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(E),E=setTimeout(function(){x.highlight(),E=null},x.options.interval)}),x.highlight(),x}return c(A,[{key:"highlight",value:function(){var N=this;if(!this.quill.selection.composing){this.quill.update(p.default.sources.USER);var x=this.quill.getSelection();this.quill.scroll.descendants(m).forEach(function(E){E.highlight(N.options.highlight)}),this.quill.update(p.default.sources.SILENT),x!=null&&this.quill.setSelection(x,p.default.sources.SILENT)}}}]),A}(o.default);b.DEFAULTS={highlight:function(){return window.hljs==null?null:function(S){var A=window.hljs.highlightAuto(S);return A.value}}(),interval:1e3},r.CodeBlock=m,r.CodeToken=s,r.default=b},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r){t.exports=' '},function(t,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var c=function A(k,N,x){k===null&&(k=Function.prototype);var E=Object.getOwnPropertyDescriptor(k,N);if(E===void 0){var w=Object.getPrototypeOf(k);return w===null?void 0:A(w,N,x)}else{if("value"in E)return E.value;var T=E.get;return T===void 0?void 0:T.call(x)}},y=function(){function A(k,N){for(var x=0;x0&&R===p.default.sources.USER){E.show(),E.root.style.left="0px",E.root.style.width="",E.root.style.width=E.root.offsetWidth+"px";var U=E.quill.getLines(T.index,T.length);if(U.length===1)E.position(E.quill.getBounds(T));else{var V=U[U.length-1],ee=E.quill.getIndex(V),j=Math.min(V.length()-1,T.index+T.length-ee),D=E.quill.getBounds(new a.Range(ee,j));E.position(D)}}else document.activeElement!==E.textbox&&E.quill.hasFocus()&&E.hide()}),E}return y(k,[{key:"listen",value:function(){var x=this;c(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){x.root.classList.remove("ql-editing")}),this.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!x.root.classList.contains("ql-hidden")){var E=x.quill.getSelection();E!=null&&x.position(x.quill.getBounds(E))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(x){var E=c(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"position",this).call(this,x),w=this.root.querySelector(".ql-tooltip-arrow");if(w.style.marginLeft="",E===0)return E;w.style.marginLeft=-1*E-w.offsetWidth/2+"px"}}]),k}(l.BaseTooltip);S.TEMPLATE=['','
','','',"
"].join(""),r.BubbleTooltip=S,r.default=b},function(t,r,i){t.exports=i(63)}]).default})})(Vi);var tg=Ee&&Ee.__extends||function(){var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var c in i)i.hasOwnProperty(c)&&(r[c]=i[c])},e(n,t)};return function(n,t){e(n,t);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),kt=Ee&&Ee.__assign||function(){return kt=Object.assign||function(e){for(var n,t=1,r=arguments.length;t1)throw new Error("The Quill editing area can only be composed of a single React element.");if(qe.default.Children.count(t.children)){var i=qe.default.Children.only(t.children);if(((r=i)===null||r===void 0?void 0:r.type)==="textarea")throw new Error("Quill does not support editing on a