@jsonpages/core 1.0.17 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -0
- package/dist/jsonpages-core.js +7660 -4179
- package/dist/jsonpages-core.umd.cjs +85 -40
- package/package.json +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(ve,Q){typeof exports=="object"&&typeof module<"u"?Q(exports,require("react"),require("react-router-dom"),require("zod"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-router-dom","zod","react-dom"],Q):(ve=typeof globalThis<"u"?globalThis:ve||self,Q(ve.JsonPagesCore={},ve.React,ve.ReactRouterDOM,ve.z,ve.ReactDOM))})(this,(function(ve,Q,Ie,Ne,gr){"use strict";function un(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const P=un(Q),It=un(gr),ke={UPDATE_DRAFTS:"jsonpages:update-drafts",SYNC_SELECTION:"jsonpages:sync-selection",REQUEST_CLEAN_HTML:"jsonpages:request-clean-html",SEND_CLEAN_HTML:"jsonpages:send-clean-html",SECTION_SELECT:"jsonpages:section-select",REQUEST_SCROLL_TO_SECTION:"jsonpages:request-scroll-to-section",ACTIVE_SECTION_CHANGED:"jsonpages:active-section-changed",STAGE_READY:"jsonpages:stage-ready"};var Ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ji(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Pt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var br={exports:{}};/*!
|
|
2
2
|
|
|
3
3
|
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
4
4
|
<http://stuartk.com/jszip>
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
JSZip uses the library pako released under the MIT license :
|
|
10
10
|
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
11
|
-
*/var
|
|
12
|
-
\0`,G+=i(z,2),G+=O.magic,G+=i(E,2),G+=i(S,2),G+=i(X.crc32,4),G+=i(X.compressedSize,4),G+=i(X.uncompressedSize,4),G+=i(D.length,2),G+=i(M.length,2),{fileRecord:x.LOCAL_FILE_HEADER+G+D+M,dirRecord:x.CENTRAL_FILE_HEADER+i(J,2)+G+i(re.length,2)+"\0\0\0\0"+i(N,4)+i(g,4)+D+M+re}}var n=r("../utils"),l=r("../stream/GenericWorker"),h=r("../utf8"),f=r("../crc32"),x=r("../signature");function v(c,b,d,g){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=b,this.zipPlatform=d,this.encodeFileName=g,this.streamFiles=c,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(v,l),v.prototype.push=function(c){var b=c.meta.percent||0,d=this.entriesCount,g=this._sources.length;this.accumulate?this.contentBuffer.push(c):(this.bytesWritten+=c.data.length,l.prototype.push.call(this,{data:c.data,meta:{currentFile:this.currentFile,percent:d?(b+100*(d-g-1))/d:100}}))},v.prototype.openedSource=function(c){this.currentSourceOffset=this.bytesWritten,this.currentFile=c.file.name;var b=this.streamFiles&&!c.file.dir;if(b){var d=o(c,b,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:d.fileRecord,meta:{percent:0}})}else this.accumulate=!0},v.prototype.closedSource=function(c){this.accumulate=!1;var b=this.streamFiles&&!c.file.dir,d=o(c,b,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(d.dirRecord),b)this.push({data:(function(g){return x.DATA_DESCRIPTOR+i(g.crc32,4)+i(g.compressedSize,4)+i(g.uncompressedSize,4)})(c),meta:{percent:100}});else for(this.push({data:d.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},v.prototype.flush=function(){for(var c=this.bytesWritten,b=0;b<this.dirRecords.length;b++)this.push({data:this.dirRecords[b],meta:{percent:100}});var d=this.bytesWritten-c,g=(function(p,k,E,S,C){var O=n.transformTo("string",C(S));return x.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(p,2)+i(p,2)+i(k,4)+i(E,4)+i(O.length,2)+O})(this.dirRecords.length,d,c,this.zipComment,this.encodeFileName);this.push({data:g,meta:{percent:100}})},v.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},v.prototype.registerPrevious=function(c){this._sources.push(c);var b=this;return c.on("data",function(d){b.processChunk(d)}),c.on("end",function(){b.closedSource(b.previous.streamInfo),b._sources.length?b.prepareNextSource():b.end()}),c.on("error",function(d){b.error(d)}),this},v.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},v.prototype.error=function(c){var b=this._sources;if(!l.prototype.error.call(this,c))return!1;for(var d=0;d<b.length;d++)try{b[d].error(c)}catch{}return!0},v.prototype.lock=function(){l.prototype.lock.call(this);for(var c=this._sources,b=0;b<c.length;b++)c[b].lock()},m.exports=v},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,m,u){var i=r("../compressions"),o=r("./ZipFileWorker");u.generateWorker=function(n,l,h){var f=new o(l.streamFiles,h,l.platform,l.encodeFileName),x=0;try{n.forEach(function(v,c){x++;var b=(function(k,E){var S=k||E,C=i[S];if(!C)throw new Error(S+" is not a valid compression method !");return C})(c.options.compression,l.compression),d=c.options.compressionOptions||l.compressionOptions||{},g=c.dir,p=c.date;c._compressWorker(b,d).withStreamInfo("file",{name:v,dir:g,date:p,comment:c.comment||"",unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions}).pipe(f)}),f.entriesCount=x}catch(v){f.error(v)}return f}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,m,u){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new i;for(var n in this)typeof this[n]!="function"&&(o[n]=this[n]);return o}}(i.prototype=r("./object")).loadAsync=r("./load"),i.support=r("./support"),i.defaults=r("./defaults"),i.version="3.10.1",i.loadAsync=function(o,n){return new i().loadAsync(o,n)},i.external=r("./external"),m.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,m,u){var i=r("./utils"),o=r("./external"),n=r("./utf8"),l=r("./zipEntries"),h=r("./stream/Crc32Probe"),f=r("./nodejsUtils");function x(v){return new o.Promise(function(c,b){var d=v.decompressed.getContentWorker().pipe(new h);d.on("error",function(g){b(g)}).on("end",function(){d.streamInfo.crc32!==v.decompressed.crc32?b(new Error("Corrupted zip : CRC32 mismatch")):c()}).resume()})}m.exports=function(v,c){var b=this;return c=i.extend(c||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),f.isNode&&f.isStream(v)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",v,!0,c.optimizedBinaryString,c.base64).then(function(d){var g=new l(c);return g.load(d),g}).then(function(d){var g=[o.Promise.resolve(d)],p=d.files;if(c.checkCRC32)for(var k=0;k<p.length;k++)g.push(x(p[k]));return o.Promise.all(g)}).then(function(d){for(var g=d.shift(),p=g.files,k=0;k<p.length;k++){var E=p[k],S=E.fileNameStr,C=i.resolve(E.fileNameStr);b.file(C,E.decompressed,{binary:!0,optimizedBinaryString:!0,date:E.date,dir:E.dir,comment:E.fileCommentStr.length?E.fileCommentStr:null,unixPermissions:E.unixPermissions,dosPermissions:E.dosPermissions,createFolders:c.createFolders}),E.dir||(b.file(C).unsafeOriginalName=S)}return g.zipComment.length&&(b.comment=g.zipComment),b})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,m,u){var i=r("../utils"),o=r("../stream/GenericWorker");function n(l,h){o.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(h)}i.inherits(n,o),n.prototype._bindStream=function(l){var h=this;(this._stream=l).pause(),l.on("data",function(f){h.push({data:f,meta:{percent:0}})}).on("error",function(f){h.isPaused?this.generatedError=f:h.error(f)}).on("end",function(){h.isPaused?h._upstreamEnded=!0:h.end()})},n.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},n.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},m.exports=n},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,m,u){var i=r("readable-stream").Readable;function o(n,l,h){i.call(this,l),this._helper=n;var f=this;n.on("data",function(x,v){f.push(x)||f._helper.pause(),h&&h(v)}).on("error",function(x){f.emit("error",x)}).on("end",function(){f.push(null)})}r("../utils").inherits(o,i),o.prototype._read=function(){this._helper.resume()},m.exports=o},{"../utils":32,"readable-stream":16}],14:[function(r,m,u){m.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,o);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,o)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var o=new Buffer(i);return o.fill(0),o},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(r,m,u){function i(C,O,L){var D,T=n.getTypeOf(O),V=n.extend(L||{},f);V.date=V.date||new Date,V.compression!==null&&(V.compression=V.compression.toUpperCase()),typeof V.unixPermissions=="string"&&(V.unixPermissions=parseInt(V.unixPermissions,8)),V.unixPermissions&&16384&V.unixPermissions&&(V.dir=!0),V.dosPermissions&&16&V.dosPermissions&&(V.dir=!0),V.dir&&(C=p(C)),V.createFolders&&(D=g(C))&&k.call(this,D,!0);var re=T==="string"&&V.binary===!1&&V.base64===!1;L&&L.binary!==void 0||(V.binary=!re),(O instanceof x&&O.uncompressedSize===0||V.dir||!O||O.length===0)&&(V.base64=!1,V.binary=!0,O="",V.compression="STORE",T="string");var j=null;j=O instanceof x||O instanceof l?O:b.isNode&&b.isStream(O)?new d(C,O):n.prepareContent(C,O,V.binary,V.optimizedBinaryString,V.base64);var R=new v(C,j,V);this.files[C]=R}var o=r("./utf8"),n=r("./utils"),l=r("./stream/GenericWorker"),h=r("./stream/StreamHelper"),f=r("./defaults"),x=r("./compressedObject"),v=r("./zipObject"),c=r("./generate"),b=r("./nodejsUtils"),d=r("./nodejs/NodejsStreamInputAdapter"),g=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var O=C.lastIndexOf("/");return 0<O?C.substring(0,O):""},p=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},k=function(C,O){return O=O!==void 0?O:f.createFolders,C=p(C),this.files[C]||i.call(this,C,null,{dir:!0,createFolders:O}),this.files[C]};function E(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var S={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var O,L,D;for(O in this.files)D=this.files[O],(L=O.slice(this.root.length,O.length))&&O.slice(0,this.root.length)===this.root&&C(L,D)},filter:function(C){var O=[];return this.forEach(function(L,D){C(L,D)&&O.push(D)}),O},file:function(C,O,L){if(arguments.length!==1)return C=this.root+C,i.call(this,C,O,L),this;if(E(C)){var D=C;return this.filter(function(V,re){return!re.dir&&D.test(V)})}var T=this.files[this.root+C];return T&&!T.dir?T:null},folder:function(C){if(!C)return this;if(E(C))return this.filter(function(T,V){return V.dir&&C.test(T)});var O=this.root+C,L=k.call(this,O),D=this.clone();return D.root=L.name,D},remove:function(C){C=this.root+C;var O=this.files[C];if(O||(C.slice(-1)!=="/"&&(C+="/"),O=this.files[C]),O&&!O.dir)delete this.files[C];else for(var L=this.filter(function(T,V){return V.name.slice(0,C.length)===C}),D=0;D<L.length;D++)delete this.files[L[D].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var O,L={};try{if((L=n.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=L.type.toLowerCase(),L.compression=L.compression.toUpperCase(),L.type==="binarystring"&&(L.type="string"),!L.type)throw new Error("No output type specified.");n.checkSupport(L.type),L.platform!=="darwin"&&L.platform!=="freebsd"&&L.platform!=="linux"&&L.platform!=="sunos"||(L.platform="UNIX"),L.platform==="win32"&&(L.platform="DOS");var D=L.comment||this.comment||"";O=c.generateWorker(this,L,D)}catch(T){(O=new l("error")).error(T)}return new h(O,L.type||"string",L.mimeType)},generateAsync:function(C,O){return this.generateInternalStream(C).accumulate(O)},generateNodeStream:function(C,O){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(O)}};m.exports=S},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(r,m,u){m.exports=r("stream")},{stream:void 0}],17:[function(r,m,u){var i=r("./DataReader");function o(n){i.call(this,n);for(var l=0;l<this.data.length;l++)n[l]=255&n[l]}r("../utils").inherits(o,i),o.prototype.byteAt=function(n){return this.data[this.zero+n]},o.prototype.lastIndexOfSignature=function(n){for(var l=n.charCodeAt(0),h=n.charCodeAt(1),f=n.charCodeAt(2),x=n.charCodeAt(3),v=this.length-4;0<=v;--v)if(this.data[v]===l&&this.data[v+1]===h&&this.data[v+2]===f&&this.data[v+3]===x)return v-this.zero;return-1},o.prototype.readAndCheckSignature=function(n){var l=n.charCodeAt(0),h=n.charCodeAt(1),f=n.charCodeAt(2),x=n.charCodeAt(3),v=this.readData(4);return l===v[0]&&h===v[1]&&f===v[2]&&x===v[3]},o.prototype.readData=function(n){if(this.checkOffset(n),n===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./DataReader":18}],18:[function(r,m,u){var i=r("../utils");function o(n){this.data=n,this.length=n.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(n){this.checkIndex(this.index+n)},checkIndex:function(n){if(this.length<this.zero+n||n<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+n+"). Corrupted zip ?")},setIndex:function(n){this.checkIndex(n),this.index=n},skip:function(n){this.setIndex(this.index+n)},byteAt:function(){},readInt:function(n){var l,h=0;for(this.checkOffset(n),l=this.index+n-1;l>=this.index;l--)h=(h<<8)+this.byteAt(l);return this.index+=n,h},readString:function(n){return i.transformTo("string",this.readData(n))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var n=this.readInt(4);return new Date(Date.UTC(1980+(n>>25&127),(n>>21&15)-1,n>>16&31,n>>11&31,n>>5&63,(31&n)<<1))}},m.exports=o},{"../utils":32}],19:[function(r,m,u){var i=r("./Uint8ArrayReader");function o(n){i.call(this,n)}r("../utils").inherits(o,i),o.prototype.readData=function(n){this.checkOffset(n);var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,m,u){var i=r("./DataReader");function o(n){i.call(this,n)}r("../utils").inherits(o,i),o.prototype.byteAt=function(n){return this.data.charCodeAt(this.zero+n)},o.prototype.lastIndexOfSignature=function(n){return this.data.lastIndexOf(n)-this.zero},o.prototype.readAndCheckSignature=function(n){return n===this.readData(4)},o.prototype.readData=function(n){this.checkOffset(n);var l=this.data.slice(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./DataReader":18}],21:[function(r,m,u){var i=r("./ArrayReader");function o(n){i.call(this,n)}r("../utils").inherits(o,i),o.prototype.readData=function(n){if(this.checkOffset(n),n===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+n);return this.index+=n,l},m.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(r,m,u){var i=r("../utils"),o=r("../support"),n=r("./ArrayReader"),l=r("./StringReader"),h=r("./NodeBufferReader"),f=r("./Uint8ArrayReader");m.exports=function(x){var v=i.getTypeOf(x);return i.checkSupport(v),v!=="string"||o.uint8array?v==="nodebuffer"?new h(x):o.uint8array?new f(i.transformTo("uint8array",x)):new n(i.transformTo("array",x)):new l(x)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,m,u){u.LOCAL_FILE_HEADER="PK",u.CENTRAL_FILE_HEADER="PK",u.CENTRAL_DIRECTORY_END="PK",u.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",u.ZIP64_CENTRAL_DIRECTORY_END="PK",u.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,m,u){var i=r("./GenericWorker"),o=r("../utils");function n(l){i.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(n,i),n.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},m.exports=n},{"../utils":32,"./GenericWorker":28}],25:[function(r,m,u){var i=r("./GenericWorker"),o=r("../crc32");function n(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(n,i),n.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},m.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,m,u){var i=r("../utils"),o=r("./GenericWorker");function n(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(n,o),n.prototype.processChunk=function(l){if(l){var h=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=h+l.data.length}o.prototype.processChunk.call(this,l)},m.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(r,m,u){var i=r("../utils"),o=r("./GenericWorker");function n(l){o.call(this,"DataWorker");var h=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(f){h.dataIsReady=!0,h.data=f,h.max=f&&f.length||0,h.type=i.getTypeOf(f),h.isPaused||h._tickAndRepeat()},function(f){h.error(f)})}i.inherits(n,o),n.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,h=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,h);break;case"uint8array":l=this.data.subarray(this.index,h);break;case"array":case"nodebuffer":l=this.data.slice(this.index,h)}return this.index=h,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},m.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(r,m,u){function i(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,n){return this._listeners[o].push(n),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,n){if(this._listeners[o])for(var l=0;l<this._listeners[o].length;l++)this._listeners[o][l].call(this,n)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var n=this;return o.on("data",function(l){n.processChunk(l)}),o.on("end",function(){n.end()}),o.on("error",function(l){n.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,n){return this.extraStreamInfo[o]=n,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},m.exports=i},{}],29:[function(r,m,u){var i=r("../utils"),o=r("./ConvertWorker"),n=r("./GenericWorker"),l=r("../base64"),h=r("../support"),f=r("../external"),x=null;if(h.nodestream)try{x=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function v(b,d){return new f.Promise(function(g,p){var k=[],E=b._internalType,S=b._outputType,C=b._mimeType;b.on("data",function(O,L){k.push(O),d&&d(L)}).on("error",function(O){k=[],p(O)}).on("end",function(){try{var O=(function(L,D,T){switch(L){case"blob":return i.newBlob(i.transformTo("arraybuffer",D),T);case"base64":return l.encode(D);default:return i.transformTo(L,D)}})(S,(function(L,D){var T,V=0,re=null,j=0;for(T=0;T<D.length;T++)j+=D[T].length;switch(L){case"string":return D.join("");case"array":return Array.prototype.concat.apply([],D);case"uint8array":for(re=new Uint8Array(j),T=0;T<D.length;T++)re.set(D[T],V),V+=D[T].length;return re;case"nodebuffer":return Buffer.concat(D);default:throw new Error("concat : unsupported type '"+L+"'")}})(E,k),C);g(O)}catch(L){p(L)}k=[]}).resume()})}function c(b,d,g){var p=d;switch(d){case"blob":case"arraybuffer":p="uint8array";break;case"base64":p="string"}try{this._internalType=p,this._outputType=d,this._mimeType=g,i.checkSupport(p),this._worker=b.pipe(new o(p)),b.lock()}catch(k){this._worker=new n("error"),this._worker.error(k)}}c.prototype={accumulate:function(b){return v(this,b)},on:function(b,d){var g=this;return b==="data"?this._worker.on(b,function(p){d.call(g,p.data,p.meta)}):this._worker.on(b,function(){i.delay(d,arguments,g)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(b){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new x(this,{objectMode:this._outputType!=="nodebuffer"},b)}},m.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,m,u){if(u.base64=!0,u.array=!0,u.string=!0,u.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",u.nodebuffer=typeof Buffer<"u",u.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")u.blob=!1;else{var i=new ArrayBuffer(0);try{u.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(i),u.blob=o.getBlob("application/zip").size===0}catch{u.blob=!1}}}try{u.nodestream=!!r("readable-stream").Readable}catch{u.nodestream=!1}},{"readable-stream":16}],31:[function(r,m,u){for(var i=r("./utils"),o=r("./support"),n=r("./nodejsUtils"),l=r("./stream/GenericWorker"),h=new Array(256),f=0;f<256;f++)h[f]=252<=f?6:248<=f?5:240<=f?4:224<=f?3:192<=f?2:1;h[254]=h[254]=1;function x(){l.call(this,"utf-8 decode"),this.leftOver=null}function v(){l.call(this,"utf-8 encode")}u.utf8encode=function(c){return o.nodebuffer?n.newBufferFrom(c,"utf-8"):(function(b){var d,g,p,k,E,S=b.length,C=0;for(k=0;k<S;k++)(64512&(g=b.charCodeAt(k)))==55296&&k+1<S&&(64512&(p=b.charCodeAt(k+1)))==56320&&(g=65536+(g-55296<<10)+(p-56320),k++),C+=g<128?1:g<2048?2:g<65536?3:4;for(d=o.uint8array?new Uint8Array(C):new Array(C),k=E=0;E<C;k++)(64512&(g=b.charCodeAt(k)))==55296&&k+1<S&&(64512&(p=b.charCodeAt(k+1)))==56320&&(g=65536+(g-55296<<10)+(p-56320),k++),g<128?d[E++]=g:(g<2048?d[E++]=192|g>>>6:(g<65536?d[E++]=224|g>>>12:(d[E++]=240|g>>>18,d[E++]=128|g>>>12&63),d[E++]=128|g>>>6&63),d[E++]=128|63&g);return d})(c)},u.utf8decode=function(c){return o.nodebuffer?i.transformTo("nodebuffer",c).toString("utf-8"):(function(b){var d,g,p,k,E=b.length,S=new Array(2*E);for(d=g=0;d<E;)if((p=b[d++])<128)S[g++]=p;else if(4<(k=h[p]))S[g++]=65533,d+=k-1;else{for(p&=k===2?31:k===3?15:7;1<k&&d<E;)p=p<<6|63&b[d++],k--;1<k?S[g++]=65533:p<65536?S[g++]=p:(p-=65536,S[g++]=55296|p>>10&1023,S[g++]=56320|1023&p)}return S.length!==g&&(S.subarray?S=S.subarray(0,g):S.length=g),i.applyFromCharCode(S)})(c=i.transformTo(o.uint8array?"uint8array":"array",c))},i.inherits(x,l),x.prototype.processChunk=function(c){var b=i.transformTo(o.uint8array?"uint8array":"array",c.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var d=b;(b=new Uint8Array(d.length+this.leftOver.length)).set(this.leftOver,0),b.set(d,this.leftOver.length)}else b=this.leftOver.concat(b);this.leftOver=null}var g=(function(k,E){var S;for((E=E||k.length)>k.length&&(E=k.length),S=E-1;0<=S&&(192&k[S])==128;)S--;return S<0||S===0?E:S+h[k[S]]>E?S:E})(b),p=b;g!==b.length&&(o.uint8array?(p=b.subarray(0,g),this.leftOver=b.subarray(g,b.length)):(p=b.slice(0,g),this.leftOver=b.slice(g,b.length))),this.push({data:u.utf8decode(p),meta:c.meta})},x.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=x,i.inherits(v,l),v.prototype.processChunk=function(c){this.push({data:u.utf8encode(c.data),meta:c.meta})},u.Utf8EncodeWorker=v},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,m,u){var i=r("./support"),o=r("./base64"),n=r("./nodejsUtils"),l=r("./external");function h(d){return d}function f(d,g){for(var p=0;p<d.length;++p)g[p]=255&d.charCodeAt(p);return g}r("setimmediate"),u.newBlob=function(d,g){u.checkSupport("blob");try{return new Blob([d],{type:g})}catch{try{var p=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return p.append(d),p.getBlob(g)}catch{throw new Error("Bug : can't construct the Blob.")}}};var x={stringifyByChunk:function(d,g,p){var k=[],E=0,S=d.length;if(S<=p)return String.fromCharCode.apply(null,d);for(;E<S;)g==="array"||g==="nodebuffer"?k.push(String.fromCharCode.apply(null,d.slice(E,Math.min(E+p,S)))):k.push(String.fromCharCode.apply(null,d.subarray(E,Math.min(E+p,S)))),E+=p;return k.join("")},stringifyByChar:function(d){for(var g="",p=0;p<d.length;p++)g+=String.fromCharCode(d[p]);return g},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,n.allocBuffer(1)).length===1}catch{return!1}})()}};function v(d){var g=65536,p=u.getTypeOf(d),k=!0;if(p==="uint8array"?k=x.applyCanBeUsed.uint8array:p==="nodebuffer"&&(k=x.applyCanBeUsed.nodebuffer),k)for(;1<g;)try{return x.stringifyByChunk(d,p,g)}catch{g=Math.floor(g/2)}return x.stringifyByChar(d)}function c(d,g){for(var p=0;p<d.length;p++)g[p]=d[p];return g}u.applyFromCharCode=v;var b={};b.string={string:h,array:function(d){return f(d,new Array(d.length))},arraybuffer:function(d){return b.string.uint8array(d).buffer},uint8array:function(d){return f(d,new Uint8Array(d.length))},nodebuffer:function(d){return f(d,n.allocBuffer(d.length))}},b.array={string:v,array:h,arraybuffer:function(d){return new Uint8Array(d).buffer},uint8array:function(d){return new Uint8Array(d)},nodebuffer:function(d){return n.newBufferFrom(d)}},b.arraybuffer={string:function(d){return v(new Uint8Array(d))},array:function(d){return c(new Uint8Array(d),new Array(d.byteLength))},arraybuffer:h,uint8array:function(d){return new Uint8Array(d)},nodebuffer:function(d){return n.newBufferFrom(new Uint8Array(d))}},b.uint8array={string:v,array:function(d){return c(d,new Array(d.length))},arraybuffer:function(d){return d.buffer},uint8array:h,nodebuffer:function(d){return n.newBufferFrom(d)}},b.nodebuffer={string:v,array:function(d){return c(d,new Array(d.length))},arraybuffer:function(d){return b.nodebuffer.uint8array(d).buffer},uint8array:function(d){return c(d,new Uint8Array(d.length))},nodebuffer:h},u.transformTo=function(d,g){if(g=g||"",!d)return g;u.checkSupport(d);var p=u.getTypeOf(g);return b[p][d](g)},u.resolve=function(d){for(var g=d.split("/"),p=[],k=0;k<g.length;k++){var E=g[k];E==="."||E===""&&k!==0&&k!==g.length-1||(E===".."?p.pop():p.push(E))}return p.join("/")},u.getTypeOf=function(d){return typeof d=="string"?"string":Object.prototype.toString.call(d)==="[object Array]"?"array":i.nodebuffer&&n.isBuffer(d)?"nodebuffer":i.uint8array&&d instanceof Uint8Array?"uint8array":i.arraybuffer&&d instanceof ArrayBuffer?"arraybuffer":void 0},u.checkSupport=function(d){if(!i[d.toLowerCase()])throw new Error(d+" is not supported by this platform")},u.MAX_VALUE_16BITS=65535,u.MAX_VALUE_32BITS=-1,u.pretty=function(d){var g,p,k="";for(p=0;p<(d||"").length;p++)k+="\\x"+((g=d.charCodeAt(p))<16?"0":"")+g.toString(16).toUpperCase();return k},u.delay=function(d,g,p){setImmediate(function(){d.apply(p||null,g||[])})},u.inherits=function(d,g){function p(){}p.prototype=g.prototype,d.prototype=new p},u.extend=function(){var d,g,p={};for(d=0;d<arguments.length;d++)for(g in arguments[d])Object.prototype.hasOwnProperty.call(arguments[d],g)&&p[g]===void 0&&(p[g]=arguments[d][g]);return p},u.prepareContent=function(d,g,p,k,E){return l.Promise.resolve(g).then(function(S){return i.blob&&(S instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(S))!==-1)&&typeof FileReader<"u"?new l.Promise(function(C,O){var L=new FileReader;L.onload=function(D){C(D.target.result)},L.onerror=function(D){O(D.target.error)},L.readAsArrayBuffer(S)}):S}).then(function(S){var C=u.getTypeOf(S);return C?(C==="arraybuffer"?S=u.transformTo("uint8array",S):C==="string"&&(E?S=o.decode(S):p&&k!==!0&&(S=(function(O){return f(O,i.uint8array?new Uint8Array(O.length):new Array(O.length))})(S))),S):l.Promise.reject(new Error("Can't read the data of '"+d+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,m,u){var i=r("./reader/readerFor"),o=r("./utils"),n=r("./signature"),l=r("./zipEntry"),h=r("./support");function f(x){this.files=[],this.loadOptions=x}f.prototype={checkSignature:function(x){if(!this.reader.readAndCheckSignature(x)){this.reader.index-=4;var v=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(v)+", expected "+o.pretty(x)+")")}},isSignature:function(x,v){var c=this.reader.index;this.reader.setIndex(x);var b=this.reader.readString(4)===v;return this.reader.setIndex(c),b},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var x=this.reader.readData(this.zipCommentLength),v=h.uint8array?"uint8array":"array",c=o.transformTo(v,x);this.zipComment=this.loadOptions.decodeFileName(c)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var x,v,c,b=this.zip64EndOfCentralSize-44;0<b;)x=this.reader.readInt(2),v=this.reader.readInt(4),c=this.reader.readData(v),this.zip64ExtensibleData[x]={id:x,length:v,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var x,v;for(x=0;x<this.files.length;x++)v=this.files[x],this.reader.setIndex(v.localHeaderOffset),this.checkSignature(n.LOCAL_FILE_HEADER),v.readLocalPart(this.reader),v.handleUTF8(),v.processAttributes()},readCentralDir:function(){var x;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(n.CENTRAL_FILE_HEADER);)(x=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(x);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var x=this.reader.lastIndexOfSignature(n.CENTRAL_DIRECTORY_END);if(x<0)throw this.isSignature(0,n.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(x);var v=x;if(this.checkSignature(n.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(x=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(x),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,n.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var c=this.centralDirOffset+this.centralDirSize;this.zip64&&(c+=20,c+=12+this.zip64EndOfCentralSize);var b=v-c;if(0<b)this.isSignature(v,n.CENTRAL_FILE_HEADER)||(this.reader.zero=b);else if(b<0)throw new Error("Corrupted zip: missing "+Math.abs(b)+" bytes.")},prepareReader:function(x){this.reader=i(x)},load:function(x){this.prepareReader(x),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},m.exports=f},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,m,u){var i=r("./reader/readerFor"),o=r("./utils"),n=r("./compressedObject"),l=r("./crc32"),h=r("./utf8"),f=r("./compressions"),x=r("./support");function v(c,b){this.options=c,this.loadOptions=b}v.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(c){var b,d;if(c.skip(22),this.fileNameLength=c.readInt(2),d=c.readInt(2),this.fileName=c.readData(this.fileNameLength),c.skip(d),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((b=(function(g){for(var p in f)if(Object.prototype.hasOwnProperty.call(f,p)&&f[p].magic===g)return f[p];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new n(this.compressedSize,this.uncompressedSize,this.crc32,b,c.readData(this.compressedSize))},readCentralPart:function(c){this.versionMadeBy=c.readInt(2),c.skip(2),this.bitFlag=c.readInt(2),this.compressionMethod=c.readString(2),this.date=c.readDate(),this.crc32=c.readInt(4),this.compressedSize=c.readInt(4),this.uncompressedSize=c.readInt(4);var b=c.readInt(2);if(this.extraFieldsLength=c.readInt(2),this.fileCommentLength=c.readInt(2),this.diskNumberStart=c.readInt(2),this.internalFileAttributes=c.readInt(2),this.externalFileAttributes=c.readInt(4),this.localHeaderOffset=c.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");c.skip(b),this.readExtraFields(c),this.parseZIP64ExtraField(c),this.fileComment=c.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var c=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),c==0&&(this.dosPermissions=63&this.externalFileAttributes),c==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var c=i(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=c.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=c.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=c.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=c.readInt(4))}},readExtraFields:function(c){var b,d,g,p=c.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});c.index+4<p;)b=c.readInt(2),d=c.readInt(2),g=c.readData(d),this.extraFields[b]={id:b,length:d,value:g};c.setIndex(p)},handleUTF8:function(){var c=x.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=h.utf8decode(this.fileName),this.fileCommentStr=h.utf8decode(this.fileComment);else{var b=this.findExtraFieldUnicodePath();if(b!==null)this.fileNameStr=b;else{var d=o.transformTo(c,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(d)}var g=this.findExtraFieldUnicodeComment();if(g!==null)this.fileCommentStr=g;else{var p=o.transformTo(c,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(p)}}},findExtraFieldUnicodePath:function(){var c=this.extraFields[28789];if(c){var b=i(c.value);return b.readInt(1)!==1||l(this.fileName)!==b.readInt(4)?null:h.utf8decode(b.readData(c.length-5))}return null},findExtraFieldUnicodeComment:function(){var c=this.extraFields[25461];if(c){var b=i(c.value);return b.readInt(1)!==1||l(this.fileComment)!==b.readInt(4)?null:h.utf8decode(b.readData(c.length-5))}return null}},m.exports=v},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,m,u){function i(b,d,g){this.name=b,this.dir=g.dir,this.date=g.date,this.comment=g.comment,this.unixPermissions=g.unixPermissions,this.dosPermissions=g.dosPermissions,this._data=d,this._dataBinary=g.binary,this.options={compression:g.compression,compressionOptions:g.compressionOptions}}var o=r("./stream/StreamHelper"),n=r("./stream/DataWorker"),l=r("./utf8"),h=r("./compressedObject"),f=r("./stream/GenericWorker");i.prototype={internalStream:function(b){var d=null,g="string";try{if(!b)throw new Error("No output type specified.");var p=(g=b.toLowerCase())==="string"||g==="text";g!=="binarystring"&&g!=="text"||(g="string"),d=this._decompressWorker();var k=!this._dataBinary;k&&!p&&(d=d.pipe(new l.Utf8EncodeWorker)),!k&&p&&(d=d.pipe(new l.Utf8DecodeWorker))}catch(E){(d=new f("error")).error(E)}return new o(d,g,"")},async:function(b,d){return this.internalStream(b).accumulate(d)},nodeStream:function(b,d){return this.internalStream(b||"nodebuffer").toNodejsStream(d)},_compressWorker:function(b,d){if(this._data instanceof h&&this._data.compression.magic===b.magic)return this._data.getCompressedWorker();var g=this._decompressWorker();return this._dataBinary||(g=g.pipe(new l.Utf8EncodeWorker)),h.createWorkerFrom(g,b,d)},_decompressWorker:function(){return this._data instanceof h?this._data.getContentWorker():this._data instanceof f?this._data:new n(this._data)}};for(var x=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],v=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},c=0;c<x.length;c++)i.prototype[x[c]]=v;m.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(r,m,u){(function(i){var o,n,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var h=0,f=new l(b),x=i.document.createTextNode("");f.observe(x,{characterData:!0}),o=function(){x.data=h=++h%2}}else if(i.setImmediate||i.MessageChannel===void 0)o="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var d=i.document.createElement("script");d.onreadystatechange=function(){b(),d.onreadystatechange=null,d.parentNode.removeChild(d),d=null},i.document.documentElement.appendChild(d)}:function(){setTimeout(b,0)};else{var v=new i.MessageChannel;v.port1.onmessage=b,o=function(){v.port2.postMessage(0)}}var c=[];function b(){var d,g;n=!0;for(var p=c.length;p;){for(g=c,c=[],d=-1;++d<p;)g[d]();p=c.length}n=!1}m.exports=function(d){c.push(d)!==1||n||o()}}).call(this,typeof Ae<"u"?Ae:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(r,m,u){var i=r("immediate");function o(){}var n={},l=["REJECTED"],h=["FULFILLED"],f=["PENDING"];function x(p){if(typeof p!="function")throw new TypeError("resolver must be a function");this.state=f,this.queue=[],this.outcome=void 0,p!==o&&d(this,p)}function v(p,k,E){this.promise=p,typeof k=="function"&&(this.onFulfilled=k,this.callFulfilled=this.otherCallFulfilled),typeof E=="function"&&(this.onRejected=E,this.callRejected=this.otherCallRejected)}function c(p,k,E){i(function(){var S;try{S=k(E)}catch(C){return n.reject(p,C)}S===p?n.reject(p,new TypeError("Cannot resolve promise with itself")):n.resolve(p,S)})}function b(p){var k=p&&p.then;if(p&&(typeof p=="object"||typeof p=="function")&&typeof k=="function")return function(){k.apply(p,arguments)}}function d(p,k){var E=!1;function S(L){E||(E=!0,n.reject(p,L))}function C(L){E||(E=!0,n.resolve(p,L))}var O=g(function(){k(C,S)});O.status==="error"&&S(O.value)}function g(p,k){var E={};try{E.value=p(k),E.status="success"}catch(S){E.status="error",E.value=S}return E}(m.exports=x).prototype.finally=function(p){if(typeof p!="function")return this;var k=this.constructor;return this.then(function(E){return k.resolve(p()).then(function(){return E})},function(E){return k.resolve(p()).then(function(){throw E})})},x.prototype.catch=function(p){return this.then(null,p)},x.prototype.then=function(p,k){if(typeof p!="function"&&this.state===h||typeof k!="function"&&this.state===l)return this;var E=new this.constructor(o);return this.state!==f?c(E,this.state===h?p:k,this.outcome):this.queue.push(new v(E,p,k)),E},v.prototype.callFulfilled=function(p){n.resolve(this.promise,p)},v.prototype.otherCallFulfilled=function(p){c(this.promise,this.onFulfilled,p)},v.prototype.callRejected=function(p){n.reject(this.promise,p)},v.prototype.otherCallRejected=function(p){c(this.promise,this.onRejected,p)},n.resolve=function(p,k){var E=g(b,k);if(E.status==="error")return n.reject(p,E.value);var S=E.value;if(S)d(p,S);else{p.state=h,p.outcome=k;for(var C=-1,O=p.queue.length;++C<O;)p.queue[C].callFulfilled(k)}return p},n.reject=function(p,k){p.state=l,p.outcome=k;for(var E=-1,S=p.queue.length;++E<S;)p.queue[E].callRejected(k);return p},x.resolve=function(p){return p instanceof this?p:n.resolve(new this(o),p)},x.reject=function(p){var k=new this(o);return n.reject(k,p)},x.all=function(p){var k=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=p.length,S=!1;if(!E)return this.resolve([]);for(var C=new Array(E),O=0,L=-1,D=new this(o);++L<E;)T(p[L],L);return D;function T(V,re){k.resolve(V).then(function(j){C[re]=j,++O!==E||S||(S=!0,n.resolve(D,C))},function(j){S||(S=!0,n.reject(D,j))})}},x.race=function(p){var k=this;if(Object.prototype.toString.call(p)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=p.length,S=!1;if(!E)return this.resolve([]);for(var C=-1,O=new this(o);++C<E;)L=p[C],k.resolve(L).then(function(D){S||(S=!0,n.resolve(O,D))},function(D){S||(S=!0,n.reject(O,D))});var L;return O}},{immediate:36}],38:[function(r,m,u){var i={};(0,r("./lib/utils/common").assign)(i,r("./lib/deflate"),r("./lib/inflate"),r("./lib/zlib/constants")),m.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(r,m,u){var i=r("./zlib/deflate"),o=r("./utils/common"),n=r("./utils/strings"),l=r("./zlib/messages"),h=r("./zlib/zstream"),f=Object.prototype.toString,x=0,v=-1,c=0,b=8;function d(p){if(!(this instanceof d))return new d(p);this.options=o.assign({level:v,method:b,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},p||{});var k=this.options;k.raw&&0<k.windowBits?k.windowBits=-k.windowBits:k.gzip&&0<k.windowBits&&k.windowBits<16&&(k.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new h,this.strm.avail_out=0;var E=i.deflateInit2(this.strm,k.level,k.method,k.windowBits,k.memLevel,k.strategy);if(E!==x)throw new Error(l[E]);if(k.header&&i.deflateSetHeader(this.strm,k.header),k.dictionary){var S;if(S=typeof k.dictionary=="string"?n.string2buf(k.dictionary):f.call(k.dictionary)==="[object ArrayBuffer]"?new Uint8Array(k.dictionary):k.dictionary,(E=i.deflateSetDictionary(this.strm,S))!==x)throw new Error(l[E]);this._dict_set=!0}}function g(p,k){var E=new d(k);if(E.push(p,!0),E.err)throw E.msg||l[E.err];return E.result}d.prototype.push=function(p,k){var E,S,C=this.strm,O=this.options.chunkSize;if(this.ended)return!1;S=k===~~k?k:k===!0?4:0,typeof p=="string"?C.input=n.string2buf(p):f.call(p)==="[object ArrayBuffer]"?C.input=new Uint8Array(p):C.input=p,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new o.Buf8(O),C.next_out=0,C.avail_out=O),(E=i.deflate(C,S))!==1&&E!==x)return this.onEnd(E),!(this.ended=!0);C.avail_out!==0&&(C.avail_in!==0||S!==4&&S!==2)||(this.options.to==="string"?this.onData(n.buf2binstring(o.shrinkBuf(C.output,C.next_out))):this.onData(o.shrinkBuf(C.output,C.next_out)))}while((0<C.avail_in||C.avail_out===0)&&E!==1);return S===4?(E=i.deflateEnd(this.strm),this.onEnd(E),this.ended=!0,E===x):S!==2||(this.onEnd(x),!(C.avail_out=0))},d.prototype.onData=function(p){this.chunks.push(p)},d.prototype.onEnd=function(p){p===x&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},u.Deflate=d,u.deflate=g,u.deflateRaw=function(p,k){return(k=k||{}).raw=!0,g(p,k)},u.gzip=function(p,k){return(k=k||{}).gzip=!0,g(p,k)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(r,m,u){var i=r("./zlib/inflate"),o=r("./utils/common"),n=r("./utils/strings"),l=r("./zlib/constants"),h=r("./zlib/messages"),f=r("./zlib/zstream"),x=r("./zlib/gzheader"),v=Object.prototype.toString;function c(d){if(!(this instanceof c))return new c(d);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},d||{});var g=this.options;g.raw&&0<=g.windowBits&&g.windowBits<16&&(g.windowBits=-g.windowBits,g.windowBits===0&&(g.windowBits=-15)),!(0<=g.windowBits&&g.windowBits<16)||d&&d.windowBits||(g.windowBits+=32),15<g.windowBits&&g.windowBits<48&&(15&g.windowBits)==0&&(g.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var p=i.inflateInit2(this.strm,g.windowBits);if(p!==l.Z_OK)throw new Error(h[p]);this.header=new x,i.inflateGetHeader(this.strm,this.header)}function b(d,g){var p=new c(g);if(p.push(d,!0),p.err)throw p.msg||h[p.err];return p.result}c.prototype.push=function(d,g){var p,k,E,S,C,O,L=this.strm,D=this.options.chunkSize,T=this.options.dictionary,V=!1;if(this.ended)return!1;k=g===~~g?g:g===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof d=="string"?L.input=n.binstring2buf(d):v.call(d)==="[object ArrayBuffer]"?L.input=new Uint8Array(d):L.input=d,L.next_in=0,L.avail_in=L.input.length;do{if(L.avail_out===0&&(L.output=new o.Buf8(D),L.next_out=0,L.avail_out=D),(p=i.inflate(L,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&T&&(O=typeof T=="string"?n.string2buf(T):v.call(T)==="[object ArrayBuffer]"?new Uint8Array(T):T,p=i.inflateSetDictionary(this.strm,O)),p===l.Z_BUF_ERROR&&V===!0&&(p=l.Z_OK,V=!1),p!==l.Z_STREAM_END&&p!==l.Z_OK)return this.onEnd(p),!(this.ended=!0);L.next_out&&(L.avail_out!==0&&p!==l.Z_STREAM_END&&(L.avail_in!==0||k!==l.Z_FINISH&&k!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(E=n.utf8border(L.output,L.next_out),S=L.next_out-E,C=n.buf2string(L.output,E),L.next_out=S,L.avail_out=D-S,S&&o.arraySet(L.output,L.output,E,S,0),this.onData(C)):this.onData(o.shrinkBuf(L.output,L.next_out)))),L.avail_in===0&&L.avail_out===0&&(V=!0)}while((0<L.avail_in||L.avail_out===0)&&p!==l.Z_STREAM_END);return p===l.Z_STREAM_END&&(k=l.Z_FINISH),k===l.Z_FINISH?(p=i.inflateEnd(this.strm),this.onEnd(p),this.ended=!0,p===l.Z_OK):k!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(L.avail_out=0))},c.prototype.onData=function(d){this.chunks.push(d)},c.prototype.onEnd=function(d){d===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=d,this.msg=this.strm.msg},u.Inflate=c,u.inflate=b,u.inflateRaw=function(d,g){return(g=g||{}).raw=!0,b(d,g)},u.ungzip=b},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(r,m,u){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";u.assign=function(l){for(var h=Array.prototype.slice.call(arguments,1);h.length;){var f=h.shift();if(f){if(typeof f!="object")throw new TypeError(f+"must be non-object");for(var x in f)f.hasOwnProperty(x)&&(l[x]=f[x])}}return l},u.shrinkBuf=function(l,h){return l.length===h?l:l.subarray?l.subarray(0,h):(l.length=h,l)};var o={arraySet:function(l,h,f,x,v){if(h.subarray&&l.subarray)l.set(h.subarray(f,f+x),v);else for(var c=0;c<x;c++)l[v+c]=h[f+c]},flattenChunks:function(l){var h,f,x,v,c,b;for(h=x=0,f=l.length;h<f;h++)x+=l[h].length;for(b=new Uint8Array(x),h=v=0,f=l.length;h<f;h++)c=l[h],b.set(c,v),v+=c.length;return b}},n={arraySet:function(l,h,f,x,v){for(var c=0;c<x;c++)l[v+c]=h[f+c]},flattenChunks:function(l){return[].concat.apply([],l)}};u.setTyped=function(l){l?(u.Buf8=Uint8Array,u.Buf16=Uint16Array,u.Buf32=Int32Array,u.assign(u,o)):(u.Buf8=Array,u.Buf16=Array,u.Buf32=Array,u.assign(u,n))},u.setTyped(i)},{}],42:[function(r,m,u){var i=r("./common"),o=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{n=!1}for(var l=new i.Buf8(256),h=0;h<256;h++)l[h]=252<=h?6:248<=h?5:240<=h?4:224<=h?3:192<=h?2:1;function f(x,v){if(v<65537&&(x.subarray&&n||!x.subarray&&o))return String.fromCharCode.apply(null,i.shrinkBuf(x,v));for(var c="",b=0;b<v;b++)c+=String.fromCharCode(x[b]);return c}l[254]=l[254]=1,u.string2buf=function(x){var v,c,b,d,g,p=x.length,k=0;for(d=0;d<p;d++)(64512&(c=x.charCodeAt(d)))==55296&&d+1<p&&(64512&(b=x.charCodeAt(d+1)))==56320&&(c=65536+(c-55296<<10)+(b-56320),d++),k+=c<128?1:c<2048?2:c<65536?3:4;for(v=new i.Buf8(k),d=g=0;g<k;d++)(64512&(c=x.charCodeAt(d)))==55296&&d+1<p&&(64512&(b=x.charCodeAt(d+1)))==56320&&(c=65536+(c-55296<<10)+(b-56320),d++),c<128?v[g++]=c:(c<2048?v[g++]=192|c>>>6:(c<65536?v[g++]=224|c>>>12:(v[g++]=240|c>>>18,v[g++]=128|c>>>12&63),v[g++]=128|c>>>6&63),v[g++]=128|63&c);return v},u.buf2binstring=function(x){return f(x,x.length)},u.binstring2buf=function(x){for(var v=new i.Buf8(x.length),c=0,b=v.length;c<b;c++)v[c]=x.charCodeAt(c);return v},u.buf2string=function(x,v){var c,b,d,g,p=v||x.length,k=new Array(2*p);for(c=b=0;c<p;)if((d=x[c++])<128)k[b++]=d;else if(4<(g=l[d]))k[b++]=65533,c+=g-1;else{for(d&=g===2?31:g===3?15:7;1<g&&c<p;)d=d<<6|63&x[c++],g--;1<g?k[b++]=65533:d<65536?k[b++]=d:(d-=65536,k[b++]=55296|d>>10&1023,k[b++]=56320|1023&d)}return f(k,b)},u.utf8border=function(x,v){var c;for((v=v||x.length)>x.length&&(v=x.length),c=v-1;0<=c&&(192&x[c])==128;)c--;return c<0||c===0?v:c+l[x[c]]>v?c:v}},{"./common":41}],43:[function(r,m,u){m.exports=function(i,o,n,l){for(var h=65535&i|0,f=i>>>16&65535|0,x=0;n!==0;){for(n-=x=2e3<n?2e3:n;f=f+(h=h+o[l++]|0)|0,--x;);h%=65521,f%=65521}return h|f<<16|0}},{}],44:[function(r,m,u){m.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(r,m,u){var i=(function(){for(var o,n=[],l=0;l<256;l++){o=l;for(var h=0;h<8;h++)o=1&o?3988292384^o>>>1:o>>>1;n[l]=o}return n})();m.exports=function(o,n,l,h){var f=i,x=h+l;o^=-1;for(var v=h;v<x;v++)o=o>>>8^f[255&(o^n[v])];return-1^o}},{}],46:[function(r,m,u){var i,o=r("../utils/common"),n=r("./trees"),l=r("./adler32"),h=r("./crc32"),f=r("./messages"),x=0,v=4,c=0,b=-2,d=-1,g=4,p=2,k=8,E=9,S=286,C=30,O=19,L=2*S+1,D=15,T=3,V=258,re=V+T+1,j=42,R=113,a=1,M=2,te=3,U=4;function W(t,H){return t.msg=f[H],H}function K(t){return(t<<1)-(4<t?9:0)}function X(t){for(var H=t.length;0<=--H;)t[H]=0}function z(t){var H=t.state,A=H.pending;A>t.avail_out&&(A=t.avail_out),A!==0&&(o.arraySet(t.output,H.pending_buf,H.pending_out,A,t.next_out),t.next_out+=A,H.pending_out+=A,t.total_out+=A,t.avail_out-=A,H.pending-=A,H.pending===0&&(H.pending_out=0))}function N(t,H){n._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,H),t.block_start=t.strstart,z(t.strm)}function J(t,H){t.pending_buf[t.pending++]=H}function G(t,H){t.pending_buf[t.pending++]=H>>>8&255,t.pending_buf[t.pending++]=255&H}function Q(t,H){var A,y,w=t.max_chain_length,I=t.strstart,$=t.prev_length,Z=t.nice_match,P=t.strstart>t.w_size-re?t.strstart-(t.w_size-re):0,Y=t.window,F=t.w_mask,B=t.prev,ee=t.strstart+V,ae=Y[I+$-1],se=Y[I+$];t.prev_length>=t.good_match&&(w>>=2),Z>t.lookahead&&(Z=t.lookahead);do if(Y[(A=H)+$]===se&&Y[A+$-1]===ae&&Y[A]===Y[I]&&Y[++A]===Y[I+1]){I+=2,A++;do;while(Y[++I]===Y[++A]&&Y[++I]===Y[++A]&&Y[++I]===Y[++A]&&Y[++I]===Y[++A]&&Y[++I]===Y[++A]&&Y[++I]===Y[++A]&&Y[++I]===Y[++A]&&Y[++I]===Y[++A]&&I<ee);if(y=V-(ee-I),I=ee-V,$<y){if(t.match_start=H,Z<=($=y))break;ae=Y[I+$-1],se=Y[I+$]}}while((H=B[H&F])>P&&--w!=0);return $<=t.lookahead?$:t.lookahead}function ue(t){var H,A,y,w,I,$,Z,P,Y,F,B=t.w_size;do{if(w=t.window_size-t.lookahead-t.strstart,t.strstart>=B+(B-re)){for(o.arraySet(t.window,t.window,B,B,0),t.match_start-=B,t.strstart-=B,t.block_start-=B,H=A=t.hash_size;y=t.head[--H],t.head[H]=B<=y?y-B:0,--A;);for(H=A=B;y=t.prev[--H],t.prev[H]=B<=y?y-B:0,--A;);w+=B}if(t.strm.avail_in===0)break;if($=t.strm,Z=t.window,P=t.strstart+t.lookahead,Y=w,F=void 0,F=$.avail_in,Y<F&&(F=Y),A=F===0?0:($.avail_in-=F,o.arraySet(Z,$.input,$.next_in,F,P),$.state.wrap===1?$.adler=l($.adler,Z,F,P):$.state.wrap===2&&($.adler=h($.adler,Z,F,P)),$.next_in+=F,$.total_in+=F,F),t.lookahead+=A,t.lookahead+t.insert>=T)for(I=t.strstart-t.insert,t.ins_h=t.window[I],t.ins_h=(t.ins_h<<t.hash_shift^t.window[I+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[I+T-1])&t.hash_mask,t.prev[I&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=I,I++,t.insert--,!(t.lookahead+t.insert<T)););}while(t.lookahead<re&&t.strm.avail_in!==0)}function ie(t,H){for(var A,y;;){if(t.lookahead<re){if(ue(t),t.lookahead<re&&H===x)return a;if(t.lookahead===0)break}if(A=0,t.lookahead>=T&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+T-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),A!==0&&t.strstart-A<=t.w_size-re&&(t.match_length=Q(t,A)),t.match_length>=T)if(y=n._tr_tally(t,t.strstart-t.match_start,t.match_length-T),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=T){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+T-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,--t.match_length!=0;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else y=n._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(y&&(N(t,!1),t.strm.avail_out===0))return a}return t.insert=t.strstart<T-1?t.strstart:T-1,H===v?(N(t,!0),t.strm.avail_out===0?te:U):t.last_lit&&(N(t,!1),t.strm.avail_out===0)?a:M}function le(t,H){for(var A,y,w;;){if(t.lookahead<re){if(ue(t),t.lookahead<re&&H===x)return a;if(t.lookahead===0)break}if(A=0,t.lookahead>=T&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+T-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=T-1,A!==0&&t.prev_length<t.max_lazy_match&&t.strstart-A<=t.w_size-re&&(t.match_length=Q(t,A),t.match_length<=5&&(t.strategy===1||t.match_length===T&&4096<t.strstart-t.match_start)&&(t.match_length=T-1)),t.prev_length>=T&&t.match_length<=t.prev_length){for(w=t.strstart+t.lookahead-T,y=n._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-T),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=w&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+T-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),--t.prev_length!=0;);if(t.match_available=0,t.match_length=T-1,t.strstart++,y&&(N(t,!1),t.strm.avail_out===0))return a}else if(t.match_available){if((y=n._tr_tally(t,0,t.window[t.strstart-1]))&&N(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return a}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(y=n._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<T-1?t.strstart:T-1,H===v?(N(t,!0),t.strm.avail_out===0?te:U):t.last_lit&&(N(t,!1),t.strm.avail_out===0)?a:M}function ce(t,H,A,y,w){this.good_length=t,this.max_lazy=H,this.nice_length=A,this.max_chain=y,this.func=w}function ge(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=k,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*L),this.dyn_dtree=new o.Buf16(2*(2*C+1)),this.bl_tree=new o.Buf16(2*(2*O+1)),X(this.dyn_ltree),X(this.dyn_dtree),X(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(D+1),this.heap=new o.Buf16(2*S+1),X(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*S+1),X(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function fe(t){var H;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=p,(H=t.state).pending=0,H.pending_out=0,H.wrap<0&&(H.wrap=-H.wrap),H.status=H.wrap?j:R,t.adler=H.wrap===2?0:1,H.last_flush=x,n._tr_init(H),c):W(t,b)}function we(t){var H=fe(t);return H===c&&(function(A){A.window_size=2*A.w_size,X(A.head),A.max_lazy_match=i[A.level].max_lazy,A.good_match=i[A.level].good_length,A.nice_match=i[A.level].nice_length,A.max_chain_length=i[A.level].max_chain,A.strstart=0,A.block_start=0,A.lookahead=0,A.insert=0,A.match_length=A.prev_length=T-1,A.match_available=0,A.ins_h=0})(t.state),H}function ze(t,H,A,y,w,I){if(!t)return b;var $=1;if(H===d&&(H=6),y<0?($=0,y=-y):15<y&&($=2,y-=16),w<1||E<w||A!==k||y<8||15<y||H<0||9<H||I<0||g<I)return W(t,b);y===8&&(y=9);var Z=new ge;return(t.state=Z).strm=t,Z.wrap=$,Z.gzhead=null,Z.w_bits=y,Z.w_size=1<<Z.w_bits,Z.w_mask=Z.w_size-1,Z.hash_bits=w+7,Z.hash_size=1<<Z.hash_bits,Z.hash_mask=Z.hash_size-1,Z.hash_shift=~~((Z.hash_bits+T-1)/T),Z.window=new o.Buf8(2*Z.w_size),Z.head=new o.Buf16(Z.hash_size),Z.prev=new o.Buf16(Z.w_size),Z.lit_bufsize=1<<w+6,Z.pending_buf_size=4*Z.lit_bufsize,Z.pending_buf=new o.Buf8(Z.pending_buf_size),Z.d_buf=1*Z.lit_bufsize,Z.l_buf=3*Z.lit_bufsize,Z.level=H,Z.strategy=I,Z.method=A,we(t)}i=[new ce(0,0,0,0,function(t,H){var A=65535;for(A>t.pending_buf_size-5&&(A=t.pending_buf_size-5);;){if(t.lookahead<=1){if(ue(t),t.lookahead===0&&H===x)return a;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var y=t.block_start+A;if((t.strstart===0||t.strstart>=y)&&(t.lookahead=t.strstart-y,t.strstart=y,N(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-re&&(N(t,!1),t.strm.avail_out===0))return a}return t.insert=0,H===v?(N(t,!0),t.strm.avail_out===0?te:U):(t.strstart>t.block_start&&(N(t,!1),t.strm.avail_out),a)}),new ce(4,4,8,4,ie),new ce(4,5,16,8,ie),new ce(4,6,32,32,ie),new ce(4,4,16,16,le),new ce(8,16,32,32,le),new ce(8,16,128,128,le),new ce(8,32,128,256,le),new ce(32,128,258,1024,le),new ce(32,258,258,4096,le)],u.deflateInit=function(t,H){return ze(t,H,k,15,8,0)},u.deflateInit2=ze,u.deflateReset=we,u.deflateResetKeep=fe,u.deflateSetHeader=function(t,H){return t&&t.state?t.state.wrap!==2?b:(t.state.gzhead=H,c):b},u.deflate=function(t,H){var A,y,w,I;if(!t||!t.state||5<H||H<0)return t?W(t,b):b;if(y=t.state,!t.output||!t.input&&t.avail_in!==0||y.status===666&&H!==v)return W(t,t.avail_out===0?-5:b);if(y.strm=t,A=y.last_flush,y.last_flush=H,y.status===j)if(y.wrap===2)t.adler=0,J(y,31),J(y,139),J(y,8),y.gzhead?(J(y,(y.gzhead.text?1:0)+(y.gzhead.hcrc?2:0)+(y.gzhead.extra?4:0)+(y.gzhead.name?8:0)+(y.gzhead.comment?16:0)),J(y,255&y.gzhead.time),J(y,y.gzhead.time>>8&255),J(y,y.gzhead.time>>16&255),J(y,y.gzhead.time>>24&255),J(y,y.level===9?2:2<=y.strategy||y.level<2?4:0),J(y,255&y.gzhead.os),y.gzhead.extra&&y.gzhead.extra.length&&(J(y,255&y.gzhead.extra.length),J(y,y.gzhead.extra.length>>8&255)),y.gzhead.hcrc&&(t.adler=h(t.adler,y.pending_buf,y.pending,0)),y.gzindex=0,y.status=69):(J(y,0),J(y,0),J(y,0),J(y,0),J(y,0),J(y,y.level===9?2:2<=y.strategy||y.level<2?4:0),J(y,3),y.status=R);else{var $=k+(y.w_bits-8<<4)<<8;$|=(2<=y.strategy||y.level<2?0:y.level<6?1:y.level===6?2:3)<<6,y.strstart!==0&&($|=32),$+=31-$%31,y.status=R,G(y,$),y.strstart!==0&&(G(y,t.adler>>>16),G(y,65535&t.adler)),t.adler=1}if(y.status===69)if(y.gzhead.extra){for(w=y.pending;y.gzindex<(65535&y.gzhead.extra.length)&&(y.pending!==y.pending_buf_size||(y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),z(t),w=y.pending,y.pending!==y.pending_buf_size));)J(y,255&y.gzhead.extra[y.gzindex]),y.gzindex++;y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),y.gzindex===y.gzhead.extra.length&&(y.gzindex=0,y.status=73)}else y.status=73;if(y.status===73)if(y.gzhead.name){w=y.pending;do{if(y.pending===y.pending_buf_size&&(y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),z(t),w=y.pending,y.pending===y.pending_buf_size)){I=1;break}I=y.gzindex<y.gzhead.name.length?255&y.gzhead.name.charCodeAt(y.gzindex++):0,J(y,I)}while(I!==0);y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),I===0&&(y.gzindex=0,y.status=91)}else y.status=91;if(y.status===91)if(y.gzhead.comment){w=y.pending;do{if(y.pending===y.pending_buf_size&&(y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),z(t),w=y.pending,y.pending===y.pending_buf_size)){I=1;break}I=y.gzindex<y.gzhead.comment.length?255&y.gzhead.comment.charCodeAt(y.gzindex++):0,J(y,I)}while(I!==0);y.gzhead.hcrc&&y.pending>w&&(t.adler=h(t.adler,y.pending_buf,y.pending-w,w)),I===0&&(y.status=103)}else y.status=103;if(y.status===103&&(y.gzhead.hcrc?(y.pending+2>y.pending_buf_size&&z(t),y.pending+2<=y.pending_buf_size&&(J(y,255&t.adler),J(y,t.adler>>8&255),t.adler=0,y.status=R)):y.status=R),y.pending!==0){if(z(t),t.avail_out===0)return y.last_flush=-1,c}else if(t.avail_in===0&&K(H)<=K(A)&&H!==v)return W(t,-5);if(y.status===666&&t.avail_in!==0)return W(t,-5);if(t.avail_in!==0||y.lookahead!==0||H!==x&&y.status!==666){var Z=y.strategy===2?(function(P,Y){for(var F;;){if(P.lookahead===0&&(ue(P),P.lookahead===0)){if(Y===x)return a;break}if(P.match_length=0,F=n._tr_tally(P,0,P.window[P.strstart]),P.lookahead--,P.strstart++,F&&(N(P,!1),P.strm.avail_out===0))return a}return P.insert=0,Y===v?(N(P,!0),P.strm.avail_out===0?te:U):P.last_lit&&(N(P,!1),P.strm.avail_out===0)?a:M})(y,H):y.strategy===3?(function(P,Y){for(var F,B,ee,ae,se=P.window;;){if(P.lookahead<=V){if(ue(P),P.lookahead<=V&&Y===x)return a;if(P.lookahead===0)break}if(P.match_length=0,P.lookahead>=T&&0<P.strstart&&(B=se[ee=P.strstart-1])===se[++ee]&&B===se[++ee]&&B===se[++ee]){ae=P.strstart+V;do;while(B===se[++ee]&&B===se[++ee]&&B===se[++ee]&&B===se[++ee]&&B===se[++ee]&&B===se[++ee]&&B===se[++ee]&&B===se[++ee]&&ee<ae);P.match_length=V-(ae-ee),P.match_length>P.lookahead&&(P.match_length=P.lookahead)}if(P.match_length>=T?(F=n._tr_tally(P,1,P.match_length-T),P.lookahead-=P.match_length,P.strstart+=P.match_length,P.match_length=0):(F=n._tr_tally(P,0,P.window[P.strstart]),P.lookahead--,P.strstart++),F&&(N(P,!1),P.strm.avail_out===0))return a}return P.insert=0,Y===v?(N(P,!0),P.strm.avail_out===0?te:U):P.last_lit&&(N(P,!1),P.strm.avail_out===0)?a:M})(y,H):i[y.level].func(y,H);if(Z!==te&&Z!==U||(y.status=666),Z===a||Z===te)return t.avail_out===0&&(y.last_flush=-1),c;if(Z===M&&(H===1?n._tr_align(y):H!==5&&(n._tr_stored_block(y,0,0,!1),H===3&&(X(y.head),y.lookahead===0&&(y.strstart=0,y.block_start=0,y.insert=0))),z(t),t.avail_out===0))return y.last_flush=-1,c}return H!==v?c:y.wrap<=0?1:(y.wrap===2?(J(y,255&t.adler),J(y,t.adler>>8&255),J(y,t.adler>>16&255),J(y,t.adler>>24&255),J(y,255&t.total_in),J(y,t.total_in>>8&255),J(y,t.total_in>>16&255),J(y,t.total_in>>24&255)):(G(y,t.adler>>>16),G(y,65535&t.adler)),z(t),0<y.wrap&&(y.wrap=-y.wrap),y.pending!==0?c:1)},u.deflateEnd=function(t){var H;return t&&t.state?(H=t.state.status)!==j&&H!==69&&H!==73&&H!==91&&H!==103&&H!==R&&H!==666?W(t,b):(t.state=null,H===R?W(t,-3):c):b},u.deflateSetDictionary=function(t,H){var A,y,w,I,$,Z,P,Y,F=H.length;if(!t||!t.state||(I=(A=t.state).wrap)===2||I===1&&A.status!==j||A.lookahead)return b;for(I===1&&(t.adler=l(t.adler,H,F,0)),A.wrap=0,F>=A.w_size&&(I===0&&(X(A.head),A.strstart=0,A.block_start=0,A.insert=0),Y=new o.Buf8(A.w_size),o.arraySet(Y,H,F-A.w_size,A.w_size,0),H=Y,F=A.w_size),$=t.avail_in,Z=t.next_in,P=t.input,t.avail_in=F,t.next_in=0,t.input=H,ue(A);A.lookahead>=T;){for(y=A.strstart,w=A.lookahead-(T-1);A.ins_h=(A.ins_h<<A.hash_shift^A.window[y+T-1])&A.hash_mask,A.prev[y&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=y,y++,--w;);A.strstart=y,A.lookahead=T-1,ue(A)}return A.strstart+=A.lookahead,A.block_start=A.strstart,A.insert=A.lookahead,A.lookahead=0,A.match_length=A.prev_length=T-1,A.match_available=0,t.next_in=Z,t.input=P,t.avail_in=$,A.wrap=I,c},u.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(r,m,u){m.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(r,m,u){m.exports=function(i,o){var n,l,h,f,x,v,c,b,d,g,p,k,E,S,C,O,L,D,T,V,re,j,R,a,M;n=i.state,l=i.next_in,a=i.input,h=l+(i.avail_in-5),f=i.next_out,M=i.output,x=f-(o-i.avail_out),v=f+(i.avail_out-257),c=n.dmax,b=n.wsize,d=n.whave,g=n.wnext,p=n.window,k=n.hold,E=n.bits,S=n.lencode,C=n.distcode,O=(1<<n.lenbits)-1,L=(1<<n.distbits)-1;e:do{E<15&&(k+=a[l++]<<E,E+=8,k+=a[l++]<<E,E+=8),D=S[k&O];t:for(;;){if(k>>>=T=D>>>24,E-=T,(T=D>>>16&255)===0)M[f++]=65535&D;else{if(!(16&T)){if((64&T)==0){D=S[(65535&D)+(k&(1<<T)-1)];continue t}if(32&T){n.mode=12;break e}i.msg="invalid literal/length code",n.mode=30;break e}V=65535&D,(T&=15)&&(E<T&&(k+=a[l++]<<E,E+=8),V+=k&(1<<T)-1,k>>>=T,E-=T),E<15&&(k+=a[l++]<<E,E+=8,k+=a[l++]<<E,E+=8),D=C[k&L];r:for(;;){if(k>>>=T=D>>>24,E-=T,!(16&(T=D>>>16&255))){if((64&T)==0){D=C[(65535&D)+(k&(1<<T)-1)];continue r}i.msg="invalid distance code",n.mode=30;break e}if(re=65535&D,E<(T&=15)&&(k+=a[l++]<<E,(E+=8)<T&&(k+=a[l++]<<E,E+=8)),c<(re+=k&(1<<T)-1)){i.msg="invalid distance too far back",n.mode=30;break e}if(k>>>=T,E-=T,(T=f-x)<re){if(d<(T=re-T)&&n.sane){i.msg="invalid distance too far back",n.mode=30;break e}if(R=p,(j=0)===g){if(j+=b-T,T<V){for(V-=T;M[f++]=p[j++],--T;);j=f-re,R=M}}else if(g<T){if(j+=b+g-T,(T-=g)<V){for(V-=T;M[f++]=p[j++],--T;);if(j=0,g<V){for(V-=T=g;M[f++]=p[j++],--T;);j=f-re,R=M}}}else if(j+=g-T,T<V){for(V-=T;M[f++]=p[j++],--T;);j=f-re,R=M}for(;2<V;)M[f++]=R[j++],M[f++]=R[j++],M[f++]=R[j++],V-=3;V&&(M[f++]=R[j++],1<V&&(M[f++]=R[j++]))}else{for(j=f-re;M[f++]=M[j++],M[f++]=M[j++],M[f++]=M[j++],2<(V-=3););V&&(M[f++]=M[j++],1<V&&(M[f++]=M[j++]))}break}}break}}while(l<h&&f<v);l-=V=E>>3,k&=(1<<(E-=V<<3))-1,i.next_in=l,i.next_out=f,i.avail_in=l<h?h-l+5:5-(l-h),i.avail_out=f<v?v-f+257:257-(f-v),n.hold=k,n.bits=E}},{}],49:[function(r,m,u){var i=r("../utils/common"),o=r("./adler32"),n=r("./crc32"),l=r("./inffast"),h=r("./inftrees"),f=1,x=2,v=0,c=-2,b=1,d=852,g=592;function p(j){return(j>>>24&255)+(j>>>8&65280)+((65280&j)<<8)+((255&j)<<24)}function k(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function E(j){var R;return j&&j.state?(R=j.state,j.total_in=j.total_out=R.total=0,j.msg="",R.wrap&&(j.adler=1&R.wrap),R.mode=b,R.last=0,R.havedict=0,R.dmax=32768,R.head=null,R.hold=0,R.bits=0,R.lencode=R.lendyn=new i.Buf32(d),R.distcode=R.distdyn=new i.Buf32(g),R.sane=1,R.back=-1,v):c}function S(j){var R;return j&&j.state?((R=j.state).wsize=0,R.whave=0,R.wnext=0,E(j)):c}function C(j,R){var a,M;return j&&j.state?(M=j.state,R<0?(a=0,R=-R):(a=1+(R>>4),R<48&&(R&=15)),R&&(R<8||15<R)?c:(M.window!==null&&M.wbits!==R&&(M.window=null),M.wrap=a,M.wbits=R,S(j))):c}function O(j,R){var a,M;return j?(M=new k,(j.state=M).window=null,(a=C(j,R))!==v&&(j.state=null),a):c}var L,D,T=!0;function V(j){if(T){var R;for(L=new i.Buf32(512),D=new i.Buf32(32),R=0;R<144;)j.lens[R++]=8;for(;R<256;)j.lens[R++]=9;for(;R<280;)j.lens[R++]=7;for(;R<288;)j.lens[R++]=8;for(h(f,j.lens,0,288,L,0,j.work,{bits:9}),R=0;R<32;)j.lens[R++]=5;h(x,j.lens,0,32,D,0,j.work,{bits:5}),T=!1}j.lencode=L,j.lenbits=9,j.distcode=D,j.distbits=5}function re(j,R,a,M){var te,U=j.state;return U.window===null&&(U.wsize=1<<U.wbits,U.wnext=0,U.whave=0,U.window=new i.Buf8(U.wsize)),M>=U.wsize?(i.arraySet(U.window,R,a-U.wsize,U.wsize,0),U.wnext=0,U.whave=U.wsize):(M<(te=U.wsize-U.wnext)&&(te=M),i.arraySet(U.window,R,a-M,te,U.wnext),(M-=te)?(i.arraySet(U.window,R,a-M,M,0),U.wnext=M,U.whave=U.wsize):(U.wnext+=te,U.wnext===U.wsize&&(U.wnext=0),U.whave<U.wsize&&(U.whave+=te))),0}u.inflateReset=S,u.inflateReset2=C,u.inflateResetKeep=E,u.inflateInit=function(j){return O(j,15)},u.inflateInit2=O,u.inflate=function(j,R){var a,M,te,U,W,K,X,z,N,J,G,Q,ue,ie,le,ce,ge,fe,we,ze,t,H,A,y,w=0,I=new i.Buf8(4),$=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!j||!j.state||!j.output||!j.input&&j.avail_in!==0)return c;(a=j.state).mode===12&&(a.mode=13),W=j.next_out,te=j.output,X=j.avail_out,U=j.next_in,M=j.input,K=j.avail_in,z=a.hold,N=a.bits,J=K,G=X,H=v;e:for(;;)switch(a.mode){case b:if(a.wrap===0){a.mode=13;break}for(;N<16;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(2&a.wrap&&z===35615){I[a.check=0]=255&z,I[1]=z>>>8&255,a.check=n(a.check,I,2,0),N=z=0,a.mode=2;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&z)<<8)+(z>>8))%31){j.msg="incorrect header check",a.mode=30;break}if((15&z)!=8){j.msg="unknown compression method",a.mode=30;break}if(N-=4,t=8+(15&(z>>>=4)),a.wbits===0)a.wbits=t;else if(t>a.wbits){j.msg="invalid window size",a.mode=30;break}a.dmax=1<<t,j.adler=a.check=1,a.mode=512&z?10:12,N=z=0;break;case 2:for(;N<16;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(a.flags=z,(255&a.flags)!=8){j.msg="unknown compression method",a.mode=30;break}if(57344&a.flags){j.msg="unknown header flags set",a.mode=30;break}a.head&&(a.head.text=z>>8&1),512&a.flags&&(I[0]=255&z,I[1]=z>>>8&255,a.check=n(a.check,I,2,0)),N=z=0,a.mode=3;case 3:for(;N<32;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}a.head&&(a.head.time=z),512&a.flags&&(I[0]=255&z,I[1]=z>>>8&255,I[2]=z>>>16&255,I[3]=z>>>24&255,a.check=n(a.check,I,4,0)),N=z=0,a.mode=4;case 4:for(;N<16;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}a.head&&(a.head.xflags=255&z,a.head.os=z>>8),512&a.flags&&(I[0]=255&z,I[1]=z>>>8&255,a.check=n(a.check,I,2,0)),N=z=0,a.mode=5;case 5:if(1024&a.flags){for(;N<16;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}a.length=z,a.head&&(a.head.extra_len=z),512&a.flags&&(I[0]=255&z,I[1]=z>>>8&255,a.check=n(a.check,I,2,0)),N=z=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(K<(Q=a.length)&&(Q=K),Q&&(a.head&&(t=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),i.arraySet(a.head.extra,M,U,Q,t)),512&a.flags&&(a.check=n(a.check,M,Q,U)),K-=Q,U+=Q,a.length-=Q),a.length))break e;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(K===0)break e;for(Q=0;t=M[U+Q++],a.head&&t&&a.length<65536&&(a.head.name+=String.fromCharCode(t)),t&&Q<K;);if(512&a.flags&&(a.check=n(a.check,M,Q,U)),K-=Q,U+=Q,t)break e}else a.head&&(a.head.name=null);a.length=0,a.mode=8;case 8:if(4096&a.flags){if(K===0)break e;for(Q=0;t=M[U+Q++],a.head&&t&&a.length<65536&&(a.head.comment+=String.fromCharCode(t)),t&&Q<K;);if(512&a.flags&&(a.check=n(a.check,M,Q,U)),K-=Q,U+=Q,t)break e}else a.head&&(a.head.comment=null);a.mode=9;case 9:if(512&a.flags){for(;N<16;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(z!==(65535&a.check)){j.msg="header crc mismatch",a.mode=30;break}N=z=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),j.adler=a.check=0,a.mode=12;break;case 10:for(;N<32;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}j.adler=a.check=p(z),N=z=0,a.mode=11;case 11:if(a.havedict===0)return j.next_out=W,j.avail_out=X,j.next_in=U,j.avail_in=K,a.hold=z,a.bits=N,2;j.adler=a.check=1,a.mode=12;case 12:if(R===5||R===6)break e;case 13:if(a.last){z>>>=7&N,N-=7&N,a.mode=27;break}for(;N<3;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}switch(a.last=1&z,N-=1,3&(z>>>=1)){case 0:a.mode=14;break;case 1:if(V(a),a.mode=20,R!==6)break;z>>>=2,N-=2;break e;case 2:a.mode=17;break;case 3:j.msg="invalid block type",a.mode=30}z>>>=2,N-=2;break;case 14:for(z>>>=7&N,N-=7&N;N<32;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if((65535&z)!=(z>>>16^65535)){j.msg="invalid stored block lengths",a.mode=30;break}if(a.length=65535&z,N=z=0,a.mode=15,R===6)break e;case 15:a.mode=16;case 16:if(Q=a.length){if(K<Q&&(Q=K),X<Q&&(Q=X),Q===0)break e;i.arraySet(te,M,U,Q,W),K-=Q,U+=Q,X-=Q,W+=Q,a.length-=Q;break}a.mode=12;break;case 17:for(;N<14;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(a.nlen=257+(31&z),z>>>=5,N-=5,a.ndist=1+(31&z),z>>>=5,N-=5,a.ncode=4+(15&z),z>>>=4,N-=4,286<a.nlen||30<a.ndist){j.msg="too many length or distance symbols",a.mode=30;break}a.have=0,a.mode=18;case 18:for(;a.have<a.ncode;){for(;N<3;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}a.lens[$[a.have++]]=7&z,z>>>=3,N-=3}for(;a.have<19;)a.lens[$[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,A={bits:a.lenbits},H=h(0,a.lens,0,19,a.lencode,0,a.work,A),a.lenbits=A.bits,H){j.msg="invalid code lengths set",a.mode=30;break}a.have=0,a.mode=19;case 19:for(;a.have<a.nlen+a.ndist;){for(;ce=(w=a.lencode[z&(1<<a.lenbits)-1])>>>16&255,ge=65535&w,!((le=w>>>24)<=N);){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(ge<16)z>>>=le,N-=le,a.lens[a.have++]=ge;else{if(ge===16){for(y=le+2;N<y;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(z>>>=le,N-=le,a.have===0){j.msg="invalid bit length repeat",a.mode=30;break}t=a.lens[a.have-1],Q=3+(3&z),z>>>=2,N-=2}else if(ge===17){for(y=le+3;N<y;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}N-=le,t=0,Q=3+(7&(z>>>=le)),z>>>=3,N-=3}else{for(y=le+7;N<y;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}N-=le,t=0,Q=11+(127&(z>>>=le)),z>>>=7,N-=7}if(a.have+Q>a.nlen+a.ndist){j.msg="invalid bit length repeat",a.mode=30;break}for(;Q--;)a.lens[a.have++]=t}}if(a.mode===30)break;if(a.lens[256]===0){j.msg="invalid code -- missing end-of-block",a.mode=30;break}if(a.lenbits=9,A={bits:a.lenbits},H=h(f,a.lens,0,a.nlen,a.lencode,0,a.work,A),a.lenbits=A.bits,H){j.msg="invalid literal/lengths set",a.mode=30;break}if(a.distbits=6,a.distcode=a.distdyn,A={bits:a.distbits},H=h(x,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,A),a.distbits=A.bits,H){j.msg="invalid distances set",a.mode=30;break}if(a.mode=20,R===6)break e;case 20:a.mode=21;case 21:if(6<=K&&258<=X){j.next_out=W,j.avail_out=X,j.next_in=U,j.avail_in=K,a.hold=z,a.bits=N,l(j,G),W=j.next_out,te=j.output,X=j.avail_out,U=j.next_in,M=j.input,K=j.avail_in,z=a.hold,N=a.bits,a.mode===12&&(a.back=-1);break}for(a.back=0;ce=(w=a.lencode[z&(1<<a.lenbits)-1])>>>16&255,ge=65535&w,!((le=w>>>24)<=N);){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(ce&&(240&ce)==0){for(fe=le,we=ce,ze=ge;ce=(w=a.lencode[ze+((z&(1<<fe+we)-1)>>fe)])>>>16&255,ge=65535&w,!(fe+(le=w>>>24)<=N);){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}z>>>=fe,N-=fe,a.back+=fe}if(z>>>=le,N-=le,a.back+=le,a.length=ge,ce===0){a.mode=26;break}if(32&ce){a.back=-1,a.mode=12;break}if(64&ce){j.msg="invalid literal/length code",a.mode=30;break}a.extra=15&ce,a.mode=22;case 22:if(a.extra){for(y=a.extra;N<y;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}a.length+=z&(1<<a.extra)-1,z>>>=a.extra,N-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;ce=(w=a.distcode[z&(1<<a.distbits)-1])>>>16&255,ge=65535&w,!((le=w>>>24)<=N);){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if((240&ce)==0){for(fe=le,we=ce,ze=ge;ce=(w=a.distcode[ze+((z&(1<<fe+we)-1)>>fe)])>>>16&255,ge=65535&w,!(fe+(le=w>>>24)<=N);){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}z>>>=fe,N-=fe,a.back+=fe}if(z>>>=le,N-=le,a.back+=le,64&ce){j.msg="invalid distance code",a.mode=30;break}a.offset=ge,a.extra=15&ce,a.mode=24;case 24:if(a.extra){for(y=a.extra;N<y;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}a.offset+=z&(1<<a.extra)-1,z>>>=a.extra,N-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){j.msg="invalid distance too far back",a.mode=30;break}a.mode=25;case 25:if(X===0)break e;if(Q=G-X,a.offset>Q){if((Q=a.offset-Q)>a.whave&&a.sane){j.msg="invalid distance too far back",a.mode=30;break}ue=Q>a.wnext?(Q-=a.wnext,a.wsize-Q):a.wnext-Q,Q>a.length&&(Q=a.length),ie=a.window}else ie=te,ue=W-a.offset,Q=a.length;for(X<Q&&(Q=X),X-=Q,a.length-=Q;te[W++]=ie[ue++],--Q;);a.length===0&&(a.mode=21);break;case 26:if(X===0)break e;te[W++]=a.length,X--,a.mode=21;break;case 27:if(a.wrap){for(;N<32;){if(K===0)break e;K--,z|=M[U++]<<N,N+=8}if(G-=X,j.total_out+=G,a.total+=G,G&&(j.adler=a.check=a.flags?n(a.check,te,G,W-G):o(a.check,te,G,W-G)),G=X,(a.flags?z:p(z))!==a.check){j.msg="incorrect data check",a.mode=30;break}N=z=0}a.mode=28;case 28:if(a.wrap&&a.flags){for(;N<32;){if(K===0)break e;K--,z+=M[U++]<<N,N+=8}if(z!==(4294967295&a.total)){j.msg="incorrect length check",a.mode=30;break}N=z=0}a.mode=29;case 29:H=1;break e;case 30:H=-3;break e;case 31:return-4;case 32:default:return c}return j.next_out=W,j.avail_out=X,j.next_in=U,j.avail_in=K,a.hold=z,a.bits=N,(a.wsize||G!==j.avail_out&&a.mode<30&&(a.mode<27||R!==4))&&re(j,j.output,j.next_out,G-j.avail_out)?(a.mode=31,-4):(J-=j.avail_in,G-=j.avail_out,j.total_in+=J,j.total_out+=G,a.total+=G,a.wrap&&G&&(j.adler=a.check=a.flags?n(a.check,te,G,j.next_out-G):o(a.check,te,G,j.next_out-G)),j.data_type=a.bits+(a.last?64:0)+(a.mode===12?128:0)+(a.mode===20||a.mode===15?256:0),(J==0&&G===0||R===4)&&H===v&&(H=-5),H)},u.inflateEnd=function(j){if(!j||!j.state)return c;var R=j.state;return R.window&&(R.window=null),j.state=null,v},u.inflateGetHeader=function(j,R){var a;return j&&j.state?(2&(a=j.state).wrap)==0?c:((a.head=R).done=!1,v):c},u.inflateSetDictionary=function(j,R){var a,M=R.length;return j&&j.state?(a=j.state).wrap!==0&&a.mode!==11?c:a.mode===11&&o(1,R,M,0)!==a.check?-3:re(j,R,M,M)?(a.mode=31,-4):(a.havedict=1,v):c},u.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(r,m,u){var i=r("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],n=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],h=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];m.exports=function(f,x,v,c,b,d,g,p){var k,E,S,C,O,L,D,T,V,re=p.bits,j=0,R=0,a=0,M=0,te=0,U=0,W=0,K=0,X=0,z=0,N=null,J=0,G=new i.Buf16(16),Q=new i.Buf16(16),ue=null,ie=0;for(j=0;j<=15;j++)G[j]=0;for(R=0;R<c;R++)G[x[v+R]]++;for(te=re,M=15;1<=M&&G[M]===0;M--);if(M<te&&(te=M),M===0)return b[d++]=20971520,b[d++]=20971520,p.bits=1,0;for(a=1;a<M&&G[a]===0;a++);for(te<a&&(te=a),j=K=1;j<=15;j++)if(K<<=1,(K-=G[j])<0)return-1;if(0<K&&(f===0||M!==1))return-1;for(Q[1]=0,j=1;j<15;j++)Q[j+1]=Q[j]+G[j];for(R=0;R<c;R++)x[v+R]!==0&&(g[Q[x[v+R]]++]=R);if(L=f===0?(N=ue=g,19):f===1?(N=o,J-=257,ue=n,ie-=257,256):(N=l,ue=h,-1),j=a,O=d,W=R=z=0,S=-1,C=(X=1<<(U=te))-1,f===1&&852<X||f===2&&592<X)return 1;for(;;){for(D=j-W,V=g[R]<L?(T=0,g[R]):g[R]>L?(T=ue[ie+g[R]],N[J+g[R]]):(T=96,0),k=1<<j-W,a=E=1<<U;b[O+(z>>W)+(E-=k)]=D<<24|T<<16|V|0,E!==0;);for(k=1<<j-1;z&k;)k>>=1;if(k!==0?(z&=k-1,z+=k):z=0,R++,--G[j]==0){if(j===M)break;j=x[v+g[R]]}if(te<j&&(z&C)!==S){for(W===0&&(W=te),O+=a,K=1<<(U=j-W);U+W<M&&!((K-=G[U+W])<=0);)U++,K<<=1;if(X+=1<<U,f===1&&852<X||f===2&&592<X)return 1;b[S=z&C]=te<<24|U<<16|O-d|0}}return z!==0&&(b[O+z]=j-W<<24|64<<16|0),p.bits=te,0}},{"../utils/common":41}],51:[function(r,m,u){m.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(r,m,u){var i=r("../utils/common"),o=0,n=1;function l(w){for(var I=w.length;0<=--I;)w[I]=0}var h=0,f=29,x=256,v=x+1+f,c=30,b=19,d=2*v+1,g=15,p=16,k=7,E=256,S=16,C=17,O=18,L=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],D=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],re=new Array(2*(v+2));l(re);var j=new Array(2*c);l(j);var R=new Array(512);l(R);var a=new Array(256);l(a);var M=new Array(f);l(M);var te,U,W,K=new Array(c);function X(w,I,$,Z,P){this.static_tree=w,this.extra_bits=I,this.extra_base=$,this.elems=Z,this.max_length=P,this.has_stree=w&&w.length}function z(w,I){this.dyn_tree=w,this.max_code=0,this.stat_desc=I}function N(w){return w<256?R[w]:R[256+(w>>>7)]}function J(w,I){w.pending_buf[w.pending++]=255&I,w.pending_buf[w.pending++]=I>>>8&255}function G(w,I,$){w.bi_valid>p-$?(w.bi_buf|=I<<w.bi_valid&65535,J(w,w.bi_buf),w.bi_buf=I>>p-w.bi_valid,w.bi_valid+=$-p):(w.bi_buf|=I<<w.bi_valid&65535,w.bi_valid+=$)}function Q(w,I,$){G(w,$[2*I],$[2*I+1])}function ue(w,I){for(var $=0;$|=1&w,w>>>=1,$<<=1,0<--I;);return $>>>1}function ie(w,I,$){var Z,P,Y=new Array(g+1),F=0;for(Z=1;Z<=g;Z++)Y[Z]=F=F+$[Z-1]<<1;for(P=0;P<=I;P++){var B=w[2*P+1];B!==0&&(w[2*P]=ue(Y[B]++,B))}}function le(w){var I;for(I=0;I<v;I++)w.dyn_ltree[2*I]=0;for(I=0;I<c;I++)w.dyn_dtree[2*I]=0;for(I=0;I<b;I++)w.bl_tree[2*I]=0;w.dyn_ltree[2*E]=1,w.opt_len=w.static_len=0,w.last_lit=w.matches=0}function ce(w){8<w.bi_valid?J(w,w.bi_buf):0<w.bi_valid&&(w.pending_buf[w.pending++]=w.bi_buf),w.bi_buf=0,w.bi_valid=0}function ge(w,I,$,Z){var P=2*I,Y=2*$;return w[P]<w[Y]||w[P]===w[Y]&&Z[I]<=Z[$]}function fe(w,I,$){for(var Z=w.heap[$],P=$<<1;P<=w.heap_len&&(P<w.heap_len&&ge(I,w.heap[P+1],w.heap[P],w.depth)&&P++,!ge(I,Z,w.heap[P],w.depth));)w.heap[$]=w.heap[P],$=P,P<<=1;w.heap[$]=Z}function we(w,I,$){var Z,P,Y,F,B=0;if(w.last_lit!==0)for(;Z=w.pending_buf[w.d_buf+2*B]<<8|w.pending_buf[w.d_buf+2*B+1],P=w.pending_buf[w.l_buf+B],B++,Z===0?Q(w,P,I):(Q(w,(Y=a[P])+x+1,I),(F=L[Y])!==0&&G(w,P-=M[Y],F),Q(w,Y=N(--Z),$),(F=D[Y])!==0&&G(w,Z-=K[Y],F)),B<w.last_lit;);Q(w,E,I)}function ze(w,I){var $,Z,P,Y=I.dyn_tree,F=I.stat_desc.static_tree,B=I.stat_desc.has_stree,ee=I.stat_desc.elems,ae=-1;for(w.heap_len=0,w.heap_max=d,$=0;$<ee;$++)Y[2*$]!==0?(w.heap[++w.heap_len]=ae=$,w.depth[$]=0):Y[2*$+1]=0;for(;w.heap_len<2;)Y[2*(P=w.heap[++w.heap_len]=ae<2?++ae:0)]=1,w.depth[P]=0,w.opt_len--,B&&(w.static_len-=F[2*P+1]);for(I.max_code=ae,$=w.heap_len>>1;1<=$;$--)fe(w,Y,$);for(P=ee;$=w.heap[1],w.heap[1]=w.heap[w.heap_len--],fe(w,Y,1),Z=w.heap[1],w.heap[--w.heap_max]=$,w.heap[--w.heap_max]=Z,Y[2*P]=Y[2*$]+Y[2*Z],w.depth[P]=(w.depth[$]>=w.depth[Z]?w.depth[$]:w.depth[Z])+1,Y[2*$+1]=Y[2*Z+1]=P,w.heap[1]=P++,fe(w,Y,1),2<=w.heap_len;);w.heap[--w.heap_max]=w.heap[1],(function(se,xe){var Ee,_e,Le,ye,st,jt,Ce=xe.dyn_tree,Er=xe.max_code,vo=xe.stat_desc.static_tree,xo=xe.stat_desc.has_stree,wo=xe.stat_desc.extra_bits,Sr=xe.stat_desc.extra_base,Ke=xe.stat_desc.max_length,lt=0;for(ye=0;ye<=g;ye++)se.bl_count[ye]=0;for(Ce[2*se.heap[se.heap_max]+1]=0,Ee=se.heap_max+1;Ee<d;Ee++)Ke<(ye=Ce[2*Ce[2*(_e=se.heap[Ee])+1]+1]+1)&&(ye=Ke,lt++),Ce[2*_e+1]=ye,Er<_e||(se.bl_count[ye]++,st=0,Sr<=_e&&(st=wo[_e-Sr]),jt=Ce[2*_e],se.opt_len+=jt*(ye+st),xo&&(se.static_len+=jt*(vo[2*_e+1]+st)));if(lt!==0){do{for(ye=Ke-1;se.bl_count[ye]===0;)ye--;se.bl_count[ye]--,se.bl_count[ye+1]+=2,se.bl_count[Ke]--,lt-=2}while(0<lt);for(ye=Ke;ye!==0;ye--)for(_e=se.bl_count[ye];_e!==0;)Er<(Le=se.heap[--Ee])||(Ce[2*Le+1]!==ye&&(se.opt_len+=(ye-Ce[2*Le+1])*Ce[2*Le],Ce[2*Le+1]=ye),_e--)}})(w,I),ie(Y,ae,w.bl_count)}function t(w,I,$){var Z,P,Y=-1,F=I[1],B=0,ee=7,ae=4;for(F===0&&(ee=138,ae=3),I[2*($+1)+1]=65535,Z=0;Z<=$;Z++)P=F,F=I[2*(Z+1)+1],++B<ee&&P===F||(B<ae?w.bl_tree[2*P]+=B:P!==0?(P!==Y&&w.bl_tree[2*P]++,w.bl_tree[2*S]++):B<=10?w.bl_tree[2*C]++:w.bl_tree[2*O]++,Y=P,ae=(B=0)===F?(ee=138,3):P===F?(ee=6,3):(ee=7,4))}function H(w,I,$){var Z,P,Y=-1,F=I[1],B=0,ee=7,ae=4;for(F===0&&(ee=138,ae=3),Z=0;Z<=$;Z++)if(P=F,F=I[2*(Z+1)+1],!(++B<ee&&P===F)){if(B<ae)for(;Q(w,P,w.bl_tree),--B!=0;);else P!==0?(P!==Y&&(Q(w,P,w.bl_tree),B--),Q(w,S,w.bl_tree),G(w,B-3,2)):B<=10?(Q(w,C,w.bl_tree),G(w,B-3,3)):(Q(w,O,w.bl_tree),G(w,B-11,7));Y=P,ae=(B=0)===F?(ee=138,3):P===F?(ee=6,3):(ee=7,4)}}l(K);var A=!1;function y(w,I,$,Z){G(w,(h<<1)+(Z?1:0),3),(function(P,Y,F,B){ce(P),J(P,F),J(P,~F),i.arraySet(P.pending_buf,P.window,Y,F,P.pending),P.pending+=F})(w,I,$)}u._tr_init=function(w){A||((function(){var I,$,Z,P,Y,F=new Array(g+1);for(P=Z=0;P<f-1;P++)for(M[P]=Z,I=0;I<1<<L[P];I++)a[Z++]=P;for(a[Z-1]=P,P=Y=0;P<16;P++)for(K[P]=Y,I=0;I<1<<D[P];I++)R[Y++]=P;for(Y>>=7;P<c;P++)for(K[P]=Y<<7,I=0;I<1<<D[P]-7;I++)R[256+Y++]=P;for($=0;$<=g;$++)F[$]=0;for(I=0;I<=143;)re[2*I+1]=8,I++,F[8]++;for(;I<=255;)re[2*I+1]=9,I++,F[9]++;for(;I<=279;)re[2*I+1]=7,I++,F[7]++;for(;I<=287;)re[2*I+1]=8,I++,F[8]++;for(ie(re,v+1,F),I=0;I<c;I++)j[2*I+1]=5,j[2*I]=ue(I,5);te=new X(re,L,x+1,v,g),U=new X(j,D,0,c,g),W=new X(new Array(0),T,0,b,k)})(),A=!0),w.l_desc=new z(w.dyn_ltree,te),w.d_desc=new z(w.dyn_dtree,U),w.bl_desc=new z(w.bl_tree,W),w.bi_buf=0,w.bi_valid=0,le(w)},u._tr_stored_block=y,u._tr_flush_block=function(w,I,$,Z){var P,Y,F=0;0<w.level?(w.strm.data_type===2&&(w.strm.data_type=(function(B){var ee,ae=4093624447;for(ee=0;ee<=31;ee++,ae>>>=1)if(1&ae&&B.dyn_ltree[2*ee]!==0)return o;if(B.dyn_ltree[18]!==0||B.dyn_ltree[20]!==0||B.dyn_ltree[26]!==0)return n;for(ee=32;ee<x;ee++)if(B.dyn_ltree[2*ee]!==0)return n;return o})(w)),ze(w,w.l_desc),ze(w,w.d_desc),F=(function(B){var ee;for(t(B,B.dyn_ltree,B.l_desc.max_code),t(B,B.dyn_dtree,B.d_desc.max_code),ze(B,B.bl_desc),ee=b-1;3<=ee&&B.bl_tree[2*V[ee]+1]===0;ee--);return B.opt_len+=3*(ee+1)+5+5+4,ee})(w),P=w.opt_len+3+7>>>3,(Y=w.static_len+3+7>>>3)<=P&&(P=Y)):P=Y=$+5,$+4<=P&&I!==-1?y(w,I,$,Z):w.strategy===4||Y===P?(G(w,2+(Z?1:0),3),we(w,re,j)):(G(w,4+(Z?1:0),3),(function(B,ee,ae,se){var xe;for(G(B,ee-257,5),G(B,ae-1,5),G(B,se-4,4),xe=0;xe<se;xe++)G(B,B.bl_tree[2*V[xe]+1],3);H(B,B.dyn_ltree,ee-1),H(B,B.dyn_dtree,ae-1)})(w,w.l_desc.max_code+1,w.d_desc.max_code+1,F+1),we(w,w.dyn_ltree,w.dyn_dtree)),le(w),Z&&ce(w)},u._tr_tally=function(w,I,$){return w.pending_buf[w.d_buf+2*w.last_lit]=I>>>8&255,w.pending_buf[w.d_buf+2*w.last_lit+1]=255&I,w.pending_buf[w.l_buf+w.last_lit]=255&$,w.last_lit++,I===0?w.dyn_ltree[2*$]++:(w.matches++,I--,w.dyn_ltree[2*(a[$]+x+1)]++,w.dyn_dtree[2*N(I)]++),w.last_lit===w.lit_bufsize-1},u._tr_align=function(w){G(w,2,3),Q(w,E,re),(function(I){I.bi_valid===16?(J(I,I.bi_buf),I.bi_buf=0,I.bi_valid=0):8<=I.bi_valid&&(I.pending_buf[I.pending++]=255&I.bi_buf,I.bi_buf>>=8,I.bi_valid-=8)})(w)}},{"../utils/common":41}],53:[function(r,m,u){m.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(r,m,u){(function(i){(function(o,n){if(!o.setImmediate){var l,h,f,x,v=1,c={},b=!1,d=o.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(o);g=g&&g.setTimeout?g:o,l={}.toString.call(o.process)==="[object process]"?function(S){process.nextTick(function(){k(S)})}:(function(){if(o.postMessage&&!o.importScripts){var S=!0,C=o.onmessage;return o.onmessage=function(){S=!1},o.postMessage("","*"),o.onmessage=C,S}})()?(x="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",E,!1):o.attachEvent("onmessage",E),function(S){o.postMessage(x+S,"*")}):o.MessageChannel?((f=new MessageChannel).port1.onmessage=function(S){k(S.data)},function(S){f.port2.postMessage(S)}):d&&"onreadystatechange"in d.createElement("script")?(h=d.documentElement,function(S){var C=d.createElement("script");C.onreadystatechange=function(){k(S),C.onreadystatechange=null,h.removeChild(C),C=null},h.appendChild(C)}):function(S){setTimeout(k,0,S)},g.setImmediate=function(S){typeof S!="function"&&(S=new Function(""+S));for(var C=new Array(arguments.length-1),O=0;O<C.length;O++)C[O]=arguments[O+1];var L={callback:S,args:C};return c[v]=L,l(v),v++},g.clearImmediate=p}function p(S){delete c[S]}function k(S){if(b)setTimeout(k,0,S);else{var C=c[S];if(C){b=!0;try{(function(O){var L=O.callback,D=O.args;switch(D.length){case 0:L();break;case 1:L(D[0]);break;case 2:L(D[0],D[1]);break;case 3:L(D[0],D[1],D[2]);break;default:L.apply(n,D)}})(C)}finally{p(S),b=!1}}}}function E(S){S.source===o&&typeof S.data=="string"&&S.data.indexOf(x)===0&&k(+S.data.slice(x.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof Ae<"u"?Ae:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ct)),ct.exports}var Tr=Ir();const Or=Ar(Tr);var qe={exports:{}},Dr=qe.exports,St;function Lr(){return St||(St=1,(function(e,_){(function(r,m){m()})(Dr,function(){function r(h,f){return typeof f>"u"?f={autoBom:!1}:typeof f!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),f={autoBom:!f}),f.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob(["\uFEFF",h],{type:h.type}):h}function m(h,f,x){var v=new XMLHttpRequest;v.open("GET",h),v.responseType="blob",v.onload=function(){l(v.response,f,x)},v.onerror=function(){console.error("could not download file")},v.send()}function u(h){var f=new XMLHttpRequest;f.open("HEAD",h,!1);try{f.send()}catch{}return 200<=f.status&&299>=f.status}function i(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var f=document.createEvent("MouseEvents");f.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(f)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ae=="object"&&Ae.global===Ae?Ae:void 0,n=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!n?function(h,f,x){var v=o.URL||o.webkitURL,c=document.createElement("a");f=f||h.name||"download",c.download=f,c.rel="noopener",typeof h=="string"?(c.href=h,c.origin===location.origin?i(c):u(c.href)?m(h,f,x):i(c,c.target="_blank")):(c.href=v.createObjectURL(h),setTimeout(function(){v.revokeObjectURL(c.href)},4e4),setTimeout(function(){i(c)},0))}:"msSaveOrOpenBlob"in navigator?function(h,f,x){if(f=f||h.name||"download",typeof h!="string")navigator.msSaveOrOpenBlob(r(h,x),f);else if(u(h))m(h,f,x);else{var v=document.createElement("a");v.href=h,v.target="_blank",setTimeout(function(){i(v)})}}:function(h,f,x,v){if(v=v||open("","_blank"),v&&(v.document.title=v.document.body.innerText="downloading..."),typeof h=="string")return m(h,f,x);var c=h.type==="application/octet-stream",b=/constructor/i.test(o.HTMLElement)||o.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent);if((d||c&&b||n)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var E=g.result;E=d?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),v?v.location.href=E:location=E,v=null},g.readAsDataURL(h)}else{var p=o.URL||o.webkitURL,k=p.createObjectURL(h);v?v.location=k:location.href=k,v=null,setTimeout(function(){p.revokeObjectURL(k)},4e4)}});o.saveAs=l.saveAs=l,e.exports=l})})(qe)),qe.exports}var Nt=Lr();const Ct=async(e,_)=>{const r=new Or,m=r.folder("config");m==null||m.file("site.json",JSON.stringify(e.site,null,2)),m==null||m.file("theme.json",JSON.stringify(e.theme,null,2)),m==null||m.file("menu.json",JSON.stringify(e.menu,null,2));const u=r.folder("pages");u==null||u.file(`${_}.json`,JSON.stringify(e.page,null,2));const i=await r.generateAsync({type:"blob"});Nt.saveAs(i,`jsonpages-project-${_}-${Date.now()}.zip`)},At=(e,_,r)=>{const{pages:m,...u}=e.site,i={page:e.page,site:u,menu:e.menu,theme:e.theme},n=`<script id="jp-baked-state" type="application/json">${JSON.stringify(i)}<\/script>`,l=r.replace("</head>",`${n}</head>`),h=new Blob([`<!DOCTYPE html>${l}`],{type:"text/html;charset=utf-8"});Nt.saveAs(h,`${_}.html`)};function It(e){var _,r,m="";if(typeof e=="string"||typeof e=="number")m+=e;else if(typeof e=="object")if(Array.isArray(e)){var u=e.length;for(_=0;_<u;_++)e[_]&&(r=It(e[_]))&&(m&&(m+=" "),m+=r)}else for(r in e)e[r]&&(m&&(m+=" "),m+=r);return m}function Pr(){for(var e,_,r=0,m="",u=arguments.length;r<u;r++)(e=arguments[r])&&(_=It(e))&&(m&&(m+=" "),m+=_);return m}const Fr=(e,_)=>{const r=new Array(e.length+_.length);for(let m=0;m<e.length;m++)r[m]=e[m];for(let m=0;m<_.length;m++)r[e.length+m]=_[m];return r},Rr=(e,_)=>({classGroupId:e,validator:_}),Tt=(e=new Map,_=null,r)=>({nextPart:e,validators:_,classGroupId:r}),Ye="-",Ot=[],Mr="arbitrary..",Br=e=>{const _=Wr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:m}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Ur(o);const n=o.split(Ye),l=n[0]===""&&n.length>1?1:0;return Dt(n,l,_)},getConflictingClassGroupIds:(o,n)=>{if(n){const l=m[o],h=r[o];return l?h?Fr(h,l):l:h||Ot}return r[o]||Ot}}},Dt=(e,_,r)=>{if(e.length-_===0)return r.classGroupId;const u=e[_],i=r.nextPart.get(u);if(i){const h=Dt(e,_+1,i);if(h)return h}const o=r.validators;if(o===null)return;const n=_===0?e.join(Ye):e.slice(_).join(Ye),l=o.length;for(let h=0;h<l;h++){const f=o[h];if(f.validator(n))return f.classGroupId}},Ur=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const _=e.slice(1,-1),r=_.indexOf(":"),m=_.slice(0,r);return m?Mr+m:void 0})(),Wr=e=>{const{theme:_,classGroups:r}=e;return $r(r,_)},$r=(e,_)=>{const r=Tt();for(const m in e){const u=e[m];dt(u,r,m,_)}return r},dt=(e,_,r,m)=>{const u=e.length;for(let i=0;i<u;i++){const o=e[i];Zr(o,_,r,m)}},Zr=(e,_,r,m)=>{if(typeof e=="string"){Hr(e,_,r);return}if(typeof e=="function"){Gr(e,_,r,m);return}Vr(e,_,r,m)},Hr=(e,_,r)=>{const m=e===""?_:Lt(_,e);m.classGroupId=r},Gr=(e,_,r,m)=>{if(Kr(e)){dt(e(m),_,r,m);return}_.validators===null&&(_.validators=[]),_.validators.push(Rr(r,e))},Vr=(e,_,r,m)=>{const u=Object.entries(e),i=u.length;for(let o=0;o<i;o++){const[n,l]=u[o];dt(l,Lt(_,n),r,m)}},Lt=(e,_)=>{let r=e;const m=_.split(Ye),u=m.length;for(let i=0;i<u;i++){const o=m[i];let n=r.nextPart.get(o);n||(n=Tt(),r.nextPart.set(o,n)),r=n}return r},Kr=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Jr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let _=0,r=Object.create(null),m=Object.create(null);const u=(i,o)=>{r[i]=o,_++,_>e&&(_=0,m=r,r=Object.create(null))};return{get(i){let o=r[i];if(o!==void 0)return o;if((o=m[i])!==void 0)return u(i,o),o},set(i,o){i in r?r[i]=o:u(i,o)}}},ut="!",Pt=":",qr=[],Ft=(e,_,r,m,u)=>({modifiers:e,hasImportantModifier:_,baseClassName:r,maybePostfixModifierPosition:m,isExternal:u}),Yr=e=>{const{prefix:_,experimentalParseClassName:r}=e;let m=u=>{const i=[];let o=0,n=0,l=0,h;const f=u.length;for(let d=0;d<f;d++){const g=u[d];if(o===0&&n===0){if(g===Pt){i.push(u.slice(l,d)),l=d+1;continue}if(g==="/"){h=d;continue}}g==="["?o++:g==="]"?o--:g==="("?n++:g===")"&&n--}const x=i.length===0?u:u.slice(l);let v=x,c=!1;x.endsWith(ut)?(v=x.slice(0,-1),c=!0):x.startsWith(ut)&&(v=x.slice(1),c=!0);const b=h&&h>l?h-l:void 0;return Ft(i,c,v,b)};if(_){const u=_+Pt,i=m;m=o=>o.startsWith(u)?i(o.slice(u.length)):Ft(qr,!1,o,void 0,!0)}if(r){const u=m;m=i=>r({className:i,parseClassName:u})}return m},Xr=e=>{const _=new Map;return e.orderSensitiveModifiers.forEach((r,m)=>{_.set(r,1e6+m)}),r=>{const m=[];let u=[];for(let i=0;i<r.length;i++){const o=r[i],n=o[0]==="[",l=_.has(o);n||l?(u.length>0&&(u.sort(),m.push(...u),u=[]),m.push(o)):u.push(o)}return u.length>0&&(u.sort(),m.push(...u)),m}},Qr=e=>({cache:Jr(e.cacheSize),parseClassName:Yr(e),sortModifiers:Xr(e),...Br(e)}),en=/\s+/,tn=(e,_)=>{const{parseClassName:r,getClassGroupId:m,getConflictingClassGroupIds:u,sortModifiers:i}=_,o=[],n=e.trim().split(en);let l="";for(let h=n.length-1;h>=0;h-=1){const f=n[h],{isExternal:x,modifiers:v,hasImportantModifier:c,baseClassName:b,maybePostfixModifierPosition:d}=r(f);if(x){l=f+(l.length>0?" "+l:l);continue}let g=!!d,p=m(g?b.substring(0,d):b);if(!p){if(!g){l=f+(l.length>0?" "+l:l);continue}if(p=m(b),!p){l=f+(l.length>0?" "+l:l);continue}g=!1}const k=v.length===0?"":v.length===1?v[0]:i(v).join(":"),E=c?k+ut:k,S=E+p;if(o.indexOf(S)>-1)continue;o.push(S);const C=u(p,g);for(let O=0;O<C.length;++O){const L=C[O];o.push(E+L)}l=f+(l.length>0?" "+l:l)}return l},rn=(...e)=>{let _=0,r,m,u="";for(;_<e.length;)(r=e[_++])&&(m=Rt(r))&&(u&&(u+=" "),u+=m);return u},Rt=e=>{if(typeof e=="string")return e;let _,r="";for(let m=0;m<e.length;m++)e[m]&&(_=Rt(e[m]))&&(r&&(r+=" "),r+=_);return r},nn=(e,..._)=>{let r,m,u,i;const o=l=>{const h=_.reduce((f,x)=>x(f),e());return r=Qr(h),m=r.cache.get,u=r.cache.set,i=n,n(l)},n=l=>{const h=m(l);if(h)return h;const f=tn(l,r);return u(l,f),f};return i=o,(...l)=>i(rn(...l))},on=[],ke=e=>{const _=r=>r[e]||on;return _.isThemeGetter=!0,_},Mt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Bt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,an=/^\d+\/\d+$/,sn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ln=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,dn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,un=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pe=e=>an.test(e),de=e=>!!e&&!Number.isNaN(Number(e)),Ie=e=>!!e&&Number.isInteger(Number(e)),ht=e=>e.endsWith("%")&&de(e.slice(0,-1)),Ne=e=>sn.test(e),hn=()=>!0,pn=e=>ln.test(e)&&!cn.test(e),Ut=()=>!1,fn=e=>dn.test(e),mn=e=>un.test(e),bn=e=>!ne(e)&&!oe(e),gn=e=>Fe(e,Gt,Ut),ne=e=>Mt.test(e),Te=e=>Fe(e,Vt,pn),pt=e=>Fe(e,kn,de),Wt=e=>Fe(e,Zt,Ut),vn=e=>Fe(e,Ht,mn),Xe=e=>Fe(e,Kt,fn),oe=e=>Bt.test(e),Ue=e=>Re(e,Vt),xn=e=>Re(e,_n),$t=e=>Re(e,Zt),wn=e=>Re(e,Gt),yn=e=>Re(e,Ht),Qe=e=>Re(e,Kt,!0),Fe=(e,_,r)=>{const m=Mt.exec(e);return m?m[1]?_(m[1]):r(m[2]):!1},Re=(e,_,r=!1)=>{const m=Bt.exec(e);return m?m[1]?_(m[1]):r:!1},Zt=e=>e==="position"||e==="percentage",Ht=e=>e==="image"||e==="url",Gt=e=>e==="length"||e==="size"||e==="bg-size",Vt=e=>e==="length",kn=e=>e==="number",_n=e=>e==="family-name",Kt=e=>e==="shadow",zn=nn(()=>{const e=ke("color"),_=ke("font"),r=ke("text"),m=ke("font-weight"),u=ke("tracking"),i=ke("leading"),o=ke("breakpoint"),n=ke("container"),l=ke("spacing"),h=ke("radius"),f=ke("shadow"),x=ke("inset-shadow"),v=ke("text-shadow"),c=ke("drop-shadow"),b=ke("blur"),d=ke("perspective"),g=ke("aspect"),p=ke("ease"),k=ke("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),oe,ne],O=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],D=()=>[oe,ne,l],T=()=>[Pe,"full","auto",...D()],V=()=>[Ie,"none","subgrid",oe,ne],re=()=>["auto",{span:["full",Ie,oe,ne]},Ie,oe,ne],j=()=>[Ie,"auto",oe,ne],R=()=>["auto","min","max","fr",oe,ne],a=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],M=()=>["start","end","center","stretch","center-safe","end-safe"],te=()=>["auto",...D()],U=()=>[Pe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],W=()=>[e,oe,ne],K=()=>[...S(),$t,Wt,{position:[oe,ne]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",wn,gn,{size:[oe,ne]}],N=()=>[ht,Ue,Te],J=()=>["","none","full",h,oe,ne],G=()=>["",de,Ue,Te],Q=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[de,ht,$t,Wt],le=()=>["","none",b,oe,ne],ce=()=>["none",de,oe,ne],ge=()=>["none",de,oe,ne],fe=()=>[de,oe,ne],we=()=>[Pe,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ne],breakpoint:[Ne],color:[hn],container:[Ne],"drop-shadow":[Ne],ease:["in","out","in-out"],font:[bn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ne],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ne],shadow:[Ne],spacing:["px",de],text:[Ne],"text-shadow":[Ne],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pe,ne,oe,g]}],container:["container"],columns:[{columns:[de,ne,oe,n]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[Ie,"auto",oe,ne]}],basis:[{basis:[Pe,"full","auto",n,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[de,Pe,"auto","initial","none",ne]}],grow:[{grow:["",de,oe,ne]}],shrink:[{shrink:["",de,oe,ne]}],order:[{order:[Ie,"first","last","none",oe,ne]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...a(),"normal"]}],"justify-items":[{"justify-items":[...M(),"normal"]}],"justify-self":[{"justify-self":["auto",...M()]}],"align-content":[{content:["normal",...a()]}],"align-items":[{items:[...M(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...M(),{baseline:["","last"]}]}],"place-content":[{"place-content":a()}],"place-items":[{"place-items":[...M(),"baseline"]}],"place-self":[{"place-self":["auto",...M()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:te()}],mx:[{mx:te()}],my:[{my:te()}],ms:[{ms:te()}],me:[{me:te()}],mt:[{mt:te()}],mr:[{mr:te()}],mb:[{mb:te()}],ml:[{ml:te()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[n,"screen",...U()]}],"min-w":[{"min-w":[n,"screen","none",...U()]}],"max-w":[{"max-w":[n,"screen","none","prose",{screen:[o]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",r,Ue,Te]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[m,oe,pt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ht,ne]}],"font-family":[{font:[xn,ne,_]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,oe,ne]}],"line-clamp":[{"line-clamp":[de,"none",oe,pt]}],leading:[{leading:[i,...D()]}],"list-image":[{"list-image":["none",oe,ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[de,"from-font","auto",oe,Te]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[de,"auto",oe,ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe,ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",oe,ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:K()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ie,oe,ne],radial:["",oe,ne],conic:[Ie,oe,ne]},yn,vn]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:J()}],"rounded-s":[{"rounded-s":J()}],"rounded-e":[{"rounded-e":J()}],"rounded-t":[{"rounded-t":J()}],"rounded-r":[{"rounded-r":J()}],"rounded-b":[{"rounded-b":J()}],"rounded-l":[{"rounded-l":J()}],"rounded-ss":[{"rounded-ss":J()}],"rounded-se":[{"rounded-se":J()}],"rounded-ee":[{"rounded-ee":J()}],"rounded-es":[{"rounded-es":J()}],"rounded-tl":[{"rounded-tl":J()}],"rounded-tr":[{"rounded-tr":J()}],"rounded-br":[{"rounded-br":J()}],"rounded-bl":[{"rounded-bl":J()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[de,oe,ne]}],"outline-w":[{outline:["",de,Ue,Te]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",f,Qe,Xe]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",x,Qe,Xe]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[de,Te]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",v,Qe,Xe]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[de,oe,ne]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[de]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[oe,ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[de]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:K()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,ne]}],filter:[{filter:["","none",oe,ne]}],blur:[{blur:le()}],brightness:[{brightness:[de,oe,ne]}],contrast:[{contrast:[de,oe,ne]}],"drop-shadow":[{"drop-shadow":["","none",c,Qe,Xe]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",de,oe,ne]}],"hue-rotate":[{"hue-rotate":[de,oe,ne]}],invert:[{invert:["",de,oe,ne]}],saturate:[{saturate:[de,oe,ne]}],sepia:[{sepia:["",de,oe,ne]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,ne]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[de,oe,ne]}],"backdrop-contrast":[{"backdrop-contrast":[de,oe,ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",de,oe,ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[de,oe,ne]}],"backdrop-invert":[{"backdrop-invert":["",de,oe,ne]}],"backdrop-opacity":[{"backdrop-opacity":[de,oe,ne]}],"backdrop-saturate":[{"backdrop-saturate":[de,oe,ne]}],"backdrop-sepia":[{"backdrop-sepia":["",de,oe,ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",oe,ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[de,"initial",oe,ne]}],ease:[{ease:["linear","initial",p,oe,ne]}],delay:[{delay:[de,oe,ne]}],animate:[{animate:["none",k,oe,ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[d,oe,ne]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[oe,ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:we()}],"translate-x":[{"translate-x":we()}],"translate-y":[{"translate-y":we()}],"translate-z":[{"translate-z":we()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",oe,ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",oe,ne]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[de,Ue,Te,pt]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function he(...e){return zn(Pr(e))}var et={exports:{}},We={};/**
|
|
11
|
+
*/var fn;function Qi(){return fn||(fn=1,(function(e,r){(function(t){e.exports=t()})(function(){return(function t(n,s,i){function a(d,u){if(!s[d]){if(!n[d]){var v=typeof Pt=="function"&&Pt;if(!u&&v)return v(d,!0);if(o)return o(d,!0);var x=new Error("Cannot find module '"+d+"'");throw x.code="MODULE_NOT_FOUND",x}var f=s[d]={exports:{}};n[d][0].call(f.exports,function(w){var c=n[d][1][w];return a(c||w)},f,f.exports,t,n,s,i)}return s[d].exports}for(var o=typeof Pt=="function"&&Pt,l=0;l<i.length;l++)a(i[l]);return a})({1:[function(t,n,s){var i=t("./utils"),a=t("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(l){for(var d,u,v,x,f,w,c,b=[],g=0,y=l.length,k=y,_=i.getTypeOf(l)!=="string";g<l.length;)k=y-g,v=_?(d=l[g++],u=g<y?l[g++]:0,g<y?l[g++]:0):(d=l.charCodeAt(g++),u=g<y?l.charCodeAt(g++):0,g<y?l.charCodeAt(g++):0),x=d>>2,f=(3&d)<<4|u>>4,w=1<k?(15&u)<<2|v>>6:64,c=2<k?63&v:64,b.push(o.charAt(x)+o.charAt(f)+o.charAt(w)+o.charAt(c));return b.join("")},s.decode=function(l){var d,u,v,x,f,w,c=0,b=0,g="data:";if(l.substr(0,g.length)===g)throw new Error("Invalid base64 input, it looks like a data url.");var y,k=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===o.charAt(64)&&k--,l.charAt(l.length-2)===o.charAt(64)&&k--,k%1!=0)throw new Error("Invalid base64 input, bad content length.");for(y=a.uint8array?new Uint8Array(0|k):new Array(0|k);c<l.length;)d=o.indexOf(l.charAt(c++))<<2|(x=o.indexOf(l.charAt(c++)))>>4,u=(15&x)<<4|(f=o.indexOf(l.charAt(c++)))>>2,v=(3&f)<<6|(w=o.indexOf(l.charAt(c++))),y[b++]=d,f!==64&&(y[b++]=u),w!==64&&(y[b++]=v);return y}},{"./support":30,"./utils":32}],2:[function(t,n,s){var i=t("./external"),a=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),l=t("./stream/DataLengthProbe");function d(u,v,x,f,w){this.compressedSize=u,this.uncompressedSize=v,this.crc32=x,this.compression=f,this.compressedContent=w}d.prototype={getContentWorker:function(){var u=new a(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),v=this;return u.on("end",function(){if(this.streamInfo.data_length!==v.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new a(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},d.createWorkerFrom=function(u,v,x){return u.pipe(new o).pipe(new l("uncompressedSize")).pipe(v.compressWorker(x)).pipe(new l("compressedSize")).withStreamInfo("compression",v)},n.exports=d},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,n,s){var i=t("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},s.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,n,s){var i=t("./utils"),a=(function(){for(var o,l=[],d=0;d<256;d++){o=d;for(var u=0;u<8;u++)o=1&o?3988292384^o>>>1:o>>>1;l[d]=o}return l})();n.exports=function(o,l){return o!==void 0&&o.length?i.getTypeOf(o)!=="string"?(function(d,u,v,x){var f=a,w=x+v;d^=-1;for(var c=x;c<w;c++)d=d>>>8^f[255&(d^u[c])];return-1^d})(0|l,o,o.length,0):(function(d,u,v,x){var f=a,w=x+v;d^=-1;for(var c=x;c<w;c++)d=d>>>8^f[255&(d^u.charCodeAt(c))];return-1^d})(0|l,o,o.length,0):0}},{"./utils":32}],5:[function(t,n,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(t,n,s){var i=null;i=typeof Promise<"u"?Promise:t("lie"),n.exports={Promise:i}},{lie:37}],7:[function(t,n,s){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=t("pako"),o=t("./utils"),l=t("./stream/GenericWorker"),d=i?"uint8array":"array";function u(v,x){l.call(this,"FlateWorker/"+v),this._pako=null,this._pakoAction=v,this._pakoOptions=x,this.meta={}}s.magic="\b\0",o.inherits(u,l),u.prototype.processChunk=function(v){this.meta=v.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(d,v.data),!1)},u.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var v=this;this._pako.onData=function(x){v.push({data:x,meta:v.meta})}},s.compressWorker=function(v){return new u("Deflate",v)},s.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,n,s){function i(f,w){var c,b="";for(c=0;c<w;c++)b+=String.fromCharCode(255&f),f>>>=8;return b}function a(f,w,c,b,g,y){var k,_,S=f.file,I=f.compression,A=y!==d.utf8encode,T=o.transformTo("string",y(S.name)),R=o.transformTo("string",d.utf8encode(S.name)),U=S.comment,X=o.transformTo("string",y(U)),z=o.transformTo("string",d.utf8encode(U)),L=R.length!==S.name.length,p=z.length!==U.length,B="",G="",F="",M=S.dir,W=S.date,oe={crc32:0,compressedSize:0,uncompressedSize:0};w&&!c||(oe.crc32=f.crc32,oe.compressedSize=f.compressedSize,oe.uncompressedSize=f.uncompressedSize);var E=0;w&&(E|=8),A||!L&&!p||(E|=2048);var O=0,Y=0;M&&(O|=16),g==="UNIX"?(Y=798,O|=(function(re,pe){var ee=re;return re||(ee=pe?16893:33204),(65535&ee)<<16})(S.unixPermissions,M)):(Y=20,O|=(function(re){return 63&(re||0)})(S.dosPermissions)),k=W.getUTCHours(),k<<=6,k|=W.getUTCMinutes(),k<<=5,k|=W.getUTCSeconds()/2,_=W.getUTCFullYear()-1980,_<<=4,_|=W.getUTCMonth()+1,_<<=5,_|=W.getUTCDate(),L&&(G=i(1,1)+i(u(T),4)+R,B+="up"+i(G.length,2)+G),p&&(F=i(1,1)+i(u(X),4)+z,B+="uc"+i(F.length,2)+F);var V="";return V+=`
|
|
12
|
+
\0`,V+=i(E,2),V+=I.magic,V+=i(k,2),V+=i(_,2),V+=i(oe.crc32,4),V+=i(oe.compressedSize,4),V+=i(oe.uncompressedSize,4),V+=i(T.length,2),V+=i(B.length,2),{fileRecord:v.LOCAL_FILE_HEADER+V+T+B,dirRecord:v.CENTRAL_FILE_HEADER+i(Y,2)+V+i(X.length,2)+"\0\0\0\0"+i(O,4)+i(b,4)+T+B+X}}var o=t("../utils"),l=t("../stream/GenericWorker"),d=t("../utf8"),u=t("../crc32"),v=t("../signature");function x(f,w,c,b){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=w,this.zipPlatform=c,this.encodeFileName=b,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(x,l),x.prototype.push=function(f){var w=f.meta.percent||0,c=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,l.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:c?(w+100*(c-b-1))/c:100}}))},x.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var w=this.streamFiles&&!f.file.dir;if(w){var c=a(f,w,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:c.fileRecord,meta:{percent:0}})}else this.accumulate=!0},x.prototype.closedSource=function(f){this.accumulate=!1;var w=this.streamFiles&&!f.file.dir,c=a(f,w,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(c.dirRecord),w)this.push({data:(function(b){return v.DATA_DESCRIPTOR+i(b.crc32,4)+i(b.compressedSize,4)+i(b.uncompressedSize,4)})(f),meta:{percent:100}});else for(this.push({data:c.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},x.prototype.flush=function(){for(var f=this.bytesWritten,w=0;w<this.dirRecords.length;w++)this.push({data:this.dirRecords[w],meta:{percent:100}});var c=this.bytesWritten-f,b=(function(g,y,k,_,S){var I=o.transformTo("string",S(_));return v.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(g,2)+i(g,2)+i(y,4)+i(k,4)+i(I.length,2)+I})(this.dirRecords.length,c,f,this.zipComment,this.encodeFileName);this.push({data:b,meta:{percent:100}})},x.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},x.prototype.registerPrevious=function(f){this._sources.push(f);var w=this;return f.on("data",function(c){w.processChunk(c)}),f.on("end",function(){w.closedSource(w.previous.streamInfo),w._sources.length?w.prepareNextSource():w.end()}),f.on("error",function(c){w.error(c)}),this},x.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},x.prototype.error=function(f){var w=this._sources;if(!l.prototype.error.call(this,f))return!1;for(var c=0;c<w.length;c++)try{w[c].error(f)}catch{}return!0},x.prototype.lock=function(){l.prototype.lock.call(this);for(var f=this._sources,w=0;w<f.length;w++)f[w].lock()},n.exports=x},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,n,s){var i=t("../compressions"),a=t("./ZipFileWorker");s.generateWorker=function(o,l,d){var u=new a(l.streamFiles,d,l.platform,l.encodeFileName),v=0;try{o.forEach(function(x,f){v++;var w=(function(y,k){var _=y||k,S=i[_];if(!S)throw new Error(_+" is not a valid compression method !");return S})(f.options.compression,l.compression),c=f.options.compressionOptions||l.compressionOptions||{},b=f.dir,g=f.date;f._compressWorker(w,c).withStreamInfo("file",{name:x,dir:b,date:g,comment:f.comment||"",unixPermissions:f.unixPermissions,dosPermissions:f.dosPermissions}).pipe(u)}),u.entriesCount=v}catch(x){u.error(x)}return u}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,n,s){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var a=new i;for(var o in this)typeof this[o]!="function"&&(a[o]=this[o]);return a}}(i.prototype=t("./object")).loadAsync=t("./load"),i.support=t("./support"),i.defaults=t("./defaults"),i.version="3.10.1",i.loadAsync=function(a,o){return new i().loadAsync(a,o)},i.external=t("./external"),n.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,n,s){var i=t("./utils"),a=t("./external"),o=t("./utf8"),l=t("./zipEntries"),d=t("./stream/Crc32Probe"),u=t("./nodejsUtils");function v(x){return new a.Promise(function(f,w){var c=x.decompressed.getContentWorker().pipe(new d);c.on("error",function(b){w(b)}).on("end",function(){c.streamInfo.crc32!==x.decompressed.crc32?w(new Error("Corrupted zip : CRC32 mismatch")):f()}).resume()})}n.exports=function(x,f){var w=this;return f=i.extend(f||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(x)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",x,!0,f.optimizedBinaryString,f.base64).then(function(c){var b=new l(f);return b.load(c),b}).then(function(c){var b=[a.Promise.resolve(c)],g=c.files;if(f.checkCRC32)for(var y=0;y<g.length;y++)b.push(v(g[y]));return a.Promise.all(b)}).then(function(c){for(var b=c.shift(),g=b.files,y=0;y<g.length;y++){var k=g[y],_=k.fileNameStr,S=i.resolve(k.fileNameStr);w.file(S,k.decompressed,{binary:!0,optimizedBinaryString:!0,date:k.date,dir:k.dir,comment:k.fileCommentStr.length?k.fileCommentStr:null,unixPermissions:k.unixPermissions,dosPermissions:k.dosPermissions,createFolders:f.createFolders}),k.dir||(w.file(S).unsafeOriginalName=_)}return b.zipComment.length&&(w.comment=b.zipComment),w})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,n,s){var i=t("../utils"),a=t("../stream/GenericWorker");function o(l,d){a.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(d)}i.inherits(o,a),o.prototype._bindStream=function(l){var d=this;(this._stream=l).pause(),l.on("data",function(u){d.push({data:u,meta:{percent:0}})}).on("error",function(u){d.isPaused?this.generatedError=u:d.error(u)}).on("end",function(){d.isPaused?d._upstreamEnded=!0:d.end()})},o.prototype.pause=function(){return!!a.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},n.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,n,s){var i=t("readable-stream").Readable;function a(o,l,d){i.call(this,l),this._helper=o;var u=this;o.on("data",function(v,x){u.push(v)||u._helper.pause(),d&&d(x)}).on("error",function(v){u.emit("error",v)}).on("end",function(){u.push(null)})}t("../utils").inherits(a,i),a.prototype._read=function(){this._helper.resume()},n.exports=a},{"../utils":32,"readable-stream":16}],14:[function(t,n,s){n.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,a){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,a);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,a)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var a=new Buffer(i);return a.fill(0),a},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(t,n,s){function i(S,I,A){var T,R=o.getTypeOf(I),U=o.extend(A||{},u);U.date=U.date||new Date,U.compression!==null&&(U.compression=U.compression.toUpperCase()),typeof U.unixPermissions=="string"&&(U.unixPermissions=parseInt(U.unixPermissions,8)),U.unixPermissions&&16384&U.unixPermissions&&(U.dir=!0),U.dosPermissions&&16&U.dosPermissions&&(U.dir=!0),U.dir&&(S=g(S)),U.createFolders&&(T=b(S))&&y.call(this,T,!0);var X=R==="string"&&U.binary===!1&&U.base64===!1;A&&A.binary!==void 0||(U.binary=!X),(I instanceof v&&I.uncompressedSize===0||U.dir||!I||I.length===0)&&(U.base64=!1,U.binary=!0,I="",U.compression="STORE",R="string");var z=null;z=I instanceof v||I instanceof l?I:w.isNode&&w.isStream(I)?new c(S,I):o.prepareContent(S,I,U.binary,U.optimizedBinaryString,U.base64);var L=new x(S,z,U);this.files[S]=L}var a=t("./utf8"),o=t("./utils"),l=t("./stream/GenericWorker"),d=t("./stream/StreamHelper"),u=t("./defaults"),v=t("./compressedObject"),x=t("./zipObject"),f=t("./generate"),w=t("./nodejsUtils"),c=t("./nodejs/NodejsStreamInputAdapter"),b=function(S){S.slice(-1)==="/"&&(S=S.substring(0,S.length-1));var I=S.lastIndexOf("/");return 0<I?S.substring(0,I):""},g=function(S){return S.slice(-1)!=="/"&&(S+="/"),S},y=function(S,I){return I=I!==void 0?I:u.createFolders,S=g(S),this.files[S]||i.call(this,S,null,{dir:!0,createFolders:I}),this.files[S]};function k(S){return Object.prototype.toString.call(S)==="[object RegExp]"}var _={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(S){var I,A,T;for(I in this.files)T=this.files[I],(A=I.slice(this.root.length,I.length))&&I.slice(0,this.root.length)===this.root&&S(A,T)},filter:function(S){var I=[];return this.forEach(function(A,T){S(A,T)&&I.push(T)}),I},file:function(S,I,A){if(arguments.length!==1)return S=this.root+S,i.call(this,S,I,A),this;if(k(S)){var T=S;return this.filter(function(U,X){return!X.dir&&T.test(U)})}var R=this.files[this.root+S];return R&&!R.dir?R:null},folder:function(S){if(!S)return this;if(k(S))return this.filter(function(R,U){return U.dir&&S.test(R)});var I=this.root+S,A=y.call(this,I),T=this.clone();return T.root=A.name,T},remove:function(S){S=this.root+S;var I=this.files[S];if(I||(S.slice(-1)!=="/"&&(S+="/"),I=this.files[S]),I&&!I.dir)delete this.files[S];else for(var A=this.filter(function(R,U){return U.name.slice(0,S.length)===S}),T=0;T<A.length;T++)delete this.files[A[T].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(S){var I,A={};try{if((A=o.extend(S||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:a.utf8encode})).type=A.type.toLowerCase(),A.compression=A.compression.toUpperCase(),A.type==="binarystring"&&(A.type="string"),!A.type)throw new Error("No output type specified.");o.checkSupport(A.type),A.platform!=="darwin"&&A.platform!=="freebsd"&&A.platform!=="linux"&&A.platform!=="sunos"||(A.platform="UNIX"),A.platform==="win32"&&(A.platform="DOS");var T=A.comment||this.comment||"";I=f.generateWorker(this,A,T)}catch(R){(I=new l("error")).error(R)}return new d(I,A.type||"string",A.mimeType)},generateAsync:function(S,I){return this.generateInternalStream(S).accumulate(I)},generateNodeStream:function(S,I){return(S=S||{}).type||(S.type="nodebuffer"),this.generateInternalStream(S).toNodejsStream(I)}};n.exports=_},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,n,s){n.exports=t("stream")},{stream:void 0}],17:[function(t,n,s){var i=t("./DataReader");function a(o){i.call(this,o);for(var l=0;l<this.data.length;l++)o[l]=255&o[l]}t("../utils").inherits(a,i),a.prototype.byteAt=function(o){return this.data[this.zero+o]},a.prototype.lastIndexOfSignature=function(o){for(var l=o.charCodeAt(0),d=o.charCodeAt(1),u=o.charCodeAt(2),v=o.charCodeAt(3),x=this.length-4;0<=x;--x)if(this.data[x]===l&&this.data[x+1]===d&&this.data[x+2]===u&&this.data[x+3]===v)return x-this.zero;return-1},a.prototype.readAndCheckSignature=function(o){var l=o.charCodeAt(0),d=o.charCodeAt(1),u=o.charCodeAt(2),v=o.charCodeAt(3),x=this.readData(4);return l===x[0]&&d===x[1]&&u===x[2]&&v===x[3]},a.prototype.readData=function(o){if(this.checkOffset(o),o===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},n.exports=a},{"../utils":32,"./DataReader":18}],18:[function(t,n,s){var i=t("../utils");function a(o){this.data=o,this.length=o.length,this.index=0,this.zero=0}a.prototype={checkOffset:function(o){this.checkIndex(this.index+o)},checkIndex:function(o){if(this.length<this.zero+o||o<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+o+"). Corrupted zip ?")},setIndex:function(o){this.checkIndex(o),this.index=o},skip:function(o){this.setIndex(this.index+o)},byteAt:function(){},readInt:function(o){var l,d=0;for(this.checkOffset(o),l=this.index+o-1;l>=this.index;l--)d=(d<<8)+this.byteAt(l);return this.index+=o,d},readString:function(o){return i.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},n.exports=a},{"../utils":32}],19:[function(t,n,s){var i=t("./Uint8ArrayReader");function a(o){i.call(this,o)}t("../utils").inherits(a,i),a.prototype.readData=function(o){this.checkOffset(o);var l=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},n.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,n,s){var i=t("./DataReader");function a(o){i.call(this,o)}t("../utils").inherits(a,i),a.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},a.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},a.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},a.prototype.readData=function(o){this.checkOffset(o);var l=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},n.exports=a},{"../utils":32,"./DataReader":18}],21:[function(t,n,s){var i=t("./ArrayReader");function a(o){i.call(this,o)}t("../utils").inherits(a,i),a.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,l},n.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(t,n,s){var i=t("../utils"),a=t("../support"),o=t("./ArrayReader"),l=t("./StringReader"),d=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");n.exports=function(v){var x=i.getTypeOf(v);return i.checkSupport(x),x!=="string"||a.uint8array?x==="nodebuffer"?new d(v):a.uint8array?new u(i.transformTo("uint8array",v)):new o(i.transformTo("array",v)):new l(v)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,n,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,n,s){var i=t("./GenericWorker"),a=t("../utils");function o(l){i.call(this,"ConvertWorker to "+l),this.destType=l}a.inherits(o,i),o.prototype.processChunk=function(l){this.push({data:a.transformTo(this.destType,l.data),meta:l.meta})},n.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,n,s){var i=t("./GenericWorker"),a=t("../crc32");function o(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,i),o.prototype.processChunk=function(l){this.streamInfo.crc32=a(l.data,this.streamInfo.crc32||0),this.push(l)},n.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,n,s){var i=t("../utils"),a=t("./GenericWorker");function o(l){a.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}i.inherits(o,a),o.prototype.processChunk=function(l){if(l){var d=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=d+l.data.length}a.prototype.processChunk.call(this,l)},n.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,n,s){var i=t("../utils"),a=t("./GenericWorker");function o(l){a.call(this,"DataWorker");var d=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(u){d.dataIsReady=!0,d.data=u,d.max=u&&u.length||0,d.type=i.getTypeOf(u),d.isPaused||d._tickAndRepeat()},function(u){d.error(u)})}i.inherits(o,a),o.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,d=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,d);break;case"uint8array":l=this.data.subarray(this.index,d);break;case"array":case"nodebuffer":l=this.data.slice(this.index,d)}return this.index=d,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},n.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,n,s){function i(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,o){return this._listeners[a].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,o){if(this._listeners[a])for(var l=0;l<this._listeners[a].length;l++)this._listeners[a][l].call(this,o)},pipe:function(a){return a.registerPrevious(this)},registerPrevious:function(a){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=a.streamInfo,this.mergeStreamInfo(),this.previous=a;var o=this;return a.on("data",function(l){o.processChunk(l)}),a.on("end",function(){o.end()}),a.on("error",function(l){o.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var a=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),a=!0),this.previous&&this.previous.resume(),!a},flush:function(){},processChunk:function(a){this.push(a)},withStreamInfo:function(a,o){return this.extraStreamInfo[a]=o,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var a in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,a)&&(this.streamInfo[a]=this.extraStreamInfo[a])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var a="Worker "+this.name;return this.previous?this.previous+" -> "+a:a}},n.exports=i},{}],29:[function(t,n,s){var i=t("../utils"),a=t("./ConvertWorker"),o=t("./GenericWorker"),l=t("../base64"),d=t("../support"),u=t("../external"),v=null;if(d.nodestream)try{v=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function x(w,c){return new u.Promise(function(b,g){var y=[],k=w._internalType,_=w._outputType,S=w._mimeType;w.on("data",function(I,A){y.push(I),c&&c(A)}).on("error",function(I){y=[],g(I)}).on("end",function(){try{var I=(function(A,T,R){switch(A){case"blob":return i.newBlob(i.transformTo("arraybuffer",T),R);case"base64":return l.encode(T);default:return i.transformTo(A,T)}})(_,(function(A,T){var R,U=0,X=null,z=0;for(R=0;R<T.length;R++)z+=T[R].length;switch(A){case"string":return T.join("");case"array":return Array.prototype.concat.apply([],T);case"uint8array":for(X=new Uint8Array(z),R=0;R<T.length;R++)X.set(T[R],U),U+=T[R].length;return X;case"nodebuffer":return Buffer.concat(T);default:throw new Error("concat : unsupported type '"+A+"'")}})(k,y),S);b(I)}catch(A){g(A)}y=[]}).resume()})}function f(w,c,b){var g=c;switch(c){case"blob":case"arraybuffer":g="uint8array";break;case"base64":g="string"}try{this._internalType=g,this._outputType=c,this._mimeType=b,i.checkSupport(g),this._worker=w.pipe(new a(g)),w.lock()}catch(y){this._worker=new o("error"),this._worker.error(y)}}f.prototype={accumulate:function(w){return x(this,w)},on:function(w,c){var b=this;return w==="data"?this._worker.on(w,function(g){c.call(b,g.data,g.meta)}):this._worker.on(w,function(){i.delay(c,arguments,b)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(w){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new v(this,{objectMode:this._outputType!=="nodebuffer"},w)}},n.exports=f},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,n,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var i=new ArrayBuffer(0);try{s.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(i),s.blob=a.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!t("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(t,n,s){for(var i=t("./utils"),a=t("./support"),o=t("./nodejsUtils"),l=t("./stream/GenericWorker"),d=new Array(256),u=0;u<256;u++)d[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;d[254]=d[254]=1;function v(){l.call(this,"utf-8 decode"),this.leftOver=null}function x(){l.call(this,"utf-8 encode")}s.utf8encode=function(f){return a.nodebuffer?o.newBufferFrom(f,"utf-8"):(function(w){var c,b,g,y,k,_=w.length,S=0;for(y=0;y<_;y++)(64512&(b=w.charCodeAt(y)))==55296&&y+1<_&&(64512&(g=w.charCodeAt(y+1)))==56320&&(b=65536+(b-55296<<10)+(g-56320),y++),S+=b<128?1:b<2048?2:b<65536?3:4;for(c=a.uint8array?new Uint8Array(S):new Array(S),y=k=0;k<S;y++)(64512&(b=w.charCodeAt(y)))==55296&&y+1<_&&(64512&(g=w.charCodeAt(y+1)))==56320&&(b=65536+(b-55296<<10)+(g-56320),y++),b<128?c[k++]=b:(b<2048?c[k++]=192|b>>>6:(b<65536?c[k++]=224|b>>>12:(c[k++]=240|b>>>18,c[k++]=128|b>>>12&63),c[k++]=128|b>>>6&63),c[k++]=128|63&b);return c})(f)},s.utf8decode=function(f){return a.nodebuffer?i.transformTo("nodebuffer",f).toString("utf-8"):(function(w){var c,b,g,y,k=w.length,_=new Array(2*k);for(c=b=0;c<k;)if((g=w[c++])<128)_[b++]=g;else if(4<(y=d[g]))_[b++]=65533,c+=y-1;else{for(g&=y===2?31:y===3?15:7;1<y&&c<k;)g=g<<6|63&w[c++],y--;1<y?_[b++]=65533:g<65536?_[b++]=g:(g-=65536,_[b++]=55296|g>>10&1023,_[b++]=56320|1023&g)}return _.length!==b&&(_.subarray?_=_.subarray(0,b):_.length=b),i.applyFromCharCode(_)})(f=i.transformTo(a.uint8array?"uint8array":"array",f))},i.inherits(v,l),v.prototype.processChunk=function(f){var w=i.transformTo(a.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var c=w;(w=new Uint8Array(c.length+this.leftOver.length)).set(this.leftOver,0),w.set(c,this.leftOver.length)}else w=this.leftOver.concat(w);this.leftOver=null}var b=(function(y,k){var _;for((k=k||y.length)>y.length&&(k=y.length),_=k-1;0<=_&&(192&y[_])==128;)_--;return _<0||_===0?k:_+d[y[_]]>k?_:k})(w),g=w;b!==w.length&&(a.uint8array?(g=w.subarray(0,b),this.leftOver=w.subarray(b,w.length)):(g=w.slice(0,b),this.leftOver=w.slice(b,w.length))),this.push({data:s.utf8decode(g),meta:f.meta})},v.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=v,i.inherits(x,l),x.prototype.processChunk=function(f){this.push({data:s.utf8encode(f.data),meta:f.meta})},s.Utf8EncodeWorker=x},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,n,s){var i=t("./support"),a=t("./base64"),o=t("./nodejsUtils"),l=t("./external");function d(c){return c}function u(c,b){for(var g=0;g<c.length;++g)b[g]=255&c.charCodeAt(g);return b}t("setimmediate"),s.newBlob=function(c,b){s.checkSupport("blob");try{return new Blob([c],{type:b})}catch{try{var g=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return g.append(c),g.getBlob(b)}catch{throw new Error("Bug : can't construct the Blob.")}}};var v={stringifyByChunk:function(c,b,g){var y=[],k=0,_=c.length;if(_<=g)return String.fromCharCode.apply(null,c);for(;k<_;)b==="array"||b==="nodebuffer"?y.push(String.fromCharCode.apply(null,c.slice(k,Math.min(k+g,_)))):y.push(String.fromCharCode.apply(null,c.subarray(k,Math.min(k+g,_)))),k+=g;return y.join("")},stringifyByChar:function(c){for(var b="",g=0;g<c.length;g++)b+=String.fromCharCode(c[g]);return b},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,o.allocBuffer(1)).length===1}catch{return!1}})()}};function x(c){var b=65536,g=s.getTypeOf(c),y=!0;if(g==="uint8array"?y=v.applyCanBeUsed.uint8array:g==="nodebuffer"&&(y=v.applyCanBeUsed.nodebuffer),y)for(;1<b;)try{return v.stringifyByChunk(c,g,b)}catch{b=Math.floor(b/2)}return v.stringifyByChar(c)}function f(c,b){for(var g=0;g<c.length;g++)b[g]=c[g];return b}s.applyFromCharCode=x;var w={};w.string={string:d,array:function(c){return u(c,new Array(c.length))},arraybuffer:function(c){return w.string.uint8array(c).buffer},uint8array:function(c){return u(c,new Uint8Array(c.length))},nodebuffer:function(c){return u(c,o.allocBuffer(c.length))}},w.array={string:x,array:d,arraybuffer:function(c){return new Uint8Array(c).buffer},uint8array:function(c){return new Uint8Array(c)},nodebuffer:function(c){return o.newBufferFrom(c)}},w.arraybuffer={string:function(c){return x(new Uint8Array(c))},array:function(c){return f(new Uint8Array(c),new Array(c.byteLength))},arraybuffer:d,uint8array:function(c){return new Uint8Array(c)},nodebuffer:function(c){return o.newBufferFrom(new Uint8Array(c))}},w.uint8array={string:x,array:function(c){return f(c,new Array(c.length))},arraybuffer:function(c){return c.buffer},uint8array:d,nodebuffer:function(c){return o.newBufferFrom(c)}},w.nodebuffer={string:x,array:function(c){return f(c,new Array(c.length))},arraybuffer:function(c){return w.nodebuffer.uint8array(c).buffer},uint8array:function(c){return f(c,new Uint8Array(c.length))},nodebuffer:d},s.transformTo=function(c,b){if(b=b||"",!c)return b;s.checkSupport(c);var g=s.getTypeOf(b);return w[g][c](b)},s.resolve=function(c){for(var b=c.split("/"),g=[],y=0;y<b.length;y++){var k=b[y];k==="."||k===""&&y!==0&&y!==b.length-1||(k===".."?g.pop():g.push(k))}return g.join("/")},s.getTypeOf=function(c){return typeof c=="string"?"string":Object.prototype.toString.call(c)==="[object Array]"?"array":i.nodebuffer&&o.isBuffer(c)?"nodebuffer":i.uint8array&&c instanceof Uint8Array?"uint8array":i.arraybuffer&&c instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(c){if(!i[c.toLowerCase()])throw new Error(c+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(c){var b,g,y="";for(g=0;g<(c||"").length;g++)y+="\\x"+((b=c.charCodeAt(g))<16?"0":"")+b.toString(16).toUpperCase();return y},s.delay=function(c,b,g){setImmediate(function(){c.apply(g||null,b||[])})},s.inherits=function(c,b){function g(){}g.prototype=b.prototype,c.prototype=new g},s.extend=function(){var c,b,g={};for(c=0;c<arguments.length;c++)for(b in arguments[c])Object.prototype.hasOwnProperty.call(arguments[c],b)&&g[b]===void 0&&(g[b]=arguments[c][b]);return g},s.prepareContent=function(c,b,g,y,k){return l.Promise.resolve(b).then(function(_){return i.blob&&(_ instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(_))!==-1)&&typeof FileReader<"u"?new l.Promise(function(S,I){var A=new FileReader;A.onload=function(T){S(T.target.result)},A.onerror=function(T){I(T.target.error)},A.readAsArrayBuffer(_)}):_}).then(function(_){var S=s.getTypeOf(_);return S?(S==="arraybuffer"?_=s.transformTo("uint8array",_):S==="string"&&(k?_=a.decode(_):g&&y!==!0&&(_=(function(I){return u(I,i.uint8array?new Uint8Array(I.length):new Array(I.length))})(_))),_):l.Promise.reject(new Error("Can't read the data of '"+c+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,n,s){var i=t("./reader/readerFor"),a=t("./utils"),o=t("./signature"),l=t("./zipEntry"),d=t("./support");function u(v){this.files=[],this.loadOptions=v}u.prototype={checkSignature:function(v){if(!this.reader.readAndCheckSignature(v)){this.reader.index-=4;var x=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+a.pretty(x)+", expected "+a.pretty(v)+")")}},isSignature:function(v,x){var f=this.reader.index;this.reader.setIndex(v);var w=this.reader.readString(4)===x;return this.reader.setIndex(f),w},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var v=this.reader.readData(this.zipCommentLength),x=d.uint8array?"uint8array":"array",f=a.transformTo(x,v);this.zipComment=this.loadOptions.decodeFileName(f)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var v,x,f,w=this.zip64EndOfCentralSize-44;0<w;)v=this.reader.readInt(2),x=this.reader.readInt(4),f=this.reader.readData(x),this.zip64ExtensibleData[v]={id:v,length:x,value:f}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var v,x;for(v=0;v<this.files.length;v++)x=this.files[v],this.reader.setIndex(x.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),x.readLocalPart(this.reader),x.handleUTF8(),x.processAttributes()},readCentralDir:function(){var v;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(v=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(v);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var v=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(v<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(v);var x=v;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===a.MAX_VALUE_16BITS||this.diskWithCentralDirStart===a.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===a.MAX_VALUE_16BITS||this.centralDirRecords===a.MAX_VALUE_16BITS||this.centralDirSize===a.MAX_VALUE_32BITS||this.centralDirOffset===a.MAX_VALUE_32BITS){if(this.zip64=!0,(v=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(v),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var f=this.centralDirOffset+this.centralDirSize;this.zip64&&(f+=20,f+=12+this.zip64EndOfCentralSize);var w=x-f;if(0<w)this.isSignature(x,o.CENTRAL_FILE_HEADER)||(this.reader.zero=w);else if(w<0)throw new Error("Corrupted zip: missing "+Math.abs(w)+" bytes.")},prepareReader:function(v){this.reader=i(v)},load:function(v){this.prepareReader(v),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},n.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,n,s){var i=t("./reader/readerFor"),a=t("./utils"),o=t("./compressedObject"),l=t("./crc32"),d=t("./utf8"),u=t("./compressions"),v=t("./support");function x(f,w){this.options=f,this.loadOptions=w}x.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(f){var w,c;if(f.skip(22),this.fileNameLength=f.readInt(2),c=f.readInt(2),this.fileName=f.readData(this.fileNameLength),f.skip(c),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((w=(function(b){for(var g in u)if(Object.prototype.hasOwnProperty.call(u,g)&&u[g].magic===b)return u[g];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,w,f.readData(this.compressedSize))},readCentralPart:function(f){this.versionMadeBy=f.readInt(2),f.skip(2),this.bitFlag=f.readInt(2),this.compressionMethod=f.readString(2),this.date=f.readDate(),this.crc32=f.readInt(4),this.compressedSize=f.readInt(4),this.uncompressedSize=f.readInt(4);var w=f.readInt(2);if(this.extraFieldsLength=f.readInt(2),this.fileCommentLength=f.readInt(2),this.diskNumberStart=f.readInt(2),this.internalFileAttributes=f.readInt(2),this.externalFileAttributes=f.readInt(4),this.localHeaderOffset=f.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");f.skip(w),this.readExtraFields(f),this.parseZIP64ExtraField(f),this.fileComment=f.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var f=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var w,c,b,g=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4<g;)w=f.readInt(2),c=f.readInt(2),b=f.readData(c),this.extraFields[w]={id:w,length:c,value:b};f.setIndex(g)},handleUTF8:function(){var f=v.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=d.utf8decode(this.fileName),this.fileCommentStr=d.utf8decode(this.fileComment);else{var w=this.findExtraFieldUnicodePath();if(w!==null)this.fileNameStr=w;else{var c=a.transformTo(f,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(c)}var b=this.findExtraFieldUnicodeComment();if(b!==null)this.fileCommentStr=b;else{var g=a.transformTo(f,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(g)}}},findExtraFieldUnicodePath:function(){var f=this.extraFields[28789];if(f){var w=i(f.value);return w.readInt(1)!==1||l(this.fileName)!==w.readInt(4)?null:d.utf8decode(w.readData(f.length-5))}return null},findExtraFieldUnicodeComment:function(){var f=this.extraFields[25461];if(f){var w=i(f.value);return w.readInt(1)!==1||l(this.fileComment)!==w.readInt(4)?null:d.utf8decode(w.readData(f.length-5))}return null}},n.exports=x},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,n,s){function i(w,c,b){this.name=w,this.dir=b.dir,this.date=b.date,this.comment=b.comment,this.unixPermissions=b.unixPermissions,this.dosPermissions=b.dosPermissions,this._data=c,this._dataBinary=b.binary,this.options={compression:b.compression,compressionOptions:b.compressionOptions}}var a=t("./stream/StreamHelper"),o=t("./stream/DataWorker"),l=t("./utf8"),d=t("./compressedObject"),u=t("./stream/GenericWorker");i.prototype={internalStream:function(w){var c=null,b="string";try{if(!w)throw new Error("No output type specified.");var g=(b=w.toLowerCase())==="string"||b==="text";b!=="binarystring"&&b!=="text"||(b="string"),c=this._decompressWorker();var y=!this._dataBinary;y&&!g&&(c=c.pipe(new l.Utf8EncodeWorker)),!y&&g&&(c=c.pipe(new l.Utf8DecodeWorker))}catch(k){(c=new u("error")).error(k)}return new a(c,b,"")},async:function(w,c){return this.internalStream(w).accumulate(c)},nodeStream:function(w,c){return this.internalStream(w||"nodebuffer").toNodejsStream(c)},_compressWorker:function(w,c){if(this._data instanceof d&&this._data.compression.magic===w.magic)return this._data.getCompressedWorker();var b=this._decompressWorker();return this._dataBinary||(b=b.pipe(new l.Utf8EncodeWorker)),d.createWorkerFrom(b,w,c)},_decompressWorker:function(){return this._data instanceof d?this._data.getContentWorker():this._data instanceof u?this._data:new o(this._data)}};for(var v=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],x=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<v.length;f++)i.prototype[v[f]]=x;n.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,n,s){(function(i){var a,o,l=i.MutationObserver||i.WebKitMutationObserver;if(l){var d=0,u=new l(w),v=i.document.createTextNode("");u.observe(v,{characterData:!0}),a=function(){v.data=d=++d%2}}else if(i.setImmediate||i.MessageChannel===void 0)a="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var c=i.document.createElement("script");c.onreadystatechange=function(){w(),c.onreadystatechange=null,c.parentNode.removeChild(c),c=null},i.document.documentElement.appendChild(c)}:function(){setTimeout(w,0)};else{var x=new i.MessageChannel;x.port1.onmessage=w,a=function(){x.port2.postMessage(0)}}var f=[];function w(){var c,b;o=!0;for(var g=f.length;g;){for(b=f,f=[],c=-1;++c<g;)b[c]();g=f.length}o=!1}n.exports=function(c){f.push(c)!==1||o||a()}}).call(this,typeof Ke<"u"?Ke:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(t,n,s){var i=t("immediate");function a(){}var o={},l=["REJECTED"],d=["FULFILLED"],u=["PENDING"];function v(g){if(typeof g!="function")throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,g!==a&&c(this,g)}function x(g,y,k){this.promise=g,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof k=="function"&&(this.onRejected=k,this.callRejected=this.otherCallRejected)}function f(g,y,k){i(function(){var _;try{_=y(k)}catch(S){return o.reject(g,S)}_===g?o.reject(g,new TypeError("Cannot resolve promise with itself")):o.resolve(g,_)})}function w(g){var y=g&&g.then;if(g&&(typeof g=="object"||typeof g=="function")&&typeof y=="function")return function(){y.apply(g,arguments)}}function c(g,y){var k=!1;function _(A){k||(k=!0,o.reject(g,A))}function S(A){k||(k=!0,o.resolve(g,A))}var I=b(function(){y(S,_)});I.status==="error"&&_(I.value)}function b(g,y){var k={};try{k.value=g(y),k.status="success"}catch(_){k.status="error",k.value=_}return k}(n.exports=v).prototype.finally=function(g){if(typeof g!="function")return this;var y=this.constructor;return this.then(function(k){return y.resolve(g()).then(function(){return k})},function(k){return y.resolve(g()).then(function(){throw k})})},v.prototype.catch=function(g){return this.then(null,g)},v.prototype.then=function(g,y){if(typeof g!="function"&&this.state===d||typeof y!="function"&&this.state===l)return this;var k=new this.constructor(a);return this.state!==u?f(k,this.state===d?g:y,this.outcome):this.queue.push(new x(k,g,y)),k},x.prototype.callFulfilled=function(g){o.resolve(this.promise,g)},x.prototype.otherCallFulfilled=function(g){f(this.promise,this.onFulfilled,g)},x.prototype.callRejected=function(g){o.reject(this.promise,g)},x.prototype.otherCallRejected=function(g){f(this.promise,this.onRejected,g)},o.resolve=function(g,y){var k=b(w,y);if(k.status==="error")return o.reject(g,k.value);var _=k.value;if(_)c(g,_);else{g.state=d,g.outcome=y;for(var S=-1,I=g.queue.length;++S<I;)g.queue[S].callFulfilled(y)}return g},o.reject=function(g,y){g.state=l,g.outcome=y;for(var k=-1,_=g.queue.length;++k<_;)g.queue[k].callRejected(y);return g},v.resolve=function(g){return g instanceof this?g:o.resolve(new this(a),g)},v.reject=function(g){var y=new this(a);return o.reject(y,g)},v.all=function(g){var y=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=g.length,_=!1;if(!k)return this.resolve([]);for(var S=new Array(k),I=0,A=-1,T=new this(a);++A<k;)R(g[A],A);return T;function R(U,X){y.resolve(U).then(function(z){S[X]=z,++I!==k||_||(_=!0,o.resolve(T,S))},function(z){_||(_=!0,o.reject(T,z))})}},v.race=function(g){var y=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=g.length,_=!1;if(!k)return this.resolve([]);for(var S=-1,I=new this(a);++S<k;)A=g[S],y.resolve(A).then(function(T){_||(_=!0,o.resolve(I,T))},function(T){_||(_=!0,o.reject(I,T))});var A;return I}},{immediate:36}],38:[function(t,n,s){var i={};(0,t("./lib/utils/common").assign)(i,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),n.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,n,s){var i=t("./zlib/deflate"),a=t("./utils/common"),o=t("./utils/strings"),l=t("./zlib/messages"),d=t("./zlib/zstream"),u=Object.prototype.toString,v=0,x=-1,f=0,w=8;function c(g){if(!(this instanceof c))return new c(g);this.options=a.assign({level:x,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:f,to:""},g||{});var y=this.options;y.raw&&0<y.windowBits?y.windowBits=-y.windowBits:y.gzip&&0<y.windowBits&&y.windowBits<16&&(y.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var k=i.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(k!==v)throw new Error(l[k]);if(y.header&&i.deflateSetHeader(this.strm,y.header),y.dictionary){var _;if(_=typeof y.dictionary=="string"?o.string2buf(y.dictionary):u.call(y.dictionary)==="[object ArrayBuffer]"?new Uint8Array(y.dictionary):y.dictionary,(k=i.deflateSetDictionary(this.strm,_))!==v)throw new Error(l[k]);this._dict_set=!0}}function b(g,y){var k=new c(y);if(k.push(g,!0),k.err)throw k.msg||l[k.err];return k.result}c.prototype.push=function(g,y){var k,_,S=this.strm,I=this.options.chunkSize;if(this.ended)return!1;_=y===~~y?y:y===!0?4:0,typeof g=="string"?S.input=o.string2buf(g):u.call(g)==="[object ArrayBuffer]"?S.input=new Uint8Array(g):S.input=g,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new a.Buf8(I),S.next_out=0,S.avail_out=I),(k=i.deflate(S,_))!==1&&k!==v)return this.onEnd(k),!(this.ended=!0);S.avail_out!==0&&(S.avail_in!==0||_!==4&&_!==2)||(this.options.to==="string"?this.onData(o.buf2binstring(a.shrinkBuf(S.output,S.next_out))):this.onData(a.shrinkBuf(S.output,S.next_out)))}while((0<S.avail_in||S.avail_out===0)&&k!==1);return _===4?(k=i.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===v):_!==2||(this.onEnd(v),!(S.avail_out=0))},c.prototype.onData=function(g){this.chunks.push(g)},c.prototype.onEnd=function(g){g===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},s.Deflate=c,s.deflate=b,s.deflateRaw=function(g,y){return(y=y||{}).raw=!0,b(g,y)},s.gzip=function(g,y){return(y=y||{}).gzip=!0,b(g,y)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,n,s){var i=t("./zlib/inflate"),a=t("./utils/common"),o=t("./utils/strings"),l=t("./zlib/constants"),d=t("./zlib/messages"),u=t("./zlib/zstream"),v=t("./zlib/gzheader"),x=Object.prototype.toString;function f(c){if(!(this instanceof f))return new f(c);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},c||{});var b=this.options;b.raw&&0<=b.windowBits&&b.windowBits<16&&(b.windowBits=-b.windowBits,b.windowBits===0&&(b.windowBits=-15)),!(0<=b.windowBits&&b.windowBits<16)||c&&c.windowBits||(b.windowBits+=32),15<b.windowBits&&b.windowBits<48&&(15&b.windowBits)==0&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var g=i.inflateInit2(this.strm,b.windowBits);if(g!==l.Z_OK)throw new Error(d[g]);this.header=new v,i.inflateGetHeader(this.strm,this.header)}function w(c,b){var g=new f(b);if(g.push(c,!0),g.err)throw g.msg||d[g.err];return g.result}f.prototype.push=function(c,b){var g,y,k,_,S,I,A=this.strm,T=this.options.chunkSize,R=this.options.dictionary,U=!1;if(this.ended)return!1;y=b===~~b?b:b===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof c=="string"?A.input=o.binstring2buf(c):x.call(c)==="[object ArrayBuffer]"?A.input=new Uint8Array(c):A.input=c,A.next_in=0,A.avail_in=A.input.length;do{if(A.avail_out===0&&(A.output=new a.Buf8(T),A.next_out=0,A.avail_out=T),(g=i.inflate(A,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&R&&(I=typeof R=="string"?o.string2buf(R):x.call(R)==="[object ArrayBuffer]"?new Uint8Array(R):R,g=i.inflateSetDictionary(this.strm,I)),g===l.Z_BUF_ERROR&&U===!0&&(g=l.Z_OK,U=!1),g!==l.Z_STREAM_END&&g!==l.Z_OK)return this.onEnd(g),!(this.ended=!0);A.next_out&&(A.avail_out!==0&&g!==l.Z_STREAM_END&&(A.avail_in!==0||y!==l.Z_FINISH&&y!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(k=o.utf8border(A.output,A.next_out),_=A.next_out-k,S=o.buf2string(A.output,k),A.next_out=_,A.avail_out=T-_,_&&a.arraySet(A.output,A.output,k,_,0),this.onData(S)):this.onData(a.shrinkBuf(A.output,A.next_out)))),A.avail_in===0&&A.avail_out===0&&(U=!0)}while((0<A.avail_in||A.avail_out===0)&&g!==l.Z_STREAM_END);return g===l.Z_STREAM_END&&(y=l.Z_FINISH),y===l.Z_FINISH?(g=i.inflateEnd(this.strm),this.onEnd(g),this.ended=!0,g===l.Z_OK):y!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(A.avail_out=0))},f.prototype.onData=function(c){this.chunks.push(c)},f.prototype.onEnd=function(c){c===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=c,this.msg=this.strm.msg},s.Inflate=f,s.inflate=w,s.inflateRaw=function(c,b){return(b=b||{}).raw=!0,w(c,b)},s.ungzip=w},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,n,s){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(l){for(var d=Array.prototype.slice.call(arguments,1);d.length;){var u=d.shift();if(u){if(typeof u!="object")throw new TypeError(u+"must be non-object");for(var v in u)u.hasOwnProperty(v)&&(l[v]=u[v])}}return l},s.shrinkBuf=function(l,d){return l.length===d?l:l.subarray?l.subarray(0,d):(l.length=d,l)};var a={arraySet:function(l,d,u,v,x){if(d.subarray&&l.subarray)l.set(d.subarray(u,u+v),x);else for(var f=0;f<v;f++)l[x+f]=d[u+f]},flattenChunks:function(l){var d,u,v,x,f,w;for(d=v=0,u=l.length;d<u;d++)v+=l[d].length;for(w=new Uint8Array(v),d=x=0,u=l.length;d<u;d++)f=l[d],w.set(f,x),x+=f.length;return w}},o={arraySet:function(l,d,u,v,x){for(var f=0;f<v;f++)l[x+f]=d[u+f]},flattenChunks:function(l){return[].concat.apply([],l)}};s.setTyped=function(l){l?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,a)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,o))},s.setTyped(i)},{}],42:[function(t,n,s){var i=t("./common"),a=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch{a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{o=!1}for(var l=new i.Buf8(256),d=0;d<256;d++)l[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;function u(v,x){if(x<65537&&(v.subarray&&o||!v.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(v,x));for(var f="",w=0;w<x;w++)f+=String.fromCharCode(v[w]);return f}l[254]=l[254]=1,s.string2buf=function(v){var x,f,w,c,b,g=v.length,y=0;for(c=0;c<g;c++)(64512&(f=v.charCodeAt(c)))==55296&&c+1<g&&(64512&(w=v.charCodeAt(c+1)))==56320&&(f=65536+(f-55296<<10)+(w-56320),c++),y+=f<128?1:f<2048?2:f<65536?3:4;for(x=new i.Buf8(y),c=b=0;b<y;c++)(64512&(f=v.charCodeAt(c)))==55296&&c+1<g&&(64512&(w=v.charCodeAt(c+1)))==56320&&(f=65536+(f-55296<<10)+(w-56320),c++),f<128?x[b++]=f:(f<2048?x[b++]=192|f>>>6:(f<65536?x[b++]=224|f>>>12:(x[b++]=240|f>>>18,x[b++]=128|f>>>12&63),x[b++]=128|f>>>6&63),x[b++]=128|63&f);return x},s.buf2binstring=function(v){return u(v,v.length)},s.binstring2buf=function(v){for(var x=new i.Buf8(v.length),f=0,w=x.length;f<w;f++)x[f]=v.charCodeAt(f);return x},s.buf2string=function(v,x){var f,w,c,b,g=x||v.length,y=new Array(2*g);for(f=w=0;f<g;)if((c=v[f++])<128)y[w++]=c;else if(4<(b=l[c]))y[w++]=65533,f+=b-1;else{for(c&=b===2?31:b===3?15:7;1<b&&f<g;)c=c<<6|63&v[f++],b--;1<b?y[w++]=65533:c<65536?y[w++]=c:(c-=65536,y[w++]=55296|c>>10&1023,y[w++]=56320|1023&c)}return u(y,w)},s.utf8border=function(v,x){var f;for((x=x||v.length)>v.length&&(x=v.length),f=x-1;0<=f&&(192&v[f])==128;)f--;return f<0||f===0?x:f+l[v[f]]>x?f:x}},{"./common":41}],43:[function(t,n,s){n.exports=function(i,a,o,l){for(var d=65535&i|0,u=i>>>16&65535|0,v=0;o!==0;){for(o-=v=2e3<o?2e3:o;u=u+(d=d+a[l++]|0)|0,--v;);d%=65521,u%=65521}return d|u<<16|0}},{}],44:[function(t,n,s){n.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,n,s){var i=(function(){for(var a,o=[],l=0;l<256;l++){a=l;for(var d=0;d<8;d++)a=1&a?3988292384^a>>>1:a>>>1;o[l]=a}return o})();n.exports=function(a,o,l,d){var u=i,v=d+l;a^=-1;for(var x=d;x<v;x++)a=a>>>8^u[255&(a^o[x])];return-1^a}},{}],46:[function(t,n,s){var i,a=t("../utils/common"),o=t("./trees"),l=t("./adler32"),d=t("./crc32"),u=t("./messages"),v=0,x=4,f=0,w=-2,c=-1,b=4,g=2,y=8,k=9,_=286,S=30,I=19,A=2*_+1,T=15,R=3,U=258,X=U+R+1,z=42,L=113,p=1,B=2,G=3,F=4;function M(m,q){return m.msg=u[q],q}function W(m){return(m<<1)-(4<m?9:0)}function oe(m){for(var q=m.length;0<=--q;)m[q]=0}function E(m){var q=m.state,H=q.pending;H>m.avail_out&&(H=m.avail_out),H!==0&&(a.arraySet(m.output,q.pending_buf,q.pending_out,H,m.next_out),m.next_out+=H,q.pending_out+=H,m.total_out+=H,m.avail_out-=H,q.pending-=H,q.pending===0&&(q.pending_out=0))}function O(m,q){o._tr_flush_block(m,0<=m.block_start?m.block_start:-1,m.strstart-m.block_start,q),m.block_start=m.strstart,E(m.strm)}function Y(m,q){m.pending_buf[m.pending++]=q}function V(m,q){m.pending_buf[m.pending++]=q>>>8&255,m.pending_buf[m.pending++]=255&q}function re(m,q){var H,N,C=m.max_chain_length,j=m.strstart,$=m.prev_length,K=m.nice_match,D=m.strstart>m.w_size-X?m.strstart-(m.w_size-X):0,te=m.window,ie=m.w_mask,ne=m.prev,Z=m.strstart+U,J=te[j+$-1],se=te[j+$];m.prev_length>=m.good_match&&(C>>=2),K>m.lookahead&&(K=m.lookahead);do if(te[(H=q)+$]===se&&te[H+$-1]===J&&te[H]===te[j]&&te[++H]===te[j+1]){j+=2,H++;do;while(te[++j]===te[++H]&&te[++j]===te[++H]&&te[++j]===te[++H]&&te[++j]===te[++H]&&te[++j]===te[++H]&&te[++j]===te[++H]&&te[++j]===te[++H]&&te[++j]===te[++H]&&j<Z);if(N=U-(Z-j),j=Z-U,$<N){if(m.match_start=q,K<=($=N))break;J=te[j+$-1],se=te[j+$]}}while((q=ne[q&ie])>D&&--C!=0);return $<=m.lookahead?$:m.lookahead}function pe(m){var q,H,N,C,j,$,K,D,te,ie,ne=m.w_size;do{if(C=m.window_size-m.lookahead-m.strstart,m.strstart>=ne+(ne-X)){for(a.arraySet(m.window,m.window,ne,ne,0),m.match_start-=ne,m.strstart-=ne,m.block_start-=ne,q=H=m.hash_size;N=m.head[--q],m.head[q]=ne<=N?N-ne:0,--H;);for(q=H=ne;N=m.prev[--q],m.prev[q]=ne<=N?N-ne:0,--H;);C+=ne}if(m.strm.avail_in===0)break;if($=m.strm,K=m.window,D=m.strstart+m.lookahead,te=C,ie=void 0,ie=$.avail_in,te<ie&&(ie=te),H=ie===0?0:($.avail_in-=ie,a.arraySet(K,$.input,$.next_in,ie,D),$.state.wrap===1?$.adler=l($.adler,K,ie,D):$.state.wrap===2&&($.adler=d($.adler,K,ie,D)),$.next_in+=ie,$.total_in+=ie,ie),m.lookahead+=H,m.lookahead+m.insert>=R)for(j=m.strstart-m.insert,m.ins_h=m.window[j],m.ins_h=(m.ins_h<<m.hash_shift^m.window[j+1])&m.hash_mask;m.insert&&(m.ins_h=(m.ins_h<<m.hash_shift^m.window[j+R-1])&m.hash_mask,m.prev[j&m.w_mask]=m.head[m.ins_h],m.head[m.ins_h]=j,j++,m.insert--,!(m.lookahead+m.insert<R)););}while(m.lookahead<X&&m.strm.avail_in!==0)}function ee(m,q){for(var H,N;;){if(m.lookahead<X){if(pe(m),m.lookahead<X&&q===v)return p;if(m.lookahead===0)break}if(H=0,m.lookahead>=R&&(m.ins_h=(m.ins_h<<m.hash_shift^m.window[m.strstart+R-1])&m.hash_mask,H=m.prev[m.strstart&m.w_mask]=m.head[m.ins_h],m.head[m.ins_h]=m.strstart),H!==0&&m.strstart-H<=m.w_size-X&&(m.match_length=re(m,H)),m.match_length>=R)if(N=o._tr_tally(m,m.strstart-m.match_start,m.match_length-R),m.lookahead-=m.match_length,m.match_length<=m.max_lazy_match&&m.lookahead>=R){for(m.match_length--;m.strstart++,m.ins_h=(m.ins_h<<m.hash_shift^m.window[m.strstart+R-1])&m.hash_mask,H=m.prev[m.strstart&m.w_mask]=m.head[m.ins_h],m.head[m.ins_h]=m.strstart,--m.match_length!=0;);m.strstart++}else m.strstart+=m.match_length,m.match_length=0,m.ins_h=m.window[m.strstart],m.ins_h=(m.ins_h<<m.hash_shift^m.window[m.strstart+1])&m.hash_mask;else N=o._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++;if(N&&(O(m,!1),m.strm.avail_out===0))return p}return m.insert=m.strstart<R-1?m.strstart:R-1,q===x?(O(m,!0),m.strm.avail_out===0?G:F):m.last_lit&&(O(m,!1),m.strm.avail_out===0)?p:B}function ae(m,q){for(var H,N,C;;){if(m.lookahead<X){if(pe(m),m.lookahead<X&&q===v)return p;if(m.lookahead===0)break}if(H=0,m.lookahead>=R&&(m.ins_h=(m.ins_h<<m.hash_shift^m.window[m.strstart+R-1])&m.hash_mask,H=m.prev[m.strstart&m.w_mask]=m.head[m.ins_h],m.head[m.ins_h]=m.strstart),m.prev_length=m.match_length,m.prev_match=m.match_start,m.match_length=R-1,H!==0&&m.prev_length<m.max_lazy_match&&m.strstart-H<=m.w_size-X&&(m.match_length=re(m,H),m.match_length<=5&&(m.strategy===1||m.match_length===R&&4096<m.strstart-m.match_start)&&(m.match_length=R-1)),m.prev_length>=R&&m.match_length<=m.prev_length){for(C=m.strstart+m.lookahead-R,N=o._tr_tally(m,m.strstart-1-m.prev_match,m.prev_length-R),m.lookahead-=m.prev_length-1,m.prev_length-=2;++m.strstart<=C&&(m.ins_h=(m.ins_h<<m.hash_shift^m.window[m.strstart+R-1])&m.hash_mask,H=m.prev[m.strstart&m.w_mask]=m.head[m.ins_h],m.head[m.ins_h]=m.strstart),--m.prev_length!=0;);if(m.match_available=0,m.match_length=R-1,m.strstart++,N&&(O(m,!1),m.strm.avail_out===0))return p}else if(m.match_available){if((N=o._tr_tally(m,0,m.window[m.strstart-1]))&&O(m,!1),m.strstart++,m.lookahead--,m.strm.avail_out===0)return p}else m.match_available=1,m.strstart++,m.lookahead--}return m.match_available&&(N=o._tr_tally(m,0,m.window[m.strstart-1]),m.match_available=0),m.insert=m.strstart<R-1?m.strstart:R-1,q===x?(O(m,!0),m.strm.avail_out===0?G:F):m.last_lit&&(O(m,!1),m.strm.avail_out===0)?p:B}function de(m,q,H,N,C){this.good_length=m,this.max_lazy=q,this.nice_length=H,this.max_chain=N,this.func=C}function fe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new a.Buf16(2*A),this.dyn_dtree=new a.Buf16(2*(2*S+1)),this.bl_tree=new a.Buf16(2*(2*I+1)),oe(this.dyn_ltree),oe(this.dyn_dtree),oe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(T+1),this.heap=new a.Buf16(2*_+1),oe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*_+1),oe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ue(m){var q;return m&&m.state?(m.total_in=m.total_out=0,m.data_type=g,(q=m.state).pending=0,q.pending_out=0,q.wrap<0&&(q.wrap=-q.wrap),q.status=q.wrap?z:L,m.adler=q.wrap===2?0:1,q.last_flush=v,o._tr_init(q),f):M(m,w)}function he(m){var q=ue(m);return q===f&&(function(H){H.window_size=2*H.w_size,oe(H.head),H.max_lazy_match=i[H.level].max_lazy,H.good_match=i[H.level].good_length,H.nice_match=i[H.level].nice_length,H.max_chain_length=i[H.level].max_chain,H.strstart=0,H.block_start=0,H.lookahead=0,H.insert=0,H.match_length=H.prev_length=R-1,H.match_available=0,H.ins_h=0})(m.state),q}function we(m,q,H,N,C,j){if(!m)return w;var $=1;if(q===c&&(q=6),N<0?($=0,N=-N):15<N&&($=2,N-=16),C<1||k<C||H!==y||N<8||15<N||q<0||9<q||j<0||b<j)return M(m,w);N===8&&(N=9);var K=new fe;return(m.state=K).strm=m,K.wrap=$,K.gzhead=null,K.w_bits=N,K.w_size=1<<K.w_bits,K.w_mask=K.w_size-1,K.hash_bits=C+7,K.hash_size=1<<K.hash_bits,K.hash_mask=K.hash_size-1,K.hash_shift=~~((K.hash_bits+R-1)/R),K.window=new a.Buf8(2*K.w_size),K.head=new a.Buf16(K.hash_size),K.prev=new a.Buf16(K.w_size),K.lit_bufsize=1<<C+6,K.pending_buf_size=4*K.lit_bufsize,K.pending_buf=new a.Buf8(K.pending_buf_size),K.d_buf=1*K.lit_bufsize,K.l_buf=3*K.lit_bufsize,K.level=q,K.strategy=j,K.method=H,he(m)}i=[new de(0,0,0,0,function(m,q){var H=65535;for(H>m.pending_buf_size-5&&(H=m.pending_buf_size-5);;){if(m.lookahead<=1){if(pe(m),m.lookahead===0&&q===v)return p;if(m.lookahead===0)break}m.strstart+=m.lookahead,m.lookahead=0;var N=m.block_start+H;if((m.strstart===0||m.strstart>=N)&&(m.lookahead=m.strstart-N,m.strstart=N,O(m,!1),m.strm.avail_out===0)||m.strstart-m.block_start>=m.w_size-X&&(O(m,!1),m.strm.avail_out===0))return p}return m.insert=0,q===x?(O(m,!0),m.strm.avail_out===0?G:F):(m.strstart>m.block_start&&(O(m,!1),m.strm.avail_out),p)}),new de(4,4,8,4,ee),new de(4,5,16,8,ee),new de(4,6,32,32,ee),new de(4,4,16,16,ae),new de(8,16,32,32,ae),new de(8,16,128,128,ae),new de(8,32,128,256,ae),new de(32,128,258,1024,ae),new de(32,258,258,4096,ae)],s.deflateInit=function(m,q){return we(m,q,y,15,8,0)},s.deflateInit2=we,s.deflateReset=he,s.deflateResetKeep=ue,s.deflateSetHeader=function(m,q){return m&&m.state?m.state.wrap!==2?w:(m.state.gzhead=q,f):w},s.deflate=function(m,q){var H,N,C,j;if(!m||!m.state||5<q||q<0)return m?M(m,w):w;if(N=m.state,!m.output||!m.input&&m.avail_in!==0||N.status===666&&q!==x)return M(m,m.avail_out===0?-5:w);if(N.strm=m,H=N.last_flush,N.last_flush=q,N.status===z)if(N.wrap===2)m.adler=0,Y(N,31),Y(N,139),Y(N,8),N.gzhead?(Y(N,(N.gzhead.text?1:0)+(N.gzhead.hcrc?2:0)+(N.gzhead.extra?4:0)+(N.gzhead.name?8:0)+(N.gzhead.comment?16:0)),Y(N,255&N.gzhead.time),Y(N,N.gzhead.time>>8&255),Y(N,N.gzhead.time>>16&255),Y(N,N.gzhead.time>>24&255),Y(N,N.level===9?2:2<=N.strategy||N.level<2?4:0),Y(N,255&N.gzhead.os),N.gzhead.extra&&N.gzhead.extra.length&&(Y(N,255&N.gzhead.extra.length),Y(N,N.gzhead.extra.length>>8&255)),N.gzhead.hcrc&&(m.adler=d(m.adler,N.pending_buf,N.pending,0)),N.gzindex=0,N.status=69):(Y(N,0),Y(N,0),Y(N,0),Y(N,0),Y(N,0),Y(N,N.level===9?2:2<=N.strategy||N.level<2?4:0),Y(N,3),N.status=L);else{var $=y+(N.w_bits-8<<4)<<8;$|=(2<=N.strategy||N.level<2?0:N.level<6?1:N.level===6?2:3)<<6,N.strstart!==0&&($|=32),$+=31-$%31,N.status=L,V(N,$),N.strstart!==0&&(V(N,m.adler>>>16),V(N,65535&m.adler)),m.adler=1}if(N.status===69)if(N.gzhead.extra){for(C=N.pending;N.gzindex<(65535&N.gzhead.extra.length)&&(N.pending!==N.pending_buf_size||(N.gzhead.hcrc&&N.pending>C&&(m.adler=d(m.adler,N.pending_buf,N.pending-C,C)),E(m),C=N.pending,N.pending!==N.pending_buf_size));)Y(N,255&N.gzhead.extra[N.gzindex]),N.gzindex++;N.gzhead.hcrc&&N.pending>C&&(m.adler=d(m.adler,N.pending_buf,N.pending-C,C)),N.gzindex===N.gzhead.extra.length&&(N.gzindex=0,N.status=73)}else N.status=73;if(N.status===73)if(N.gzhead.name){C=N.pending;do{if(N.pending===N.pending_buf_size&&(N.gzhead.hcrc&&N.pending>C&&(m.adler=d(m.adler,N.pending_buf,N.pending-C,C)),E(m),C=N.pending,N.pending===N.pending_buf_size)){j=1;break}j=N.gzindex<N.gzhead.name.length?255&N.gzhead.name.charCodeAt(N.gzindex++):0,Y(N,j)}while(j!==0);N.gzhead.hcrc&&N.pending>C&&(m.adler=d(m.adler,N.pending_buf,N.pending-C,C)),j===0&&(N.gzindex=0,N.status=91)}else N.status=91;if(N.status===91)if(N.gzhead.comment){C=N.pending;do{if(N.pending===N.pending_buf_size&&(N.gzhead.hcrc&&N.pending>C&&(m.adler=d(m.adler,N.pending_buf,N.pending-C,C)),E(m),C=N.pending,N.pending===N.pending_buf_size)){j=1;break}j=N.gzindex<N.gzhead.comment.length?255&N.gzhead.comment.charCodeAt(N.gzindex++):0,Y(N,j)}while(j!==0);N.gzhead.hcrc&&N.pending>C&&(m.adler=d(m.adler,N.pending_buf,N.pending-C,C)),j===0&&(N.status=103)}else N.status=103;if(N.status===103&&(N.gzhead.hcrc?(N.pending+2>N.pending_buf_size&&E(m),N.pending+2<=N.pending_buf_size&&(Y(N,255&m.adler),Y(N,m.adler>>8&255),m.adler=0,N.status=L)):N.status=L),N.pending!==0){if(E(m),m.avail_out===0)return N.last_flush=-1,f}else if(m.avail_in===0&&W(q)<=W(H)&&q!==x)return M(m,-5);if(N.status===666&&m.avail_in!==0)return M(m,-5);if(m.avail_in!==0||N.lookahead!==0||q!==v&&N.status!==666){var K=N.strategy===2?(function(D,te){for(var ie;;){if(D.lookahead===0&&(pe(D),D.lookahead===0)){if(te===v)return p;break}if(D.match_length=0,ie=o._tr_tally(D,0,D.window[D.strstart]),D.lookahead--,D.strstart++,ie&&(O(D,!1),D.strm.avail_out===0))return p}return D.insert=0,te===x?(O(D,!0),D.strm.avail_out===0?G:F):D.last_lit&&(O(D,!1),D.strm.avail_out===0)?p:B})(N,q):N.strategy===3?(function(D,te){for(var ie,ne,Z,J,se=D.window;;){if(D.lookahead<=U){if(pe(D),D.lookahead<=U&&te===v)return p;if(D.lookahead===0)break}if(D.match_length=0,D.lookahead>=R&&0<D.strstart&&(ne=se[Z=D.strstart-1])===se[++Z]&&ne===se[++Z]&&ne===se[++Z]){J=D.strstart+U;do;while(ne===se[++Z]&&ne===se[++Z]&&ne===se[++Z]&&ne===se[++Z]&&ne===se[++Z]&&ne===se[++Z]&&ne===se[++Z]&&ne===se[++Z]&&Z<J);D.match_length=U-(J-Z),D.match_length>D.lookahead&&(D.match_length=D.lookahead)}if(D.match_length>=R?(ie=o._tr_tally(D,1,D.match_length-R),D.lookahead-=D.match_length,D.strstart+=D.match_length,D.match_length=0):(ie=o._tr_tally(D,0,D.window[D.strstart]),D.lookahead--,D.strstart++),ie&&(O(D,!1),D.strm.avail_out===0))return p}return D.insert=0,te===x?(O(D,!0),D.strm.avail_out===0?G:F):D.last_lit&&(O(D,!1),D.strm.avail_out===0)?p:B})(N,q):i[N.level].func(N,q);if(K!==G&&K!==F||(N.status=666),K===p||K===G)return m.avail_out===0&&(N.last_flush=-1),f;if(K===B&&(q===1?o._tr_align(N):q!==5&&(o._tr_stored_block(N,0,0,!1),q===3&&(oe(N.head),N.lookahead===0&&(N.strstart=0,N.block_start=0,N.insert=0))),E(m),m.avail_out===0))return N.last_flush=-1,f}return q!==x?f:N.wrap<=0?1:(N.wrap===2?(Y(N,255&m.adler),Y(N,m.adler>>8&255),Y(N,m.adler>>16&255),Y(N,m.adler>>24&255),Y(N,255&m.total_in),Y(N,m.total_in>>8&255),Y(N,m.total_in>>16&255),Y(N,m.total_in>>24&255)):(V(N,m.adler>>>16),V(N,65535&m.adler)),E(m),0<N.wrap&&(N.wrap=-N.wrap),N.pending!==0?f:1)},s.deflateEnd=function(m){var q;return m&&m.state?(q=m.state.status)!==z&&q!==69&&q!==73&&q!==91&&q!==103&&q!==L&&q!==666?M(m,w):(m.state=null,q===L?M(m,-3):f):w},s.deflateSetDictionary=function(m,q){var H,N,C,j,$,K,D,te,ie=q.length;if(!m||!m.state||(j=(H=m.state).wrap)===2||j===1&&H.status!==z||H.lookahead)return w;for(j===1&&(m.adler=l(m.adler,q,ie,0)),H.wrap=0,ie>=H.w_size&&(j===0&&(oe(H.head),H.strstart=0,H.block_start=0,H.insert=0),te=new a.Buf8(H.w_size),a.arraySet(te,q,ie-H.w_size,H.w_size,0),q=te,ie=H.w_size),$=m.avail_in,K=m.next_in,D=m.input,m.avail_in=ie,m.next_in=0,m.input=q,pe(H);H.lookahead>=R;){for(N=H.strstart,C=H.lookahead-(R-1);H.ins_h=(H.ins_h<<H.hash_shift^H.window[N+R-1])&H.hash_mask,H.prev[N&H.w_mask]=H.head[H.ins_h],H.head[H.ins_h]=N,N++,--C;);H.strstart=N,H.lookahead=R-1,pe(H)}return H.strstart+=H.lookahead,H.block_start=H.strstart,H.insert=H.lookahead,H.lookahead=0,H.match_length=H.prev_length=R-1,H.match_available=0,m.next_in=K,m.input=D,m.avail_in=$,H.wrap=j,f},s.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,n,s){n.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,n,s){n.exports=function(i,a){var o,l,d,u,v,x,f,w,c,b,g,y,k,_,S,I,A,T,R,U,X,z,L,p,B;o=i.state,l=i.next_in,p=i.input,d=l+(i.avail_in-5),u=i.next_out,B=i.output,v=u-(a-i.avail_out),x=u+(i.avail_out-257),f=o.dmax,w=o.wsize,c=o.whave,b=o.wnext,g=o.window,y=o.hold,k=o.bits,_=o.lencode,S=o.distcode,I=(1<<o.lenbits)-1,A=(1<<o.distbits)-1;e:do{k<15&&(y+=p[l++]<<k,k+=8,y+=p[l++]<<k,k+=8),T=_[y&I];t:for(;;){if(y>>>=R=T>>>24,k-=R,(R=T>>>16&255)===0)B[u++]=65535&T;else{if(!(16&R)){if((64&R)==0){T=_[(65535&T)+(y&(1<<R)-1)];continue t}if(32&R){o.mode=12;break e}i.msg="invalid literal/length code",o.mode=30;break e}U=65535&T,(R&=15)&&(k<R&&(y+=p[l++]<<k,k+=8),U+=y&(1<<R)-1,y>>>=R,k-=R),k<15&&(y+=p[l++]<<k,k+=8,y+=p[l++]<<k,k+=8),T=S[y&A];r:for(;;){if(y>>>=R=T>>>24,k-=R,!(16&(R=T>>>16&255))){if((64&R)==0){T=S[(65535&T)+(y&(1<<R)-1)];continue r}i.msg="invalid distance code",o.mode=30;break e}if(X=65535&T,k<(R&=15)&&(y+=p[l++]<<k,(k+=8)<R&&(y+=p[l++]<<k,k+=8)),f<(X+=y&(1<<R)-1)){i.msg="invalid distance too far back",o.mode=30;break e}if(y>>>=R,k-=R,(R=u-v)<X){if(c<(R=X-R)&&o.sane){i.msg="invalid distance too far back",o.mode=30;break e}if(L=g,(z=0)===b){if(z+=w-R,R<U){for(U-=R;B[u++]=g[z++],--R;);z=u-X,L=B}}else if(b<R){if(z+=w+b-R,(R-=b)<U){for(U-=R;B[u++]=g[z++],--R;);if(z=0,b<U){for(U-=R=b;B[u++]=g[z++],--R;);z=u-X,L=B}}}else if(z+=b-R,R<U){for(U-=R;B[u++]=g[z++],--R;);z=u-X,L=B}for(;2<U;)B[u++]=L[z++],B[u++]=L[z++],B[u++]=L[z++],U-=3;U&&(B[u++]=L[z++],1<U&&(B[u++]=L[z++]))}else{for(z=u-X;B[u++]=B[z++],B[u++]=B[z++],B[u++]=B[z++],2<(U-=3););U&&(B[u++]=B[z++],1<U&&(B[u++]=B[z++]))}break}}break}}while(l<d&&u<x);l-=U=k>>3,y&=(1<<(k-=U<<3))-1,i.next_in=l,i.next_out=u,i.avail_in=l<d?d-l+5:5-(l-d),i.avail_out=u<x?x-u+257:257-(u-x),o.hold=y,o.bits=k}},{}],49:[function(t,n,s){var i=t("../utils/common"),a=t("./adler32"),o=t("./crc32"),l=t("./inffast"),d=t("./inftrees"),u=1,v=2,x=0,f=-2,w=1,c=852,b=592;function g(z){return(z>>>24&255)+(z>>>8&65280)+((65280&z)<<8)+((255&z)<<24)}function y(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function k(z){var L;return z&&z.state?(L=z.state,z.total_in=z.total_out=L.total=0,z.msg="",L.wrap&&(z.adler=1&L.wrap),L.mode=w,L.last=0,L.havedict=0,L.dmax=32768,L.head=null,L.hold=0,L.bits=0,L.lencode=L.lendyn=new i.Buf32(c),L.distcode=L.distdyn=new i.Buf32(b),L.sane=1,L.back=-1,x):f}function _(z){var L;return z&&z.state?((L=z.state).wsize=0,L.whave=0,L.wnext=0,k(z)):f}function S(z,L){var p,B;return z&&z.state?(B=z.state,L<0?(p=0,L=-L):(p=1+(L>>4),L<48&&(L&=15)),L&&(L<8||15<L)?f:(B.window!==null&&B.wbits!==L&&(B.window=null),B.wrap=p,B.wbits=L,_(z))):f}function I(z,L){var p,B;return z?(B=new y,(z.state=B).window=null,(p=S(z,L))!==x&&(z.state=null),p):f}var A,T,R=!0;function U(z){if(R){var L;for(A=new i.Buf32(512),T=new i.Buf32(32),L=0;L<144;)z.lens[L++]=8;for(;L<256;)z.lens[L++]=9;for(;L<280;)z.lens[L++]=7;for(;L<288;)z.lens[L++]=8;for(d(u,z.lens,0,288,A,0,z.work,{bits:9}),L=0;L<32;)z.lens[L++]=5;d(v,z.lens,0,32,T,0,z.work,{bits:5}),R=!1}z.lencode=A,z.lenbits=9,z.distcode=T,z.distbits=5}function X(z,L,p,B){var G,F=z.state;return F.window===null&&(F.wsize=1<<F.wbits,F.wnext=0,F.whave=0,F.window=new i.Buf8(F.wsize)),B>=F.wsize?(i.arraySet(F.window,L,p-F.wsize,F.wsize,0),F.wnext=0,F.whave=F.wsize):(B<(G=F.wsize-F.wnext)&&(G=B),i.arraySet(F.window,L,p-B,G,F.wnext),(B-=G)?(i.arraySet(F.window,L,p-B,B,0),F.wnext=B,F.whave=F.wsize):(F.wnext+=G,F.wnext===F.wsize&&(F.wnext=0),F.whave<F.wsize&&(F.whave+=G))),0}s.inflateReset=_,s.inflateReset2=S,s.inflateResetKeep=k,s.inflateInit=function(z){return I(z,15)},s.inflateInit2=I,s.inflate=function(z,L){var p,B,G,F,M,W,oe,E,O,Y,V,re,pe,ee,ae,de,fe,ue,he,we,m,q,H,N,C=0,j=new i.Buf8(4),$=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!z||!z.state||!z.output||!z.input&&z.avail_in!==0)return f;(p=z.state).mode===12&&(p.mode=13),M=z.next_out,G=z.output,oe=z.avail_out,F=z.next_in,B=z.input,W=z.avail_in,E=p.hold,O=p.bits,Y=W,V=oe,q=x;e:for(;;)switch(p.mode){case w:if(p.wrap===0){p.mode=13;break}for(;O<16;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}if(2&p.wrap&&E===35615){j[p.check=0]=255&E,j[1]=E>>>8&255,p.check=o(p.check,j,2,0),O=E=0,p.mode=2;break}if(p.flags=0,p.head&&(p.head.done=!1),!(1&p.wrap)||(((255&E)<<8)+(E>>8))%31){z.msg="incorrect header check",p.mode=30;break}if((15&E)!=8){z.msg="unknown compression method",p.mode=30;break}if(O-=4,m=8+(15&(E>>>=4)),p.wbits===0)p.wbits=m;else if(m>p.wbits){z.msg="invalid window size",p.mode=30;break}p.dmax=1<<m,z.adler=p.check=1,p.mode=512&E?10:12,O=E=0;break;case 2:for(;O<16;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}if(p.flags=E,(255&p.flags)!=8){z.msg="unknown compression method",p.mode=30;break}if(57344&p.flags){z.msg="unknown header flags set",p.mode=30;break}p.head&&(p.head.text=E>>8&1),512&p.flags&&(j[0]=255&E,j[1]=E>>>8&255,p.check=o(p.check,j,2,0)),O=E=0,p.mode=3;case 3:for(;O<32;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}p.head&&(p.head.time=E),512&p.flags&&(j[0]=255&E,j[1]=E>>>8&255,j[2]=E>>>16&255,j[3]=E>>>24&255,p.check=o(p.check,j,4,0)),O=E=0,p.mode=4;case 4:for(;O<16;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}p.head&&(p.head.xflags=255&E,p.head.os=E>>8),512&p.flags&&(j[0]=255&E,j[1]=E>>>8&255,p.check=o(p.check,j,2,0)),O=E=0,p.mode=5;case 5:if(1024&p.flags){for(;O<16;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}p.length=E,p.head&&(p.head.extra_len=E),512&p.flags&&(j[0]=255&E,j[1]=E>>>8&255,p.check=o(p.check,j,2,0)),O=E=0}else p.head&&(p.head.extra=null);p.mode=6;case 6:if(1024&p.flags&&(W<(re=p.length)&&(re=W),re&&(p.head&&(m=p.head.extra_len-p.length,p.head.extra||(p.head.extra=new Array(p.head.extra_len)),i.arraySet(p.head.extra,B,F,re,m)),512&p.flags&&(p.check=o(p.check,B,re,F)),W-=re,F+=re,p.length-=re),p.length))break e;p.length=0,p.mode=7;case 7:if(2048&p.flags){if(W===0)break e;for(re=0;m=B[F+re++],p.head&&m&&p.length<65536&&(p.head.name+=String.fromCharCode(m)),m&&re<W;);if(512&p.flags&&(p.check=o(p.check,B,re,F)),W-=re,F+=re,m)break e}else p.head&&(p.head.name=null);p.length=0,p.mode=8;case 8:if(4096&p.flags){if(W===0)break e;for(re=0;m=B[F+re++],p.head&&m&&p.length<65536&&(p.head.comment+=String.fromCharCode(m)),m&&re<W;);if(512&p.flags&&(p.check=o(p.check,B,re,F)),W-=re,F+=re,m)break e}else p.head&&(p.head.comment=null);p.mode=9;case 9:if(512&p.flags){for(;O<16;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}if(E!==(65535&p.check)){z.msg="header crc mismatch",p.mode=30;break}O=E=0}p.head&&(p.head.hcrc=p.flags>>9&1,p.head.done=!0),z.adler=p.check=0,p.mode=12;break;case 10:for(;O<32;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}z.adler=p.check=g(E),O=E=0,p.mode=11;case 11:if(p.havedict===0)return z.next_out=M,z.avail_out=oe,z.next_in=F,z.avail_in=W,p.hold=E,p.bits=O,2;z.adler=p.check=1,p.mode=12;case 12:if(L===5||L===6)break e;case 13:if(p.last){E>>>=7&O,O-=7&O,p.mode=27;break}for(;O<3;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}switch(p.last=1&E,O-=1,3&(E>>>=1)){case 0:p.mode=14;break;case 1:if(U(p),p.mode=20,L!==6)break;E>>>=2,O-=2;break e;case 2:p.mode=17;break;case 3:z.msg="invalid block type",p.mode=30}E>>>=2,O-=2;break;case 14:for(E>>>=7&O,O-=7&O;O<32;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}if((65535&E)!=(E>>>16^65535)){z.msg="invalid stored block lengths",p.mode=30;break}if(p.length=65535&E,O=E=0,p.mode=15,L===6)break e;case 15:p.mode=16;case 16:if(re=p.length){if(W<re&&(re=W),oe<re&&(re=oe),re===0)break e;i.arraySet(G,B,F,re,M),W-=re,F+=re,oe-=re,M+=re,p.length-=re;break}p.mode=12;break;case 17:for(;O<14;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}if(p.nlen=257+(31&E),E>>>=5,O-=5,p.ndist=1+(31&E),E>>>=5,O-=5,p.ncode=4+(15&E),E>>>=4,O-=4,286<p.nlen||30<p.ndist){z.msg="too many length or distance symbols",p.mode=30;break}p.have=0,p.mode=18;case 18:for(;p.have<p.ncode;){for(;O<3;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}p.lens[$[p.have++]]=7&E,E>>>=3,O-=3}for(;p.have<19;)p.lens[$[p.have++]]=0;if(p.lencode=p.lendyn,p.lenbits=7,H={bits:p.lenbits},q=d(0,p.lens,0,19,p.lencode,0,p.work,H),p.lenbits=H.bits,q){z.msg="invalid code lengths set",p.mode=30;break}p.have=0,p.mode=19;case 19:for(;p.have<p.nlen+p.ndist;){for(;de=(C=p.lencode[E&(1<<p.lenbits)-1])>>>16&255,fe=65535&C,!((ae=C>>>24)<=O);){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}if(fe<16)E>>>=ae,O-=ae,p.lens[p.have++]=fe;else{if(fe===16){for(N=ae+2;O<N;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}if(E>>>=ae,O-=ae,p.have===0){z.msg="invalid bit length repeat",p.mode=30;break}m=p.lens[p.have-1],re=3+(3&E),E>>>=2,O-=2}else if(fe===17){for(N=ae+3;O<N;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}O-=ae,m=0,re=3+(7&(E>>>=ae)),E>>>=3,O-=3}else{for(N=ae+7;O<N;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}O-=ae,m=0,re=11+(127&(E>>>=ae)),E>>>=7,O-=7}if(p.have+re>p.nlen+p.ndist){z.msg="invalid bit length repeat",p.mode=30;break}for(;re--;)p.lens[p.have++]=m}}if(p.mode===30)break;if(p.lens[256]===0){z.msg="invalid code -- missing end-of-block",p.mode=30;break}if(p.lenbits=9,H={bits:p.lenbits},q=d(u,p.lens,0,p.nlen,p.lencode,0,p.work,H),p.lenbits=H.bits,q){z.msg="invalid literal/lengths set",p.mode=30;break}if(p.distbits=6,p.distcode=p.distdyn,H={bits:p.distbits},q=d(v,p.lens,p.nlen,p.ndist,p.distcode,0,p.work,H),p.distbits=H.bits,q){z.msg="invalid distances set",p.mode=30;break}if(p.mode=20,L===6)break e;case 20:p.mode=21;case 21:if(6<=W&&258<=oe){z.next_out=M,z.avail_out=oe,z.next_in=F,z.avail_in=W,p.hold=E,p.bits=O,l(z,V),M=z.next_out,G=z.output,oe=z.avail_out,F=z.next_in,B=z.input,W=z.avail_in,E=p.hold,O=p.bits,p.mode===12&&(p.back=-1);break}for(p.back=0;de=(C=p.lencode[E&(1<<p.lenbits)-1])>>>16&255,fe=65535&C,!((ae=C>>>24)<=O);){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}if(de&&(240&de)==0){for(ue=ae,he=de,we=fe;de=(C=p.lencode[we+((E&(1<<ue+he)-1)>>ue)])>>>16&255,fe=65535&C,!(ue+(ae=C>>>24)<=O);){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}E>>>=ue,O-=ue,p.back+=ue}if(E>>>=ae,O-=ae,p.back+=ae,p.length=fe,de===0){p.mode=26;break}if(32&de){p.back=-1,p.mode=12;break}if(64&de){z.msg="invalid literal/length code",p.mode=30;break}p.extra=15&de,p.mode=22;case 22:if(p.extra){for(N=p.extra;O<N;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}p.length+=E&(1<<p.extra)-1,E>>>=p.extra,O-=p.extra,p.back+=p.extra}p.was=p.length,p.mode=23;case 23:for(;de=(C=p.distcode[E&(1<<p.distbits)-1])>>>16&255,fe=65535&C,!((ae=C>>>24)<=O);){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}if((240&de)==0){for(ue=ae,he=de,we=fe;de=(C=p.distcode[we+((E&(1<<ue+he)-1)>>ue)])>>>16&255,fe=65535&C,!(ue+(ae=C>>>24)<=O);){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}E>>>=ue,O-=ue,p.back+=ue}if(E>>>=ae,O-=ae,p.back+=ae,64&de){z.msg="invalid distance code",p.mode=30;break}p.offset=fe,p.extra=15&de,p.mode=24;case 24:if(p.extra){for(N=p.extra;O<N;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}p.offset+=E&(1<<p.extra)-1,E>>>=p.extra,O-=p.extra,p.back+=p.extra}if(p.offset>p.dmax){z.msg="invalid distance too far back",p.mode=30;break}p.mode=25;case 25:if(oe===0)break e;if(re=V-oe,p.offset>re){if((re=p.offset-re)>p.whave&&p.sane){z.msg="invalid distance too far back",p.mode=30;break}pe=re>p.wnext?(re-=p.wnext,p.wsize-re):p.wnext-re,re>p.length&&(re=p.length),ee=p.window}else ee=G,pe=M-p.offset,re=p.length;for(oe<re&&(re=oe),oe-=re,p.length-=re;G[M++]=ee[pe++],--re;);p.length===0&&(p.mode=21);break;case 26:if(oe===0)break e;G[M++]=p.length,oe--,p.mode=21;break;case 27:if(p.wrap){for(;O<32;){if(W===0)break e;W--,E|=B[F++]<<O,O+=8}if(V-=oe,z.total_out+=V,p.total+=V,V&&(z.adler=p.check=p.flags?o(p.check,G,V,M-V):a(p.check,G,V,M-V)),V=oe,(p.flags?E:g(E))!==p.check){z.msg="incorrect data check",p.mode=30;break}O=E=0}p.mode=28;case 28:if(p.wrap&&p.flags){for(;O<32;){if(W===0)break e;W--,E+=B[F++]<<O,O+=8}if(E!==(4294967295&p.total)){z.msg="incorrect length check",p.mode=30;break}O=E=0}p.mode=29;case 29:q=1;break e;case 30:q=-3;break e;case 31:return-4;case 32:default:return f}return z.next_out=M,z.avail_out=oe,z.next_in=F,z.avail_in=W,p.hold=E,p.bits=O,(p.wsize||V!==z.avail_out&&p.mode<30&&(p.mode<27||L!==4))&&X(z,z.output,z.next_out,V-z.avail_out)?(p.mode=31,-4):(Y-=z.avail_in,V-=z.avail_out,z.total_in+=Y,z.total_out+=V,p.total+=V,p.wrap&&V&&(z.adler=p.check=p.flags?o(p.check,G,V,z.next_out-V):a(p.check,G,V,z.next_out-V)),z.data_type=p.bits+(p.last?64:0)+(p.mode===12?128:0)+(p.mode===20||p.mode===15?256:0),(Y==0&&V===0||L===4)&&q===x&&(q=-5),q)},s.inflateEnd=function(z){if(!z||!z.state)return f;var L=z.state;return L.window&&(L.window=null),z.state=null,x},s.inflateGetHeader=function(z,L){var p;return z&&z.state?(2&(p=z.state).wrap)==0?f:((p.head=L).done=!1,x):f},s.inflateSetDictionary=function(z,L){var p,B=L.length;return z&&z.state?(p=z.state).wrap!==0&&p.mode!==11?f:p.mode===11&&a(1,L,B,0)!==p.check?-3:X(z,L,B,B)?(p.mode=31,-4):(p.havedict=1,x):f},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,n,s){var i=t("../utils/common"),a=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],d=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];n.exports=function(u,v,x,f,w,c,b,g){var y,k,_,S,I,A,T,R,U,X=g.bits,z=0,L=0,p=0,B=0,G=0,F=0,M=0,W=0,oe=0,E=0,O=null,Y=0,V=new i.Buf16(16),re=new i.Buf16(16),pe=null,ee=0;for(z=0;z<=15;z++)V[z]=0;for(L=0;L<f;L++)V[v[x+L]]++;for(G=X,B=15;1<=B&&V[B]===0;B--);if(B<G&&(G=B),B===0)return w[c++]=20971520,w[c++]=20971520,g.bits=1,0;for(p=1;p<B&&V[p]===0;p++);for(G<p&&(G=p),z=W=1;z<=15;z++)if(W<<=1,(W-=V[z])<0)return-1;if(0<W&&(u===0||B!==1))return-1;for(re[1]=0,z=1;z<15;z++)re[z+1]=re[z]+V[z];for(L=0;L<f;L++)v[x+L]!==0&&(b[re[v[x+L]]++]=L);if(A=u===0?(O=pe=b,19):u===1?(O=a,Y-=257,pe=o,ee-=257,256):(O=l,pe=d,-1),z=p,I=c,M=L=E=0,_=-1,S=(oe=1<<(F=G))-1,u===1&&852<oe||u===2&&592<oe)return 1;for(;;){for(T=z-M,U=b[L]<A?(R=0,b[L]):b[L]>A?(R=pe[ee+b[L]],O[Y+b[L]]):(R=96,0),y=1<<z-M,p=k=1<<F;w[I+(E>>M)+(k-=y)]=T<<24|R<<16|U|0,k!==0;);for(y=1<<z-1;E&y;)y>>=1;if(y!==0?(E&=y-1,E+=y):E=0,L++,--V[z]==0){if(z===B)break;z=v[x+b[L]]}if(G<z&&(E&S)!==_){for(M===0&&(M=G),I+=p,W=1<<(F=z-M);F+M<B&&!((W-=V[F+M])<=0);)F++,W<<=1;if(oe+=1<<F,u===1&&852<oe||u===2&&592<oe)return 1;w[_=E&S]=G<<24|F<<16|I-c|0}}return E!==0&&(w[I+E]=z-M<<24|64<<16|0),g.bits=G,0}},{"../utils/common":41}],51:[function(t,n,s){n.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,n,s){var i=t("../utils/common"),a=0,o=1;function l(C){for(var j=C.length;0<=--j;)C[j]=0}var d=0,u=29,v=256,x=v+1+u,f=30,w=19,c=2*x+1,b=15,g=16,y=7,k=256,_=16,S=17,I=18,A=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],T=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],R=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],X=new Array(2*(x+2));l(X);var z=new Array(2*f);l(z);var L=new Array(512);l(L);var p=new Array(256);l(p);var B=new Array(u);l(B);var G,F,M,W=new Array(f);function oe(C,j,$,K,D){this.static_tree=C,this.extra_bits=j,this.extra_base=$,this.elems=K,this.max_length=D,this.has_stree=C&&C.length}function E(C,j){this.dyn_tree=C,this.max_code=0,this.stat_desc=j}function O(C){return C<256?L[C]:L[256+(C>>>7)]}function Y(C,j){C.pending_buf[C.pending++]=255&j,C.pending_buf[C.pending++]=j>>>8&255}function V(C,j,$){C.bi_valid>g-$?(C.bi_buf|=j<<C.bi_valid&65535,Y(C,C.bi_buf),C.bi_buf=j>>g-C.bi_valid,C.bi_valid+=$-g):(C.bi_buf|=j<<C.bi_valid&65535,C.bi_valid+=$)}function re(C,j,$){V(C,$[2*j],$[2*j+1])}function pe(C,j){for(var $=0;$|=1&C,C>>>=1,$<<=1,0<--j;);return $>>>1}function ee(C,j,$){var K,D,te=new Array(b+1),ie=0;for(K=1;K<=b;K++)te[K]=ie=ie+$[K-1]<<1;for(D=0;D<=j;D++){var ne=C[2*D+1];ne!==0&&(C[2*D]=pe(te[ne]++,ne))}}function ae(C){var j;for(j=0;j<x;j++)C.dyn_ltree[2*j]=0;for(j=0;j<f;j++)C.dyn_dtree[2*j]=0;for(j=0;j<w;j++)C.bl_tree[2*j]=0;C.dyn_ltree[2*k]=1,C.opt_len=C.static_len=0,C.last_lit=C.matches=0}function de(C){8<C.bi_valid?Y(C,C.bi_buf):0<C.bi_valid&&(C.pending_buf[C.pending++]=C.bi_buf),C.bi_buf=0,C.bi_valid=0}function fe(C,j,$,K){var D=2*j,te=2*$;return C[D]<C[te]||C[D]===C[te]&&K[j]<=K[$]}function ue(C,j,$){for(var K=C.heap[$],D=$<<1;D<=C.heap_len&&(D<C.heap_len&&fe(j,C.heap[D+1],C.heap[D],C.depth)&&D++,!fe(j,K,C.heap[D],C.depth));)C.heap[$]=C.heap[D],$=D,D<<=1;C.heap[$]=K}function he(C,j,$){var K,D,te,ie,ne=0;if(C.last_lit!==0)for(;K=C.pending_buf[C.d_buf+2*ne]<<8|C.pending_buf[C.d_buf+2*ne+1],D=C.pending_buf[C.l_buf+ne],ne++,K===0?re(C,D,j):(re(C,(te=p[D])+v+1,j),(ie=A[te])!==0&&V(C,D-=B[te],ie),re(C,te=O(--K),$),(ie=T[te])!==0&&V(C,K-=W[te],ie)),ne<C.last_lit;);re(C,k,j)}function we(C,j){var $,K,D,te=j.dyn_tree,ie=j.stat_desc.static_tree,ne=j.stat_desc.has_stree,Z=j.stat_desc.elems,J=-1;for(C.heap_len=0,C.heap_max=c,$=0;$<Z;$++)te[2*$]!==0?(C.heap[++C.heap_len]=J=$,C.depth[$]=0):te[2*$+1]=0;for(;C.heap_len<2;)te[2*(D=C.heap[++C.heap_len]=J<2?++J:0)]=1,C.depth[D]=0,C.opt_len--,ne&&(C.static_len-=ie[2*D+1]);for(j.max_code=J,$=C.heap_len>>1;1<=$;$--)ue(C,te,$);for(D=Z;$=C.heap[1],C.heap[1]=C.heap[C.heap_len--],ue(C,te,1),K=C.heap[1],C.heap[--C.heap_max]=$,C.heap[--C.heap_max]=K,te[2*D]=te[2*$]+te[2*K],C.depth[D]=(C.depth[$]>=C.depth[K]?C.depth[$]:C.depth[K])+1,te[2*$+1]=te[2*K+1]=D,C.heap[1]=D++,ue(C,te,1),2<=C.heap_len;);C.heap[--C.heap_max]=C.heap[1],(function(se,me){var _e,Se,Le,ye,yt,dn,Ze=me.dyn_tree,qi=me.max_code,su=me.stat_desc.static_tree,lu=me.stat_desc.has_stree,cu=me.stat_desc.extra_bits,Xi=me.stat_desc.extra_base,Ot=me.stat_desc.max_length,mr=0;for(ye=0;ye<=b;ye++)se.bl_count[ye]=0;for(Ze[2*se.heap[se.heap_max]+1]=0,_e=se.heap_max+1;_e<c;_e++)Ot<(ye=Ze[2*Ze[2*(Se=se.heap[_e])+1]+1]+1)&&(ye=Ot,mr++),Ze[2*Se+1]=ye,qi<Se||(se.bl_count[ye]++,yt=0,Xi<=Se&&(yt=cu[Se-Xi]),dn=Ze[2*Se],se.opt_len+=dn*(ye+yt),lu&&(se.static_len+=dn*(su[2*Se+1]+yt)));if(mr!==0){do{for(ye=Ot-1;se.bl_count[ye]===0;)ye--;se.bl_count[ye]--,se.bl_count[ye+1]+=2,se.bl_count[Ot]--,mr-=2}while(0<mr);for(ye=Ot;ye!==0;ye--)for(Se=se.bl_count[ye];Se!==0;)qi<(Le=se.heap[--_e])||(Ze[2*Le+1]!==ye&&(se.opt_len+=(ye-Ze[2*Le+1])*Ze[2*Le],Ze[2*Le+1]=ye),Se--)}})(C,j),ee(te,J,C.bl_count)}function m(C,j,$){var K,D,te=-1,ie=j[1],ne=0,Z=7,J=4;for(ie===0&&(Z=138,J=3),j[2*($+1)+1]=65535,K=0;K<=$;K++)D=ie,ie=j[2*(K+1)+1],++ne<Z&&D===ie||(ne<J?C.bl_tree[2*D]+=ne:D!==0?(D!==te&&C.bl_tree[2*D]++,C.bl_tree[2*_]++):ne<=10?C.bl_tree[2*S]++:C.bl_tree[2*I]++,te=D,J=(ne=0)===ie?(Z=138,3):D===ie?(Z=6,3):(Z=7,4))}function q(C,j,$){var K,D,te=-1,ie=j[1],ne=0,Z=7,J=4;for(ie===0&&(Z=138,J=3),K=0;K<=$;K++)if(D=ie,ie=j[2*(K+1)+1],!(++ne<Z&&D===ie)){if(ne<J)for(;re(C,D,C.bl_tree),--ne!=0;);else D!==0?(D!==te&&(re(C,D,C.bl_tree),ne--),re(C,_,C.bl_tree),V(C,ne-3,2)):ne<=10?(re(C,S,C.bl_tree),V(C,ne-3,3)):(re(C,I,C.bl_tree),V(C,ne-11,7));te=D,J=(ne=0)===ie?(Z=138,3):D===ie?(Z=6,3):(Z=7,4)}}l(W);var H=!1;function N(C,j,$,K){V(C,(d<<1)+(K?1:0),3),(function(D,te,ie,ne){de(D),Y(D,ie),Y(D,~ie),i.arraySet(D.pending_buf,D.window,te,ie,D.pending),D.pending+=ie})(C,j,$)}s._tr_init=function(C){H||((function(){var j,$,K,D,te,ie=new Array(b+1);for(D=K=0;D<u-1;D++)for(B[D]=K,j=0;j<1<<A[D];j++)p[K++]=D;for(p[K-1]=D,D=te=0;D<16;D++)for(W[D]=te,j=0;j<1<<T[D];j++)L[te++]=D;for(te>>=7;D<f;D++)for(W[D]=te<<7,j=0;j<1<<T[D]-7;j++)L[256+te++]=D;for($=0;$<=b;$++)ie[$]=0;for(j=0;j<=143;)X[2*j+1]=8,j++,ie[8]++;for(;j<=255;)X[2*j+1]=9,j++,ie[9]++;for(;j<=279;)X[2*j+1]=7,j++,ie[7]++;for(;j<=287;)X[2*j+1]=8,j++,ie[8]++;for(ee(X,x+1,ie),j=0;j<f;j++)z[2*j+1]=5,z[2*j]=pe(j,5);G=new oe(X,A,v+1,x,b),F=new oe(z,T,0,f,b),M=new oe(new Array(0),R,0,w,y)})(),H=!0),C.l_desc=new E(C.dyn_ltree,G),C.d_desc=new E(C.dyn_dtree,F),C.bl_desc=new E(C.bl_tree,M),C.bi_buf=0,C.bi_valid=0,ae(C)},s._tr_stored_block=N,s._tr_flush_block=function(C,j,$,K){var D,te,ie=0;0<C.level?(C.strm.data_type===2&&(C.strm.data_type=(function(ne){var Z,J=4093624447;for(Z=0;Z<=31;Z++,J>>>=1)if(1&J&&ne.dyn_ltree[2*Z]!==0)return a;if(ne.dyn_ltree[18]!==0||ne.dyn_ltree[20]!==0||ne.dyn_ltree[26]!==0)return o;for(Z=32;Z<v;Z++)if(ne.dyn_ltree[2*Z]!==0)return o;return a})(C)),we(C,C.l_desc),we(C,C.d_desc),ie=(function(ne){var Z;for(m(ne,ne.dyn_ltree,ne.l_desc.max_code),m(ne,ne.dyn_dtree,ne.d_desc.max_code),we(ne,ne.bl_desc),Z=w-1;3<=Z&&ne.bl_tree[2*U[Z]+1]===0;Z--);return ne.opt_len+=3*(Z+1)+5+5+4,Z})(C),D=C.opt_len+3+7>>>3,(te=C.static_len+3+7>>>3)<=D&&(D=te)):D=te=$+5,$+4<=D&&j!==-1?N(C,j,$,K):C.strategy===4||te===D?(V(C,2+(K?1:0),3),he(C,X,z)):(V(C,4+(K?1:0),3),(function(ne,Z,J,se){var me;for(V(ne,Z-257,5),V(ne,J-1,5),V(ne,se-4,4),me=0;me<se;me++)V(ne,ne.bl_tree[2*U[me]+1],3);q(ne,ne.dyn_ltree,Z-1),q(ne,ne.dyn_dtree,J-1)})(C,C.l_desc.max_code+1,C.d_desc.max_code+1,ie+1),he(C,C.dyn_ltree,C.dyn_dtree)),ae(C),K&&de(C)},s._tr_tally=function(C,j,$){return C.pending_buf[C.d_buf+2*C.last_lit]=j>>>8&255,C.pending_buf[C.d_buf+2*C.last_lit+1]=255&j,C.pending_buf[C.l_buf+C.last_lit]=255&$,C.last_lit++,j===0?C.dyn_ltree[2*$]++:(C.matches++,j--,C.dyn_ltree[2*(p[$]+v+1)]++,C.dyn_dtree[2*O(j)]++),C.last_lit===C.lit_bufsize-1},s._tr_align=function(C){V(C,2,3),re(C,k,X),(function(j){j.bi_valid===16?(Y(j,j.bi_buf),j.bi_buf=0,j.bi_valid=0):8<=j.bi_valid&&(j.pending_buf[j.pending++]=255&j.bi_buf,j.bi_buf>>=8,j.bi_valid-=8)})(C)}},{"../utils/common":41}],53:[function(t,n,s){n.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,n,s){(function(i){(function(a,o){if(!a.setImmediate){var l,d,u,v,x=1,f={},w=!1,c=a.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(a);b=b&&b.setTimeout?b:a,l={}.toString.call(a.process)==="[object process]"?function(_){process.nextTick(function(){y(_)})}:(function(){if(a.postMessage&&!a.importScripts){var _=!0,S=a.onmessage;return a.onmessage=function(){_=!1},a.postMessage("","*"),a.onmessage=S,_}})()?(v="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",k,!1):a.attachEvent("onmessage",k),function(_){a.postMessage(v+_,"*")}):a.MessageChannel?((u=new MessageChannel).port1.onmessage=function(_){y(_.data)},function(_){u.port2.postMessage(_)}):c&&"onreadystatechange"in c.createElement("script")?(d=c.documentElement,function(_){var S=c.createElement("script");S.onreadystatechange=function(){y(_),S.onreadystatechange=null,d.removeChild(S),S=null},d.appendChild(S)}):function(_){setTimeout(y,0,_)},b.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var S=new Array(arguments.length-1),I=0;I<S.length;I++)S[I]=arguments[I+1];var A={callback:_,args:S};return f[x]=A,l(x),x++},b.clearImmediate=g}function g(_){delete f[_]}function y(_){if(w)setTimeout(y,0,_);else{var S=f[_];if(S){w=!0;try{(function(I){var A=I.callback,T=I.args;switch(T.length){case 0:A();break;case 1:A(T[0]);break;case 2:A(T[0],T[1]);break;case 3:A(T[0],T[1],T[2]);break;default:A.apply(o,T)}})(S)}finally{g(_),w=!1}}}}function k(_){_.source===a&&typeof _.data=="string"&&_.data.indexOf(v)===0&&y(+_.data.slice(v.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof Ke<"u"?Ke:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(br)),br.exports}var ea=Qi();const ta=Ji(ea);var Rt={exports:{}},ra=Rt.exports,hn;function na(){return hn||(hn=1,(function(e,r){(function(t,n){n()})(ra,function(){function t(d,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(d.type)?new Blob(["\uFEFF",d],{type:d.type}):d}function n(d,u,v){var x=new XMLHttpRequest;x.open("GET",d),x.responseType="blob",x.onload=function(){l(x.response,u,v)},x.onerror=function(){console.error("could not download file")},x.send()}function s(d){var u=new XMLHttpRequest;u.open("HEAD",d,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function i(d){try{d.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),d.dispatchEvent(u)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ke=="object"&&Ke.global===Ke?Ke:void 0,o=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(d,u,v){var x=a.URL||a.webkitURL,f=document.createElement("a");u=u||d.name||"download",f.download=u,f.rel="noopener",typeof d=="string"?(f.href=d,f.origin===location.origin?i(f):s(f.href)?n(d,u,v):i(f,f.target="_blank")):(f.href=x.createObjectURL(d),setTimeout(function(){x.revokeObjectURL(f.href)},4e4),setTimeout(function(){i(f)},0))}:"msSaveOrOpenBlob"in navigator?function(d,u,v){if(u=u||d.name||"download",typeof d!="string")navigator.msSaveOrOpenBlob(t(d,v),u);else if(s(d))n(d,u,v);else{var x=document.createElement("a");x.href=d,x.target="_blank",setTimeout(function(){i(x)})}}:function(d,u,v,x){if(x=x||open("","_blank"),x&&(x.document.title=x.document.body.innerText="downloading..."),typeof d=="string")return n(d,u,v);var f=d.type==="application/octet-stream",w=/constructor/i.test(a.HTMLElement)||a.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||f&&w||o)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var k=b.result;k=c?k:k.replace(/^data:[^;]*;/,"data:attachment/file;"),x?x.location.href=k:location=k,x=null},b.readAsDataURL(d)}else{var g=a.URL||a.webkitURL,y=g.createObjectURL(d);x?x.location=y:location.href=y,x=null,setTimeout(function(){g.revokeObjectURL(y)},4e4)}});a.saveAs=l.saveAs=l,e.exports=l})})(Rt)),Rt.exports}var pn=na();const mn=async(e,r)=>{const t=new ta,n=t.folder("config");n==null||n.file("site.json",JSON.stringify(e.site,null,2)),n==null||n.file("theme.json",JSON.stringify(e.theme,null,2)),n==null||n.file("menu.json",JSON.stringify(e.menu,null,2));const s=t.folder("pages");s==null||s.file(`${r}.json`,JSON.stringify(e.page,null,2));const i=await t.generateAsync({type:"blob"});pn.saveAs(i,`jsonpages-project-${r}-${Date.now()}.zip`)},gn=(e,r,t)=>{const{pages:n,...s}=e.site,i={page:e.page,site:s,menu:e.menu,theme:e.theme},o=`<script id="jp-baked-state" type="application/json">${JSON.stringify(i)}<\/script>`,l=t.replace("</head>",`${o}</head>`),d=new Blob([`<!DOCTYPE html>${l}`],{type:"text/html;charset=utf-8"});pn.saveAs(d,`${r}.html`)};function bn(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(r=0;r<s;r++)e[r]&&(t=bn(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function oa(){for(var e,r,t=0,n="",s=arguments.length;t<s;t++)(e=arguments[t])&&(r=bn(e))&&(n&&(n+=" "),n+=r);return n}const ia=(e,r)=>{const t=new Array(e.length+r.length);for(let n=0;n<e.length;n++)t[n]=e[n];for(let n=0;n<r.length;n++)t[e.length+n]=r[n];return t},aa=(e,r)=>({classGroupId:e,validator:r}),vn=(e=new Map,r=null,t)=>({nextPart:e,validators:r,classGroupId:t}),Dt="-",xn=[],sa="arbitrary..",la=e=>{const r=da(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return ca(a);const o=a.split(Dt),l=o[0]===""&&o.length>1?1:0;return wn(o,l,r)},getConflictingClassGroupIds:(a,o)=>{if(o){const l=n[a],d=t[a];return l?d?ia(d,l):l:d||xn}return t[a]||xn}}},wn=(e,r,t)=>{if(e.length-r===0)return t.classGroupId;const s=e[r],i=t.nextPart.get(s);if(i){const d=wn(e,r+1,i);if(d)return d}const a=t.validators;if(a===null)return;const o=r===0?e.join(Dt):e.slice(r).join(Dt),l=a.length;for(let d=0;d<l;d++){const u=a[d];if(u.validator(o))return u.classGroupId}},ca=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),t=r.indexOf(":"),n=r.slice(0,t);return n?sa+n:void 0})(),da=e=>{const{theme:r,classGroups:t}=e;return ua(t,r)},ua=(e,r)=>{const t=vn();for(const n in e){const s=e[n];vr(s,t,n,r)}return t},vr=(e,r,t,n)=>{const s=e.length;for(let i=0;i<s;i++){const a=e[i];fa(a,r,t,n)}},fa=(e,r,t,n)=>{if(typeof e=="string"){ha(e,r,t);return}if(typeof e=="function"){pa(e,r,t,n);return}ma(e,r,t,n)},ha=(e,r,t)=>{const n=e===""?r:yn(r,e);n.classGroupId=t},pa=(e,r,t,n)=>{if(ga(e)){vr(e(n),r,t,n);return}r.validators===null&&(r.validators=[]),r.validators.push(aa(t,e))},ma=(e,r,t,n)=>{const s=Object.entries(e),i=s.length;for(let a=0;a<i;a++){const[o,l]=s[a];vr(l,yn(r,o),t,n)}},yn=(e,r)=>{let t=e;const n=r.split(Dt),s=n.length;for(let i=0;i<s;i++){const a=n[i];let o=t.nextPart.get(a);o||(o=vn(),t.nextPart.set(a,o)),t=o}return t},ga=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ba=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=Object.create(null),n=Object.create(null);const s=(i,a)=>{t[i]=a,r++,r>e&&(r=0,n=t,t=Object.create(null))};return{get(i){let a=t[i];if(a!==void 0)return a;if((a=n[i])!==void 0)return s(i,a),a},set(i,a){i in t?t[i]=a:s(i,a)}}},xr="!",kn=":",va=[],_n=(e,r,t,n,s)=>({modifiers:e,hasImportantModifier:r,baseClassName:t,maybePostfixModifierPosition:n,isExternal:s}),xa=e=>{const{prefix:r,experimentalParseClassName:t}=e;let n=s=>{const i=[];let a=0,o=0,l=0,d;const u=s.length;for(let c=0;c<u;c++){const b=s[c];if(a===0&&o===0){if(b===kn){i.push(s.slice(l,c)),l=c+1;continue}if(b==="/"){d=c;continue}}b==="["?a++:b==="]"?a--:b==="("?o++:b===")"&&o--}const v=i.length===0?s:s.slice(l);let x=v,f=!1;v.endsWith(xr)?(x=v.slice(0,-1),f=!0):v.startsWith(xr)&&(x=v.slice(1),f=!0);const w=d&&d>l?d-l:void 0;return _n(i,f,x,w)};if(r){const s=r+kn,i=n;n=a=>a.startsWith(s)?i(a.slice(s.length)):_n(va,!1,a,void 0,!0)}if(t){const s=n;n=i=>t({className:i,parseClassName:s})}return n},wa=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((t,n)=>{r.set(t,1e6+n)}),t=>{const n=[];let s=[];for(let i=0;i<t.length;i++){const a=t[i],o=a[0]==="[",l=r.has(a);o||l?(s.length>0&&(s.sort(),n.push(...s),s=[]),n.push(a)):s.push(a)}return s.length>0&&(s.sort(),n.push(...s)),n}},ya=e=>({cache:ba(e.cacheSize),parseClassName:xa(e),sortModifiers:wa(e),...la(e)}),ka=/\s+/,_a=(e,r)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=r,a=[],o=e.trim().split(ka);let l="";for(let d=o.length-1;d>=0;d-=1){const u=o[d],{isExternal:v,modifiers:x,hasImportantModifier:f,baseClassName:w,maybePostfixModifierPosition:c}=t(u);if(v){l=u+(l.length>0?" "+l:l);continue}let b=!!c,g=n(b?w.substring(0,c):w);if(!g){if(!b){l=u+(l.length>0?" "+l:l);continue}if(g=n(w),!g){l=u+(l.length>0?" "+l:l);continue}b=!1}const y=x.length===0?"":x.length===1?x[0]:i(x).join(":"),k=f?y+xr:y,_=k+g;if(a.indexOf(_)>-1)continue;a.push(_);const S=s(g,b);for(let I=0;I<S.length;++I){const A=S[I];a.push(k+A)}l=u+(l.length>0?" "+l:l)}return l},Sa=(...e)=>{let r=0,t,n,s="";for(;r<e.length;)(t=e[r++])&&(n=Sn(t))&&(s&&(s+=" "),s+=n);return s},Sn=e=>{if(typeof e=="string")return e;let r,t="";for(let n=0;n<e.length;n++)e[n]&&(r=Sn(e[n]))&&(t&&(t+=" "),t+=r);return t},Ea=(e,...r)=>{let t,n,s,i;const a=l=>{const d=r.reduce((u,v)=>v(u),e());return t=ya(d),n=t.cache.get,s=t.cache.set,i=o,o(l)},o=l=>{const d=n(l);if(d)return d;const u=_a(l,t);return s(l,u),u};return i=a,(...l)=>i(Sa(...l))},Ca=[],ze=e=>{const r=t=>t[e]||Ca;return r.isThemeGetter=!0,r},En=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Cn=/^\((?:(\w[\w-]*):)?(.+)\)$/i,za=/^\d+\/\d+$/,ja=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Na=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Aa=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ta=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Oa=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,st=e=>za.test(e),ge=e=>!!e&&!Number.isNaN(Number(e)),Ge=e=>!!e&&Number.isInteger(Number(e)),wr=e=>e.endsWith("%")&&ge(e.slice(0,-1)),$e=e=>ja.test(e),Ia=()=>!0,Pa=e=>Na.test(e)&&!Aa.test(e),zn=()=>!1,Ra=e=>Ta.test(e),Da=e=>Oa.test(e),La=e=>!le(e)&&!ce(e),Ma=e=>lt(e,On,zn),le=e=>En.test(e),et=e=>lt(e,In,Pa),yr=e=>lt(e,$a,ge),jn=e=>lt(e,An,zn),Fa=e=>lt(e,Tn,Da),Lt=e=>lt(e,Pn,Ra),ce=e=>Cn.test(e),kt=e=>ct(e,In),Ba=e=>ct(e,Ha),Nn=e=>ct(e,An),Ua=e=>ct(e,On),Wa=e=>ct(e,Tn),Mt=e=>ct(e,Pn,!0),lt=(e,r,t)=>{const n=En.exec(e);return n?n[1]?r(n[1]):t(n[2]):!1},ct=(e,r,t=!1)=>{const n=Cn.exec(e);return n?n[1]?r(n[1]):t:!1},An=e=>e==="position"||e==="percentage",Tn=e=>e==="image"||e==="url",On=e=>e==="length"||e==="size"||e==="bg-size",In=e=>e==="length",$a=e=>e==="number",Ha=e=>e==="family-name",Pn=e=>e==="shadow",Va=Ea(()=>{const e=ze("color"),r=ze("font"),t=ze("text"),n=ze("font-weight"),s=ze("tracking"),i=ze("leading"),a=ze("breakpoint"),o=ze("container"),l=ze("spacing"),d=ze("radius"),u=ze("shadow"),v=ze("inset-shadow"),x=ze("text-shadow"),f=ze("drop-shadow"),w=ze("blur"),c=ze("perspective"),b=ze("aspect"),g=ze("ease"),y=ze("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[..._(),ce,le],I=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],T=()=>[ce,le,l],R=()=>[st,"full","auto",...T()],U=()=>[Ge,"none","subgrid",ce,le],X=()=>["auto",{span:["full",Ge,ce,le]},Ge,ce,le],z=()=>[Ge,"auto",ce,le],L=()=>["auto","min","max","fr",ce,le],p=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...T()],F=()=>[st,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],M=()=>[e,ce,le],W=()=>[..._(),Nn,jn,{position:[ce,le]}],oe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],E=()=>["auto","cover","contain",Ua,Ma,{size:[ce,le]}],O=()=>[wr,kt,et],Y=()=>["","none","full",d,ce,le],V=()=>["",ge,kt,et],re=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[ge,wr,Nn,jn],ae=()=>["","none",w,ce,le],de=()=>["none",ge,ce,le],fe=()=>["none",ge,ce,le],ue=()=>[ge,ce,le],he=()=>[st,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[$e],breakpoint:[$e],color:[Ia],container:[$e],"drop-shadow":[$e],ease:["in","out","in-out"],font:[La],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[$e],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[$e],shadow:[$e],spacing:["px",ge],text:[$e],"text-shadow":[$e],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",st,le,ce,b]}],container:["container"],columns:[{columns:[ge,le,ce,o]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[Ge,"auto",ce,le]}],basis:[{basis:[st,"full","auto",o,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ge,st,"auto","initial","none",le]}],grow:[{grow:["",ge,ce,le]}],shrink:[{shrink:["",ge,ce,le]}],order:[{order:[Ge,"first","last","none",ce,le]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...p(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...p()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":p()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[o,"screen",...F()]}],"min-w":[{"min-w":[o,"screen","none",...F()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",t,kt,et]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ce,yr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",wr,le]}],"font-family":[{font:[Ba,le,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,ce,le]}],"line-clamp":[{"line-clamp":[ge,"none",ce,yr]}],leading:[{leading:[i,...T()]}],"list-image":[{"list-image":["none",ce,le]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,le]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[ge,"from-font","auto",ce,et]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[ge,"auto",ce,le]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:W()}],"bg-repeat":[{bg:oe()}],"bg-size":[{bg:E()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ge,ce,le],radial:["",ce,le],conic:[Ge,ce,le]},Wa,Fa]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:O()}],"gradient-via-pos":[{via:O()}],"gradient-to-pos":[{to:O()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":V()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ge,ce,le]}],"outline-w":[{outline:["",ge,kt,et]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",u,Mt,Lt]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",v,Mt,Lt]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[ge,et]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",x,Mt,Lt]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[ge,ce,le]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[ce,le]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":_()}],"mask-image-conic-pos":[{"mask-conic":[ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:W()}],"mask-repeat":[{mask:oe()}],"mask-size":[{mask:E()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,le]}],filter:[{filter:["","none",ce,le]}],blur:[{blur:ae()}],brightness:[{brightness:[ge,ce,le]}],contrast:[{contrast:[ge,ce,le]}],"drop-shadow":[{"drop-shadow":["","none",f,Mt,Lt]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",ge,ce,le]}],"hue-rotate":[{"hue-rotate":[ge,ce,le]}],invert:[{invert:["",ge,ce,le]}],saturate:[{saturate:[ge,ce,le]}],sepia:[{sepia:["",ge,ce,le]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,le]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[ge,ce,le]}],"backdrop-contrast":[{"backdrop-contrast":[ge,ce,le]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ge,ce,le]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ge,ce,le]}],"backdrop-invert":[{"backdrop-invert":["",ge,ce,le]}],"backdrop-opacity":[{"backdrop-opacity":[ge,ce,le]}],"backdrop-saturate":[{"backdrop-saturate":[ge,ce,le]}],"backdrop-sepia":[{"backdrop-sepia":["",ge,ce,le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,le]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ge,"initial",ce,le]}],ease:[{ease:["linear","initial",g,ce,le]}],delay:[{delay:[ge,ce,le]}],animate:[{animate:["none",y,ce,le]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[c,ce,le]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:fe()}],"scale-x":[{"scale-x":fe()}],"scale-y":[{"scale-y":fe()}],"scale-z":[{"scale-z":fe()}],"scale-3d":["scale-3d"],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[ce,le,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:he()}],"translate-x":[{"translate-x":he()}],"translate-y":[{"translate-y":he()}],"translate-z":[{"translate-z":he()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce,le]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce,le]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[ge,kt,et,yr]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function be(...e){return Va(oa(e))}var Ft={exports:{}},_t={};/**
|
|
13
13
|
* @license React
|
|
14
14
|
* react-jsx-runtime.production.js
|
|
15
15
|
*
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the MIT license found in the
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/var
|
|
20
|
+
*/var Rn;function Za(){if(Rn)return _t;Rn=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function t(n,s,i){var a=null;if(i!==void 0&&(a=""+i),s.key!==void 0&&(a=""+s.key),"key"in s){i={};for(var o in s)o!=="key"&&(i[o]=s[o])}else i=s;return s=i.ref,{$$typeof:e,type:n,key:a,ref:s!==void 0?s:null,props:i}}return _t.Fragment=r,_t.jsx=t,_t.jsxs=t,_t}var St={};/**
|
|
21
21
|
* @license React
|
|
22
22
|
* react-jsx-runtime.development.js
|
|
23
23
|
*
|
|
@@ -25,179 +25,224 @@
|
|
|
25
25
|
*
|
|
26
26
|
* This source code is licensed under the MIT license found in the
|
|
27
27
|
* LICENSE file in the root directory of this source tree.
|
|
28
|
-
*/var
|
|
28
|
+
*/var Dn;function Ka(){return Dn||(Dn=1,process.env.NODE_ENV!=="production"&&(function(){function e(E){if(E==null)return null;if(typeof E=="function")return E.$$typeof===X?null:E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case b:return"Fragment";case y:return"Profiler";case g:return"StrictMode";case I:return"Suspense";case A:return"SuspenseList";case U:return"Activity"}if(typeof E=="object")switch(typeof E.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),E.$$typeof){case c:return"Portal";case _:return E.displayName||"Context";case k:return(E._context.displayName||"Context")+".Consumer";case S:var O=E.render;return E=E.displayName,E||(E=O.displayName||O.name||"",E=E!==""?"ForwardRef("+E+")":"ForwardRef"),E;case T:return O=E.displayName||null,O!==null?O:e(E.type)||"Memo";case R:O=E._payload,E=E._init;try{return e(E(O))}catch{}}return null}function r(E){return""+E}function t(E){try{r(E);var O=!1}catch{O=!0}if(O){O=console;var Y=O.error,V=typeof Symbol=="function"&&Symbol.toStringTag&&E[Symbol.toStringTag]||E.constructor.name||"Object";return Y.call(O,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",V),r(E)}}function n(E){if(E===b)return"<>";if(typeof E=="object"&&E!==null&&E.$$typeof===R)return"<...>";try{var O=e(E);return O?"<"+O+">":"<...>"}catch{return"<...>"}}function s(){var E=z.A;return E===null?null:E.getOwner()}function i(){return Error("react-stack-top-frame")}function a(E){if(L.call(E,"key")){var O=Object.getOwnPropertyDescriptor(E,"key").get;if(O&&O.isReactWarning)return!1}return E.key!==void 0}function o(E,O){function Y(){G||(G=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",O))}Y.isReactWarning=!0,Object.defineProperty(E,"key",{get:Y,configurable:!0})}function l(){var E=e(this.type);return F[E]||(F[E]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),E=this.props.ref,E!==void 0?E:null}function d(E,O,Y,V,re,pe){var ee=Y.ref;return E={$$typeof:w,type:E,key:O,props:Y,_owner:V},(ee!==void 0?ee:null)!==null?Object.defineProperty(E,"ref",{enumerable:!1,get:l}):Object.defineProperty(E,"ref",{enumerable:!1,value:null}),E._store={},Object.defineProperty(E._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(E,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(E,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:re}),Object.defineProperty(E,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:pe}),Object.freeze&&(Object.freeze(E.props),Object.freeze(E)),E}function u(E,O,Y,V,re,pe){var ee=O.children;if(ee!==void 0)if(V)if(p(ee)){for(V=0;V<ee.length;V++)v(ee[V]);Object.freeze&&Object.freeze(ee)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else v(ee);if(L.call(O,"key")){ee=e(E);var ae=Object.keys(O).filter(function(fe){return fe!=="key"});V=0<ae.length?"{key: someKey, "+ae.join(": ..., ")+": ...}":"{key: someKey}",oe[ee+V]||(ae=0<ae.length?"{"+ae.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
29
29
|
let props = %s;
|
|
30
30
|
<%s {...props} />
|
|
31
31
|
React keys must be passed directly to JSX without using spread:
|
|
32
32
|
let props = %s;
|
|
33
|
-
<%s key={someKey} {...props} />`,
|
|
33
|
+
<%s key={someKey} {...props} />`,V,ee,ae,ee),oe[ee+V]=!0)}if(ee=null,Y!==void 0&&(t(Y),ee=""+Y),a(O)&&(t(O.key),ee=""+O.key),"key"in O){Y={};for(var de in O)de!=="key"&&(Y[de]=O[de])}else Y=O;return ee&&o(Y,typeof E=="function"?E.displayName||E.name||"Unknown":E),d(E,ee,Y,s(),re,pe)}function v(E){x(E)?E._store&&(E._store.validated=1):typeof E=="object"&&E!==null&&E.$$typeof===R&&(E._payload.status==="fulfilled"?x(E._payload.value)&&E._payload.value._store&&(E._payload.value._store.validated=1):E._store&&(E._store.validated=1))}function x(E){return typeof E=="object"&&E!==null&&E.$$typeof===w}var f=Q,w=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),_=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),X=Symbol.for("react.client.reference"),z=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,p=Array.isArray,B=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(E){return E()}};var G,F={},M=f.react_stack_bottom_frame.bind(f,i)(),W=B(n(i)),oe={};St.Fragment=b,St.jsx=function(E,O,Y){var V=1e4>z.recentlyCreatedOwnerStacks++;return u(E,O,Y,!1,V?Error("react-stack-top-frame"):M,V?B(n(E)):W)},St.jsxs=function(E,O,Y){var V=1e4>z.recentlyCreatedOwnerStacks++;return u(E,O,Y,!0,V?Error("react-stack-top-frame"):M,V?B(n(E)):W)}})()),St}var Ln;function Ga(){return Ln||(Ln=1,process.env.NODE_ENV==="production"?Ft.exports=Za():Ft.exports=Ka()),Ft.exports}var h=Ga();const Mn=Q.createContext(void 0),Fn=({config:e,children:r})=>h.jsx(Mn.Provider,{value:{registry:e.registry,schemas:e.schemas,tenantId:e.tenantId,assets:e.assets},children:r});function Et(){const e=Q.useContext(Mn);if(e===void 0)throw new Error("useConfig must be used within ConfigProvider");return e}const Bn=Q.createContext(void 0),Bt=({mode:e,children:r})=>(Q.useEffect(()=>{if(e!=="studio")return;const t=new MutationObserver(n=>{n.forEach(s=>{s.addedNodes.forEach(i=>{i instanceof HTMLElement&&i.hasAttribute("data-radix-portal")&&i.setAttribute("data-jp-studio-portal","true")})})});return t.observe(document.body,{childList:!0}),()=>t.disconnect()},[e]),h.jsx(Bn.Provider,{value:{mode:e},children:r})),Un=()=>{const e=Q.useContext(Bn);if(e===void 0)throw new Error("useStudio must be used within a StudioProvider");return e};/**
|
|
34
34
|
* @license lucide-react v0.474.0 - ISC
|
|
35
35
|
*
|
|
36
36
|
* This source code is licensed under the ISC license.
|
|
37
37
|
* See the LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/const
|
|
38
|
+
*/const Ya=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wn=(...e)=>e.filter((r,t,n)=>!!r&&r.trim()!==""&&n.indexOf(r)===t).join(" ").trim();/**
|
|
39
39
|
* @license lucide-react v0.474.0 - ISC
|
|
40
40
|
*
|
|
41
41
|
* This source code is licensed under the ISC license.
|
|
42
42
|
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/var
|
|
43
|
+
*/var qa={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
44
44
|
* @license lucide-react v0.474.0 - ISC
|
|
45
45
|
*
|
|
46
46
|
* This source code is licensed under the ISC license.
|
|
47
47
|
* See the LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/const
|
|
48
|
+
*/const Xa=Q.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:t=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:a,...o},l)=>Q.createElement("svg",{ref:l,...qa,width:r,height:r,stroke:e,strokeWidth:n?Number(t)*24/Number(r):t,className:Wn("lucide",s),...o},[...a.map(([d,u])=>Q.createElement(d,u)),...Array.isArray(i)?i:[i]]));/**
|
|
49
49
|
* @license lucide-react v0.474.0 - ISC
|
|
50
50
|
*
|
|
51
51
|
* This source code is licensed under the ISC license.
|
|
52
52
|
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
-
*/const
|
|
53
|
+
*/const xe=(e,r)=>{const t=Q.forwardRef(({className:n,...s},i)=>Q.createElement(Xa,{ref:i,iconNode:r,className:Wn(`lucide-${Ya(e)}`,n),...s}));return t.displayName=`${e}`,t};/**
|
|
54
54
|
* @license lucide-react v0.474.0 - ISC
|
|
55
55
|
*
|
|
56
56
|
* This source code is licensed under the ISC license.
|
|
57
57
|
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/const
|
|
58
|
+
*/const Ja=xe("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
59
59
|
* @license lucide-react v0.474.0 - ISC
|
|
60
60
|
*
|
|
61
61
|
* This source code is licensed under the ISC license.
|
|
62
62
|
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
-
*/const
|
|
63
|
+
*/const Qa=xe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
64
64
|
* @license lucide-react v0.474.0 - ISC
|
|
65
65
|
*
|
|
66
66
|
* This source code is licensed under the ISC license.
|
|
67
67
|
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
-
*/const
|
|
68
|
+
*/const es=xe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
69
69
|
* @license lucide-react v0.474.0 - ISC
|
|
70
70
|
*
|
|
71
71
|
* This source code is licensed under the ISC license.
|
|
72
72
|
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/const
|
|
73
|
+
*/const ts=xe("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
|
|
74
74
|
* @license lucide-react v0.474.0 - ISC
|
|
75
75
|
*
|
|
76
76
|
* This source code is licensed under the ISC license.
|
|
77
77
|
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/const
|
|
78
|
+
*/const kr=xe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
79
79
|
* @license lucide-react v0.474.0 - ISC
|
|
80
80
|
*
|
|
81
81
|
* This source code is licensed under the ISC license.
|
|
82
82
|
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/const
|
|
83
|
+
*/const Ut=xe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
84
84
|
* @license lucide-react v0.474.0 - ISC
|
|
85
85
|
*
|
|
86
86
|
* This source code is licensed under the ISC license.
|
|
87
87
|
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/const
|
|
88
|
+
*/const rs=xe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
89
89
|
* @license lucide-react v0.474.0 - ISC
|
|
90
90
|
*
|
|
91
91
|
* This source code is licensed under the ISC license.
|
|
92
92
|
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/const
|
|
93
|
+
*/const _r=xe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
94
94
|
* @license lucide-react v0.474.0 - ISC
|
|
95
95
|
*
|
|
96
96
|
* This source code is licensed under the ISC license.
|
|
97
97
|
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/const
|
|
98
|
+
*/const ns=xe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
99
99
|
* @license lucide-react v0.474.0 - ISC
|
|
100
100
|
*
|
|
101
101
|
* This source code is licensed under the ISC license.
|
|
102
102
|
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/const
|
|
103
|
+
*/const $n=xe("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
|
|
104
104
|
* @license lucide-react v0.474.0 - ISC
|
|
105
105
|
*
|
|
106
106
|
* This source code is licensed under the ISC license.
|
|
107
107
|
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/const
|
|
108
|
+
*/const os=xe("FileJson",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/**
|
|
109
109
|
* @license lucide-react v0.474.0 - ISC
|
|
110
110
|
*
|
|
111
111
|
* This source code is licensed under the ISC license.
|
|
112
112
|
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/const
|
|
113
|
+
*/const is=xe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
114
114
|
* @license lucide-react v0.474.0 - ISC
|
|
115
115
|
*
|
|
116
116
|
* This source code is licensed under the ISC license.
|
|
117
117
|
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
-
*/const
|
|
118
|
+
*/const as=xe("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
|
|
119
119
|
* @license lucide-react v0.474.0 - ISC
|
|
120
120
|
*
|
|
121
121
|
* This source code is licensed under the ISC license.
|
|
122
122
|
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/const
|
|
123
|
+
*/const Sr=xe("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
124
124
|
* @license lucide-react v0.474.0 - ISC
|
|
125
125
|
*
|
|
126
126
|
* This source code is licensed under the ISC license.
|
|
127
127
|
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/const
|
|
128
|
+
*/const Wt=xe("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
129
129
|
* @license lucide-react v0.474.0 - ISC
|
|
130
130
|
*
|
|
131
131
|
* This source code is licensed under the ISC license.
|
|
132
132
|
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
-
*/const
|
|
133
|
+
*/const Er=xe("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
|
|
134
134
|
* @license lucide-react v0.474.0 - ISC
|
|
135
135
|
*
|
|
136
136
|
* This source code is licensed under the ISC license.
|
|
137
137
|
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
-
*/const
|
|
138
|
+
*/const Hn=xe("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
|
139
139
|
* @license lucide-react v0.474.0 - ISC
|
|
140
140
|
*
|
|
141
141
|
* This source code is licensed under the ISC license.
|
|
142
142
|
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
-
*/const
|
|
143
|
+
*/const ss=xe("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
144
144
|
* @license lucide-react v0.474.0 - ISC
|
|
145
145
|
*
|
|
146
146
|
* This source code is licensed under the ISC license.
|
|
147
147
|
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
-
*/const
|
|
148
|
+
*/const ls=xe("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
149
149
|
* @license lucide-react v0.474.0 - ISC
|
|
150
150
|
*
|
|
151
151
|
* This source code is licensed under the ISC license.
|
|
152
152
|
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/const
|
|
153
|
+
*/const Vn=xe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
154
154
|
* @license lucide-react v0.474.0 - ISC
|
|
155
155
|
*
|
|
156
156
|
* This source code is licensed under the ISC license.
|
|
157
157
|
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
-
*/const
|
|
158
|
+
*/const cs=xe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
159
159
|
* @license lucide-react v0.474.0 - ISC
|
|
160
160
|
*
|
|
161
161
|
* This source code is licensed under the ISC license.
|
|
162
162
|
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
-
*/const
|
|
163
|
+
*/const ds=xe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
164
164
|
* @license lucide-react v0.474.0 - ISC
|
|
165
165
|
*
|
|
166
166
|
* This source code is licensed under the ISC license.
|
|
167
167
|
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/const
|
|
168
|
+
*/const Zn=xe("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
169
169
|
* @license lucide-react v0.474.0 - ISC
|
|
170
170
|
*
|
|
171
171
|
* This source code is licensed under the ISC license.
|
|
172
172
|
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
-
*/const
|
|
173
|
+
*/const us=xe("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
174
174
|
* @license lucide-react v0.474.0 - ISC
|
|
175
175
|
*
|
|
176
176
|
* This source code is licensed under the ISC license.
|
|
177
177
|
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
-
*/const
|
|
178
|
+
*/const fs=xe("SquarePlus",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
|
|
179
179
|
* @license lucide-react v0.474.0 - ISC
|
|
180
180
|
*
|
|
181
181
|
* This source code is licensed under the ISC license.
|
|
182
182
|
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
-
*/const
|
|
183
|
+
*/const hs=xe("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
184
184
|
* @license lucide-react v0.474.0 - ISC
|
|
185
185
|
*
|
|
186
186
|
* This source code is licensed under the ISC license.
|
|
187
187
|
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
-
*/const
|
|
188
|
+
*/const $t=xe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
189
189
|
* @license lucide-react v0.474.0 - ISC
|
|
190
190
|
*
|
|
191
191
|
* This source code is licensed under the ISC license.
|
|
192
192
|
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
-
*/const
|
|
193
|
+
*/const ps=xe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
194
194
|
* @license lucide-react v0.474.0 - ISC
|
|
195
195
|
*
|
|
196
196
|
* This source code is licensed under the ISC license.
|
|
197
197
|
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
-
*/const
|
|
198
|
+
*/const Kn=xe("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
199
199
|
* @license lucide-react v0.474.0 - ISC
|
|
200
200
|
*
|
|
201
201
|
* This source code is licensed under the ISC license.
|
|
202
202
|
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
-
*/const Vn=be("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);class Kn extends q.Component{constructor(_){super(_),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(_,r){console.error(`[JsonPages] Component Crash [${this.props.type}]:`,_,r)}render(){return this.state.hasError?s.jsxs("div",{className:"p-8 m-4 bg-amber-500/5 border-2 border-dashed border-amber-500/20 rounded-xl flex flex-col items-center text-center gap-3",children:[s.jsx(Gn,{className:"text-amber-500",size:32}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("h4",{className:"text-sm font-bold text-amber-200 uppercase tracking-tight",children:"Component Error"}),s.jsxs("p",{className:"text-xs text-amber-500/70 font-mono",children:["Type: ",this.props.type]})]}),s.jsx("p",{className:"text-xs text-zinc-400 max-w-[280px] leading-relaxed",children:"This section failed to render. Check the console for details or verify the JSON data structure."})]}):this.props.children}}const Jn=({type:e,scope:_,isSelected:r,sectionId:m,sectionIndex:u=0,totalSections:i=0,onReorder:o})=>{const n=typeof u=="number"&&u>0&&o,l=typeof u=="number"&&u<i-1&&o;return s.jsx("div",{"data-jp-section-overlay":!0,"aria-hidden":!0,className:he("absolute inset-0 pointer-events-none transition-all duration-200 z-[50]","border-2 border-transparent group-hover:border-blue-400/50 group-hover:border-dashed",r&&"border-2 border-blue-600 border-solid bg-blue-500/5"),children:s.jsxs("div",{className:he("absolute top-0 right-0 flex flex-nowrap items-center gap-1 pl-1 pr-2 py-1 text-[9px] font-black uppercase tracking-widest transition-opacity pointer-events-auto","bg-blue-600 text-white",r||"group-hover:opacity-100 opacity-0"),children:[o&&m!=null&&s.jsxs("span",{className:"shrink-0 flex items-center gap-0.5",children:[s.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),n&&o(m,u-1)},disabled:!n,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section up","aria-label":"Move section up",children:s.jsx(mt,{size:12,strokeWidth:2.5})}),s.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),l&&o(m,u+2)},disabled:!l,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section down","aria-label":"Move section down",children:s.jsx(ft,{size:12,strokeWidth:2.5})})]}),s.jsx("span",{className:"shrink-0",children:e}),s.jsx("span",{className:"opacity-50 shrink-0",children:"|"}),s.jsx("span",{className:"shrink-0",children:_})]})})},He=({section:e,menu:_,selectedId:r,reorderable:m,sectionIndex:u,totalSections:i,onReorder:o})=>{var p,k;const{mode:n}=tr(),{registry:l}=Ze(),h=n==="studio",f=h&&r===e.id,x=l[e.type],v=e.type==="header"||e.type==="footer"?"global":"local",c=e.type==="header"&&((p=e.settings)==null?void 0:p.sticky);if(!x)return s.jsxs("div",{className:"p-6 m-4 bg-red-500/10 text-red-400 border border-red-500/20 rounded-lg text-sm font-mono",children:[s.jsx("strong",{children:"Missing Component:"})," ",e.type]});const b=E=>{var re,j,R,a,M;if(!h)return;E.preventDefault(),E.stopPropagation();const S=E.currentTarget,C=E.clientX,O=E.clientY;if(E.target===S){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:v}},"*");return}const L=document.elementFromPoint(C,O)??E.target;if(!L||!S.contains(L)){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:v}},"*");return}if(L===S){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:v}},"*");return}const D=[];let T=L;for(;T&&T!==S;){const te=(re=T.getAttribute)==null?void 0:re.call(T,"data-jp-item-id"),U=(j=T.getAttribute)==null?void 0:j.call(T,"data-jp-item-field");te&&U&&D.push({fieldKey:U||"items",itemId:te}),T=T.parentElement}if(D.reverse(),D.length===0)for(T=L;T&&T!==S;){const te=(R=T.getAttribute)==null?void 0:R.call(T,"data-jp-field");if(te){D.push({fieldKey:te});break}T=T.parentElement}if(D.length===0&&L){let te=null;const U=W=>{var X,z;const K=W.getBoundingClientRect();if(K.left<=C&&C<=K.right&&K.top<=O&&O<=K.bottom){for(let N=0;N<W.children.length;N++)U(W.children[N]);((X=W.getAttribute)!=null&&X.call(W,"data-jp-item-id")||(z=W.getAttribute)!=null&&z.call(W,"data-jp-field"))&&(te=W)}};if(U(L),te){const W=te,K=(a=W.getAttribute)==null?void 0:a.call(W,"data-jp-item-id"),X=(M=W.getAttribute)==null?void 0:M.call(W,"data-jp-field");K&&X?D.push({fieldKey:X||"items",itemId:K}):X&&D.push({fieldKey:X})}}const V={type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:v}};if(D.length>0){V.itemPath=D;const te=D[0];te.itemId!=null?(V.itemField=te.fieldKey,V.itemId=te.itemId):V.itemField=te.fieldKey}window.parent.postMessage(V,"*")},d=()=>{const E=x;return e.type==="header"&&_?s.jsx(E,{data:e.data,settings:e.settings,menu:_}):s.jsx(E,{data:e.data,settings:e.settings})},g=(k=e.data)==null?void 0:k.anchorId;return s.jsxs("div",{id:g||void 0,"data-section-id":h?e.id:void 0,"data-section-type":h?e.type:void 0,"data-section-scope":h?v:void 0,...h&&f?{"data-jp-selected":!0}:{},onClickCapture:h?b:void 0,className:he("relative w-full",h&&"group cursor-pointer",h&&c?"sticky top-0 z-[60]":"relative z-0",f&&"z-[70]"),children:[s.jsx("div",{className:"relative z-0",children:s.jsx(Kn,{type:e.type,children:d()})}),h&&s.jsx(Jn,{type:e.type,scope:v,isSelected:!!f,sectionId:m&&v==="local"?e.id:void 0,sectionIndex:m&&v==="local"?u:void 0,totalSections:m&&v==="local"?i:void 0,onReorder:m&&v==="local"?o:void 0})]})},qn=e=>{q.useEffect(()=>{document.title=e.title;let _=document.querySelector('meta[name="description"]');_||(_=document.createElement("meta"),_.setAttribute("name","description"),document.head.appendChild(_)),_.setAttribute("content",e.description)},[e.title,e.description])},Yn="application/json",vt=({pageConfig:e,siteConfig:_,menuConfig:r,selectedId:m,onReorder:u,scrollToSectionId:i,onActiveSectionChange:o})=>{var g,p;qn(e.meta);const[n,l]=q.useState(null),h=q.useRef({}),f=q.useRef(o);f.current=o;const x=k=>{var E;(E=f.current)==null||E.call(f,k)};q.useEffect(()=>{if(!i)return;const k=h.current[i];k&&k.scrollIntoView({behavior:"smooth",block:"center"})},[i]),q.useEffect(()=>{if(!f.current)return;const E=[..._.header?[_.header.id]:[],...e.sections.map(L=>L.id),..._.footer?[_.footer.id]:[]],S=new IntersectionObserver(L=>{L.forEach(D=>{var T;if(D.isIntersecting&&D.intersectionRatio>.5){const V=D.target.getAttribute("data-section-id");V&&((T=f.current)==null||T.call(f,V))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let C=!1;const O=requestAnimationFrame(()=>{C||E.forEach(L=>{const D=h.current[L];D&&S.observe(D)})});return()=>{C=!0,cancelAnimationFrame(O),S.disconnect()}},[e.sections,(g=_.header)==null?void 0:g.id,(p=_.footer)==null?void 0:p.id]);const v=(k,E)=>{k.preventDefault(),k.dataTransfer.dropEffect="move",l(E)},c=()=>{l(null)},b=(k,E)=>{if(k.preventDefault(),l(null),!!u)try{const S=k.dataTransfer.getData(Yn),{sectionId:C}=JSON.parse(S);typeof C=="string"&&u(C,E)}catch{}},d=()=>{const k=typeof u=="function",E=e.sections.map((S,C)=>{const O=n===C;return k?s.jsxs("div",{ref:L=>{h.current[S.id]=L},"data-section-id":S.id,style:{position:"relative"},onMouseEnter:()=>x(S.id),children:[s.jsx("div",{"data-jp-drop-zone":!0,style:{position:"absolute",left:0,right:0,top:-1,height:12,zIndex:55,pointerEvents:"auto",backgroundColor:O?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:O?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:L=>v(L,C),onDragLeave:c,onDrop:L=>b(L,C)}),s.jsx(He,{section:S,selectedId:m,reorderable:!0,sectionIndex:C,totalSections:e.sections.length,onReorder:u})]},S.id):s.jsx("div",{ref:L=>{h.current[S.id]=L},"data-section-id":S.id,onMouseEnter:()=>x(S.id),children:s.jsx(He,{section:S,selectedId:m})},S.id)});if(k&&E.length>0){const S=e.sections.length,C=n===S;E.push(s.jsx("div",{"data-jp-drop-zone":!0,style:{position:"relative",left:0,right:0,height:24,minHeight:24,zIndex:55,pointerEvents:"auto",backgroundColor:C?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:C?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:O=>v(O,S),onDragLeave:c,onDrop:O=>b(O,S)},"jp-drop-after-last"))}return E};return s.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[_.header!=null&&s.jsx("div",{ref:k=>{h.current[_.header.id]=k},"data-section-id":_.header.id,onMouseEnter:()=>x(_.header.id),children:s.jsx(He,{section:_.header,menu:r.main,selectedId:m})}),s.jsx("main",{className:"flex-1",children:d()}),_.footer!=null&&s.jsx("div",{ref:k=>{h.current[_.footer.id]=k},"data-section-id":_.footer.id,onMouseEnter:()=>x(_.footer.id),children:s.jsx(He,{section:_.footer,selectedId:m})})]})},ot=({mode:e,tenantCss:_,adminCss:r,children:m})=>(q.useLayoutEffect(()=>{const u=`jp-theme-${e}`,i=e==="tenant"?_:r;if(!document.getElementById(u)&&i){const o=document.createElement("style");o.id=u,o.innerHTML=i,document.head.appendChild(o)}return()=>{const o=document.getElementById(u);o&&o.remove()}},[e,_,r]),s.jsx(s.Fragment,{children:m}));function xt({className:e,type:_,...r}){return s.jsx("input",{type:_,className:he("h-8 rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-1 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600",e),...r})}function Xn({className:e,..._}){return s.jsx("textarea",{className:he("min-h-16 w-full rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-2 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600 resize-none",e),..._})}function Qn({className:e,checked:_,onCheckedChange:r,...m}){return s.jsx("input",{type:"checkbox",checked:_,onChange:u=>r==null?void 0:r(u.target.checked),className:he("size-4 rounded border border-zinc-700 bg-zinc-900 text-blue-600 focus:ring-2 focus:ring-blue-600",e),...m})}function Oe({className:e,..._}){return s.jsx("label",{className:he("text-sm font-medium leading-none select-none",e),..._})}const cr=me.createContext(null);function eo(){const e=me.useContext(cr);if(!e)throw new Error("Select components must be used within Select");return e}function to({value:e,onValueChange:_,children:r}){const m=e??"",u=me.Children.toArray(r).find(x=>me.isValidElement(x)&&x.type===kt),i=me.Children.toArray(r).find(x=>me.isValidElement(x)&&x.type===wt),o=u&&me.isValidElement(u)?u.props.children:void 0,n=i&&me.isValidElement(i)?i.props.children:void 0,l=me.useMemo(()=>!u||!me.isValidElement(u)?[]:me.Children.toArray(u.props.children).filter(x=>me.isValidElement(x)&&x.props.value!==void 0).map(x=>({value:x.props.value,label:x.props.children??x.props.value})),[u,o]),h=me.useMemo(()=>{if(!i||!me.isValidElement(i))return"";const x=me.Children.toArray(i.props.children).find(v=>me.isValidElement(v)&&v.type===yt);return x&&me.isValidElement(x)?x.props.placeholder??"":""},[i,n]),f=me.useMemo(()=>({value:m,onValueChange:x=>_==null?void 0:_(x),options:l,placeholder:h}),[m,_,l,h]);return s.jsx(cr.Provider,{value:f,children:i})}function wt({className:e,children:_,...r}){const{value:m,onValueChange:u,options:i,placeholder:o}=eo();return s.jsxs("div",{className:he("relative",e),...r,children:[s.jsxs("select",{value:m,onChange:n=>u(n.target.value),className:"w-full h-7 rounded border border-zinc-800 bg-zinc-900/50 text-[11px] text-left px-2 pr-6 appearance-none bg-no-repeat bg-[length:12px] bg-[right_0.25rem_center] focus:ring-2 focus:ring-blue-600 focus:outline-none",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23717171' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")`},children:[o?s.jsx("option",{value:"",children:o}):null,i.map(n=>s.jsx("option",{value:n.value,children:String(n.label)},n.value))]}),_]})}function yt(e){return null}function kt({className:e,children:_}){return s.jsx("div",{className:he("hidden",e),"aria-hidden":!0,children:_})}function dr({className:e,value:_,children:r}){return s.jsx("div",{"data-value":_,className:e,"aria-hidden":!0,children:r})}wt.displayName="SelectTrigger",yt.displayName="SelectValue",kt.displayName="SelectContent",dr.displayName="SelectItem";const ur=me.createContext(null);function hr(){const e=me.useContext(ur);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function pr({open:e,onOpenChange:_,children:r}){const[m,u]=me.useState(!1),i=e!==void 0,o=i?e:m,n=me.useCallback(h=>{i||u(h),_==null||_(h)},[i,_]),l=me.useMemo(()=>({open:o,onOpenChange:n}),[o,n]);return s.jsx(ur.Provider,{value:l,children:r})}function ro({asChild:e,children:_}){const{onOpenChange:r}=hr(),m=me.Children.only(_);return e&&me.isValidElement(m)?me.cloneElement(m,{onClick:u=>{var i,o;(o=(i=m.props).onClick)==null||o.call(i,u),r(!0)}}):s.jsx("button",{type:"button",onClick:()=>r(!0),children:_})}function fr({className:e,children:_,preventCloseOnBackdropClick:r,...m}){const{open:u,onOpenChange:i}=hr();if(me.useEffect(()=>{const n=l=>{l.key==="Escape"&&i(!1)};return u&&(document.addEventListener("keydown",n),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",n),document.body.style.overflow=""}},[u,i]),!u)return null;const o=n=>{n.preventDefault(),n.stopPropagation()};return Nr.createPortal(s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 z-[9998] bg-black/60","aria-hidden":!0,onClick:()=>!r&&i(!1),onDragOver:o,onDrop:o}),s.jsx("div",{role:"dialog","aria-modal":!0,className:he("fixed left-1/2 top-1/2 z-[9999] w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg border border-zinc-700 bg-zinc-900 p-4 shadow-xl",e),onClick:n=>n.stopPropagation(),...m,children:_})]}),document.body)}function mr({className:e,..._}){return s.jsx("div",{className:he("flex flex-col gap-1.5 pb-4",e),..._})}function no({className:e,..._}){return s.jsx("div",{className:he("flex justify-end gap-2 pt-4",e),..._})}function br({className:e,..._}){return s.jsx("h2",{className:he("text-sm font-semibold text-white",e),..._})}function gr({className:e,..._}){return s.jsx("p",{className:he("text-xs text-zinc-400",e),..._})}const De=me.forwardRef(({className:e,variant:_="default",size:r="default",asChild:m,children:u,...i},o)=>{const n="inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 disabled:pointer-events-none disabled:opacity-50",l={default:"bg-blue-600 text-white hover:bg-blue-700",outline:"border border-zinc-700 bg-transparent hover:bg-zinc-800",ghost:"hover:bg-zinc-800"},h={sm:"h-7 px-2.5 text-xs",default:"h-9 px-4 text-sm",lg:"h-10 px-6 text-base"};if(m&&me.isValidElement(u)){const f=u,x=he(n,l[_],h[r],f.props.className,e);return me.cloneElement(f,{className:x})}return s.jsx("button",{ref:o,type:"button",className:he(n,l[_],h[r],e),...i,children:u})});De.displayName="Button";const oo=["library","upload","url"];function io({library:e,selectedId:_,onSelect:r}){const[m,u]=q.useState(""),[i,o]=q.useState("all"),n=["all",...new Set(e.flatMap(h=>h.tags??[]))],l=e.filter(h=>{const f=i==="all"||(h.tags??[]).includes(i),x=!m||(h.alt??"").toLowerCase().includes(m.toLowerCase());return f&&x});return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Wn,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-600 pointer-events-none"}),s.jsx(xt,{value:m,onChange:h=>u(h.target.value),placeholder:"Cerca immagini...",className:"pl-9 h-8 text-xs bg-zinc-900/50 border-zinc-800"})]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(h=>s.jsx("button",{type:"button",onClick:()=>o(h),className:he("px-2.5 py-1 rounded text-[10px] font-medium border transition-colors",i===h?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-700 text-zinc-500 hover:border-zinc-600 hover:text-zinc-400"),children:h==="all"?"Tutte":h},h))}),l.length>0?s.jsx("div",{className:"grid grid-cols-3 gap-2.5 max-h-[45vh] overflow-y-auto",children:l.map(h=>{const f=_===h.id;return s.jsxs("button",{type:"button",onClick:()=>r(f?null:h.id),className:he("group relative aspect-[4/3] rounded-lg overflow-hidden","ring-1 transition-all duration-150",f?"ring-blue-500 ring-2 ring-offset-1 ring-offset-zinc-900":"ring-zinc-800 hover:ring-zinc-600 hover:scale-[1.02]"),children:[s.jsx("img",{src:h.url,alt:h.alt,loading:"lazy",className:he("w-full h-full object-cover transition-[filter] duration-150",f?"brightness-[0.6]":"brightness-[0.85] group-hover:brightness-100")}),s.jsx("div",{className:he("absolute inset-x-0 bottom-0 px-2 py-1.5","bg-gradient-to-t from-black/70 to-transparent","opacity-0 group-hover:opacity-100 transition-opacity",f&&"opacity-100"),children:s.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:h.alt})}),f&&s.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:s.jsx(nr,{size:14,className:"text-white"})})]},h.id)})}):s.jsx("div",{className:"text-center py-12 text-zinc-600 text-xs",children:"Nessuna immagine in libreria. Configura assets.assetsManifest nel tenant (es. da public/assets)."})]})}function ao({preview:e,onPreviewChange:_,onAssetUpload:r}){const[m,u]=q.useState(!1),i=q.useRef(null),o=q.useCallback(async f=>{if(fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"handleFile called",data:{fileName:f.name,hasOnAssetUpload:!!r},timestamp:Date.now(),hypothesisId:"H5"})}).catch(()=>{}),!f.type.startsWith("image/"))return;if(r){try{const v=await r(f);fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"onAssetUpload resolved",data:{url:v==null?void 0:v.slice(0,50)},timestamp:Date.now(),hypothesisId:"H2,H5"})}).catch(()=>{}),_({name:f.name,size:f.size,dataUrl:v})}catch{const v=new FileReader;v.onload=c=>{var b;_({name:f.name,size:f.size,dataUrl:(b=c.target)==null?void 0:b.result})},v.readAsDataURL(f)}return}const x=new FileReader;x.onload=v=>{var c;_({name:f.name,size:f.size,dataUrl:(c=v.target)==null?void 0:c.result})},x.readAsDataURL(f)},[_,r]),n=q.useCallback(f=>{var v,c;f.preventDefault(),f.stopPropagation(),u(!1);const x=(c=(v=f.dataTransfer)==null?void 0:v.files)==null?void 0:c[0];x&&o(x)},[o]),l=q.useCallback(f=>{f.preventDefault(),f.stopPropagation(),u(!0)},[]),h=q.useCallback(f=>{var v;const x=(v=f.target.files)==null?void 0:v[0];x&&o(x)},[o]);return s.jsxs("div",{onDragOver:l,onDragEnter:l,onDragLeave:f=>{f.preventDefault(),f.stopPropagation(),u(!1)},onDrop:n,onClick:()=>{var f;return!e&&((f=i.current)==null?void 0:f.click())},className:he("rounded-xl border-2 border-dashed transition-all min-h-[240px]","flex flex-col items-center justify-center overflow-hidden cursor-pointer relative",m?"border-blue-500/50 bg-blue-500/[0.04]":e?"border-zinc-800 bg-transparent cursor-default":"border-zinc-800 bg-white/[0.01] hover:border-zinc-600 hover:bg-white/[0.02]"),children:[e?s.jsxs(s.Fragment,{children:[s.jsx("img",{src:e.dataUrl,alt:"Upload preview",className:"w-full max-h-[320px] object-contain"}),s.jsxs("div",{className:"absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/80 to-transparent p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-medium text-white",children:e.name}),s.jsxs("p",{className:"text-[10px] text-zinc-400",children:[(e.size/1024).toFixed(1)," KB"]})]}),s.jsx(De,{type:"button",variant:"ghost",className:"text-zinc-400 hover:text-red-400 hover:bg-red-500/10 h-8 w-8 p-0",onClick:f=>{f.stopPropagation(),_(null)},children:s.jsx(nt,{size:14})})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/10 flex items-center justify-center text-blue-500 mb-3",children:s.jsx(lr,{size:22})}),s.jsx("p",{className:"text-sm font-medium text-white mb-1",children:"Trascina un'immagine qui"}),s.jsx("p",{className:"text-[11px] text-zinc-500 mb-3",children:"oppure clicca per selezionare un file"}),s.jsx("span",{className:"text-[10px] text-zinc-600 bg-white/[0.03] px-3 py-1 rounded",children:"PNG, JPG, WebP — max 5MB"})]}),s.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:h})]})}function so({urlPreview:e,onUrlPreviewChange:_}){const[r,m]=q.useState(""),[u,i]=q.useState(!1),o=()=>{if(r.trim())try{new URL(r),_(r),i(!1)}catch{i(!0),_(null)}};return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(Oe,{className:"block text-[10px] font-bold uppercase tracking-[0.08em] text-zinc-500 mb-1.5",children:"URL immagine"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(xt,{value:r,onChange:n=>{m(n.target.value),i(!1)},onKeyDown:n=>n.key==="Enter"&&o(),placeholder:"https://images.unsplash.com/photo-...",className:he("h-8 text-xs bg-zinc-900/50 border-zinc-800",u&&"border-red-500/50")}),s.jsx(De,{type:"button",variant:"outline",onClick:o,className:"shrink-0 h-8",children:"Anteprima"})]}),u&&s.jsx("p",{className:"text-[11px] text-red-400 mt-1.5",children:"URL non valido. Inserisci un URL completo (https://…)"})]}),e?s.jsxs("div",{className:"rounded-lg overflow-hidden ring-1 ring-zinc-800",children:[s.jsx("img",{src:e,alt:"URL preview",className:"w-full max-h-[320px] object-contain bg-black/30",onError:()=>{i(!0),_(null)}}),s.jsxs("div",{className:"px-3.5 py-2.5 bg-white/[0.02] border-t border-zinc-800 flex items-center gap-2",children:[s.jsx(nr,{size:14,className:"text-emerald-400"}),s.jsx("span",{className:"text-[11px] text-zinc-500",children:"Immagine caricata correttamente"})]})]}):u?null:s.jsxs("div",{className:"flex flex-col items-center py-12 text-zinc-600",children:[s.jsx(ir,{size:32,className:"mb-3 opacity-40"}),s.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const lo=({open:e,onOpenChange:_,onSelect:r})=>{const{assets:m}=Ze(),u=(m==null?void 0:m.assetsManifest)??[],[i,o]=q.useState("library"),[n,l]=q.useState(null),[h,f]=q.useState(null),[x,v]=q.useState(null);q.useEffect(()=>{e&&(o("library"),l(null),f(null),v(null))},[e]),q.useEffect(()=>{if(!e||i!=="upload")return;const p=()=>{fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:beforeunload",message:"beforeunload fired",data:{},timestamp:Date.now(),hypothesisId:"H1"})}).catch(()=>{})};return window.addEventListener("beforeunload",p),()=>window.removeEventListener("beforeunload",p)},[e,i]),q.useEffect(()=>{if(!e||i!=="upload")return;const p=E=>{E.preventDefault()},k={capture:!0};return document.addEventListener("dragover",p,k),document.addEventListener("drop",p,k),window.addEventListener("dragover",p,k),window.addEventListener("drop",p,k),()=>{document.removeEventListener("dragover",p,k),document.removeEventListener("drop",p,k),window.removeEventListener("dragover",p,k),window.removeEventListener("drop",p,k)}},[e,i]);const c=i==="library"&&n!=null||i==="upload"&&h!=null||i==="url"&&x!=null,b=()=>{if(i==="library"&&n){const p=u.find(k=>k.id===n);p&&r({url:p.url,alt:p.alt})}else i==="upload"&&h?r({url:h.dataUrl,alt:h.name}):i==="url"&&x&&r({url:x,alt:""});setTimeout(()=>_(!1),0)},d=i==="library"&&n?"1 immagine selezionata":i==="upload"&&h?h.name:i==="url"&&x?"URL pronto":"Nessuna selezione",g=p=>{p.preventDefault(),p.stopPropagation()};return s.jsx(pr,{open:e,onOpenChange:_,children:s.jsxs(fr,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:g,onDrop:g,children:[s.jsxs(mr,{className:"px-5 py-4 flex flex-row items-start justify-between gap-4 border-b border-zinc-800",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/15 text-blue-500",children:s.jsx(rt,{size:18})}),s.jsxs("div",{children:[s.jsx(br,{children:"Image Picker"}),s.jsx(gr,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),s.jsx("button",{type:"button",onClick:()=>_(!1),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Chiudi",children:s.jsx(Me,{size:18})})]}),s.jsx("div",{className:"flex border-b border-zinc-800",children:oo.map(p=>s.jsxs("button",{type:"button",onClick:()=>o(p),className:he("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===p?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[p==="library"&&s.jsx(rt,{size:14}),p==="upload"&&s.jsx(lr,{size:14}),p==="url"&&s.jsx(ir,{size:14}),p==="library"?"Libreria":p==="upload"?"Upload":"URL"]},p))}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&s.jsx(io,{library:u,selectedId:n,onSelect:l}),i==="upload"&&s.jsx(ao,{preview:h,onPreviewChange:f,onAssetUpload:m==null?void 0:m.onAssetUpload}),i==="url"&&s.jsx(so,{urlPreview:x,onUrlPreviewChange:v})]}),s.jsxs(no,{className:"px-5 py-4 border-t border-zinc-800 flex-row justify-between",children:[s.jsx("span",{className:"text-[10px] uppercase tracking-[0.05em] text-zinc-600",children:d}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(De,{type:"button",variant:"outline",size:"sm",onClick:()=>_(!1),children:"Annulla"}),s.jsx(De,{type:"button",size:"sm",disabled:!c,onClick:b,className:he(!c&&"opacity-40"),children:"Inserisci immagine"})]})]})]})})},vr=(e,_="default")=>{if(e.startsWith("http")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/assets/"))return e;if(e.startsWith("assets/"))return`/${e}`;if(e.startsWith("/uploaded-assets/"))return e;if(!/\.(jpg|jpeg|png|gif|svg|pdf|webp|mp4|webm|ogg)$/i.test(e))return e.startsWith("/")?e:`/${e}`;const m=e.replace(/^\//,"");return`/assets/${_}/${m}`},co=({value:e,onChange:_,label:r="IMAGE",className:m})=>{const{tenantId:u="default"}=Ze(),[i,o]=q.useState(!1),[n,l]=q.useState(!1),h=!!(e!=null&&e.url),f=e!=null&&e.url?vr(e.url,u):"",x=c=>{_(c),o(!1)},v=c=>{c.stopPropagation(),_({url:"",alt:""})};return s.jsxs("div",{className:he("space-y-1.5",m),children:[s.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:r}),h?s.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(!0),onKeyDown:c=>c.key==="Enter"&&o(!0),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:he("relative rounded-lg overflow-hidden cursor-pointer","ring-1 ring-zinc-800 transition-all",n&&"ring-blue-500/40"),children:[s.jsx("img",{src:f,alt:(e==null?void 0:e.alt)??"",className:"w-full h-40 object-cover block",onError:c=>{c.target.style.display="none"}}),s.jsx("div",{className:he("absolute inset-0 flex items-center justify-center gap-2 transition-all duration-150",n?"bg-black/50":"bg-black/0"),children:n&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-1.5 bg-white/15 backdrop-blur-md rounded-lg px-3.5 py-2 text-white text-xs font-medium",children:[s.jsx(Bn,{size:13}),s.jsx("span",{children:"Cambia"})]}),s.jsx(De,{type:"button",variant:"ghost",className:"h-8 w-8 p-0 bg-red-500/15 backdrop-blur-md text-red-300 hover:text-red-200 hover:bg-red-500/25",onClick:v,children:s.jsx(nt,{size:13})})]})}),s.jsx("div",{className:"px-2.5 py-1.5 bg-black/50 text-[10px] text-zinc-500 truncate",children:((e==null?void 0:e.url)??"").length>50?"…"+((e==null?void 0:e.url)??"").slice(-47):(e==null?void 0:e.url)??""})]}):s.jsxs("button",{type:"button",onClick:()=>o(!0),className:he("w-full rounded-lg border-2 border-dashed border-zinc-800 py-7","flex flex-col items-center gap-2","bg-white/[0.01] transition-all","hover:border-blue-500/30 hover:bg-blue-500/[0.03]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"),children:[s.jsx("div",{className:"w-9 h-9 rounded-lg bg-blue-500/10 flex items-center justify-center text-blue-500",children:s.jsx(rt,{size:18})}),s.jsx("span",{className:"text-xs text-zinc-400 font-medium",children:"Clicca per aggiungere un'immagine"}),s.jsx("span",{className:"text-[10px] text-zinc-600",children:"Libreria · Upload · URL"})]}),s.jsx(lo,{open:i,onOpenChange:o,onSelect:x})]})},xr=[{name:"layers",Icon:gt},{name:"github",Icon:Rn},{name:"arrow-right",Icon:Tn},{name:"box",Icon:Dn},{name:"terminal",Icon:Hn},{name:"chevron-right",Icon:Ln},{name:"menu",Icon:Mn},{name:"x",Icon:Me},{name:"sparkles",Icon:$n},{name:"zap",Icon:Vn}],Ge={"ui:text":({label:e,value:_,onChange:r})=>s.jsxs("div",{className:"grid w-full items-center gap-1.5 mb-4",children:[s.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),s.jsx(xt,{type:"text",className:"h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600",value:_||"",onChange:m=>r(m.target.value)})]}),"ui:textarea":({label:e,value:_,onChange:r})=>s.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[s.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),s.jsx(Xn,{className:"min-h-[80px] text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600 resize-none",value:_||"",onChange:m=>r(m.target.value)})]}),"ui:select":({label:e,value:_,onChange:r,options:m=[]})=>s.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[s.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),s.jsxs(to,{value:_||"",onValueChange:r,children:[s.jsx(wt,{className:"w-full h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus:ring-blue-600",children:s.jsx(yt,{placeholder:"Select..."})}),s.jsx(kt,{className:"dark",children:m.map(u=>s.jsx(dr,{value:u,className:"text-[11px]",children:u},u))})]})]}),"ui:checkbox":({label:e,value:_,onChange:r})=>s.jsxs("div",{className:"flex items-center space-x-2 mb-4 p-2 rounded border border-zinc-800/50 bg-zinc-900/20",children:[s.jsx(Qn,{id:e,checked:!!_,onCheckedChange:m=>r(m===!0)}),s.jsx(Oe,{htmlFor:e,className:"text-[11px] font-medium cursor-pointer select-none text-zinc-300",children:e})]}),"ui:image-picker":({label:e,value:_,onChange:r})=>{const m=_!=null&&typeof _=="object"&&"url"in _?{url:String(_.url??""),alt:String(_.alt??"")}:{url:typeof _=="string"?_:"",alt:""},u=i=>{r(i)};return s.jsx("div",{className:"mb-4",children:s.jsx(co,{label:e,value:m,onChange:u})})},"ui:icon-picker":({label:e,value:_,onChange:r})=>{const[m,u]=q.useState(!1),i=xr.find(o=>o.name===(_||""));return s.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[s.jsx(Oe,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),s.jsxs(pr,{open:m,onOpenChange:u,children:[s.jsx(ro,{asChild:!0,children:s.jsx(De,{variant:"outline",className:"w-full h-9 rounded-md border border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 flex items-center gap-2 text-left",children:i?s.jsxs(s.Fragment,{children:[s.jsx(i.Icon,{size:16,className:"text-zinc-400 shrink-0"}),s.jsx("span",{className:"text-[11px] text-zinc-300 capitalize truncate",children:i.name})]}):s.jsxs(s.Fragment,{children:[s.jsx(rt,{size:16,className:"text-zinc-500 shrink-0"}),s.jsx("span",{className:"text-[11px] text-zinc-500",children:"Choose icon..."})]})})}),s.jsxs(fr,{className:"sm:max-w-[280px] p-4",children:[s.jsxs(mr,{children:[s.jsx(br,{className:"text-sm",children:"Choose icon"}),s.jsx(gr,{className:"text-xs",children:"Click an icon to select it."})]}),s.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:xr.map(({name:o,Icon:n})=>s.jsx("button",{type:"button",onClick:()=>{r(o),u(!1)},className:he("flex items-center justify-center w-10 h-10 rounded-md border transition-colors",_===o?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 text-zinc-400 hover:text-zinc-200"),title:o,children:s.jsx(n,{size:20})},o))})]})]})]})}},_t=e=>{if(e instanceof je.z.ZodOptional||e instanceof je.z.ZodDefault)return _t(e._def.innerType);if(e instanceof je.z.ZodObject){const _={id:crypto.randomUUID()};for(const r in e.shape)r!=="id"&&(_[r]=_t(e.shape[r]));return _}return e instanceof je.z.ZodArray?[]:e instanceof je.z.ZodString?"":e instanceof je.z.ZodNumber?0:e instanceof je.z.ZodBoolean?!1:e instanceof je.z.ZodEnum?e._def.values[0]:null},zt=e=>e instanceof je.z.ZodOptional||e instanceof je.z.ZodDefault?zt(e._def.innerType):e,it=(e,_)=>e&&!_?"opacity-10":"opacity-100",Be=(e,_)=>e!=null&&_.toLowerCase()===e.toLowerCase(),uo=(e,_)=>{if(!e)return;const r=_.toLowerCase(),m=Object.entries(e).find(([u])=>u.toLowerCase()===r);return m==null?void 0:m[1]},Ve=({schema:e,data:_,onChange:r,keys:m,expandedItemPath:u,expandedItemIdByField:i,focusedFieldKey:o,onSidebarExpandedItemChange:n})=>{const l=e.shape,h=m!=null?Object.keys(l).filter(b=>m.includes(b)):Object.keys(l),f=u==null?void 0:u[0],x=(f==null?void 0:f.itemId)!=null?{[f.fieldKey]:f.itemId}:i,v=(f==null?void 0:f.fieldKey)??o??null,c=v!=null;return s.jsx("div",{className:"space-y-4",children:h.map(b=>{const d=l[b];if(!d)return null;const g=zt(d),p=d.description||"ui:text",k=_[b];if(p==="ui:image-picker"&&g instanceof je.z.ZodObject){const O=Be(v,b),L=Ge["ui:image-picker"]||Ge["ui:text"];return s.jsx("div",{className:`transition-opacity duration-200 ${it(c,O)}`,...O?{"data-jp-focused-field":b}:{},children:s.jsx(L,{label:b,value:k,onChange:D=>r({..._,[b]:D})})},b)}if(g instanceof je.z.ZodObject){const O=k||{},L=Be(v,b);return s.jsxs("div",{className:`group/obj mb-6 p-4 border border-zinc-800 rounded-lg bg-zinc-900/20 hover:border-zinc-700 transition-[border-color,opacity] duration-200 ${it(c,L)}`,...L?{"data-jp-focused-field":b}:{},children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),s.jsx("h4",{className:"text-[10px] font-black uppercase text-zinc-400 tracking-widest",children:b})]}),s.jsx(Ve,{schema:g,data:O,onChange:D=>r({..._,[b]:D}),expandedItemPath:u&&Be(f==null?void 0:f.fieldKey,b)?u.slice(1):void 0,expandedItemIdByField:x,focusedFieldKey:v})]},b)}if(g instanceof je.z.ZodArray){const O=Array.isArray(k)?k:[],L=zt(g.element),D=(j,R)=>{if(R<0||R>=O.length)return;const a=[...O],[M]=a.splice(j,1);a.splice(R,0,M),r({..._,[b]:a})},T=Be(v,b),V=Be(f==null?void 0:f.fieldKey,b)?f==null?void 0:f.itemId:void 0,re=uo(x,b)??V;return s.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${it(c,T)}`,...T?{"data-jp-focused-field":b}:{},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("label",{className:"text-[10px] font-black uppercase text-zinc-500 tracking-widest",children:[b," (",O.length,")"]}),s.jsxs("button",{type:"button",onClick:()=>{const j=_t(L);r({..._,[b]:[...O,j]})},className:"flex items-center gap-1 px-2 py-1 bg-blue-600/10 hover:bg-blue-600/20 text-blue-500 rounded text-[10px] font-bold transition-colors",children:[s.jsx(ar,{size:12})," Add Item"]})]}),s.jsx("div",{className:"space-y-2",children:O.map((j,R)=>{const a=j,M=a.id||`legacy-${R}`,te=(typeof a.title=="string"?a.title:null)||(typeof a.label=="string"?a.label:null)||(typeof a.name=="string"?a.name:null)||(typeof a.content=="string"?a.content:null)||(typeof a.text=="string"?a.text:null)||`${b} #${R+1}`,U=re,W=String(a.id??M),K=U!=null&&String(U)===W,X=K&&u&&u.length>1?u.slice(1):void 0,z=c&&T&&U!=null&&!K;return s.jsx(ho,{itemId:W,openItemId:U!=null?String(U):void 0,isFaded:z,index:R,isFirst:R===0,isLast:R===O.length-1,label:te,onExpandedChange:n?N=>n(N?{fieldKey:b,itemId:W}:null):void 0,onRemove:()=>{const N=O.filter((J,G)=>G!==R);r({..._,[b]:N})},onMoveUp:()=>D(R,R-1),onMoveDown:()=>D(R,R+1),children:L instanceof je.z.ZodObject?s.jsx(Ve,{schema:L,data:a||{},expandedItemPath:X,onChange:N=>{const J=[...O];J[R]=N,r({..._,[b]:J})}}):s.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},M)})})]},b)}const E=Ge[p]||Ge["ui:text"],S=g instanceof je.z.ZodEnum?g._def.values:void 0,C=Be(v,b);return s.jsx("div",{className:`transition-opacity duration-200 ${it(c,C)}`,...C?{"data-jp-focused-field":b}:{},children:s.jsx(E,{label:b,value:k,options:S,onChange:O=>r({..._,[b]:O})})},b)})})},ho=({itemId:e,openItemId:_,isFaded:r=!1,label:m,onExpandedChange:u,onRemove:i,onMoveUp:o,onMoveDown:n,isFirst:l,isLast:h,children:f})=>{const x=_!=null&&String(_)===String(e),[v,c]=q.useState(x);q.useEffect(()=>{x&&!v&&c(!0),!x&&v&&c(!1)},[x,v]);const b=()=>{const g=!v;c(g),u==null||u(g)},d=x&&v;return s.jsxs("div",{className:`border border-zinc-800 rounded-md bg-zinc-900/40 overflow-hidden transition-opacity duration-200 ${r?"opacity-10":"opacity-100"}`,...d?{"data-jp-expanded-item":e}:{},children:[s.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-900/60",children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsxs("button",{type:"button",onClick:b,className:"flex items-center gap-2 text-[10px] font-bold text-zinc-300 uppercase tracking-tight truncate",children:[v?s.jsx(mt,{size:12,className:"shrink-0"}):s.jsx(ft,{size:12,className:"shrink-0"}),s.jsx("span",{className:"truncate",children:m})]})}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[s.jsx("button",{type:"button",disabled:l,onClick:o,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:s.jsx(On,{size:12})}),s.jsx("button",{type:"button",disabled:h,onClick:n,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:s.jsx(In,{size:12})}),s.jsx("div",{className:"w-px h-3 bg-zinc-800 mx-1"}),s.jsx("button",{type:"button",onClick:i,className:"text-zinc-600 hover:text-red-500 transition-colors p-1",children:s.jsx(nt,{size:12})})]})]}),v&&s.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:f})]})},wr=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),yr=({selectedSection:e,pageData:_,allSectionsData:r=[],onUpdate:m,onUpdateSection:u,onClose:i,expandedItemPath:o=null,onReorderSection:n,allLayers:l=[],activeSectionId:h,onRequestScrollToSection:f,onDeleteSection:x,onAddSection:v,hasChanges:c=!1,onExportHTML:b,onSaveToFile:d,saveSuccessFeedback:g=!1,onResetToFile:p,showResetToFile:k=!1})=>{const{schemas:E}=Ze(),[S,C]=q.useState(!0),[O,L]=q.useState(null),[D,T]=q.useState(null),[V,re]=q.useState(null),[j,R]=q.useState(null),[a,M]=q.useState(null),te=q.useRef(null),U=q.useRef(null),W=q.useDeferredValue(e),K=e!=null&&(W==null?void 0:W.id)!==e.id,X=o&&o.length>0?o:j?[j]:null,z=X!=null&&X.length?{fieldKey:X[X.length-1].fieldKey,itemId:X[X.length-1].itemId}:null,N=q.useRef(o);q.useEffect(()=>{N.current!=null&&o==null&&R(null),N.current=o},[o]),q.useEffect(()=>{(e==null?void 0:e.id)!=null&&C(!1)},[e==null?void 0:e.id]);const J=()=>{const A=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const y=te.current;y&&y.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(A)},G=q.useRef(S);q.useEffect(()=>{if(S&&!G.current){const A=J();return G.current=S,A}G.current=S},[S]),q.useEffect(()=>{if(!z)return;const A=te.current;if(!A)return;const y=requestAnimationFrame(()=>{const w=A.querySelector("[data-jp-expanded-item]")??A.querySelector("[data-jp-focused-field]");w&&w.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(y)},[z]);const Q=A=>{C(!1),f==null||f(A)},ue=()=>{C(A=>{const y=!A;return y&&J(),y})},ie=(A,y)=>{y.stopPropagation(),r.length>0&&u?M(A):(C(!1),f==null||f(A))};q.useEffect(()=>{if(a==null)return;const A=y=>{y.key==="Escape"&&M(null)};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[a]);const le=A=>{O===A?(x==null||x(A),L(null)):(L(A),setTimeout(()=>L(null),3e3))},ce=(A,y)=>{T(y),A.dataTransfer.effectAllowed="move",A.dataTransfer.setData("application/json",JSON.stringify({sectionId:y}))},ge=(A,y)=>{A.preventDefault(),D!==y&&re(y)},fe=(A,y)=>{if(A.preventDefault(),T(null),re(null),!D||D===y||!n)return;const w=l.filter(Z=>Z.scope==="local"),I=w.findIndex(Z=>Z.id===D),$=w.findIndex(Z=>Z.id===y);I===-1||$===-1||n(D,$)},we=e?_.sections.find(A=>A.id===e.id):void 0,ze=W?_.sections.find(A=>A.id===W.id):void 0,t=W?E[W.type]:void 0,H=l.length>0&&(S||!e);return s.jsxs("aside",{className:"relative w-full h-full bg-zinc-950 border-l border-zinc-800 flex flex-col shadow-2xl shrink-0 min-w-0 animate-in slide-in-from-right duration-300",children:[s.jsxs("div",{className:"sticky top-0 z-10 flex flex-col shrink-0 bg-zinc-950 border-b border-zinc-800",children:[s.jsxs("div",{className:"py-2 px-3 flex justify-between items-center bg-zinc-900/50",children:[s.jsx("div",{className:"flex items-center gap-2 min-w-0",children:s.jsxs("div",{children:[s.jsx("h3",{className:"text-sm font-bold text-white leading-tight",children:"Inspector"}),s.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider flex items-center gap-1.5 leading-tight mt-0.5",children:e?s.jsxs(s.Fragment,{children:[n&&e.scope==="local"&&s.jsx("span",{className:"text-zinc-500 shrink-0",title:"Reorder section on page",children:s.jsx(bt,{size:12,strokeWidth:2})}),s.jsx("span",{className:"text-blue-400",children:e.type}),s.jsx("span",{className:"text-zinc-600",children:"|"}),s.jsx("span",{className:"text-zinc-500",children:e.scope})]}):s.jsx("span",{className:"text-zinc-500",children:"Waiting for Selection..."})})]})}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[v!=null&&s.jsxs("button",{type:"button",onClick:v,className:"flex items-center gap-1.5 text-zinc-500 hover:text-white transition-colors p-1 hover:bg-zinc-800 rounded",title:"Add section","aria-label":"Add section",children:[s.jsx(ar,{size:16}),s.jsx("span",{className:"text-xs font-medium",children:"Add section"})]}),s.jsx("button",{type:"button",onClick:i,className:"p-1 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors",title:"Close Inspector","aria-label":"Close Inspector",children:s.jsx(Me,{size:16})})]})]}),l.length>0&&s.jsxs("div",{className:"bg-zinc-900/20 opacity-100",children:[s.jsxs("button",{type:"button",onClick:ue,className:"w-full flex items-center justify-between py-3 px-4 hover:bg-zinc-800/30 transition-colors cursor-pointer text-left rounded-none border-0 bg-transparent","aria-expanded":H,"aria-label":H?"Collapse Page Layers":"Expand Page Layers",children:[s.jsxs("span",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(gt,{size:14,className:"text-primary shrink-0"}),s.jsx("span",{className:"text-xs font-bold text-white",children:"Page Layers"}),s.jsxs("span",{className:"text-[10px] text-zinc-500",children:["(",l.length,")"]})]}),s.jsx("span",{className:"text-zinc-500 shrink-0 pointer-events-none","aria-hidden":!0,children:H?s.jsx(mt,{size:14}):s.jsx(ft,{size:14})})]}),!H&&e&&(()=>{const A=l.find(w=>w.id===e.id);if(!A)return null;const y=h===e.id;return s.jsxs("div",{className:"px-3 py-2 flex items-center gap-2 bg-primary/10 border-t border-zinc-800/50",children:[s.jsx(bt,{size:12,className:"text-primary shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("p",{className:"text-[10px] font-mono uppercase tracking-wider text-primary truncate flex items-center gap-1",children:[A.type,y&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),s.jsx("p",{className:"text-xs text-white font-medium truncate",children:A.title??`${A.type} section`})]}),s.jsx("button",{type:"button",onClick:w=>ie(A.id,w),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${A.type}`,"aria-label":`Open settings for ${A.type} section`,children:s.jsx(sr,{size:12})})]})})()]})]}),s.jsxs("div",{ref:te,className:"flex-1 min-h-0 overflow-y-auto flex flex-col custom-scrollbar",children:[H&&s.jsxs("div",{className:"border-b border-zinc-800 bg-zinc-900/20 px-3 pb-3 pt-1",children:[l.map(A=>{const y=(e==null?void 0:e.id)===A.id,w=h===A.id,I=D===A.id,$=V===A.id,Z=A.scope==="local"&&x,Y=A.scope==="local"&&!!n;return s.jsxs("div",{draggable:Y,onDragStart:F=>Y&&ce(F,A.id),onDragOver:F=>Y&&ge(F,A.id),onDragLeave:()=>re(null),onDrop:F=>Y&&fe(F,A.id),onDragEnd:()=>{T(null),re(null)},className:he("flex items-center gap-2 py-2.5 px-2 rounded-sm border-t transition-colors",$&&"border-t-2 border-dashed border-primary bg-primary/5",!$&&y&&"border-primary/30 bg-primary/10",!$&&!y&&"border-zinc-800/90 hover:bg-zinc-800/40",I&&"opacity-40",Y?"cursor-grab active:cursor-grabbing":"cursor-default"),children:[s.jsx(bt,{size:12,className:`shrink-0 ${y?"text-primary":"text-zinc-500"}`}),s.jsxs("button",{type:"button",onClick:()=>Q(A.id),className:"flex-1 min-w-0 text-left",children:[s.jsxs("p",{className:"text-[10px] font-mono uppercase tracking-wider text-zinc-400 truncate flex items-center gap-1",children:[A.type,w&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),s.jsx("p",{className:`text-xs truncate ${y?"text-white font-medium":"text-zinc-500"}`,children:A.title??`${A.type} section`})]}),s.jsx("button",{type:"button",onClick:F=>ie(A.id,F),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${A.type}`,"aria-label":`Open settings for ${A.type} section`,children:s.jsx(sr,{size:12})}),Z&&s.jsx("button",{type:"button",onClick:F=>{F.stopPropagation(),le(A.id)},className:`p-1 rounded shrink-0 ${O===A.id?"bg-red-500/20 text-red-400":"text-zinc-500 hover:text-red-400"}`,title:"Delete section",children:s.jsx(nt,{size:12})})]},A.id)}),O&&s.jsxs("div",{className:"flex items-center gap-2 py-2 px-3 mt-1 rounded-md bg-amber-500/10 border border-amber-500/30",children:[s.jsx(Pn,{size:12,className:"text-amber-500 shrink-0"}),s.jsx("p",{className:"text-[10px] text-amber-500 font-medium",children:"Click delete again to confirm"})]})]}),z&&we&&(()=>{const A=we.data||{};let y;if(X&&X.length>0){let w=A;for(const Z of X){const P=w==null?void 0:w[Z.fieldKey];Z.itemId!=null&&Array.isArray(P)?w=P.find(F=>String(F==null?void 0:F.id)===String(Z.itemId))??null:w=P}const I=w||{},$=z.fieldKey;y=(typeof I.name=="string"?I.name:null)??(typeof I.title=="string"?I.title:null)??(typeof I.label=="string"?I.label:null)??$.charAt(0).toUpperCase()+$.slice(1).replace(/([A-Z])/g," $1").trim()}else{const w=z.fieldKey;if(z.itemId!=null){const Z=(Array.isArray(A[w])?A[w]:[]).find(P=>String(P==null?void 0:P.id)===String(z.itemId))||{};y=(typeof Z.name=="string"?Z.name:null)??(typeof Z.title=="string"?Z.title:null)??(typeof Z.label=="string"?Z.label:null)??w}else y=w.charAt(0).toUpperCase()+w.slice(1).replace(/([A-Z])/g," $1").trim()}return s.jsxs("div",{className:"px-4 py-2 border-b border-zinc-800 bg-zinc-900/50",children:[s.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-zinc-500",children:"Editing"}),s.jsx("p",{className:"text-xs font-medium text-white truncate mt-0.5",children:y})]})})(),s.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&C(!1),children:e?K?s.jsxs("div",{className:"space-y-4 animate-pulse",role:"status","aria-label":"Loading form",children:[s.jsx("div",{className:"h-4 w-3/4 rounded bg-zinc-800"}),s.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),s.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),s.jsx("div",{className:"h-20 rounded bg-zinc-800/80"}),s.jsx("div",{className:"h-10 rounded bg-zinc-800/60"})]}):t?(()=>{const y=Object.keys(t.shape).filter(P=>!wr.has(P)),w=(ze==null?void 0:ze.data)||{};if(y.length===0)return s.jsx("p",{className:"text-xs text-zinc-500",children:"No content fields in schema."});const I=X==null?void 0:X[0],$=(I==null?void 0:I.itemId)!=null?{[I.fieldKey]:I.itemId}:(z==null?void 0:z.itemId)!=null?{[z.fieldKey]:z.itemId}:void 0,Z=(I==null?void 0:I.fieldKey)??(z==null?void 0:z.fieldKey)??null;return s.jsx(Ve,{schema:t,data:w,onChange:P=>m(P),keys:y,expandedItemPath:X,expandedItemIdByField:$,focusedFieldKey:Z,onSidebarExpandedItemChange:R})})():s.jsxs("div",{className:"text-xs text-red-400 p-4 border border-dashed border-red-900/30 rounded bg-red-900/10",children:["No schema found for ",(W==null?void 0:W.type)??e.type]}):s.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"Select a layer above or on the stage to edit."})})]}),s.jsx("div",{className:"px-4 py-2.5 border-t border-zinc-800 bg-zinc-900/50 flex items-center gap-3 opacity-100 flex-wrap",children:(b!=null||d!=null||p!=null)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:he("w-2 h-2 rounded-full transition-colors duration-300 shrink-0",c?"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.5)]":"bg-emerald-500")}),s.jsx("span",{className:he("text-xs font-medium transition-colors duration-300 shrink-0",g?"text-emerald-400":c?"text-amber-500":"text-zinc-500"),children:g?"Salvato":c?"Unsaved Changes":"All Changes Saved"}),b!=null&&s.jsxs("button",{type:"button",onClick:b,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",children:[s.jsx(or,{size:12,className:"shrink-0"}),s.jsx("span",{children:"HTML"})]}),d!=null&&s.jsxs("button",{type:"button",onClick:A=>{A.preventDefault(),A.stopPropagation(),d()},disabled:!c,className:he("shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all",c?"bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),title:"Salva le modifiche sui file JSON del repo",children:[s.jsx(Un,{size:12,className:"shrink-0"}),s.jsx("span",{children:"Save"})]}),p!=null&&k&&s.jsx("button",{type:"button",onClick:p,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-400 hover:bg-zinc-800 hover:border-zinc-600 hover:text-zinc-300",title:"Ripristina la pagina dal file (elimina le modifiche in memoria)",children:s.jsx("span",{children:"Ripristina da file"})})]})}),a!=null&&r.length>0&&u!=null&&(()=>{const A=r.find(F=>F.id===a),y=l.find(F=>F.id===a);if(!A)return null;const w=(y==null?void 0:y.scope)==="global"?"global":"local",I=A.type,$=E[I],P=($?Object.keys($.shape):[]).filter(F=>wr.has(F)),Y=A.data??{};return P.length===0?s.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:()=>M(null),children:s.jsxs("div",{ref:U,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:F=>F.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[s.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",I]}),s.jsx("button",{type:"button",onClick:()=>M(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings",children:s.jsx(Me,{size:18})})]}),s.jsx("div",{className:"p-4",children:s.jsx("p",{className:"text-xs text-zinc-500",children:"No settings fields for this section."})})]})}):s.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:F=>F.target===F.currentTarget&&M(null),children:s.jsxs("div",{ref:U,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full max-h-[85vh] flex flex-col overflow-hidden",onClick:F=>F.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[s.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",I]}),s.jsx("button",{type:"button",onClick:()=>M(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings (Escape)",children:s.jsx(Me,{size:18})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:s.jsx(Ve,{schema:$,data:Y,onChange:F=>{const B={...A.data,...F};u(a,w,I,B)},keys:P})})]})})})()]})},kr=({draft:e,globalDraft:_,themeConfig:r,slug:m,selectedId:u,scrollToSectionId:i,onScrollRequested:o})=>{const n=q.useRef(null),l=q.useCallback(()=>{var h;(h=n.current)!=null&&h.contentWindow&&n.current.contentWindow.postMessage({type:ve.UPDATE_DRAFTS,draft:e,globalDraft:_,themeConfig:r},"*")},[e,_,r]);return q.useEffect(()=>{l()},[l]),q.useEffect(()=>{const h=f=>{f.data.type===ve.STAGE_READY&&l()};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[l]),q.useEffect(()=>{var h;(h=n.current)!=null&&h.contentWindow&&n.current.contentWindow.postMessage({type:ve.SYNC_SELECTION,selectedId:u},"*")},[u]),q.useEffect(()=>{var h;!i||!((h=n.current)!=null&&h.contentWindow)||(n.current.contentWindow.postMessage({type:ve.REQUEST_SCROLL_TO_SECTION,sectionId:i},"*"),o==null||o())},[i,o]),s.jsx("div",{className:"w-full h-full bg-background overflow-hidden",children:s.jsx("iframe",{ref:n,src:`/admin/preview/${m}`,className:"w-full h-full border-none",title:"JsonPages Stage"})})},at={setTheme:e=>{const _=document.documentElement,{tokens:r}=e,m={"--theme-primary":r.colors.primary,"--theme-secondary":r.colors.secondary,"--theme-accent":r.colors.accent,"--theme-background":r.colors.background,"--theme-surface":r.colors.surface,"--theme-surface-alt":r.colors.surfaceAlt,"--theme-text":r.colors.text,"--theme-text-muted":r.colors.textMuted,"--theme-border":r.colors.border,"--theme-font-primary":r.typography.fontFamily.primary,"--theme-font-mono":r.typography.fontFamily.mono,"--theme-radius-sm":r.borderRadius.sm,"--theme-radius-md":r.borderRadius.md,"--theme-radius-lg":r.borderRadius.lg};Object.entries(m).forEach(([u,i])=>{_.style.setProperty(u,i)})}},_r=()=>{var c;const[e,_]=q.useState(null),[r,m]=q.useState(null),[u,i]=q.useState(null),[o,n]=q.useState(null),[l,h]=q.useState(!1);if(q.useEffect(()=>{const b=d=>{d.data.type===ve.UPDATE_DRAFTS&&(_(d.data.draft),m(d.data.globalDraft),d.data.themeConfig&&at.setTheme(d.data.themeConfig)),d.data.type===ve.SYNC_SELECTION&&i(d.data.selectedId),d.data.type===ve.REQUEST_SCROLL_TO_SECTION&&n(d.data.sectionId??null),d.data.type===ve.REQUEST_CLEAN_HTML&&(h(!0),setTimeout(()=>{const g=document.documentElement.outerHTML;window.parent.postMessage({type:ve.SEND_CLEAN_HTML,html:g},"*"),h(!1)},50))};return window.addEventListener("message",b),window.parent.postMessage({type:ve.STAGE_READY},"*"),()=>window.removeEventListener("message",b)},[]),q.useEffect(()=>{const b=d=>{var j,R,a,M,te,U,W,K;const g=d.target,p=d.clientX,k=d.clientY;let E=null,S=g;for(;S&&S!==document.body;){const X=(j=S.getAttribute)==null?void 0:j.call(S,"data-section-id"),z=(R=S.getAttribute)==null?void 0:R.call(S,"data-section-type"),N=(a=S.getAttribute)==null?void 0:a.call(S,"data-section-scope");if(X&&z&&N){E=S;break}S=S.parentElement}if(!E)return;d.preventDefault(),d.stopPropagation();const C=E.getAttribute("data-section-id"),O=E.getAttribute("data-section-type"),L=E.getAttribute("data-section-scope");if(!C||!O||!L)return;const D={id:C,type:O,scope:L};if(g===E){window.parent.postMessage({type:ve.SECTION_SELECT,section:D},"*");return}const T=document.elementFromPoint(p,k)??g;if(!T||!E.contains(T)){window.parent.postMessage({type:ve.SECTION_SELECT,section:D},"*");return}if(T===E){window.parent.postMessage({type:ve.SECTION_SELECT,section:D},"*");return}const V=[];for(S=T;S&&S!==E;){const X=(M=S.getAttribute)==null?void 0:M.call(S,"data-jp-item-id"),z=(te=S.getAttribute)==null?void 0:te.call(S,"data-jp-item-field");X&&z&&V.push({fieldKey:z||"items",itemId:X}),S=S.parentElement}if(V.reverse(),V.length===0)for(S=T;S&&S!==E;){const X=(U=S.getAttribute)==null?void 0:U.call(S,"data-jp-field");if(X){V.push({fieldKey:X});break}S=S.parentElement}if(V.length===0&&T){let X=null;const z=N=>{var G,Q;const J=N.getBoundingClientRect();if(J.left<=p&&p<=J.right&&J.top<=k&&k<=J.bottom){for(let ue=0;ue<N.children.length;ue++)z(N.children[ue]);((G=N.getAttribute)!=null&&G.call(N,"data-jp-item-id")||(Q=N.getAttribute)!=null&&Q.call(N,"data-jp-field"))&&(X=N)}};if(z(T),X){const N=X,J=(W=N.getAttribute)==null?void 0:W.call(N,"data-jp-item-id"),G=(K=N.getAttribute)==null?void 0:K.call(N,"data-jp-field");J&&G?V.push({fieldKey:G||"items",itemId:J}):G&&V.push({fieldKey:G})}}const re={type:ve.SECTION_SELECT,section:D};if(V.length>0){re.itemPath=V;const X=V[0];X.itemId!=null?(re.itemField=X.fieldKey,re.itemId=X.itemId):re.itemField=X.fieldKey}window.parent.postMessage(re,"*")};return document.addEventListener("click",b,!0),()=>document.removeEventListener("click",b,!0)},[]),q.useEffect(()=>{if(!o)return;const b=setTimeout(()=>n(null),600);return()=>clearTimeout(b)},[o]),!e||!r)return s.jsx("div",{className:"flex items-center justify-center h-screen w-full bg-zinc-950 text-zinc-500 font-mono text-xs uppercase tracking-widest animate-pulse",children:"Waiting for Studio Signal..."});const f=(c=r.header)==null?void 0:c.data,x={main:(f==null?void 0:f.links)??[]},v=b=>{window.parent.postMessage({type:ve.ACTIVE_SECTION_CHANGED,activeSectionId:b},"*")};return s.jsx(tt,{mode:l?"visitor":"studio",children:s.jsx("div",{className:l?"":"jp-ice-active",children:s.jsx(vt,{pageConfig:e,siteConfig:r,menuConfig:x,selectedId:l?null:u,scrollToSectionId:o,onActiveSectionChange:v})})})};function po(e){return e.split("-").map(_=>_.charAt(0).toUpperCase()+_.slice(1).toLowerCase()).join(" ")}const zr=({open:e,onClose:_,sectionTypes:r,sectionTypeLabels:m,onSelect:u})=>{if(q.useEffect(()=>{if(!e)return;const o=n=>{n.key==="Escape"&&_()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,_]),!e)return null;const i=o=>(m==null?void 0:m[o])??po(o);return s.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"jp-add-section-title",children:[s.jsx("div",{className:"absolute inset-0 bg-zinc-950/80 backdrop-blur-sm",onClick:_,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md max-h-[85vh] flex flex-col rounded-xl border border-zinc-700 bg-zinc-900 shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-800 shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/20 text-blue-400",children:s.jsx(gt,{size:18})}),s.jsx("h2",{id:"jp-add-section-title",className:"text-sm font-bold text-white",children:"Add section"})]}),s.jsx("button",{type:"button",onClick:_,className:"p-1.5 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close",children:s.jsx(Me,{size:18})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r.length===0?s.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"No section types available. Configure addableSectionTypes or schemas."}):s.jsx("ul",{className:"grid gap-2",role:"listbox",children:r.map(o=>s.jsx("li",{role:"option",children:s.jsxs("button",{type:"button",onClick:()=>{u(o),_()},className:he("w-full flex items-center gap-3 px-4 py-3 rounded-lg text-left","border border-zinc-700/80 bg-zinc-800/50","hover:border-blue-500/40 hover:bg-zinc-800 transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:ring-offset-2 focus:ring-offset-zinc-900"),children:[s.jsx("span",{className:"flex items-center justify-center w-9 h-9 rounded-md bg-zinc-700/80 text-zinc-400 text-xs font-mono shrink-0",children:o}),s.jsx("span",{className:"text-sm font-medium text-zinc-200",children:i(o)})]})},o))})}),s.jsx("div",{className:"px-5 py-3 border-t border-zinc-800 shrink-0",children:s.jsx("p",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:"Choose a section type to add to the bottom of this page"})})]})]})},jr=()=>s.jsxs("div",{style:{"--local-bg":"var(--color-background)","--local-text":"var(--color-text)","--local-text-muted":"var(--color-text-muted)","--local-primary":"var(--color-primary)","--local-radius-md":"var(--radius-md)"},className:"min-h-screen flex flex-col items-center justify-center bg-[var(--local-bg)] px-6",children:[s.jsx("h1",{className:"text-6xl font-bold text-[var(--local-text)] mb-4",children:"404"}),s.jsx("p",{className:"text-xl text-[var(--local-text-muted)] mb-8",children:"Page not found"}),s.jsx("a",{href:"/",className:"inline-flex items-center gap-2 px-6 py-3 rounded-[var(--local-radius-md)] bg-[var(--local-primary)] text-[var(--local-bg)] font-semibold text-sm hover:opacity-90 transition-opacity",children:"Back to Home"})]}),fo='/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-900:oklch(39.6% .141 25.723);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-900:oklch(37.9% .146 265.522);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-primary:var(--primary)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border)}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-3{left:calc(var(--spacing)*3)}.z-0{z-index:0}.z-10{z-index:10}.z-50,.z-\\[50\\]{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[70\\]{z-index:70}.z-\\[100\\]{z-index:100}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-4{margin:calc(var(--spacing)*4)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.aspect-\\[4\\/3\\]{aspect-ratio:4/3}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-20{height:calc(var(--spacing)*20)}.h-40{height:calc(var(--spacing)*40)}.h-full{height:100%}.h-screen{height:100vh}.max-h-\\[45vh\\]{max-height:45vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[320px\\]{max-height:320px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-16{min-height:calc(var(--spacing)*16)}.min-h-\\[18px\\]{min-height:18px}.min-h-\\[80px\\]{min-height:80px}.min-h-\\[240px\\]{min-height:240px}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing)*1)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\\/4{width:75%}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[280px\\]{max-width:280px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[18px\\]{min-width:18px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0\\.5{--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-3{--tw-translate-x:calc(var(--spacing)*3);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.animate-pulse{animation:var(--animate-pulse)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[var\\(--local-radius-md\\)\\]{border-radius:var(--local-radius-md)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/20{border-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/30{border-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-500\\/50{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.border-blue-500\\/50{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.border-blue-600{border-color:var(--color-blue-600)}.border-primary,.border-primary\\/30{border-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\\/30{border-color:color-mix(in oklab,var(--color-primary)30%,transparent)}}.border-red-500\\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/20{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.border-red-500\\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/50{border-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}}.border-red-900\\/30{border-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.border-red-900\\/30{border-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}}.border-transparent{border-color:#0000}.border-zinc-700{border-color:var(--color-zinc-700)}.border-zinc-700\\/80{border-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/80{border-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.border-zinc-800{border-color:var(--color-zinc-800)}.border-zinc-800\\/50{border-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/50{border-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.border-zinc-800\\/90{border-color:#27272ae6}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/90{border-color:color-mix(in oklab,var(--color-zinc-800)90%,transparent)}}.bg-\\[var\\(--color-background\\)\\]{background-color:var(--color-background)}.bg-\\[var\\(--local-bg\\)\\]{background-color:var(--local-bg)}.bg-\\[var\\(--local-primary\\)\\]{background-color:var(--local-primary)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/5{background-color:color-mix(in oklab,var(--color-amber-500)5%,transparent)}}.bg-amber-500\\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-background{background-color:var(--color-background)}.bg-black\\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/5{background-color:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/15{background-color:color-mix(in oklab,var(--color-blue-500)15%,transparent)}}.bg-blue-500\\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-500\\/\\[0\\.04\\]{background-color:#3080ff0a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/\\[0\\.04\\]{background-color:color-mix(in oklab,var(--color-blue-500)4%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-600\\/10{background-color:#155dfc1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-600\\/10{background-color:color-mix(in oklab,var(--color-blue-600)10%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-primary\\/5{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/5{background-color:color-mix(in oklab,var(--color-primary)5%,transparent)}}.bg-primary\\/10{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/10{background-color:color-mix(in oklab,var(--color-primary)10%,transparent)}}.bg-red-500\\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/15{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.bg-red-500\\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-red-900\\/10{background-color:#82181a1a}@supports (color:color-mix(in lab,red,red)){.bg-red-900\\/10{background-color:color-mix(in oklab,var(--color-red-900)10%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/15{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.bg-white\\/15{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\\/\\[0\\.01\\]{background-color:#ffffff03}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.01\\]{background-color:color-mix(in oklab,var(--color-white)1%,transparent)}}.bg-white\\/\\[0\\.02\\]{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.02\\]{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.bg-white\\/\\[0\\.03\\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}}.bg-zinc-700{background-color:var(--color-zinc-700)}.bg-zinc-700\\/80{background-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-700\\/80{background-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-800\\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/50{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.bg-zinc-800\\/60{background-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/60{background-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.bg-zinc-800\\/80{background-color:#27272acc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/80{background-color:color-mix(in oklab,var(--color-zinc-800)80%,transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-zinc-900\\/20{background-color:#18181b33}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/20{background-color:color-mix(in oklab,var(--color-zinc-900)20%,transparent)}}.bg-zinc-900\\/40{background-color:#18181b66}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/40{background-color:color-mix(in oklab,var(--color-zinc-900)40%,transparent)}}.bg-zinc-900\\/50{background-color:#18181b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/50{background-color:color-mix(in oklab,var(--color-zinc-900)50%,transparent)}}.bg-zinc-900\\/60{background-color:#18181b99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/60{background-color:color-mix(in oklab,var(--color-zinc-900)60%,transparent)}}.bg-zinc-950{background-color:var(--color-zinc-950)}.bg-zinc-950\\/80{background-color:#09090bcc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-950\\/80{background-color:color-mix(in oklab,var(--color-zinc-950)80%,transparent)}}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-black\\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab,red,red)){.from-black\\/70{--tw-gradient-from:color-mix(in oklab,var(--color-black)70%,transparent)}}.from-black\\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-black\\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab,red,red)){.from-black\\/80{--tw-gradient-from:color-mix(in oklab,var(--color-black)80%,transparent)}}.from-black\\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-\\[length\\:12px\\]{background-size:12px}.bg-\\[right_0\\.25rem_center\\]{background-position:right .25rem center}.bg-no-repeat{background-repeat:no-repeat}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-7{padding-block:calc(var(--spacing)*7)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-6{padding-right:calc(var(--spacing)*6)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-9{padding-left:calc(var(--spacing)*9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\\[0\\.05em\\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\\[0\\.08em\\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-\\[var\\(--local-bg\\)\\]{color:var(--local-bg)}.text-\\[var\\(--local-text\\)\\]{color:var(--local-text)}.text-\\[var\\(--local-text-muted\\)\\]{color:var(--local-text-muted)}.text-amber-200{color:var(--color-amber-200)}.text-amber-500{color:var(--color-amber-500)}.text-amber-500\\/70{color:#f99c00b3}@supports (color:color-mix(in lab,red,red)){.text-amber-500\\/70{color:color-mix(in oklab,var(--color-amber-500)70%,transparent)}}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground{color:var(--color-foreground)}.text-primary{color:var(--color-primary)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-white{color:var(--color-white)}.text-zinc-100{color:var(--color-zinc-100)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_8px_rgba\\(245\\,158\\,11\\,0\\.5\\)\\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#f59e0b80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-blue-900\\/20{--tw-shadow-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.shadow-blue-900\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-blue-900)20%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-blue-500{--tw-ring-color:var(--color-blue-500)}.ring-blue-500\\/40{--tw-ring-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.ring-blue-500\\/40{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.ring-zinc-800{--tw-ring-color:var(--color-zinc-800)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-zinc-900{--tw-ring-offset-color:var(--color-zinc-900)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.brightness-\\[0\\.6\\]{--tw-brightness:brightness(.6);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.brightness-\\[0\\.85\\]{--tw-brightness:brightness(.85);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-\\[border-color\\,opacity\\]{transition-property:border-color,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[filter\\]{transition-property:filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:border-dashed:is(:where(.group):hover *){--tw-border-style:dashed;border-style:dashed}.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:#54a2ff80}@supports (color:color-mix(in lab,red,red)){.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:color-mix(in oklab,var(--color-blue-400)50%,transparent)}}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\:brightness-100:is(:where(.group):hover *){--tw-brightness:brightness(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:border-blue-500\\/30:hover{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/30:hover{border-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.hover\\:border-blue-500\\/40:hover{border-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/40:hover{border-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.hover\\:border-zinc-600:hover{border-color:var(--color-zinc-600)}.hover\\:border-zinc-700:hover{border-color:var(--color-zinc-700)}.hover\\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:#3080ff08}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:color-mix(in oklab,var(--color-blue-500)3%,transparent)}}.hover\\:bg-blue-600\\/20:hover{background-color:#155dfc33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-600\\/20:hover{background-color:color-mix(in oklab,var(--color-blue-600)20%,transparent)}}.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\\:bg-primary\\/40:hover{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/40:hover{background-color:color-mix(in oklab,var(--color-primary)40%,transparent)}}.hover\\:bg-red-500\\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/10:hover{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab,var(--color-red-500)25%,transparent)}}.hover\\:bg-white\\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.hover\\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\\:bg-zinc-800\\/30:hover{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/30:hover{background-color:color-mix(in oklab,var(--color-zinc-800)30%,transparent)}}.hover\\:bg-zinc-800\\/40:hover{background-color:#27272a66}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/40:hover{background-color:color-mix(in oklab,var(--color-zinc-800)40%,transparent)}}.hover\\:bg-zinc-800\\/50:hover{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/50:hover{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.hover\\:text-blue-400:hover{color:var(--color-blue-400)}.hover\\:text-primary:hover{color:var(--color-primary)}.hover\\:text-red-200:hover{color:var(--color-red-200)}.hover\\:text-red-400:hover{color:var(--color-red-400)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:text-zinc-200:hover{color:var(--color-zinc-200)}.hover\\:text-zinc-300:hover{color:var(--color-zinc-300)}.hover\\:text-zinc-400:hover{color:var(--color-zinc-400)}.hover\\:opacity-90:hover{opacity:.9}.hover\\:ring-zinc-600:hover{--tw-ring-color:var(--color-zinc-600)}}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.focus\\:ring-blue-600:focus{--tw-ring-color:var(--color-blue-600)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:ring-offset-zinc-900:focus{--tw-ring-offset-color:var(--color-zinc-900)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\\:ring-blue-600:focus-visible{--tw-ring-color:var(--color-blue-600)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-zinc-900:focus-visible{--tw-ring-offset-color:var(--color-zinc-900)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:cursor-grabbing:active{cursor:grabbing}.active\\:bg-primary\\/60:active{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.active\\:bg-primary\\/60:active{background-color:color-mix(in oklab,var(--color-primary)60%,transparent)}}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:max-w-\\[280px\\]{max-width:280px}}}:root{--background:oklch(14.1% .005 285.823);--foreground:oklch(98.5% 0 0);--card:oklch(21% .006 285.885);--card-foreground:oklch(98.5% 0 0);--popover:oklch(21% .006 285.885);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(42% .18 266);--primary-foreground:oklch(97% .014 254.604);--secondary:oklch(27.4% .006 286.033);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(27.4% .006 286.033);--muted-foreground:oklch(70.5% .015 286.067);--accent:oklch(42% .18 266);--accent-foreground:oklch(97% .014 254.604);--destructive:oklch(70.4% .191 22.216);--destructive-foreground:oklch(97% .014 254.604);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.2% .016 285.938);--radius:.5rem;font-family:ui-sans-serif,system-ui,sans-serif}[data-radix-portal]{z-index:9999!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';class mo extends q.Component{constructor(_){super(_),this.state={hasError:!1,error:null}}static getDerivedStateFromError(_){return{hasError:!0,error:_}}componentDidCatch(_,r){console.error("[JsonPages Engine]",_,r)}render(){return this.state.hasError&&this.state.error?s.jsxs("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:24,backgroundColor:"#0f172a",color:"#e2e8f0",fontFamily:"ui-sans-serif, system-ui, sans-serif"},children:[s.jsx("h1",{style:{fontSize:"1.25rem",fontWeight:700,marginBottom:8},children:"JsonPages Engine Error"}),s.jsx("pre",{style:{maxWidth:"100%",overflow:"auto",padding:16,backgroundColor:"rgba(0,0,0,0.3)",borderRadius:8,fontSize:12,marginTop:8},children:this.state.error.message})]}):this.props.children}}function bo({config:e}){var E,S;const{registry:_={},schemas:r={},pages:m={},siteConfig:u,themeConfig:i,menuConfig:o,themeCss:n,addSection:l,NotFoundComponent:h=jr}=e,f=(l==null?void 0:l.addableSectionTypes)??Object.keys(r).filter(C=>C!=="header"&&C!=="footer"),x={exportJSON:((E=e.persistence)==null?void 0:E.exportJSON)??Ct,exportHTML:((S=e.persistence)==null?void 0:S.exportHTML)??At},v=typeof(n==null?void 0:n.tenant)=="string"?n.tenant:"",c=typeof(n==null?void 0:n.admin)=="string"?n.admin:fo,[b,d]=q.useState(!1);q.useEffect(()=>{try{i!=null&&i.tokens&&at.setTheme(i)}catch(C){console.warn("[JsonPages] setTheme failed",C)}d(!0)},[i]);const g=()=>{const{slug:C="home"}=Se.useParams(),[O,L]=q.useState(null);q.useEffect(()=>{const re=document.getElementById("jp-baked-state");if(re!=null&&re.textContent)try{const j=JSON.parse(re.textContent);L(j),at.setTheme(j.theme)}catch(j){console.error("Failed to parse baked state",j)}},[]);const D=O?O.page:m[C],T=O?O.site:u,V=O?O.menu:o;return D?s.jsx(ot,{mode:"tenant",tenantCss:v,adminCss:c,children:s.jsx(tt,{mode:"visitor",children:s.jsx(vt,{pageConfig:D,siteConfig:T,menuConfig:V})})}):s.jsx(h,{})},p=()=>{var Y;const{slug:C="home"}=Se.useParams(),[O,L]=q.useState(null),[D,T]=q.useState(!1),[V,re]=q.useState(!1),[j,R]=q.useState(()=>{var F;try{const B=JSON.parse(JSON.stringify(u??{}));B.identity||(B.identity={title:"Site"}),B.pages||(B.pages=[]);const ee=(F=B.header)==null?void 0:F.data;return ee&&(o!=null&&o.main)&&(ee.links=JSON.parse(JSON.stringify(o.main))),B}catch{return{identity:{title:"Site"},pages:[]}}}),[a,M]=q.useState(null),[te,U]=q.useState(null),[W,K]=q.useState(null),[X,z]=q.useState(null),[N,J]=q.useState(!1),[G,Q]=q.useState(400),ue=360,ie=920,le=q.useCallback(F=>{F.preventDefault();const B=F.currentTarget;B.setPointerCapture(F.pointerId);const ee=F.clientX,ae=G,se=Ee=>{const _e=ee-Ee.clientX,Le=Math.min(ie,Math.max(ue,ae+_e));Q(Le)},xe=()=>{B.releasePointerCapture(F.pointerId),B.removeEventListener("pointermove",se),B.removeEventListener("pointerup",xe),B.removeEventListener("pointercancel",xe),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",B.addEventListener("pointermove",se),B.addEventListener("pointerup",xe),B.addEventListener("pointercancel",xe)},[G]),ce=O?[...j.header?[{id:j.header.id,type:j.header.type,scope:"global",title:"Header"}]:[],...O.sections.map(F=>{var B,ee;return{id:F.id,type:F.type,scope:"local",title:((B=F.data)==null?void 0:B.title)??((ee=F.data)==null?void 0:ee.titleHighlight)}}),...j.footer?[{id:j.footer.id,type:j.footer.type,scope:"global",title:"Footer"}]:[]]:[];q.useEffect(()=>{const F=m[C];F&&L(JSON.parse(JSON.stringify(F))),M(null),U(null),T(!1)},[C,m]);const ge=q.useCallback(()=>{const F=m[C];F&&L(JSON.parse(JSON.stringify(F))),M(null),U(null),T(!1)},[C,m]),fe=q.useCallback((F,B,ee)=>{const ae=[...ee.sections],se=ae.findIndex(_e=>_e.id===F);if(se===-1||B<0||B>=ae.length)return;const[xe]=ae.splice(se,1),Ee=B>se?B-1:B;ae.splice(Math.min(Ee,ae.length),0,xe),L({...ee,sections:ae}),T(!0)},[]),we=q.useCallback(F=>{var B;if(F.origin===window.location.origin){if(F.data.type===ve.SECTION_SELECT){M(F.data.section);const ee=F.data.itemPath;if(Array.isArray(ee)&&ee.length>0)U(ee.map(ae=>({fieldKey:ae.fieldKey,...ae.itemId!=null?{itemId:String(ae.itemId)}:{}})));else{const ae=F.data.itemField,se=F.data.itemId;U(typeof ae=="string"?[{fieldKey:ae,...se!=null?{itemId:String(se)}:{}}]:null)}}if(F.data.type===ve.ACTIVE_SECTION_CHANGED&&K(F.data.activeSectionId??null),F.data.type==="jsonpages:section-reorder"&&O){const{sectionId:ee,newIndex:ae}=F.data;typeof ee=="string"&&typeof ae=="number"&&ae>=0&&fe(ee,ae,O)}if(F.data.type===ve.SEND_CLEAN_HTML){if(!O)return;const ee=(B=j.header)==null?void 0:B.data,ae={page:O,site:j,menu:{main:(ee==null?void 0:ee.links)??[]},theme:i};x.exportHTML(ae,C,F.data.html),T(!1)}}},[O,j,C,i,fe]);q.useEffect(()=>(window.addEventListener("message",we),()=>window.removeEventListener("message",we)),[we]);const ze=q.useCallback(F=>{const B=ce.find(ee=>ee.id===F);B&&M({id:B.id,type:B.type,scope:B.scope}),U(null),z(F)},[ce]),t=q.useCallback(()=>{z(null)},[]),H=q.useCallback(F=>{L(B=>B&&{...B,sections:B.sections.filter(ee=>ee.id!==F)}),T(!0),M(B=>(B==null?void 0:B.id)===F?null:B)},[]),A=F=>{if(!(!a||!O))if(T(!0),a.scope==="global")a.type==="header"&&j.header!=null?R({...j,header:{...j.header,data:F}}):a.type==="footer"&&j.footer!=null&&R({...j,footer:{...j.footer,data:F}});else{const B=O.sections.map(ee=>ee.id===a.id?{...ee,data:F}:ee);L({...O,sections:B})}},y=q.useCallback((F,B,ee,ae)=>{var se,xe;if(T(!0),B==="global")((se=j.header)==null?void 0:se.id)===F?R({...j,header:{...j.header,data:ae}}):((xe=j.footer)==null?void 0:xe.id)===F&&R({...j,footer:{...j.footer,data:ae}});else if(O){const Ee=O.sections.map(_e=>_e.id===F?{..._e,data:ae}:_e);L({...O,sections:Ee})}},[O,j]),w=()=>{var B;const F=document.querySelector("iframe");(B=F==null?void 0:F.contentWindow)==null||B.postMessage({type:ve.REQUEST_CLEAN_HTML},"*")},I=()=>{var ee,ae;if(!O||!((ee=e.persistence)!=null&&ee.saveToFile))return;const F=(ae=j.header)==null?void 0:ae.data,B={page:O,site:j,menu:{main:(F==null?void 0:F.links)??[]},theme:i};e.persistence.saveToFile(B,C).then(()=>{T(!1),re(!0),window.setTimeout(()=>window.location.reload(),1e3)}).catch(se=>{console.error("[JsonPages] saveToFile failed",se);const xe=se instanceof Error?se.message:String(se);alert(`Save to file failed: ${xe}`)})},$=F=>{var ae;if(!O)return;const B=((ae=l==null?void 0:l.getDefaultSectionData)==null?void 0:ae.call(l,F))??{},ee={id:crypto.randomUUID(),type:F,data:B,settings:void 0};L({...O,sections:[...O.sections,ee]}),T(!0),M({id:ee.id,type:F,scope:"local"})};if(!O)return s.jsx("div",{children:"Loading Studio..."});const Z=(a==null?void 0:a.scope)==="global"?{sections:[j.header,j.footer].filter(F=>F!=null)}:O,P=[...j.header?[j.header]:[],...O.sections,...j.footer?[j.footer]:[]];return s.jsx(ot,{mode:"admin",tenantCss:v,adminCss:c,children:s.jsx(tt,{mode:"studio",children:s.jsxs("div",{className:"flex flex-col h-screen w-screen bg-background text-foreground overflow-hidden",children:[s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[s.jsx("main",{className:"flex-1 min-w-0 relative bg-zinc-900/50 overflow-hidden",children:s.jsx(kr,{draft:O,globalDraft:j,themeConfig:i,slug:C,selectedId:a==null?void 0:a.id,scrollToSectionId:X,onScrollRequested:t})}),s.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:G,minWidth:ue,maxWidth:ie},children:[s.jsx("div",{role:"separator","aria-label":"Resize inspector",className:"absolute left-0 top-0 bottom-0 w-1.5 cursor-col-resize hover:bg-primary/40 active:bg-primary/60 transition-colors shrink-0",style:{zIndex:9999},onPointerDown:le}),s.jsx(yr,{selectedSection:a,pageData:Z,allSectionsData:P,onUpdate:A,onUpdateSection:y,onClose:()=>{M(null),U(null)},expandedItemPath:te,onReorderSection:O?(F,B)=>fe(F,B,O):void 0,allLayers:ce,activeSectionId:W,onRequestScrollToSection:ze,onDeleteSection:O?H:void 0,onAddSection:f.length>0?()=>J(!0):void 0,hasChanges:D,onExportHTML:w,onSaveToFile:((Y=e.persistence)==null?void 0:Y.saveToFile)!=null?I:void 0,saveSuccessFeedback:V,onResetToFile:ge})]})]}),s.jsx(zr,{open:N,onClose:()=>J(!1),sectionTypes:f,sectionTypeLabels:l==null?void 0:l.sectionTypeLabels,onSelect:$})]})})})},k=()=>s.jsx(ot,{mode:"tenant",tenantCss:v,adminCss:c,children:s.jsx(_r,{})});return b?s.jsx(mo,{children:s.jsx(Qt,{config:{registry:_,schemas:r,tenantId:e.tenantId??"default",assets:e.assets},children:s.jsx(Se.BrowserRouter,{children:s.jsxs(Se.Routes,{children:[s.jsx(Se.Route,{path:"/",element:s.jsx(g,{})}),s.jsx(Se.Route,{path:"/:slug",element:s.jsx(g,{})}),s.jsx(Se.Route,{path:"/admin",element:s.jsx(p,{})}),s.jsx(Se.Route,{path:"/admin/:slug",element:s.jsx(p,{})}),s.jsx(Se.Route,{path:"/admin/preview/:slug",element:s.jsx(k,{})}),s.jsx(Se.Route,{path:"*",element:s.jsx(h,{})})]})})})}):s.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#0f172a",color:"#94a3b8",fontFamily:"ui-sans-serif, system-ui, sans-serif",fontSize:14},children:"Loading…"})}const go=({hasChanges:e,onExportJSON:_,onExportHTML:r,onAddSection:m})=>s.jsxs("div",{className:"h-14 border-b border-zinc-800 bg-zinc-950 flex items-center justify-between px-6 shrink-0 z-50 relative",children:[s.jsx("div",{className:"flex items-center gap-3",children:m!=null&&s.jsxs("button",{type:"button",onClick:m,className:"flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600 transition-colors",title:"Add section","aria-label":"Add section",children:[s.jsx(Zn,{size:14}),s.jsx("span",{children:"Add section"})]})}),s.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 opacity-20 pointer-events-none",children:s.jsx("span",{className:"text-xs font-black tracking-[0.2em] text-zinc-100",children:"JSONPAGES STUDIO"})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("button",{onClick:r,className:"flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium transition-all border bg-zinc-900 border-zinc-700 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",children:[s.jsx(or,{size:14}),s.jsx("span",{children:"Bake HTML"})]}),s.jsxs("button",{onClick:_,disabled:!e,className:he("flex items-center gap-2 px-4 py-1.5 rounded-md text-xs font-bold transition-all shadow-lg",e?"bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),children:[s.jsx(Fn,{size:14}),s.jsx("span",{children:"Export JSON"})]})]})]});pe.AddSectionLibrary=zr,pe.AdminSidebar=yr,pe.ConfigProvider=Qt,pe.ControlBar=go,pe.DefaultNotFound=jr,pe.FormFactory=Ve,pe.InputWidgets=Ge,pe.JsonPagesEngine=bo,pe.PageRenderer=vt,pe.PreviewEntry=_r,pe.STUDIO_EVENTS=ve,pe.SectionRenderer=He,pe.StudioProvider=tt,pe.StudioStage=kr,pe.ThemeLoader=ot,pe.cn=he,pe.exportBakedHTML=At,pe.exportProjectJSON=Ct,pe.resolveAssetUrl=vr,pe.themeManager=at,pe.useConfig=Ze,pe.useStudio=tr,Object.defineProperty(pe,Symbol.toStringTag,{value:"Module"})}));
|
|
203
|
+
*/const dt=xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
204
|
+
* @license lucide-react v0.474.0 - ISC
|
|
205
|
+
*
|
|
206
|
+
* This source code is licensed under the ISC license.
|
|
207
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
+
*/const ms=xe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);class gs extends Q.Component{constructor(r){super(r),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r,t){console.error(`[JsonPages] Component Crash [${this.props.type}]:`,r,t)}render(){return this.state.hasError?h.jsxs("div",{className:"p-8 m-4 bg-amber-500/5 border-2 border-dashed border-amber-500/20 rounded-xl flex flex-col items-center text-center gap-3",children:[h.jsx(ps,{className:"text-amber-500",size:32}),h.jsxs("div",{className:"space-y-1",children:[h.jsx("h4",{className:"text-sm font-bold text-amber-200 uppercase tracking-tight",children:"Component Error"}),h.jsxs("p",{className:"text-xs text-amber-500/70 font-mono",children:["Type: ",this.props.type]})]}),h.jsx("p",{className:"text-xs text-zinc-400 max-w-[280px] leading-relaxed",children:"This section failed to render. Check the console for details or verify the JSON data structure."})]}):this.props.children}}const bs=({type:e,scope:r,isSelected:t,sectionId:n,sectionIndex:s=0,totalSections:i=0,onReorder:a})=>{const o=typeof s=="number"&&s>0&&a,l=typeof s=="number"&&s<i-1&&a;return h.jsx("div",{"data-jp-section-overlay":!0,"aria-hidden":!0,className:be("absolute inset-0 pointer-events-none transition-all duration-200 z-[50]","border-2 border-transparent group-hover:border-blue-400/50 group-hover:border-dashed",t&&"border-2 border-blue-600 border-solid bg-blue-500/5"),children:h.jsxs("div",{className:be("absolute top-0 right-0 flex flex-nowrap items-center gap-1 pl-1 pr-2 py-1 text-[9px] font-black uppercase tracking-widest transition-opacity pointer-events-auto","bg-blue-600 text-white",t||"group-hover:opacity-100 opacity-0"),children:[a&&n!=null&&h.jsxs("span",{className:"shrink-0 flex items-center gap-0.5",children:[h.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),o&&a(n,s-1)},disabled:!o,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section up","aria-label":"Move section up",children:h.jsx(_r,{size:12,strokeWidth:2.5})}),h.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),l&&a(n,s+2)},disabled:!l,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section down","aria-label":"Move section down",children:h.jsx(Ut,{size:12,strokeWidth:2.5})})]}),h.jsx("span",{className:"shrink-0",children:e}),h.jsx("span",{className:"opacity-50 shrink-0",children:"|"}),h.jsx("span",{className:"shrink-0",children:r})]})})},Ct=({section:e,menu:r,selectedId:t,reorderable:n,sectionIndex:s,totalSections:i,onReorder:a})=>{var g,y;const{mode:o}=Un(),{registry:l}=Et(),d=o==="studio",u=d&&t===e.id,v=l[e.type],x=e.type==="header"||e.type==="footer"?"global":"local",f=e.type==="header"&&((g=e.settings)==null?void 0:g.sticky);if(!v)return h.jsxs("div",{className:"p-6 m-4 bg-red-500/10 text-red-400 border border-red-500/20 rounded-lg text-sm font-mono",children:[h.jsx("strong",{children:"Missing Component:"})," ",e.type]});const w=k=>{var X,z,L,p,B;if(!d)return;k.preventDefault(),k.stopPropagation();const _=k.currentTarget,S=k.clientX,I=k.clientY;if(k.target===_){window.parent.postMessage({type:ke.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}},"*");return}const A=document.elementFromPoint(S,I)??k.target;if(!A||!_.contains(A)){window.parent.postMessage({type:ke.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}},"*");return}if(A===_){window.parent.postMessage({type:ke.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}},"*");return}const T=[];let R=A;for(;R&&R!==_;){const G=(X=R.getAttribute)==null?void 0:X.call(R,"data-jp-item-id"),F=(z=R.getAttribute)==null?void 0:z.call(R,"data-jp-item-field");G&&F&&T.push({fieldKey:F||"items",itemId:G}),R=R.parentElement}if(T.reverse(),T.length===0)for(R=A;R&&R!==_;){const G=(L=R.getAttribute)==null?void 0:L.call(R,"data-jp-field");if(G){T.push({fieldKey:G});break}R=R.parentElement}if(T.length===0&&A){let G=null;const F=M=>{var oe,E;const W=M.getBoundingClientRect();if(W.left<=S&&S<=W.right&&W.top<=I&&I<=W.bottom){for(let O=0;O<M.children.length;O++)F(M.children[O]);((oe=M.getAttribute)!=null&&oe.call(M,"data-jp-item-id")||(E=M.getAttribute)!=null&&E.call(M,"data-jp-field"))&&(G=M)}};if(F(A),G){const M=G,W=(p=M.getAttribute)==null?void 0:p.call(M,"data-jp-item-id"),oe=(B=M.getAttribute)==null?void 0:B.call(M,"data-jp-field");W&&oe?T.push({fieldKey:oe||"items",itemId:W}):oe&&T.push({fieldKey:oe})}}const U={type:ke.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}};if(T.length>0){U.itemPath=T;const G=T[0];G.itemId!=null?(U.itemField=G.fieldKey,U.itemId=G.itemId):U.itemField=G.fieldKey}window.parent.postMessage(U,"*")},c=()=>{const k=v;return e.type==="header"&&r?h.jsx(k,{data:e.data,settings:e.settings,menu:r}):h.jsx(k,{data:e.data,settings:e.settings})},b=(y=e.data)==null?void 0:y.anchorId;return h.jsxs("div",{id:b||void 0,"data-section-id":d?e.id:void 0,"data-section-type":d?e.type:void 0,"data-section-scope":d?x:void 0,...d&&u?{"data-jp-selected":!0}:{},onClickCapture:d?w:void 0,className:be("relative w-full",d&&"group cursor-pointer",d&&f?"sticky top-0 z-[60]":"relative z-0",u&&"z-[70]"),children:[h.jsx("div",{className:"relative z-0",children:h.jsx(gs,{type:e.type,children:c()})}),d&&h.jsx(bs,{type:e.type,scope:x,isSelected:!!u,sectionId:n&&x==="local"?e.id:void 0,sectionIndex:n&&x==="local"?s:void 0,totalSections:n&&x==="local"?i:void 0,onReorder:n&&x==="local"?a:void 0})]})},vs=e=>{Q.useEffect(()=>{document.title=e.title;let r=document.querySelector('meta[name="description"]');r||(r=document.createElement("meta"),r.setAttribute("name","description"),document.head.appendChild(r)),r.setAttribute("content",e.description)},[e.title,e.description])},xs="application/json",Cr=({pageConfig:e,siteConfig:r,menuConfig:t,selectedId:n,onReorder:s,scrollToSectionId:i,onActiveSectionChange:a})=>{var b,g;vs(e.meta);const[o,l]=Q.useState(null),d=Q.useRef({}),u=Q.useRef(a);u.current=a;const v=y=>{var k;(k=u.current)==null||k.call(u,y)};Q.useEffect(()=>{if(!i)return;const y=d.current[i];y&&y.scrollIntoView({behavior:"smooth",block:"center"})},[i]),Q.useEffect(()=>{if(!u.current)return;const k=[...r.header?[r.header.id]:[],...e.sections.map(A=>A.id),...r.footer?[r.footer.id]:[]],_=new IntersectionObserver(A=>{A.forEach(T=>{var R;if(T.isIntersecting&&T.intersectionRatio>.5){const U=T.target.getAttribute("data-section-id");U&&((R=u.current)==null||R.call(u,U))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let S=!1;const I=requestAnimationFrame(()=>{S||k.forEach(A=>{const T=d.current[A];T&&_.observe(T)})});return()=>{S=!0,cancelAnimationFrame(I),_.disconnect()}},[e.sections,(b=r.header)==null?void 0:b.id,(g=r.footer)==null?void 0:g.id]);const x=(y,k)=>{y.preventDefault(),y.dataTransfer.dropEffect="move",l(k)},f=()=>{l(null)},w=(y,k)=>{if(y.preventDefault(),l(null),!!s)try{const _=y.dataTransfer.getData(xs),{sectionId:S}=JSON.parse(_);typeof S=="string"&&s(S,k)}catch{}},c=()=>{const y=typeof s=="function",k=e.sections.map((_,S)=>{const I=o===S;return y?h.jsxs("div",{ref:A=>{d.current[_.id]=A},"data-section-id":_.id,style:{position:"relative"},onMouseEnter:()=>v(_.id),children:[h.jsx("div",{"data-jp-drop-zone":!0,style:{position:"absolute",left:0,right:0,top:-1,height:12,zIndex:55,pointerEvents:"auto",backgroundColor:I?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:I?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:A=>x(A,S),onDragLeave:f,onDrop:A=>w(A,S)}),h.jsx(Ct,{section:_,selectedId:n,reorderable:!0,sectionIndex:S,totalSections:e.sections.length,onReorder:s})]},_.id):h.jsx("div",{ref:A=>{d.current[_.id]=A},"data-section-id":_.id,onMouseEnter:()=>v(_.id),children:h.jsx(Ct,{section:_,selectedId:n})},_.id)});if(y&&k.length>0){const _=e.sections.length,S=o===_;k.push(h.jsx("div",{"data-jp-drop-zone":!0,style:{position:"relative",left:0,right:0,height:24,minHeight:24,zIndex:55,pointerEvents:"auto",backgroundColor:S?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:S?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:I=>x(I,_),onDragLeave:f,onDrop:I=>w(I,_)},"jp-drop-after-last"))}return k};return h.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[r.header!=null&&h.jsx("div",{ref:y=>{d.current[r.header.id]=y},"data-section-id":r.header.id,onMouseEnter:()=>v(r.header.id),children:h.jsx(Ct,{section:r.header,menu:t.main,selectedId:n})}),h.jsx("main",{className:"flex-1",children:c()}),r.footer!=null&&h.jsx("div",{ref:y=>{d.current[r.footer.id]=y},"data-section-id":r.footer.id,onMouseEnter:()=>v(r.footer.id),children:h.jsx(Ct,{section:r.footer,selectedId:n})})]})},Ht=({mode:e,tenantCss:r,adminCss:t,children:n})=>(Q.useLayoutEffect(()=>{const s=`jp-theme-${e}`,i=e==="tenant"?r:t;if(!document.getElementById(s)&&i){const a=document.createElement("style");a.id=s,a.innerHTML=i,document.head.appendChild(a)}return()=>{const a=document.getElementById(s);a&&a.remove()}},[e,r,t]),h.jsx(h.Fragment,{children:n}));function zr({className:e,type:r,...t}){return h.jsx("input",{type:r,className:be("h-8 rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-1 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600",e),...t})}function ws({className:e,...r}){return h.jsx("textarea",{className:be("min-h-16 w-full rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-2 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600 resize-none",e),...r})}function ys({className:e,checked:r,onCheckedChange:t,...n}){return h.jsx("input",{type:"checkbox",checked:r,onChange:s=>t==null?void 0:t(s.target.checked),className:be("size-4 rounded border border-zinc-700 bg-zinc-900 text-blue-600 focus:ring-2 focus:ring-blue-600",e),...n})}function tt({className:e,...r}){return h.jsx("label",{className:be("text-sm font-medium leading-none select-none",e),...r})}function Gn(e,[r,t]){return Math.min(t,Math.max(r,e))}function Ce(e,r,{checkForDefaultPrevented:t=!0}={}){return function(s){if(e==null||e(s),t===!1||!s.defaultPrevented)return r==null?void 0:r(s)}}function jr(e,r=[]){let t=[];function n(i,a){const o=P.createContext(a),l=t.length;t=[...t,a];const d=v=>{var g;const{scope:x,children:f,...w}=v,c=((g=x==null?void 0:x[e])==null?void 0:g[l])||o,b=P.useMemo(()=>w,Object.values(w));return h.jsx(c.Provider,{value:b,children:f})};d.displayName=i+"Provider";function u(v,x){var c;const f=((c=x==null?void 0:x[e])==null?void 0:c[l])||o,w=P.useContext(f);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${v}\` must be used within \`${i}\``)}return[d,u]}const s=()=>{const i=t.map(a=>P.createContext(a));return function(o){const l=(o==null?void 0:o[e])||i;return P.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return s.scopeName=e,[n,ks(s,...r)]}function ks(...e){const r=e[0];if(e.length===1)return r;const t=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const a=n.reduce((o,{useScope:l,scopeName:d})=>{const v=l(i)[`__scope${d}`];return{...o,...v}},{});return P.useMemo(()=>({[`__scope${r.scopeName}`]:a}),[a])}};return t.scopeName=r.scopeName,t}function Yn(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function qn(...e){return r=>{let t=!1;const n=e.map(s=>{const i=Yn(s,r);return!t&&typeof i=="function"&&(t=!0),i});if(t)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():Yn(e[s],null)}}}}function je(...e){return P.useCallback(qn(...e),e)}function Vt(e){const r=_s(e),t=P.forwardRef((n,s)=>{const{children:i,...a}=n,o=P.Children.toArray(i),l=o.find(Es);if(l){const d=l.props.children,u=o.map(v=>v===l?P.Children.count(d)>1?P.Children.only(null):P.isValidElement(d)?d.props.children:null:v);return h.jsx(r,{...a,ref:s,children:P.isValidElement(d)?P.cloneElement(d,void 0,u):null})}return h.jsx(r,{...a,ref:s,children:i})});return t.displayName=`${e}.Slot`,t}function _s(e){const r=P.forwardRef((t,n)=>{const{children:s,...i}=t;if(P.isValidElement(s)){const a=zs(s),o=Cs(i,s.props);return s.type!==P.Fragment&&(o.ref=n?qn(n,a):a),P.cloneElement(s,o)}return P.Children.count(s)>1?P.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Ss=Symbol("radix.slottable");function Es(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ss}function Cs(e,r){const t={...r};for(const n in r){const s=e[n],i=r[n];/^on[A-Z]/.test(n)?s&&i?t[n]=(...o)=>{const l=i(...o);return s(...o),l}:s&&(t[n]=s):n==="style"?t[n]={...s,...i}:n==="className"&&(t[n]=[s,i].filter(Boolean).join(" "))}return{...e,...t}}function zs(e){var n,s;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}function js(e){const r=e+"CollectionProvider",[t,n]=jr(r),[s,i]=t(r,{collectionRef:{current:null},itemMap:new Map}),a=c=>{const{scope:b,children:g}=c,y=Q.useRef(null),k=Q.useRef(new Map).current;return h.jsx(s,{scope:b,itemMap:k,collectionRef:y,children:g})};a.displayName=r;const o=e+"CollectionSlot",l=Vt(o),d=Q.forwardRef((c,b)=>{const{scope:g,children:y}=c,k=i(o,g),_=je(b,k.collectionRef);return h.jsx(l,{ref:_,children:y})});d.displayName=o;const u=e+"CollectionItemSlot",v="data-radix-collection-item",x=Vt(u),f=Q.forwardRef((c,b)=>{const{scope:g,children:y,...k}=c,_=Q.useRef(null),S=je(b,_),I=i(u,g);return Q.useEffect(()=>(I.itemMap.set(_,{ref:_,...k}),()=>void I.itemMap.delete(_))),h.jsx(x,{[v]:"",ref:S,children:y})});f.displayName=u;function w(c){const b=i(e+"CollectionConsumer",c);return Q.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const k=Array.from(y.querySelectorAll(`[${v}]`));return Array.from(b.itemMap.values()).sort((I,A)=>k.indexOf(I.ref.current)-k.indexOf(A.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:a,Slot:d,ItemSlot:f},w,n]}var Ns=P.createContext(void 0);function As(e){const r=P.useContext(Ns);return e||r||"ltr"}var Ts=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ee=Ts.reduce((e,r)=>{const t=Vt(`Primitive.${r}`),n=P.forwardRef((s,i)=>{const{asChild:a,...o}=s,l=a?t:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...o,ref:i})});return n.displayName=`Primitive.${r}`,{...e,[r]:n}},{});function Os(e,r){e&&It.flushSync(()=>e.dispatchEvent(r))}function rt(e){const r=P.useRef(e);return P.useEffect(()=>{r.current=e}),P.useMemo(()=>(...t)=>{var n;return(n=r.current)==null?void 0:n.call(r,...t)},[])}function Is(e,r=globalThis==null?void 0:globalThis.document){const t=rt(e);P.useEffect(()=>{const n=s=>{s.key==="Escape"&&t(s)};return r.addEventListener("keydown",n,{capture:!0}),()=>r.removeEventListener("keydown",n,{capture:!0})},[t,r])}var Ps="DismissableLayer",Nr="dismissableLayer.update",Rs="dismissableLayer.pointerDownOutside",Ds="dismissableLayer.focusOutside",Xn,Jn=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qn=P.forwardRef((e,r)=>{const{disableOutsidePointerEvents:t=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:a,onDismiss:o,...l}=e,d=P.useContext(Jn),[u,v]=P.useState(null),x=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=P.useState({}),w=je(r,A=>v(A)),c=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),g=c.indexOf(b),y=u?c.indexOf(u):-1,k=d.layersWithOutsidePointerEventsDisabled.size>0,_=y>=g,S=Fs(A=>{const T=A.target,R=[...d.branches].some(U=>U.contains(T));!_||R||(s==null||s(A),a==null||a(A),A.defaultPrevented||o==null||o())},x),I=Bs(A=>{const T=A.target;[...d.branches].some(U=>U.contains(T))||(i==null||i(A),a==null||a(A),A.defaultPrevented||o==null||o())},x);return Is(A=>{y===d.layers.size-1&&(n==null||n(A),!A.defaultPrevented&&o&&(A.preventDefault(),o()))},x),P.useEffect(()=>{if(u)return t&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Xn=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),eo(),()=>{t&&d.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=Xn)}},[u,x,t,d]),P.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),eo())},[u,d]),P.useEffect(()=>{const A=()=>f({});return document.addEventListener(Nr,A),()=>document.removeEventListener(Nr,A)},[]),h.jsx(Ee.div,{...l,ref:w,style:{pointerEvents:k?_?"auto":"none":void 0,...e.style},onFocusCapture:Ce(e.onFocusCapture,I.onFocusCapture),onBlurCapture:Ce(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Ce(e.onPointerDownCapture,S.onPointerDownCapture)})});Qn.displayName=Ps;var Ls="DismissableLayerBranch",Ms=P.forwardRef((e,r)=>{const t=P.useContext(Jn),n=P.useRef(null),s=je(r,n);return P.useEffect(()=>{const i=n.current;if(i)return t.branches.add(i),()=>{t.branches.delete(i)}},[t.branches]),h.jsx(Ee.div,{...e,ref:s})});Ms.displayName=Ls;function Fs(e,r=globalThis==null?void 0:globalThis.document){const t=rt(e),n=P.useRef(!1),s=P.useRef(()=>{});return P.useEffect(()=>{const i=o=>{if(o.target&&!n.current){let l=function(){to(Rs,t,d,{discrete:!0})};const d={originalEvent:o};o.pointerType==="touch"?(r.removeEventListener("click",s.current),s.current=l,r.addEventListener("click",s.current,{once:!0})):l()}else r.removeEventListener("click",s.current);n.current=!1},a=window.setTimeout(()=>{r.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),r.removeEventListener("pointerdown",i),r.removeEventListener("click",s.current)}},[r,t]),{onPointerDownCapture:()=>n.current=!0}}function Bs(e,r=globalThis==null?void 0:globalThis.document){const t=rt(e),n=P.useRef(!1);return P.useEffect(()=>{const s=i=>{i.target&&!n.current&&to(Ds,t,{originalEvent:i},{discrete:!1})};return r.addEventListener("focusin",s),()=>r.removeEventListener("focusin",s)},[r,t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function eo(){const e=new CustomEvent(Nr);document.dispatchEvent(e)}function to(e,r,t,{discrete:n}){const s=t.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});r&&s.addEventListener(e,r,{once:!0}),n?Os(s,i):s.dispatchEvent(i)}var Ar=0;function Us(){P.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ro()),document.body.insertAdjacentElement("beforeend",e[1]??ro()),Ar++,()=>{Ar===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Ar--}},[])}function ro(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Tr="focusScope.autoFocusOnMount",Or="focusScope.autoFocusOnUnmount",no={bubbles:!1,cancelable:!0},Ws="FocusScope",oo=P.forwardRef((e,r)=>{const{loop:t=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=e,[o,l]=P.useState(null),d=rt(s),u=rt(i),v=P.useRef(null),x=je(r,c=>l(c)),f=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect(()=>{if(n){let c=function(k){if(f.paused||!o)return;const _=k.target;o.contains(_)?v.current=_:Ye(v.current,{select:!0})},b=function(k){if(f.paused||!o)return;const _=k.relatedTarget;_!==null&&(o.contains(_)||Ye(v.current,{select:!0}))},g=function(k){if(document.activeElement===document.body)for(const S of k)S.removedNodes.length>0&&Ye(o)};document.addEventListener("focusin",c),document.addEventListener("focusout",b);const y=new MutationObserver(g);return o&&y.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",b),y.disconnect()}}},[n,o,f.paused]),P.useEffect(()=>{if(o){so.add(f);const c=document.activeElement;if(!o.contains(c)){const g=new CustomEvent(Tr,no);o.addEventListener(Tr,d),o.dispatchEvent(g),g.defaultPrevented||($s(Gs(io(o)),{select:!0}),document.activeElement===c&&Ye(o))}return()=>{o.removeEventListener(Tr,d),setTimeout(()=>{const g=new CustomEvent(Or,no);o.addEventListener(Or,u),o.dispatchEvent(g),g.defaultPrevented||Ye(c??document.body,{select:!0}),o.removeEventListener(Or,u),so.remove(f)},0)}}},[o,d,u,f]);const w=P.useCallback(c=>{if(!t&&!n||f.paused)return;const b=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,g=document.activeElement;if(b&&g){const y=c.currentTarget,[k,_]=Hs(y);k&&_?!c.shiftKey&&g===_?(c.preventDefault(),t&&Ye(k,{select:!0})):c.shiftKey&&g===k&&(c.preventDefault(),t&&Ye(_,{select:!0})):g===y&&c.preventDefault()}},[t,n,f.paused]);return h.jsx(Ee.div,{tabIndex:-1,...a,ref:x,onKeyDown:w})});oo.displayName=Ws;function $s(e,{select:r=!1}={}){const t=document.activeElement;for(const n of e)if(Ye(n,{select:r}),document.activeElement!==t)return}function Hs(e){const r=io(e),t=ao(r,e),n=ao(r.reverse(),e);return[t,n]}function io(e){const r=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)r.push(t.currentNode);return r}function ao(e,r){for(const t of e)if(!Vs(t,{upTo:r}))return t}function Vs(e,{upTo:r}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(r!==void 0&&e===r)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Zs(e){return e instanceof HTMLInputElement&&"select"in e}function Ye(e,{select:r=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&Zs(e)&&r&&e.select()}}var so=Ks();function Ks(){let e=[];return{add(r){const t=e[0];r!==t&&(t==null||t.pause()),e=lo(e,r),e.unshift(r)},remove(r){var t;e=lo(e,r),(t=e[0])==null||t.resume()}}}function lo(e,r){const t=[...e],n=t.indexOf(r);return n!==-1&&t.splice(n,1),t}function Gs(e){return e.filter(r=>r.tagName!=="A")}var Ae=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{},Ys=P[" useId ".trim().toString()]||(()=>{}),qs=0;function Ir(e){const[r,t]=P.useState(Ys());return Ae(()=>{t(n=>n??String(qs++))},[e]),r?`radix-${r}`:""}const Xs=["top","right","bottom","left"],qe=Math.min,Te=Math.max,Zt=Math.round,Kt=Math.floor,Me=e=>({x:e,y:e}),Js={left:"right",right:"left",bottom:"top",top:"bottom"},Qs={start:"end",end:"start"};function Pr(e,r,t){return Te(e,qe(r,t))}function He(e,r){return typeof e=="function"?e(r):e}function Ve(e){return e.split("-")[0]}function ut(e){return e.split("-")[1]}function Rr(e){return e==="x"?"y":"x"}function Dr(e){return e==="y"?"height":"width"}const el=new Set(["top","bottom"]);function Fe(e){return el.has(Ve(e))?"y":"x"}function Lr(e){return Rr(Fe(e))}function tl(e,r,t){t===void 0&&(t=!1);const n=ut(e),s=Lr(e),i=Dr(s);let a=s==="x"?n===(t?"end":"start")?"right":"left":n==="start"?"bottom":"top";return r.reference[i]>r.floating[i]&&(a=Gt(a)),[a,Gt(a)]}function rl(e){const r=Gt(e);return[Mr(e),r,Mr(r)]}function Mr(e){return e.replace(/start|end/g,r=>Qs[r])}const co=["left","right"],uo=["right","left"],nl=["top","bottom"],ol=["bottom","top"];function il(e,r,t){switch(e){case"top":case"bottom":return t?r?uo:co:r?co:uo;case"left":case"right":return r?nl:ol;default:return[]}}function al(e,r,t,n){const s=ut(e);let i=il(Ve(e),t==="start",n);return s&&(i=i.map(a=>a+"-"+s),r&&(i=i.concat(i.map(Mr)))),i}function Gt(e){return e.replace(/left|right|bottom|top/g,r=>Js[r])}function sl(e){return{top:0,right:0,bottom:0,left:0,...e}}function fo(e){return typeof e!="number"?sl(e):{top:e,right:e,bottom:e,left:e}}function Yt(e){const{x:r,y:t,width:n,height:s}=e;return{width:n,height:s,top:t,left:r,right:r+n,bottom:t+s,x:r,y:t}}function ho(e,r,t){let{reference:n,floating:s}=e;const i=Fe(r),a=Lr(r),o=Dr(a),l=Ve(r),d=i==="y",u=n.x+n.width/2-s.width/2,v=n.y+n.height/2-s.height/2,x=n[o]/2-s[o]/2;let f;switch(l){case"top":f={x:u,y:n.y-s.height};break;case"bottom":f={x:u,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:v};break;case"left":f={x:n.x-s.width,y:v};break;default:f={x:n.x,y:n.y}}switch(ut(r)){case"start":f[a]-=x*(t&&d?-1:1);break;case"end":f[a]+=x*(t&&d?-1:1);break}return f}async function ll(e,r){var t;r===void 0&&(r={});const{x:n,y:s,platform:i,rects:a,elements:o,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:v="floating",altBoundary:x=!1,padding:f=0}=He(r,e),w=fo(f),b=o[x?v==="floating"?"reference":"floating":v],g=Yt(await i.getClippingRect({element:(t=await(i.isElement==null?void 0:i.isElement(b)))==null||t?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:d,rootBoundary:u,strategy:l})),y=v==="floating"?{x:n,y:s,width:a.floating.width,height:a.floating.height}:a.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),_=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},S=Yt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:k,strategy:l}):y);return{top:(g.top-S.top+w.top)/_.y,bottom:(S.bottom-g.bottom+w.bottom)/_.y,left:(g.left-S.left+w.left)/_.x,right:(S.right-g.right+w.right)/_.x}}const cl=async(e,r,t)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:a}=t,o=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(r));let d=await a.getElementRects({reference:e,floating:r,strategy:s}),{x:u,y:v}=ho(d,n,l),x=n,f={},w=0;for(let b=0;b<o.length;b++){var c;const{name:g,fn:y}=o[b],{x:k,y:_,data:S,reset:I}=await y({x:u,y:v,initialPlacement:n,placement:x,strategy:s,middlewareData:f,rects:d,platform:{...a,detectOverflow:(c=a.detectOverflow)!=null?c:ll},elements:{reference:e,floating:r}});u=k??u,v=_??v,f={...f,[g]:{...f[g],...S}},I&&w<=50&&(w++,typeof I=="object"&&(I.placement&&(x=I.placement),I.rects&&(d=I.rects===!0?await a.getElementRects({reference:e,floating:r,strategy:s}):I.rects),{x:u,y:v}=ho(d,x,l)),b=-1)}return{x:u,y:v,placement:x,strategy:s,middlewareData:f}},dl=e=>({name:"arrow",options:e,async fn(r){const{x:t,y:n,placement:s,rects:i,platform:a,elements:o,middlewareData:l}=r,{element:d,padding:u=0}=He(e,r)||{};if(d==null)return{};const v=fo(u),x={x:t,y:n},f=Lr(s),w=Dr(f),c=await a.getDimensions(d),b=f==="y",g=b?"top":"left",y=b?"bottom":"right",k=b?"clientHeight":"clientWidth",_=i.reference[w]+i.reference[f]-x[f]-i.floating[w],S=x[f]-i.reference[f],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let A=I?I[k]:0;(!A||!await(a.isElement==null?void 0:a.isElement(I)))&&(A=o.floating[k]||i.floating[w]);const T=_/2-S/2,R=A/2-c[w]/2-1,U=qe(v[g],R),X=qe(v[y],R),z=U,L=A-c[w]-X,p=A/2-c[w]/2+T,B=Pr(z,p,L),G=!l.arrow&&ut(s)!=null&&p!==B&&i.reference[w]/2-(p<z?U:X)-c[w]/2<0,F=G?p<z?p-z:p-L:0;return{[f]:x[f]+F,data:{[f]:B,centerOffset:p-B-F,...G&&{alignmentOffset:F}},reset:G}}}),ul=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var t,n;const{placement:s,middlewareData:i,rects:a,initialPlacement:o,platform:l,elements:d}=r,{mainAxis:u=!0,crossAxis:v=!0,fallbackPlacements:x,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:c=!0,...b}=He(e,r);if((t=i.arrow)!=null&&t.alignmentOffset)return{};const g=Ve(s),y=Fe(o),k=Ve(o)===o,_=await(l.isRTL==null?void 0:l.isRTL(d.floating)),S=x||(k||!c?[Gt(o)]:rl(o)),I=w!=="none";!x&&I&&S.push(...al(o,c,w,_));const A=[o,...S],T=await l.detectOverflow(r,b),R=[];let U=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&R.push(T[g]),v){const p=tl(s,a,_);R.push(T[p[0]],T[p[1]])}if(U=[...U,{placement:s,overflows:R}],!R.every(p=>p<=0)){var X,z;const p=(((X=i.flip)==null?void 0:X.index)||0)+1,B=A[p];if(B&&(!(v==="alignment"?y!==Fe(B):!1)||U.every(M=>Fe(M.placement)===y?M.overflows[0]>0:!0)))return{data:{index:p,overflows:U},reset:{placement:B}};let G=(z=U.filter(F=>F.overflows[0]<=0).sort((F,M)=>F.overflows[1]-M.overflows[1])[0])==null?void 0:z.placement;if(!G)switch(f){case"bestFit":{var L;const F=(L=U.filter(M=>{if(I){const W=Fe(M.placement);return W===y||W==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(W=>W>0).reduce((W,oe)=>W+oe,0)]).sort((M,W)=>M[1]-W[1])[0])==null?void 0:L[0];F&&(G=F);break}case"initialPlacement":G=o;break}if(s!==G)return{reset:{placement:G}}}return{}}}};function po(e,r){return{top:e.top-r.height,right:e.right-r.width,bottom:e.bottom-r.height,left:e.left-r.width}}function mo(e){return Xs.some(r=>e[r]>=0)}const fl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(r){const{rects:t,platform:n}=r,{strategy:s="referenceHidden",...i}=He(e,r);switch(s){case"referenceHidden":{const a=await n.detectOverflow(r,{...i,elementContext:"reference"}),o=po(a,t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:mo(o)}}}case"escaped":{const a=await n.detectOverflow(r,{...i,altBoundary:!0}),o=po(a,t.floating);return{data:{escapedOffsets:o,escaped:mo(o)}}}default:return{}}}}},go=new Set(["left","top"]);async function hl(e,r){const{placement:t,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),a=Ve(t),o=ut(t),l=Fe(t)==="y",d=go.has(a)?-1:1,u=i&&l?-1:1,v=He(r,e);let{mainAxis:x,crossAxis:f,alignmentAxis:w}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return o&&typeof w=="number"&&(f=o==="end"?w*-1:w),l?{x:f*u,y:x*d}:{x:x*d,y:f*u}}const pl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var t,n;const{x:s,y:i,placement:a,middlewareData:o}=r,l=await hl(r,e);return a===((t=o.offset)==null?void 0:t.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:a}}}}},ml=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:t,y:n,placement:s,platform:i}=r,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:g=>{let{x:y,y:k}=g;return{x:y,y:k}}},...d}=He(e,r),u={x:t,y:n},v=await i.detectOverflow(r,d),x=Fe(Ve(s)),f=Rr(x);let w=u[f],c=u[x];if(a){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",k=w+v[g],_=w-v[y];w=Pr(k,w,_)}if(o){const g=x==="y"?"top":"left",y=x==="y"?"bottom":"right",k=c+v[g],_=c-v[y];c=Pr(k,c,_)}const b=l.fn({...r,[f]:w,[x]:c});return{...b,data:{x:b.x-t,y:b.y-n,enabled:{[f]:a,[x]:o}}}}}},gl=function(e){return e===void 0&&(e={}),{options:e,fn(r){const{x:t,y:n,placement:s,rects:i,middlewareData:a}=r,{offset:o=0,mainAxis:l=!0,crossAxis:d=!0}=He(e,r),u={x:t,y:n},v=Fe(s),x=Rr(v);let f=u[x],w=u[v];const c=He(o,r),b=typeof c=="number"?{mainAxis:c,crossAxis:0}:{mainAxis:0,crossAxis:0,...c};if(l){const k=x==="y"?"height":"width",_=i.reference[x]-i.floating[k]+b.mainAxis,S=i.reference[x]+i.reference[k]-b.mainAxis;f<_?f=_:f>S&&(f=S)}if(d){var g,y;const k=x==="y"?"width":"height",_=go.has(Ve(s)),S=i.reference[v]-i.floating[k]+(_&&((g=a.offset)==null?void 0:g[v])||0)+(_?0:b.crossAxis),I=i.reference[v]+i.reference[k]+(_?0:((y=a.offset)==null?void 0:y[v])||0)-(_?b.crossAxis:0);w<S?w=S:w>I&&(w=I)}return{[x]:f,[v]:w}}}},bl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(r){var t,n;const{placement:s,rects:i,platform:a,elements:o}=r,{apply:l=()=>{},...d}=He(e,r),u=await a.detectOverflow(r,d),v=Ve(s),x=ut(s),f=Fe(s)==="y",{width:w,height:c}=i.floating;let b,g;v==="top"||v==="bottom"?(b=v,g=x===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(g=v,b=x==="end"?"top":"bottom");const y=c-u.top-u.bottom,k=w-u.left-u.right,_=qe(c-u[b],y),S=qe(w-u[g],k),I=!r.middlewareData.shift;let A=_,T=S;if((t=r.middlewareData.shift)!=null&&t.enabled.x&&(T=k),(n=r.middlewareData.shift)!=null&&n.enabled.y&&(A=y),I&&!x){const U=Te(u.left,0),X=Te(u.right,0),z=Te(u.top,0),L=Te(u.bottom,0);f?T=w-2*(U!==0||X!==0?U+X:Te(u.left,u.right)):A=c-2*(z!==0||L!==0?z+L:Te(u.top,u.bottom))}await l({...r,availableWidth:T,availableHeight:A});const R=await a.getDimensions(o.floating);return w!==R.width||c!==R.height?{reset:{rects:!0}}:{}}}};function qt(){return typeof window<"u"}function ft(e){return bo(e)?(e.nodeName||"").toLowerCase():"#document"}function Oe(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function Be(e){var r;return(r=(bo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function bo(e){return qt()?e instanceof Node||e instanceof Oe(e).Node:!1}function Pe(e){return qt()?e instanceof Element||e instanceof Oe(e).Element:!1}function Ue(e){return qt()?e instanceof HTMLElement||e instanceof Oe(e).HTMLElement:!1}function vo(e){return!qt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Oe(e).ShadowRoot}const vl=new Set(["inline","contents"]);function zt(e){const{overflow:r,overflowX:t,overflowY:n,display:s}=Re(e);return/auto|scroll|overlay|hidden|clip/.test(r+n+t)&&!vl.has(s)}const xl=new Set(["table","td","th"]);function wl(e){return xl.has(ft(e))}const yl=[":popover-open",":modal"];function Xt(e){return yl.some(r=>{try{return e.matches(r)}catch{return!1}})}const kl=["transform","translate","scale","rotate","perspective"],_l=["transform","translate","scale","rotate","perspective","filter"],Sl=["paint","layout","strict","content"];function Fr(e){const r=Br(),t=Pe(e)?Re(e):e;return kl.some(n=>t[n]?t[n]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!r&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!r&&(t.filter?t.filter!=="none":!1)||_l.some(n=>(t.willChange||"").includes(n))||Sl.some(n=>(t.contain||"").includes(n))}function El(e){let r=Xe(e);for(;Ue(r)&&!ht(r);){if(Fr(r))return r;if(Xt(r))return null;r=Xe(r)}return null}function Br(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Cl=new Set(["html","body","#document"]);function ht(e){return Cl.has(ft(e))}function Re(e){return Oe(e).getComputedStyle(e)}function Jt(e){return Pe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xe(e){if(ft(e)==="html")return e;const r=e.assignedSlot||e.parentNode||vo(e)&&e.host||Be(e);return vo(r)?r.host:r}function xo(e){const r=Xe(e);return ht(r)?e.ownerDocument?e.ownerDocument.body:e.body:Ue(r)&&zt(r)?r:xo(r)}function jt(e,r,t){var n;r===void 0&&(r=[]),t===void 0&&(t=!0);const s=xo(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),a=Oe(s);if(i){const o=Ur(a);return r.concat(a,a.visualViewport||[],zt(s)?s:[],o&&t?jt(o):[])}return r.concat(s,jt(s,[],t))}function Ur(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wo(e){const r=Re(e);let t=parseFloat(r.width)||0,n=parseFloat(r.height)||0;const s=Ue(e),i=s?e.offsetWidth:t,a=s?e.offsetHeight:n,o=Zt(t)!==i||Zt(n)!==a;return o&&(t=i,n=a),{width:t,height:n,$:o}}function Wr(e){return Pe(e)?e:e.contextElement}function pt(e){const r=Wr(e);if(!Ue(r))return Me(1);const t=r.getBoundingClientRect(),{width:n,height:s,$:i}=wo(r);let a=(i?Zt(t.width):t.width)/n,o=(i?Zt(t.height):t.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const zl=Me(0);function yo(e){const r=Oe(e);return!Br()||!r.visualViewport?zl:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function jl(e,r,t){return r===void 0&&(r=!1),!t||r&&t!==Oe(e)?!1:r}function nt(e,r,t,n){r===void 0&&(r=!1),t===void 0&&(t=!1);const s=e.getBoundingClientRect(),i=Wr(e);let a=Me(1);r&&(n?Pe(n)&&(a=pt(n)):a=pt(e));const o=jl(i,t,n)?yo(i):Me(0);let l=(s.left+o.x)/a.x,d=(s.top+o.y)/a.y,u=s.width/a.x,v=s.height/a.y;if(i){const x=Oe(i),f=n&&Pe(n)?Oe(n):n;let w=x,c=Ur(w);for(;c&&n&&f!==w;){const b=pt(c),g=c.getBoundingClientRect(),y=Re(c),k=g.left+(c.clientLeft+parseFloat(y.paddingLeft))*b.x,_=g.top+(c.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,d*=b.y,u*=b.x,v*=b.y,l+=k,d+=_,w=Oe(c),c=Ur(w)}}return Yt({width:u,height:v,x:l,y:d})}function Qt(e,r){const t=Jt(e).scrollLeft;return r?r.left+t:nt(Be(e)).left+t}function ko(e,r){const t=e.getBoundingClientRect(),n=t.left+r.scrollLeft-Qt(e,t),s=t.top+r.scrollTop;return{x:n,y:s}}function Nl(e){let{elements:r,rect:t,offsetParent:n,strategy:s}=e;const i=s==="fixed",a=Be(n),o=r?Xt(r.floating):!1;if(n===a||o&&i)return t;let l={scrollLeft:0,scrollTop:0},d=Me(1);const u=Me(0),v=Ue(n);if((v||!v&&!i)&&((ft(n)!=="body"||zt(a))&&(l=Jt(n)),Ue(n))){const f=nt(n);d=pt(n),u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}const x=a&&!v&&!i?ko(a,l):Me(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-l.scrollLeft*d.x+u.x+x.x,y:t.y*d.y-l.scrollTop*d.y+u.y+x.y}}function Al(e){return Array.from(e.getClientRects())}function Tl(e){const r=Be(e),t=Jt(e),n=e.ownerDocument.body,s=Te(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),i=Te(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+Qt(e);const o=-t.scrollTop;return Re(n).direction==="rtl"&&(a+=Te(r.clientWidth,n.clientWidth)-s),{width:s,height:i,x:a,y:o}}const _o=25;function Ol(e,r){const t=Oe(e),n=Be(e),s=t.visualViewport;let i=n.clientWidth,a=n.clientHeight,o=0,l=0;if(s){i=s.width,a=s.height;const u=Br();(!u||u&&r==="fixed")&&(o=s.offsetLeft,l=s.offsetTop)}const d=Qt(n);if(d<=0){const u=n.ownerDocument,v=u.body,x=getComputedStyle(v),f=u.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,w=Math.abs(n.clientWidth-v.clientWidth-f);w<=_o&&(i-=w)}else d<=_o&&(i+=d);return{width:i,height:a,x:o,y:l}}const Il=new Set(["absolute","fixed"]);function Pl(e,r){const t=nt(e,!0,r==="fixed"),n=t.top+e.clientTop,s=t.left+e.clientLeft,i=Ue(e)?pt(e):Me(1),a=e.clientWidth*i.x,o=e.clientHeight*i.y,l=s*i.x,d=n*i.y;return{width:a,height:o,x:l,y:d}}function So(e,r,t){let n;if(r==="viewport")n=Ol(e,t);else if(r==="document")n=Tl(Be(e));else if(Pe(r))n=Pl(r,t);else{const s=yo(e);n={x:r.x-s.x,y:r.y-s.y,width:r.width,height:r.height}}return Yt(n)}function Eo(e,r){const t=Xe(e);return t===r||!Pe(t)||ht(t)?!1:Re(t).position==="fixed"||Eo(t,r)}function Rl(e,r){const t=r.get(e);if(t)return t;let n=jt(e,[],!1).filter(o=>Pe(o)&&ft(o)!=="body"),s=null;const i=Re(e).position==="fixed";let a=i?Xe(e):e;for(;Pe(a)&&!ht(a);){const o=Re(a),l=Fr(a);!l&&o.position==="fixed"&&(s=null),(i?!l&&!s:!l&&o.position==="static"&&!!s&&Il.has(s.position)||zt(a)&&!l&&Eo(e,a))?n=n.filter(u=>u!==a):s=o,a=Xe(a)}return r.set(e,n),n}function Dl(e){let{element:r,boundary:t,rootBoundary:n,strategy:s}=e;const a=[...t==="clippingAncestors"?Xt(r)?[]:Rl(r,this._c):[].concat(t),n],o=a[0],l=a.reduce((d,u)=>{const v=So(r,u,s);return d.top=Te(v.top,d.top),d.right=qe(v.right,d.right),d.bottom=qe(v.bottom,d.bottom),d.left=Te(v.left,d.left),d},So(r,o,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ll(e){const{width:r,height:t}=wo(e);return{width:r,height:t}}function Ml(e,r,t){const n=Ue(r),s=Be(r),i=t==="fixed",a=nt(e,!0,i,r);let o={scrollLeft:0,scrollTop:0};const l=Me(0);function d(){l.x=Qt(s)}if(n||!n&&!i)if((ft(r)!=="body"||zt(s))&&(o=Jt(r)),n){const f=nt(r,!0,i,r);l.x=f.x+r.clientLeft,l.y=f.y+r.clientTop}else s&&d();i&&!n&&s&&d();const u=s&&!n&&!i?ko(s,o):Me(0),v=a.left+o.scrollLeft-l.x-u.x,x=a.top+o.scrollTop-l.y-u.y;return{x:v,y:x,width:a.width,height:a.height}}function $r(e){return Re(e).position==="static"}function Co(e,r){if(!Ue(e)||Re(e).position==="fixed")return null;if(r)return r(e);let t=e.offsetParent;return Be(e)===t&&(t=t.ownerDocument.body),t}function zo(e,r){const t=Oe(e);if(Xt(e))return t;if(!Ue(e)){let s=Xe(e);for(;s&&!ht(s);){if(Pe(s)&&!$r(s))return s;s=Xe(s)}return t}let n=Co(e,r);for(;n&&wl(n)&&$r(n);)n=Co(n,r);return n&&ht(n)&&$r(n)&&!Fr(n)?t:n||El(e)||t}const Fl=async function(e){const r=this.getOffsetParent||zo,t=this.getDimensions,n=await t(e.floating);return{reference:Ml(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Bl(e){return Re(e).direction==="rtl"}const Ul={convertOffsetParentRelativeRectToViewportRelativeRect:Nl,getDocumentElement:Be,getClippingRect:Dl,getOffsetParent:zo,getElementRects:Fl,getClientRects:Al,getDimensions:Ll,getScale:pt,isElement:Pe,isRTL:Bl};function jo(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function Wl(e,r){let t=null,n;const s=Be(e);function i(){var o;clearTimeout(n),(o=t)==null||o.disconnect(),t=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),i();const d=e.getBoundingClientRect(),{left:u,top:v,width:x,height:f}=d;if(o||r(),!x||!f)return;const w=Kt(v),c=Kt(s.clientWidth-(u+x)),b=Kt(s.clientHeight-(v+f)),g=Kt(u),k={rootMargin:-w+"px "+-c+"px "+-b+"px "+-g+"px",threshold:Te(0,qe(1,l))||1};let _=!0;function S(I){const A=I[0].intersectionRatio;if(A!==l){if(!_)return a();A?a(!1,A):n=setTimeout(()=>{a(!1,1e-7)},1e3)}A===1&&!jo(d,e.getBoundingClientRect())&&a(),_=!1}try{t=new IntersectionObserver(S,{...k,root:s.ownerDocument})}catch{t=new IntersectionObserver(S,k)}t.observe(e)}return a(!0),i}function $l(e,r,t,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,d=Wr(e),u=s||i?[...d?jt(d):[],...jt(r)]:[];u.forEach(g=>{s&&g.addEventListener("scroll",t,{passive:!0}),i&&g.addEventListener("resize",t)});const v=d&&o?Wl(d,t):null;let x=-1,f=null;a&&(f=new ResizeObserver(g=>{let[y]=g;y&&y.target===d&&f&&(f.unobserve(r),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var k;(k=f)==null||k.observe(r)})),t()}),d&&!l&&f.observe(d),f.observe(r));let w,c=l?nt(e):null;l&&b();function b(){const g=nt(e);c&&!jo(c,g)&&t(),c=g,w=requestAnimationFrame(b)}return t(),()=>{var g;u.forEach(y=>{s&&y.removeEventListener("scroll",t),i&&y.removeEventListener("resize",t)}),v==null||v(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(w)}}const Hl=pl,Vl=ml,Zl=ul,Kl=bl,Gl=fl,No=dl,Yl=gl,ql=(e,r,t)=>{const n=new Map,s={platform:Ul,...t},i={...s.platform,_c:n};return cl(e,r,{...s,platform:i})};var Xl=typeof document<"u",Jl=function(){},er=Xl?Q.useLayoutEffect:Jl;function tr(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let t,n,s;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(t=e.length,t!==r.length)return!1;for(n=t;n--!==0;)if(!tr(e[n],r[n]))return!1;return!0}if(s=Object.keys(e),t=s.length,t!==Object.keys(r).length)return!1;for(n=t;n--!==0;)if(!{}.hasOwnProperty.call(r,s[n]))return!1;for(n=t;n--!==0;){const i=s[n];if(!(i==="_owner"&&e.$$typeof)&&!tr(e[i],r[i]))return!1}return!0}return e!==e&&r!==r}function Ao(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function To(e,r){const t=Ao(e);return Math.round(r*t)/t}function Hr(e){const r=P.useRef(e);return er(()=>{r.current=e}),r}function Ql(e){e===void 0&&(e={});const{placement:r="bottom",strategy:t="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:a}={},transform:o=!0,whileElementsMounted:l,open:d}=e,[u,v]=P.useState({x:0,y:0,strategy:t,placement:r,middlewareData:{},isPositioned:!1}),[x,f]=P.useState(n);tr(x,n)||f(n);const[w,c]=P.useState(null),[b,g]=P.useState(null),y=P.useCallback(M=>{M!==I.current&&(I.current=M,c(M))},[]),k=P.useCallback(M=>{M!==A.current&&(A.current=M,g(M))},[]),_=i||w,S=a||b,I=P.useRef(null),A=P.useRef(null),T=P.useRef(u),R=l!=null,U=Hr(l),X=Hr(s),z=Hr(d),L=P.useCallback(()=>{if(!I.current||!A.current)return;const M={placement:r,strategy:t,middleware:x};X.current&&(M.platform=X.current),ql(I.current,A.current,M).then(W=>{const oe={...W,isPositioned:z.current!==!1};p.current&&!tr(T.current,oe)&&(T.current=oe,It.flushSync(()=>{v(oe)}))})},[x,r,t,X,z]);er(()=>{d===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,v(M=>({...M,isPositioned:!1})))},[d]);const p=P.useRef(!1);er(()=>(p.current=!0,()=>{p.current=!1}),[]),er(()=>{if(_&&(I.current=_),S&&(A.current=S),_&&S){if(U.current)return U.current(_,S,L);L()}},[_,S,L,U,R]);const B=P.useMemo(()=>({reference:I,floating:A,setReference:y,setFloating:k}),[y,k]),G=P.useMemo(()=>({reference:_,floating:S}),[_,S]),F=P.useMemo(()=>{const M={position:t,left:0,top:0};if(!G.floating)return M;const W=To(G.floating,u.x),oe=To(G.floating,u.y);return o?{...M,transform:"translate("+W+"px, "+oe+"px)",...Ao(G.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:W,top:oe}},[t,o,G.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:L,refs:B,elements:G,floatingStyles:F}),[u,L,B,G,F])}const ec=e=>{function r(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:e,fn(t){const{element:n,padding:s}=typeof e=="function"?e(t):e;return n&&r(n)?n.current!=null?No({element:n.current,padding:s}).fn(t):{}:n?No({element:n,padding:s}).fn(t):{}}}},tc=(e,r)=>({...Hl(e),options:[e,r]}),rc=(e,r)=>({...Vl(e),options:[e,r]}),nc=(e,r)=>({...Yl(e),options:[e,r]}),oc=(e,r)=>({...Zl(e),options:[e,r]}),ic=(e,r)=>({...Kl(e),options:[e,r]}),ac=(e,r)=>({...Gl(e),options:[e,r]}),sc=(e,r)=>({...ec(e),options:[e,r]});var lc="Arrow",Oo=P.forwardRef((e,r)=>{const{children:t,width:n=10,height:s=5,...i}=e;return h.jsx(Ee.svg,{...i,ref:r,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?t:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});Oo.displayName=lc;var cc=Oo;function dc(e){const[r,t]=P.useState(void 0);return Ae(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let a,o;if("borderBoxSize"in i){const l=i.borderBoxSize,d=Array.isArray(l)?l[0]:l;a=d.inlineSize,o=d.blockSize}else a=e.offsetWidth,o=e.offsetHeight;t({width:a,height:o})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else t(void 0)},[e]),r}var Vr="Popper",[Io,Po]=jr(Vr),[uc,Ro]=Io(Vr),Do=e=>{const{__scopePopper:r,children:t}=e,[n,s]=P.useState(null);return h.jsx(uc,{scope:r,anchor:n,onAnchorChange:s,children:t})};Do.displayName=Vr;var Lo="PopperAnchor",Mo=P.forwardRef((e,r)=>{const{__scopePopper:t,virtualRef:n,...s}=e,i=Ro(Lo,t),a=P.useRef(null),o=je(r,a),l=P.useRef(null);return P.useEffect(()=>{const d=l.current;l.current=(n==null?void 0:n.current)||a.current,d!==l.current&&i.onAnchorChange(l.current)}),n?null:h.jsx(Ee.div,{...s,ref:o})});Mo.displayName=Lo;var Zr="PopperContent",[fc,hc]=Io(Zr),Fo=P.forwardRef((e,r)=>{var ee,ae,de,fe,ue,he;const{__scopePopper:t,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:v="partial",hideWhenDetached:x=!1,updatePositionStrategy:f="optimized",onPlaced:w,...c}=e,b=Ro(Zr,t),[g,y]=P.useState(null),k=je(r,we=>y(we)),[_,S]=P.useState(null),I=dc(_),A=(I==null?void 0:I.width)??0,T=(I==null?void 0:I.height)??0,R=n+(i!=="center"?"-"+i:""),U=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},X=Array.isArray(d)?d:[d],z=X.length>0,L={padding:U,boundary:X.filter(mc),altBoundary:z},{refs:p,floatingStyles:B,placement:G,isPositioned:F,middlewareData:M}=Ql({strategy:"fixed",placement:R,whileElementsMounted:(...we)=>$l(...we,{animationFrame:f==="always"}),elements:{reference:b.anchor},middleware:[tc({mainAxis:s+T,alignmentAxis:a}),l&&rc({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?nc():void 0,...L}),l&&oc({...L}),ic({...L,apply:({elements:we,rects:m,availableWidth:q,availableHeight:H})=>{const{width:N,height:C}=m.reference,j=we.floating.style;j.setProperty("--radix-popper-available-width",`${q}px`),j.setProperty("--radix-popper-available-height",`${H}px`),j.setProperty("--radix-popper-anchor-width",`${N}px`),j.setProperty("--radix-popper-anchor-height",`${C}px`)}}),_&&sc({element:_,padding:o}),gc({arrowWidth:A,arrowHeight:T}),x&&ac({strategy:"referenceHidden",...L})]}),[W,oe]=Wo(G),E=rt(w);Ae(()=>{F&&(E==null||E())},[F,E]);const O=(ee=M.arrow)==null?void 0:ee.x,Y=(ae=M.arrow)==null?void 0:ae.y,V=((de=M.arrow)==null?void 0:de.centerOffset)!==0,[re,pe]=P.useState();return Ae(()=>{g&&pe(window.getComputedStyle(g).zIndex)},[g]),h.jsx("div",{ref:p.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:F?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[(fe=M.transformOrigin)==null?void 0:fe.x,(ue=M.transformOrigin)==null?void 0:ue.y].join(" "),...((he=M.hide)==null?void 0:he.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx(fc,{scope:t,placedSide:W,onArrowChange:S,arrowX:O,arrowY:Y,shouldHideArrow:V,children:h.jsx(Ee.div,{"data-side":W,"data-align":oe,...c,ref:k,style:{...c.style,animation:F?void 0:"none"}})})})});Fo.displayName=Zr;var Bo="PopperArrow",pc={top:"bottom",right:"left",bottom:"top",left:"right"},Uo=P.forwardRef(function(r,t){const{__scopePopper:n,...s}=r,i=hc(Bo,n),a=pc[i.placedSide];return h.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:h.jsx(cc,{...s,ref:t,style:{...s.style,display:"block"}})})});Uo.displayName=Bo;function mc(e){return e!==null}var gc=e=>({name:"transformOrigin",options:e,fn(r){var b,g,y;const{placement:t,rects:n,middlewareData:s}=r,a=((b=s.arrow)==null?void 0:b.centerOffset)!==0,o=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[d,u]=Wo(t),v={start:"0%",center:"50%",end:"100%"}[u],x=(((g=s.arrow)==null?void 0:g.x)??0)+o/2,f=(((y=s.arrow)==null?void 0:y.y)??0)+l/2;let w="",c="";return d==="bottom"?(w=a?v:`${x}px`,c=`${-l}px`):d==="top"?(w=a?v:`${x}px`,c=`${n.floating.height+l}px`):d==="right"?(w=`${-l}px`,c=a?v:`${f}px`):d==="left"&&(w=`${n.floating.width+l}px`,c=a?v:`${f}px`),{data:{x:w,y:c}}}});function Wo(e){const[r,t="center"]=e.split("-");return[r,t]}var bc=Do,vc=Mo,xc=Fo,wc=Uo,yc="Portal",$o=P.forwardRef((e,r)=>{var o;const{container:t,...n}=e,[s,i]=P.useState(!1);Ae(()=>i(!0),[]);const a=t||s&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?gr.createPortal(h.jsx(Ee.div,{...n,ref:r}),a):null});$o.displayName=yc;var kc=P[" useInsertionEffect ".trim().toString()]||Ae;function Ho({prop:e,defaultProp:r,onChange:t=()=>{},caller:n}){const[s,i,a]=_c({defaultProp:r,onChange:t}),o=e!==void 0,l=o?e:s;{const u=P.useRef(e!==void 0);P.useEffect(()=>{const v=u.current;v!==o&&console.warn(`${n} is changing from ${v?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=o},[o,n])}const d=P.useCallback(u=>{var v;if(o){const x=Sc(u)?u(e):u;x!==e&&((v=a.current)==null||v.call(a,x))}else i(u)},[o,e,i,a]);return[l,d]}function _c({defaultProp:e,onChange:r}){const[t,n]=P.useState(e),s=P.useRef(t),i=P.useRef(r);return kc(()=>{i.current=r},[r]),P.useEffect(()=>{var a;s.current!==t&&((a=i.current)==null||a.call(i,t),s.current=t)},[t,s]),[t,n,i]}function Sc(e){return typeof e=="function"}function Ec(e){const r=P.useRef({value:e,previous:e});return P.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}var Vo=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Cc="VisuallyHidden",zc=P.forwardRef((e,r)=>h.jsx(Ee.span,{...e,ref:r,style:{...Vo,...e.style}}));zc.displayName=Cc;var jc=function(e){if(typeof document>"u")return null;var r=Array.isArray(e)?e[0]:e;return r.ownerDocument.body},mt=new WeakMap,rr=new WeakMap,nr={},Kr=0,Zo=function(e){return e&&(e.host||Zo(e.parentNode))},Nc=function(e,r){return r.map(function(t){if(e.contains(t))return t;var n=Zo(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},Ac=function(e,r,t,n){var s=Nc(r,Array.isArray(e)?e:[e]);nr[t]||(nr[t]=new WeakMap);var i=nr[t],a=[],o=new Set,l=new Set(s),d=function(v){!v||o.has(v)||(o.add(v),d(v.parentNode))};s.forEach(d);var u=function(v){!v||l.has(v)||Array.prototype.forEach.call(v.children,function(x){if(o.has(x))u(x);else try{var f=x.getAttribute(n),w=f!==null&&f!=="false",c=(mt.get(x)||0)+1,b=(i.get(x)||0)+1;mt.set(x,c),i.set(x,b),a.push(x),c===1&&w&&rr.set(x,!0),b===1&&x.setAttribute(t,"true"),w||x.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",x,g)}})};return u(r),o.clear(),Kr++,function(){a.forEach(function(v){var x=mt.get(v)-1,f=i.get(v)-1;mt.set(v,x),i.set(v,f),x||(rr.has(v)||v.removeAttribute(n),rr.delete(v)),f||v.removeAttribute(t)}),Kr--,Kr||(mt=new WeakMap,mt=new WeakMap,rr=new WeakMap,nr={})}},Tc=function(e,r,t){t===void 0&&(t="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=jc(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),Ac(n,s,t,"aria-hidden")):function(){return null}},We=function(){return We=Object.assign||function(r){for(var t,n=1,s=arguments.length;n<s;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},We.apply(this,arguments)};function Ko(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)r.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(t[n[s]]=e[n[s]]);return t}function Oc(e,r,t){if(t||arguments.length===2)for(var n=0,s=r.length,i;n<s;n++)(i||!(n in r))&&(i||(i=Array.prototype.slice.call(r,0,n)),i[n]=r[n]);return e.concat(i||Array.prototype.slice.call(r))}typeof SuppressedError=="function"&&SuppressedError;var or="right-scroll-bar-position",ir="width-before-scroll-bar",Ic="with-scroll-bars-hidden",Pc="--removed-body-scroll-bar-size";function Gr(e,r){return typeof e=="function"?e(r):e&&(e.current=r),e}function Rc(e,r){var t=Q.useState(function(){return{value:e,callback:r,facade:{get current(){return t.value},set current(n){var s=t.value;s!==n&&(t.value=n,t.callback(n,s))}}}})[0];return t.callback=r,t.facade}var Dc=typeof window<"u"?P.useLayoutEffect:P.useEffect,Go=new WeakMap;function Lc(e,r){var t=Rc(null,function(n){return e.forEach(function(s){return Gr(s,n)})});return Dc(function(){var n=Go.get(t);if(n){var s=new Set(n),i=new Set(e),a=t.current;s.forEach(function(o){i.has(o)||Gr(o,null)}),i.forEach(function(o){s.has(o)||Gr(o,a)})}Go.set(t,e)},[e]),t}function Mc(e){return e}function Fc(e,r){r===void 0&&(r=Mc);var t=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(i){var a=r(i,n);return t.push(a),function(){t=t.filter(function(o){return o!==a})}},assignSyncMedium:function(i){for(n=!0;t.length;){var a=t;t=[],a.forEach(i)}t={push:function(o){return i(o)},filter:function(){return t}}},assignMedium:function(i){n=!0;var a=[];if(t.length){var o=t;t=[],o.forEach(i),a=t}var l=function(){var u=a;a=[],u.forEach(i)},d=function(){return Promise.resolve().then(l)};d(),t={push:function(u){a.push(u),d()},filter:function(u){return a=a.filter(u),t}}}};return s}function Bc(e){e===void 0&&(e={});var r=Fc(null);return r.options=We({async:!0,ssr:!1},e),r}var Yo=function(e){var r=e.sideCar,t=Ko(e,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=r.read();if(!n)throw new Error("Sidecar medium not found");return P.createElement(n,We({},t))};Yo.isSideCarExport=!0;function Uc(e,r){return e.useMedium(r),Yo}var qo=Bc(),Yr=function(){},ar=P.forwardRef(function(e,r){var t=P.useRef(null),n=P.useState({onScrollCapture:Yr,onWheelCapture:Yr,onTouchMoveCapture:Yr}),s=n[0],i=n[1],a=e.forwardProps,o=e.children,l=e.className,d=e.removeScrollBar,u=e.enabled,v=e.shards,x=e.sideCar,f=e.noRelative,w=e.noIsolation,c=e.inert,b=e.allowPinchZoom,g=e.as,y=g===void 0?"div":g,k=e.gapMode,_=Ko(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=x,I=Lc([t,r]),A=We(We({},_),s);return P.createElement(P.Fragment,null,u&&P.createElement(S,{sideCar:qo,removeScrollBar:d,shards:v,noRelative:f,noIsolation:w,inert:c,setCallbacks:i,allowPinchZoom:!!b,lockRef:t,gapMode:k}),a?P.cloneElement(P.Children.only(o),We(We({},A),{ref:I})):P.createElement(y,We({},A,{className:l,ref:I}),o))});ar.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ar.classNames={fullWidth:ir,zeroRight:or};var Wc=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $c(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var r=Wc();return r&&e.setAttribute("nonce",r),e}function Hc(e,r){e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}function Vc(e){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(e)}var Zc=function(){var e=0,r=null;return{add:function(t){e==0&&(r=$c())&&(Hc(r,t),Vc(r)),e++},remove:function(){e--,!e&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},Kc=function(){var e=Zc();return function(r,t){P.useEffect(function(){return e.add(r),function(){e.remove()}},[r&&t])}},Xo=function(){var e=Kc(),r=function(t){var n=t.styles,s=t.dynamic;return e(n,s),null};return r},Gc={left:0,top:0,right:0,gap:0},qr=function(e){return parseInt(e||"",10)||0},Yc=function(e){var r=window.getComputedStyle(document.body),t=r[e==="padding"?"paddingLeft":"marginLeft"],n=r[e==="padding"?"paddingTop":"marginTop"],s=r[e==="padding"?"paddingRight":"marginRight"];return[qr(t),qr(n),qr(s)]},qc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Gc;var r=Yc(e),t=document.documentElement.clientWidth,n=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,n-t+r[2]-r[0])}},Xc=Xo(),gt="data-scroll-locked",Jc=function(e,r,t,n){var s=e.left,i=e.top,a=e.right,o=e.gap;return t===void 0&&(t="margin"),`
|
|
209
|
+
.`.concat(Ic,` {
|
|
210
|
+
overflow: hidden `).concat(n,`;
|
|
211
|
+
padding-right: `).concat(o,"px ").concat(n,`;
|
|
212
|
+
}
|
|
213
|
+
body[`).concat(gt,`] {
|
|
214
|
+
overflow: hidden `).concat(n,`;
|
|
215
|
+
overscroll-behavior: contain;
|
|
216
|
+
`).concat([r&&"position: relative ".concat(n,";"),t==="margin"&&`
|
|
217
|
+
padding-left: `.concat(s,`px;
|
|
218
|
+
padding-top: `).concat(i,`px;
|
|
219
|
+
padding-right: `).concat(a,`px;
|
|
220
|
+
margin-left:0;
|
|
221
|
+
margin-top:0;
|
|
222
|
+
margin-right: `).concat(o,"px ").concat(n,`;
|
|
223
|
+
`),t==="padding"&&"padding-right: ".concat(o,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.`).concat(or,` {
|
|
227
|
+
right: `).concat(o,"px ").concat(n,`;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.`).concat(ir,` {
|
|
231
|
+
margin-right: `).concat(o,"px ").concat(n,`;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.`).concat(or," .").concat(or,` {
|
|
235
|
+
right: 0 `).concat(n,`;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.`).concat(ir," .").concat(ir,` {
|
|
239
|
+
margin-right: 0 `).concat(n,`;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
body[`).concat(gt,`] {
|
|
243
|
+
`).concat(Pc,": ").concat(o,`px;
|
|
244
|
+
}
|
|
245
|
+
`)},Jo=function(){var e=parseInt(document.body.getAttribute(gt)||"0",10);return isFinite(e)?e:0},Qc=function(){P.useEffect(function(){return document.body.setAttribute(gt,(Jo()+1).toString()),function(){var e=Jo()-1;e<=0?document.body.removeAttribute(gt):document.body.setAttribute(gt,e.toString())}},[])},ed=function(e){var r=e.noRelative,t=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;Qc();var i=P.useMemo(function(){return qc(s)},[s]);return P.createElement(Xc,{styles:Jc(i,!r,s,t?"":"!important")})},Xr=!1;if(typeof window<"u")try{var sr=Object.defineProperty({},"passive",{get:function(){return Xr=!0,!0}});window.addEventListener("test",sr,sr),window.removeEventListener("test",sr,sr)}catch{Xr=!1}var bt=Xr?{passive:!1}:!1,td=function(e){return e.tagName==="TEXTAREA"},Qo=function(e,r){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[r]!=="hidden"&&!(t.overflowY===t.overflowX&&!td(e)&&t[r]==="visible")},rd=function(e){return Qo(e,"overflowY")},nd=function(e){return Qo(e,"overflowX")},ei=function(e,r){var t=r.ownerDocument,n=r;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=ti(e,n);if(s){var i=ri(e,n),a=i[1],o=i[2];if(a>o)return!0}n=n.parentNode}while(n&&n!==t.body);return!1},od=function(e){var r=e.scrollTop,t=e.scrollHeight,n=e.clientHeight;return[r,t,n]},id=function(e){var r=e.scrollLeft,t=e.scrollWidth,n=e.clientWidth;return[r,t,n]},ti=function(e,r){return e==="v"?rd(r):nd(r)},ri=function(e,r){return e==="v"?od(r):id(r)},ad=function(e,r){return e==="h"&&r==="rtl"?-1:1},sd=function(e,r,t,n,s){var i=ad(e,window.getComputedStyle(r).direction),a=i*n,o=t.target,l=r.contains(o),d=!1,u=a>0,v=0,x=0;do{if(!o)break;var f=ri(e,o),w=f[0],c=f[1],b=f[2],g=c-b-i*w;(w||g)&&ti(e,o)&&(v+=g,x+=w);var y=o.parentNode;o=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&o!==document.body||l&&(r.contains(o)||r===o));return(u&&Math.abs(v)<1||!u&&Math.abs(x)<1)&&(d=!0),d},lr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ni=function(e){return[e.deltaX,e.deltaY]},oi=function(e){return e&&"current"in e?e.current:e},ld=function(e,r){return e[0]===r[0]&&e[1]===r[1]},cd=function(e){return`
|
|
246
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
247
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
248
|
+
`)},dd=0,vt=[];function ud(e){var r=P.useRef([]),t=P.useRef([0,0]),n=P.useRef(),s=P.useState(dd++)[0],i=P.useState(Xo)[0],a=P.useRef(e);P.useEffect(function(){a.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var c=Oc([e.lockRef.current],(e.shards||[]).map(oi),!0).filter(Boolean);return c.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),c.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var o=P.useCallback(function(c,b){if("touches"in c&&c.touches.length===2||c.type==="wheel"&&c.ctrlKey)return!a.current.allowPinchZoom;var g=lr(c),y=t.current,k="deltaX"in c?c.deltaX:y[0]-g[0],_="deltaY"in c?c.deltaY:y[1]-g[1],S,I=c.target,A=Math.abs(k)>Math.abs(_)?"h":"v";if("touches"in c&&A==="h"&&I.type==="range")return!1;var T=window.getSelection(),R=T&&T.anchorNode,U=R?R===I||R.contains(I):!1;if(U)return!1;var X=ei(A,I);if(!X)return!0;if(X?S=A:(S=A==="v"?"h":"v",X=ei(A,I)),!X)return!1;if(!n.current&&"changedTouches"in c&&(k||_)&&(n.current=S),!S)return!0;var z=n.current||S;return sd(z,b,c,z==="h"?k:_)},[]),l=P.useCallback(function(c){var b=c;if(!(!vt.length||vt[vt.length-1]!==i)){var g="deltaY"in b?ni(b):lr(b),y=r.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&ld(S.delta,g)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var k=(a.current.shards||[]).map(oi).filter(Boolean).filter(function(S){return S.contains(b.target)}),_=k.length>0?o(b,k[0]):!a.current.noIsolation;_&&b.cancelable&&b.preventDefault()}}},[]),d=P.useCallback(function(c,b,g,y){var k={name:c,delta:b,target:g,should:y,shadowParent:fd(g)};r.current.push(k),setTimeout(function(){r.current=r.current.filter(function(_){return _!==k})},1)},[]),u=P.useCallback(function(c){t.current=lr(c),n.current=void 0},[]),v=P.useCallback(function(c){d(c.type,ni(c),c.target,o(c,e.lockRef.current))},[]),x=P.useCallback(function(c){d(c.type,lr(c),c.target,o(c,e.lockRef.current))},[]);P.useEffect(function(){return vt.push(i),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:x}),document.addEventListener("wheel",l,bt),document.addEventListener("touchmove",l,bt),document.addEventListener("touchstart",u,bt),function(){vt=vt.filter(function(c){return c!==i}),document.removeEventListener("wheel",l,bt),document.removeEventListener("touchmove",l,bt),document.removeEventListener("touchstart",u,bt)}},[]);var f=e.removeScrollBar,w=e.inert;return P.createElement(P.Fragment,null,w?P.createElement(i,{styles:cd(s)}):null,f?P.createElement(ed,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function fd(e){for(var r=null;e!==null;)e instanceof ShadowRoot&&(r=e.host,e=e.host),e=e.parentNode;return r}const hd=Uc(qo,ud);var ii=P.forwardRef(function(e,r){return P.createElement(ar,We({},e,{ref:r,sideCar:hd}))});ii.classNames=ar.classNames;var pd=[" ","Enter","ArrowUp","ArrowDown"],md=[" ","Enter"],ot="Select",[cr,dr,gd]=js(ot),[xt]=jr(ot,[gd,Po]),ur=Po(),[bd,Je]=xt(ot),[vd,xd]=xt(ot),ai=e=>{const{__scopeSelect:r,children:t,open:n,defaultOpen:s,onOpenChange:i,value:a,defaultValue:o,onValueChange:l,dir:d,name:u,autoComplete:v,disabled:x,required:f,form:w}=e,c=ur(r),[b,g]=P.useState(null),[y,k]=P.useState(null),[_,S]=P.useState(!1),I=As(d),[A,T]=Ho({prop:n,defaultProp:s??!1,onChange:i,caller:ot}),[R,U]=Ho({prop:a,defaultProp:o,onChange:l,caller:ot}),X=P.useRef(null),z=b?w||!!b.closest("form"):!0,[L,p]=P.useState(new Set),B=Array.from(L).map(G=>G.props.value).join(";");return h.jsx(bc,{...c,children:h.jsxs(bd,{required:f,scope:r,trigger:b,onTriggerChange:g,valueNode:y,onValueNodeChange:k,valueNodeHasChildren:_,onValueNodeHasChildrenChange:S,contentId:Ir(),value:R,onValueChange:U,open:A,onOpenChange:T,dir:I,triggerPointerDownPosRef:X,disabled:x,children:[h.jsx(cr.Provider,{scope:r,children:h.jsx(vd,{scope:e.__scopeSelect,onNativeOptionAdd:P.useCallback(G=>{p(F=>new Set(F).add(G))},[]),onNativeOptionRemove:P.useCallback(G=>{p(F=>{const M=new Set(F);return M.delete(G),M})},[]),children:t})}),z?h.jsxs(Ci,{"aria-hidden":!0,required:f,tabIndex:-1,name:u,autoComplete:v,value:R,onChange:G=>U(G.target.value),disabled:x,form:w,children:[R===void 0?h.jsx("option",{value:""}):null,Array.from(L)]},B):null]})})};ai.displayName=ot;var si="SelectTrigger",li=P.forwardRef((e,r)=>{const{__scopeSelect:t,disabled:n=!1,...s}=e,i=ur(t),a=Je(si,t),o=a.disabled||n,l=je(r,a.onTriggerChange),d=dr(t),u=P.useRef("touch"),[v,x,f]=ji(c=>{const b=d().filter(k=>!k.disabled),g=b.find(k=>k.value===a.value),y=Ni(b,c,g);y!==void 0&&a.onValueChange(y.value)}),w=c=>{o||(a.onOpenChange(!0),f()),c&&(a.triggerPointerDownPosRef.current={x:Math.round(c.pageX),y:Math.round(c.pageY)})};return h.jsx(vc,{asChild:!0,...i,children:h.jsx(Ee.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":zi(a.value)?"":void 0,...s,ref:l,onClick:Ce(s.onClick,c=>{c.currentTarget.focus(),u.current!=="mouse"&&w(c)}),onPointerDown:Ce(s.onPointerDown,c=>{u.current=c.pointerType;const b=c.target;b.hasPointerCapture(c.pointerId)&&b.releasePointerCapture(c.pointerId),c.button===0&&c.ctrlKey===!1&&c.pointerType==="mouse"&&(w(c),c.preventDefault())}),onKeyDown:Ce(s.onKeyDown,c=>{const b=v.current!=="";!(c.ctrlKey||c.altKey||c.metaKey)&&c.key.length===1&&x(c.key),!(b&&c.key===" ")&&pd.includes(c.key)&&(w(),c.preventDefault())})})})});li.displayName=si;var ci="SelectValue",di=P.forwardRef((e,r)=>{const{__scopeSelect:t,className:n,style:s,children:i,placeholder:a="",...o}=e,l=Je(ci,t),{onValueNodeHasChildrenChange:d}=l,u=i!==void 0,v=je(r,l.onValueNodeChange);return Ae(()=>{d(u)},[d,u]),h.jsx(Ee.span,{...o,ref:v,style:{pointerEvents:"none"},children:zi(l.value)?h.jsx(h.Fragment,{children:a}):i})});di.displayName=ci;var wd="SelectIcon",ui=P.forwardRef((e,r)=>{const{__scopeSelect:t,children:n,...s}=e;return h.jsx(Ee.span,{"aria-hidden":!0,...s,ref:r,children:n||"▼"})});ui.displayName=wd;var yd="SelectPortal",fi=e=>h.jsx($o,{asChild:!0,...e});fi.displayName=yd;var it="SelectContent",hi=P.forwardRef((e,r)=>{const t=Je(it,e.__scopeSelect),[n,s]=P.useState();if(Ae(()=>{s(new DocumentFragment)},[]),!t.open){const i=n;return i?It.createPortal(h.jsx(pi,{scope:e.__scopeSelect,children:h.jsx(cr.Slot,{scope:e.__scopeSelect,children:h.jsx("div",{children:e.children})})}),i):null}return h.jsx(mi,{...e,ref:r})});hi.displayName=it;var De=10,[pi,Qe]=xt(it),kd="SelectContentImpl",_d=Vt("SelectContent.RemoveScroll"),mi=P.forwardRef((e,r)=>{const{__scopeSelect:t,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:a,side:o,sideOffset:l,align:d,alignOffset:u,arrowPadding:v,collisionBoundary:x,collisionPadding:f,sticky:w,hideWhenDetached:c,avoidCollisions:b,...g}=e,y=Je(it,t),[k,_]=P.useState(null),[S,I]=P.useState(null),A=je(r,ee=>_(ee)),[T,R]=P.useState(null),[U,X]=P.useState(null),z=dr(t),[L,p]=P.useState(!1),B=P.useRef(!1);P.useEffect(()=>{if(k)return Tc(k)},[k]),Us();const G=P.useCallback(ee=>{const[ae,...de]=z().map(he=>he.ref.current),[fe]=de.slice(-1),ue=document.activeElement;for(const he of ee)if(he===ue||(he==null||he.scrollIntoView({block:"nearest"}),he===ae&&S&&(S.scrollTop=0),he===fe&&S&&(S.scrollTop=S.scrollHeight),he==null||he.focus(),document.activeElement!==ue))return},[z,S]),F=P.useCallback(()=>G([T,k]),[G,T,k]);P.useEffect(()=>{L&&F()},[L,F]);const{onOpenChange:M,triggerPointerDownPosRef:W}=y;P.useEffect(()=>{if(k){let ee={x:0,y:0};const ae=fe=>{var ue,he;ee={x:Math.abs(Math.round(fe.pageX)-(((ue=W.current)==null?void 0:ue.x)??0)),y:Math.abs(Math.round(fe.pageY)-(((he=W.current)==null?void 0:he.y)??0))}},de=fe=>{ee.x<=10&&ee.y<=10?fe.preventDefault():k.contains(fe.target)||M(!1),document.removeEventListener("pointermove",ae),W.current=null};return W.current!==null&&(document.addEventListener("pointermove",ae),document.addEventListener("pointerup",de,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ae),document.removeEventListener("pointerup",de,{capture:!0})}}},[k,M,W]),P.useEffect(()=>{const ee=()=>M(!1);return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[M]);const[oe,E]=ji(ee=>{const ae=z().filter(ue=>!ue.disabled),de=ae.find(ue=>ue.ref.current===document.activeElement),fe=Ni(ae,ee,de);fe&&setTimeout(()=>fe.ref.current.focus())}),O=P.useCallback((ee,ae,de)=>{const fe=!B.current&&!de;(y.value!==void 0&&y.value===ae||fe)&&(R(ee),fe&&(B.current=!0))},[y.value]),Y=P.useCallback(()=>k==null?void 0:k.focus(),[k]),V=P.useCallback((ee,ae,de)=>{const fe=!B.current&&!de;(y.value!==void 0&&y.value===ae||fe)&&X(ee)},[y.value]),re=n==="popper"?Jr:gi,pe=re===Jr?{side:o,sideOffset:l,align:d,alignOffset:u,arrowPadding:v,collisionBoundary:x,collisionPadding:f,sticky:w,hideWhenDetached:c,avoidCollisions:b}:{};return h.jsx(pi,{scope:t,content:k,viewport:S,onViewportChange:I,itemRefCallback:O,selectedItem:T,onItemLeave:Y,itemTextRefCallback:V,focusSelectedItem:F,selectedItemText:U,position:n,isPositioned:L,searchRef:oe,children:h.jsx(ii,{as:_d,allowPinchZoom:!0,children:h.jsx(oo,{asChild:!0,trapped:y.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:Ce(s,ee=>{var ae;(ae=y.trigger)==null||ae.focus({preventScroll:!0}),ee.preventDefault()}),children:h.jsx(Qn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:h.jsx(re,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:ee=>ee.preventDefault(),...g,...pe,onPlaced:()=>p(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:Ce(g.onKeyDown,ee=>{const ae=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!ae&&ee.key.length===1&&E(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let fe=z().filter(ue=>!ue.disabled).map(ue=>ue.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(fe=fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){const ue=ee.target,he=fe.indexOf(ue);fe=fe.slice(he+1)}setTimeout(()=>G(fe)),ee.preventDefault()}})})})})})})});mi.displayName=kd;var Sd="SelectItemAlignedPosition",gi=P.forwardRef((e,r)=>{const{__scopeSelect:t,onPlaced:n,...s}=e,i=Je(it,t),a=Qe(it,t),[o,l]=P.useState(null),[d,u]=P.useState(null),v=je(r,A=>u(A)),x=dr(t),f=P.useRef(!1),w=P.useRef(!0),{viewport:c,selectedItem:b,selectedItemText:g,focusSelectedItem:y}=a,k=P.useCallback(()=>{if(i.trigger&&i.valueNode&&o&&d&&c&&b&&g){const A=i.trigger.getBoundingClientRect(),T=d.getBoundingClientRect(),R=i.valueNode.getBoundingClientRect(),U=g.getBoundingClientRect();if(i.dir!=="rtl"){const ue=U.left-T.left,he=R.left-ue,we=A.left-he,m=A.width+we,q=Math.max(m,T.width),H=window.innerWidth-De,N=Gn(he,[De,Math.max(De,H-q)]);o.style.minWidth=m+"px",o.style.left=N+"px"}else{const ue=T.right-U.right,he=window.innerWidth-R.right-ue,we=window.innerWidth-A.right-he,m=A.width+we,q=Math.max(m,T.width),H=window.innerWidth-De,N=Gn(he,[De,Math.max(De,H-q)]);o.style.minWidth=m+"px",o.style.right=N+"px"}const X=x(),z=window.innerHeight-De*2,L=c.scrollHeight,p=window.getComputedStyle(d),B=parseInt(p.borderTopWidth,10),G=parseInt(p.paddingTop,10),F=parseInt(p.borderBottomWidth,10),M=parseInt(p.paddingBottom,10),W=B+G+L+M+F,oe=Math.min(b.offsetHeight*5,W),E=window.getComputedStyle(c),O=parseInt(E.paddingTop,10),Y=parseInt(E.paddingBottom,10),V=A.top+A.height/2-De,re=z-V,pe=b.offsetHeight/2,ee=b.offsetTop+pe,ae=B+G+ee,de=W-ae;if(ae<=V){const ue=X.length>0&&b===X[X.length-1].ref.current;o.style.bottom="0px";const he=d.clientHeight-c.offsetTop-c.offsetHeight,we=Math.max(re,pe+(ue?Y:0)+he+F),m=ae+we;o.style.height=m+"px"}else{const ue=X.length>0&&b===X[0].ref.current;o.style.top="0px";const we=Math.max(V,B+c.offsetTop+(ue?O:0)+pe)+de;o.style.height=we+"px",c.scrollTop=ae-V+c.offsetTop}o.style.margin=`${De}px 0`,o.style.minHeight=oe+"px",o.style.maxHeight=z+"px",n==null||n(),requestAnimationFrame(()=>f.current=!0)}},[x,i.trigger,i.valueNode,o,d,c,b,g,i.dir,n]);Ae(()=>k(),[k]);const[_,S]=P.useState();Ae(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);const I=P.useCallback(A=>{A&&w.current===!0&&(k(),y==null||y(),w.current=!1)},[k,y]);return h.jsx(Cd,{scope:t,contentWrapper:o,shouldExpandOnScrollRef:f,onScrollButtonChange:I,children:h.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:h.jsx(Ee.div,{...s,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});gi.displayName=Sd;var Ed="SelectPopperPosition",Jr=P.forwardRef((e,r)=>{const{__scopeSelect:t,align:n="start",collisionPadding:s=De,...i}=e,a=ur(t);return h.jsx(xc,{...a,...i,ref:r,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Jr.displayName=Ed;var[Cd,Qr]=xt(it,{}),en="SelectViewport",bi=P.forwardRef((e,r)=>{const{__scopeSelect:t,nonce:n,...s}=e,i=Qe(en,t),a=Qr(en,t),o=je(r,i.onViewportChange),l=P.useRef(0);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),h.jsx(cr.Slot,{scope:t,children:h.jsx(Ee.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Ce(s.onScroll,d=>{const u=d.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:x}=a;if(x!=null&&x.current&&v){const f=Math.abs(l.current-u.scrollTop);if(f>0){const w=window.innerHeight-De*2,c=parseFloat(v.style.minHeight),b=parseFloat(v.style.height),g=Math.max(c,b);if(g<w){const y=g+f,k=Math.min(w,y),_=y-k;v.style.height=k+"px",v.style.bottom==="0px"&&(u.scrollTop=_>0?_:0,v.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});bi.displayName=en;var vi="SelectGroup",[zd,jd]=xt(vi),Nd=P.forwardRef((e,r)=>{const{__scopeSelect:t,...n}=e,s=Ir();return h.jsx(zd,{scope:t,id:s,children:h.jsx(Ee.div,{role:"group","aria-labelledby":s,...n,ref:r})})});Nd.displayName=vi;var xi="SelectLabel",Ad=P.forwardRef((e,r)=>{const{__scopeSelect:t,...n}=e,s=jd(xi,t);return h.jsx(Ee.div,{id:s.id,...n,ref:r})});Ad.displayName=xi;var fr="SelectItem",[Td,wi]=xt(fr),yi=P.forwardRef((e,r)=>{const{__scopeSelect:t,value:n,disabled:s=!1,textValue:i,...a}=e,o=Je(fr,t),l=Qe(fr,t),d=o.value===n,[u,v]=P.useState(i??""),[x,f]=P.useState(!1),w=je(r,y=>{var k;return(k=l.itemRefCallback)==null?void 0:k.call(l,y,n,s)}),c=Ir(),b=P.useRef("touch"),g=()=>{s||(o.onValueChange(n),o.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.jsx(Td,{scope:t,value:n,disabled:s,textId:c,isSelected:d,onItemTextChange:P.useCallback(y=>{v(k=>k||((y==null?void 0:y.textContent)??"").trim())},[]),children:h.jsx(cr.ItemSlot,{scope:t,value:n,disabled:s,textValue:u,children:h.jsx(Ee.div,{role:"option","aria-labelledby":c,"data-highlighted":x?"":void 0,"aria-selected":d&&x,"data-state":d?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...a,ref:w,onFocus:Ce(a.onFocus,()=>f(!0)),onBlur:Ce(a.onBlur,()=>f(!1)),onClick:Ce(a.onClick,()=>{b.current!=="mouse"&&g()}),onPointerUp:Ce(a.onPointerUp,()=>{b.current==="mouse"&&g()}),onPointerDown:Ce(a.onPointerDown,y=>{b.current=y.pointerType}),onPointerMove:Ce(a.onPointerMove,y=>{var k;b.current=y.pointerType,s?(k=l.onItemLeave)==null||k.call(l):b.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ce(a.onPointerLeave,y=>{var k;y.currentTarget===document.activeElement&&((k=l.onItemLeave)==null||k.call(l))}),onKeyDown:Ce(a.onKeyDown,y=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&y.key===" "||(md.includes(y.key)&&g(),y.key===" "&&y.preventDefault())})})})})});yi.displayName=fr;var Nt="SelectItemText",ki=P.forwardRef((e,r)=>{const{__scopeSelect:t,className:n,style:s,...i}=e,a=Je(Nt,t),o=Qe(Nt,t),l=wi(Nt,t),d=xd(Nt,t),[u,v]=P.useState(null),x=je(r,g=>v(g),l.onItemTextChange,g=>{var y;return(y=o.itemTextRefCallback)==null?void 0:y.call(o,g,l.value,l.disabled)}),f=u==null?void 0:u.textContent,w=P.useMemo(()=>h.jsx("option",{value:l.value,disabled:l.disabled,children:f},l.value),[l.disabled,l.value,f]),{onNativeOptionAdd:c,onNativeOptionRemove:b}=d;return Ae(()=>(c(w),()=>b(w)),[c,b,w]),h.jsxs(h.Fragment,{children:[h.jsx(Ee.span,{id:l.textId,...i,ref:x}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?It.createPortal(i.children,a.valueNode):null]})});ki.displayName=Nt;var _i="SelectItemIndicator",Si=P.forwardRef((e,r)=>{const{__scopeSelect:t,...n}=e;return wi(_i,t).isSelected?h.jsx(Ee.span,{"aria-hidden":!0,...n,ref:r}):null});Si.displayName=_i;var tn="SelectScrollUpButton",Od=P.forwardRef((e,r)=>{const t=Qe(tn,e.__scopeSelect),n=Qr(tn,e.__scopeSelect),[s,i]=P.useState(!1),a=je(r,n.onScrollButtonChange);return Ae(()=>{if(t.viewport&&t.isPositioned){let o=function(){const d=l.scrollTop>0;i(d)};const l=t.viewport;return o(),l.addEventListener("scroll",o),()=>l.removeEventListener("scroll",o)}},[t.viewport,t.isPositioned]),s?h.jsx(Ei,{...e,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:l}=t;o&&l&&(o.scrollTop=o.scrollTop-l.offsetHeight)}}):null});Od.displayName=tn;var rn="SelectScrollDownButton",Id=P.forwardRef((e,r)=>{const t=Qe(rn,e.__scopeSelect),n=Qr(rn,e.__scopeSelect),[s,i]=P.useState(!1),a=je(r,n.onScrollButtonChange);return Ae(()=>{if(t.viewport&&t.isPositioned){let o=function(){const d=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<d;i(u)};const l=t.viewport;return o(),l.addEventListener("scroll",o),()=>l.removeEventListener("scroll",o)}},[t.viewport,t.isPositioned]),s?h.jsx(Ei,{...e,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:l}=t;o&&l&&(o.scrollTop=o.scrollTop+l.offsetHeight)}}):null});Id.displayName=rn;var Ei=P.forwardRef((e,r)=>{const{__scopeSelect:t,onAutoScroll:n,...s}=e,i=Qe("SelectScrollButton",t),a=P.useRef(null),o=dr(t),l=P.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return P.useEffect(()=>()=>l(),[l]),Ae(()=>{var u;const d=o().find(v=>v.ref.current===document.activeElement);(u=d==null?void 0:d.ref.current)==null||u.scrollIntoView({block:"nearest"})},[o]),h.jsx(Ee.div,{"aria-hidden":!0,...s,ref:r,style:{flexShrink:0,...s.style},onPointerDown:Ce(s.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(n,50))}),onPointerMove:Ce(s.onPointerMove,()=>{var d;(d=i.onItemLeave)==null||d.call(i),a.current===null&&(a.current=window.setInterval(n,50))}),onPointerLeave:Ce(s.onPointerLeave,()=>{l()})})}),Pd="SelectSeparator",Rd=P.forwardRef((e,r)=>{const{__scopeSelect:t,...n}=e;return h.jsx(Ee.div,{"aria-hidden":!0,...n,ref:r})});Rd.displayName=Pd;var nn="SelectArrow",Dd=P.forwardRef((e,r)=>{const{__scopeSelect:t,...n}=e,s=ur(t),i=Je(nn,t),a=Qe(nn,t);return i.open&&a.position==="popper"?h.jsx(wc,{...s,...n,ref:r}):null});Dd.displayName=nn;var Ld="SelectBubbleInput",Ci=P.forwardRef(({__scopeSelect:e,value:r,...t},n)=>{const s=P.useRef(null),i=je(n,s),a=Ec(r);return P.useEffect(()=>{const o=s.current;if(!o)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==r&&u){const v=new Event("change",{bubbles:!0});u.call(o,r),o.dispatchEvent(v)}},[a,r]),h.jsx(Ee.select,{...t,style:{...Vo,...t.style},ref:i,defaultValue:r})});Ci.displayName=Ld;function zi(e){return e===""||e===void 0}function ji(e){const r=rt(e),t=P.useRef(""),n=P.useRef(0),s=P.useCallback(a=>{const o=t.current+a;r(o),(function l(d){t.current=d,window.clearTimeout(n.current),d!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(o)},[r]),i=P.useCallback(()=>{t.current="",window.clearTimeout(n.current)},[]);return P.useEffect(()=>()=>window.clearTimeout(n.current),[]),[t,s,i]}function Ni(e,r,t){const s=r.length>1&&Array.from(r).every(d=>d===r[0])?r[0]:r,i=t?e.indexOf(t):-1;let a=Md(e,Math.max(i,0));s.length===1&&(a=a.filter(d=>d!==t));const l=a.find(d=>d.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==t?l:void 0}function Md(e,r){return e.map((t,n)=>e[(r+n)%e.length])}var Fd=ai,Ai=li,Bd=di,Ud=ui,Wd=fi,Ti=hi,$d=bi,Oi=yi,Hd=ki,Vd=Si;const Ii=Fd,Pi=Bd,on=P.forwardRef(({className:e,children:r,...t},n)=>h.jsxs(Ai,{ref:n,className:be("flex h-8 w-full items-center justify-between gap-2 rounded-md border border-zinc-800 bg-black px-3 py-1.5 text-left text-xs font-medium text-white outline-none","hover:bg-zinc-900 focus-visible:ring-2 focus-visible:ring-blue-500/80 focus-visible:ring-inset focus-visible:border-zinc-600","disabled:pointer-events-none disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:flex [&>span]:items-center [&>span]:gap-2",e),style:{boxShadow:"none",WebkitBoxShadow:"none",MozBoxShadow:"none"},...t,children:[r,h.jsx(Ud,{asChild:!0,children:h.jsx(Ut,{className:"h-3 w-3 shrink-0 text-zinc-400",strokeWidth:2})})]}));on.displayName=Ai.displayName;const an=P.forwardRef(({className:e,children:r,position:t="popper",...n},s)=>h.jsx(Wd,{children:h.jsx(Ti,{ref:s,className:be("relative z-[9999] max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-zinc-800 bg-zinc-950 text-white shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:t,...n,children:h.jsx($d,{className:be("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r})})}));an.displayName=Ti.displayName;const sn=P.forwardRef(({className:e,children:r,...t},n)=>h.jsxs(Oi,{ref:n,className:be("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-xs outline-none","focus:bg-zinc-800 focus:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[h.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(Vd,{children:h.jsx(kr,{className:"h-3 w-3",strokeWidth:2})})}),h.jsx(Hd,{children:r})]}));sn.displayName=Oi.displayName;const Ri=P.createContext(null);function Di(){const e=P.useContext(Ri);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function Li({open:e,onOpenChange:r,children:t}){const[n,s]=P.useState(!1),i=e!==void 0,a=i?e:n,o=P.useCallback(d=>{i||s(d),r==null||r(d)},[i,r]),l=P.useMemo(()=>({open:a,onOpenChange:o}),[a,o]);return h.jsx(Ri.Provider,{value:l,children:t})}function Zd({asChild:e,children:r}){const{onOpenChange:t}=Di(),n=P.Children.only(r);return e&&P.isValidElement(n)?P.cloneElement(n,{onClick:s=>{var i,a;(a=(i=n.props).onClick)==null||a.call(i,s),t(!0)}}):h.jsx("button",{type:"button",onClick:()=>t(!0),children:r})}function Mi({className:e,children:r,preventCloseOnBackdropClick:t,...n}){const{open:s,onOpenChange:i}=Di();if(P.useEffect(()=>{const o=l=>{l.key==="Escape"&&i(!1)};return s&&(document.addEventListener("keydown",o),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",o),document.body.style.overflow=""}},[s,i]),!s)return null;const a=o=>{o.preventDefault(),o.stopPropagation()};return gr.createPortal(h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-[9998] bg-black/60","aria-hidden":!0,onClick:()=>!t&&i(!1),onDragOver:a,onDrop:a}),h.jsx("div",{role:"dialog","aria-modal":!0,className:be("fixed left-1/2 top-1/2 z-[9999] w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg border border-zinc-700 bg-zinc-900 p-4 shadow-xl",e),onClick:o=>o.stopPropagation(),...n,children:r})]}),document.body)}function Fi({className:e,...r}){return h.jsx("div",{className:be("flex flex-col gap-1.5 pb-4",e),...r})}function Kd({className:e,...r}){return h.jsx("div",{className:be("flex justify-end gap-2 pt-4",e),...r})}function Bi({className:e,...r}){return h.jsx("h2",{className:be("text-sm font-semibold text-white",e),...r})}function Ui({className:e,...r}){return h.jsx("p",{className:be("text-xs text-zinc-400",e),...r})}const at=P.forwardRef(({className:e,variant:r="default",size:t="default",asChild:n,children:s,...i},a)=>{const o="inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 disabled:pointer-events-none disabled:opacity-50",l={default:"bg-blue-600 text-white hover:bg-blue-700",outline:"border border-zinc-700 bg-transparent hover:bg-zinc-800",ghost:"hover:bg-zinc-800"},d={sm:"h-7 px-2.5 text-xs",default:"h-9 px-4 text-sm",lg:"h-10 px-6 text-base"};if(n&&P.isValidElement(s)){const u=s,v=be(o,l[r],d[t],u.props.className,e);return P.cloneElement(u,{className:v})}return h.jsx("button",{ref:a,type:"button",className:be(o,l[r],d[t],e),...i,children:s})});at.displayName="Button";const Gd=["library","upload","url"];function Yd({library:e,selectedId:r,onSelect:t}){const[n,s]=Q.useState(""),[i,a]=Q.useState("all"),o=["all",...new Set(e.flatMap(d=>d.tags??[]))],l=e.filter(d=>{const u=i==="all"||(d.tags??[]).includes(i),v=!n||(d.alt??"").toLowerCase().includes(n.toLowerCase());return u&&v});return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"relative",children:[h.jsx(ds,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-600 pointer-events-none"}),h.jsx(zr,{value:n,onChange:d=>s(d.target.value),placeholder:"Cerca immagini...",className:"pl-9 h-8 text-xs bg-zinc-900/50 border-zinc-800"})]}),h.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.map(d=>h.jsx("button",{type:"button",onClick:()=>a(d),className:be("px-2.5 py-1 rounded text-[10px] font-medium border transition-colors",i===d?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-700 text-zinc-500 hover:border-zinc-600 hover:text-zinc-400"),children:d==="all"?"Tutte":d},d))}),l.length>0?h.jsx("div",{className:"grid grid-cols-3 gap-2.5 max-h-[45vh] overflow-y-auto",children:l.map(d=>{const u=r===d.id;return h.jsxs("button",{type:"button",onClick:()=>t(u?null:d.id),className:be("group relative aspect-[4/3] rounded-lg overflow-hidden","ring-1 transition-all duration-150",u?"ring-blue-500 ring-2 ring-offset-1 ring-offset-zinc-900":"ring-zinc-800 hover:ring-zinc-600 hover:scale-[1.02]"),children:[h.jsx("img",{src:d.url,alt:d.alt,loading:"lazy",className:be("w-full h-full object-cover transition-[filter] duration-150",u?"brightness-[0.6]":"brightness-[0.85] group-hover:brightness-100")}),h.jsx("div",{className:be("absolute inset-x-0 bottom-0 px-2 py-1.5","bg-gradient-to-t from-black/70 to-transparent","opacity-0 group-hover:opacity-100 transition-opacity",u&&"opacity-100"),children:h.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:d.alt})}),u&&h.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:h.jsx(kr,{size:14,className:"text-white"})})]},d.id)})}):h.jsx("div",{className:"text-center py-12 text-zinc-600 text-xs",children:"Nessuna immagine in libreria. Configura assets.assetsManifest nel tenant (es. da public/assets)."})]})}function qd({preview:e,onPreviewChange:r,onAssetUpload:t}){const[n,s]=Q.useState(!1),i=Q.useRef(null),a=Q.useCallback(async u=>{if(fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"handleFile called",data:{fileName:u.name,hasOnAssetUpload:!!t},timestamp:Date.now(),hypothesisId:"H5"})}).catch(()=>{}),!u.type.startsWith("image/"))return;if(t){try{const x=await t(u);fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"onAssetUpload resolved",data:{url:x==null?void 0:x.slice(0,50)},timestamp:Date.now(),hypothesisId:"H2,H5"})}).catch(()=>{}),r({name:u.name,size:u.size,dataUrl:x})}catch{const x=new FileReader;x.onload=f=>{var w;r({name:u.name,size:u.size,dataUrl:(w=f.target)==null?void 0:w.result})},x.readAsDataURL(u)}return}const v=new FileReader;v.onload=x=>{var f;r({name:u.name,size:u.size,dataUrl:(f=x.target)==null?void 0:f.result})},v.readAsDataURL(u)},[r,t]),o=Q.useCallback(u=>{var x,f;u.preventDefault(),u.stopPropagation(),s(!1);const v=(f=(x=u.dataTransfer)==null?void 0:x.files)==null?void 0:f[0];v&&a(v)},[a]),l=Q.useCallback(u=>{u.preventDefault(),u.stopPropagation(),s(!0)},[]),d=Q.useCallback(u=>{var x;const v=(x=u.target.files)==null?void 0:x[0];v&&a(v)},[a]);return h.jsxs("div",{onDragOver:l,onDragEnter:l,onDragLeave:u=>{u.preventDefault(),u.stopPropagation(),s(!1)},onDrop:o,onClick:()=>{var u;return!e&&((u=i.current)==null?void 0:u.click())},className:be("rounded-xl border-2 border-dashed transition-all min-h-[240px]","flex flex-col items-center justify-center overflow-hidden cursor-pointer relative",n?"border-blue-500/50 bg-blue-500/[0.04]":e?"border-zinc-800 bg-transparent cursor-default":"border-zinc-800 bg-white/[0.01] hover:border-zinc-600 hover:bg-white/[0.02]"),children:[e?h.jsxs(h.Fragment,{children:[h.jsx("img",{src:e.dataUrl,alt:"Upload preview",className:"w-full max-h-[320px] object-contain"}),h.jsxs("div",{className:"absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/80 to-transparent p-4 flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-xs font-medium text-white",children:e.name}),h.jsxs("p",{className:"text-[10px] text-zinc-400",children:[(e.size/1024).toFixed(1)," KB"]})]}),h.jsx(at,{type:"button",variant:"ghost",className:"text-zinc-400 hover:text-red-400 hover:bg-red-500/10 h-8 w-8 p-0",onClick:u=>{u.stopPropagation(),r(null)},children:h.jsx($t,{size:14})})]})]}):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/10 flex items-center justify-center text-blue-500 mb-3",children:h.jsx(Kn,{size:22})}),h.jsx("p",{className:"text-sm font-medium text-white mb-1",children:"Trascina un'immagine qui"}),h.jsx("p",{className:"text-[11px] text-zinc-500 mb-3",children:"oppure clicca per selezionare un file"}),h.jsx("span",{className:"text-[10px] text-zinc-600 bg-white/[0.03] px-3 py-1 rounded",children:"PNG, JPG, WebP — max 5MB"})]}),h.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:d})]})}function Xd({urlPreview:e,onUrlPreviewChange:r}){const[t,n]=Q.useState(""),[s,i]=Q.useState(!1),a=()=>{if(t.trim())try{new URL(t),r(t),i(!1)}catch{i(!0),r(null)}};return h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{children:[h.jsx(tt,{className:"block text-[10px] font-bold uppercase tracking-[0.08em] text-zinc-500 mb-1.5",children:"URL immagine"}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(zr,{value:t,onChange:o=>{n(o.target.value),i(!1)},onKeyDown:o=>o.key==="Enter"&&a(),placeholder:"https://images.unsplash.com/photo-...",className:be("h-8 text-xs bg-zinc-900/50 border-zinc-800",s&&"border-red-500/50")}),h.jsx(at,{type:"button",variant:"outline",onClick:a,className:"shrink-0 h-8",children:"Anteprima"})]}),s&&h.jsx("p",{className:"text-[11px] text-red-400 mt-1.5",children:"URL non valido. Inserisci un URL completo (https://…)"})]}),e?h.jsxs("div",{className:"rounded-lg overflow-hidden ring-1 ring-zinc-800",children:[h.jsx("img",{src:e,alt:"URL preview",className:"w-full max-h-[320px] object-contain bg-black/30",onError:()=>{i(!0),r(null)}}),h.jsxs("div",{className:"px-3.5 py-2.5 bg-white/[0.02] border-t border-zinc-800 flex items-center gap-2",children:[h.jsx(kr,{size:14,className:"text-emerald-400"}),h.jsx("span",{className:"text-[11px] text-zinc-500",children:"Immagine caricata correttamente"})]})]}):s?null:h.jsxs("div",{className:"flex flex-col items-center py-12 text-zinc-600",children:[h.jsx(Hn,{size:32,className:"mb-3 opacity-40"}),h.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const Jd=({open:e,onOpenChange:r,onSelect:t})=>{const{assets:n}=Et(),s=(n==null?void 0:n.assetsManifest)??[],[i,a]=Q.useState("library"),[o,l]=Q.useState(null),[d,u]=Q.useState(null),[v,x]=Q.useState(null);Q.useEffect(()=>{e&&(a("library"),l(null),u(null),x(null))},[e]),Q.useEffect(()=>{if(!e||i!=="upload")return;const g=()=>{fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:beforeunload",message:"beforeunload fired",data:{},timestamp:Date.now(),hypothesisId:"H1"})}).catch(()=>{})};return window.addEventListener("beforeunload",g),()=>window.removeEventListener("beforeunload",g)},[e,i]),Q.useEffect(()=>{if(!e||i!=="upload")return;const g=k=>{k.preventDefault()},y={capture:!0};return document.addEventListener("dragover",g,y),document.addEventListener("drop",g,y),window.addEventListener("dragover",g,y),window.addEventListener("drop",g,y),()=>{document.removeEventListener("dragover",g,y),document.removeEventListener("drop",g,y),window.removeEventListener("dragover",g,y),window.removeEventListener("drop",g,y)}},[e,i]);const f=i==="library"&&o!=null||i==="upload"&&d!=null||i==="url"&&v!=null,w=()=>{if(i==="library"&&o){const g=s.find(y=>y.id===o);g&&t({url:g.url,alt:g.alt})}else i==="upload"&&d?t({url:d.dataUrl,alt:d.name}):i==="url"&&v&&t({url:v,alt:""});setTimeout(()=>r(!1),0)},c=i==="library"&&o?"1 immagine selezionata":i==="upload"&&d?d.name:i==="url"&&v?"URL pronto":"Nessuna selezione",b=g=>{g.preventDefault(),g.stopPropagation()};return h.jsx(Li,{open:e,onOpenChange:r,children:h.jsxs(Mi,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:b,onDrop:b,children:[h.jsxs(Fi,{className:"px-5 py-4 flex flex-row items-start justify-between gap-4 border-b border-zinc-800",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/15 text-blue-500",children:h.jsx(Wt,{size:18})}),h.jsxs("div",{children:[h.jsx(Bi,{children:"Image Picker"}),h.jsx(Ui,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),h.jsx("button",{type:"button",onClick:()=>r(!1),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Chiudi",children:h.jsx(dt,{size:18})})]}),h.jsx("div",{className:"flex border-b border-zinc-800",children:Gd.map(g=>h.jsxs("button",{type:"button",onClick:()=>a(g),className:be("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===g?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[g==="library"&&h.jsx(Wt,{size:14}),g==="upload"&&h.jsx(Kn,{size:14}),g==="url"&&h.jsx(Hn,{size:14}),g==="library"?"Libreria":g==="upload"?"Upload":"URL"]},g))}),h.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&h.jsx(Yd,{library:s,selectedId:o,onSelect:l}),i==="upload"&&h.jsx(qd,{preview:d,onPreviewChange:u,onAssetUpload:n==null?void 0:n.onAssetUpload}),i==="url"&&h.jsx(Xd,{urlPreview:v,onUrlPreviewChange:x})]}),h.jsxs(Kd,{className:"px-5 py-4 border-t border-zinc-800 flex-row justify-between",children:[h.jsx("span",{className:"text-[10px] uppercase tracking-[0.05em] text-zinc-600",children:c}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx(at,{type:"button",variant:"outline",size:"sm",onClick:()=>r(!1),children:"Annulla"}),h.jsx(at,{type:"button",size:"sm",disabled:!f,onClick:w,className:be(!f&&"opacity-40"),children:"Inserisci immagine"})]})]})]})})},Wi=(e,r="default")=>{if(e.startsWith("http")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/assets/"))return e;if(e.startsWith("assets/"))return`/${e}`;if(e.startsWith("/uploaded-assets/"))return e;if(!/\.(jpg|jpeg|png|gif|svg|pdf|webp|mp4|webm|ogg)$/i.test(e))return e.startsWith("/")?e:`/${e}`;const n=e.replace(/^\//,"");return`/assets/${r}/${n}`},Qd=({value:e,onChange:r,label:t="IMAGE",className:n})=>{const{tenantId:s="default"}=Et(),[i,a]=Q.useState(!1),[o,l]=Q.useState(!1),d=!!(e!=null&&e.url),u=e!=null&&e.url?Wi(e.url,s):"",v=f=>{r(f),a(!1)},x=f=>{f.stopPropagation(),r({url:"",alt:""})};return h.jsxs("div",{className:be("space-y-1.5",n),children:[h.jsx(tt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:t}),d?h.jsxs("div",{role:"button",tabIndex:0,onClick:()=>a(!0),onKeyDown:f=>f.key==="Enter"&&a(!0),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:be("relative rounded-lg overflow-hidden cursor-pointer","ring-1 ring-zinc-800 transition-all",o&&"ring-blue-500/40"),children:[h.jsx("img",{src:u,alt:(e==null?void 0:e.alt)??"",className:"w-full h-40 object-cover block",onError:f=>{f.target.style.display="none"}}),h.jsx("div",{className:be("absolute inset-0 flex items-center justify-center gap-2 transition-all duration-150",o?"bg-black/50":"bg-black/0"),children:o&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center gap-1.5 bg-white/15 backdrop-blur-md rounded-lg px-3.5 py-2 text-white text-xs font-medium",children:[h.jsx(ls,{size:13}),h.jsx("span",{children:"Cambia"})]}),h.jsx(at,{type:"button",variant:"ghost",className:"h-8 w-8 p-0 bg-red-500/15 backdrop-blur-md text-red-300 hover:text-red-200 hover:bg-red-500/25",onClick:x,children:h.jsx($t,{size:13})})]})}),h.jsx("div",{className:"px-2.5 py-1.5 bg-black/50 text-[10px] text-zinc-500 truncate",children:((e==null?void 0:e.url)??"").length>50?"…"+((e==null?void 0:e.url)??"").slice(-47):(e==null?void 0:e.url)??""})]}):h.jsxs("button",{type:"button",onClick:()=>a(!0),className:be("w-full rounded-lg border-2 border-dashed border-zinc-800 py-7","flex flex-col items-center gap-2","bg-white/[0.01] transition-all","hover:border-blue-500/30 hover:bg-blue-500/[0.03]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"),children:[h.jsx("div",{className:"w-9 h-9 rounded-lg bg-blue-500/10 flex items-center justify-center text-blue-500",children:h.jsx(Wt,{size:18})}),h.jsx("span",{className:"text-xs text-zinc-400 font-medium",children:"Clicca per aggiungere un'immagine"}),h.jsx("span",{className:"text-[10px] text-zinc-600",children:"Libreria · Upload · URL"})]}),h.jsx(Jd,{open:i,onOpenChange:a,onSelect:v})]})},$i=[{name:"layers",Icon:Er},{name:"github",Icon:as},{name:"arrow-right",Icon:Qa},{name:"box",Icon:ts},{name:"terminal",Icon:hs},{name:"chevron-right",Icon:rs},{name:"menu",Icon:ss},{name:"x",Icon:dt},{name:"sparkles",Icon:us},{name:"zap",Icon:ms}],At={"ui:text":({label:e,value:r,onChange:t})=>h.jsxs("div",{className:"grid w-full items-center gap-1.5 mb-4",children:[h.jsx(tt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),h.jsx(zr,{type:"text",className:"h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600",value:r||"",onChange:n=>t(n.target.value)})]}),"ui:textarea":({label:e,value:r,onChange:t})=>h.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[h.jsx(tt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),h.jsx(ws,{className:"min-h-[80px] text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600 resize-none",value:r||"",onChange:n=>t(n.target.value)})]}),"ui:select":({label:e,value:r,onChange:t,options:n=[]})=>h.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[h.jsx(tt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),h.jsxs(Ii,{value:r||"",onValueChange:t,children:[h.jsx(on,{className:"w-full h-7 text-[11px] bg-zinc-900/50 border-zinc-800 focus:ring-blue-600",children:h.jsx(Pi,{placeholder:"Select..."})}),h.jsx(an,{className:"dark",children:n.map(s=>h.jsx(sn,{value:s,className:"text-[11px]",children:s},s))})]})]}),"ui:checkbox":({label:e,value:r,onChange:t})=>h.jsxs("div",{className:"flex items-center space-x-2 mb-4 p-2 rounded border border-zinc-800/50 bg-zinc-900/20",children:[h.jsx(ys,{id:e,checked:!!r,onCheckedChange:n=>t(n===!0)}),h.jsx(tt,{htmlFor:e,className:"text-[11px] font-medium cursor-pointer select-none text-zinc-300",children:e})]}),"ui:image-picker":({label:e,value:r,onChange:t})=>{const n=r!=null&&typeof r=="object"&&"url"in r?{url:String(r.url??""),alt:String(r.alt??"")}:{url:typeof r=="string"?r:"",alt:""},s=i=>{t(i)};return h.jsx("div",{className:"mb-4",children:h.jsx(Qd,{label:e,value:n,onChange:s})})},"ui:icon-picker":({label:e,value:r,onChange:t})=>{const[n,s]=Q.useState(!1),i=$i.find(a=>a.name===(r||""));return h.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[h.jsx(tt,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),h.jsxs(Li,{open:n,onOpenChange:s,children:[h.jsx(Zd,{asChild:!0,children:h.jsx(at,{variant:"outline",className:"w-full h-9 rounded-md border border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 flex items-center gap-2 text-left",children:i?h.jsxs(h.Fragment,{children:[h.jsx(i.Icon,{size:16,className:"text-zinc-400 shrink-0"}),h.jsx("span",{className:"text-[11px] text-zinc-300 capitalize truncate",children:i.name})]}):h.jsxs(h.Fragment,{children:[h.jsx(Wt,{size:16,className:"text-zinc-500 shrink-0"}),h.jsx("span",{className:"text-[11px] text-zinc-500",children:"Choose icon..."})]})})}),h.jsxs(Mi,{className:"sm:max-w-[280px] p-4",children:[h.jsxs(Fi,{children:[h.jsx(Bi,{className:"text-sm",children:"Choose icon"}),h.jsx(Ui,{className:"text-xs",children:"Click an icon to select it."})]}),h.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:$i.map(({name:a,Icon:o})=>h.jsx("button",{type:"button",onClick:()=>{t(a),s(!1)},className:be("flex items-center justify-center w-10 h-10 rounded-md border transition-colors",r===a?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 text-zinc-400 hover:text-zinc-200"),title:a,children:h.jsx(o,{size:20})},a))})]})]})]})}},ln=e=>{if(e instanceof Ne.z.ZodOptional||e instanceof Ne.z.ZodDefault)return ln(e._def.innerType);if(e instanceof Ne.z.ZodObject){const r={id:crypto.randomUUID()};for(const t in e.shape)t!=="id"&&(r[t]=ln(e.shape[t]));return r}return e instanceof Ne.z.ZodArray?[]:e instanceof Ne.z.ZodString?"":e instanceof Ne.z.ZodNumber?0:e instanceof Ne.z.ZodBoolean?!1:e instanceof Ne.z.ZodEnum?e._def.values[0]:null},cn=e=>e instanceof Ne.z.ZodOptional||e instanceof Ne.z.ZodDefault?cn(e._def.innerType):e,hr=(e,r)=>e&&!r?"opacity-10":"opacity-100",wt=(e,r)=>e!=null&&r.toLowerCase()===e.toLowerCase(),eu=(e,r)=>{if(!e)return;const t=r.toLowerCase(),n=Object.entries(e).find(([s])=>s.toLowerCase()===t);return n==null?void 0:n[1]},Tt=({schema:e,data:r,onChange:t,keys:n,expandedItemPath:s,expandedItemIdByField:i,focusedFieldKey:a,onSidebarExpandedItemChange:o})=>{const l=e.shape,d=n!=null?Object.keys(l).filter(w=>n.includes(w)):Object.keys(l),u=s==null?void 0:s[0],v=(u==null?void 0:u.itemId)!=null?{[u.fieldKey]:u.itemId}:i,x=(u==null?void 0:u.fieldKey)??a??null,f=x!=null;return h.jsx("div",{className:"space-y-4",children:d.map(w=>{const c=l[w];if(!c)return null;const b=cn(c),g=c.description||"ui:text",y=r[w];if(g==="ui:image-picker"&&b instanceof Ne.z.ZodObject){const I=wt(x,w),A=At["ui:image-picker"]||At["ui:text"];return h.jsx("div",{className:`transition-opacity duration-200 ${hr(f,I)}`,...I?{"data-jp-focused-field":w}:{},children:h.jsx(A,{label:w,value:y,onChange:T=>t({...r,[w]:T})})},w)}if(b instanceof Ne.z.ZodObject){const I=y||{},A=wt(x,w);return h.jsxs("div",{className:`group/obj mb-6 p-4 border border-zinc-800 rounded-lg bg-zinc-900/20 hover:border-zinc-700 transition-[border-color,opacity] duration-200 ${hr(f,A)}`,...A?{"data-jp-focused-field":w}:{},children:[h.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[h.jsx("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),h.jsx("h4",{className:"text-[10px] font-black uppercase text-zinc-400 tracking-widest",children:w})]}),h.jsx(Tt,{schema:b,data:I,onChange:T=>t({...r,[w]:T}),expandedItemPath:s&&wt(u==null?void 0:u.fieldKey,w)?s.slice(1):void 0,expandedItemIdByField:v,focusedFieldKey:x})]},w)}if(b instanceof Ne.z.ZodArray){const I=Array.isArray(y)?y:[],A=cn(b.element),T=(z,L)=>{if(L<0||L>=I.length)return;const p=[...I],[B]=p.splice(z,1);p.splice(L,0,B),t({...r,[w]:p})},R=wt(x,w),U=wt(u==null?void 0:u.fieldKey,w)?u==null?void 0:u.itemId:void 0,X=eu(v,w)??U;return h.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${hr(f,R)}`,...R?{"data-jp-focused-field":w}:{},children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsxs("label",{className:"text-[10px] font-black uppercase text-zinc-500 tracking-widest",children:[w," (",I.length,")"]}),h.jsxs("button",{type:"button",onClick:()=>{const z=ln(A);t({...r,[w]:[...I,z]})},className:"flex items-center gap-1 px-2 py-1 bg-blue-600/10 hover:bg-blue-600/20 text-blue-500 rounded text-[10px] font-bold transition-colors",children:[h.jsx(Vn,{size:12})," Add Item"]})]}),h.jsx("div",{className:"space-y-2",children:I.map((z,L)=>{const p=z,B=p.id||`legacy-${L}`,G=(typeof p.title=="string"?p.title:null)||(typeof p.label=="string"?p.label:null)||(typeof p.name=="string"?p.name:null)||(typeof p.content=="string"?p.content:null)||(typeof p.text=="string"?p.text:null)||`${w} #${L+1}`,F=X,M=String(p.id??B),W=F!=null&&String(F)===M,oe=W&&s&&s.length>1?s.slice(1):void 0,E=f&&R&&F!=null&&!W;return h.jsx(tu,{itemId:M,openItemId:F!=null?String(F):void 0,isFaded:E,index:L,isFirst:L===0,isLast:L===I.length-1,label:G,onExpandedChange:o?O=>o(O?{fieldKey:w,itemId:M}:null):void 0,onRemove:()=>{const O=I.filter((Y,V)=>V!==L);t({...r,[w]:O})},onMoveUp:()=>T(L,L-1),onMoveDown:()=>T(L,L+1),children:A instanceof Ne.z.ZodObject?h.jsx(Tt,{schema:A,data:p||{},expandedItemPath:oe,onChange:O=>{const Y=[...I];Y[L]=O,t({...r,[w]:Y})}}):h.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},B)})})]},w)}const k=At[g]||At["ui:text"],_=b instanceof Ne.z.ZodEnum?b._def.values:void 0,S=wt(x,w);return h.jsx("div",{className:`transition-opacity duration-200 ${hr(f,S)}`,...S?{"data-jp-focused-field":w}:{},children:h.jsx(k,{label:w,value:y,options:_,onChange:I=>t({...r,[w]:I})})},w)})})},tu=({itemId:e,openItemId:r,isFaded:t=!1,label:n,onExpandedChange:s,onRemove:i,onMoveUp:a,onMoveDown:o,isFirst:l,isLast:d,children:u})=>{const v=r!=null&&String(r)===String(e),[x,f]=Q.useState(v);Q.useEffect(()=>{v&&!x&&f(!0),!v&&x&&f(!1)},[v,x]);const w=()=>{const b=!x;f(b),s==null||s(b)},c=v&&x;return h.jsxs("div",{className:`border border-zinc-800 rounded-md bg-zinc-900/40 overflow-hidden transition-opacity duration-200 ${t?"opacity-10":"opacity-100"}`,...c?{"data-jp-expanded-item":e}:{},children:[h.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-900/60",children:[h.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:h.jsxs("button",{type:"button",onClick:w,className:"flex items-center gap-2 text-[10px] font-bold text-zinc-300 uppercase tracking-tight truncate",children:[x?h.jsx(_r,{size:12,className:"shrink-0"}):h.jsx(Ut,{size:12,className:"shrink-0"}),h.jsx("span",{className:"truncate",children:n})]})}),h.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[h.jsx("button",{type:"button",disabled:l,onClick:a,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:h.jsx(es,{size:12})}),h.jsx("button",{type:"button",disabled:d,onClick:o,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:h.jsx(Ja,{size:12})}),h.jsx("div",{className:"w-px h-3 bg-zinc-800 mx-1"}),h.jsx("button",{type:"button",onClick:i,className:"text-zinc-600 hover:text-red-500 transition-colors p-1",children:h.jsx($t,{size:12})})]})]}),x&&h.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:u})]})},Hi=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),Vi=({selectedSection:e,pageData:r,allSectionsData:t=[],onUpdate:n,onUpdateSection:s,onClose:i,expandedItemPath:a=null,onReorderSection:o,allLayers:l=[],activeSectionId:d,onRequestScrollToSection:u,onDeleteSection:v,onAddSection:x,hasChanges:f=!1,onExportHTML:w,onSaveToFile:c,saveSuccessFeedback:b=!1,onResetToFile:g,showResetToFile:y=!1,pageSlugs:k=[],currentSlug:_="home",onPageChange:S})=>{const{schemas:I}=Et(),[A,T]=Q.useState(!0),[R,U]=Q.useState(null),[X,z]=Q.useState(null),[L,p]=Q.useState(null),[B,G]=Q.useState(null),[F,M]=Q.useState(null),W=Q.useRef(null),oe=Q.useRef(null),E=Q.useDeferredValue(e),O=e!=null&&(E==null?void 0:E.id)!==e.id,Y=a&&a.length>0?a:B?[B]:null,V=Y!=null&&Y.length?{fieldKey:Y[Y.length-1].fieldKey,itemId:Y[Y.length-1].itemId}:null,re=Q.useRef(a);Q.useEffect(()=>{re.current!=null&&a==null&&G(null),re.current=a},[a]),Q.useEffect(()=>{(e==null?void 0:e.id)!=null&&T(!1)},[e==null?void 0:e.id]);const pe=()=>{const j=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const $=W.current;$&&$.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(j)},ee=Q.useRef(A);Q.useEffect(()=>{if(A&&!ee.current){const j=pe();return ee.current=A,j}ee.current=A},[A]),Q.useEffect(()=>{if(!V)return;const j=W.current;if(!j)return;const $=requestAnimationFrame(()=>{const K=j.querySelector("[data-jp-expanded-item]")??j.querySelector("[data-jp-focused-field]");K&&K.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame($)},[V]);const ae=j=>{T(!1),u==null||u(j)},de=()=>{T(j=>{const $=!j;return $&&pe(),$})},fe=(j,$)=>{$.stopPropagation(),t.length>0&&s?M(j):(T(!1),u==null||u(j))};Q.useEffect(()=>{if(F==null)return;const j=$=>{$.key==="Escape"&&M(null)};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[F]);const ue=j=>{R===j?(v==null||v(j),U(null)):(U(j),setTimeout(()=>U(null),3e3))},he=(j,$)=>{z($),j.dataTransfer.effectAllowed="move",j.dataTransfer.setData("application/json",JSON.stringify({sectionId:$}))},we=(j,$)=>{j.preventDefault(),X!==$&&p($)},m=(j,$)=>{if(j.preventDefault(),z(null),p(null),!X||X===$||!o)return;const K=l.filter(ie=>ie.scope==="local"),D=K.findIndex(ie=>ie.id===X),te=K.findIndex(ie=>ie.id===$);D===-1||te===-1||o(X,te)},q=e?r.sections.find(j=>j.id===e.id):void 0,H=E?r.sections.find(j=>j.id===E.id):void 0,N=E?I[E.type]:void 0,C=l.length>0&&(A||!e);return h.jsxs("aside",{className:"relative w-full h-full bg-zinc-950 border-l border-zinc-800 flex flex-col shadow-2xl shrink-0 min-w-0 animate-in slide-in-from-right duration-300",children:[h.jsxs("div",{className:"sticky top-0 z-10 flex flex-col shrink-0 bg-zinc-950 border-b border-zinc-800",children:[h.jsxs("div",{className:"py-2 px-3 flex justify-between items-center bg-zinc-900/50",children:[h.jsx("div",{className:"flex items-center gap-2 min-w-0",children:h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-bold text-white leading-tight",children:"Inspector"}),h.jsx("p",{className:"text-[10px] font-mono uppercase tracking-wider flex items-center gap-1.5 leading-tight mt-0.5",children:e?h.jsxs(h.Fragment,{children:[o&&e.scope==="local"&&h.jsx("span",{className:"text-zinc-500 shrink-0",title:"Reorder section on page",children:h.jsx(Sr,{size:12,strokeWidth:2})}),h.jsx("span",{className:"text-blue-400",children:e.type}),h.jsx("span",{className:"text-zinc-600",children:"|"}),h.jsx("span",{className:"text-zinc-500",children:e.scope})]}):h.jsx("span",{className:"text-zinc-500",children:"Waiting for Selection..."})})]})}),h.jsx("div",{className:"flex items-center gap-1 shrink-0",children:h.jsx("button",{type:"button",onClick:i,className:"p-1 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors",title:"Close Inspector","aria-label":"Close Inspector",children:h.jsx(dt,{size:16})})})]}),k.length>0&&S&&h.jsx("div",{className:"py-2 px-3 border-b border-zinc-800/80 bg-zinc-900/30",children:h.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[h.jsx(is,{size:14,className:"shrink-0 text-zinc-400","aria-hidden":!0}),h.jsxs(Ii,{value:_,onValueChange:S,children:[h.jsx(on,{className:"h-8 text-xs font-medium text-white border-zinc-700 bg-zinc-800/60 hover:bg-zinc-800 flex-1 min-w-0",children:h.jsx(Pi,{placeholder:"Page"})}),h.jsx(an,{className:"dark min-w-[12rem]",children:k.map(j=>h.jsx(sn,{value:j,className:"text-xs capitalize",children:j},j))})]}),h.jsxs("span",{className:"text-zinc-500 text-xs shrink-0 tabular-nums",children:[l.length," section",l.length!==1?"s":""]})]})}),l.length>0&&h.jsxs("div",{className:"bg-zinc-900/20 opacity-100",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2 py-3 px-4",children:[h.jsxs("button",{type:"button",onClick:de,className:"flex-1 flex items-center justify-between min-w-0 hover:bg-zinc-800/30 transition-colors cursor-pointer text-left rounded py-1 pr-1 border-0 bg-transparent","aria-expanded":C,"aria-label":C?"Collapse Page Layers":"Expand Page Layers",children:[h.jsxs("span",{className:"flex items-center gap-2 min-w-0",children:[h.jsx(Er,{size:14,className:"text-primary shrink-0"}),h.jsx("span",{className:"text-xs font-bold text-white",children:"Page Layers"}),h.jsxs("span",{className:"text-[10px] text-zinc-500",children:["(",l.length,")"]})]}),h.jsx("span",{className:"text-zinc-500 shrink-0 pointer-events-none","aria-hidden":!0,children:C?h.jsx(_r,{size:14}):h.jsx(Ut,{size:14})})]}),x!=null&&h.jsxs("button",{type:"button",onClick:j=>{j.stopPropagation(),x()},className:"flex items-center gap-1.5 text-zinc-500 hover:text-white transition-colors p-1.5 hover:bg-zinc-800 rounded shrink-0",title:"Add section","aria-label":"Add section",children:[h.jsx(Vn,{size:14}),h.jsx("span",{className:"text-xs font-medium",children:"Add"})]})]}),!C&&e&&(()=>{const j=l.find(K=>K.id===e.id);if(!j)return null;const $=d===e.id;return h.jsxs("div",{className:"px-3 py-2 flex items-center gap-2 bg-primary/10 border-t border-zinc-800/50",children:[h.jsx(Sr,{size:12,className:"text-primary shrink-0"}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsxs("p",{className:"text-[10px] font-mono uppercase tracking-wider text-primary truncate flex items-center gap-1",children:[j.type,$&&h.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),h.jsx("p",{className:"text-xs text-white font-medium truncate",children:j.title??`${j.type} section`})]}),h.jsx("button",{type:"button",onClick:K=>fe(j.id,K),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${j.type}`,"aria-label":`Open settings for ${j.type} section`,children:h.jsx(Zn,{size:12})})]})})()]})]}),h.jsxs("div",{ref:W,className:"flex-1 min-h-0 overflow-y-auto flex flex-col custom-scrollbar",children:[C&&h.jsxs("div",{className:"border-b border-zinc-800 bg-zinc-900/20 px-3 pb-3 pt-1",children:[l.map(j=>{const $=(e==null?void 0:e.id)===j.id,K=d===j.id,D=X===j.id,te=L===j.id,ie=j.scope==="local"&&v,Z=j.scope==="local"&&!!o;return h.jsxs("div",{draggable:Z,onDragStart:J=>Z&&he(J,j.id),onDragOver:J=>Z&&we(J,j.id),onDragLeave:()=>p(null),onDrop:J=>Z&&m(J,j.id),onDragEnd:()=>{z(null),p(null)},className:be("flex items-center gap-2 py-2.5 px-2 rounded-sm border-t transition-colors",te&&"border-t-2 border-dashed border-primary bg-primary/5",!te&&$&&"border-primary/30 bg-primary/10",!te&&!$&&"border-zinc-800/90 hover:bg-zinc-800/40",D&&"opacity-40",Z?"cursor-grab active:cursor-grabbing":"cursor-default"),children:[h.jsx(Sr,{size:12,className:`shrink-0 ${$?"text-primary":"text-zinc-500"}`}),h.jsxs("button",{type:"button",onClick:()=>ae(j.id),className:"flex-1 min-w-0 text-left",children:[h.jsxs("p",{className:"text-[10px] font-mono uppercase tracking-wider text-zinc-400 truncate flex items-center gap-1",children:[j.type,K&&h.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),h.jsx("p",{className:`text-xs truncate ${$?"text-white font-medium":"text-zinc-500"}`,children:j.title??`${j.type} section`})]}),h.jsx("button",{type:"button",onClick:J=>fe(j.id,J),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${j.type}`,"aria-label":`Open settings for ${j.type} section`,children:h.jsx(Zn,{size:12})}),ie&&h.jsx("button",{type:"button",onClick:J=>{J.stopPropagation(),ue(j.id)},className:`p-1 rounded shrink-0 ${R===j.id?"bg-red-500/20 text-red-400":"text-zinc-500 hover:text-red-400"}`,title:"Delete section",children:h.jsx($t,{size:12})})]},j.id)}),R&&h.jsxs("div",{className:"flex items-center gap-2 py-2 px-3 mt-1 rounded-md bg-amber-500/10 border border-amber-500/30",children:[h.jsx(ns,{size:12,className:"text-amber-500 shrink-0"}),h.jsx("p",{className:"text-[10px] text-amber-500 font-medium",children:"Click delete again to confirm"})]})]}),V&&q&&(()=>{const j=q.data||{};let $;if(Y&&Y.length>0){let K=j;for(const ie of Y){const ne=K==null?void 0:K[ie.fieldKey];ie.itemId!=null&&Array.isArray(ne)?K=ne.find(J=>String(J==null?void 0:J.id)===String(ie.itemId))??null:K=ne}const D=K||{},te=V.fieldKey;$=(typeof D.name=="string"?D.name:null)??(typeof D.title=="string"?D.title:null)??(typeof D.label=="string"?D.label:null)??te.charAt(0).toUpperCase()+te.slice(1).replace(/([A-Z])/g," $1").trim()}else{const K=V.fieldKey;if(V.itemId!=null){const ie=(Array.isArray(j[K])?j[K]:[]).find(ne=>String(ne==null?void 0:ne.id)===String(V.itemId))||{};$=(typeof ie.name=="string"?ie.name:null)??(typeof ie.title=="string"?ie.title:null)??(typeof ie.label=="string"?ie.label:null)??K}else $=K.charAt(0).toUpperCase()+K.slice(1).replace(/([A-Z])/g," $1").trim()}return h.jsxs("div",{className:"px-4 py-2 border-b border-zinc-800 bg-zinc-900/50",children:[h.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-zinc-500",children:"Editing"}),h.jsx("p",{className:"text-xs font-medium text-white truncate mt-0.5",children:$})]})})(),h.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&T(!1),children:e?O?h.jsxs("div",{className:"space-y-4 animate-pulse",role:"status","aria-label":"Loading form",children:[h.jsx("div",{className:"h-4 w-3/4 rounded bg-zinc-800"}),h.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),h.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),h.jsx("div",{className:"h-20 rounded bg-zinc-800/80"}),h.jsx("div",{className:"h-10 rounded bg-zinc-800/60"})]}):N?(()=>{const $=Object.keys(N.shape).filter(ne=>!Hi.has(ne)),K=(H==null?void 0:H.data)||{};if($.length===0)return h.jsx("p",{className:"text-xs text-zinc-500",children:"No content fields in schema."});const D=Y==null?void 0:Y[0],te=(D==null?void 0:D.itemId)!=null?{[D.fieldKey]:D.itemId}:(V==null?void 0:V.itemId)!=null?{[V.fieldKey]:V.itemId}:void 0,ie=(D==null?void 0:D.fieldKey)??(V==null?void 0:V.fieldKey)??null;return h.jsx(Tt,{schema:N,data:K,onChange:ne=>n(ne),keys:$,expandedItemPath:Y,expandedItemIdByField:te,focusedFieldKey:ie,onSidebarExpandedItemChange:G})})():h.jsxs("div",{className:"text-xs text-red-400 p-4 border border-dashed border-red-900/30 rounded bg-red-900/10",children:["No schema found for ",(E==null?void 0:E.type)??e.type]}):h.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"Select a layer above or on the stage to edit."})})]}),h.jsx("div",{className:"px-4 py-2.5 border-t border-zinc-800 bg-zinc-900/50 flex items-center gap-3 opacity-100 flex-wrap",children:(w!=null||c!=null||g!=null)&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:be("w-2 h-2 rounded-full transition-colors duration-300 shrink-0",f?"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.5)]":"bg-emerald-500")}),h.jsx("span",{className:be("text-xs font-medium transition-colors duration-300 shrink-0",b?"text-emerald-400":f?"text-amber-500":"text-zinc-500"),children:b?"Salvato":f?"Unsaved Changes":"All Changes Saved"}),w!=null&&h.jsxs("button",{type:"button",onClick:w,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",children:[h.jsx($n,{size:12,className:"shrink-0"}),h.jsx("span",{children:"HTML"})]}),c!=null&&h.jsxs("button",{type:"button",onClick:j=>{j.preventDefault(),j.stopPropagation(),c()},disabled:!f,className:be("shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all",f?"bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),title:"Salva le modifiche sui file JSON del repo",children:[h.jsx(cs,{size:12,className:"shrink-0"}),h.jsx("span",{children:"Save"})]}),g!=null&&y&&h.jsx("button",{type:"button",onClick:g,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-400 hover:bg-zinc-800 hover:border-zinc-600 hover:text-zinc-300",title:"Ripristina la pagina dal file (elimina le modifiche in memoria)",children:h.jsx("span",{children:"Ripristina da file"})})]})}),F!=null&&t.length>0&&s!=null&&(()=>{const j=t.find(J=>J.id===F),$=l.find(J=>J.id===F);if(!j)return null;const K=($==null?void 0:$.scope)==="global"?"global":"local",D=j.type,te=I[D],ne=(te?Object.keys(te.shape):[]).filter(J=>Hi.has(J)),Z=j.data??{};return ne.length===0?h.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:()=>M(null),children:h.jsxs("div",{ref:oe,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:J=>J.stopPropagation(),children:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[h.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",D]}),h.jsx("button",{type:"button",onClick:()=>M(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings",children:h.jsx(dt,{size:18})})]}),h.jsx("div",{className:"p-4",children:h.jsx("p",{className:"text-xs text-zinc-500",children:"No settings fields for this section."})})]})}):h.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:J=>J.target===J.currentTarget&&M(null),children:h.jsxs("div",{ref:oe,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full max-h-[85vh] flex flex-col overflow-hidden",onClick:J=>J.stopPropagation(),children:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[h.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",D]}),h.jsx("button",{type:"button",onClick:()=>M(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings (Escape)",children:h.jsx(dt,{size:18})})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:h.jsx(Tt,{schema:te,data:Z,onChange:J=>{const se={...j.data,...J};s(F,K,D,se)},keys:ne})})]})})})()]})},Zi=({draft:e,globalDraft:r,themeConfig:t,slug:n,selectedId:s,scrollToSectionId:i,onScrollRequested:a})=>{const o=Q.useRef(null),l=Q.useCallback(()=>{var d;(d=o.current)!=null&&d.contentWindow&&o.current.contentWindow.postMessage({type:ke.UPDATE_DRAFTS,draft:e,globalDraft:r,themeConfig:t},"*")},[e,r,t]);return Q.useEffect(()=>{l()},[l]),Q.useEffect(()=>{const d=u=>{u.data.type===ke.STAGE_READY&&l()};return window.addEventListener("message",d),()=>window.removeEventListener("message",d)},[l]),Q.useEffect(()=>{var d;(d=o.current)!=null&&d.contentWindow&&o.current.contentWindow.postMessage({type:ke.SYNC_SELECTION,selectedId:s},"*")},[s]),Q.useEffect(()=>{var d;!i||!((d=o.current)!=null&&d.contentWindow)||(o.current.contentWindow.postMessage({type:ke.REQUEST_SCROLL_TO_SECTION,sectionId:i},"*"),a==null||a())},[i,a]),h.jsx("div",{className:"w-full h-full bg-background overflow-hidden",children:h.jsx("iframe",{ref:o,src:`/admin/preview/${n}`,className:"w-full h-full border-none",title:"JsonPages Stage"})})},pr={setTheme:e=>{const r=document.documentElement,{tokens:t}=e,n={"--theme-primary":t.colors.primary,"--theme-secondary":t.colors.secondary,"--theme-accent":t.colors.accent,"--theme-background":t.colors.background,"--theme-surface":t.colors.surface,"--theme-surface-alt":t.colors.surfaceAlt,"--theme-text":t.colors.text,"--theme-text-muted":t.colors.textMuted,"--theme-border":t.colors.border,"--theme-font-primary":t.typography.fontFamily.primary,"--theme-font-mono":t.typography.fontFamily.mono,"--theme-radius-sm":t.borderRadius.sm,"--theme-radius-md":t.borderRadius.md,"--theme-radius-lg":t.borderRadius.lg};Object.entries(n).forEach(([s,i])=>{r.style.setProperty(s,i)})}},Ki=()=>{var f;const[e,r]=Q.useState(null),[t,n]=Q.useState(null),[s,i]=Q.useState(null),[a,o]=Q.useState(null),[l,d]=Q.useState(!1);if(Q.useEffect(()=>{const w=c=>{c.data.type===ke.UPDATE_DRAFTS&&(r(c.data.draft),n(c.data.globalDraft),c.data.themeConfig&&pr.setTheme(c.data.themeConfig)),c.data.type===ke.SYNC_SELECTION&&i(c.data.selectedId),c.data.type===ke.REQUEST_SCROLL_TO_SECTION&&o(c.data.sectionId??null),c.data.type===ke.REQUEST_CLEAN_HTML&&(d(!0),setTimeout(()=>{const b=document.documentElement.outerHTML;window.parent.postMessage({type:ke.SEND_CLEAN_HTML,html:b},"*"),d(!1)},50))};return window.addEventListener("message",w),window.parent.postMessage({type:ke.STAGE_READY},"*"),()=>window.removeEventListener("message",w)},[]),Q.useEffect(()=>{const w=c=>{var z,L,p,B,G,F,M,W;const b=c.target,g=c.clientX,y=c.clientY;let k=null,_=b;for(;_&&_!==document.body;){const oe=(z=_.getAttribute)==null?void 0:z.call(_,"data-section-id"),E=(L=_.getAttribute)==null?void 0:L.call(_,"data-section-type"),O=(p=_.getAttribute)==null?void 0:p.call(_,"data-section-scope");if(oe&&E&&O){k=_;break}_=_.parentElement}if(!k)return;c.preventDefault(),c.stopPropagation();const S=k.getAttribute("data-section-id"),I=k.getAttribute("data-section-type"),A=k.getAttribute("data-section-scope");if(!S||!I||!A)return;const T={id:S,type:I,scope:A};if(b===k){window.parent.postMessage({type:ke.SECTION_SELECT,section:T},"*");return}const R=document.elementFromPoint(g,y)??b;if(!R||!k.contains(R)){window.parent.postMessage({type:ke.SECTION_SELECT,section:T},"*");return}if(R===k){window.parent.postMessage({type:ke.SECTION_SELECT,section:T},"*");return}const U=[];for(_=R;_&&_!==k;){const oe=(B=_.getAttribute)==null?void 0:B.call(_,"data-jp-item-id"),E=(G=_.getAttribute)==null?void 0:G.call(_,"data-jp-item-field");oe&&E&&U.push({fieldKey:E||"items",itemId:oe}),_=_.parentElement}if(U.reverse(),U.length===0)for(_=R;_&&_!==k;){const oe=(F=_.getAttribute)==null?void 0:F.call(_,"data-jp-field");if(oe){U.push({fieldKey:oe});break}_=_.parentElement}if(U.length===0&&R){let oe=null;const E=O=>{var V,re;const Y=O.getBoundingClientRect();if(Y.left<=g&&g<=Y.right&&Y.top<=y&&y<=Y.bottom){for(let pe=0;pe<O.children.length;pe++)E(O.children[pe]);((V=O.getAttribute)!=null&&V.call(O,"data-jp-item-id")||(re=O.getAttribute)!=null&&re.call(O,"data-jp-field"))&&(oe=O)}};if(E(R),oe){const O=oe,Y=(M=O.getAttribute)==null?void 0:M.call(O,"data-jp-item-id"),V=(W=O.getAttribute)==null?void 0:W.call(O,"data-jp-field");Y&&V?U.push({fieldKey:V||"items",itemId:Y}):V&&U.push({fieldKey:V})}}const X={type:ke.SECTION_SELECT,section:T};if(U.length>0){X.itemPath=U;const oe=U[0];oe.itemId!=null?(X.itemField=oe.fieldKey,X.itemId=oe.itemId):X.itemField=oe.fieldKey}window.parent.postMessage(X,"*")};return document.addEventListener("click",w,!0),()=>document.removeEventListener("click",w,!0)},[]),Q.useEffect(()=>{if(!a)return;const w=setTimeout(()=>o(null),600);return()=>clearTimeout(w)},[a]),!e||!t)return h.jsx("div",{className:"flex items-center justify-center h-screen w-full bg-zinc-950 text-zinc-500 font-mono text-xs uppercase tracking-widest animate-pulse",children:"Waiting for Studio Signal..."});const u=(f=t.header)==null?void 0:f.data,v={main:(u==null?void 0:u.links)??[]},x=w=>{window.parent.postMessage({type:ke.ACTIVE_SECTION_CHANGED,activeSectionId:w},"*")};return h.jsx(Bt,{mode:l?"visitor":"studio",children:h.jsx("div",{className:l?"":"jp-ice-active",children:h.jsx(Cr,{pageConfig:e,siteConfig:t,menuConfig:v,selectedId:l?null:s,scrollToSectionId:a,onActiveSectionChange:x})})})};function ru(e){return e.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()).join(" ")}const Gi=({open:e,onClose:r,sectionTypes:t,sectionTypeLabels:n,onSelect:s})=>{if(Q.useEffect(()=>{if(!e)return;const a=o=>{o.key==="Escape"&&r()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[e,r]),!e)return null;const i=a=>(n==null?void 0:n[a])??ru(a);return h.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"jp-add-section-title",children:[h.jsx("div",{className:"absolute inset-0 bg-zinc-950/80 backdrop-blur-sm",onClick:r,"aria-hidden":"true"}),h.jsxs("div",{className:"relative w-full max-w-md max-h-[85vh] flex flex-col rounded-xl border border-zinc-700 bg-zinc-900 shadow-2xl overflow-hidden",children:[h.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-800 shrink-0",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/20 text-blue-400",children:h.jsx(Er,{size:18})}),h.jsx("h2",{id:"jp-add-section-title",className:"text-sm font-bold text-white",children:"Add section"})]}),h.jsx("button",{type:"button",onClick:r,className:"p-1.5 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close",children:h.jsx(dt,{size:18})})]}),h.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:t.length===0?h.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"No section types available. Configure addableSectionTypes or schemas."}):h.jsx("ul",{className:"grid gap-2",role:"listbox",children:t.map(a=>h.jsx("li",{role:"option",children:h.jsxs("button",{type:"button",onClick:()=>{s(a),r()},className:be("w-full flex items-center gap-3 px-4 py-3 rounded-lg text-left","border border-zinc-700/80 bg-zinc-800/50","hover:border-blue-500/40 hover:bg-zinc-800 transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:ring-offset-2 focus:ring-offset-zinc-900"),children:[h.jsx("span",{className:"flex items-center justify-center w-9 h-9 rounded-md bg-zinc-700/80 text-zinc-400 text-xs font-mono shrink-0",children:a}),h.jsx("span",{className:"text-sm font-medium text-zinc-200",children:i(a)})]})},a))})}),h.jsx("div",{className:"px-5 py-3 border-t border-zinc-800 shrink-0",children:h.jsx("p",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:"Choose a section type to add to the bottom of this page"})})]})]})},Yi=()=>h.jsxs("div",{style:{"--local-bg":"var(--color-background)","--local-text":"var(--color-text)","--local-text-muted":"var(--color-text-muted)","--local-primary":"var(--color-primary)","--local-radius-md":"var(--radius-md)"},className:"min-h-screen flex flex-col items-center justify-center bg-[var(--local-bg)] px-6",children:[h.jsx("h1",{className:"text-6xl font-bold text-[var(--local-text)] mb-4",children:"404"}),h.jsx("p",{className:"text-xl text-[var(--local-text-muted)] mb-8",children:"Page not found"}),h.jsx("a",{href:"/",className:"inline-flex items-center gap-2 px-6 py-3 rounded-[var(--local-radius-md)] bg-[var(--local-primary)] text-[var(--local-bg)] font-semibold text-sm hover:opacity-90 transition-opacity",children:"Back to Home"})]}),nu='/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-900:oklch(39.6% .141 25.723);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-900:oklch(37.9% .146 265.522);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-primary:var(--primary)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border)}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-3{left:calc(var(--spacing)*3)}.z-0{z-index:0}.z-10{z-index:10}.z-50,.z-\\[50\\]{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[70\\]{z-index:70}.z-\\[100\\]{z-index:100}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-4{margin:calc(var(--spacing)*4)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.aspect-\\[4\\/3\\]{aspect-ratio:4/3}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-20{height:calc(var(--spacing)*20)}.h-40{height:calc(var(--spacing)*40)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\\[45vh\\]{max-height:45vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[320px\\]{max-height:320px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-16{min-height:calc(var(--spacing)*16)}.min-h-\\[18px\\]{min-height:18px}.min-h-\\[80px\\]{min-height:80px}.min-h-\\[240px\\]{min-height:240px}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing)*1)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-3\\/4{width:75%}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[280px\\]{max-width:280px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[12rem\\]{min-width:12rem}.min-w-\\[18px\\]{min-width:18px}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0\\.5{--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-3{--tw-translate-x:calc(var(--spacing)*3);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.animate-pulse{animation:var(--animate-pulse)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[var\\(--local-radius-md\\)\\]{border-radius:var(--local-radius-md)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/20{border-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/30{border-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-500\\/50{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.border-blue-500\\/50{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.border-blue-600{border-color:var(--color-blue-600)}.border-primary,.border-primary\\/30{border-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\\/30{border-color:color-mix(in oklab,var(--color-primary)30%,transparent)}}.border-red-500\\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/20{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.border-red-500\\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/50{border-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}}.border-red-900\\/30{border-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.border-red-900\\/30{border-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}}.border-transparent{border-color:#0000}.border-zinc-700{border-color:var(--color-zinc-700)}.border-zinc-700\\/80{border-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/80{border-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.border-zinc-800{border-color:var(--color-zinc-800)}.border-zinc-800\\/50{border-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/50{border-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.border-zinc-800\\/80{border-color:#27272acc}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/80{border-color:color-mix(in oklab,var(--color-zinc-800)80%,transparent)}}.border-zinc-800\\/90{border-color:#27272ae6}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/90{border-color:color-mix(in oklab,var(--color-zinc-800)90%,transparent)}}.bg-\\[var\\(--color-background\\)\\]{background-color:var(--color-background)}.bg-\\[var\\(--local-bg\\)\\]{background-color:var(--local-bg)}.bg-\\[var\\(--local-primary\\)\\]{background-color:var(--local-primary)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/5{background-color:color-mix(in oklab,var(--color-amber-500)5%,transparent)}}.bg-amber-500\\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-background{background-color:var(--color-background)}.bg-black{background-color:var(--color-black)}.bg-black\\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/5{background-color:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/15{background-color:color-mix(in oklab,var(--color-blue-500)15%,transparent)}}.bg-blue-500\\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-500\\/\\[0\\.04\\]{background-color:#3080ff0a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/\\[0\\.04\\]{background-color:color-mix(in oklab,var(--color-blue-500)4%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-600\\/10{background-color:#155dfc1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-600\\/10{background-color:color-mix(in oklab,var(--color-blue-600)10%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-primary\\/5{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/5{background-color:color-mix(in oklab,var(--color-primary)5%,transparent)}}.bg-primary\\/10{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/10{background-color:color-mix(in oklab,var(--color-primary)10%,transparent)}}.bg-red-500\\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/15{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.bg-red-500\\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-red-900\\/10{background-color:#82181a1a}@supports (color:color-mix(in lab,red,red)){.bg-red-900\\/10{background-color:color-mix(in oklab,var(--color-red-900)10%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/15{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.bg-white\\/15{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\\/\\[0\\.01\\]{background-color:#ffffff03}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.01\\]{background-color:color-mix(in oklab,var(--color-white)1%,transparent)}}.bg-white\\/\\[0\\.02\\]{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.02\\]{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.bg-white\\/\\[0\\.03\\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}}.bg-zinc-700{background-color:var(--color-zinc-700)}.bg-zinc-700\\/80{background-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-700\\/80{background-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-800\\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/50{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.bg-zinc-800\\/60{background-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/60{background-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.bg-zinc-800\\/80{background-color:#27272acc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/80{background-color:color-mix(in oklab,var(--color-zinc-800)80%,transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-zinc-900\\/20{background-color:#18181b33}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/20{background-color:color-mix(in oklab,var(--color-zinc-900)20%,transparent)}}.bg-zinc-900\\/30{background-color:#18181b4d}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/30{background-color:color-mix(in oklab,var(--color-zinc-900)30%,transparent)}}.bg-zinc-900\\/40{background-color:#18181b66}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/40{background-color:color-mix(in oklab,var(--color-zinc-900)40%,transparent)}}.bg-zinc-900\\/50{background-color:#18181b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/50{background-color:color-mix(in oklab,var(--color-zinc-900)50%,transparent)}}.bg-zinc-900\\/60{background-color:#18181b99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/60{background-color:color-mix(in oklab,var(--color-zinc-900)60%,transparent)}}.bg-zinc-950{background-color:var(--color-zinc-950)}.bg-zinc-950\\/80{background-color:#09090bcc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-950\\/80{background-color:color-mix(in oklab,var(--color-zinc-950)80%,transparent)}}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-black\\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab,red,red)){.from-black\\/70{--tw-gradient-from:color-mix(in oklab,var(--color-black)70%,transparent)}}.from-black\\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-black\\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab,red,red)){.from-black\\/80{--tw-gradient-from:color-mix(in oklab,var(--color-black)80%,transparent)}}.from-black\\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-7{padding-block:calc(var(--spacing)*7)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-8{padding-left:calc(var(--spacing)*8)}.pl-9{padding-left:calc(var(--spacing)*9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.2em\\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\\[0\\.05em\\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\\[0\\.08em\\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-\\[var\\(--local-bg\\)\\]{color:var(--local-bg)}.text-\\[var\\(--local-text\\)\\]{color:var(--local-text)}.text-\\[var\\(--local-text-muted\\)\\]{color:var(--local-text-muted)}.text-amber-200{color:var(--color-amber-200)}.text-amber-500{color:var(--color-amber-500)}.text-amber-500\\/70{color:#f99c00b3}@supports (color:color-mix(in lab,red,red)){.text-amber-500\\/70{color:color-mix(in oklab,var(--color-amber-500)70%,transparent)}}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground{color:var(--color-foreground)}.text-primary{color:var(--color-primary)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-white{color:var(--color-white)}.text-zinc-100{color:var(--color-zinc-100)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_8px_rgba\\(245\\,158\\,11\\,0\\.5\\)\\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#f59e0b80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-blue-900\\/20{--tw-shadow-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.shadow-blue-900\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-blue-900)20%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-blue-500{--tw-ring-color:var(--color-blue-500)}.ring-blue-500\\/40{--tw-ring-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.ring-blue-500\\/40{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.ring-zinc-800{--tw-ring-color:var(--color-zinc-800)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-zinc-900{--tw-ring-offset-color:var(--color-zinc-900)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.brightness-\\[0\\.6\\]{--tw-brightness:brightness(.6);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.brightness-\\[0\\.85\\]{--tw-brightness:brightness(.85);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-\\[border-color\\,opacity\\]{transition-property:border-color,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[filter\\]{transition-property:filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:border-dashed:is(:where(.group):hover *){--tw-border-style:dashed;border-style:dashed}.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:#54a2ff80}@supports (color:color-mix(in lab,red,red)){.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:color-mix(in oklab,var(--color-blue-400)50%,transparent)}}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\:brightness-100:is(:where(.group):hover *){--tw-brightness:brightness(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:border-blue-500\\/30:hover{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/30:hover{border-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.hover\\:border-blue-500\\/40:hover{border-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/40:hover{border-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.hover\\:border-zinc-600:hover{border-color:var(--color-zinc-600)}.hover\\:border-zinc-700:hover{border-color:var(--color-zinc-700)}.hover\\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:#3080ff08}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:color-mix(in oklab,var(--color-blue-500)3%,transparent)}}.hover\\:bg-blue-600\\/20:hover{background-color:#155dfc33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-600\\/20:hover{background-color:color-mix(in oklab,var(--color-blue-600)20%,transparent)}}.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\\:bg-primary\\/40:hover{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/40:hover{background-color:color-mix(in oklab,var(--color-primary)40%,transparent)}}.hover\\:bg-red-500\\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/10:hover{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab,var(--color-red-500)25%,transparent)}}.hover\\:bg-white\\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.hover\\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\\:bg-zinc-800\\/30:hover{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/30:hover{background-color:color-mix(in oklab,var(--color-zinc-800)30%,transparent)}}.hover\\:bg-zinc-800\\/40:hover{background-color:#27272a66}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/40:hover{background-color:color-mix(in oklab,var(--color-zinc-800)40%,transparent)}}.hover\\:bg-zinc-800\\/50:hover{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/50:hover{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.hover\\:bg-zinc-900:hover{background-color:var(--color-zinc-900)}.hover\\:text-blue-400:hover{color:var(--color-blue-400)}.hover\\:text-primary:hover{color:var(--color-primary)}.hover\\:text-red-200:hover{color:var(--color-red-200)}.hover\\:text-red-400:hover{color:var(--color-red-400)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:text-zinc-200:hover{color:var(--color-zinc-200)}.hover\\:text-zinc-300:hover{color:var(--color-zinc-300)}.hover\\:text-zinc-400:hover{color:var(--color-zinc-400)}.hover\\:opacity-90:hover{opacity:.9}.hover\\:ring-zinc-600:hover{--tw-ring-color:var(--color-zinc-600)}}.focus\\:bg-zinc-800:focus{background-color:var(--color-zinc-800)}.focus\\:text-white:focus{color:var(--color-white)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.focus\\:ring-blue-600:focus{--tw-ring-color:var(--color-blue-600)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:ring-offset-zinc-900:focus{--tw-ring-offset-color:var(--color-zinc-900)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:border-zinc-600:focus-visible{border-color:var(--color-zinc-600)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\\:ring-blue-500\\/80:focus-visible{--tw-ring-color:#3080ffcc}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-blue-500\\/80:focus-visible{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)80%,transparent)}}.focus-visible\\:ring-blue-600:focus-visible{--tw-ring-color:var(--color-blue-600)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-zinc-900:focus-visible{--tw-ring-offset-color:var(--color-zinc-900)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-inset:focus-visible{--tw-ring-inset:inset}.active\\:cursor-grabbing:active{cursor:grabbing}.active\\:bg-primary\\/60:active{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.active\\:bg-primary\\/60:active{background-color:color-mix(in oklab,var(--color-primary)60%,transparent)}}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}@media(min-width:40rem){.sm\\:max-w-\\[280px\\]{max-width:280px}}.\\[\\&\\>span\\]\\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\\[\\&\\>span\\]\\:flex>span{display:flex}.\\[\\&\\>span\\]\\:items-center>span{align-items:center}.\\[\\&\\>span\\]\\:gap-2>span{gap:calc(var(--spacing)*2)}}:root{--background:oklch(14.1% .005 285.823);--foreground:oklch(98.5% 0 0);--card:oklch(21% .006 285.885);--card-foreground:oklch(98.5% 0 0);--popover:oklch(21% .006 285.885);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(42% .18 266);--primary-foreground:oklch(97% .014 254.604);--secondary:oklch(27.4% .006 286.033);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(27.4% .006 286.033);--muted-foreground:oklch(70.5% .015 286.067);--accent:oklch(42% .18 266);--accent-foreground:oklch(97% .014 254.604);--destructive:oklch(70.4% .191 22.216);--destructive-foreground:oklch(97% .014 254.604);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.2% .016 285.938);--radius:.5rem;font-family:ui-sans-serif,system-ui,sans-serif}[data-radix-portal]{z-index:9999!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';class ou extends Q.Component{constructor(r){super(r),this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,t){console.error("[JsonPages Engine]",r,t)}render(){return this.state.hasError&&this.state.error?h.jsxs("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:24,backgroundColor:"#0f172a",color:"#e2e8f0",fontFamily:"ui-sans-serif, system-ui, sans-serif"},children:[h.jsx("h1",{style:{fontSize:"1.25rem",fontWeight:700,marginBottom:8},children:"JsonPages Engine Error"}),h.jsx("pre",{style:{maxWidth:"100%",overflow:"auto",padding:16,backgroundColor:"rgba(0,0,0,0.3)",borderRadius:8,fontSize:12,marginTop:8},children:this.state.error.message})]}):this.props.children}}function iu({config:e}){var k,_;const{registry:r={},schemas:t={},pages:n={},siteConfig:s,themeConfig:i,menuConfig:a,themeCss:o,addSection:l,NotFoundComponent:d=Yi}=e,u=(l==null?void 0:l.addableSectionTypes)??Object.keys(t).filter(S=>S!=="header"&&S!=="footer"),v={exportJSON:((k=e.persistence)==null?void 0:k.exportJSON)??mn,exportHTML:((_=e.persistence)==null?void 0:_.exportHTML)??gn},x=typeof(o==null?void 0:o.tenant)=="string"?o.tenant:"",f=typeof(o==null?void 0:o.admin)=="string"?o.admin:nu,[w,c]=Q.useState(!1);Q.useEffect(()=>{try{i!=null&&i.tokens&&pr.setTheme(i)}catch(S){console.warn("[JsonPages] setTheme failed",S)}c(!0)},[i]);const b=()=>{const{slug:S="home"}=Ie.useParams(),[I,A]=Q.useState(null);Q.useEffect(()=>{const X=document.getElementById("jp-baked-state");if(X!=null&&X.textContent)try{const z=JSON.parse(X.textContent);A(z),pr.setTheme(z.theme)}catch(z){console.error("Failed to parse baked state",z)}},[]);const T=I?I.page:n[S],R=I?I.site:s,U=I?I.menu:a;return T?h.jsx(Ht,{mode:"tenant",tenantCss:x,adminCss:f,children:h.jsx(Bt,{mode:"visitor",children:h.jsx(Cr,{pageConfig:T,siteConfig:R,menuConfig:U})})}):h.jsx(d,{})},g=()=>{var ne;const{slug:S="home"}=Ie.useParams(),I=Ie.useNavigate(),A=Object.keys(n).sort((Z,J)=>Z==="home"?-1:J==="home"?1:Z.localeCompare(J)),[T,R]=Q.useState(null),[U,X]=Q.useState(!1),[z,L]=Q.useState(!1),[p,B]=Q.useState(()=>{var Z;try{const J=JSON.parse(JSON.stringify(s??{}));J.identity||(J.identity={title:"Site"}),J.pages||(J.pages=[]);const se=(Z=J.header)==null?void 0:Z.data;return se&&(a!=null&&a.main)&&(se.links=JSON.parse(JSON.stringify(a.main))),J}catch{return{identity:{title:"Site"},pages:[]}}}),[G,F]=Q.useState(null),[M,W]=Q.useState(null),[oe,E]=Q.useState(null),[O,Y]=Q.useState(null),[V,re]=Q.useState(!1),[pe,ee]=Q.useState(400),ae=360,de=920,fe=Q.useCallback(Z=>{Z.preventDefault();const J=Z.currentTarget;J.setPointerCapture(Z.pointerId);const se=Z.clientX,me=pe,_e=Le=>{const ye=se-Le.clientX,yt=Math.min(de,Math.max(ae,me+ye));ee(yt)},Se=()=>{J.releasePointerCapture(Z.pointerId),J.removeEventListener("pointermove",_e),J.removeEventListener("pointerup",Se),J.removeEventListener("pointercancel",Se),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",J.addEventListener("pointermove",_e),J.addEventListener("pointerup",Se),J.addEventListener("pointercancel",Se)},[pe]),ue=T?[...p.header?[{id:p.header.id,type:p.header.type,scope:"global",title:"Header"}]:[],...T.sections.map(Z=>{var J,se;return{id:Z.id,type:Z.type,scope:"local",title:((J=Z.data)==null?void 0:J.title)??((se=Z.data)==null?void 0:se.titleHighlight)}}),...p.footer?[{id:p.footer.id,type:p.footer.type,scope:"global",title:"Footer"}]:[]]:[];Q.useEffect(()=>{const Z=n[S];Z&&R(JSON.parse(JSON.stringify(Z))),F(null),W(null),X(!1)},[S,n]);const he=Q.useCallback(()=>{const Z=n[S];Z&&R(JSON.parse(JSON.stringify(Z))),F(null),W(null),X(!1)},[S,n]),we=Q.useCallback((Z,J,se)=>{const me=[...se.sections],_e=me.findIndex(ye=>ye.id===Z);if(_e===-1||J<0||J>=me.length)return;const[Se]=me.splice(_e,1),Le=J>_e?J-1:J;me.splice(Math.min(Le,me.length),0,Se),R({...se,sections:me}),X(!0)},[]),m=Q.useCallback(Z=>{var J;if(Z.origin===window.location.origin){if(Z.data.type===ke.SECTION_SELECT){F(Z.data.section);const se=Z.data.itemPath;if(Array.isArray(se)&&se.length>0)W(se.map(me=>({fieldKey:me.fieldKey,...me.itemId!=null?{itemId:String(me.itemId)}:{}})));else{const me=Z.data.itemField,_e=Z.data.itemId;W(typeof me=="string"?[{fieldKey:me,..._e!=null?{itemId:String(_e)}:{}}]:null)}}if(Z.data.type===ke.ACTIVE_SECTION_CHANGED&&E(Z.data.activeSectionId??null),Z.data.type==="jsonpages:section-reorder"&&T){const{sectionId:se,newIndex:me}=Z.data;typeof se=="string"&&typeof me=="number"&&me>=0&&we(se,me,T)}if(Z.data.type===ke.SEND_CLEAN_HTML){if(!T)return;const se=(J=p.header)==null?void 0:J.data,me={page:T,site:p,menu:{main:(se==null?void 0:se.links)??[]},theme:i};v.exportHTML(me,S,Z.data.html),X(!1)}}},[T,p,S,i,we]);Q.useEffect(()=>(window.addEventListener("message",m),()=>window.removeEventListener("message",m)),[m]);const q=Q.useCallback(Z=>{const J=ue.find(se=>se.id===Z);J&&F({id:J.id,type:J.type,scope:J.scope}),W(null),Y(Z)},[ue]),H=Q.useCallback(()=>{Y(null)},[]),N=Q.useCallback(Z=>{R(J=>J&&{...J,sections:J.sections.filter(se=>se.id!==Z)}),X(!0),F(J=>(J==null?void 0:J.id)===Z?null:J)},[]),C=Z=>{if(!(!G||!T))if(X(!0),G.scope==="global")G.type==="header"&&p.header!=null?B({...p,header:{...p.header,data:Z}}):G.type==="footer"&&p.footer!=null&&B({...p,footer:{...p.footer,data:Z}});else{const J=T.sections.map(se=>se.id===G.id?{...se,data:Z}:se);R({...T,sections:J})}},j=Q.useCallback((Z,J,se,me)=>{var _e,Se;if(X(!0),J==="global")((_e=p.header)==null?void 0:_e.id)===Z?B({...p,header:{...p.header,data:me}}):((Se=p.footer)==null?void 0:Se.id)===Z&&B({...p,footer:{...p.footer,data:me}});else if(T){const Le=T.sections.map(ye=>ye.id===Z?{...ye,data:me}:ye);R({...T,sections:Le})}},[T,p]),$=()=>{var J;const Z=document.querySelector("iframe");(J=Z==null?void 0:Z.contentWindow)==null||J.postMessage({type:ke.REQUEST_CLEAN_HTML},"*")},K=()=>{var se,me;if(!T||!((se=e.persistence)!=null&&se.saveToFile))return;const Z=(me=p.header)==null?void 0:me.data,J={page:T,site:p,menu:{main:(Z==null?void 0:Z.links)??[]},theme:i};e.persistence.saveToFile(J,S).then(()=>{X(!1),L(!0),window.setTimeout(()=>window.location.reload(),1e3)}).catch(_e=>{console.error("[JsonPages] saveToFile failed",_e);const Se=_e instanceof Error?_e.message:String(_e);alert(`Save to file failed: ${Se}`)})},D=Z=>{var me;if(!T)return;const J=((me=l==null?void 0:l.getDefaultSectionData)==null?void 0:me.call(l,Z))??{},se={id:crypto.randomUUID(),type:Z,data:J,settings:void 0};R({...T,sections:[...T.sections,se]}),X(!0),F({id:se.id,type:Z,scope:"local"})};if(!T)return h.jsx("div",{children:"Loading Studio..."});const te=(G==null?void 0:G.scope)==="global"?{sections:[p.header,p.footer].filter(Z=>Z!=null)}:T,ie=[...p.header?[p.header]:[],...T.sections,...p.footer?[p.footer]:[]];return h.jsx(Ht,{mode:"admin",tenantCss:x,adminCss:f,children:h.jsx(Bt,{mode:"studio",children:h.jsxs("div",{className:"flex flex-col h-screen w-screen bg-background text-foreground overflow-hidden",children:[h.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[h.jsx("main",{className:"flex-1 min-w-0 relative bg-zinc-900/50 overflow-hidden",children:h.jsx(Zi,{draft:T,globalDraft:p,themeConfig:i,slug:S,selectedId:G==null?void 0:G.id,scrollToSectionId:O,onScrollRequested:H})}),h.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:pe,minWidth:ae,maxWidth:de},children:[h.jsx("div",{role:"separator","aria-label":"Resize inspector",className:"absolute left-0 top-0 bottom-0 w-1.5 cursor-col-resize hover:bg-primary/40 active:bg-primary/60 transition-colors shrink-0",style:{zIndex:9999},onPointerDown:fe}),h.jsx(Vi,{selectedSection:G,pageData:te,allSectionsData:ie,onUpdate:C,onUpdateSection:j,onClose:()=>{F(null),W(null)},expandedItemPath:M,onReorderSection:T?(Z,J)=>we(Z,J,T):void 0,allLayers:ue,activeSectionId:oe,onRequestScrollToSection:q,onDeleteSection:T?N:void 0,onAddSection:u.length>0?()=>re(!0):void 0,hasChanges:U,onExportHTML:$,onSaveToFile:((ne=e.persistence)==null?void 0:ne.saveToFile)!=null?K:void 0,saveSuccessFeedback:z,onResetToFile:he,pageSlugs:A,currentSlug:S,onPageChange:A.length>1?Z=>I(`/admin/${Z}`):void 0})]})]}),h.jsx(Gi,{open:V,onClose:()=>re(!1),sectionTypes:u,sectionTypeLabels:l==null?void 0:l.sectionTypeLabels,onSelect:D})]})})})},y=()=>h.jsx(Ht,{mode:"tenant",tenantCss:x,adminCss:f,children:h.jsx(Ki,{})});return w?h.jsx(ou,{children:h.jsx(Fn,{config:{registry:r,schemas:t,tenantId:e.tenantId??"default",assets:e.assets},children:h.jsx(Ie.BrowserRouter,{children:h.jsxs(Ie.Routes,{children:[h.jsx(Ie.Route,{path:"/",element:h.jsx(b,{})}),h.jsx(Ie.Route,{path:"/:slug",element:h.jsx(b,{})}),h.jsx(Ie.Route,{path:"/admin",element:h.jsx(g,{})}),h.jsx(Ie.Route,{path:"/admin/:slug",element:h.jsx(g,{})}),h.jsx(Ie.Route,{path:"/admin/preview/:slug",element:h.jsx(y,{})}),h.jsx(Ie.Route,{path:"*",element:h.jsx(d,{})})]})})})}):h.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#0f172a",color:"#94a3b8",fontFamily:"ui-sans-serif, system-ui, sans-serif",fontSize:14},children:"Loading…"})}const au=({hasChanges:e,onExportJSON:r,onExportHTML:t,onAddSection:n})=>h.jsxs("div",{className:"h-14 border-b border-zinc-800 bg-zinc-950 flex items-center justify-between px-6 shrink-0 z-50 relative",children:[h.jsx("div",{className:"flex items-center gap-3",children:n!=null&&h.jsxs("button",{type:"button",onClick:n,className:"flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600 transition-colors",title:"Add section","aria-label":"Add section",children:[h.jsx(fs,{size:14}),h.jsx("span",{children:"Add section"})]})}),h.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 opacity-20 pointer-events-none",children:h.jsx("span",{className:"text-xs font-black tracking-[0.2em] text-zinc-100",children:"JSONPAGES STUDIO"})}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("button",{onClick:t,className:"flex items-center gap-2 px-3 py-1.5 rounded-md text-xs font-medium transition-all border bg-zinc-900 border-zinc-700 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",children:[h.jsx($n,{size:14}),h.jsx("span",{children:"Bake HTML"})]}),h.jsxs("button",{onClick:r,disabled:!e,className:be("flex items-center gap-2 px-4 py-1.5 rounded-md text-xs font-bold transition-all shadow-lg",e?"bg-blue-600 text-white hover:bg-blue-500 shadow-blue-900/20":"bg-zinc-900 text-zinc-600 cursor-not-allowed"),children:[h.jsx(os,{size:14}),h.jsx("span",{children:"Export JSON"})]})]})]});ve.AddSectionLibrary=Gi,ve.AdminSidebar=Vi,ve.ConfigProvider=Fn,ve.ControlBar=au,ve.DefaultNotFound=Yi,ve.FormFactory=Tt,ve.InputWidgets=At,ve.JsonPagesEngine=iu,ve.PageRenderer=Cr,ve.PreviewEntry=Ki,ve.STUDIO_EVENTS=ke,ve.SectionRenderer=Ct,ve.StudioProvider=Bt,ve.StudioStage=Zi,ve.ThemeLoader=Ht,ve.cn=be,ve.exportBakedHTML=gn,ve.exportProjectJSON=mn,ve.resolveAssetUrl=Wi,ve.themeManager=pr,ve.useConfig=Et,ve.useStudio=Un,Object.defineProperty(ve,Symbol.toStringTag,{value:"Module"})}));
|