@jsonpages/core 1.0.3 → 1.0.4

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.
@@ -1,4 +1,4 @@
1
- (function(fe,X){typeof exports=="object"&&typeof module<"u"?X(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"],X):(fe=typeof globalThis<"u"?globalThis:fe||self,X(fe.JsonPagesCore={},fe.React,fe.ReactRouterDOM,fe.z,fe.ReactDOM))})(this,(function(fe,X,Ne,ze,Cr){"use strict";function Ar(e){const y=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const m=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(y,r,m.get?m:{enumerable:!0,get:()=>e[r]})}}return y.default=e,Object.freeze(y)}const me=Ar(X),ve={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 Ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ir(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Je(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 ct={exports:{}};/*!
1
+ (function(fe,X){typeof exports=="object"&&typeof module<"u"?X(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"],X):(fe=typeof globalThis<"u"?globalThis:fe||self,X(fe.JsonPagesCore={},fe.React,fe.ReactRouterDOM,fe.z,fe.ReactDOM))})(this,(function(fe,X,Ne,ze,Cr){"use strict";function Ar(e){const k=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const m=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(k,r,m.get?m:{enumerable:!0,get:()=>e[r]})}}return k.default=e,Object.freeze(k)}const me=Ar(X),ve={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 Ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ir(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Je(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 ct={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 Et;function Tr(){return Et||(Et=1,(function(e,y){(function(r){e.exports=r()})(function(){return(function r(m,u,i){function o(h,p){if(!u[h]){if(!m[h]){var v=typeof Je=="function"&&Je;if(!p&&v)return v(h,!0);if(n)return n(h,!0);var x=new Error("Cannot find module '"+h+"'");throw x.code="MODULE_NOT_FOUND",x}var c=u[h]={exports:{}};m[h][0].call(c.exports,function(g){var d=m[h][1][g];return o(d||g)},c,c.exports,r,m,u,i)}return u[h].exports}for(var n=typeof Je=="function"&&Je,l=0;l<i.length;l++)o(i[l]);return o})({1:[function(r,m,u){var i=r("./utils"),o=r("./support"),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";u.encode=function(l){for(var h,p,v,x,c,g,d,b=[],f=0,k=l.length,j=k,N=i.getTypeOf(l)!=="string";f<l.length;)j=k-f,v=N?(h=l[f++],p=f<k?l[f++]:0,f<k?l[f++]:0):(h=l.charCodeAt(f++),p=f<k?l.charCodeAt(f++):0,f<k?l.charCodeAt(f++):0),x=h>>2,c=(3&h)<<4|p>>4,g=1<j?(15&p)<<2|v>>6:64,d=2<j?63&v:64,b.push(n.charAt(x)+n.charAt(c)+n.charAt(g)+n.charAt(d));return b.join("")},u.decode=function(l){var h,p,v,x,c,g,d=0,b=0,f="data:";if(l.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");var k,j=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===n.charAt(64)&&j--,l.charAt(l.length-2)===n.charAt(64)&&j--,j%1!=0)throw new Error("Invalid base64 input, bad content length.");for(k=o.uint8array?new Uint8Array(0|j):new Array(0|j);d<l.length;)h=n.indexOf(l.charAt(d++))<<2|(x=n.indexOf(l.charAt(d++)))>>4,p=(15&x)<<4|(c=n.indexOf(l.charAt(d++)))>>2,v=(3&c)<<6|(g=n.indexOf(l.charAt(d++))),k[b++]=h,c!==64&&(k[b++]=p),g!==64&&(k[b++]=v);return k}},{"./support":30,"./utils":32}],2:[function(r,m,u){var i=r("./external"),o=r("./stream/DataWorker"),n=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function h(p,v,x,c,g){this.compressedSize=p,this.uncompressedSize=v,this.crc32=x,this.compression=c,this.compressedContent=g}h.prototype={getContentWorker:function(){var p=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),v=this;return p.on("end",function(){if(this.streamInfo.data_length!==v.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),p},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},h.createWorkerFrom=function(p,v,x){return p.pipe(new n).pipe(new l("uncompressedSize")).pipe(v.compressWorker(x)).pipe(new l("compressedSize")).withStreamInfo("compression",v)},m.exports=h},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,m,u){var i=r("./stream/GenericWorker");u.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},u.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,m,u){var i=r("./utils"),o=(function(){for(var n,l=[],h=0;h<256;h++){n=h;for(var p=0;p<8;p++)n=1&n?3988292384^n>>>1:n>>>1;l[h]=n}return l})();m.exports=function(n,l){return n!==void 0&&n.length?i.getTypeOf(n)!=="string"?(function(h,p,v,x){var c=o,g=x+v;h^=-1;for(var d=x;d<g;d++)h=h>>>8^c[255&(h^p[d])];return-1^h})(0|l,n,n.length,0):(function(h,p,v,x){var c=o,g=x+v;h^=-1;for(var d=x;d<g;d++)h=h>>>8^c[255&(h^p.charCodeAt(d))];return-1^h})(0|l,n,n.length,0):0}},{"./utils":32}],5:[function(r,m,u){u.base64=!1,u.binary=!1,u.dir=!1,u.createFolders=!0,u.date=null,u.compression=null,u.compressionOptions=null,u.comment=null,u.unixPermissions=null,u.dosPermissions=null},{}],6:[function(r,m,u){var i=null;i=typeof Promise<"u"?Promise:r("lie"),m.exports={Promise:i}},{lie:37}],7:[function(r,m,u){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=r("pako"),n=r("./utils"),l=r("./stream/GenericWorker"),h=i?"uint8array":"array";function p(v,x){l.call(this,"FlateWorker/"+v),this._pako=null,this._pakoAction=v,this._pakoOptions=x,this.meta={}}u.magic="\b\0",n.inherits(p,l),p.prototype.processChunk=function(v){this.meta=v.meta,this._pako===null&&this._createPako(),this._pako.push(n.transformTo(h,v.data),!1)},p.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},p.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},p.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var v=this;this._pako.onData=function(x){v.push({data:x,meta:v.meta})}},u.compressWorker=function(v){return new p("Deflate",v)},u.uncompressWorker=function(){return new p("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,m,u){function i(c,g){var d,b="";for(d=0;d<g;d++)b+=String.fromCharCode(255&c),c>>>=8;return b}function o(c,g,d,b,f,k){var j,N,A=c.file,R=c.compression,C=k!==h.utf8encode,D=n.transformTo("string",k(A.name)),L=n.transformTo("string",h.utf8encode(A.name)),Z=A.comment,Y=n.transformTo("string",k(Z)),E=n.transformTo("string",h.utf8encode(Z)),F=L.length!==A.name.length,a=E.length!==Z.length,B="",te="",U="",V=A.dir,H=A.date,Q={crc32:0,compressedSize:0,uncompressedSize:0};g&&!d||(Q.crc32=c.crc32,Q.compressedSize=c.compressedSize,Q.uncompressedSize=c.uncompressedSize);var z=0;g&&(z|=8),C||!F&&!a||(z|=2048);var S=0,q=0;V&&(S|=16),f==="UNIX"?(q=798,S|=(function(ee,ue){var ie=ee;return ee||(ie=ue?16893:33204),(65535&ie)<<16})(A.unixPermissions,V)):(q=20,S|=(function(ee){return 63&(ee||0)})(A.dosPermissions)),j=H.getUTCHours(),j<<=6,j|=H.getUTCMinutes(),j<<=5,j|=H.getUTCSeconds()/2,N=H.getUTCFullYear()-1980,N<<=4,N|=H.getUTCMonth()+1,N<<=5,N|=H.getUTCDate(),F&&(te=i(1,1)+i(p(D),4)+L,B+="up"+i(te.length,2)+te),a&&(U=i(1,1)+i(p(Y),4)+E,B+="uc"+i(U.length,2)+U);var J="";return J+=`
12
- \0`,J+=i(z,2),J+=R.magic,J+=i(j,2),J+=i(N,2),J+=i(Q.crc32,4),J+=i(Q.compressedSize,4),J+=i(Q.uncompressedSize,4),J+=i(D.length,2),J+=i(B.length,2),{fileRecord:v.LOCAL_FILE_HEADER+J+D+B,dirRecord:v.CENTRAL_FILE_HEADER+i(q,2)+J+i(Y.length,2)+"\0\0\0\0"+i(S,4)+i(b,4)+D+B+Y}}var n=r("../utils"),l=r("../stream/GenericWorker"),h=r("../utf8"),p=r("../crc32"),v=r("../signature");function x(c,g,d,b){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=d,this.encodeFileName=b,this.streamFiles=c,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(x,l),x.prototype.push=function(c){var g=c.meta.percent||0,d=this.entriesCount,b=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?(g+100*(d-b-1))/d:100}}))},x.prototype.openedSource=function(c){this.currentSourceOffset=this.bytesWritten,this.currentFile=c.file.name;var g=this.streamFiles&&!c.file.dir;if(g){var d=o(c,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:d.fileRecord,meta:{percent:0}})}else this.accumulate=!0},x.prototype.closedSource=function(c){this.accumulate=!1;var g=this.streamFiles&&!c.file.dir,d=o(c,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(d.dirRecord),g)this.push({data:(function(b){return v.DATA_DESCRIPTOR+i(b.crc32,4)+i(b.compressedSize,4)+i(b.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},x.prototype.flush=function(){for(var c=this.bytesWritten,g=0;g<this.dirRecords.length;g++)this.push({data:this.dirRecords[g],meta:{percent:100}});var d=this.bytesWritten-c,b=(function(f,k,j,N,A){var R=n.transformTo("string",A(N));return v.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(f,2)+i(f,2)+i(k,4)+i(j,4)+i(R.length,2)+R})(this.dirRecords.length,d,c,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(c){this._sources.push(c);var g=this;return c.on("data",function(d){g.processChunk(d)}),c.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),c.on("error",function(d){g.error(d)}),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(c){var g=this._sources;if(!l.prototype.error.call(this,c))return!1;for(var d=0;d<g.length;d++)try{g[d].error(c)}catch{}return!0},x.prototype.lock=function(){l.prototype.lock.call(this);for(var c=this._sources,g=0;g<c.length;g++)c[g].lock()},m.exports=x},{"../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 p=new o(l.streamFiles,h,l.platform,l.encodeFileName),v=0;try{n.forEach(function(x,c){v++;var g=(function(k,j){var N=k||j,A=i[N];if(!A)throw new Error(N+" is not a valid compression method !");return A})(c.options.compression,l.compression),d=c.options.compressionOptions||l.compressionOptions||{},b=c.dir,f=c.date;c._compressWorker(g,d).withStreamInfo("file",{name:x,dir:b,date:f,comment:c.comment||"",unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions}).pipe(p)}),p.entriesCount=v}catch(x){p.error(x)}return p}},{"../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"),p=r("./nodejsUtils");function v(x){return new o.Promise(function(c,g){var d=x.decompressed.getContentWorker().pipe(new h);d.on("error",function(b){g(b)}).on("end",function(){d.streamInfo.crc32!==x.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):c()}).resume()})}m.exports=function(x,c){var g=this;return c=i.extend(c||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),p.isNode&&p.isStream(x)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",x,!0,c.optimizedBinaryString,c.base64).then(function(d){var b=new l(c);return b.load(d),b}).then(function(d){var b=[o.Promise.resolve(d)],f=d.files;if(c.checkCRC32)for(var k=0;k<f.length;k++)b.push(v(f[k]));return o.Promise.all(b)}).then(function(d){for(var b=d.shift(),f=b.files,k=0;k<f.length;k++){var j=f[k],N=j.fileNameStr,A=i.resolve(j.fileNameStr);g.file(A,j.decompressed,{binary:!0,optimizedBinaryString:!0,date:j.date,dir:j.dir,comment:j.fileCommentStr.length?j.fileCommentStr:null,unixPermissions:j.unixPermissions,dosPermissions:j.dosPermissions,createFolders:c.createFolders}),j.dir||(g.file(A).unsafeOriginalName=N)}return b.zipComment.length&&(g.comment=b.zipComment),g})}},{"./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(p){h.push({data:p,meta:{percent:0}})}).on("error",function(p){h.isPaused?this.generatedError=p:h.error(p)}).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 p=this;n.on("data",function(v,x){p.push(v)||p._helper.pause(),h&&h(x)}).on("error",function(v){p.emit("error",v)}).on("end",function(){p.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(A,R,C){var D,L=n.getTypeOf(R),Z=n.extend(C||{},p);Z.date=Z.date||new Date,Z.compression!==null&&(Z.compression=Z.compression.toUpperCase()),typeof Z.unixPermissions=="string"&&(Z.unixPermissions=parseInt(Z.unixPermissions,8)),Z.unixPermissions&&16384&Z.unixPermissions&&(Z.dir=!0),Z.dosPermissions&&16&Z.dosPermissions&&(Z.dir=!0),Z.dir&&(A=f(A)),Z.createFolders&&(D=b(A))&&k.call(this,D,!0);var Y=L==="string"&&Z.binary===!1&&Z.base64===!1;C&&C.binary!==void 0||(Z.binary=!Y),(R instanceof v&&R.uncompressedSize===0||Z.dir||!R||R.length===0)&&(Z.base64=!1,Z.binary=!0,R="",Z.compression="STORE",L="string");var E=null;E=R instanceof v||R instanceof l?R:g.isNode&&g.isStream(R)?new d(A,R):n.prepareContent(A,R,Z.binary,Z.optimizedBinaryString,Z.base64);var F=new x(A,E,Z);this.files[A]=F}var o=r("./utf8"),n=r("./utils"),l=r("./stream/GenericWorker"),h=r("./stream/StreamHelper"),p=r("./defaults"),v=r("./compressedObject"),x=r("./zipObject"),c=r("./generate"),g=r("./nodejsUtils"),d=r("./nodejs/NodejsStreamInputAdapter"),b=function(A){A.slice(-1)==="/"&&(A=A.substring(0,A.length-1));var R=A.lastIndexOf("/");return 0<R?A.substring(0,R):""},f=function(A){return A.slice(-1)!=="/"&&(A+="/"),A},k=function(A,R){return R=R!==void 0?R:p.createFolders,A=f(A),this.files[A]||i.call(this,A,null,{dir:!0,createFolders:R}),this.files[A]};function j(A){return Object.prototype.toString.call(A)==="[object RegExp]"}var N={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(A){var R,C,D;for(R in this.files)D=this.files[R],(C=R.slice(this.root.length,R.length))&&R.slice(0,this.root.length)===this.root&&A(C,D)},filter:function(A){var R=[];return this.forEach(function(C,D){A(C,D)&&R.push(D)}),R},file:function(A,R,C){if(arguments.length!==1)return A=this.root+A,i.call(this,A,R,C),this;if(j(A)){var D=A;return this.filter(function(Z,Y){return!Y.dir&&D.test(Z)})}var L=this.files[this.root+A];return L&&!L.dir?L:null},folder:function(A){if(!A)return this;if(j(A))return this.filter(function(L,Z){return Z.dir&&A.test(L)});var R=this.root+A,C=k.call(this,R),D=this.clone();return D.root=C.name,D},remove:function(A){A=this.root+A;var R=this.files[A];if(R||(A.slice(-1)!=="/"&&(A+="/"),R=this.files[A]),R&&!R.dir)delete this.files[A];else for(var C=this.filter(function(L,Z){return Z.name.slice(0,A.length)===A}),D=0;D<C.length;D++)delete this.files[C[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(A){var R,C={};try{if((C=n.extend(A||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=C.type.toLowerCase(),C.compression=C.compression.toUpperCase(),C.type==="binarystring"&&(C.type="string"),!C.type)throw new Error("No output type specified.");n.checkSupport(C.type),C.platform!=="darwin"&&C.platform!=="freebsd"&&C.platform!=="linux"&&C.platform!=="sunos"||(C.platform="UNIX"),C.platform==="win32"&&(C.platform="DOS");var D=C.comment||this.comment||"";R=c.generateWorker(this,C,D)}catch(L){(R=new l("error")).error(L)}return new h(R,C.type||"string",C.mimeType)},generateAsync:function(A,R){return this.generateInternalStream(A).accumulate(R)},generateNodeStream:function(A,R){return(A=A||{}).type||(A.type="nodebuffer"),this.generateInternalStream(A).toNodejsStream(R)}};m.exports=N},{"./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),p=n.charCodeAt(2),v=n.charCodeAt(3),x=this.length-4;0<=x;--x)if(this.data[x]===l&&this.data[x+1]===h&&this.data[x+2]===p&&this.data[x+3]===v)return x-this.zero;return-1},o.prototype.readAndCheckSignature=function(n){var l=n.charCodeAt(0),h=n.charCodeAt(1),p=n.charCodeAt(2),v=n.charCodeAt(3),x=this.readData(4);return l===x[0]&&h===x[1]&&p===x[2]&&v===x[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"),p=r("./Uint8ArrayReader");m.exports=function(v){var x=i.getTypeOf(v);return i.checkSupport(x),x!=="string"||o.uint8array?x==="nodebuffer"?new h(v):o.uint8array?new p(i.transformTo("uint8array",v)):new n(i.transformTo("array",v)):new l(v)}},{"../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(p){h.dataIsReady=!0,h.data=p,h.max=p&&p.length||0,h.type=i.getTypeOf(p),h.isPaused||h._tickAndRepeat()},function(p){h.error(p)})}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"),p=r("../external"),v=null;if(h.nodestream)try{v=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function x(g,d){return new p.Promise(function(b,f){var k=[],j=g._internalType,N=g._outputType,A=g._mimeType;g.on("data",function(R,C){k.push(R),d&&d(C)}).on("error",function(R){k=[],f(R)}).on("end",function(){try{var R=(function(C,D,L){switch(C){case"blob":return i.newBlob(i.transformTo("arraybuffer",D),L);case"base64":return l.encode(D);default:return i.transformTo(C,D)}})(N,(function(C,D){var L,Z=0,Y=null,E=0;for(L=0;L<D.length;L++)E+=D[L].length;switch(C){case"string":return D.join("");case"array":return Array.prototype.concat.apply([],D);case"uint8array":for(Y=new Uint8Array(E),L=0;L<D.length;L++)Y.set(D[L],Z),Z+=D[L].length;return Y;case"nodebuffer":return Buffer.concat(D);default:throw new Error("concat : unsupported type '"+C+"'")}})(j,k),A);b(R)}catch(C){f(C)}k=[]}).resume()})}function c(g,d,b){var f=d;switch(d){case"blob":case"arraybuffer":f="uint8array";break;case"base64":f="string"}try{this._internalType=f,this._outputType=d,this._mimeType=b,i.checkSupport(f),this._worker=g.pipe(new o(f)),g.lock()}catch(k){this._worker=new n("error"),this._worker.error(k)}}c.prototype={accumulate:function(g){return x(this,g)},on:function(g,d){var b=this;return g==="data"?this._worker.on(g,function(f){d.call(b,f.data,f.meta)}):this._worker.on(g,function(){i.delay(d,arguments,b)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){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"},g)}},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),p=0;p<256;p++)h[p]=252<=p?6:248<=p?5:240<=p?4:224<=p?3:192<=p?2:1;h[254]=h[254]=1;function v(){l.call(this,"utf-8 decode"),this.leftOver=null}function x(){l.call(this,"utf-8 encode")}u.utf8encode=function(c){return o.nodebuffer?n.newBufferFrom(c,"utf-8"):(function(g){var d,b,f,k,j,N=g.length,A=0;for(k=0;k<N;k++)(64512&(b=g.charCodeAt(k)))==55296&&k+1<N&&(64512&(f=g.charCodeAt(k+1)))==56320&&(b=65536+(b-55296<<10)+(f-56320),k++),A+=b<128?1:b<2048?2:b<65536?3:4;for(d=o.uint8array?new Uint8Array(A):new Array(A),k=j=0;j<A;k++)(64512&(b=g.charCodeAt(k)))==55296&&k+1<N&&(64512&(f=g.charCodeAt(k+1)))==56320&&(b=65536+(b-55296<<10)+(f-56320),k++),b<128?d[j++]=b:(b<2048?d[j++]=192|b>>>6:(b<65536?d[j++]=224|b>>>12:(d[j++]=240|b>>>18,d[j++]=128|b>>>12&63),d[j++]=128|b>>>6&63),d[j++]=128|63&b);return d})(c)},u.utf8decode=function(c){return o.nodebuffer?i.transformTo("nodebuffer",c).toString("utf-8"):(function(g){var d,b,f,k,j=g.length,N=new Array(2*j);for(d=b=0;d<j;)if((f=g[d++])<128)N[b++]=f;else if(4<(k=h[f]))N[b++]=65533,d+=k-1;else{for(f&=k===2?31:k===3?15:7;1<k&&d<j;)f=f<<6|63&g[d++],k--;1<k?N[b++]=65533:f<65536?N[b++]=f:(f-=65536,N[b++]=55296|f>>10&1023,N[b++]=56320|1023&f)}return N.length!==b&&(N.subarray?N=N.subarray(0,b):N.length=b),i.applyFromCharCode(N)})(c=i.transformTo(o.uint8array?"uint8array":"array",c))},i.inherits(v,l),v.prototype.processChunk=function(c){var g=i.transformTo(o.uint8array?"uint8array":"array",c.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var d=g;(g=new Uint8Array(d.length+this.leftOver.length)).set(this.leftOver,0),g.set(d,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var b=(function(k,j){var N;for((j=j||k.length)>k.length&&(j=k.length),N=j-1;0<=N&&(192&k[N])==128;)N--;return N<0||N===0?j:N+h[k[N]]>j?N:j})(g),f=g;b!==g.length&&(o.uint8array?(f=g.subarray(0,b),this.leftOver=g.subarray(b,g.length)):(f=g.slice(0,b),this.leftOver=g.slice(b,g.length))),this.push({data:u.utf8decode(f),meta:c.meta})},v.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=v,i.inherits(x,l),x.prototype.processChunk=function(c){this.push({data:u.utf8encode(c.data),meta:c.meta})},u.Utf8EncodeWorker=x},{"./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 p(d,b){for(var f=0;f<d.length;++f)b[f]=255&d.charCodeAt(f);return b}r("setimmediate"),u.newBlob=function(d,b){u.checkSupport("blob");try{return new Blob([d],{type:b})}catch{try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return f.append(d),f.getBlob(b)}catch{throw new Error("Bug : can't construct the Blob.")}}};var v={stringifyByChunk:function(d,b,f){var k=[],j=0,N=d.length;if(N<=f)return String.fromCharCode.apply(null,d);for(;j<N;)b==="array"||b==="nodebuffer"?k.push(String.fromCharCode.apply(null,d.slice(j,Math.min(j+f,N)))):k.push(String.fromCharCode.apply(null,d.subarray(j,Math.min(j+f,N)))),j+=f;return k.join("")},stringifyByChar:function(d){for(var b="",f=0;f<d.length;f++)b+=String.fromCharCode(d[f]);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,n.allocBuffer(1)).length===1}catch{return!1}})()}};function x(d){var b=65536,f=u.getTypeOf(d),k=!0;if(f==="uint8array"?k=v.applyCanBeUsed.uint8array:f==="nodebuffer"&&(k=v.applyCanBeUsed.nodebuffer),k)for(;1<b;)try{return v.stringifyByChunk(d,f,b)}catch{b=Math.floor(b/2)}return v.stringifyByChar(d)}function c(d,b){for(var f=0;f<d.length;f++)b[f]=d[f];return b}u.applyFromCharCode=x;var g={};g.string={string:h,array:function(d){return p(d,new Array(d.length))},arraybuffer:function(d){return g.string.uint8array(d).buffer},uint8array:function(d){return p(d,new Uint8Array(d.length))},nodebuffer:function(d){return p(d,n.allocBuffer(d.length))}},g.array={string:x,array:h,arraybuffer:function(d){return new Uint8Array(d).buffer},uint8array:function(d){return new Uint8Array(d)},nodebuffer:function(d){return n.newBufferFrom(d)}},g.arraybuffer={string:function(d){return x(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))}},g.uint8array={string:x,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)}},g.nodebuffer={string:x,array:function(d){return c(d,new Array(d.length))},arraybuffer:function(d){return g.nodebuffer.uint8array(d).buffer},uint8array:function(d){return c(d,new Uint8Array(d.length))},nodebuffer:h},u.transformTo=function(d,b){if(b=b||"",!d)return b;u.checkSupport(d);var f=u.getTypeOf(b);return g[f][d](b)},u.resolve=function(d){for(var b=d.split("/"),f=[],k=0;k<b.length;k++){var j=b[k];j==="."||j===""&&k!==0&&k!==b.length-1||(j===".."?f.pop():f.push(j))}return f.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 b,f,k="";for(f=0;f<(d||"").length;f++)k+="\\x"+((b=d.charCodeAt(f))<16?"0":"")+b.toString(16).toUpperCase();return k},u.delay=function(d,b,f){setImmediate(function(){d.apply(f||null,b||[])})},u.inherits=function(d,b){function f(){}f.prototype=b.prototype,d.prototype=new f},u.extend=function(){var d,b,f={};for(d=0;d<arguments.length;d++)for(b in arguments[d])Object.prototype.hasOwnProperty.call(arguments[d],b)&&f[b]===void 0&&(f[b]=arguments[d][b]);return f},u.prepareContent=function(d,b,f,k,j){return l.Promise.resolve(b).then(function(N){return i.blob&&(N instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(N))!==-1)&&typeof FileReader<"u"?new l.Promise(function(A,R){var C=new FileReader;C.onload=function(D){A(D.target.result)},C.onerror=function(D){R(D.target.error)},C.readAsArrayBuffer(N)}):N}).then(function(N){var A=u.getTypeOf(N);return A?(A==="arraybuffer"?N=u.transformTo("uint8array",N):A==="string"&&(j?N=o.decode(N):f&&k!==!0&&(N=(function(R){return p(R,i.uint8array?new Uint8Array(R.length):new Array(R.length))})(N))),N):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 p(v){this.files=[],this.loadOptions=v}p.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 ("+o.pretty(x)+", expected "+o.pretty(v)+")")}},isSignature:function(v,x){var c=this.reader.index;this.reader.setIndex(v);var g=this.reader.readString(4)===x;return this.reader.setIndex(c),g},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=h.uint8array?"uint8array":"array",c=o.transformTo(x,v);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 v,x,c,g=this.zip64EndOfCentralSize-44;0<g;)v=this.reader.readInt(2),x=this.reader.readInt(4),c=this.reader.readData(x),this.zip64ExtensibleData[v]={id:v,length:x,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 v,x;for(v=0;v<this.files.length;v++)x=this.files[v],this.reader.setIndex(x.localHeaderOffset),this.checkSignature(n.LOCAL_FILE_HEADER),x.readLocalPart(this.reader),x.handleUTF8(),x.processAttributes()},readCentralDir:function(){var v;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(n.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(n.CENTRAL_DIRECTORY_END);if(v<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(v);var x=v;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,(v=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(v),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 g=x-c;if(0<g)this.isSignature(x,n.CENTRAL_FILE_HEADER)||(this.reader.zero=g);else if(g<0)throw new Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(v){this.reader=i(v)},load:function(v){this.prepareReader(v),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},m.exports=p},{"./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"),p=r("./compressions"),v=r("./support");function x(c,g){this.options=c,this.loadOptions=g}x.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(c){var g,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((g=(function(b){for(var f in p)if(Object.prototype.hasOwnProperty.call(p,f)&&p[f].magic===b)return p[f];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,g,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 g=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(g),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 g,d,b,f=c.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});c.index+4<f;)g=c.readInt(2),d=c.readInt(2),b=c.readData(d),this.extraFields[g]={id:g,length:d,value:b};c.setIndex(f)},handleUTF8:function(){var c=v.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=h.utf8decode(this.fileName),this.fileCommentStr=h.utf8decode(this.fileComment);else{var g=this.findExtraFieldUnicodePath();if(g!==null)this.fileNameStr=g;else{var d=o.transformTo(c,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(d)}var b=this.findExtraFieldUnicodeComment();if(b!==null)this.fileCommentStr=b;else{var f=o.transformTo(c,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(f)}}},findExtraFieldUnicodePath:function(){var c=this.extraFields[28789];if(c){var g=i(c.value);return g.readInt(1)!==1||l(this.fileName)!==g.readInt(4)?null:h.utf8decode(g.readData(c.length-5))}return null},findExtraFieldUnicodeComment:function(){var c=this.extraFields[25461];if(c){var g=i(c.value);return g.readInt(1)!==1||l(this.fileComment)!==g.readInt(4)?null:h.utf8decode(g.readData(c.length-5))}return null}},m.exports=x},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,m,u){function i(g,d,b){this.name=g,this.dir=b.dir,this.date=b.date,this.comment=b.comment,this.unixPermissions=b.unixPermissions,this.dosPermissions=b.dosPermissions,this._data=d,this._dataBinary=b.binary,this.options={compression:b.compression,compressionOptions:b.compressionOptions}}var o=r("./stream/StreamHelper"),n=r("./stream/DataWorker"),l=r("./utf8"),h=r("./compressedObject"),p=r("./stream/GenericWorker");i.prototype={internalStream:function(g){var d=null,b="string";try{if(!g)throw new Error("No output type specified.");var f=(b=g.toLowerCase())==="string"||b==="text";b!=="binarystring"&&b!=="text"||(b="string"),d=this._decompressWorker();var k=!this._dataBinary;k&&!f&&(d=d.pipe(new l.Utf8EncodeWorker)),!k&&f&&(d=d.pipe(new l.Utf8DecodeWorker))}catch(j){(d=new p("error")).error(j)}return new o(d,b,"")},async:function(g,d){return this.internalStream(g).accumulate(d)},nodeStream:function(g,d){return this.internalStream(g||"nodebuffer").toNodejsStream(d)},_compressWorker:function(g,d){if(this._data instanceof h&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var b=this._decompressWorker();return this._dataBinary||(b=b.pipe(new l.Utf8EncodeWorker)),h.createWorkerFrom(b,g,d)},_decompressWorker:function(){return this._data instanceof h?this._data.getContentWorker():this._data instanceof p?this._data:new n(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.")},c=0;c<v.length;c++)i.prototype[v[c]]=x;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,p=new l(g),v=i.document.createTextNode("");p.observe(v,{characterData:!0}),o=function(){v.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(){g(),d.onreadystatechange=null,d.parentNode.removeChild(d),d=null},i.document.documentElement.appendChild(d)}:function(){setTimeout(g,0)};else{var x=new i.MessageChannel;x.port1.onmessage=g,o=function(){x.port2.postMessage(0)}}var c=[];function g(){var d,b;n=!0;for(var f=c.length;f;){for(b=c,c=[],d=-1;++d<f;)b[d]();f=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"],p=["PENDING"];function v(f){if(typeof f!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,f!==o&&d(this,f)}function x(f,k,j){this.promise=f,typeof k=="function"&&(this.onFulfilled=k,this.callFulfilled=this.otherCallFulfilled),typeof j=="function"&&(this.onRejected=j,this.callRejected=this.otherCallRejected)}function c(f,k,j){i(function(){var N;try{N=k(j)}catch(A){return n.reject(f,A)}N===f?n.reject(f,new TypeError("Cannot resolve promise with itself")):n.resolve(f,N)})}function g(f){var k=f&&f.then;if(f&&(typeof f=="object"||typeof f=="function")&&typeof k=="function")return function(){k.apply(f,arguments)}}function d(f,k){var j=!1;function N(C){j||(j=!0,n.reject(f,C))}function A(C){j||(j=!0,n.resolve(f,C))}var R=b(function(){k(A,N)});R.status==="error"&&N(R.value)}function b(f,k){var j={};try{j.value=f(k),j.status="success"}catch(N){j.status="error",j.value=N}return j}(m.exports=v).prototype.finally=function(f){if(typeof f!="function")return this;var k=this.constructor;return this.then(function(j){return k.resolve(f()).then(function(){return j})},function(j){return k.resolve(f()).then(function(){throw j})})},v.prototype.catch=function(f){return this.then(null,f)},v.prototype.then=function(f,k){if(typeof f!="function"&&this.state===h||typeof k!="function"&&this.state===l)return this;var j=new this.constructor(o);return this.state!==p?c(j,this.state===h?f:k,this.outcome):this.queue.push(new x(j,f,k)),j},x.prototype.callFulfilled=function(f){n.resolve(this.promise,f)},x.prototype.otherCallFulfilled=function(f){c(this.promise,this.onFulfilled,f)},x.prototype.callRejected=function(f){n.reject(this.promise,f)},x.prototype.otherCallRejected=function(f){c(this.promise,this.onRejected,f)},n.resolve=function(f,k){var j=b(g,k);if(j.status==="error")return n.reject(f,j.value);var N=j.value;if(N)d(f,N);else{f.state=h,f.outcome=k;for(var A=-1,R=f.queue.length;++A<R;)f.queue[A].callFulfilled(k)}return f},n.reject=function(f,k){f.state=l,f.outcome=k;for(var j=-1,N=f.queue.length;++j<N;)f.queue[j].callRejected(k);return f},v.resolve=function(f){return f instanceof this?f:n.resolve(new this(o),f)},v.reject=function(f){var k=new this(o);return n.reject(k,f)},v.all=function(f){var k=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var j=f.length,N=!1;if(!j)return this.resolve([]);for(var A=new Array(j),R=0,C=-1,D=new this(o);++C<j;)L(f[C],C);return D;function L(Z,Y){k.resolve(Z).then(function(E){A[Y]=E,++R!==j||N||(N=!0,n.resolve(D,A))},function(E){N||(N=!0,n.reject(D,E))})}},v.race=function(f){var k=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var j=f.length,N=!1;if(!j)return this.resolve([]);for(var A=-1,R=new this(o);++A<j;)C=f[A],k.resolve(C).then(function(D){N||(N=!0,n.resolve(R,D))},function(D){N||(N=!0,n.reject(R,D))});var C;return R}},{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"),p=Object.prototype.toString,v=0,x=-1,c=0,g=8;function d(f){if(!(this instanceof d))return new d(f);this.options=o.assign({level:x,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},f||{});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 j=i.deflateInit2(this.strm,k.level,k.method,k.windowBits,k.memLevel,k.strategy);if(j!==v)throw new Error(l[j]);if(k.header&&i.deflateSetHeader(this.strm,k.header),k.dictionary){var N;if(N=typeof k.dictionary=="string"?n.string2buf(k.dictionary):p.call(k.dictionary)==="[object ArrayBuffer]"?new Uint8Array(k.dictionary):k.dictionary,(j=i.deflateSetDictionary(this.strm,N))!==v)throw new Error(l[j]);this._dict_set=!0}}function b(f,k){var j=new d(k);if(j.push(f,!0),j.err)throw j.msg||l[j.err];return j.result}d.prototype.push=function(f,k){var j,N,A=this.strm,R=this.options.chunkSize;if(this.ended)return!1;N=k===~~k?k:k===!0?4:0,typeof f=="string"?A.input=n.string2buf(f):p.call(f)==="[object ArrayBuffer]"?A.input=new Uint8Array(f):A.input=f,A.next_in=0,A.avail_in=A.input.length;do{if(A.avail_out===0&&(A.output=new o.Buf8(R),A.next_out=0,A.avail_out=R),(j=i.deflate(A,N))!==1&&j!==v)return this.onEnd(j),!(this.ended=!0);A.avail_out!==0&&(A.avail_in!==0||N!==4&&N!==2)||(this.options.to==="string"?this.onData(n.buf2binstring(o.shrinkBuf(A.output,A.next_out))):this.onData(o.shrinkBuf(A.output,A.next_out)))}while((0<A.avail_in||A.avail_out===0)&&j!==1);return N===4?(j=i.deflateEnd(this.strm),this.onEnd(j),this.ended=!0,j===v):N!==2||(this.onEnd(v),!(A.avail_out=0))},d.prototype.onData=function(f){this.chunks.push(f)},d.prototype.onEnd=function(f){f===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},u.Deflate=d,u.deflate=b,u.deflateRaw=function(f,k){return(k=k||{}).raw=!0,b(f,k)},u.gzip=function(f,k){return(k=k||{}).gzip=!0,b(f,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"),p=r("./zlib/zstream"),v=r("./zlib/gzheader"),x=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 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)||d&&d.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 p,this.strm.avail_out=0;var f=i.inflateInit2(this.strm,b.windowBits);if(f!==l.Z_OK)throw new Error(h[f]);this.header=new v,i.inflateGetHeader(this.strm,this.header)}function g(d,b){var f=new c(b);if(f.push(d,!0),f.err)throw f.msg||h[f.err];return f.result}c.prototype.push=function(d,b){var f,k,j,N,A,R,C=this.strm,D=this.options.chunkSize,L=this.options.dictionary,Z=!1;if(this.ended)return!1;k=b===~~b?b:b===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof d=="string"?C.input=n.binstring2buf(d):x.call(d)==="[object ArrayBuffer]"?C.input=new Uint8Array(d):C.input=d,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new o.Buf8(D),C.next_out=0,C.avail_out=D),(f=i.inflate(C,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&L&&(R=typeof L=="string"?n.string2buf(L):x.call(L)==="[object ArrayBuffer]"?new Uint8Array(L):L,f=i.inflateSetDictionary(this.strm,R)),f===l.Z_BUF_ERROR&&Z===!0&&(f=l.Z_OK,Z=!1),f!==l.Z_STREAM_END&&f!==l.Z_OK)return this.onEnd(f),!(this.ended=!0);C.next_out&&(C.avail_out!==0&&f!==l.Z_STREAM_END&&(C.avail_in!==0||k!==l.Z_FINISH&&k!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(j=n.utf8border(C.output,C.next_out),N=C.next_out-j,A=n.buf2string(C.output,j),C.next_out=N,C.avail_out=D-N,N&&o.arraySet(C.output,C.output,j,N,0),this.onData(A)):this.onData(o.shrinkBuf(C.output,C.next_out)))),C.avail_in===0&&C.avail_out===0&&(Z=!0)}while((0<C.avail_in||C.avail_out===0)&&f!==l.Z_STREAM_END);return f===l.Z_STREAM_END&&(k=l.Z_FINISH),k===l.Z_FINISH?(f=i.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===l.Z_OK):k!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(C.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=g,u.inflateRaw=function(d,b){return(b=b||{}).raw=!0,g(d,b)},u.ungzip=g},{"./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 p=h.shift();if(p){if(typeof p!="object")throw new TypeError(p+"must be non-object");for(var v in p)p.hasOwnProperty(v)&&(l[v]=p[v])}}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,p,v,x){if(h.subarray&&l.subarray)l.set(h.subarray(p,p+v),x);else for(var c=0;c<v;c++)l[x+c]=h[p+c]},flattenChunks:function(l){var h,p,v,x,c,g;for(h=v=0,p=l.length;h<p;h++)v+=l[h].length;for(g=new Uint8Array(v),h=x=0,p=l.length;h<p;h++)c=l[h],g.set(c,x),x+=c.length;return g}},n={arraySet:function(l,h,p,v,x){for(var c=0;c<v;c++)l[x+c]=h[p+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 p(v,x){if(x<65537&&(v.subarray&&n||!v.subarray&&o))return String.fromCharCode.apply(null,i.shrinkBuf(v,x));for(var c="",g=0;g<x;g++)c+=String.fromCharCode(v[g]);return c}l[254]=l[254]=1,u.string2buf=function(v){var x,c,g,d,b,f=v.length,k=0;for(d=0;d<f;d++)(64512&(c=v.charCodeAt(d)))==55296&&d+1<f&&(64512&(g=v.charCodeAt(d+1)))==56320&&(c=65536+(c-55296<<10)+(g-56320),d++),k+=c<128?1:c<2048?2:c<65536?3:4;for(x=new i.Buf8(k),d=b=0;b<k;d++)(64512&(c=v.charCodeAt(d)))==55296&&d+1<f&&(64512&(g=v.charCodeAt(d+1)))==56320&&(c=65536+(c-55296<<10)+(g-56320),d++),c<128?x[b++]=c:(c<2048?x[b++]=192|c>>>6:(c<65536?x[b++]=224|c>>>12:(x[b++]=240|c>>>18,x[b++]=128|c>>>12&63),x[b++]=128|c>>>6&63),x[b++]=128|63&c);return x},u.buf2binstring=function(v){return p(v,v.length)},u.binstring2buf=function(v){for(var x=new i.Buf8(v.length),c=0,g=x.length;c<g;c++)x[c]=v.charCodeAt(c);return x},u.buf2string=function(v,x){var c,g,d,b,f=x||v.length,k=new Array(2*f);for(c=g=0;c<f;)if((d=v[c++])<128)k[g++]=d;else if(4<(b=l[d]))k[g++]=65533,c+=b-1;else{for(d&=b===2?31:b===3?15:7;1<b&&c<f;)d=d<<6|63&v[c++],b--;1<b?k[g++]=65533:d<65536?k[g++]=d:(d-=65536,k[g++]=55296|d>>10&1023,k[g++]=56320|1023&d)}return p(k,g)},u.utf8border=function(v,x){var c;for((x=x||v.length)>v.length&&(x=v.length),c=x-1;0<=c&&(192&v[c])==128;)c--;return c<0||c===0?x:c+l[v[c]]>x?c:x}},{"./common":41}],43:[function(r,m,u){m.exports=function(i,o,n,l){for(var h=65535&i|0,p=i>>>16&65535|0,v=0;n!==0;){for(n-=v=2e3<n?2e3:n;p=p+(h=h+o[l++]|0)|0,--v;);h%=65521,p%=65521}return h|p<<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 p=i,v=h+l;o^=-1;for(var x=h;x<v;x++)o=o>>>8^p[255&(o^n[x])];return-1^o}},{}],46:[function(r,m,u){var i,o=r("../utils/common"),n=r("./trees"),l=r("./adler32"),h=r("./crc32"),p=r("./messages"),v=0,x=4,c=0,g=-2,d=-1,b=4,f=2,k=8,j=9,N=286,A=30,R=19,C=2*N+1,D=15,L=3,Z=258,Y=Z+L+1,E=42,F=113,a=1,B=2,te=3,U=4;function V(t,T){return t.msg=p[T],T}function H(t){return(t<<1)-(4<t?9:0)}function Q(t){for(var T=t.length;0<=--T;)t[T]=0}function z(t){var T=t.state,P=T.pending;P>t.avail_out&&(P=t.avail_out),P!==0&&(o.arraySet(t.output,T.pending_buf,T.pending_out,P,t.next_out),t.next_out+=P,T.pending_out+=P,t.total_out+=P,t.avail_out-=P,T.pending-=P,T.pending===0&&(T.pending_out=0))}function S(t,T){n._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,T),t.block_start=t.strstart,z(t.strm)}function q(t,T){t.pending_buf[t.pending++]=T}function J(t,T){t.pending_buf[t.pending++]=T>>>8&255,t.pending_buf[t.pending++]=255&T}function ee(t,T){var P,_,w=t.max_chain_length,I=t.strstart,$=t.prev_length,K=t.nice_match,M=t.strstart>t.w_size-Y?t.strstart-(t.w_size-Y):0,O=t.window,G=t.w_mask,W=t.prev,re=t.strstart+Z,de=O[I+$-1],le=O[I+$];t.prev_length>=t.good_match&&(w>>=2),K>t.lookahead&&(K=t.lookahead);do if(O[(P=T)+$]===le&&O[P+$-1]===de&&O[P]===O[I]&&O[++P]===O[I+1]){I+=2,P++;do;while(O[++I]===O[++P]&&O[++I]===O[++P]&&O[++I]===O[++P]&&O[++I]===O[++P]&&O[++I]===O[++P]&&O[++I]===O[++P]&&O[++I]===O[++P]&&O[++I]===O[++P]&&I<re);if(_=Z-(re-I),I=re-Z,$<_){if(t.match_start=T,K<=($=_))break;de=O[I+$-1],le=O[I+$]}}while((T=W[T&G])>M&&--w!=0);return $<=t.lookahead?$:t.lookahead}function ue(t){var T,P,_,w,I,$,K,M,O,G,W=t.w_size;do{if(w=t.window_size-t.lookahead-t.strstart,t.strstart>=W+(W-Y)){for(o.arraySet(t.window,t.window,W,W,0),t.match_start-=W,t.strstart-=W,t.block_start-=W,T=P=t.hash_size;_=t.head[--T],t.head[T]=W<=_?_-W:0,--P;);for(T=P=W;_=t.prev[--T],t.prev[T]=W<=_?_-W:0,--P;);w+=W}if(t.strm.avail_in===0)break;if($=t.strm,K=t.window,M=t.strstart+t.lookahead,O=w,G=void 0,G=$.avail_in,O<G&&(G=O),P=G===0?0:($.avail_in-=G,o.arraySet(K,$.input,$.next_in,G,M),$.state.wrap===1?$.adler=l($.adler,K,G,M):$.state.wrap===2&&($.adler=h($.adler,K,G,M)),$.next_in+=G,$.total_in+=G,G),t.lookahead+=P,t.lookahead+t.insert>=L)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+L-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<L)););}while(t.lookahead<Y&&t.strm.avail_in!==0)}function ie(t,T){for(var P,_;;){if(t.lookahead<Y){if(ue(t),t.lookahead<Y&&T===v)return a;if(t.lookahead===0)break}if(P=0,t.lookahead>=L&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+L-1])&t.hash_mask,P=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),P!==0&&t.strstart-P<=t.w_size-Y&&(t.match_length=ee(t,P)),t.match_length>=L)if(_=n._tr_tally(t,t.strstart-t.match_start,t.match_length-L),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=L){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+L-1])&t.hash_mask,P=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 _=n._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(_&&(S(t,!1),t.strm.avail_out===0))return a}return t.insert=t.strstart<L-1?t.strstart:L-1,T===x?(S(t,!0),t.strm.avail_out===0?te:U):t.last_lit&&(S(t,!1),t.strm.avail_out===0)?a:B}function ae(t,T){for(var P,_,w;;){if(t.lookahead<Y){if(ue(t),t.lookahead<Y&&T===v)return a;if(t.lookahead===0)break}if(P=0,t.lookahead>=L&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+L-1])&t.hash_mask,P=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=L-1,P!==0&&t.prev_length<t.max_lazy_match&&t.strstart-P<=t.w_size-Y&&(t.match_length=ee(t,P),t.match_length<=5&&(t.strategy===1||t.match_length===L&&4096<t.strstart-t.match_start)&&(t.match_length=L-1)),t.prev_length>=L&&t.match_length<=t.prev_length){for(w=t.strstart+t.lookahead-L,_=n._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-L),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+L-1])&t.hash_mask,P=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=L-1,t.strstart++,_&&(S(t,!1),t.strm.avail_out===0))return a}else if(t.match_available){if((_=n._tr_tally(t,0,t.window[t.strstart-1]))&&S(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&&(_=n._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<L-1?t.strstart:L-1,T===x?(S(t,!0),t.strm.avail_out===0?te:U):t.last_lit&&(S(t,!1),t.strm.avail_out===0)?a:B}function se(t,T,P,_,w){this.good_length=t,this.max_lazy=T,this.nice_length=P,this.max_chain=_,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*C),this.dyn_dtree=new o.Buf16(2*(2*A+1)),this.bl_tree=new o.Buf16(2*(2*R+1)),Q(this.dyn_ltree),Q(this.dyn_dtree),Q(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*N+1),Q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*N+1),Q(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 pe(t){var T;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=f,(T=t.state).pending=0,T.pending_out=0,T.wrap<0&&(T.wrap=-T.wrap),T.status=T.wrap?E:F,t.adler=T.wrap===2?0:1,T.last_flush=v,n._tr_init(T),c):V(t,g)}function xe(t){var T=pe(t);return T===c&&(function(P){P.window_size=2*P.w_size,Q(P.head),P.max_lazy_match=i[P.level].max_lazy,P.good_match=i[P.level].good_length,P.nice_match=i[P.level].nice_length,P.max_chain_length=i[P.level].max_chain,P.strstart=0,P.block_start=0,P.lookahead=0,P.insert=0,P.match_length=P.prev_length=L-1,P.match_available=0,P.ins_h=0})(t.state),T}function _e(t,T,P,_,w,I){if(!t)return g;var $=1;if(T===d&&(T=6),_<0?($=0,_=-_):15<_&&($=2,_-=16),w<1||j<w||P!==k||_<8||15<_||T<0||9<T||I<0||b<I)return V(t,g);_===8&&(_=9);var K=new ge;return(t.state=K).strm=t,K.wrap=$,K.gzhead=null,K.w_bits=_,K.w_size=1<<K.w_bits,K.w_mask=K.w_size-1,K.hash_bits=w+7,K.hash_size=1<<K.hash_bits,K.hash_mask=K.hash_size-1,K.hash_shift=~~((K.hash_bits+L-1)/L),K.window=new o.Buf8(2*K.w_size),K.head=new o.Buf16(K.hash_size),K.prev=new o.Buf16(K.w_size),K.lit_bufsize=1<<w+6,K.pending_buf_size=4*K.lit_bufsize,K.pending_buf=new o.Buf8(K.pending_buf_size),K.d_buf=1*K.lit_bufsize,K.l_buf=3*K.lit_bufsize,K.level=T,K.strategy=I,K.method=P,xe(t)}i=[new se(0,0,0,0,function(t,T){var P=65535;for(P>t.pending_buf_size-5&&(P=t.pending_buf_size-5);;){if(t.lookahead<=1){if(ue(t),t.lookahead===0&&T===v)return a;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var _=t.block_start+P;if((t.strstart===0||t.strstart>=_)&&(t.lookahead=t.strstart-_,t.strstart=_,S(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-Y&&(S(t,!1),t.strm.avail_out===0))return a}return t.insert=0,T===x?(S(t,!0),t.strm.avail_out===0?te:U):(t.strstart>t.block_start&&(S(t,!1),t.strm.avail_out),a)}),new se(4,4,8,4,ie),new se(4,5,16,8,ie),new se(4,6,32,32,ie),new se(4,4,16,16,ae),new se(8,16,32,32,ae),new se(8,16,128,128,ae),new se(8,32,128,256,ae),new se(32,128,258,1024,ae),new se(32,258,258,4096,ae)],u.deflateInit=function(t,T){return _e(t,T,k,15,8,0)},u.deflateInit2=_e,u.deflateReset=xe,u.deflateResetKeep=pe,u.deflateSetHeader=function(t,T){return t&&t.state?t.state.wrap!==2?g:(t.state.gzhead=T,c):g},u.deflate=function(t,T){var P,_,w,I;if(!t||!t.state||5<T||T<0)return t?V(t,g):g;if(_=t.state,!t.output||!t.input&&t.avail_in!==0||_.status===666&&T!==x)return V(t,t.avail_out===0?-5:g);if(_.strm=t,P=_.last_flush,_.last_flush=T,_.status===E)if(_.wrap===2)t.adler=0,q(_,31),q(_,139),q(_,8),_.gzhead?(q(_,(_.gzhead.text?1:0)+(_.gzhead.hcrc?2:0)+(_.gzhead.extra?4:0)+(_.gzhead.name?8:0)+(_.gzhead.comment?16:0)),q(_,255&_.gzhead.time),q(_,_.gzhead.time>>8&255),q(_,_.gzhead.time>>16&255),q(_,_.gzhead.time>>24&255),q(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),q(_,255&_.gzhead.os),_.gzhead.extra&&_.gzhead.extra.length&&(q(_,255&_.gzhead.extra.length),q(_,_.gzhead.extra.length>>8&255)),_.gzhead.hcrc&&(t.adler=h(t.adler,_.pending_buf,_.pending,0)),_.gzindex=0,_.status=69):(q(_,0),q(_,0),q(_,0),q(_,0),q(_,0),q(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),q(_,3),_.status=F);else{var $=k+(_.w_bits-8<<4)<<8;$|=(2<=_.strategy||_.level<2?0:_.level<6?1:_.level===6?2:3)<<6,_.strstart!==0&&($|=32),$+=31-$%31,_.status=F,J(_,$),_.strstart!==0&&(J(_,t.adler>>>16),J(_,65535&t.adler)),t.adler=1}if(_.status===69)if(_.gzhead.extra){for(w=_.pending;_.gzindex<(65535&_.gzhead.extra.length)&&(_.pending!==_.pending_buf_size||(_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),z(t),w=_.pending,_.pending!==_.pending_buf_size));)q(_,255&_.gzhead.extra[_.gzindex]),_.gzindex++;_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),_.gzindex===_.gzhead.extra.length&&(_.gzindex=0,_.status=73)}else _.status=73;if(_.status===73)if(_.gzhead.name){w=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),z(t),w=_.pending,_.pending===_.pending_buf_size)){I=1;break}I=_.gzindex<_.gzhead.name.length?255&_.gzhead.name.charCodeAt(_.gzindex++):0,q(_,I)}while(I!==0);_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),I===0&&(_.gzindex=0,_.status=91)}else _.status=91;if(_.status===91)if(_.gzhead.comment){w=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),z(t),w=_.pending,_.pending===_.pending_buf_size)){I=1;break}I=_.gzindex<_.gzhead.comment.length?255&_.gzhead.comment.charCodeAt(_.gzindex++):0,q(_,I)}while(I!==0);_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),I===0&&(_.status=103)}else _.status=103;if(_.status===103&&(_.gzhead.hcrc?(_.pending+2>_.pending_buf_size&&z(t),_.pending+2<=_.pending_buf_size&&(q(_,255&t.adler),q(_,t.adler>>8&255),t.adler=0,_.status=F)):_.status=F),_.pending!==0){if(z(t),t.avail_out===0)return _.last_flush=-1,c}else if(t.avail_in===0&&H(T)<=H(P)&&T!==x)return V(t,-5);if(_.status===666&&t.avail_in!==0)return V(t,-5);if(t.avail_in!==0||_.lookahead!==0||T!==v&&_.status!==666){var K=_.strategy===2?(function(M,O){for(var G;;){if(M.lookahead===0&&(ue(M),M.lookahead===0)){if(O===v)return a;break}if(M.match_length=0,G=n._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,G&&(S(M,!1),M.strm.avail_out===0))return a}return M.insert=0,O===x?(S(M,!0),M.strm.avail_out===0?te:U):M.last_lit&&(S(M,!1),M.strm.avail_out===0)?a:B})(_,T):_.strategy===3?(function(M,O){for(var G,W,re,de,le=M.window;;){if(M.lookahead<=Z){if(ue(M),M.lookahead<=Z&&O===v)return a;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=L&&0<M.strstart&&(W=le[re=M.strstart-1])===le[++re]&&W===le[++re]&&W===le[++re]){de=M.strstart+Z;do;while(W===le[++re]&&W===le[++re]&&W===le[++re]&&W===le[++re]&&W===le[++re]&&W===le[++re]&&W===le[++re]&&W===le[++re]&&re<de);M.match_length=Z-(de-re),M.match_length>M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=L?(G=n._tr_tally(M,1,M.match_length-L),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(G=n._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),G&&(S(M,!1),M.strm.avail_out===0))return a}return M.insert=0,O===x?(S(M,!0),M.strm.avail_out===0?te:U):M.last_lit&&(S(M,!1),M.strm.avail_out===0)?a:B})(_,T):i[_.level].func(_,T);if(K!==te&&K!==U||(_.status=666),K===a||K===te)return t.avail_out===0&&(_.last_flush=-1),c;if(K===B&&(T===1?n._tr_align(_):T!==5&&(n._tr_stored_block(_,0,0,!1),T===3&&(Q(_.head),_.lookahead===0&&(_.strstart=0,_.block_start=0,_.insert=0))),z(t),t.avail_out===0))return _.last_flush=-1,c}return T!==x?c:_.wrap<=0?1:(_.wrap===2?(q(_,255&t.adler),q(_,t.adler>>8&255),q(_,t.adler>>16&255),q(_,t.adler>>24&255),q(_,255&t.total_in),q(_,t.total_in>>8&255),q(_,t.total_in>>16&255),q(_,t.total_in>>24&255)):(J(_,t.adler>>>16),J(_,65535&t.adler)),z(t),0<_.wrap&&(_.wrap=-_.wrap),_.pending!==0?c:1)},u.deflateEnd=function(t){var T;return t&&t.state?(T=t.state.status)!==E&&T!==69&&T!==73&&T!==91&&T!==103&&T!==F&&T!==666?V(t,g):(t.state=null,T===F?V(t,-3):c):g},u.deflateSetDictionary=function(t,T){var P,_,w,I,$,K,M,O,G=T.length;if(!t||!t.state||(I=(P=t.state).wrap)===2||I===1&&P.status!==E||P.lookahead)return g;for(I===1&&(t.adler=l(t.adler,T,G,0)),P.wrap=0,G>=P.w_size&&(I===0&&(Q(P.head),P.strstart=0,P.block_start=0,P.insert=0),O=new o.Buf8(P.w_size),o.arraySet(O,T,G-P.w_size,P.w_size,0),T=O,G=P.w_size),$=t.avail_in,K=t.next_in,M=t.input,t.avail_in=G,t.next_in=0,t.input=T,ue(P);P.lookahead>=L;){for(_=P.strstart,w=P.lookahead-(L-1);P.ins_h=(P.ins_h<<P.hash_shift^P.window[_+L-1])&P.hash_mask,P.prev[_&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=_,_++,--w;);P.strstart=_,P.lookahead=L-1,ue(P)}return P.strstart+=P.lookahead,P.block_start=P.strstart,P.insert=P.lookahead,P.lookahead=0,P.match_length=P.prev_length=L-1,P.match_available=0,t.next_in=K,t.input=M,t.avail_in=$,P.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,p,v,x,c,g,d,b,f,k,j,N,A,R,C,D,L,Z,Y,E,F,a,B;n=i.state,l=i.next_in,a=i.input,h=l+(i.avail_in-5),p=i.next_out,B=i.output,v=p-(o-i.avail_out),x=p+(i.avail_out-257),c=n.dmax,g=n.wsize,d=n.whave,b=n.wnext,f=n.window,k=n.hold,j=n.bits,N=n.lencode,A=n.distcode,R=(1<<n.lenbits)-1,C=(1<<n.distbits)-1;e:do{j<15&&(k+=a[l++]<<j,j+=8,k+=a[l++]<<j,j+=8),D=N[k&R];t:for(;;){if(k>>>=L=D>>>24,j-=L,(L=D>>>16&255)===0)B[p++]=65535&D;else{if(!(16&L)){if((64&L)==0){D=N[(65535&D)+(k&(1<<L)-1)];continue t}if(32&L){n.mode=12;break e}i.msg="invalid literal/length code",n.mode=30;break e}Z=65535&D,(L&=15)&&(j<L&&(k+=a[l++]<<j,j+=8),Z+=k&(1<<L)-1,k>>>=L,j-=L),j<15&&(k+=a[l++]<<j,j+=8,k+=a[l++]<<j,j+=8),D=A[k&C];r:for(;;){if(k>>>=L=D>>>24,j-=L,!(16&(L=D>>>16&255))){if((64&L)==0){D=A[(65535&D)+(k&(1<<L)-1)];continue r}i.msg="invalid distance code",n.mode=30;break e}if(Y=65535&D,j<(L&=15)&&(k+=a[l++]<<j,(j+=8)<L&&(k+=a[l++]<<j,j+=8)),c<(Y+=k&(1<<L)-1)){i.msg="invalid distance too far back",n.mode=30;break e}if(k>>>=L,j-=L,(L=p-v)<Y){if(d<(L=Y-L)&&n.sane){i.msg="invalid distance too far back",n.mode=30;break e}if(F=f,(E=0)===b){if(E+=g-L,L<Z){for(Z-=L;B[p++]=f[E++],--L;);E=p-Y,F=B}}else if(b<L){if(E+=g+b-L,(L-=b)<Z){for(Z-=L;B[p++]=f[E++],--L;);if(E=0,b<Z){for(Z-=L=b;B[p++]=f[E++],--L;);E=p-Y,F=B}}}else if(E+=b-L,L<Z){for(Z-=L;B[p++]=f[E++],--L;);E=p-Y,F=B}for(;2<Z;)B[p++]=F[E++],B[p++]=F[E++],B[p++]=F[E++],Z-=3;Z&&(B[p++]=F[E++],1<Z&&(B[p++]=F[E++]))}else{for(E=p-Y;B[p++]=B[E++],B[p++]=B[E++],B[p++]=B[E++],2<(Z-=3););Z&&(B[p++]=B[E++],1<Z&&(B[p++]=B[E++]))}break}}break}}while(l<h&&p<x);l-=Z=j>>3,k&=(1<<(j-=Z<<3))-1,i.next_in=l,i.next_out=p,i.avail_in=l<h?h-l+5:5-(l-h),i.avail_out=p<x?x-p+257:257-(p-x),n.hold=k,n.bits=j}},{}],49:[function(r,m,u){var i=r("../utils/common"),o=r("./adler32"),n=r("./crc32"),l=r("./inffast"),h=r("./inftrees"),p=1,v=2,x=0,c=-2,g=1,d=852,b=592;function f(E){return(E>>>24&255)+(E>>>8&65280)+((65280&E)<<8)+((255&E)<<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 j(E){var F;return E&&E.state?(F=E.state,E.total_in=E.total_out=F.total=0,E.msg="",F.wrap&&(E.adler=1&F.wrap),F.mode=g,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new i.Buf32(d),F.distcode=F.distdyn=new i.Buf32(b),F.sane=1,F.back=-1,x):c}function N(E){var F;return E&&E.state?((F=E.state).wsize=0,F.whave=0,F.wnext=0,j(E)):c}function A(E,F){var a,B;return E&&E.state?(B=E.state,F<0?(a=0,F=-F):(a=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15<F)?c:(B.window!==null&&B.wbits!==F&&(B.window=null),B.wrap=a,B.wbits=F,N(E))):c}function R(E,F){var a,B;return E?(B=new k,(E.state=B).window=null,(a=A(E,F))!==x&&(E.state=null),a):c}var C,D,L=!0;function Z(E){if(L){var F;for(C=new i.Buf32(512),D=new i.Buf32(32),F=0;F<144;)E.lens[F++]=8;for(;F<256;)E.lens[F++]=9;for(;F<280;)E.lens[F++]=7;for(;F<288;)E.lens[F++]=8;for(h(p,E.lens,0,288,C,0,E.work,{bits:9}),F=0;F<32;)E.lens[F++]=5;h(v,E.lens,0,32,D,0,E.work,{bits:5}),L=!1}E.lencode=C,E.lenbits=9,E.distcode=D,E.distbits=5}function Y(E,F,a,B){var te,U=E.state;return U.window===null&&(U.wsize=1<<U.wbits,U.wnext=0,U.whave=0,U.window=new i.Buf8(U.wsize)),B>=U.wsize?(i.arraySet(U.window,F,a-U.wsize,U.wsize,0),U.wnext=0,U.whave=U.wsize):(B<(te=U.wsize-U.wnext)&&(te=B),i.arraySet(U.window,F,a-B,te,U.wnext),(B-=te)?(i.arraySet(U.window,F,a-B,B,0),U.wnext=B,U.whave=U.wsize):(U.wnext+=te,U.wnext===U.wsize&&(U.wnext=0),U.whave<U.wsize&&(U.whave+=te))),0}u.inflateReset=N,u.inflateReset2=A,u.inflateResetKeep=j,u.inflateInit=function(E){return R(E,15)},u.inflateInit2=R,u.inflate=function(E,F){var a,B,te,U,V,H,Q,z,S,q,J,ee,ue,ie,ae,se,ge,pe,xe,_e,t,T,P,_,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(!E||!E.state||!E.output||!E.input&&E.avail_in!==0)return c;(a=E.state).mode===12&&(a.mode=13),V=E.next_out,te=E.output,Q=E.avail_out,U=E.next_in,B=E.input,H=E.avail_in,z=a.hold,S=a.bits,q=H,J=Q,T=x;e:for(;;)switch(a.mode){case g:if(a.wrap===0){a.mode=13;break}for(;S<16;){if(H===0)break e;H--,z+=B[U++]<<S,S+=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),S=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){E.msg="incorrect header check",a.mode=30;break}if((15&z)!=8){E.msg="unknown compression method",a.mode=30;break}if(S-=4,t=8+(15&(z>>>=4)),a.wbits===0)a.wbits=t;else if(t>a.wbits){E.msg="invalid window size",a.mode=30;break}a.dmax=1<<t,E.adler=a.check=1,a.mode=512&z?10:12,S=z=0;break;case 2:for(;S<16;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if(a.flags=z,(255&a.flags)!=8){E.msg="unknown compression method",a.mode=30;break}if(57344&a.flags){E.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)),S=z=0,a.mode=3;case 3:for(;S<32;){if(H===0)break e;H--,z+=B[U++]<<S,S+=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)),S=z=0,a.mode=4;case 4:for(;S<16;){if(H===0)break e;H--,z+=B[U++]<<S,S+=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)),S=z=0,a.mode=5;case 5:if(1024&a.flags){for(;S<16;){if(H===0)break e;H--,z+=B[U++]<<S,S+=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)),S=z=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(H<(ee=a.length)&&(ee=H),ee&&(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,B,U,ee,t)),512&a.flags&&(a.check=n(a.check,B,ee,U)),H-=ee,U+=ee,a.length-=ee),a.length))break e;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(H===0)break e;for(ee=0;t=B[U+ee++],a.head&&t&&a.length<65536&&(a.head.name+=String.fromCharCode(t)),t&&ee<H;);if(512&a.flags&&(a.check=n(a.check,B,ee,U)),H-=ee,U+=ee,t)break e}else a.head&&(a.head.name=null);a.length=0,a.mode=8;case 8:if(4096&a.flags){if(H===0)break e;for(ee=0;t=B[U+ee++],a.head&&t&&a.length<65536&&(a.head.comment+=String.fromCharCode(t)),t&&ee<H;);if(512&a.flags&&(a.check=n(a.check,B,ee,U)),H-=ee,U+=ee,t)break e}else a.head&&(a.head.comment=null);a.mode=9;case 9:if(512&a.flags){for(;S<16;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if(z!==(65535&a.check)){E.msg="header crc mismatch",a.mode=30;break}S=z=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),E.adler=a.check=0,a.mode=12;break;case 10:for(;S<32;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}E.adler=a.check=f(z),S=z=0,a.mode=11;case 11:if(a.havedict===0)return E.next_out=V,E.avail_out=Q,E.next_in=U,E.avail_in=H,a.hold=z,a.bits=S,2;E.adler=a.check=1,a.mode=12;case 12:if(F===5||F===6)break e;case 13:if(a.last){z>>>=7&S,S-=7&S,a.mode=27;break}for(;S<3;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}switch(a.last=1&z,S-=1,3&(z>>>=1)){case 0:a.mode=14;break;case 1:if(Z(a),a.mode=20,F!==6)break;z>>>=2,S-=2;break e;case 2:a.mode=17;break;case 3:E.msg="invalid block type",a.mode=30}z>>>=2,S-=2;break;case 14:for(z>>>=7&S,S-=7&S;S<32;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if((65535&z)!=(z>>>16^65535)){E.msg="invalid stored block lengths",a.mode=30;break}if(a.length=65535&z,S=z=0,a.mode=15,F===6)break e;case 15:a.mode=16;case 16:if(ee=a.length){if(H<ee&&(ee=H),Q<ee&&(ee=Q),ee===0)break e;i.arraySet(te,B,U,ee,V),H-=ee,U+=ee,Q-=ee,V+=ee,a.length-=ee;break}a.mode=12;break;case 17:for(;S<14;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if(a.nlen=257+(31&z),z>>>=5,S-=5,a.ndist=1+(31&z),z>>>=5,S-=5,a.ncode=4+(15&z),z>>>=4,S-=4,286<a.nlen||30<a.ndist){E.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(;S<3;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}a.lens[$[a.have++]]=7&z,z>>>=3,S-=3}for(;a.have<19;)a.lens[$[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,P={bits:a.lenbits},T=h(0,a.lens,0,19,a.lencode,0,a.work,P),a.lenbits=P.bits,T){E.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(;se=(w=a.lencode[z&(1<<a.lenbits)-1])>>>16&255,ge=65535&w,!((ae=w>>>24)<=S);){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if(ge<16)z>>>=ae,S-=ae,a.lens[a.have++]=ge;else{if(ge===16){for(_=ae+2;S<_;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if(z>>>=ae,S-=ae,a.have===0){E.msg="invalid bit length repeat",a.mode=30;break}t=a.lens[a.have-1],ee=3+(3&z),z>>>=2,S-=2}else if(ge===17){for(_=ae+3;S<_;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}S-=ae,t=0,ee=3+(7&(z>>>=ae)),z>>>=3,S-=3}else{for(_=ae+7;S<_;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}S-=ae,t=0,ee=11+(127&(z>>>=ae)),z>>>=7,S-=7}if(a.have+ee>a.nlen+a.ndist){E.msg="invalid bit length repeat",a.mode=30;break}for(;ee--;)a.lens[a.have++]=t}}if(a.mode===30)break;if(a.lens[256]===0){E.msg="invalid code -- missing end-of-block",a.mode=30;break}if(a.lenbits=9,P={bits:a.lenbits},T=h(p,a.lens,0,a.nlen,a.lencode,0,a.work,P),a.lenbits=P.bits,T){E.msg="invalid literal/lengths set",a.mode=30;break}if(a.distbits=6,a.distcode=a.distdyn,P={bits:a.distbits},T=h(v,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,P),a.distbits=P.bits,T){E.msg="invalid distances set",a.mode=30;break}if(a.mode=20,F===6)break e;case 20:a.mode=21;case 21:if(6<=H&&258<=Q){E.next_out=V,E.avail_out=Q,E.next_in=U,E.avail_in=H,a.hold=z,a.bits=S,l(E,J),V=E.next_out,te=E.output,Q=E.avail_out,U=E.next_in,B=E.input,H=E.avail_in,z=a.hold,S=a.bits,a.mode===12&&(a.back=-1);break}for(a.back=0;se=(w=a.lencode[z&(1<<a.lenbits)-1])>>>16&255,ge=65535&w,!((ae=w>>>24)<=S);){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if(se&&(240&se)==0){for(pe=ae,xe=se,_e=ge;se=(w=a.lencode[_e+((z&(1<<pe+xe)-1)>>pe)])>>>16&255,ge=65535&w,!(pe+(ae=w>>>24)<=S);){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}z>>>=pe,S-=pe,a.back+=pe}if(z>>>=ae,S-=ae,a.back+=ae,a.length=ge,se===0){a.mode=26;break}if(32&se){a.back=-1,a.mode=12;break}if(64&se){E.msg="invalid literal/length code",a.mode=30;break}a.extra=15&se,a.mode=22;case 22:if(a.extra){for(_=a.extra;S<_;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}a.length+=z&(1<<a.extra)-1,z>>>=a.extra,S-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;se=(w=a.distcode[z&(1<<a.distbits)-1])>>>16&255,ge=65535&w,!((ae=w>>>24)<=S);){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if((240&se)==0){for(pe=ae,xe=se,_e=ge;se=(w=a.distcode[_e+((z&(1<<pe+xe)-1)>>pe)])>>>16&255,ge=65535&w,!(pe+(ae=w>>>24)<=S);){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}z>>>=pe,S-=pe,a.back+=pe}if(z>>>=ae,S-=ae,a.back+=ae,64&se){E.msg="invalid distance code",a.mode=30;break}a.offset=ge,a.extra=15&se,a.mode=24;case 24:if(a.extra){for(_=a.extra;S<_;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}a.offset+=z&(1<<a.extra)-1,z>>>=a.extra,S-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){E.msg="invalid distance too far back",a.mode=30;break}a.mode=25;case 25:if(Q===0)break e;if(ee=J-Q,a.offset>ee){if((ee=a.offset-ee)>a.whave&&a.sane){E.msg="invalid distance too far back",a.mode=30;break}ue=ee>a.wnext?(ee-=a.wnext,a.wsize-ee):a.wnext-ee,ee>a.length&&(ee=a.length),ie=a.window}else ie=te,ue=V-a.offset,ee=a.length;for(Q<ee&&(ee=Q),Q-=ee,a.length-=ee;te[V++]=ie[ue++],--ee;);a.length===0&&(a.mode=21);break;case 26:if(Q===0)break e;te[V++]=a.length,Q--,a.mode=21;break;case 27:if(a.wrap){for(;S<32;){if(H===0)break e;H--,z|=B[U++]<<S,S+=8}if(J-=Q,E.total_out+=J,a.total+=J,J&&(E.adler=a.check=a.flags?n(a.check,te,J,V-J):o(a.check,te,J,V-J)),J=Q,(a.flags?z:f(z))!==a.check){E.msg="incorrect data check",a.mode=30;break}S=z=0}a.mode=28;case 28:if(a.wrap&&a.flags){for(;S<32;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if(z!==(4294967295&a.total)){E.msg="incorrect length check",a.mode=30;break}S=z=0}a.mode=29;case 29:T=1;break e;case 30:T=-3;break e;case 31:return-4;case 32:default:return c}return E.next_out=V,E.avail_out=Q,E.next_in=U,E.avail_in=H,a.hold=z,a.bits=S,(a.wsize||J!==E.avail_out&&a.mode<30&&(a.mode<27||F!==4))&&Y(E,E.output,E.next_out,J-E.avail_out)?(a.mode=31,-4):(q-=E.avail_in,J-=E.avail_out,E.total_in+=q,E.total_out+=J,a.total+=J,a.wrap&&J&&(E.adler=a.check=a.flags?n(a.check,te,J,E.next_out-J):o(a.check,te,J,E.next_out-J)),E.data_type=a.bits+(a.last?64:0)+(a.mode===12?128:0)+(a.mode===20||a.mode===15?256:0),(q==0&&J===0||F===4)&&T===x&&(T=-5),T)},u.inflateEnd=function(E){if(!E||!E.state)return c;var F=E.state;return F.window&&(F.window=null),E.state=null,x},u.inflateGetHeader=function(E,F){var a;return E&&E.state?(2&(a=E.state).wrap)==0?c:((a.head=F).done=!1,x):c},u.inflateSetDictionary=function(E,F){var a,B=F.length;return E&&E.state?(a=E.state).wrap!==0&&a.mode!==11?c:a.mode===11&&o(1,F,B,0)!==a.check?-3:Y(E,F,B,B)?(a.mode=31,-4):(a.havedict=1,x):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(p,v,x,c,g,d,b,f){var k,j,N,A,R,C,D,L,Z,Y=f.bits,E=0,F=0,a=0,B=0,te=0,U=0,V=0,H=0,Q=0,z=0,S=null,q=0,J=new i.Buf16(16),ee=new i.Buf16(16),ue=null,ie=0;for(E=0;E<=15;E++)J[E]=0;for(F=0;F<c;F++)J[v[x+F]]++;for(te=Y,B=15;1<=B&&J[B]===0;B--);if(B<te&&(te=B),B===0)return g[d++]=20971520,g[d++]=20971520,f.bits=1,0;for(a=1;a<B&&J[a]===0;a++);for(te<a&&(te=a),E=H=1;E<=15;E++)if(H<<=1,(H-=J[E])<0)return-1;if(0<H&&(p===0||B!==1))return-1;for(ee[1]=0,E=1;E<15;E++)ee[E+1]=ee[E]+J[E];for(F=0;F<c;F++)v[x+F]!==0&&(b[ee[v[x+F]]++]=F);if(C=p===0?(S=ue=b,19):p===1?(S=o,q-=257,ue=n,ie-=257,256):(S=l,ue=h,-1),E=a,R=d,V=F=z=0,N=-1,A=(Q=1<<(U=te))-1,p===1&&852<Q||p===2&&592<Q)return 1;for(;;){for(D=E-V,Z=b[F]<C?(L=0,b[F]):b[F]>C?(L=ue[ie+b[F]],S[q+b[F]]):(L=96,0),k=1<<E-V,a=j=1<<U;g[R+(z>>V)+(j-=k)]=D<<24|L<<16|Z|0,j!==0;);for(k=1<<E-1;z&k;)k>>=1;if(k!==0?(z&=k-1,z+=k):z=0,F++,--J[E]==0){if(E===B)break;E=v[x+b[F]]}if(te<E&&(z&A)!==N){for(V===0&&(V=te),R+=a,H=1<<(U=E-V);U+V<B&&!((H-=J[U+V])<=0);)U++,H<<=1;if(Q+=1<<U,p===1&&852<Q||p===2&&592<Q)return 1;g[N=z&A]=te<<24|U<<16|R-d|0}}return z!==0&&(g[R+z]=E-V<<24|64<<16|0),f.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,p=29,v=256,x=v+1+p,c=30,g=19,d=2*x+1,b=15,f=16,k=7,j=256,N=16,A=17,R=18,C=[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],L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=new Array(2*(x+2));l(Y);var E=new Array(2*c);l(E);var F=new Array(512);l(F);var a=new Array(256);l(a);var B=new Array(p);l(B);var te,U,V,H=new Array(c);function Q(w,I,$,K,M){this.static_tree=w,this.extra_bits=I,this.extra_base=$,this.elems=K,this.max_length=M,this.has_stree=w&&w.length}function z(w,I){this.dyn_tree=w,this.max_code=0,this.stat_desc=I}function S(w){return w<256?F[w]:F[256+(w>>>7)]}function q(w,I){w.pending_buf[w.pending++]=255&I,w.pending_buf[w.pending++]=I>>>8&255}function J(w,I,$){w.bi_valid>f-$?(w.bi_buf|=I<<w.bi_valid&65535,q(w,w.bi_buf),w.bi_buf=I>>f-w.bi_valid,w.bi_valid+=$-f):(w.bi_buf|=I<<w.bi_valid&65535,w.bi_valid+=$)}function ee(w,I,$){J(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 K,M,O=new Array(b+1),G=0;for(K=1;K<=b;K++)O[K]=G=G+$[K-1]<<1;for(M=0;M<=I;M++){var W=w[2*M+1];W!==0&&(w[2*M]=ue(O[W]++,W))}}function ae(w){var I;for(I=0;I<x;I++)w.dyn_ltree[2*I]=0;for(I=0;I<c;I++)w.dyn_dtree[2*I]=0;for(I=0;I<g;I++)w.bl_tree[2*I]=0;w.dyn_ltree[2*j]=1,w.opt_len=w.static_len=0,w.last_lit=w.matches=0}function se(w){8<w.bi_valid?q(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,$,K){var M=2*I,O=2*$;return w[M]<w[O]||w[M]===w[O]&&K[I]<=K[$]}function pe(w,I,$){for(var K=w.heap[$],M=$<<1;M<=w.heap_len&&(M<w.heap_len&&ge(I,w.heap[M+1],w.heap[M],w.depth)&&M++,!ge(I,K,w.heap[M],w.depth));)w.heap[$]=w.heap[M],$=M,M<<=1;w.heap[$]=K}function xe(w,I,$){var K,M,O,G,W=0;if(w.last_lit!==0)for(;K=w.pending_buf[w.d_buf+2*W]<<8|w.pending_buf[w.d_buf+2*W+1],M=w.pending_buf[w.l_buf+W],W++,K===0?ee(w,M,I):(ee(w,(O=a[M])+v+1,I),(G=C[O])!==0&&J(w,M-=B[O],G),ee(w,O=S(--K),$),(G=D[O])!==0&&J(w,K-=H[O],G)),W<w.last_lit;);ee(w,j,I)}function _e(w,I){var $,K,M,O=I.dyn_tree,G=I.stat_desc.static_tree,W=I.stat_desc.has_stree,re=I.stat_desc.elems,de=-1;for(w.heap_len=0,w.heap_max=d,$=0;$<re;$++)O[2*$]!==0?(w.heap[++w.heap_len]=de=$,w.depth[$]=0):O[2*$+1]=0;for(;w.heap_len<2;)O[2*(M=w.heap[++w.heap_len]=de<2?++de:0)]=1,w.depth[M]=0,w.opt_len--,W&&(w.static_len-=G[2*M+1]);for(I.max_code=de,$=w.heap_len>>1;1<=$;$--)pe(w,O,$);for(M=re;$=w.heap[1],w.heap[1]=w.heap[w.heap_len--],pe(w,O,1),K=w.heap[1],w.heap[--w.heap_max]=$,w.heap[--w.heap_max]=K,O[2*M]=O[2*$]+O[2*K],w.depth[M]=(w.depth[$]>=w.depth[K]?w.depth[$]:w.depth[K])+1,O[2*$+1]=O[2*K+1]=M,w.heap[1]=M++,pe(w,O,1),2<=w.heap_len;);w.heap[--w.heap_max]=w.heap[1],(function(le,ke){var je,Ee,Ve,we,st,jt,Ce=ke.dyn_tree,Nr=ke.max_code,go=ke.stat_desc.static_tree,vo=ke.stat_desc.has_stree,xo=ke.stat_desc.extra_bits,Sr=ke.stat_desc.extra_base,Ke=ke.stat_desc.max_length,lt=0;for(we=0;we<=b;we++)le.bl_count[we]=0;for(Ce[2*le.heap[le.heap_max]+1]=0,je=le.heap_max+1;je<d;je++)Ke<(we=Ce[2*Ce[2*(Ee=le.heap[je])+1]+1]+1)&&(we=Ke,lt++),Ce[2*Ee+1]=we,Nr<Ee||(le.bl_count[we]++,st=0,Sr<=Ee&&(st=xo[Ee-Sr]),jt=Ce[2*Ee],le.opt_len+=jt*(we+st),vo&&(le.static_len+=jt*(go[2*Ee+1]+st)));if(lt!==0){do{for(we=Ke-1;le.bl_count[we]===0;)we--;le.bl_count[we]--,le.bl_count[we+1]+=2,le.bl_count[Ke]--,lt-=2}while(0<lt);for(we=Ke;we!==0;we--)for(Ee=le.bl_count[we];Ee!==0;)Nr<(Ve=le.heap[--je])||(Ce[2*Ve+1]!==we&&(le.opt_len+=(we-Ce[2*Ve+1])*Ce[2*Ve],Ce[2*Ve+1]=we),Ee--)}})(w,I),ie(O,de,w.bl_count)}function t(w,I,$){var K,M,O=-1,G=I[1],W=0,re=7,de=4;for(G===0&&(re=138,de=3),I[2*($+1)+1]=65535,K=0;K<=$;K++)M=G,G=I[2*(K+1)+1],++W<re&&M===G||(W<de?w.bl_tree[2*M]+=W:M!==0?(M!==O&&w.bl_tree[2*M]++,w.bl_tree[2*N]++):W<=10?w.bl_tree[2*A]++:w.bl_tree[2*R]++,O=M,de=(W=0)===G?(re=138,3):M===G?(re=6,3):(re=7,4))}function T(w,I,$){var K,M,O=-1,G=I[1],W=0,re=7,de=4;for(G===0&&(re=138,de=3),K=0;K<=$;K++)if(M=G,G=I[2*(K+1)+1],!(++W<re&&M===G)){if(W<de)for(;ee(w,M,w.bl_tree),--W!=0;);else M!==0?(M!==O&&(ee(w,M,w.bl_tree),W--),ee(w,N,w.bl_tree),J(w,W-3,2)):W<=10?(ee(w,A,w.bl_tree),J(w,W-3,3)):(ee(w,R,w.bl_tree),J(w,W-11,7));O=M,de=(W=0)===G?(re=138,3):M===G?(re=6,3):(re=7,4)}}l(H);var P=!1;function _(w,I,$,K){J(w,(h<<1)+(K?1:0),3),(function(M,O,G,W){se(M),q(M,G),q(M,~G),i.arraySet(M.pending_buf,M.window,O,G,M.pending),M.pending+=G})(w,I,$)}u._tr_init=function(w){P||((function(){var I,$,K,M,O,G=new Array(b+1);for(M=K=0;M<p-1;M++)for(B[M]=K,I=0;I<1<<C[M];I++)a[K++]=M;for(a[K-1]=M,M=O=0;M<16;M++)for(H[M]=O,I=0;I<1<<D[M];I++)F[O++]=M;for(O>>=7;M<c;M++)for(H[M]=O<<7,I=0;I<1<<D[M]-7;I++)F[256+O++]=M;for($=0;$<=b;$++)G[$]=0;for(I=0;I<=143;)Y[2*I+1]=8,I++,G[8]++;for(;I<=255;)Y[2*I+1]=9,I++,G[9]++;for(;I<=279;)Y[2*I+1]=7,I++,G[7]++;for(;I<=287;)Y[2*I+1]=8,I++,G[8]++;for(ie(Y,x+1,G),I=0;I<c;I++)E[2*I+1]=5,E[2*I]=ue(I,5);te=new Q(Y,C,v+1,x,b),U=new Q(E,D,0,c,b),V=new Q(new Array(0),L,0,g,k)})(),P=!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,V),w.bi_buf=0,w.bi_valid=0,ae(w)},u._tr_stored_block=_,u._tr_flush_block=function(w,I,$,K){var M,O,G=0;0<w.level?(w.strm.data_type===2&&(w.strm.data_type=(function(W){var re,de=4093624447;for(re=0;re<=31;re++,de>>>=1)if(1&de&&W.dyn_ltree[2*re]!==0)return o;if(W.dyn_ltree[18]!==0||W.dyn_ltree[20]!==0||W.dyn_ltree[26]!==0)return n;for(re=32;re<v;re++)if(W.dyn_ltree[2*re]!==0)return n;return o})(w)),_e(w,w.l_desc),_e(w,w.d_desc),G=(function(W){var re;for(t(W,W.dyn_ltree,W.l_desc.max_code),t(W,W.dyn_dtree,W.d_desc.max_code),_e(W,W.bl_desc),re=g-1;3<=re&&W.bl_tree[2*Z[re]+1]===0;re--);return W.opt_len+=3*(re+1)+5+5+4,re})(w),M=w.opt_len+3+7>>>3,(O=w.static_len+3+7>>>3)<=M&&(M=O)):M=O=$+5,$+4<=M&&I!==-1?_(w,I,$,K):w.strategy===4||O===M?(J(w,2+(K?1:0),3),xe(w,Y,E)):(J(w,4+(K?1:0),3),(function(W,re,de,le){var ke;for(J(W,re-257,5),J(W,de-1,5),J(W,le-4,4),ke=0;ke<le;ke++)J(W,W.bl_tree[2*Z[ke]+1],3);T(W,W.dyn_ltree,re-1),T(W,W.dyn_dtree,de-1)})(w,w.l_desc.max_code+1,w.d_desc.max_code+1,G+1),xe(w,w.dyn_ltree,w.dyn_dtree)),ae(w),K&&se(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[$]+v+1)]++,w.dyn_dtree[2*S(I)]++),w.last_lit===w.lit_bufsize-1},u._tr_align=function(w){J(w,2,3),ee(w,j,Y),(function(I){I.bi_valid===16?(q(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,p,v,x=1,c={},g=!1,d=o.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(o);b=b&&b.setTimeout?b:o,l={}.toString.call(o.process)==="[object process]"?function(N){process.nextTick(function(){k(N)})}:(function(){if(o.postMessage&&!o.importScripts){var N=!0,A=o.onmessage;return o.onmessage=function(){N=!1},o.postMessage("","*"),o.onmessage=A,N}})()?(v="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",j,!1):o.attachEvent("onmessage",j),function(N){o.postMessage(v+N,"*")}):o.MessageChannel?((p=new MessageChannel).port1.onmessage=function(N){k(N.data)},function(N){p.port2.postMessage(N)}):d&&"onreadystatechange"in d.createElement("script")?(h=d.documentElement,function(N){var A=d.createElement("script");A.onreadystatechange=function(){k(N),A.onreadystatechange=null,h.removeChild(A),A=null},h.appendChild(A)}):function(N){setTimeout(k,0,N)},b.setImmediate=function(N){typeof N!="function"&&(N=new Function(""+N));for(var A=new Array(arguments.length-1),R=0;R<A.length;R++)A[R]=arguments[R+1];var C={callback:N,args:A};return c[x]=C,l(x),x++},b.clearImmediate=f}function f(N){delete c[N]}function k(N){if(g)setTimeout(k,0,N);else{var A=c[N];if(A){g=!0;try{(function(R){var C=R.callback,D=R.args;switch(D.length){case 0:C();break;case 1:C(D[0]);break;case 2:C(D[0],D[1]);break;case 3:C(D[0],D[1],D[2]);break;default:C.apply(n,D)}})(A)}finally{f(N),g=!1}}}}function j(N){N.source===o&&typeof N.data=="string"&&N.data.indexOf(v)===0&&k(+N.data.slice(v.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 Or=Tr();const Dr=Ir(Or);var qe={exports:{}},Lr=qe.exports,Nt;function Pr(){return Nt||(Nt=1,(function(e,y){(function(r,m){m()})(Lr,function(){function r(h,p){return typeof p>"u"?p={autoBom:!1}:typeof p!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),p={autoBom:!p}),p.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,p,v){var x=new XMLHttpRequest;x.open("GET",h),x.responseType="blob",x.onload=function(){l(x.response,p,v)},x.onerror=function(){console.error("could not download file")},x.send()}function u(h){var p=new XMLHttpRequest;p.open("HEAD",h,!1);try{p.send()}catch{}return 200<=p.status&&299>=p.status}function i(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var p=document.createEvent("MouseEvents");p.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(p)}}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,p,v){var x=o.URL||o.webkitURL,c=document.createElement("a");p=p||h.name||"download",c.download=p,c.rel="noopener",typeof h=="string"?(c.href=h,c.origin===location.origin?i(c):u(c.href)?m(h,p,v):i(c,c.target="_blank")):(c.href=x.createObjectURL(h),setTimeout(function(){x.revokeObjectURL(c.href)},4e4),setTimeout(function(){i(c)},0))}:"msSaveOrOpenBlob"in navigator?function(h,p,v){if(p=p||h.name||"download",typeof h!="string")navigator.msSaveOrOpenBlob(r(h,v),p);else if(u(h))m(h,p,v);else{var x=document.createElement("a");x.href=h,x.target="_blank",setTimeout(function(){i(x)})}}:function(h,p,v,x){if(x=x||open("","_blank"),x&&(x.document.title=x.document.body.innerText="downloading..."),typeof h=="string")return m(h,p,v);var c=h.type==="application/octet-stream",g=/constructor/i.test(o.HTMLElement)||o.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent);if((d||c&&g||n)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var j=b.result;j=d?j:j.replace(/^data:[^;]*;/,"data:attachment/file;"),x?x.location.href=j:location=j,x=null},b.readAsDataURL(h)}else{var f=o.URL||o.webkitURL,k=f.createObjectURL(h);x?x.location=k:location.href=k,x=null,setTimeout(function(){f.revokeObjectURL(k)},4e4)}});o.saveAs=l.saveAs=l,e.exports=l})})(qe)),qe.exports}var St=Pr();const Ct=async(e,y)=>{const r=new Dr,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(`${y}.json`,JSON.stringify(e.page,null,2));const i=await r.generateAsync({type:"blob"});St.saveAs(i,`jsonpages-project-${y}-${Date.now()}.zip`)},At=(e,y,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"});St.saveAs(h,`${y}.html`)};function It(e){var y,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(y=0;y<u;y++)e[y]&&(r=It(e[y]))&&(m&&(m+=" "),m+=r)}else for(r in e)e[r]&&(m&&(m+=" "),m+=r);return m}function Fr(){for(var e,y,r=0,m="",u=arguments.length;r<u;r++)(e=arguments[r])&&(y=It(e))&&(m&&(m+=" "),m+=y);return m}const Rr=(e,y)=>{const r=new Array(e.length+y.length);for(let m=0;m<e.length;m++)r[m]=e[m];for(let m=0;m<y.length;m++)r[e.length+m]=y[m];return r},Mr=(e,y)=>({classGroupId:e,validator:y}),Tt=(e=new Map,y=null,r)=>({nextPart:e,validators:y,classGroupId:r}),Ye="-",Ot=[],Br="arbitrary..",Ur=e=>{const y=$r(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:m}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Wr(o);const n=o.split(Ye),l=n[0]===""&&n.length>1?1:0;return Dt(n,l,y)},getConflictingClassGroupIds:(o,n)=>{if(n){const l=m[o],h=r[o];return l?h?Rr(h,l):l:h||Ot}return r[o]||Ot}}},Dt=(e,y,r)=>{if(e.length-y===0)return r.classGroupId;const u=e[y],i=r.nextPart.get(u);if(i){const h=Dt(e,y+1,i);if(h)return h}const o=r.validators;if(o===null)return;const n=y===0?e.join(Ye):e.slice(y).join(Ye),l=o.length;for(let h=0;h<l;h++){const p=o[h];if(p.validator(n))return p.classGroupId}},Wr=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const y=e.slice(1,-1),r=y.indexOf(":"),m=y.slice(0,r);return m?Br+m:void 0})(),$r=e=>{const{theme:y,classGroups:r}=e;return Zr(r,y)},Zr=(e,y)=>{const r=Tt();for(const m in e){const u=e[m];dt(u,r,m,y)}return r},dt=(e,y,r,m)=>{const u=e.length;for(let i=0;i<u;i++){const o=e[i];Gr(o,y,r,m)}},Gr=(e,y,r,m)=>{if(typeof e=="string"){Hr(e,y,r);return}if(typeof e=="function"){Vr(e,y,r,m);return}Kr(e,y,r,m)},Hr=(e,y,r)=>{const m=e===""?y:Lt(y,e);m.classGroupId=r},Vr=(e,y,r,m)=>{if(Jr(e)){dt(e(m),y,r,m);return}y.validators===null&&(y.validators=[]),y.validators.push(Mr(r,e))},Kr=(e,y,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(y,n),r,m)}},Lt=(e,y)=>{let r=e;const m=y.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},Jr=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,qr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let y=0,r=Object.create(null),m=Object.create(null);const u=(i,o)=>{r[i]=o,y++,y>e&&(y=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=":",Yr=[],Ft=(e,y,r,m,u)=>({modifiers:e,hasImportantModifier:y,baseClassName:r,maybePostfixModifierPosition:m,isExternal:u}),Xr=e=>{const{prefix:y,experimentalParseClassName:r}=e;let m=u=>{const i=[];let o=0,n=0,l=0,h;const p=u.length;for(let d=0;d<p;d++){const b=u[d];if(o===0&&n===0){if(b===Pt){i.push(u.slice(l,d)),l=d+1;continue}if(b==="/"){h=d;continue}}b==="["?o++:b==="]"?o--:b==="("?n++:b===")"&&n--}const v=i.length===0?u:u.slice(l);let x=v,c=!1;v.endsWith(ut)?(x=v.slice(0,-1),c=!0):v.startsWith(ut)&&(x=v.slice(1),c=!0);const g=h&&h>l?h-l:void 0;return Ft(i,c,x,g)};if(y){const u=y+Pt,i=m;m=o=>o.startsWith(u)?i(o.slice(u.length)):Ft(Yr,!1,o,void 0,!0)}if(r){const u=m;m=i=>r({className:i,parseClassName:u})}return m},Qr=e=>{const y=new Map;return e.orderSensitiveModifiers.forEach((r,m)=>{y.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=y.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}},en=e=>({cache:qr(e.cacheSize),parseClassName:Xr(e),sortModifiers:Qr(e),...Ur(e)}),tn=/\s+/,rn=(e,y)=>{const{parseClassName:r,getClassGroupId:m,getConflictingClassGroupIds:u,sortModifiers:i}=y,o=[],n=e.trim().split(tn);let l="";for(let h=n.length-1;h>=0;h-=1){const p=n[h],{isExternal:v,modifiers:x,hasImportantModifier:c,baseClassName:g,maybePostfixModifierPosition:d}=r(p);if(v){l=p+(l.length>0?" "+l:l);continue}let b=!!d,f=m(b?g.substring(0,d):g);if(!f){if(!b){l=p+(l.length>0?" "+l:l);continue}if(f=m(g),!f){l=p+(l.length>0?" "+l:l);continue}b=!1}const k=x.length===0?"":x.length===1?x[0]:i(x).join(":"),j=c?k+ut:k,N=j+f;if(o.indexOf(N)>-1)continue;o.push(N);const A=u(f,b);for(let R=0;R<A.length;++R){const C=A[R];o.push(j+C)}l=p+(l.length>0?" "+l:l)}return l},nn=(...e)=>{let y=0,r,m,u="";for(;y<e.length;)(r=e[y++])&&(m=Rt(r))&&(u&&(u+=" "),u+=m);return u},Rt=e=>{if(typeof e=="string")return e;let y,r="";for(let m=0;m<e.length;m++)e[m]&&(y=Rt(e[m]))&&(r&&(r+=" "),r+=y);return r},on=(e,...y)=>{let r,m,u,i;const o=l=>{const h=y.reduce((p,v)=>v(p),e());return r=en(h),m=r.cache.get,u=r.cache.set,i=n,n(l)},n=l=>{const h=m(l);if(h)return h;const p=rn(l,r);return u(l,p),p};return i=o,(...l)=>i(nn(...l))},an=[],ye=e=>{const y=r=>r[e]||an;return y.isThemeGetter=!0,y},Mt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Bt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sn=/^\d+\/\d+$/,ln=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cn=/\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$/,dn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,un=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Le=e=>sn.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),Ie=e=>!!e&&Number.isInteger(Number(e)),ht=e=>e.endsWith("%")&&ce(e.slice(0,-1)),Se=e=>ln.test(e),pn=()=>!0,fn=e=>cn.test(e)&&!dn.test(e),Ut=()=>!1,mn=e=>un.test(e),bn=e=>hn.test(e),gn=e=>!ne(e)&&!oe(e),vn=e=>Pe(e,Ht,Ut),ne=e=>Mt.test(e),Te=e=>Pe(e,Vt,fn),pt=e=>Pe(e,_n,ce),Wt=e=>Pe(e,Zt,Ut),xn=e=>Pe(e,Gt,bn),Xe=e=>Pe(e,Kt,mn),oe=e=>Bt.test(e),Be=e=>Fe(e,Vt),wn=e=>Fe(e,zn),$t=e=>Fe(e,Zt),yn=e=>Fe(e,Ht),kn=e=>Fe(e,Gt),Qe=e=>Fe(e,Kt,!0),Pe=(e,y,r)=>{const m=Mt.exec(e);return m?m[1]?y(m[1]):r(m[2]):!1},Fe=(e,y,r=!1)=>{const m=Bt.exec(e);return m?m[1]?y(m[1]):r:!1},Zt=e=>e==="position"||e==="percentage",Gt=e=>e==="image"||e==="url",Ht=e=>e==="length"||e==="size"||e==="bg-size",Vt=e=>e==="length",_n=e=>e==="number",zn=e=>e==="family-name",Kt=e=>e==="shadow",jn=on(()=>{const e=ye("color"),y=ye("font"),r=ye("text"),m=ye("font-weight"),u=ye("tracking"),i=ye("leading"),o=ye("breakpoint"),n=ye("container"),l=ye("spacing"),h=ye("radius"),p=ye("shadow"),v=ye("inset-shadow"),x=ye("text-shadow"),c=ye("drop-shadow"),g=ye("blur"),d=ye("perspective"),b=ye("aspect"),f=ye("ease"),k=ye("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...N(),oe,ne],R=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],D=()=>[oe,ne,l],L=()=>[Le,"full","auto",...D()],Z=()=>[Ie,"none","subgrid",oe,ne],Y=()=>["auto",{span:["full",Ie,oe,ne]},Ie,oe,ne],E=()=>[Ie,"auto",oe,ne],F=()=>["auto","min","max","fr",oe,ne],a=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],te=()=>["auto",...D()],U=()=>[Le,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],V=()=>[e,oe,ne],H=()=>[...N(),$t,Wt,{position:[oe,ne]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",yn,vn,{size:[oe,ne]}],S=()=>[ht,Be,Te],q=()=>["","none","full",h,oe,ne],J=()=>["",ce,Be,Te],ee=()=>["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=()=>[ce,ht,$t,Wt],ae=()=>["","none",g,oe,ne],se=()=>["none",ce,oe,ne],ge=()=>["none",ce,oe,ne],pe=()=>[ce,oe,ne],xe=()=>[Le,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Se],breakpoint:[Se],color:[pn],container:[Se],"drop-shadow":[Se],ease:["in","out","in-out"],font:[gn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Se],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Se],shadow:[Se],spacing:["px",ce],text:[Se],"text-shadow":[Se],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Le,ne,oe,b]}],container:["container"],columns:[{columns:[ce,ne,oe,n]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"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:A()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[Ie,"auto",oe,ne]}],basis:[{basis:[Le,"full","auto",n,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,Le,"auto","initial","none",ne]}],grow:[{grow:["",ce,oe,ne]}],shrink:[{shrink:["",ce,oe,ne]}],order:[{order:[Ie,"first","last","none",oe,ne]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...a(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...a()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":a()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],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,Be,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:[wn,ne,y]}],"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":[ce,"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:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",oe,Te]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[ce,"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:H()}],"bg-repeat":[{bg:Q()}],"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]},kn,xn]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:S()}],"gradient-via-pos":[{via:S()}],"gradient-to-pos":[{to:S()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,oe,ne]}],"outline-w":[{outline:["",ce,Be,Te]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",p,Qe,Xe]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",v,Qe,Xe]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[ce,Te]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",x,Qe,Xe]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[ce,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":[ce]}],"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":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"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":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"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":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"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":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"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":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"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":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"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":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"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":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"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":N()}],"mask-image-conic-pos":[{"mask-conic":[ce]}],"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":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,ne]}],filter:[{filter:["","none",oe,ne]}],blur:[{blur:ae()}],brightness:[{brightness:[ce,oe,ne]}],contrast:[{contrast:[ce,oe,ne]}],"drop-shadow":[{"drop-shadow":["","none",c,Qe,Xe]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",ce,oe,ne]}],"hue-rotate":[{"hue-rotate":[ce,oe,ne]}],invert:[{invert:["",ce,oe,ne]}],saturate:[{saturate:[ce,oe,ne]}],sepia:[{sepia:["",ce,oe,ne]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,ne]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[ce,oe,ne]}],"backdrop-contrast":[{"backdrop-contrast":[ce,oe,ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ce,oe,ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ce,oe,ne]}],"backdrop-invert":[{"backdrop-invert":["",ce,oe,ne]}],"backdrop-opacity":[{"backdrop-opacity":[ce,oe,ne]}],"backdrop-saturate":[{"backdrop-saturate":[ce,oe,ne]}],"backdrop-sepia":[{"backdrop-sepia":["",ce,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:[ce,"initial",oe,ne]}],ease:[{ease:["linear","initial",f,oe,ne]}],delay:[{delay:[ce,oe,ne]}],animate:[{animate:["none",k,oe,ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[d,oe,ne]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[oe,ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:xe()}],"translate-x":[{"translate-x":xe()}],"translate-y":[{"translate-y":xe()}],"translate-z":[{"translate-z":xe()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"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",...V()]}],"stroke-w":[{stroke:[ce,Be,Te,pt]}],stroke:[{stroke:["none",...V()]}],"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 jn(Fr(e))}var et={exports:{}},Ue={};/**
11
+ */var Et;function Tr(){return Et||(Et=1,(function(e,k){(function(r){e.exports=r()})(function(){return(function r(m,u,i){function o(h,p){if(!u[h]){if(!m[h]){var v=typeof Je=="function"&&Je;if(!p&&v)return v(h,!0);if(n)return n(h,!0);var x=new Error("Cannot find module '"+h+"'");throw x.code="MODULE_NOT_FOUND",x}var c=u[h]={exports:{}};m[h][0].call(c.exports,function(g){var d=m[h][1][g];return o(d||g)},c,c.exports,r,m,u,i)}return u[h].exports}for(var n=typeof Je=="function"&&Je,l=0;l<i.length;l++)o(i[l]);return o})({1:[function(r,m,u){var i=r("./utils"),o=r("./support"),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";u.encode=function(l){for(var h,p,v,x,c,g,d,b=[],f=0,y=l.length,j=y,N=i.getTypeOf(l)!=="string";f<l.length;)j=y-f,v=N?(h=l[f++],p=f<y?l[f++]:0,f<y?l[f++]:0):(h=l.charCodeAt(f++),p=f<y?l.charCodeAt(f++):0,f<y?l.charCodeAt(f++):0),x=h>>2,c=(3&h)<<4|p>>4,g=1<j?(15&p)<<2|v>>6:64,d=2<j?63&v:64,b.push(n.charAt(x)+n.charAt(c)+n.charAt(g)+n.charAt(d));return b.join("")},u.decode=function(l){var h,p,v,x,c,g,d=0,b=0,f="data:";if(l.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");var y,j=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===n.charAt(64)&&j--,l.charAt(l.length-2)===n.charAt(64)&&j--,j%1!=0)throw new Error("Invalid base64 input, bad content length.");for(y=o.uint8array?new Uint8Array(0|j):new Array(0|j);d<l.length;)h=n.indexOf(l.charAt(d++))<<2|(x=n.indexOf(l.charAt(d++)))>>4,p=(15&x)<<4|(c=n.indexOf(l.charAt(d++)))>>2,v=(3&c)<<6|(g=n.indexOf(l.charAt(d++))),y[b++]=h,c!==64&&(y[b++]=p),g!==64&&(y[b++]=v);return y}},{"./support":30,"./utils":32}],2:[function(r,m,u){var i=r("./external"),o=r("./stream/DataWorker"),n=r("./stream/Crc32Probe"),l=r("./stream/DataLengthProbe");function h(p,v,x,c,g){this.compressedSize=p,this.uncompressedSize=v,this.crc32=x,this.compression=c,this.compressedContent=g}h.prototype={getContentWorker:function(){var p=new o(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),v=this;return p.on("end",function(){if(this.streamInfo.data_length!==v.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),p},getCompressedWorker:function(){return new o(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},h.createWorkerFrom=function(p,v,x){return p.pipe(new n).pipe(new l("uncompressedSize")).pipe(v.compressWorker(x)).pipe(new l("compressedSize")).withStreamInfo("compression",v)},m.exports=h},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,m,u){var i=r("./stream/GenericWorker");u.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},u.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,m,u){var i=r("./utils"),o=(function(){for(var n,l=[],h=0;h<256;h++){n=h;for(var p=0;p<8;p++)n=1&n?3988292384^n>>>1:n>>>1;l[h]=n}return l})();m.exports=function(n,l){return n!==void 0&&n.length?i.getTypeOf(n)!=="string"?(function(h,p,v,x){var c=o,g=x+v;h^=-1;for(var d=x;d<g;d++)h=h>>>8^c[255&(h^p[d])];return-1^h})(0|l,n,n.length,0):(function(h,p,v,x){var c=o,g=x+v;h^=-1;for(var d=x;d<g;d++)h=h>>>8^c[255&(h^p.charCodeAt(d))];return-1^h})(0|l,n,n.length,0):0}},{"./utils":32}],5:[function(r,m,u){u.base64=!1,u.binary=!1,u.dir=!1,u.createFolders=!0,u.date=null,u.compression=null,u.compressionOptions=null,u.comment=null,u.unixPermissions=null,u.dosPermissions=null},{}],6:[function(r,m,u){var i=null;i=typeof Promise<"u"?Promise:r("lie"),m.exports={Promise:i}},{lie:37}],7:[function(r,m,u){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=r("pako"),n=r("./utils"),l=r("./stream/GenericWorker"),h=i?"uint8array":"array";function p(v,x){l.call(this,"FlateWorker/"+v),this._pako=null,this._pakoAction=v,this._pakoOptions=x,this.meta={}}u.magic="\b\0",n.inherits(p,l),p.prototype.processChunk=function(v){this.meta=v.meta,this._pako===null&&this._createPako(),this._pako.push(n.transformTo(h,v.data),!1)},p.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},p.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},p.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var v=this;this._pako.onData=function(x){v.push({data:x,meta:v.meta})}},u.compressWorker=function(v){return new p("Deflate",v)},u.uncompressWorker=function(){return new p("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,m,u){function i(c,g){var d,b="";for(d=0;d<g;d++)b+=String.fromCharCode(255&c),c>>>=8;return b}function o(c,g,d,b,f,y){var j,N,A=c.file,R=c.compression,C=y!==h.utf8encode,D=n.transformTo("string",y(A.name)),L=n.transformTo("string",h.utf8encode(A.name)),Z=A.comment,Y=n.transformTo("string",y(Z)),E=n.transformTo("string",h.utf8encode(Z)),F=L.length!==A.name.length,a=E.length!==Z.length,B="",te="",U="",V=A.dir,H=A.date,Q={crc32:0,compressedSize:0,uncompressedSize:0};g&&!d||(Q.crc32=c.crc32,Q.compressedSize=c.compressedSize,Q.uncompressedSize=c.uncompressedSize);var z=0;g&&(z|=8),C||!F&&!a||(z|=2048);var S=0,q=0;V&&(S|=16),f==="UNIX"?(q=798,S|=(function(ee,ue){var ie=ee;return ee||(ie=ue?16893:33204),(65535&ie)<<16})(A.unixPermissions,V)):(q=20,S|=(function(ee){return 63&(ee||0)})(A.dosPermissions)),j=H.getUTCHours(),j<<=6,j|=H.getUTCMinutes(),j<<=5,j|=H.getUTCSeconds()/2,N=H.getUTCFullYear()-1980,N<<=4,N|=H.getUTCMonth()+1,N<<=5,N|=H.getUTCDate(),F&&(te=i(1,1)+i(p(D),4)+L,B+="up"+i(te.length,2)+te),a&&(U=i(1,1)+i(p(Y),4)+E,B+="uc"+i(U.length,2)+U);var J="";return J+=`
12
+ \0`,J+=i(z,2),J+=R.magic,J+=i(j,2),J+=i(N,2),J+=i(Q.crc32,4),J+=i(Q.compressedSize,4),J+=i(Q.uncompressedSize,4),J+=i(D.length,2),J+=i(B.length,2),{fileRecord:v.LOCAL_FILE_HEADER+J+D+B,dirRecord:v.CENTRAL_FILE_HEADER+i(q,2)+J+i(Y.length,2)+"\0\0\0\0"+i(S,4)+i(b,4)+D+B+Y}}var n=r("../utils"),l=r("../stream/GenericWorker"),h=r("../utf8"),p=r("../crc32"),v=r("../signature");function x(c,g,d,b){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=d,this.encodeFileName=b,this.streamFiles=c,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(x,l),x.prototype.push=function(c){var g=c.meta.percent||0,d=this.entriesCount,b=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?(g+100*(d-b-1))/d:100}}))},x.prototype.openedSource=function(c){this.currentSourceOffset=this.bytesWritten,this.currentFile=c.file.name;var g=this.streamFiles&&!c.file.dir;if(g){var d=o(c,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:d.fileRecord,meta:{percent:0}})}else this.accumulate=!0},x.prototype.closedSource=function(c){this.accumulate=!1;var g=this.streamFiles&&!c.file.dir,d=o(c,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(d.dirRecord),g)this.push({data:(function(b){return v.DATA_DESCRIPTOR+i(b.crc32,4)+i(b.compressedSize,4)+i(b.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},x.prototype.flush=function(){for(var c=this.bytesWritten,g=0;g<this.dirRecords.length;g++)this.push({data:this.dirRecords[g],meta:{percent:100}});var d=this.bytesWritten-c,b=(function(f,y,j,N,A){var R=n.transformTo("string",A(N));return v.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(f,2)+i(f,2)+i(y,4)+i(j,4)+i(R.length,2)+R})(this.dirRecords.length,d,c,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(c){this._sources.push(c);var g=this;return c.on("data",function(d){g.processChunk(d)}),c.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),c.on("error",function(d){g.error(d)}),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(c){var g=this._sources;if(!l.prototype.error.call(this,c))return!1;for(var d=0;d<g.length;d++)try{g[d].error(c)}catch{}return!0},x.prototype.lock=function(){l.prototype.lock.call(this);for(var c=this._sources,g=0;g<c.length;g++)c[g].lock()},m.exports=x},{"../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 p=new o(l.streamFiles,h,l.platform,l.encodeFileName),v=0;try{n.forEach(function(x,c){v++;var g=(function(y,j){var N=y||j,A=i[N];if(!A)throw new Error(N+" is not a valid compression method !");return A})(c.options.compression,l.compression),d=c.options.compressionOptions||l.compressionOptions||{},b=c.dir,f=c.date;c._compressWorker(g,d).withStreamInfo("file",{name:x,dir:b,date:f,comment:c.comment||"",unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions}).pipe(p)}),p.entriesCount=v}catch(x){p.error(x)}return p}},{"../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"),p=r("./nodejsUtils");function v(x){return new o.Promise(function(c,g){var d=x.decompressed.getContentWorker().pipe(new h);d.on("error",function(b){g(b)}).on("end",function(){d.streamInfo.crc32!==x.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):c()}).resume()})}m.exports=function(x,c){var g=this;return c=i.extend(c||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),p.isNode&&p.isStream(x)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",x,!0,c.optimizedBinaryString,c.base64).then(function(d){var b=new l(c);return b.load(d),b}).then(function(d){var b=[o.Promise.resolve(d)],f=d.files;if(c.checkCRC32)for(var y=0;y<f.length;y++)b.push(v(f[y]));return o.Promise.all(b)}).then(function(d){for(var b=d.shift(),f=b.files,y=0;y<f.length;y++){var j=f[y],N=j.fileNameStr,A=i.resolve(j.fileNameStr);g.file(A,j.decompressed,{binary:!0,optimizedBinaryString:!0,date:j.date,dir:j.dir,comment:j.fileCommentStr.length?j.fileCommentStr:null,unixPermissions:j.unixPermissions,dosPermissions:j.dosPermissions,createFolders:c.createFolders}),j.dir||(g.file(A).unsafeOriginalName=N)}return b.zipComment.length&&(g.comment=b.zipComment),g})}},{"./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(p){h.push({data:p,meta:{percent:0}})}).on("error",function(p){h.isPaused?this.generatedError=p:h.error(p)}).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 p=this;n.on("data",function(v,x){p.push(v)||p._helper.pause(),h&&h(x)}).on("error",function(v){p.emit("error",v)}).on("end",function(){p.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(A,R,C){var D,L=n.getTypeOf(R),Z=n.extend(C||{},p);Z.date=Z.date||new Date,Z.compression!==null&&(Z.compression=Z.compression.toUpperCase()),typeof Z.unixPermissions=="string"&&(Z.unixPermissions=parseInt(Z.unixPermissions,8)),Z.unixPermissions&&16384&Z.unixPermissions&&(Z.dir=!0),Z.dosPermissions&&16&Z.dosPermissions&&(Z.dir=!0),Z.dir&&(A=f(A)),Z.createFolders&&(D=b(A))&&y.call(this,D,!0);var Y=L==="string"&&Z.binary===!1&&Z.base64===!1;C&&C.binary!==void 0||(Z.binary=!Y),(R instanceof v&&R.uncompressedSize===0||Z.dir||!R||R.length===0)&&(Z.base64=!1,Z.binary=!0,R="",Z.compression="STORE",L="string");var E=null;E=R instanceof v||R instanceof l?R:g.isNode&&g.isStream(R)?new d(A,R):n.prepareContent(A,R,Z.binary,Z.optimizedBinaryString,Z.base64);var F=new x(A,E,Z);this.files[A]=F}var o=r("./utf8"),n=r("./utils"),l=r("./stream/GenericWorker"),h=r("./stream/StreamHelper"),p=r("./defaults"),v=r("./compressedObject"),x=r("./zipObject"),c=r("./generate"),g=r("./nodejsUtils"),d=r("./nodejs/NodejsStreamInputAdapter"),b=function(A){A.slice(-1)==="/"&&(A=A.substring(0,A.length-1));var R=A.lastIndexOf("/");return 0<R?A.substring(0,R):""},f=function(A){return A.slice(-1)!=="/"&&(A+="/"),A},y=function(A,R){return R=R!==void 0?R:p.createFolders,A=f(A),this.files[A]||i.call(this,A,null,{dir:!0,createFolders:R}),this.files[A]};function j(A){return Object.prototype.toString.call(A)==="[object RegExp]"}var N={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(A){var R,C,D;for(R in this.files)D=this.files[R],(C=R.slice(this.root.length,R.length))&&R.slice(0,this.root.length)===this.root&&A(C,D)},filter:function(A){var R=[];return this.forEach(function(C,D){A(C,D)&&R.push(D)}),R},file:function(A,R,C){if(arguments.length!==1)return A=this.root+A,i.call(this,A,R,C),this;if(j(A)){var D=A;return this.filter(function(Z,Y){return!Y.dir&&D.test(Z)})}var L=this.files[this.root+A];return L&&!L.dir?L:null},folder:function(A){if(!A)return this;if(j(A))return this.filter(function(L,Z){return Z.dir&&A.test(L)});var R=this.root+A,C=y.call(this,R),D=this.clone();return D.root=C.name,D},remove:function(A){A=this.root+A;var R=this.files[A];if(R||(A.slice(-1)!=="/"&&(A+="/"),R=this.files[A]),R&&!R.dir)delete this.files[A];else for(var C=this.filter(function(L,Z){return Z.name.slice(0,A.length)===A}),D=0;D<C.length;D++)delete this.files[C[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(A){var R,C={};try{if((C=n.extend(A||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=C.type.toLowerCase(),C.compression=C.compression.toUpperCase(),C.type==="binarystring"&&(C.type="string"),!C.type)throw new Error("No output type specified.");n.checkSupport(C.type),C.platform!=="darwin"&&C.platform!=="freebsd"&&C.platform!=="linux"&&C.platform!=="sunos"||(C.platform="UNIX"),C.platform==="win32"&&(C.platform="DOS");var D=C.comment||this.comment||"";R=c.generateWorker(this,C,D)}catch(L){(R=new l("error")).error(L)}return new h(R,C.type||"string",C.mimeType)},generateAsync:function(A,R){return this.generateInternalStream(A).accumulate(R)},generateNodeStream:function(A,R){return(A=A||{}).type||(A.type="nodebuffer"),this.generateInternalStream(A).toNodejsStream(R)}};m.exports=N},{"./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),p=n.charCodeAt(2),v=n.charCodeAt(3),x=this.length-4;0<=x;--x)if(this.data[x]===l&&this.data[x+1]===h&&this.data[x+2]===p&&this.data[x+3]===v)return x-this.zero;return-1},o.prototype.readAndCheckSignature=function(n){var l=n.charCodeAt(0),h=n.charCodeAt(1),p=n.charCodeAt(2),v=n.charCodeAt(3),x=this.readData(4);return l===x[0]&&h===x[1]&&p===x[2]&&v===x[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"),p=r("./Uint8ArrayReader");m.exports=function(v){var x=i.getTypeOf(v);return i.checkSupport(x),x!=="string"||o.uint8array?x==="nodebuffer"?new h(v):o.uint8array?new p(i.transformTo("uint8array",v)):new n(i.transformTo("array",v)):new l(v)}},{"../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(p){h.dataIsReady=!0,h.data=p,h.max=p&&p.length||0,h.type=i.getTypeOf(p),h.isPaused||h._tickAndRepeat()},function(p){h.error(p)})}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"),p=r("../external"),v=null;if(h.nodestream)try{v=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function x(g,d){return new p.Promise(function(b,f){var y=[],j=g._internalType,N=g._outputType,A=g._mimeType;g.on("data",function(R,C){y.push(R),d&&d(C)}).on("error",function(R){y=[],f(R)}).on("end",function(){try{var R=(function(C,D,L){switch(C){case"blob":return i.newBlob(i.transformTo("arraybuffer",D),L);case"base64":return l.encode(D);default:return i.transformTo(C,D)}})(N,(function(C,D){var L,Z=0,Y=null,E=0;for(L=0;L<D.length;L++)E+=D[L].length;switch(C){case"string":return D.join("");case"array":return Array.prototype.concat.apply([],D);case"uint8array":for(Y=new Uint8Array(E),L=0;L<D.length;L++)Y.set(D[L],Z),Z+=D[L].length;return Y;case"nodebuffer":return Buffer.concat(D);default:throw new Error("concat : unsupported type '"+C+"'")}})(j,y),A);b(R)}catch(C){f(C)}y=[]}).resume()})}function c(g,d,b){var f=d;switch(d){case"blob":case"arraybuffer":f="uint8array";break;case"base64":f="string"}try{this._internalType=f,this._outputType=d,this._mimeType=b,i.checkSupport(f),this._worker=g.pipe(new o(f)),g.lock()}catch(y){this._worker=new n("error"),this._worker.error(y)}}c.prototype={accumulate:function(g){return x(this,g)},on:function(g,d){var b=this;return g==="data"?this._worker.on(g,function(f){d.call(b,f.data,f.meta)}):this._worker.on(g,function(){i.delay(d,arguments,b)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){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"},g)}},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),p=0;p<256;p++)h[p]=252<=p?6:248<=p?5:240<=p?4:224<=p?3:192<=p?2:1;h[254]=h[254]=1;function v(){l.call(this,"utf-8 decode"),this.leftOver=null}function x(){l.call(this,"utf-8 encode")}u.utf8encode=function(c){return o.nodebuffer?n.newBufferFrom(c,"utf-8"):(function(g){var d,b,f,y,j,N=g.length,A=0;for(y=0;y<N;y++)(64512&(b=g.charCodeAt(y)))==55296&&y+1<N&&(64512&(f=g.charCodeAt(y+1)))==56320&&(b=65536+(b-55296<<10)+(f-56320),y++),A+=b<128?1:b<2048?2:b<65536?3:4;for(d=o.uint8array?new Uint8Array(A):new Array(A),y=j=0;j<A;y++)(64512&(b=g.charCodeAt(y)))==55296&&y+1<N&&(64512&(f=g.charCodeAt(y+1)))==56320&&(b=65536+(b-55296<<10)+(f-56320),y++),b<128?d[j++]=b:(b<2048?d[j++]=192|b>>>6:(b<65536?d[j++]=224|b>>>12:(d[j++]=240|b>>>18,d[j++]=128|b>>>12&63),d[j++]=128|b>>>6&63),d[j++]=128|63&b);return d})(c)},u.utf8decode=function(c){return o.nodebuffer?i.transformTo("nodebuffer",c).toString("utf-8"):(function(g){var d,b,f,y,j=g.length,N=new Array(2*j);for(d=b=0;d<j;)if((f=g[d++])<128)N[b++]=f;else if(4<(y=h[f]))N[b++]=65533,d+=y-1;else{for(f&=y===2?31:y===3?15:7;1<y&&d<j;)f=f<<6|63&g[d++],y--;1<y?N[b++]=65533:f<65536?N[b++]=f:(f-=65536,N[b++]=55296|f>>10&1023,N[b++]=56320|1023&f)}return N.length!==b&&(N.subarray?N=N.subarray(0,b):N.length=b),i.applyFromCharCode(N)})(c=i.transformTo(o.uint8array?"uint8array":"array",c))},i.inherits(v,l),v.prototype.processChunk=function(c){var g=i.transformTo(o.uint8array?"uint8array":"array",c.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var d=g;(g=new Uint8Array(d.length+this.leftOver.length)).set(this.leftOver,0),g.set(d,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var b=(function(y,j){var N;for((j=j||y.length)>y.length&&(j=y.length),N=j-1;0<=N&&(192&y[N])==128;)N--;return N<0||N===0?j:N+h[y[N]]>j?N:j})(g),f=g;b!==g.length&&(o.uint8array?(f=g.subarray(0,b),this.leftOver=g.subarray(b,g.length)):(f=g.slice(0,b),this.leftOver=g.slice(b,g.length))),this.push({data:u.utf8decode(f),meta:c.meta})},v.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=v,i.inherits(x,l),x.prototype.processChunk=function(c){this.push({data:u.utf8encode(c.data),meta:c.meta})},u.Utf8EncodeWorker=x},{"./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 p(d,b){for(var f=0;f<d.length;++f)b[f]=255&d.charCodeAt(f);return b}r("setimmediate"),u.newBlob=function(d,b){u.checkSupport("blob");try{return new Blob([d],{type:b})}catch{try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return f.append(d),f.getBlob(b)}catch{throw new Error("Bug : can't construct the Blob.")}}};var v={stringifyByChunk:function(d,b,f){var y=[],j=0,N=d.length;if(N<=f)return String.fromCharCode.apply(null,d);for(;j<N;)b==="array"||b==="nodebuffer"?y.push(String.fromCharCode.apply(null,d.slice(j,Math.min(j+f,N)))):y.push(String.fromCharCode.apply(null,d.subarray(j,Math.min(j+f,N)))),j+=f;return y.join("")},stringifyByChar:function(d){for(var b="",f=0;f<d.length;f++)b+=String.fromCharCode(d[f]);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,n.allocBuffer(1)).length===1}catch{return!1}})()}};function x(d){var b=65536,f=u.getTypeOf(d),y=!0;if(f==="uint8array"?y=v.applyCanBeUsed.uint8array:f==="nodebuffer"&&(y=v.applyCanBeUsed.nodebuffer),y)for(;1<b;)try{return v.stringifyByChunk(d,f,b)}catch{b=Math.floor(b/2)}return v.stringifyByChar(d)}function c(d,b){for(var f=0;f<d.length;f++)b[f]=d[f];return b}u.applyFromCharCode=x;var g={};g.string={string:h,array:function(d){return p(d,new Array(d.length))},arraybuffer:function(d){return g.string.uint8array(d).buffer},uint8array:function(d){return p(d,new Uint8Array(d.length))},nodebuffer:function(d){return p(d,n.allocBuffer(d.length))}},g.array={string:x,array:h,arraybuffer:function(d){return new Uint8Array(d).buffer},uint8array:function(d){return new Uint8Array(d)},nodebuffer:function(d){return n.newBufferFrom(d)}},g.arraybuffer={string:function(d){return x(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))}},g.uint8array={string:x,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)}},g.nodebuffer={string:x,array:function(d){return c(d,new Array(d.length))},arraybuffer:function(d){return g.nodebuffer.uint8array(d).buffer},uint8array:function(d){return c(d,new Uint8Array(d.length))},nodebuffer:h},u.transformTo=function(d,b){if(b=b||"",!d)return b;u.checkSupport(d);var f=u.getTypeOf(b);return g[f][d](b)},u.resolve=function(d){for(var b=d.split("/"),f=[],y=0;y<b.length;y++){var j=b[y];j==="."||j===""&&y!==0&&y!==b.length-1||(j===".."?f.pop():f.push(j))}return f.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 b,f,y="";for(f=0;f<(d||"").length;f++)y+="\\x"+((b=d.charCodeAt(f))<16?"0":"")+b.toString(16).toUpperCase();return y},u.delay=function(d,b,f){setImmediate(function(){d.apply(f||null,b||[])})},u.inherits=function(d,b){function f(){}f.prototype=b.prototype,d.prototype=new f},u.extend=function(){var d,b,f={};for(d=0;d<arguments.length;d++)for(b in arguments[d])Object.prototype.hasOwnProperty.call(arguments[d],b)&&f[b]===void 0&&(f[b]=arguments[d][b]);return f},u.prepareContent=function(d,b,f,y,j){return l.Promise.resolve(b).then(function(N){return i.blob&&(N instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(N))!==-1)&&typeof FileReader<"u"?new l.Promise(function(A,R){var C=new FileReader;C.onload=function(D){A(D.target.result)},C.onerror=function(D){R(D.target.error)},C.readAsArrayBuffer(N)}):N}).then(function(N){var A=u.getTypeOf(N);return A?(A==="arraybuffer"?N=u.transformTo("uint8array",N):A==="string"&&(j?N=o.decode(N):f&&y!==!0&&(N=(function(R){return p(R,i.uint8array?new Uint8Array(R.length):new Array(R.length))})(N))),N):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 p(v){this.files=[],this.loadOptions=v}p.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 ("+o.pretty(x)+", expected "+o.pretty(v)+")")}},isSignature:function(v,x){var c=this.reader.index;this.reader.setIndex(v);var g=this.reader.readString(4)===x;return this.reader.setIndex(c),g},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=h.uint8array?"uint8array":"array",c=o.transformTo(x,v);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 v,x,c,g=this.zip64EndOfCentralSize-44;0<g;)v=this.reader.readInt(2),x=this.reader.readInt(4),c=this.reader.readData(x),this.zip64ExtensibleData[v]={id:v,length:x,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 v,x;for(v=0;v<this.files.length;v++)x=this.files[v],this.reader.setIndex(x.localHeaderOffset),this.checkSignature(n.LOCAL_FILE_HEADER),x.readLocalPart(this.reader),x.handleUTF8(),x.processAttributes()},readCentralDir:function(){var v;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(n.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(n.CENTRAL_DIRECTORY_END);if(v<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(v);var x=v;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,(v=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(v),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 g=x-c;if(0<g)this.isSignature(x,n.CENTRAL_FILE_HEADER)||(this.reader.zero=g);else if(g<0)throw new Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(v){this.reader=i(v)},load:function(v){this.prepareReader(v),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},m.exports=p},{"./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"),p=r("./compressions"),v=r("./support");function x(c,g){this.options=c,this.loadOptions=g}x.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(c){var g,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((g=(function(b){for(var f in p)if(Object.prototype.hasOwnProperty.call(p,f)&&p[f].magic===b)return p[f];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,g,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 g=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(g),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 g,d,b,f=c.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});c.index+4<f;)g=c.readInt(2),d=c.readInt(2),b=c.readData(d),this.extraFields[g]={id:g,length:d,value:b};c.setIndex(f)},handleUTF8:function(){var c=v.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=h.utf8decode(this.fileName),this.fileCommentStr=h.utf8decode(this.fileComment);else{var g=this.findExtraFieldUnicodePath();if(g!==null)this.fileNameStr=g;else{var d=o.transformTo(c,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(d)}var b=this.findExtraFieldUnicodeComment();if(b!==null)this.fileCommentStr=b;else{var f=o.transformTo(c,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(f)}}},findExtraFieldUnicodePath:function(){var c=this.extraFields[28789];if(c){var g=i(c.value);return g.readInt(1)!==1||l(this.fileName)!==g.readInt(4)?null:h.utf8decode(g.readData(c.length-5))}return null},findExtraFieldUnicodeComment:function(){var c=this.extraFields[25461];if(c){var g=i(c.value);return g.readInt(1)!==1||l(this.fileComment)!==g.readInt(4)?null:h.utf8decode(g.readData(c.length-5))}return null}},m.exports=x},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,m,u){function i(g,d,b){this.name=g,this.dir=b.dir,this.date=b.date,this.comment=b.comment,this.unixPermissions=b.unixPermissions,this.dosPermissions=b.dosPermissions,this._data=d,this._dataBinary=b.binary,this.options={compression:b.compression,compressionOptions:b.compressionOptions}}var o=r("./stream/StreamHelper"),n=r("./stream/DataWorker"),l=r("./utf8"),h=r("./compressedObject"),p=r("./stream/GenericWorker");i.prototype={internalStream:function(g){var d=null,b="string";try{if(!g)throw new Error("No output type specified.");var f=(b=g.toLowerCase())==="string"||b==="text";b!=="binarystring"&&b!=="text"||(b="string"),d=this._decompressWorker();var y=!this._dataBinary;y&&!f&&(d=d.pipe(new l.Utf8EncodeWorker)),!y&&f&&(d=d.pipe(new l.Utf8DecodeWorker))}catch(j){(d=new p("error")).error(j)}return new o(d,b,"")},async:function(g,d){return this.internalStream(g).accumulate(d)},nodeStream:function(g,d){return this.internalStream(g||"nodebuffer").toNodejsStream(d)},_compressWorker:function(g,d){if(this._data instanceof h&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var b=this._decompressWorker();return this._dataBinary||(b=b.pipe(new l.Utf8EncodeWorker)),h.createWorkerFrom(b,g,d)},_decompressWorker:function(){return this._data instanceof h?this._data.getContentWorker():this._data instanceof p?this._data:new n(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.")},c=0;c<v.length;c++)i.prototype[v[c]]=x;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,p=new l(g),v=i.document.createTextNode("");p.observe(v,{characterData:!0}),o=function(){v.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(){g(),d.onreadystatechange=null,d.parentNode.removeChild(d),d=null},i.document.documentElement.appendChild(d)}:function(){setTimeout(g,0)};else{var x=new i.MessageChannel;x.port1.onmessage=g,o=function(){x.port2.postMessage(0)}}var c=[];function g(){var d,b;n=!0;for(var f=c.length;f;){for(b=c,c=[],d=-1;++d<f;)b[d]();f=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"],p=["PENDING"];function v(f){if(typeof f!="function")throw new TypeError("resolver must be a function");this.state=p,this.queue=[],this.outcome=void 0,f!==o&&d(this,f)}function x(f,y,j){this.promise=f,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof j=="function"&&(this.onRejected=j,this.callRejected=this.otherCallRejected)}function c(f,y,j){i(function(){var N;try{N=y(j)}catch(A){return n.reject(f,A)}N===f?n.reject(f,new TypeError("Cannot resolve promise with itself")):n.resolve(f,N)})}function g(f){var y=f&&f.then;if(f&&(typeof f=="object"||typeof f=="function")&&typeof y=="function")return function(){y.apply(f,arguments)}}function d(f,y){var j=!1;function N(C){j||(j=!0,n.reject(f,C))}function A(C){j||(j=!0,n.resolve(f,C))}var R=b(function(){y(A,N)});R.status==="error"&&N(R.value)}function b(f,y){var j={};try{j.value=f(y),j.status="success"}catch(N){j.status="error",j.value=N}return j}(m.exports=v).prototype.finally=function(f){if(typeof f!="function")return this;var y=this.constructor;return this.then(function(j){return y.resolve(f()).then(function(){return j})},function(j){return y.resolve(f()).then(function(){throw j})})},v.prototype.catch=function(f){return this.then(null,f)},v.prototype.then=function(f,y){if(typeof f!="function"&&this.state===h||typeof y!="function"&&this.state===l)return this;var j=new this.constructor(o);return this.state!==p?c(j,this.state===h?f:y,this.outcome):this.queue.push(new x(j,f,y)),j},x.prototype.callFulfilled=function(f){n.resolve(this.promise,f)},x.prototype.otherCallFulfilled=function(f){c(this.promise,this.onFulfilled,f)},x.prototype.callRejected=function(f){n.reject(this.promise,f)},x.prototype.otherCallRejected=function(f){c(this.promise,this.onRejected,f)},n.resolve=function(f,y){var j=b(g,y);if(j.status==="error")return n.reject(f,j.value);var N=j.value;if(N)d(f,N);else{f.state=h,f.outcome=y;for(var A=-1,R=f.queue.length;++A<R;)f.queue[A].callFulfilled(y)}return f},n.reject=function(f,y){f.state=l,f.outcome=y;for(var j=-1,N=f.queue.length;++j<N;)f.queue[j].callRejected(y);return f},v.resolve=function(f){return f instanceof this?f:n.resolve(new this(o),f)},v.reject=function(f){var y=new this(o);return n.reject(y,f)},v.all=function(f){var y=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var j=f.length,N=!1;if(!j)return this.resolve([]);for(var A=new Array(j),R=0,C=-1,D=new this(o);++C<j;)L(f[C],C);return D;function L(Z,Y){y.resolve(Z).then(function(E){A[Y]=E,++R!==j||N||(N=!0,n.resolve(D,A))},function(E){N||(N=!0,n.reject(D,E))})}},v.race=function(f){var y=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var j=f.length,N=!1;if(!j)return this.resolve([]);for(var A=-1,R=new this(o);++A<j;)C=f[A],y.resolve(C).then(function(D){N||(N=!0,n.resolve(R,D))},function(D){N||(N=!0,n.reject(R,D))});var C;return R}},{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"),p=Object.prototype.toString,v=0,x=-1,c=0,g=8;function d(f){if(!(this instanceof d))return new d(f);this.options=o.assign({level:x,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},f||{});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 h,this.strm.avail_out=0;var j=i.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(j!==v)throw new Error(l[j]);if(y.header&&i.deflateSetHeader(this.strm,y.header),y.dictionary){var N;if(N=typeof y.dictionary=="string"?n.string2buf(y.dictionary):p.call(y.dictionary)==="[object ArrayBuffer]"?new Uint8Array(y.dictionary):y.dictionary,(j=i.deflateSetDictionary(this.strm,N))!==v)throw new Error(l[j]);this._dict_set=!0}}function b(f,y){var j=new d(y);if(j.push(f,!0),j.err)throw j.msg||l[j.err];return j.result}d.prototype.push=function(f,y){var j,N,A=this.strm,R=this.options.chunkSize;if(this.ended)return!1;N=y===~~y?y:y===!0?4:0,typeof f=="string"?A.input=n.string2buf(f):p.call(f)==="[object ArrayBuffer]"?A.input=new Uint8Array(f):A.input=f,A.next_in=0,A.avail_in=A.input.length;do{if(A.avail_out===0&&(A.output=new o.Buf8(R),A.next_out=0,A.avail_out=R),(j=i.deflate(A,N))!==1&&j!==v)return this.onEnd(j),!(this.ended=!0);A.avail_out!==0&&(A.avail_in!==0||N!==4&&N!==2)||(this.options.to==="string"?this.onData(n.buf2binstring(o.shrinkBuf(A.output,A.next_out))):this.onData(o.shrinkBuf(A.output,A.next_out)))}while((0<A.avail_in||A.avail_out===0)&&j!==1);return N===4?(j=i.deflateEnd(this.strm),this.onEnd(j),this.ended=!0,j===v):N!==2||(this.onEnd(v),!(A.avail_out=0))},d.prototype.onData=function(f){this.chunks.push(f)},d.prototype.onEnd=function(f){f===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},u.Deflate=d,u.deflate=b,u.deflateRaw=function(f,y){return(y=y||{}).raw=!0,b(f,y)},u.gzip=function(f,y){return(y=y||{}).gzip=!0,b(f,y)}},{"./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"),p=r("./zlib/zstream"),v=r("./zlib/gzheader"),x=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 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)||d&&d.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 p,this.strm.avail_out=0;var f=i.inflateInit2(this.strm,b.windowBits);if(f!==l.Z_OK)throw new Error(h[f]);this.header=new v,i.inflateGetHeader(this.strm,this.header)}function g(d,b){var f=new c(b);if(f.push(d,!0),f.err)throw f.msg||h[f.err];return f.result}c.prototype.push=function(d,b){var f,y,j,N,A,R,C=this.strm,D=this.options.chunkSize,L=this.options.dictionary,Z=!1;if(this.ended)return!1;y=b===~~b?b:b===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof d=="string"?C.input=n.binstring2buf(d):x.call(d)==="[object ArrayBuffer]"?C.input=new Uint8Array(d):C.input=d,C.next_in=0,C.avail_in=C.input.length;do{if(C.avail_out===0&&(C.output=new o.Buf8(D),C.next_out=0,C.avail_out=D),(f=i.inflate(C,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&L&&(R=typeof L=="string"?n.string2buf(L):x.call(L)==="[object ArrayBuffer]"?new Uint8Array(L):L,f=i.inflateSetDictionary(this.strm,R)),f===l.Z_BUF_ERROR&&Z===!0&&(f=l.Z_OK,Z=!1),f!==l.Z_STREAM_END&&f!==l.Z_OK)return this.onEnd(f),!(this.ended=!0);C.next_out&&(C.avail_out!==0&&f!==l.Z_STREAM_END&&(C.avail_in!==0||y!==l.Z_FINISH&&y!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(j=n.utf8border(C.output,C.next_out),N=C.next_out-j,A=n.buf2string(C.output,j),C.next_out=N,C.avail_out=D-N,N&&o.arraySet(C.output,C.output,j,N,0),this.onData(A)):this.onData(o.shrinkBuf(C.output,C.next_out)))),C.avail_in===0&&C.avail_out===0&&(Z=!0)}while((0<C.avail_in||C.avail_out===0)&&f!==l.Z_STREAM_END);return f===l.Z_STREAM_END&&(y=l.Z_FINISH),y===l.Z_FINISH?(f=i.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===l.Z_OK):y!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(C.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=g,u.inflateRaw=function(d,b){return(b=b||{}).raw=!0,g(d,b)},u.ungzip=g},{"./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 p=h.shift();if(p){if(typeof p!="object")throw new TypeError(p+"must be non-object");for(var v in p)p.hasOwnProperty(v)&&(l[v]=p[v])}}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,p,v,x){if(h.subarray&&l.subarray)l.set(h.subarray(p,p+v),x);else for(var c=0;c<v;c++)l[x+c]=h[p+c]},flattenChunks:function(l){var h,p,v,x,c,g;for(h=v=0,p=l.length;h<p;h++)v+=l[h].length;for(g=new Uint8Array(v),h=x=0,p=l.length;h<p;h++)c=l[h],g.set(c,x),x+=c.length;return g}},n={arraySet:function(l,h,p,v,x){for(var c=0;c<v;c++)l[x+c]=h[p+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 p(v,x){if(x<65537&&(v.subarray&&n||!v.subarray&&o))return String.fromCharCode.apply(null,i.shrinkBuf(v,x));for(var c="",g=0;g<x;g++)c+=String.fromCharCode(v[g]);return c}l[254]=l[254]=1,u.string2buf=function(v){var x,c,g,d,b,f=v.length,y=0;for(d=0;d<f;d++)(64512&(c=v.charCodeAt(d)))==55296&&d+1<f&&(64512&(g=v.charCodeAt(d+1)))==56320&&(c=65536+(c-55296<<10)+(g-56320),d++),y+=c<128?1:c<2048?2:c<65536?3:4;for(x=new i.Buf8(y),d=b=0;b<y;d++)(64512&(c=v.charCodeAt(d)))==55296&&d+1<f&&(64512&(g=v.charCodeAt(d+1)))==56320&&(c=65536+(c-55296<<10)+(g-56320),d++),c<128?x[b++]=c:(c<2048?x[b++]=192|c>>>6:(c<65536?x[b++]=224|c>>>12:(x[b++]=240|c>>>18,x[b++]=128|c>>>12&63),x[b++]=128|c>>>6&63),x[b++]=128|63&c);return x},u.buf2binstring=function(v){return p(v,v.length)},u.binstring2buf=function(v){for(var x=new i.Buf8(v.length),c=0,g=x.length;c<g;c++)x[c]=v.charCodeAt(c);return x},u.buf2string=function(v,x){var c,g,d,b,f=x||v.length,y=new Array(2*f);for(c=g=0;c<f;)if((d=v[c++])<128)y[g++]=d;else if(4<(b=l[d]))y[g++]=65533,c+=b-1;else{for(d&=b===2?31:b===3?15:7;1<b&&c<f;)d=d<<6|63&v[c++],b--;1<b?y[g++]=65533:d<65536?y[g++]=d:(d-=65536,y[g++]=55296|d>>10&1023,y[g++]=56320|1023&d)}return p(y,g)},u.utf8border=function(v,x){var c;for((x=x||v.length)>v.length&&(x=v.length),c=x-1;0<=c&&(192&v[c])==128;)c--;return c<0||c===0?x:c+l[v[c]]>x?c:x}},{"./common":41}],43:[function(r,m,u){m.exports=function(i,o,n,l){for(var h=65535&i|0,p=i>>>16&65535|0,v=0;n!==0;){for(n-=v=2e3<n?2e3:n;p=p+(h=h+o[l++]|0)|0,--v;);h%=65521,p%=65521}return h|p<<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 p=i,v=h+l;o^=-1;for(var x=h;x<v;x++)o=o>>>8^p[255&(o^n[x])];return-1^o}},{}],46:[function(r,m,u){var i,o=r("../utils/common"),n=r("./trees"),l=r("./adler32"),h=r("./crc32"),p=r("./messages"),v=0,x=4,c=0,g=-2,d=-1,b=4,f=2,y=8,j=9,N=286,A=30,R=19,C=2*N+1,D=15,L=3,Z=258,Y=Z+L+1,E=42,F=113,a=1,B=2,te=3,U=4;function V(t,T){return t.msg=p[T],T}function H(t){return(t<<1)-(4<t?9:0)}function Q(t){for(var T=t.length;0<=--T;)t[T]=0}function z(t){var T=t.state,P=T.pending;P>t.avail_out&&(P=t.avail_out),P!==0&&(o.arraySet(t.output,T.pending_buf,T.pending_out,P,t.next_out),t.next_out+=P,T.pending_out+=P,t.total_out+=P,t.avail_out-=P,T.pending-=P,T.pending===0&&(T.pending_out=0))}function S(t,T){n._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,T),t.block_start=t.strstart,z(t.strm)}function q(t,T){t.pending_buf[t.pending++]=T}function J(t,T){t.pending_buf[t.pending++]=T>>>8&255,t.pending_buf[t.pending++]=255&T}function ee(t,T){var P,_,w=t.max_chain_length,I=t.strstart,$=t.prev_length,K=t.nice_match,M=t.strstart>t.w_size-Y?t.strstart-(t.w_size-Y):0,O=t.window,G=t.w_mask,W=t.prev,re=t.strstart+Z,de=O[I+$-1],le=O[I+$];t.prev_length>=t.good_match&&(w>>=2),K>t.lookahead&&(K=t.lookahead);do if(O[(P=T)+$]===le&&O[P+$-1]===de&&O[P]===O[I]&&O[++P]===O[I+1]){I+=2,P++;do;while(O[++I]===O[++P]&&O[++I]===O[++P]&&O[++I]===O[++P]&&O[++I]===O[++P]&&O[++I]===O[++P]&&O[++I]===O[++P]&&O[++I]===O[++P]&&O[++I]===O[++P]&&I<re);if(_=Z-(re-I),I=re-Z,$<_){if(t.match_start=T,K<=($=_))break;de=O[I+$-1],le=O[I+$]}}while((T=W[T&G])>M&&--w!=0);return $<=t.lookahead?$:t.lookahead}function ue(t){var T,P,_,w,I,$,K,M,O,G,W=t.w_size;do{if(w=t.window_size-t.lookahead-t.strstart,t.strstart>=W+(W-Y)){for(o.arraySet(t.window,t.window,W,W,0),t.match_start-=W,t.strstart-=W,t.block_start-=W,T=P=t.hash_size;_=t.head[--T],t.head[T]=W<=_?_-W:0,--P;);for(T=P=W;_=t.prev[--T],t.prev[T]=W<=_?_-W:0,--P;);w+=W}if(t.strm.avail_in===0)break;if($=t.strm,K=t.window,M=t.strstart+t.lookahead,O=w,G=void 0,G=$.avail_in,O<G&&(G=O),P=G===0?0:($.avail_in-=G,o.arraySet(K,$.input,$.next_in,G,M),$.state.wrap===1?$.adler=l($.adler,K,G,M):$.state.wrap===2&&($.adler=h($.adler,K,G,M)),$.next_in+=G,$.total_in+=G,G),t.lookahead+=P,t.lookahead+t.insert>=L)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+L-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<L)););}while(t.lookahead<Y&&t.strm.avail_in!==0)}function ie(t,T){for(var P,_;;){if(t.lookahead<Y){if(ue(t),t.lookahead<Y&&T===v)return a;if(t.lookahead===0)break}if(P=0,t.lookahead>=L&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+L-1])&t.hash_mask,P=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),P!==0&&t.strstart-P<=t.w_size-Y&&(t.match_length=ee(t,P)),t.match_length>=L)if(_=n._tr_tally(t,t.strstart-t.match_start,t.match_length-L),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=L){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+L-1])&t.hash_mask,P=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 _=n._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(_&&(S(t,!1),t.strm.avail_out===0))return a}return t.insert=t.strstart<L-1?t.strstart:L-1,T===x?(S(t,!0),t.strm.avail_out===0?te:U):t.last_lit&&(S(t,!1),t.strm.avail_out===0)?a:B}function ae(t,T){for(var P,_,w;;){if(t.lookahead<Y){if(ue(t),t.lookahead<Y&&T===v)return a;if(t.lookahead===0)break}if(P=0,t.lookahead>=L&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+L-1])&t.hash_mask,P=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=L-1,P!==0&&t.prev_length<t.max_lazy_match&&t.strstart-P<=t.w_size-Y&&(t.match_length=ee(t,P),t.match_length<=5&&(t.strategy===1||t.match_length===L&&4096<t.strstart-t.match_start)&&(t.match_length=L-1)),t.prev_length>=L&&t.match_length<=t.prev_length){for(w=t.strstart+t.lookahead-L,_=n._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-L),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+L-1])&t.hash_mask,P=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=L-1,t.strstart++,_&&(S(t,!1),t.strm.avail_out===0))return a}else if(t.match_available){if((_=n._tr_tally(t,0,t.window[t.strstart-1]))&&S(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&&(_=n._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<L-1?t.strstart:L-1,T===x?(S(t,!0),t.strm.avail_out===0?te:U):t.last_lit&&(S(t,!1),t.strm.avail_out===0)?a:B}function se(t,T,P,_,w){this.good_length=t,this.max_lazy=T,this.nice_length=P,this.max_chain=_,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=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 o.Buf16(2*C),this.dyn_dtree=new o.Buf16(2*(2*A+1)),this.bl_tree=new o.Buf16(2*(2*R+1)),Q(this.dyn_ltree),Q(this.dyn_dtree),Q(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*N+1),Q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*N+1),Q(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 pe(t){var T;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=f,(T=t.state).pending=0,T.pending_out=0,T.wrap<0&&(T.wrap=-T.wrap),T.status=T.wrap?E:F,t.adler=T.wrap===2?0:1,T.last_flush=v,n._tr_init(T),c):V(t,g)}function xe(t){var T=pe(t);return T===c&&(function(P){P.window_size=2*P.w_size,Q(P.head),P.max_lazy_match=i[P.level].max_lazy,P.good_match=i[P.level].good_length,P.nice_match=i[P.level].nice_length,P.max_chain_length=i[P.level].max_chain,P.strstart=0,P.block_start=0,P.lookahead=0,P.insert=0,P.match_length=P.prev_length=L-1,P.match_available=0,P.ins_h=0})(t.state),T}function _e(t,T,P,_,w,I){if(!t)return g;var $=1;if(T===d&&(T=6),_<0?($=0,_=-_):15<_&&($=2,_-=16),w<1||j<w||P!==y||_<8||15<_||T<0||9<T||I<0||b<I)return V(t,g);_===8&&(_=9);var K=new ge;return(t.state=K).strm=t,K.wrap=$,K.gzhead=null,K.w_bits=_,K.w_size=1<<K.w_bits,K.w_mask=K.w_size-1,K.hash_bits=w+7,K.hash_size=1<<K.hash_bits,K.hash_mask=K.hash_size-1,K.hash_shift=~~((K.hash_bits+L-1)/L),K.window=new o.Buf8(2*K.w_size),K.head=new o.Buf16(K.hash_size),K.prev=new o.Buf16(K.w_size),K.lit_bufsize=1<<w+6,K.pending_buf_size=4*K.lit_bufsize,K.pending_buf=new o.Buf8(K.pending_buf_size),K.d_buf=1*K.lit_bufsize,K.l_buf=3*K.lit_bufsize,K.level=T,K.strategy=I,K.method=P,xe(t)}i=[new se(0,0,0,0,function(t,T){var P=65535;for(P>t.pending_buf_size-5&&(P=t.pending_buf_size-5);;){if(t.lookahead<=1){if(ue(t),t.lookahead===0&&T===v)return a;if(t.lookahead===0)break}t.strstart+=t.lookahead,t.lookahead=0;var _=t.block_start+P;if((t.strstart===0||t.strstart>=_)&&(t.lookahead=t.strstart-_,t.strstart=_,S(t,!1),t.strm.avail_out===0)||t.strstart-t.block_start>=t.w_size-Y&&(S(t,!1),t.strm.avail_out===0))return a}return t.insert=0,T===x?(S(t,!0),t.strm.avail_out===0?te:U):(t.strstart>t.block_start&&(S(t,!1),t.strm.avail_out),a)}),new se(4,4,8,4,ie),new se(4,5,16,8,ie),new se(4,6,32,32,ie),new se(4,4,16,16,ae),new se(8,16,32,32,ae),new se(8,16,128,128,ae),new se(8,32,128,256,ae),new se(32,128,258,1024,ae),new se(32,258,258,4096,ae)],u.deflateInit=function(t,T){return _e(t,T,y,15,8,0)},u.deflateInit2=_e,u.deflateReset=xe,u.deflateResetKeep=pe,u.deflateSetHeader=function(t,T){return t&&t.state?t.state.wrap!==2?g:(t.state.gzhead=T,c):g},u.deflate=function(t,T){var P,_,w,I;if(!t||!t.state||5<T||T<0)return t?V(t,g):g;if(_=t.state,!t.output||!t.input&&t.avail_in!==0||_.status===666&&T!==x)return V(t,t.avail_out===0?-5:g);if(_.strm=t,P=_.last_flush,_.last_flush=T,_.status===E)if(_.wrap===2)t.adler=0,q(_,31),q(_,139),q(_,8),_.gzhead?(q(_,(_.gzhead.text?1:0)+(_.gzhead.hcrc?2:0)+(_.gzhead.extra?4:0)+(_.gzhead.name?8:0)+(_.gzhead.comment?16:0)),q(_,255&_.gzhead.time),q(_,_.gzhead.time>>8&255),q(_,_.gzhead.time>>16&255),q(_,_.gzhead.time>>24&255),q(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),q(_,255&_.gzhead.os),_.gzhead.extra&&_.gzhead.extra.length&&(q(_,255&_.gzhead.extra.length),q(_,_.gzhead.extra.length>>8&255)),_.gzhead.hcrc&&(t.adler=h(t.adler,_.pending_buf,_.pending,0)),_.gzindex=0,_.status=69):(q(_,0),q(_,0),q(_,0),q(_,0),q(_,0),q(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),q(_,3),_.status=F);else{var $=y+(_.w_bits-8<<4)<<8;$|=(2<=_.strategy||_.level<2?0:_.level<6?1:_.level===6?2:3)<<6,_.strstart!==0&&($|=32),$+=31-$%31,_.status=F,J(_,$),_.strstart!==0&&(J(_,t.adler>>>16),J(_,65535&t.adler)),t.adler=1}if(_.status===69)if(_.gzhead.extra){for(w=_.pending;_.gzindex<(65535&_.gzhead.extra.length)&&(_.pending!==_.pending_buf_size||(_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),z(t),w=_.pending,_.pending!==_.pending_buf_size));)q(_,255&_.gzhead.extra[_.gzindex]),_.gzindex++;_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),_.gzindex===_.gzhead.extra.length&&(_.gzindex=0,_.status=73)}else _.status=73;if(_.status===73)if(_.gzhead.name){w=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),z(t),w=_.pending,_.pending===_.pending_buf_size)){I=1;break}I=_.gzindex<_.gzhead.name.length?255&_.gzhead.name.charCodeAt(_.gzindex++):0,q(_,I)}while(I!==0);_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),I===0&&(_.gzindex=0,_.status=91)}else _.status=91;if(_.status===91)if(_.gzhead.comment){w=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),z(t),w=_.pending,_.pending===_.pending_buf_size)){I=1;break}I=_.gzindex<_.gzhead.comment.length?255&_.gzhead.comment.charCodeAt(_.gzindex++):0,q(_,I)}while(I!==0);_.gzhead.hcrc&&_.pending>w&&(t.adler=h(t.adler,_.pending_buf,_.pending-w,w)),I===0&&(_.status=103)}else _.status=103;if(_.status===103&&(_.gzhead.hcrc?(_.pending+2>_.pending_buf_size&&z(t),_.pending+2<=_.pending_buf_size&&(q(_,255&t.adler),q(_,t.adler>>8&255),t.adler=0,_.status=F)):_.status=F),_.pending!==0){if(z(t),t.avail_out===0)return _.last_flush=-1,c}else if(t.avail_in===0&&H(T)<=H(P)&&T!==x)return V(t,-5);if(_.status===666&&t.avail_in!==0)return V(t,-5);if(t.avail_in!==0||_.lookahead!==0||T!==v&&_.status!==666){var K=_.strategy===2?(function(M,O){for(var G;;){if(M.lookahead===0&&(ue(M),M.lookahead===0)){if(O===v)return a;break}if(M.match_length=0,G=n._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++,G&&(S(M,!1),M.strm.avail_out===0))return a}return M.insert=0,O===x?(S(M,!0),M.strm.avail_out===0?te:U):M.last_lit&&(S(M,!1),M.strm.avail_out===0)?a:B})(_,T):_.strategy===3?(function(M,O){for(var G,W,re,de,le=M.window;;){if(M.lookahead<=Z){if(ue(M),M.lookahead<=Z&&O===v)return a;if(M.lookahead===0)break}if(M.match_length=0,M.lookahead>=L&&0<M.strstart&&(W=le[re=M.strstart-1])===le[++re]&&W===le[++re]&&W===le[++re]){de=M.strstart+Z;do;while(W===le[++re]&&W===le[++re]&&W===le[++re]&&W===le[++re]&&W===le[++re]&&W===le[++re]&&W===le[++re]&&W===le[++re]&&re<de);M.match_length=Z-(de-re),M.match_length>M.lookahead&&(M.match_length=M.lookahead)}if(M.match_length>=L?(G=n._tr_tally(M,1,M.match_length-L),M.lookahead-=M.match_length,M.strstart+=M.match_length,M.match_length=0):(G=n._tr_tally(M,0,M.window[M.strstart]),M.lookahead--,M.strstart++),G&&(S(M,!1),M.strm.avail_out===0))return a}return M.insert=0,O===x?(S(M,!0),M.strm.avail_out===0?te:U):M.last_lit&&(S(M,!1),M.strm.avail_out===0)?a:B})(_,T):i[_.level].func(_,T);if(K!==te&&K!==U||(_.status=666),K===a||K===te)return t.avail_out===0&&(_.last_flush=-1),c;if(K===B&&(T===1?n._tr_align(_):T!==5&&(n._tr_stored_block(_,0,0,!1),T===3&&(Q(_.head),_.lookahead===0&&(_.strstart=0,_.block_start=0,_.insert=0))),z(t),t.avail_out===0))return _.last_flush=-1,c}return T!==x?c:_.wrap<=0?1:(_.wrap===2?(q(_,255&t.adler),q(_,t.adler>>8&255),q(_,t.adler>>16&255),q(_,t.adler>>24&255),q(_,255&t.total_in),q(_,t.total_in>>8&255),q(_,t.total_in>>16&255),q(_,t.total_in>>24&255)):(J(_,t.adler>>>16),J(_,65535&t.adler)),z(t),0<_.wrap&&(_.wrap=-_.wrap),_.pending!==0?c:1)},u.deflateEnd=function(t){var T;return t&&t.state?(T=t.state.status)!==E&&T!==69&&T!==73&&T!==91&&T!==103&&T!==F&&T!==666?V(t,g):(t.state=null,T===F?V(t,-3):c):g},u.deflateSetDictionary=function(t,T){var P,_,w,I,$,K,M,O,G=T.length;if(!t||!t.state||(I=(P=t.state).wrap)===2||I===1&&P.status!==E||P.lookahead)return g;for(I===1&&(t.adler=l(t.adler,T,G,0)),P.wrap=0,G>=P.w_size&&(I===0&&(Q(P.head),P.strstart=0,P.block_start=0,P.insert=0),O=new o.Buf8(P.w_size),o.arraySet(O,T,G-P.w_size,P.w_size,0),T=O,G=P.w_size),$=t.avail_in,K=t.next_in,M=t.input,t.avail_in=G,t.next_in=0,t.input=T,ue(P);P.lookahead>=L;){for(_=P.strstart,w=P.lookahead-(L-1);P.ins_h=(P.ins_h<<P.hash_shift^P.window[_+L-1])&P.hash_mask,P.prev[_&P.w_mask]=P.head[P.ins_h],P.head[P.ins_h]=_,_++,--w;);P.strstart=_,P.lookahead=L-1,ue(P)}return P.strstart+=P.lookahead,P.block_start=P.strstart,P.insert=P.lookahead,P.lookahead=0,P.match_length=P.prev_length=L-1,P.match_available=0,t.next_in=K,t.input=M,t.avail_in=$,P.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,p,v,x,c,g,d,b,f,y,j,N,A,R,C,D,L,Z,Y,E,F,a,B;n=i.state,l=i.next_in,a=i.input,h=l+(i.avail_in-5),p=i.next_out,B=i.output,v=p-(o-i.avail_out),x=p+(i.avail_out-257),c=n.dmax,g=n.wsize,d=n.whave,b=n.wnext,f=n.window,y=n.hold,j=n.bits,N=n.lencode,A=n.distcode,R=(1<<n.lenbits)-1,C=(1<<n.distbits)-1;e:do{j<15&&(y+=a[l++]<<j,j+=8,y+=a[l++]<<j,j+=8),D=N[y&R];t:for(;;){if(y>>>=L=D>>>24,j-=L,(L=D>>>16&255)===0)B[p++]=65535&D;else{if(!(16&L)){if((64&L)==0){D=N[(65535&D)+(y&(1<<L)-1)];continue t}if(32&L){n.mode=12;break e}i.msg="invalid literal/length code",n.mode=30;break e}Z=65535&D,(L&=15)&&(j<L&&(y+=a[l++]<<j,j+=8),Z+=y&(1<<L)-1,y>>>=L,j-=L),j<15&&(y+=a[l++]<<j,j+=8,y+=a[l++]<<j,j+=8),D=A[y&C];r:for(;;){if(y>>>=L=D>>>24,j-=L,!(16&(L=D>>>16&255))){if((64&L)==0){D=A[(65535&D)+(y&(1<<L)-1)];continue r}i.msg="invalid distance code",n.mode=30;break e}if(Y=65535&D,j<(L&=15)&&(y+=a[l++]<<j,(j+=8)<L&&(y+=a[l++]<<j,j+=8)),c<(Y+=y&(1<<L)-1)){i.msg="invalid distance too far back",n.mode=30;break e}if(y>>>=L,j-=L,(L=p-v)<Y){if(d<(L=Y-L)&&n.sane){i.msg="invalid distance too far back",n.mode=30;break e}if(F=f,(E=0)===b){if(E+=g-L,L<Z){for(Z-=L;B[p++]=f[E++],--L;);E=p-Y,F=B}}else if(b<L){if(E+=g+b-L,(L-=b)<Z){for(Z-=L;B[p++]=f[E++],--L;);if(E=0,b<Z){for(Z-=L=b;B[p++]=f[E++],--L;);E=p-Y,F=B}}}else if(E+=b-L,L<Z){for(Z-=L;B[p++]=f[E++],--L;);E=p-Y,F=B}for(;2<Z;)B[p++]=F[E++],B[p++]=F[E++],B[p++]=F[E++],Z-=3;Z&&(B[p++]=F[E++],1<Z&&(B[p++]=F[E++]))}else{for(E=p-Y;B[p++]=B[E++],B[p++]=B[E++],B[p++]=B[E++],2<(Z-=3););Z&&(B[p++]=B[E++],1<Z&&(B[p++]=B[E++]))}break}}break}}while(l<h&&p<x);l-=Z=j>>3,y&=(1<<(j-=Z<<3))-1,i.next_in=l,i.next_out=p,i.avail_in=l<h?h-l+5:5-(l-h),i.avail_out=p<x?x-p+257:257-(p-x),n.hold=y,n.bits=j}},{}],49:[function(r,m,u){var i=r("../utils/common"),o=r("./adler32"),n=r("./crc32"),l=r("./inffast"),h=r("./inftrees"),p=1,v=2,x=0,c=-2,g=1,d=852,b=592;function f(E){return(E>>>24&255)+(E>>>8&65280)+((65280&E)<<8)+((255&E)<<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 j(E){var F;return E&&E.state?(F=E.state,E.total_in=E.total_out=F.total=0,E.msg="",F.wrap&&(E.adler=1&F.wrap),F.mode=g,F.last=0,F.havedict=0,F.dmax=32768,F.head=null,F.hold=0,F.bits=0,F.lencode=F.lendyn=new i.Buf32(d),F.distcode=F.distdyn=new i.Buf32(b),F.sane=1,F.back=-1,x):c}function N(E){var F;return E&&E.state?((F=E.state).wsize=0,F.whave=0,F.wnext=0,j(E)):c}function A(E,F){var a,B;return E&&E.state?(B=E.state,F<0?(a=0,F=-F):(a=1+(F>>4),F<48&&(F&=15)),F&&(F<8||15<F)?c:(B.window!==null&&B.wbits!==F&&(B.window=null),B.wrap=a,B.wbits=F,N(E))):c}function R(E,F){var a,B;return E?(B=new y,(E.state=B).window=null,(a=A(E,F))!==x&&(E.state=null),a):c}var C,D,L=!0;function Z(E){if(L){var F;for(C=new i.Buf32(512),D=new i.Buf32(32),F=0;F<144;)E.lens[F++]=8;for(;F<256;)E.lens[F++]=9;for(;F<280;)E.lens[F++]=7;for(;F<288;)E.lens[F++]=8;for(h(p,E.lens,0,288,C,0,E.work,{bits:9}),F=0;F<32;)E.lens[F++]=5;h(v,E.lens,0,32,D,0,E.work,{bits:5}),L=!1}E.lencode=C,E.lenbits=9,E.distcode=D,E.distbits=5}function Y(E,F,a,B){var te,U=E.state;return U.window===null&&(U.wsize=1<<U.wbits,U.wnext=0,U.whave=0,U.window=new i.Buf8(U.wsize)),B>=U.wsize?(i.arraySet(U.window,F,a-U.wsize,U.wsize,0),U.wnext=0,U.whave=U.wsize):(B<(te=U.wsize-U.wnext)&&(te=B),i.arraySet(U.window,F,a-B,te,U.wnext),(B-=te)?(i.arraySet(U.window,F,a-B,B,0),U.wnext=B,U.whave=U.wsize):(U.wnext+=te,U.wnext===U.wsize&&(U.wnext=0),U.whave<U.wsize&&(U.whave+=te))),0}u.inflateReset=N,u.inflateReset2=A,u.inflateResetKeep=j,u.inflateInit=function(E){return R(E,15)},u.inflateInit2=R,u.inflate=function(E,F){var a,B,te,U,V,H,Q,z,S,q,J,ee,ue,ie,ae,se,ge,pe,xe,_e,t,T,P,_,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(!E||!E.state||!E.output||!E.input&&E.avail_in!==0)return c;(a=E.state).mode===12&&(a.mode=13),V=E.next_out,te=E.output,Q=E.avail_out,U=E.next_in,B=E.input,H=E.avail_in,z=a.hold,S=a.bits,q=H,J=Q,T=x;e:for(;;)switch(a.mode){case g:if(a.wrap===0){a.mode=13;break}for(;S<16;){if(H===0)break e;H--,z+=B[U++]<<S,S+=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),S=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){E.msg="incorrect header check",a.mode=30;break}if((15&z)!=8){E.msg="unknown compression method",a.mode=30;break}if(S-=4,t=8+(15&(z>>>=4)),a.wbits===0)a.wbits=t;else if(t>a.wbits){E.msg="invalid window size",a.mode=30;break}a.dmax=1<<t,E.adler=a.check=1,a.mode=512&z?10:12,S=z=0;break;case 2:for(;S<16;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if(a.flags=z,(255&a.flags)!=8){E.msg="unknown compression method",a.mode=30;break}if(57344&a.flags){E.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)),S=z=0,a.mode=3;case 3:for(;S<32;){if(H===0)break e;H--,z+=B[U++]<<S,S+=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)),S=z=0,a.mode=4;case 4:for(;S<16;){if(H===0)break e;H--,z+=B[U++]<<S,S+=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)),S=z=0,a.mode=5;case 5:if(1024&a.flags){for(;S<16;){if(H===0)break e;H--,z+=B[U++]<<S,S+=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)),S=z=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(H<(ee=a.length)&&(ee=H),ee&&(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,B,U,ee,t)),512&a.flags&&(a.check=n(a.check,B,ee,U)),H-=ee,U+=ee,a.length-=ee),a.length))break e;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(H===0)break e;for(ee=0;t=B[U+ee++],a.head&&t&&a.length<65536&&(a.head.name+=String.fromCharCode(t)),t&&ee<H;);if(512&a.flags&&(a.check=n(a.check,B,ee,U)),H-=ee,U+=ee,t)break e}else a.head&&(a.head.name=null);a.length=0,a.mode=8;case 8:if(4096&a.flags){if(H===0)break e;for(ee=0;t=B[U+ee++],a.head&&t&&a.length<65536&&(a.head.comment+=String.fromCharCode(t)),t&&ee<H;);if(512&a.flags&&(a.check=n(a.check,B,ee,U)),H-=ee,U+=ee,t)break e}else a.head&&(a.head.comment=null);a.mode=9;case 9:if(512&a.flags){for(;S<16;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if(z!==(65535&a.check)){E.msg="header crc mismatch",a.mode=30;break}S=z=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),E.adler=a.check=0,a.mode=12;break;case 10:for(;S<32;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}E.adler=a.check=f(z),S=z=0,a.mode=11;case 11:if(a.havedict===0)return E.next_out=V,E.avail_out=Q,E.next_in=U,E.avail_in=H,a.hold=z,a.bits=S,2;E.adler=a.check=1,a.mode=12;case 12:if(F===5||F===6)break e;case 13:if(a.last){z>>>=7&S,S-=7&S,a.mode=27;break}for(;S<3;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}switch(a.last=1&z,S-=1,3&(z>>>=1)){case 0:a.mode=14;break;case 1:if(Z(a),a.mode=20,F!==6)break;z>>>=2,S-=2;break e;case 2:a.mode=17;break;case 3:E.msg="invalid block type",a.mode=30}z>>>=2,S-=2;break;case 14:for(z>>>=7&S,S-=7&S;S<32;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if((65535&z)!=(z>>>16^65535)){E.msg="invalid stored block lengths",a.mode=30;break}if(a.length=65535&z,S=z=0,a.mode=15,F===6)break e;case 15:a.mode=16;case 16:if(ee=a.length){if(H<ee&&(ee=H),Q<ee&&(ee=Q),ee===0)break e;i.arraySet(te,B,U,ee,V),H-=ee,U+=ee,Q-=ee,V+=ee,a.length-=ee;break}a.mode=12;break;case 17:for(;S<14;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if(a.nlen=257+(31&z),z>>>=5,S-=5,a.ndist=1+(31&z),z>>>=5,S-=5,a.ncode=4+(15&z),z>>>=4,S-=4,286<a.nlen||30<a.ndist){E.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(;S<3;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}a.lens[$[a.have++]]=7&z,z>>>=3,S-=3}for(;a.have<19;)a.lens[$[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,P={bits:a.lenbits},T=h(0,a.lens,0,19,a.lencode,0,a.work,P),a.lenbits=P.bits,T){E.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(;se=(w=a.lencode[z&(1<<a.lenbits)-1])>>>16&255,ge=65535&w,!((ae=w>>>24)<=S);){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if(ge<16)z>>>=ae,S-=ae,a.lens[a.have++]=ge;else{if(ge===16){for(_=ae+2;S<_;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if(z>>>=ae,S-=ae,a.have===0){E.msg="invalid bit length repeat",a.mode=30;break}t=a.lens[a.have-1],ee=3+(3&z),z>>>=2,S-=2}else if(ge===17){for(_=ae+3;S<_;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}S-=ae,t=0,ee=3+(7&(z>>>=ae)),z>>>=3,S-=3}else{for(_=ae+7;S<_;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}S-=ae,t=0,ee=11+(127&(z>>>=ae)),z>>>=7,S-=7}if(a.have+ee>a.nlen+a.ndist){E.msg="invalid bit length repeat",a.mode=30;break}for(;ee--;)a.lens[a.have++]=t}}if(a.mode===30)break;if(a.lens[256]===0){E.msg="invalid code -- missing end-of-block",a.mode=30;break}if(a.lenbits=9,P={bits:a.lenbits},T=h(p,a.lens,0,a.nlen,a.lencode,0,a.work,P),a.lenbits=P.bits,T){E.msg="invalid literal/lengths set",a.mode=30;break}if(a.distbits=6,a.distcode=a.distdyn,P={bits:a.distbits},T=h(v,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,P),a.distbits=P.bits,T){E.msg="invalid distances set",a.mode=30;break}if(a.mode=20,F===6)break e;case 20:a.mode=21;case 21:if(6<=H&&258<=Q){E.next_out=V,E.avail_out=Q,E.next_in=U,E.avail_in=H,a.hold=z,a.bits=S,l(E,J),V=E.next_out,te=E.output,Q=E.avail_out,U=E.next_in,B=E.input,H=E.avail_in,z=a.hold,S=a.bits,a.mode===12&&(a.back=-1);break}for(a.back=0;se=(w=a.lencode[z&(1<<a.lenbits)-1])>>>16&255,ge=65535&w,!((ae=w>>>24)<=S);){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if(se&&(240&se)==0){for(pe=ae,xe=se,_e=ge;se=(w=a.lencode[_e+((z&(1<<pe+xe)-1)>>pe)])>>>16&255,ge=65535&w,!(pe+(ae=w>>>24)<=S);){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}z>>>=pe,S-=pe,a.back+=pe}if(z>>>=ae,S-=ae,a.back+=ae,a.length=ge,se===0){a.mode=26;break}if(32&se){a.back=-1,a.mode=12;break}if(64&se){E.msg="invalid literal/length code",a.mode=30;break}a.extra=15&se,a.mode=22;case 22:if(a.extra){for(_=a.extra;S<_;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}a.length+=z&(1<<a.extra)-1,z>>>=a.extra,S-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;se=(w=a.distcode[z&(1<<a.distbits)-1])>>>16&255,ge=65535&w,!((ae=w>>>24)<=S);){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if((240&se)==0){for(pe=ae,xe=se,_e=ge;se=(w=a.distcode[_e+((z&(1<<pe+xe)-1)>>pe)])>>>16&255,ge=65535&w,!(pe+(ae=w>>>24)<=S);){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}z>>>=pe,S-=pe,a.back+=pe}if(z>>>=ae,S-=ae,a.back+=ae,64&se){E.msg="invalid distance code",a.mode=30;break}a.offset=ge,a.extra=15&se,a.mode=24;case 24:if(a.extra){for(_=a.extra;S<_;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}a.offset+=z&(1<<a.extra)-1,z>>>=a.extra,S-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){E.msg="invalid distance too far back",a.mode=30;break}a.mode=25;case 25:if(Q===0)break e;if(ee=J-Q,a.offset>ee){if((ee=a.offset-ee)>a.whave&&a.sane){E.msg="invalid distance too far back",a.mode=30;break}ue=ee>a.wnext?(ee-=a.wnext,a.wsize-ee):a.wnext-ee,ee>a.length&&(ee=a.length),ie=a.window}else ie=te,ue=V-a.offset,ee=a.length;for(Q<ee&&(ee=Q),Q-=ee,a.length-=ee;te[V++]=ie[ue++],--ee;);a.length===0&&(a.mode=21);break;case 26:if(Q===0)break e;te[V++]=a.length,Q--,a.mode=21;break;case 27:if(a.wrap){for(;S<32;){if(H===0)break e;H--,z|=B[U++]<<S,S+=8}if(J-=Q,E.total_out+=J,a.total+=J,J&&(E.adler=a.check=a.flags?n(a.check,te,J,V-J):o(a.check,te,J,V-J)),J=Q,(a.flags?z:f(z))!==a.check){E.msg="incorrect data check",a.mode=30;break}S=z=0}a.mode=28;case 28:if(a.wrap&&a.flags){for(;S<32;){if(H===0)break e;H--,z+=B[U++]<<S,S+=8}if(z!==(4294967295&a.total)){E.msg="incorrect length check",a.mode=30;break}S=z=0}a.mode=29;case 29:T=1;break e;case 30:T=-3;break e;case 31:return-4;case 32:default:return c}return E.next_out=V,E.avail_out=Q,E.next_in=U,E.avail_in=H,a.hold=z,a.bits=S,(a.wsize||J!==E.avail_out&&a.mode<30&&(a.mode<27||F!==4))&&Y(E,E.output,E.next_out,J-E.avail_out)?(a.mode=31,-4):(q-=E.avail_in,J-=E.avail_out,E.total_in+=q,E.total_out+=J,a.total+=J,a.wrap&&J&&(E.adler=a.check=a.flags?n(a.check,te,J,E.next_out-J):o(a.check,te,J,E.next_out-J)),E.data_type=a.bits+(a.last?64:0)+(a.mode===12?128:0)+(a.mode===20||a.mode===15?256:0),(q==0&&J===0||F===4)&&T===x&&(T=-5),T)},u.inflateEnd=function(E){if(!E||!E.state)return c;var F=E.state;return F.window&&(F.window=null),E.state=null,x},u.inflateGetHeader=function(E,F){var a;return E&&E.state?(2&(a=E.state).wrap)==0?c:((a.head=F).done=!1,x):c},u.inflateSetDictionary=function(E,F){var a,B=F.length;return E&&E.state?(a=E.state).wrap!==0&&a.mode!==11?c:a.mode===11&&o(1,F,B,0)!==a.check?-3:Y(E,F,B,B)?(a.mode=31,-4):(a.havedict=1,x):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(p,v,x,c,g,d,b,f){var y,j,N,A,R,C,D,L,Z,Y=f.bits,E=0,F=0,a=0,B=0,te=0,U=0,V=0,H=0,Q=0,z=0,S=null,q=0,J=new i.Buf16(16),ee=new i.Buf16(16),ue=null,ie=0;for(E=0;E<=15;E++)J[E]=0;for(F=0;F<c;F++)J[v[x+F]]++;for(te=Y,B=15;1<=B&&J[B]===0;B--);if(B<te&&(te=B),B===0)return g[d++]=20971520,g[d++]=20971520,f.bits=1,0;for(a=1;a<B&&J[a]===0;a++);for(te<a&&(te=a),E=H=1;E<=15;E++)if(H<<=1,(H-=J[E])<0)return-1;if(0<H&&(p===0||B!==1))return-1;for(ee[1]=0,E=1;E<15;E++)ee[E+1]=ee[E]+J[E];for(F=0;F<c;F++)v[x+F]!==0&&(b[ee[v[x+F]]++]=F);if(C=p===0?(S=ue=b,19):p===1?(S=o,q-=257,ue=n,ie-=257,256):(S=l,ue=h,-1),E=a,R=d,V=F=z=0,N=-1,A=(Q=1<<(U=te))-1,p===1&&852<Q||p===2&&592<Q)return 1;for(;;){for(D=E-V,Z=b[F]<C?(L=0,b[F]):b[F]>C?(L=ue[ie+b[F]],S[q+b[F]]):(L=96,0),y=1<<E-V,a=j=1<<U;g[R+(z>>V)+(j-=y)]=D<<24|L<<16|Z|0,j!==0;);for(y=1<<E-1;z&y;)y>>=1;if(y!==0?(z&=y-1,z+=y):z=0,F++,--J[E]==0){if(E===B)break;E=v[x+b[F]]}if(te<E&&(z&A)!==N){for(V===0&&(V=te),R+=a,H=1<<(U=E-V);U+V<B&&!((H-=J[U+V])<=0);)U++,H<<=1;if(Q+=1<<U,p===1&&852<Q||p===2&&592<Q)return 1;g[N=z&A]=te<<24|U<<16|R-d|0}}return z!==0&&(g[R+z]=E-V<<24|64<<16|0),f.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,p=29,v=256,x=v+1+p,c=30,g=19,d=2*x+1,b=15,f=16,y=7,j=256,N=16,A=17,R=18,C=[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],L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Y=new Array(2*(x+2));l(Y);var E=new Array(2*c);l(E);var F=new Array(512);l(F);var a=new Array(256);l(a);var B=new Array(p);l(B);var te,U,V,H=new Array(c);function Q(w,I,$,K,M){this.static_tree=w,this.extra_bits=I,this.extra_base=$,this.elems=K,this.max_length=M,this.has_stree=w&&w.length}function z(w,I){this.dyn_tree=w,this.max_code=0,this.stat_desc=I}function S(w){return w<256?F[w]:F[256+(w>>>7)]}function q(w,I){w.pending_buf[w.pending++]=255&I,w.pending_buf[w.pending++]=I>>>8&255}function J(w,I,$){w.bi_valid>f-$?(w.bi_buf|=I<<w.bi_valid&65535,q(w,w.bi_buf),w.bi_buf=I>>f-w.bi_valid,w.bi_valid+=$-f):(w.bi_buf|=I<<w.bi_valid&65535,w.bi_valid+=$)}function ee(w,I,$){J(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 K,M,O=new Array(b+1),G=0;for(K=1;K<=b;K++)O[K]=G=G+$[K-1]<<1;for(M=0;M<=I;M++){var W=w[2*M+1];W!==0&&(w[2*M]=ue(O[W]++,W))}}function ae(w){var I;for(I=0;I<x;I++)w.dyn_ltree[2*I]=0;for(I=0;I<c;I++)w.dyn_dtree[2*I]=0;for(I=0;I<g;I++)w.bl_tree[2*I]=0;w.dyn_ltree[2*j]=1,w.opt_len=w.static_len=0,w.last_lit=w.matches=0}function se(w){8<w.bi_valid?q(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,$,K){var M=2*I,O=2*$;return w[M]<w[O]||w[M]===w[O]&&K[I]<=K[$]}function pe(w,I,$){for(var K=w.heap[$],M=$<<1;M<=w.heap_len&&(M<w.heap_len&&ge(I,w.heap[M+1],w.heap[M],w.depth)&&M++,!ge(I,K,w.heap[M],w.depth));)w.heap[$]=w.heap[M],$=M,M<<=1;w.heap[$]=K}function xe(w,I,$){var K,M,O,G,W=0;if(w.last_lit!==0)for(;K=w.pending_buf[w.d_buf+2*W]<<8|w.pending_buf[w.d_buf+2*W+1],M=w.pending_buf[w.l_buf+W],W++,K===0?ee(w,M,I):(ee(w,(O=a[M])+v+1,I),(G=C[O])!==0&&J(w,M-=B[O],G),ee(w,O=S(--K),$),(G=D[O])!==0&&J(w,K-=H[O],G)),W<w.last_lit;);ee(w,j,I)}function _e(w,I){var $,K,M,O=I.dyn_tree,G=I.stat_desc.static_tree,W=I.stat_desc.has_stree,re=I.stat_desc.elems,de=-1;for(w.heap_len=0,w.heap_max=d,$=0;$<re;$++)O[2*$]!==0?(w.heap[++w.heap_len]=de=$,w.depth[$]=0):O[2*$+1]=0;for(;w.heap_len<2;)O[2*(M=w.heap[++w.heap_len]=de<2?++de:0)]=1,w.depth[M]=0,w.opt_len--,W&&(w.static_len-=G[2*M+1]);for(I.max_code=de,$=w.heap_len>>1;1<=$;$--)pe(w,O,$);for(M=re;$=w.heap[1],w.heap[1]=w.heap[w.heap_len--],pe(w,O,1),K=w.heap[1],w.heap[--w.heap_max]=$,w.heap[--w.heap_max]=K,O[2*M]=O[2*$]+O[2*K],w.depth[M]=(w.depth[$]>=w.depth[K]?w.depth[$]:w.depth[K])+1,O[2*$+1]=O[2*K+1]=M,w.heap[1]=M++,pe(w,O,1),2<=w.heap_len;);w.heap[--w.heap_max]=w.heap[1],(function(le,ke){var je,Ee,Ve,we,st,jt,Ce=ke.dyn_tree,Nr=ke.max_code,go=ke.stat_desc.static_tree,vo=ke.stat_desc.has_stree,xo=ke.stat_desc.extra_bits,Sr=ke.stat_desc.extra_base,Ke=ke.stat_desc.max_length,lt=0;for(we=0;we<=b;we++)le.bl_count[we]=0;for(Ce[2*le.heap[le.heap_max]+1]=0,je=le.heap_max+1;je<d;je++)Ke<(we=Ce[2*Ce[2*(Ee=le.heap[je])+1]+1]+1)&&(we=Ke,lt++),Ce[2*Ee+1]=we,Nr<Ee||(le.bl_count[we]++,st=0,Sr<=Ee&&(st=xo[Ee-Sr]),jt=Ce[2*Ee],le.opt_len+=jt*(we+st),vo&&(le.static_len+=jt*(go[2*Ee+1]+st)));if(lt!==0){do{for(we=Ke-1;le.bl_count[we]===0;)we--;le.bl_count[we]--,le.bl_count[we+1]+=2,le.bl_count[Ke]--,lt-=2}while(0<lt);for(we=Ke;we!==0;we--)for(Ee=le.bl_count[we];Ee!==0;)Nr<(Ve=le.heap[--je])||(Ce[2*Ve+1]!==we&&(le.opt_len+=(we-Ce[2*Ve+1])*Ce[2*Ve],Ce[2*Ve+1]=we),Ee--)}})(w,I),ie(O,de,w.bl_count)}function t(w,I,$){var K,M,O=-1,G=I[1],W=0,re=7,de=4;for(G===0&&(re=138,de=3),I[2*($+1)+1]=65535,K=0;K<=$;K++)M=G,G=I[2*(K+1)+1],++W<re&&M===G||(W<de?w.bl_tree[2*M]+=W:M!==0?(M!==O&&w.bl_tree[2*M]++,w.bl_tree[2*N]++):W<=10?w.bl_tree[2*A]++:w.bl_tree[2*R]++,O=M,de=(W=0)===G?(re=138,3):M===G?(re=6,3):(re=7,4))}function T(w,I,$){var K,M,O=-1,G=I[1],W=0,re=7,de=4;for(G===0&&(re=138,de=3),K=0;K<=$;K++)if(M=G,G=I[2*(K+1)+1],!(++W<re&&M===G)){if(W<de)for(;ee(w,M,w.bl_tree),--W!=0;);else M!==0?(M!==O&&(ee(w,M,w.bl_tree),W--),ee(w,N,w.bl_tree),J(w,W-3,2)):W<=10?(ee(w,A,w.bl_tree),J(w,W-3,3)):(ee(w,R,w.bl_tree),J(w,W-11,7));O=M,de=(W=0)===G?(re=138,3):M===G?(re=6,3):(re=7,4)}}l(H);var P=!1;function _(w,I,$,K){J(w,(h<<1)+(K?1:0),3),(function(M,O,G,W){se(M),q(M,G),q(M,~G),i.arraySet(M.pending_buf,M.window,O,G,M.pending),M.pending+=G})(w,I,$)}u._tr_init=function(w){P||((function(){var I,$,K,M,O,G=new Array(b+1);for(M=K=0;M<p-1;M++)for(B[M]=K,I=0;I<1<<C[M];I++)a[K++]=M;for(a[K-1]=M,M=O=0;M<16;M++)for(H[M]=O,I=0;I<1<<D[M];I++)F[O++]=M;for(O>>=7;M<c;M++)for(H[M]=O<<7,I=0;I<1<<D[M]-7;I++)F[256+O++]=M;for($=0;$<=b;$++)G[$]=0;for(I=0;I<=143;)Y[2*I+1]=8,I++,G[8]++;for(;I<=255;)Y[2*I+1]=9,I++,G[9]++;for(;I<=279;)Y[2*I+1]=7,I++,G[7]++;for(;I<=287;)Y[2*I+1]=8,I++,G[8]++;for(ie(Y,x+1,G),I=0;I<c;I++)E[2*I+1]=5,E[2*I]=ue(I,5);te=new Q(Y,C,v+1,x,b),U=new Q(E,D,0,c,b),V=new Q(new Array(0),L,0,g,y)})(),P=!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,V),w.bi_buf=0,w.bi_valid=0,ae(w)},u._tr_stored_block=_,u._tr_flush_block=function(w,I,$,K){var M,O,G=0;0<w.level?(w.strm.data_type===2&&(w.strm.data_type=(function(W){var re,de=4093624447;for(re=0;re<=31;re++,de>>>=1)if(1&de&&W.dyn_ltree[2*re]!==0)return o;if(W.dyn_ltree[18]!==0||W.dyn_ltree[20]!==0||W.dyn_ltree[26]!==0)return n;for(re=32;re<v;re++)if(W.dyn_ltree[2*re]!==0)return n;return o})(w)),_e(w,w.l_desc),_e(w,w.d_desc),G=(function(W){var re;for(t(W,W.dyn_ltree,W.l_desc.max_code),t(W,W.dyn_dtree,W.d_desc.max_code),_e(W,W.bl_desc),re=g-1;3<=re&&W.bl_tree[2*Z[re]+1]===0;re--);return W.opt_len+=3*(re+1)+5+5+4,re})(w),M=w.opt_len+3+7>>>3,(O=w.static_len+3+7>>>3)<=M&&(M=O)):M=O=$+5,$+4<=M&&I!==-1?_(w,I,$,K):w.strategy===4||O===M?(J(w,2+(K?1:0),3),xe(w,Y,E)):(J(w,4+(K?1:0),3),(function(W,re,de,le){var ke;for(J(W,re-257,5),J(W,de-1,5),J(W,le-4,4),ke=0;ke<le;ke++)J(W,W.bl_tree[2*Z[ke]+1],3);T(W,W.dyn_ltree,re-1),T(W,W.dyn_dtree,de-1)})(w,w.l_desc.max_code+1,w.d_desc.max_code+1,G+1),xe(w,w.dyn_ltree,w.dyn_dtree)),ae(w),K&&se(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[$]+v+1)]++,w.dyn_dtree[2*S(I)]++),w.last_lit===w.lit_bufsize-1},u._tr_align=function(w){J(w,2,3),ee(w,j,Y),(function(I){I.bi_valid===16?(q(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,p,v,x=1,c={},g=!1,d=o.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(o);b=b&&b.setTimeout?b:o,l={}.toString.call(o.process)==="[object process]"?function(N){process.nextTick(function(){y(N)})}:(function(){if(o.postMessage&&!o.importScripts){var N=!0,A=o.onmessage;return o.onmessage=function(){N=!1},o.postMessage("","*"),o.onmessage=A,N}})()?(v="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",j,!1):o.attachEvent("onmessage",j),function(N){o.postMessage(v+N,"*")}):o.MessageChannel?((p=new MessageChannel).port1.onmessage=function(N){y(N.data)},function(N){p.port2.postMessage(N)}):d&&"onreadystatechange"in d.createElement("script")?(h=d.documentElement,function(N){var A=d.createElement("script");A.onreadystatechange=function(){y(N),A.onreadystatechange=null,h.removeChild(A),A=null},h.appendChild(A)}):function(N){setTimeout(y,0,N)},b.setImmediate=function(N){typeof N!="function"&&(N=new Function(""+N));for(var A=new Array(arguments.length-1),R=0;R<A.length;R++)A[R]=arguments[R+1];var C={callback:N,args:A};return c[x]=C,l(x),x++},b.clearImmediate=f}function f(N){delete c[N]}function y(N){if(g)setTimeout(y,0,N);else{var A=c[N];if(A){g=!0;try{(function(R){var C=R.callback,D=R.args;switch(D.length){case 0:C();break;case 1:C(D[0]);break;case 2:C(D[0],D[1]);break;case 3:C(D[0],D[1],D[2]);break;default:C.apply(n,D)}})(A)}finally{f(N),g=!1}}}}function j(N){N.source===o&&typeof N.data=="string"&&N.data.indexOf(v)===0&&y(+N.data.slice(v.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 Or=Tr();const Dr=Ir(Or);var qe={exports:{}},Lr=qe.exports,Nt;function Pr(){return Nt||(Nt=1,(function(e,k){(function(r,m){m()})(Lr,function(){function r(h,p){return typeof p>"u"?p={autoBom:!1}:typeof p!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),p={autoBom:!p}),p.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,p,v){var x=new XMLHttpRequest;x.open("GET",h),x.responseType="blob",x.onload=function(){l(x.response,p,v)},x.onerror=function(){console.error("could not download file")},x.send()}function u(h){var p=new XMLHttpRequest;p.open("HEAD",h,!1);try{p.send()}catch{}return 200<=p.status&&299>=p.status}function i(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var p=document.createEvent("MouseEvents");p.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(p)}}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,p,v){var x=o.URL||o.webkitURL,c=document.createElement("a");p=p||h.name||"download",c.download=p,c.rel="noopener",typeof h=="string"?(c.href=h,c.origin===location.origin?i(c):u(c.href)?m(h,p,v):i(c,c.target="_blank")):(c.href=x.createObjectURL(h),setTimeout(function(){x.revokeObjectURL(c.href)},4e4),setTimeout(function(){i(c)},0))}:"msSaveOrOpenBlob"in navigator?function(h,p,v){if(p=p||h.name||"download",typeof h!="string")navigator.msSaveOrOpenBlob(r(h,v),p);else if(u(h))m(h,p,v);else{var x=document.createElement("a");x.href=h,x.target="_blank",setTimeout(function(){i(x)})}}:function(h,p,v,x){if(x=x||open("","_blank"),x&&(x.document.title=x.document.body.innerText="downloading..."),typeof h=="string")return m(h,p,v);var c=h.type==="application/octet-stream",g=/constructor/i.test(o.HTMLElement)||o.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent);if((d||c&&g||n)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var j=b.result;j=d?j:j.replace(/^data:[^;]*;/,"data:attachment/file;"),x?x.location.href=j:location=j,x=null},b.readAsDataURL(h)}else{var f=o.URL||o.webkitURL,y=f.createObjectURL(h);x?x.location=y:location.href=y,x=null,setTimeout(function(){f.revokeObjectURL(y)},4e4)}});o.saveAs=l.saveAs=l,e.exports=l})})(qe)),qe.exports}var St=Pr();const Ct=async(e,k)=>{const r=new Dr,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(`${k}.json`,JSON.stringify(e.page,null,2));const i=await r.generateAsync({type:"blob"});St.saveAs(i,`jsonpages-project-${k}-${Date.now()}.zip`)},At=(e,k,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"});St.saveAs(h,`${k}.html`)};function It(e){var k,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(k=0;k<u;k++)e[k]&&(r=It(e[k]))&&(m&&(m+=" "),m+=r)}else for(r in e)e[r]&&(m&&(m+=" "),m+=r);return m}function Fr(){for(var e,k,r=0,m="",u=arguments.length;r<u;r++)(e=arguments[r])&&(k=It(e))&&(m&&(m+=" "),m+=k);return m}const Rr=(e,k)=>{const r=new Array(e.length+k.length);for(let m=0;m<e.length;m++)r[m]=e[m];for(let m=0;m<k.length;m++)r[e.length+m]=k[m];return r},Mr=(e,k)=>({classGroupId:e,validator:k}),Tt=(e=new Map,k=null,r)=>({nextPart:e,validators:k,classGroupId:r}),Ye="-",Ot=[],Br="arbitrary..",Ur=e=>{const k=$r(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:m}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Wr(o);const n=o.split(Ye),l=n[0]===""&&n.length>1?1:0;return Dt(n,l,k)},getConflictingClassGroupIds:(o,n)=>{if(n){const l=m[o],h=r[o];return l?h?Rr(h,l):l:h||Ot}return r[o]||Ot}}},Dt=(e,k,r)=>{if(e.length-k===0)return r.classGroupId;const u=e[k],i=r.nextPart.get(u);if(i){const h=Dt(e,k+1,i);if(h)return h}const o=r.validators;if(o===null)return;const n=k===0?e.join(Ye):e.slice(k).join(Ye),l=o.length;for(let h=0;h<l;h++){const p=o[h];if(p.validator(n))return p.classGroupId}},Wr=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const k=e.slice(1,-1),r=k.indexOf(":"),m=k.slice(0,r);return m?Br+m:void 0})(),$r=e=>{const{theme:k,classGroups:r}=e;return Zr(r,k)},Zr=(e,k)=>{const r=Tt();for(const m in e){const u=e[m];dt(u,r,m,k)}return r},dt=(e,k,r,m)=>{const u=e.length;for(let i=0;i<u;i++){const o=e[i];Gr(o,k,r,m)}},Gr=(e,k,r,m)=>{if(typeof e=="string"){Hr(e,k,r);return}if(typeof e=="function"){Vr(e,k,r,m);return}Kr(e,k,r,m)},Hr=(e,k,r)=>{const m=e===""?k:Lt(k,e);m.classGroupId=r},Vr=(e,k,r,m)=>{if(Jr(e)){dt(e(m),k,r,m);return}k.validators===null&&(k.validators=[]),k.validators.push(Mr(r,e))},Kr=(e,k,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(k,n),r,m)}},Lt=(e,k)=>{let r=e;const m=k.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},Jr=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,qr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let k=0,r=Object.create(null),m=Object.create(null);const u=(i,o)=>{r[i]=o,k++,k>e&&(k=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=":",Yr=[],Ft=(e,k,r,m,u)=>({modifiers:e,hasImportantModifier:k,baseClassName:r,maybePostfixModifierPosition:m,isExternal:u}),Xr=e=>{const{prefix:k,experimentalParseClassName:r}=e;let m=u=>{const i=[];let o=0,n=0,l=0,h;const p=u.length;for(let d=0;d<p;d++){const b=u[d];if(o===0&&n===0){if(b===Pt){i.push(u.slice(l,d)),l=d+1;continue}if(b==="/"){h=d;continue}}b==="["?o++:b==="]"?o--:b==="("?n++:b===")"&&n--}const v=i.length===0?u:u.slice(l);let x=v,c=!1;v.endsWith(ut)?(x=v.slice(0,-1),c=!0):v.startsWith(ut)&&(x=v.slice(1),c=!0);const g=h&&h>l?h-l:void 0;return Ft(i,c,x,g)};if(k){const u=k+Pt,i=m;m=o=>o.startsWith(u)?i(o.slice(u.length)):Ft(Yr,!1,o,void 0,!0)}if(r){const u=m;m=i=>r({className:i,parseClassName:u})}return m},Qr=e=>{const k=new Map;return e.orderSensitiveModifiers.forEach((r,m)=>{k.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=k.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}},en=e=>({cache:qr(e.cacheSize),parseClassName:Xr(e),sortModifiers:Qr(e),...Ur(e)}),tn=/\s+/,rn=(e,k)=>{const{parseClassName:r,getClassGroupId:m,getConflictingClassGroupIds:u,sortModifiers:i}=k,o=[],n=e.trim().split(tn);let l="";for(let h=n.length-1;h>=0;h-=1){const p=n[h],{isExternal:v,modifiers:x,hasImportantModifier:c,baseClassName:g,maybePostfixModifierPosition:d}=r(p);if(v){l=p+(l.length>0?" "+l:l);continue}let b=!!d,f=m(b?g.substring(0,d):g);if(!f){if(!b){l=p+(l.length>0?" "+l:l);continue}if(f=m(g),!f){l=p+(l.length>0?" "+l:l);continue}b=!1}const y=x.length===0?"":x.length===1?x[0]:i(x).join(":"),j=c?y+ut:y,N=j+f;if(o.indexOf(N)>-1)continue;o.push(N);const A=u(f,b);for(let R=0;R<A.length;++R){const C=A[R];o.push(j+C)}l=p+(l.length>0?" "+l:l)}return l},nn=(...e)=>{let k=0,r,m,u="";for(;k<e.length;)(r=e[k++])&&(m=Rt(r))&&(u&&(u+=" "),u+=m);return u},Rt=e=>{if(typeof e=="string")return e;let k,r="";for(let m=0;m<e.length;m++)e[m]&&(k=Rt(e[m]))&&(r&&(r+=" "),r+=k);return r},on=(e,...k)=>{let r,m,u,i;const o=l=>{const h=k.reduce((p,v)=>v(p),e());return r=en(h),m=r.cache.get,u=r.cache.set,i=n,n(l)},n=l=>{const h=m(l);if(h)return h;const p=rn(l,r);return u(l,p),p};return i=o,(...l)=>i(nn(...l))},an=[],ye=e=>{const k=r=>r[e]||an;return k.isThemeGetter=!0,k},Mt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Bt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sn=/^\d+\/\d+$/,ln=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cn=/\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$/,dn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,un=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Le=e=>sn.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),Ie=e=>!!e&&Number.isInteger(Number(e)),ht=e=>e.endsWith("%")&&ce(e.slice(0,-1)),Se=e=>ln.test(e),pn=()=>!0,fn=e=>cn.test(e)&&!dn.test(e),Ut=()=>!1,mn=e=>un.test(e),bn=e=>hn.test(e),gn=e=>!ne(e)&&!oe(e),vn=e=>Pe(e,Ht,Ut),ne=e=>Mt.test(e),Te=e=>Pe(e,Vt,fn),pt=e=>Pe(e,_n,ce),Wt=e=>Pe(e,Zt,Ut),xn=e=>Pe(e,Gt,bn),Xe=e=>Pe(e,Kt,mn),oe=e=>Bt.test(e),Be=e=>Fe(e,Vt),wn=e=>Fe(e,zn),$t=e=>Fe(e,Zt),yn=e=>Fe(e,Ht),kn=e=>Fe(e,Gt),Qe=e=>Fe(e,Kt,!0),Pe=(e,k,r)=>{const m=Mt.exec(e);return m?m[1]?k(m[1]):r(m[2]):!1},Fe=(e,k,r=!1)=>{const m=Bt.exec(e);return m?m[1]?k(m[1]):r:!1},Zt=e=>e==="position"||e==="percentage",Gt=e=>e==="image"||e==="url",Ht=e=>e==="length"||e==="size"||e==="bg-size",Vt=e=>e==="length",_n=e=>e==="number",zn=e=>e==="family-name",Kt=e=>e==="shadow",jn=on(()=>{const e=ye("color"),k=ye("font"),r=ye("text"),m=ye("font-weight"),u=ye("tracking"),i=ye("leading"),o=ye("breakpoint"),n=ye("container"),l=ye("spacing"),h=ye("radius"),p=ye("shadow"),v=ye("inset-shadow"),x=ye("text-shadow"),c=ye("drop-shadow"),g=ye("blur"),d=ye("perspective"),b=ye("aspect"),f=ye("ease"),y=ye("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...N(),oe,ne],R=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],D=()=>[oe,ne,l],L=()=>[Le,"full","auto",...D()],Z=()=>[Ie,"none","subgrid",oe,ne],Y=()=>["auto",{span:["full",Ie,oe,ne]},Ie,oe,ne],E=()=>[Ie,"auto",oe,ne],F=()=>["auto","min","max","fr",oe,ne],a=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],te=()=>["auto",...D()],U=()=>[Le,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],V=()=>[e,oe,ne],H=()=>[...N(),$t,Wt,{position:[oe,ne]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",yn,vn,{size:[oe,ne]}],S=()=>[ht,Be,Te],q=()=>["","none","full",h,oe,ne],J=()=>["",ce,Be,Te],ee=()=>["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=()=>[ce,ht,$t,Wt],ae=()=>["","none",g,oe,ne],se=()=>["none",ce,oe,ne],ge=()=>["none",ce,oe,ne],pe=()=>[ce,oe,ne],xe=()=>[Le,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Se],breakpoint:[Se],color:[pn],container:[Se],"drop-shadow":[Se],ease:["in","out","in-out"],font:[gn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Se],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Se],shadow:[Se],spacing:["px",ce],text:[Se],"text-shadow":[Se],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Le,ne,oe,b]}],container:["container"],columns:[{columns:[ce,ne,oe,n]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"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:A()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[Ie,"auto",oe,ne]}],basis:[{basis:[Le,"full","auto",n,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,Le,"auto","initial","none",ne]}],grow:[{grow:["",ce,oe,ne]}],shrink:[{shrink:["",ce,oe,ne]}],order:[{order:[Ie,"first","last","none",oe,ne]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...a(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...a()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":a()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],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,Be,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:[wn,ne,k]}],"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":[ce,"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:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",oe,Te]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[ce,"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:H()}],"bg-repeat":[{bg:Q()}],"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]},kn,xn]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:S()}],"gradient-via-pos":[{via:S()}],"gradient-to-pos":[{to:S()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,oe,ne]}],"outline-w":[{outline:["",ce,Be,Te]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",p,Qe,Xe]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",v,Qe,Xe]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[ce,Te]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",x,Qe,Xe]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[ce,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":[ce]}],"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":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"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":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"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":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"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":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"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":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"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":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"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":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"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":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"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":N()}],"mask-image-conic-pos":[{"mask-conic":[ce]}],"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":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,ne]}],filter:[{filter:["","none",oe,ne]}],blur:[{blur:ae()}],brightness:[{brightness:[ce,oe,ne]}],contrast:[{contrast:[ce,oe,ne]}],"drop-shadow":[{"drop-shadow":["","none",c,Qe,Xe]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",ce,oe,ne]}],"hue-rotate":[{"hue-rotate":[ce,oe,ne]}],invert:[{invert:["",ce,oe,ne]}],saturate:[{saturate:[ce,oe,ne]}],sepia:[{sepia:["",ce,oe,ne]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,ne]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[ce,oe,ne]}],"backdrop-contrast":[{"backdrop-contrast":[ce,oe,ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ce,oe,ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ce,oe,ne]}],"backdrop-invert":[{"backdrop-invert":["",ce,oe,ne]}],"backdrop-opacity":[{"backdrop-opacity":[ce,oe,ne]}],"backdrop-saturate":[{"backdrop-saturate":[ce,oe,ne]}],"backdrop-sepia":[{"backdrop-sepia":["",ce,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:[ce,"initial",oe,ne]}],ease:[{ease:["linear","initial",f,oe,ne]}],delay:[{delay:[ce,oe,ne]}],animate:[{animate:["none",y,oe,ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[d,oe,ne]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ge()}],"scale-x":[{"scale-x":ge()}],"scale-y":[{"scale-y":ge()}],"scale-z":[{"scale-z":ge()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[oe,ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:xe()}],"translate-x":[{"translate-x":xe()}],"translate-y":[{"translate-y":xe()}],"translate-z":[{"translate-z":xe()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"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",...V()]}],"stroke-w":[{stroke:[ce,Be,Te,pt]}],stroke:[{stroke:["none",...V()]}],"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 jn(Fr(e))}var et={exports:{}},Ue={};/**
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 Jt;function En(){if(Jt)return Ue;Jt=1;var e=Symbol.for("react.transitional.element"),y=Symbol.for("react.fragment");function r(m,u,i){var o=null;if(i!==void 0&&(o=""+i),u.key!==void 0&&(o=""+u.key),"key"in u){i={};for(var n in u)n!=="key"&&(i[n]=u[n])}else i=u;return u=i.ref,{$$typeof:e,type:m,key:o,ref:u!==void 0?u:null,props:i}}return Ue.Fragment=y,Ue.jsx=r,Ue.jsxs=r,Ue}var We={};/**
20
+ */var Jt;function En(){if(Jt)return Ue;Jt=1;var e=Symbol.for("react.transitional.element"),k=Symbol.for("react.fragment");function r(m,u,i){var o=null;if(i!==void 0&&(o=""+i),u.key!==void 0&&(o=""+u.key),"key"in u){i={};for(var n in u)n!=="key"&&(i[n]=u[n])}else i=u;return u=i.ref,{$$typeof:e,type:m,key:o,ref:u!==void 0?u:null,props:i}}return Ue.Fragment=k,Ue.jsx=r,Ue.jsxs=r,Ue}var We={};/**
21
21
  * @license React
22
22
  * react-jsx-runtime.development.js
23
23
  *
@@ -25,17 +25,17 @@
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 qt;function Nn(){return qt||(qt=1,process.env.NODE_ENV!=="production"&&(function(){function e(z){if(z==null)return null;if(typeof z=="function")return z.$$typeof===Y?null:z.displayName||z.name||null;if(typeof z=="string")return z;switch(z){case b:return"Fragment";case k:return"Profiler";case f:return"StrictMode";case R:return"Suspense";case C:return"SuspenseList";case Z:return"Activity"}if(typeof z=="object")switch(typeof z.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),z.$$typeof){case d:return"Portal";case N:return z.displayName||"Context";case j:return(z._context.displayName||"Context")+".Consumer";case A:var S=z.render;return z=z.displayName,z||(z=S.displayName||S.name||"",z=z!==""?"ForwardRef("+z+")":"ForwardRef"),z;case D:return S=z.displayName||null,S!==null?S:e(z.type)||"Memo";case L:S=z._payload,z=z._init;try{return e(z(S))}catch{}}return null}function y(z){return""+z}function r(z){try{y(z);var S=!1}catch{S=!0}if(S){S=console;var q=S.error,J=typeof Symbol=="function"&&Symbol.toStringTag&&z[Symbol.toStringTag]||z.constructor.name||"Object";return q.call(S,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",J),y(z)}}function m(z){if(z===b)return"<>";if(typeof z=="object"&&z!==null&&z.$$typeof===L)return"<...>";try{var S=e(z);return S?"<"+S+">":"<...>"}catch{return"<...>"}}function u(){var z=E.A;return z===null?null:z.getOwner()}function i(){return Error("react-stack-top-frame")}function o(z){if(F.call(z,"key")){var S=Object.getOwnPropertyDescriptor(z,"key").get;if(S&&S.isReactWarning)return!1}return z.key!==void 0}function n(z,S){function q(){te||(te=!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)",S))}q.isReactWarning=!0,Object.defineProperty(z,"key",{get:q,configurable:!0})}function l(){var z=e(this.type);return U[z]||(U[z]=!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.")),z=this.props.ref,z!==void 0?z:null}function h(z,S,q,J,ee,ue){var ie=q.ref;return z={$$typeof:g,type:z,key:S,props:q,_owner:J},(ie!==void 0?ie:null)!==null?Object.defineProperty(z,"ref",{enumerable:!1,get:l}):Object.defineProperty(z,"ref",{enumerable:!1,value:null}),z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(z,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(z,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.defineProperty(z,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ue}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z}function p(z,S,q,J,ee,ue){var ie=S.children;if(ie!==void 0)if(J)if(a(ie)){for(J=0;J<ie.length;J++)v(ie[J]);Object.freeze&&Object.freeze(ie)}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(ie);if(F.call(S,"key")){ie=e(z);var ae=Object.keys(S).filter(function(ge){return ge!=="key"});J=0<ae.length?"{key: someKey, "+ae.join(": ..., ")+": ...}":"{key: someKey}",Q[ie+J]||(ae=0<ae.length?"{"+ae.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
28
+ */var qt;function Nn(){return qt||(qt=1,process.env.NODE_ENV!=="production"&&(function(){function e(z){if(z==null)return null;if(typeof z=="function")return z.$$typeof===Y?null:z.displayName||z.name||null;if(typeof z=="string")return z;switch(z){case b:return"Fragment";case y:return"Profiler";case f:return"StrictMode";case R:return"Suspense";case C:return"SuspenseList";case Z:return"Activity"}if(typeof z=="object")switch(typeof z.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),z.$$typeof){case d:return"Portal";case N:return z.displayName||"Context";case j:return(z._context.displayName||"Context")+".Consumer";case A:var S=z.render;return z=z.displayName,z||(z=S.displayName||S.name||"",z=z!==""?"ForwardRef("+z+")":"ForwardRef"),z;case D:return S=z.displayName||null,S!==null?S:e(z.type)||"Memo";case L:S=z._payload,z=z._init;try{return e(z(S))}catch{}}return null}function k(z){return""+z}function r(z){try{k(z);var S=!1}catch{S=!0}if(S){S=console;var q=S.error,J=typeof Symbol=="function"&&Symbol.toStringTag&&z[Symbol.toStringTag]||z.constructor.name||"Object";return q.call(S,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",J),k(z)}}function m(z){if(z===b)return"<>";if(typeof z=="object"&&z!==null&&z.$$typeof===L)return"<...>";try{var S=e(z);return S?"<"+S+">":"<...>"}catch{return"<...>"}}function u(){var z=E.A;return z===null?null:z.getOwner()}function i(){return Error("react-stack-top-frame")}function o(z){if(F.call(z,"key")){var S=Object.getOwnPropertyDescriptor(z,"key").get;if(S&&S.isReactWarning)return!1}return z.key!==void 0}function n(z,S){function q(){te||(te=!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)",S))}q.isReactWarning=!0,Object.defineProperty(z,"key",{get:q,configurable:!0})}function l(){var z=e(this.type);return U[z]||(U[z]=!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.")),z=this.props.ref,z!==void 0?z:null}function h(z,S,q,J,ee,ue){var ie=q.ref;return z={$$typeof:g,type:z,key:S,props:q,_owner:J},(ie!==void 0?ie:null)!==null?Object.defineProperty(z,"ref",{enumerable:!1,get:l}):Object.defineProperty(z,"ref",{enumerable:!1,value:null}),z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(z,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(z,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.defineProperty(z,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ue}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z}function p(z,S,q,J,ee,ue){var ie=S.children;if(ie!==void 0)if(J)if(a(ie)){for(J=0;J<ie.length;J++)v(ie[J]);Object.freeze&&Object.freeze(ie)}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(ie);if(F.call(S,"key")){ie=e(z);var ae=Object.keys(S).filter(function(ge){return ge!=="key"});J=0<ae.length?"{key: someKey, "+ae.join(": ..., ")+": ...}":"{key: someKey}",Q[ie+J]||(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} />`,J,ie,ae,ie),Q[ie+J]=!0)}if(ie=null,q!==void 0&&(r(q),ie=""+q),o(S)&&(r(S.key),ie=""+S.key),"key"in S){q={};for(var se in S)se!=="key"&&(q[se]=S[se])}else q=S;return ie&&n(q,typeof z=="function"?z.displayName||z.name||"Unknown":z),h(z,ie,q,u(),ee,ue)}function v(z){x(z)?z._store&&(z._store.validated=1):typeof z=="object"&&z!==null&&z.$$typeof===L&&(z._payload.status==="fulfilled"?x(z._payload.value)&&z._payload.value._store&&(z._payload.value._store.validated=1):z._store&&(z._store.validated=1))}function x(z){return typeof z=="object"&&z!==null&&z.$$typeof===g}var c=X,g=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),N=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),Y=Symbol.for("react.client.reference"),E=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,a=Array.isArray,B=console.createTask?console.createTask:function(){return null};c={react_stack_bottom_frame:function(z){return z()}};var te,U={},V=c.react_stack_bottom_frame.bind(c,i)(),H=B(m(i)),Q={};We.Fragment=b,We.jsx=function(z,S,q){var J=1e4>E.recentlyCreatedOwnerStacks++;return p(z,S,q,!1,J?Error("react-stack-top-frame"):V,J?B(m(z)):H)},We.jsxs=function(z,S,q){var J=1e4>E.recentlyCreatedOwnerStacks++;return p(z,S,q,!0,J?Error("react-stack-top-frame"):V,J?B(m(z)):H)}})()),We}var Yt;function Sn(){return Yt||(Yt=1,process.env.NODE_ENV==="production"?et.exports=En():et.exports=Nn()),et.exports}var s=Sn();const Xt=X.createContext(void 0),Qt=({config:e,children:y})=>s.jsx(Xt.Provider,{value:{registry:e.registry,schemas:e.schemas,tenantId:e.tenantId,assets:e.assets},children:y});function $e(){const e=X.useContext(Xt);if(e===void 0)throw new Error("useConfig must be used within ConfigProvider");return e}const er=X.createContext(void 0),tt=({mode:e,children:y})=>(X.useEffect(()=>{if(e!=="studio")return;const r=new MutationObserver(m=>{m.forEach(u=>{u.addedNodes.forEach(i=>{i instanceof HTMLElement&&i.hasAttribute("data-radix-portal")&&i.setAttribute("data-jp-studio-portal","true")})})});return r.observe(document.body,{childList:!0}),()=>r.disconnect()},[e]),s.jsx(er.Provider,{value:{mode:e},children:y})),tr=()=>{const e=X.useContext(er);if(e===void 0)throw new Error("useStudio must be used within a StudioProvider");return e};/**
33
+ <%s key={someKey} {...props} />`,J,ie,ae,ie),Q[ie+J]=!0)}if(ie=null,q!==void 0&&(r(q),ie=""+q),o(S)&&(r(S.key),ie=""+S.key),"key"in S){q={};for(var se in S)se!=="key"&&(q[se]=S[se])}else q=S;return ie&&n(q,typeof z=="function"?z.displayName||z.name||"Unknown":z),h(z,ie,q,u(),ee,ue)}function v(z){x(z)?z._store&&(z._store.validated=1):typeof z=="object"&&z!==null&&z.$$typeof===L&&(z._payload.status==="fulfilled"?x(z._payload.value)&&z._payload.value._store&&(z._payload.value._store.validated=1):z._store&&(z._store.validated=1))}function x(z){return typeof z=="object"&&z!==null&&z.$$typeof===g}var c=X,g=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),N=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),Y=Symbol.for("react.client.reference"),E=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=Object.prototype.hasOwnProperty,a=Array.isArray,B=console.createTask?console.createTask:function(){return null};c={react_stack_bottom_frame:function(z){return z()}};var te,U={},V=c.react_stack_bottom_frame.bind(c,i)(),H=B(m(i)),Q={};We.Fragment=b,We.jsx=function(z,S,q){var J=1e4>E.recentlyCreatedOwnerStacks++;return p(z,S,q,!1,J?Error("react-stack-top-frame"):V,J?B(m(z)):H)},We.jsxs=function(z,S,q){var J=1e4>E.recentlyCreatedOwnerStacks++;return p(z,S,q,!0,J?Error("react-stack-top-frame"):V,J?B(m(z)):H)}})()),We}var Yt;function Sn(){return Yt||(Yt=1,process.env.NODE_ENV==="production"?et.exports=En():et.exports=Nn()),et.exports}var s=Sn();const Xt=X.createContext(void 0),Qt=({config:e,children:k})=>s.jsx(Xt.Provider,{value:{registry:e.registry,schemas:e.schemas,tenantId:e.tenantId,assets:e.assets},children:k});function $e(){const e=X.useContext(Xt);if(e===void 0)throw new Error("useConfig must be used within ConfigProvider");return e}const er=X.createContext(void 0),tt=({mode:e,children:k})=>(X.useEffect(()=>{if(e!=="studio")return;const r=new MutationObserver(m=>{m.forEach(u=>{u.addedNodes.forEach(i=>{i instanceof HTMLElement&&i.hasAttribute("data-radix-portal")&&i.setAttribute("data-jp-studio-portal","true")})})});return r.observe(document.body,{childList:!0}),()=>r.disconnect()},[e]),s.jsx(er.Provider,{value:{mode:e},children:k})),tr=()=>{const e=X.useContext(er);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 Cn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rr=(...e)=>e.filter((y,r,m)=>!!y&&y.trim()!==""&&m.indexOf(y)===r).join(" ").trim();/**
38
+ */const Cn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rr=(...e)=>e.filter((k,r,m)=>!!k&&k.trim()!==""&&m.indexOf(k)===r).join(" ").trim();/**
39
39
  * @license lucide-react v0.474.0 - ISC
40
40
  *
41
41
  * This source code is licensed under the ISC license.
@@ -45,12 +45,12 @@ React keys must be passed directly to JSX without using spread:
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 In=X.forwardRef(({color:e="currentColor",size:y=24,strokeWidth:r=2,absoluteStrokeWidth:m,className:u="",children:i,iconNode:o,...n},l)=>X.createElement("svg",{ref:l,...An,width:y,height:y,stroke:e,strokeWidth:m?Number(r)*24/Number(y):r,className:rr("lucide",u),...n},[...o.map(([h,p])=>X.createElement(h,p)),...Array.isArray(i)?i:[i]]));/**
48
+ */const In=X.forwardRef(({color:e="currentColor",size:k=24,strokeWidth:r=2,absoluteStrokeWidth:m,className:u="",children:i,iconNode:o,...n},l)=>X.createElement("svg",{ref:l,...An,width:k,height:k,stroke:e,strokeWidth:m?Number(r)*24/Number(k):r,className:rr("lucide",u),...n},[...o.map(([h,p])=>X.createElement(h,p)),...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 be=(e,y)=>{const r=X.forwardRef(({className:m,...u},i)=>X.createElement(In,{ref:i,iconNode:y,className:rr(`lucide-${Cn(e)}`,m),...u}));return r.displayName=`${e}`,r};/**
53
+ */const be=(e,k)=>{const r=X.forwardRef(({className:m,...u},i)=>X.createElement(In,{ref:i,iconNode:k,className:rr(`lucide-${Cn(e)}`,m),...u}));return r.displayName=`${e}`,r};/**
54
54
  * @license lucide-react v0.474.0 - ISC
55
55
  *
56
56
  * This source code is licensed under the ISC license.
@@ -195,4 +195,4 @@ React keys must be passed directly to JSX without using spread:
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 Hn=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 Vn extends X.Component{constructor(y){super(y),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(y,r){console.error(`[JsonPages] Component Crash [${this.props.type}]:`,y,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 Kn=({type:e,scope:y,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:y})]})})},Ze=({section:e,menu:y,selectedId:r,reorderable:m,sectionIndex:u,totalSections:i,onReorder:o})=>{var f,k;const{mode:n}=tr(),{registry:l}=$e(),h=n==="studio",p=h&&r===e.id,v=l[e.type],x=e.type==="header"||e.type==="footer"?"global":"local",c=e.type==="header"&&((f=e.settings)==null?void 0:f.sticky);if(!v)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 g=j=>{var Y,E,F,a,B;if(!h)return;j.preventDefault(),j.stopPropagation();const N=j.currentTarget,A=j.clientX,R=j.clientY;if(j.target===N){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}},"*");return}const C=document.elementFromPoint(A,R)??j.target;if(!C||!N.contains(C)){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}},"*");return}if(C===N){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}},"*");return}const D=[];let L=C;for(;L&&L!==N;){const te=(Y=L.getAttribute)==null?void 0:Y.call(L,"data-jp-item-id"),U=(E=L.getAttribute)==null?void 0:E.call(L,"data-jp-item-field");te&&U&&D.push({fieldKey:U||"items",itemId:te}),L=L.parentElement}if(D.reverse(),D.length===0)for(L=C;L&&L!==N;){const te=(F=L.getAttribute)==null?void 0:F.call(L,"data-jp-field");if(te){D.push({fieldKey:te});break}L=L.parentElement}if(D.length===0&&C){let te=null;const U=V=>{var Q,z;const H=V.getBoundingClientRect();if(H.left<=A&&A<=H.right&&H.top<=R&&R<=H.bottom){for(let S=0;S<V.children.length;S++)U(V.children[S]);((Q=V.getAttribute)!=null&&Q.call(V,"data-jp-item-id")||(z=V.getAttribute)!=null&&z.call(V,"data-jp-field"))&&(te=V)}};if(U(C),te){const V=te,H=(a=V.getAttribute)==null?void 0:a.call(V,"data-jp-item-id"),Q=(B=V.getAttribute)==null?void 0:B.call(V,"data-jp-field");H&&Q?D.push({fieldKey:Q||"items",itemId:H}):Q&&D.push({fieldKey:Q})}}const Z={type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}};if(D.length>0){Z.itemPath=D;const te=D[0];te.itemId!=null?(Z.itemField=te.fieldKey,Z.itemId=te.itemId):Z.itemField=te.fieldKey}window.parent.postMessage(Z,"*")},d=()=>{const j=v;return e.type==="header"&&y?s.jsx(j,{data:e.data,settings:e.settings,menu:y}):s.jsx(j,{data:e.data,settings:e.settings})},b=(k=e.data)==null?void 0:k.anchorId;return s.jsxs("div",{id:b||void 0,"data-section-id":h?e.id:void 0,"data-section-type":h?e.type:void 0,"data-section-scope":h?x:void 0,...h&&p?{"data-jp-selected":!0}:{},onClickCapture:h?g:void 0,className:he("relative w-full",h&&"group cursor-pointer",h&&c?"sticky top-0 z-[60]":"relative z-0",p&&"z-[70]"),children:[s.jsx("div",{className:"relative z-0",children:s.jsx(Vn,{type:e.type,children:d()})}),h&&s.jsx(Kn,{type:e.type,scope:x,isSelected:!!p,sectionId:m&&x==="local"?e.id:void 0,sectionIndex:m&&x==="local"?u:void 0,totalSections:m&&x==="local"?i:void 0,onReorder:m&&x==="local"?o:void 0})]})},Jn=e=>{X.useEffect(()=>{document.title=e.title;let y=document.querySelector('meta[name="description"]');y||(y=document.createElement("meta"),y.setAttribute("name","description"),document.head.appendChild(y)),y.setAttribute("content",e.description)},[e.title,e.description])},qn="application/json",vt=({pageConfig:e,siteConfig:y,menuConfig:r,selectedId:m,onReorder:u,scrollToSectionId:i,onActiveSectionChange:o})=>{var b,f;Jn(e.meta);const[n,l]=X.useState(null),h=X.useRef({}),p=X.useRef(o);p.current=o;const v=k=>{var j;(j=p.current)==null||j.call(p,k)};X.useEffect(()=>{if(!i)return;const k=h.current[i];k&&k.scrollIntoView({behavior:"smooth",block:"center"})},[i]),X.useEffect(()=>{if(!p.current)return;const j=[...y.header?[y.header.id]:[],...e.sections.map(C=>C.id),...y.footer?[y.footer.id]:[]],N=new IntersectionObserver(C=>{C.forEach(D=>{var L;if(D.isIntersecting&&D.intersectionRatio>.5){const Z=D.target.getAttribute("data-section-id");Z&&((L=p.current)==null||L.call(p,Z))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let A=!1;const R=requestAnimationFrame(()=>{A||j.forEach(C=>{const D=h.current[C];D&&N.observe(D)})});return()=>{A=!0,cancelAnimationFrame(R),N.disconnect()}},[e.sections,(b=y.header)==null?void 0:b.id,(f=y.footer)==null?void 0:f.id]);const x=(k,j)=>{k.preventDefault(),k.dataTransfer.dropEffect="move",l(j)},c=()=>{l(null)},g=(k,j)=>{if(k.preventDefault(),l(null),!!u)try{const N=k.dataTransfer.getData(qn),{sectionId:A}=JSON.parse(N);typeof A=="string"&&u(A,j)}catch{}},d=()=>{const k=typeof u=="function",j=e.sections.map((N,A)=>{const R=n===A;return k?s.jsxs("div",{ref:C=>{h.current[N.id]=C},"data-section-id":N.id,style:{position:"relative"},onMouseEnter:()=>v(N.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:R?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:R?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:C=>x(C,A),onDragLeave:c,onDrop:C=>g(C,A)}),s.jsx(Ze,{section:N,selectedId:m,reorderable:!0,sectionIndex:A,totalSections:e.sections.length,onReorder:u})]},N.id):s.jsx("div",{ref:C=>{h.current[N.id]=C},"data-section-id":N.id,onMouseEnter:()=>v(N.id),children:s.jsx(Ze,{section:N,selectedId:m})},N.id)});if(k&&j.length>0){const N=e.sections.length,A=n===N;j.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:A?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:A?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:R=>x(R,N),onDragLeave:c,onDrop:R=>g(R,N)},"jp-drop-after-last"))}return j};return s.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[y.header!=null&&s.jsx("div",{ref:k=>{h.current[y.header.id]=k},"data-section-id":y.header.id,onMouseEnter:()=>v(y.header.id),children:s.jsx(Ze,{section:y.header,menu:r.main,selectedId:m})}),s.jsx("main",{className:"flex-1",children:d()}),y.footer!=null&&s.jsx("div",{ref:k=>{h.current[y.footer.id]=k},"data-section-id":y.footer.id,onMouseEnter:()=>v(y.footer.id),children:s.jsx(Ze,{section:y.footer,selectedId:m})})]})},ot=({mode:e,tenantCss:y,adminCss:r,children:m})=>(X.useLayoutEffect(()=>{const u=`jp-theme-${e}`,i=e==="tenant"?y: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,y,r]),s.jsx(s.Fragment,{children:m}));function xt({className:e,type:y,...r}){return s.jsx("input",{type:y,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 Yn({className:e,...y}){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),...y})}function Xn({className:e,checked:y,onCheckedChange:r,...m}){return s.jsx("input",{type:"checkbox",checked:y,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,...y}){return s.jsx("label",{className:he("text-sm font-medium leading-none select-none",e),...y})}const dr=me.createContext(null);function Qn(){const e=me.useContext(dr);if(!e)throw new Error("Select components must be used within Select");return e}function eo({value:e,onValueChange:y,children:r}){const m=e??"",u=me.Children.toArray(r).find(v=>me.isValidElement(v)&&v.type===kt),i=me.Children.toArray(r).find(v=>me.isValidElement(v)&&v.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(v=>me.isValidElement(v)&&v.props.value!==void 0).map(v=>({value:v.props.value,label:v.props.children??v.props.value})),[u,o]),h=me.useMemo(()=>{if(!i||!me.isValidElement(i))return"";const v=me.Children.toArray(i.props.children).find(x=>me.isValidElement(x)&&x.type===yt);return v&&me.isValidElement(v)?v.props.placeholder??"":""},[i,n]),p=me.useMemo(()=>({value:m,onValueChange:v=>y==null?void 0:y(v),options:l,placeholder:h}),[m,y,l,h]);return s.jsx(dr.Provider,{value:p,children:i})}function wt({className:e,children:y,...r}){const{value:m,onValueChange:u,options:i,placeholder:o}=Qn();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))]}),y]})}function yt(e){return null}function kt({className:e,children:y}){return s.jsx("div",{className:he("hidden",e),"aria-hidden":!0,children:y})}function ur({className:e,value:y,children:r}){return s.jsx("div",{"data-value":y,className:e,"aria-hidden":!0,children:r})}wt.displayName="SelectTrigger",yt.displayName="SelectValue",kt.displayName="SelectContent",ur.displayName="SelectItem";const hr=me.createContext(null);function pr(){const e=me.useContext(hr);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function fr({open:e,onOpenChange:y,children:r}){const[m,u]=me.useState(!1),i=e!==void 0,o=i?e:m,n=me.useCallback(h=>{i||u(h),y==null||y(h)},[i,y]),l=me.useMemo(()=>({open:o,onOpenChange:n}),[o,n]);return s.jsx(hr.Provider,{value:l,children:r})}function to({asChild:e,children:y}){const{onOpenChange:r}=pr(),m=me.Children.only(y);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:y})}function mr({className:e,children:y,preventCloseOnBackdropClick:r,...m}){const{open:u,onOpenChange:i}=pr();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 Cr.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:y})]}),document.body)}function br({className:e,...y}){return s.jsx("div",{className:he("flex flex-col gap-1.5 pb-4",e),...y})}function ro({className:e,...y}){return s.jsx("div",{className:he("flex justify-end gap-2 pt-4",e),...y})}function gr({className:e,...y}){return s.jsx("h2",{className:he("text-sm font-semibold text-white",e),...y})}function vr({className:e,...y}){return s.jsx("p",{className:he("text-xs text-zinc-400",e),...y})}const De=me.forwardRef(({className:e,variant:y="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 p=u,v=he(n,l[y],h[r],p.props.className,e);return me.cloneElement(p,{className:v})}return s.jsx("button",{ref:o,type:"button",className:he(n,l[y],h[r],e),...i,children:u})});De.displayName="Button";const no=["library","upload","url"];function oo({library:e,selectedId:y,onSelect:r}){const[m,u]=X.useState(""),[i,o]=X.useState("all"),n=["all",...new Set(e.flatMap(h=>h.tags??[]))],l=e.filter(h=>{const p=i==="all"||(h.tags??[]).includes(i),v=!m||(h.alt??"").toLowerCase().includes(m.toLowerCase());return p&&v});return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Un,{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 p=y===h.id;return s.jsxs("button",{type:"button",onClick:()=>r(p?null:h.id),className:he("group relative aspect-[4/3] rounded-lg overflow-hidden","ring-1 transition-all duration-150",p?"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",p?"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",p&&"opacity-100"),children:s.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:h.alt})}),p&&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 io({preview:e,onPreviewChange:y,onAssetUpload:r}){const[m,u]=X.useState(!1),i=X.useRef(null),o=X.useCallback(async p=>{if(!p.type.startsWith("image/"))return;if(r){try{const x=await r(p);y({name:p.name,size:p.size,dataUrl:x})}catch{const x=new FileReader;x.onload=c=>{var g;y({name:p.name,size:p.size,dataUrl:(g=c.target)==null?void 0:g.result})},x.readAsDataURL(p)}return}const v=new FileReader;v.onload=x=>{var c;y({name:p.name,size:p.size,dataUrl:(c=x.target)==null?void 0:c.result})},v.readAsDataURL(p)},[y,r]),n=X.useCallback(p=>{var x,c;p.preventDefault(),p.stopPropagation(),u(!1);const v=(c=(x=p.dataTransfer)==null?void 0:x.files)==null?void 0:c[0];v&&o(v)},[o]),l=X.useCallback(p=>{p.preventDefault(),p.stopPropagation(),u(!0)},[]),h=X.useCallback(p=>{var x;const v=(x=p.target.files)==null?void 0:x[0];v&&o(v)},[o]);return s.jsxs("div",{onDragOver:l,onDragEnter:l,onDragLeave:p=>{p.preventDefault(),p.stopPropagation(),u(!1)},onDrop:n,onClick:()=>{var p;return!e&&((p=i.current)==null?void 0:p.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:p=>{p.stopPropagation(),y(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(cr,{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 ao({urlPreview:e,onUrlPreviewChange:y}){const[r,m]=X.useState(""),[u,i]=X.useState(!1),o=()=>{if(r.trim())try{new URL(r),y(r),i(!1)}catch{i(!0),y(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),y(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(ar,{size:32,className:"mb-3 opacity-40"}),s.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const so=({open:e,onOpenChange:y,onSelect:r})=>{const{assets:m}=$e(),u=(m==null?void 0:m.assetsManifest)??[],[i,o]=X.useState("library"),[n,l]=X.useState(null),[h,p]=X.useState(null),[v,x]=X.useState(null);X.useEffect(()=>{e&&(o("library"),l(null),p(null),x(null))},[e]),X.useEffect(()=>{if(!e||i!=="upload")return;const f=k=>{k.preventDefault()};return document.addEventListener("dragover",f,{capture:!0}),document.addEventListener("drop",f,{capture:!0}),()=>{document.removeEventListener("dragover",f,{capture:!0}),document.removeEventListener("drop",f,{capture:!0})}},[e,i]);const c=i==="library"&&n!=null||i==="upload"&&h!=null||i==="url"&&v!=null,g=()=>{if(i==="library"&&n){const f=u.find(k=>k.id===n);f&&r({url:f.url,alt:f.alt})}else i==="upload"&&h?r({url:h.dataUrl,alt:h.name}):i==="url"&&v&&r({url:v,alt:""});setTimeout(()=>y(!1),0)},d=i==="library"&&n?"1 immagine selezionata":i==="upload"&&h?h.name:i==="url"&&v?"URL pronto":"Nessuna selezione",b=f=>{f.preventDefault(),f.stopPropagation()};return s.jsx(fr,{open:e,onOpenChange:y,children:s.jsxs(mr,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:b,onDrop:b,children:[s.jsxs(br,{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(gr,{children:"Image Picker"}),s.jsx(vr,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),s.jsx("button",{type:"button",onClick:()=>y(!1),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Chiudi",children:s.jsx(Re,{size:18})})]}),s.jsx("div",{className:"flex border-b border-zinc-800",children:no.map(f=>s.jsxs("button",{type:"button",onClick:()=>o(f),className:he("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===f?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[f==="library"&&s.jsx(rt,{size:14}),f==="upload"&&s.jsx(cr,{size:14}),f==="url"&&s.jsx(ar,{size:14}),f==="library"?"Libreria":f==="upload"?"Upload":"URL"]},f))}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&s.jsx(oo,{library:u,selectedId:n,onSelect:l}),i==="upload"&&s.jsx(io,{preview:h,onPreviewChange:p,onAssetUpload:m==null?void 0:m.onAssetUpload}),i==="url"&&s.jsx(ao,{urlPreview:v,onUrlPreviewChange:x})]}),s.jsxs(ro,{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:()=>y(!1),children:"Annulla"}),s.jsx(De,{type:"button",size:"sm",disabled:!c,onClick:g,className:he(!c&&"opacity-40"),children:"Inserisci immagine"})]})]})]})})},xr=(e,y="default")=>{if(e.startsWith("http")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/assets/"))return e;if(e.startsWith("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/${y}/${m}`},lo=({value:e,onChange:y,label:r="IMAGE",className:m})=>{const{tenantId:u="default"}=$e(),[i,o]=X.useState(!1),[n,l]=X.useState(!1),h=!!(e!=null&&e.url),p=e!=null&&e.url?xr(e.url,u):"",v=c=>{y(c),o(!1)},x=c=>{c.stopPropagation(),y({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:p,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:x,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(so,{open:i,onOpenChange:o,onSelect:v})]})},wr=[{name:"layers",Icon:gt},{name:"github",Icon:Rn},{name:"arrow-right",Icon:On},{name:"box",Icon:Ln},{name:"terminal",Icon:Zn},{name:"chevron-right",Icon:Pn},{name:"menu",Icon:Mn},{name:"x",Icon:Re},{name:"sparkles",Icon:Wn},{name:"zap",Icon:Hn}],Ge={"ui:text":({label:e,value:y,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:y||"",onChange:m=>r(m.target.value)})]}),"ui:textarea":({label:e,value:y,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(Yn,{className:"min-h-[80px] text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600 resize-none",value:y||"",onChange:m=>r(m.target.value)})]}),"ui:select":({label:e,value:y,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(eo,{value:y||"",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(ur,{value:u,className:"text-[11px]",children:u},u))})]})]}),"ui:checkbox":({label:e,value:y,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(Xn,{id:e,checked:!!y,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:y,onChange:r})=>{const m=y!=null&&typeof y=="object"&&"url"in y?{url:String(y.url??""),alt:String(y.alt??"")}:{url:typeof y=="string"?y:"",alt:""},u=i=>{r(i)};return s.jsx("div",{className:"mb-4",children:s.jsx(lo,{label:e,value:m,onChange:u})})},"ui:icon-picker":({label:e,value:y,onChange:r})=>{const[m,u]=X.useState(!1),i=wr.find(o=>o.name===(y||""));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(fr,{open:m,onOpenChange:u,children:[s.jsx(to,{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(mr,{className:"sm:max-w-[280px] p-4",children:[s.jsxs(br,{children:[s.jsx(gr,{className:"text-sm",children:"Choose icon"}),s.jsx(vr,{className:"text-xs",children:"Click an icon to select it."})]}),s.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:wr.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",y===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 ze.z.ZodOptional||e instanceof ze.z.ZodDefault)return _t(e._def.innerType);if(e instanceof ze.z.ZodObject){const y={id:crypto.randomUUID()};for(const r in e.shape)r!=="id"&&(y[r]=_t(e.shape[r]));return y}return e instanceof ze.z.ZodArray?[]:e instanceof ze.z.ZodString?"":e instanceof ze.z.ZodNumber?0:e instanceof ze.z.ZodBoolean?!1:e instanceof ze.z.ZodEnum?e._def.values[0]:null},zt=e=>e instanceof ze.z.ZodOptional||e instanceof ze.z.ZodDefault?zt(e._def.innerType):e,it=(e,y)=>e&&!y?"opacity-10":"opacity-100",Me=(e,y)=>e!=null&&y.toLowerCase()===e.toLowerCase(),co=(e,y)=>{if(!e)return;const r=y.toLowerCase(),m=Object.entries(e).find(([u])=>u.toLowerCase()===r);return m==null?void 0:m[1]},He=({schema:e,data:y,onChange:r,keys:m,expandedItemPath:u,expandedItemIdByField:i,focusedFieldKey:o,onSidebarExpandedItemChange:n})=>{const l=e.shape,h=m!=null?Object.keys(l).filter(g=>m.includes(g)):Object.keys(l),p=u==null?void 0:u[0],v=(p==null?void 0:p.itemId)!=null?{[p.fieldKey]:p.itemId}:i,x=(p==null?void 0:p.fieldKey)??o??null,c=x!=null;return s.jsx("div",{className:"space-y-4",children:h.map(g=>{const d=l[g];if(!d)return null;const b=zt(d),f=d.description||"ui:text",k=y[g];if(f==="ui:image-picker"&&b instanceof ze.z.ZodObject){const R=Me(x,g),C=Ge["ui:image-picker"]||Ge["ui:text"];return s.jsx("div",{className:`transition-opacity duration-200 ${it(c,R)}`,...R?{"data-jp-focused-field":g}:{},children:s.jsx(C,{label:g,value:k,onChange:D=>r({...y,[g]:D})})},g)}if(b instanceof ze.z.ZodObject){const R=k||{},C=Me(x,g);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,C)}`,...C?{"data-jp-focused-field":g}:{},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:g})]}),s.jsx(He,{schema:b,data:R,onChange:D=>r({...y,[g]:D}),expandedItemPath:u&&Me(p==null?void 0:p.fieldKey,g)?u.slice(1):void 0,expandedItemIdByField:v,focusedFieldKey:x})]},g)}if(b instanceof ze.z.ZodArray){const R=Array.isArray(k)?k:[],C=zt(b.element),D=(E,F)=>{if(F<0||F>=R.length)return;const a=[...R],[B]=a.splice(E,1);a.splice(F,0,B),r({...y,[g]:a})},L=Me(x,g),Z=Me(p==null?void 0:p.fieldKey,g)?p==null?void 0:p.itemId:void 0,Y=co(v,g)??Z;return s.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${it(c,L)}`,...L?{"data-jp-focused-field":g}:{},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:[g," (",R.length,")"]}),s.jsxs("button",{type:"button",onClick:()=>{const E=_t(C);r({...y,[g]:[...R,E]})},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(sr,{size:12})," Add Item"]})]}),s.jsx("div",{className:"space-y-2",children:R.map((E,F)=>{const a=E,B=a.id||`legacy-${F}`,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)||`${g} #${F+1}`,U=Y,V=String(a.id??B),H=U!=null&&String(U)===V,Q=H&&u&&u.length>1?u.slice(1):void 0,z=c&&L&&U!=null&&!H;return s.jsx(uo,{itemId:V,openItemId:U!=null?String(U):void 0,isFaded:z,index:F,isFirst:F===0,isLast:F===R.length-1,label:te,onExpandedChange:n?S=>n(S?{fieldKey:g,itemId:V}:null):void 0,onRemove:()=>{const S=R.filter((q,J)=>J!==F);r({...y,[g]:S})},onMoveUp:()=>D(F,F-1),onMoveDown:()=>D(F,F+1),children:C instanceof ze.z.ZodObject?s.jsx(He,{schema:C,data:a||{},expandedItemPath:Q,onChange:S=>{const q=[...R];q[F]=S,r({...y,[g]:q})}}):s.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},B)})})]},g)}const j=Ge[f]||Ge["ui:text"],N=b instanceof ze.z.ZodEnum?b._def.values:void 0,A=Me(x,g);return s.jsx("div",{className:`transition-opacity duration-200 ${it(c,A)}`,...A?{"data-jp-focused-field":g}:{},children:s.jsx(j,{label:g,value:k,options:N,onChange:R=>r({...y,[g]:R})})},g)})})},uo=({itemId:e,openItemId:y,isFaded:r=!1,label:m,onExpandedChange:u,onRemove:i,onMoveUp:o,onMoveDown:n,isFirst:l,isLast:h,children:p})=>{const v=y!=null&&String(y)===String(e),[x,c]=X.useState(v);X.useEffect(()=>{v&&!x&&c(!0),!v&&x&&c(!1)},[v,x]);const g=()=>{const b=!x;c(b),u==null||u(b)},d=v&&x;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:g,className:"flex items-center gap-2 text-[10px] font-bold text-zinc-300 uppercase tracking-tight truncate",children:[x?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(Dn,{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(Tn,{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})})]})]}),x&&s.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:p})]})},yr=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),kr=({selectedSection:e,pageData:y,allSectionsData:r=[],onUpdate:m,onUpdateSection:u,onClose:i,expandedItemPath:o=null,onReorderSection:n,allLayers:l=[],activeSectionId:h,onRequestScrollToSection:p,onDeleteSection:v,onAddSection:x,hasChanges:c=!1,onExportHTML:g,onExportJSON:d,onResetToFile:b,showResetToFile:f=!1})=>{const{schemas:k}=$e(),[j,N]=X.useState(!0),[A,R]=X.useState(null),[C,D]=X.useState(null),[L,Z]=X.useState(null),[Y,E]=X.useState(null),[F,a]=X.useState(null),B=X.useRef(null),te=X.useRef(null),U=X.useDeferredValue(e),V=e!=null&&(U==null?void 0:U.id)!==e.id,H=o&&o.length>0?o:Y?[Y]:null,Q=H!=null&&H.length?{fieldKey:H[H.length-1].fieldKey,itemId:H[H.length-1].itemId}:null,z=X.useRef(o);X.useEffect(()=>{z.current!=null&&o==null&&E(null),z.current=o},[o]),X.useEffect(()=>{(e==null?void 0:e.id)!=null&&N(!1)},[e==null?void 0:e.id]);const S=()=>{const T=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const P=B.current;P&&P.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(T)},q=X.useRef(j);X.useEffect(()=>{if(j&&!q.current){const T=S();return q.current=j,T}q.current=j},[j]),X.useEffect(()=>{if(!Q)return;const T=B.current;if(!T)return;const P=requestAnimationFrame(()=>{const _=T.querySelector("[data-jp-expanded-item]")??T.querySelector("[data-jp-focused-field]");_&&_.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(P)},[Q]);const J=T=>{N(!1),p==null||p(T)},ee=()=>{N(T=>{const P=!T;return P&&S(),P})},ue=(T,P)=>{P.stopPropagation(),r.length>0&&u?a(T):(N(!1),p==null||p(T))};X.useEffect(()=>{if(F==null)return;const T=P=>{P.key==="Escape"&&a(null)};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[F]);const ie=T=>{A===T?(v==null||v(T),R(null)):(R(T),setTimeout(()=>R(null),3e3))},ae=(T,P)=>{D(P),T.dataTransfer.effectAllowed="move",T.dataTransfer.setData("application/json",JSON.stringify({sectionId:P}))},se=(T,P)=>{T.preventDefault(),C!==P&&Z(P)},ge=(T,P)=>{if(T.preventDefault(),D(null),Z(null),!C||C===P||!n)return;const _=l.filter($=>$.scope==="local"),w=_.findIndex($=>$.id===C),I=_.findIndex($=>$.id===P);w===-1||I===-1||n(C,I)},pe=e?y.sections.find(T=>T.id===e.id):void 0,xe=U?y.sections.find(T=>T.id===U.id):void 0,_e=U?k[U.type]:void 0,t=l.length>0&&(j||!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:[x!=null&&s.jsxs("button",{type:"button",onClick:x,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(sr,{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(Re,{size:16})})]})]}),l.length>0&&s.jsxs("div",{className:"bg-zinc-900/20 opacity-100",children:[s.jsxs("button",{type:"button",onClick:ee,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":t,"aria-label":t?"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:t?s.jsx(mt,{size:14}):s.jsx(ft,{size:14})})]}),!t&&e&&(()=>{const T=l.find(_=>_.id===e.id);if(!T)return null;const P=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:[T.type,P&&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:T.title??`${T.type} section`})]}),s.jsx("button",{type:"button",onClick:_=>ue(T.id,_),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${T.type}`,"aria-label":`Open settings for ${T.type} section`,children:s.jsx(lr,{size:12})})]})})()]})]}),s.jsxs("div",{ref:B,className:"flex-1 min-h-0 overflow-y-auto flex flex-col custom-scrollbar",children:[t&&s.jsxs("div",{className:"border-b border-zinc-800 bg-zinc-900/20 px-3 pb-3 pt-1",children:[l.map(T=>{const P=(e==null?void 0:e.id)===T.id,_=h===T.id,w=C===T.id,I=L===T.id,$=T.scope==="local"&&v,M=T.scope==="local"&&!!n;return s.jsxs("div",{draggable:M,onDragStart:O=>M&&ae(O,T.id),onDragOver:O=>M&&se(O,T.id),onDragLeave:()=>Z(null),onDrop:O=>M&&ge(O,T.id),onDragEnd:()=>{D(null),Z(null)},className:he("flex items-center gap-2 py-2.5 px-2 rounded-sm border-t transition-colors",I&&"border-t-2 border-dashed border-primary bg-primary/5",!I&&P&&"border-primary/30 bg-primary/10",!I&&!P&&"border-zinc-800/90 hover:bg-zinc-800/40",w&&"opacity-40",M?"cursor-grab active:cursor-grabbing":"cursor-default"),children:[s.jsx(bt,{size:12,className:`shrink-0 ${P?"text-primary":"text-zinc-500"}`}),s.jsxs("button",{type:"button",onClick:()=>J(T.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:[T.type,_&&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 ${P?"text-white font-medium":"text-zinc-500"}`,children:T.title??`${T.type} section`})]}),s.jsx("button",{type:"button",onClick:O=>ue(T.id,O),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${T.type}`,"aria-label":`Open settings for ${T.type} section`,children:s.jsx(lr,{size:12})}),$&&s.jsx("button",{type:"button",onClick:O=>{O.stopPropagation(),ie(T.id)},className:`p-1 rounded shrink-0 ${A===T.id?"bg-red-500/20 text-red-400":"text-zinc-500 hover:text-red-400"}`,title:"Delete section",children:s.jsx(nt,{size:12})})]},T.id)}),A&&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(Fn,{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"})]})]}),Q&&pe&&(()=>{const T=pe.data||{};let P;if(H&&H.length>0){let _=T;for(const $ of H){const K=_==null?void 0:_[$.fieldKey];$.itemId!=null&&Array.isArray(K)?_=K.find(O=>String(O==null?void 0:O.id)===String($.itemId))??null:_=K}const w=_||{},I=Q.fieldKey;P=(typeof w.name=="string"?w.name:null)??(typeof w.title=="string"?w.title:null)??(typeof w.label=="string"?w.label:null)??I.charAt(0).toUpperCase()+I.slice(1).replace(/([A-Z])/g," $1").trim()}else{const _=Q.fieldKey;if(Q.itemId!=null){const $=(Array.isArray(T[_])?T[_]:[]).find(K=>String(K==null?void 0:K.id)===String(Q.itemId))||{};P=(typeof $.name=="string"?$.name:null)??(typeof $.title=="string"?$.title:null)??(typeof $.label=="string"?$.label:null)??_}else P=_.charAt(0).toUpperCase()+_.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:P})]})})(),s.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&N(!1),children:e?V?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"})]}):_e?(()=>{const P=Object.keys(_e.shape).filter(K=>!yr.has(K)),_=(xe==null?void 0:xe.data)||{};if(P.length===0)return s.jsx("p",{className:"text-xs text-zinc-500",children:"No content fields in schema."});const w=H==null?void 0:H[0],I=(w==null?void 0:w.itemId)!=null?{[w.fieldKey]:w.itemId}:(Q==null?void 0:Q.itemId)!=null?{[Q.fieldKey]:Q.itemId}:void 0,$=(w==null?void 0:w.fieldKey)??(Q==null?void 0:Q.fieldKey)??null;return s.jsx(He,{schema:_e,data:_,onChange:K=>m(K),keys:P,expandedItemPath:H,expandedItemIdByField:I,focusedFieldKey:$,onSidebarExpandedItemChange:E})})():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 ",(U==null?void 0:U.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:(g!=null||d!=null||b!=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",c?"text-amber-500":"text-zinc-500"),children:c?"Unsaved Changes":"All Changes Saved"}),g!=null&&s.jsxs("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-200 hover:bg-zinc-800 hover:border-zinc-600",children:[s.jsx(or,{size:12,className:"shrink-0"}),s.jsx("span",{children:"Bake HTML"})]}),d!=null&&s.jsxs("button",{type:"button",onClick: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"),children:[s.jsx(ir,{size:12,className:"shrink-0"}),s.jsx("span",{children:"Export JSON"})]}),b!=null&&f&&s.jsx("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-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"})})]})}),F!=null&&r.length>0&&u!=null&&(()=>{const T=r.find(O=>O.id===F),P=l.find(O=>O.id===F);if(!T)return null;const _=(P==null?void 0:P.scope)==="global"?"global":"local",w=T.type,I=k[w],K=(I?Object.keys(I.shape):[]).filter(O=>yr.has(O)),M=T.data??{};return K.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:()=>a(null),children:s.jsxs("div",{ref:te,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:O=>O.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 — ",w]}),s.jsx("button",{type:"button",onClick:()=>a(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(Re,{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:O=>O.target===O.currentTarget&&a(null),children:s.jsxs("div",{ref:te,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:O=>O.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 — ",w]}),s.jsx("button",{type:"button",onClick:()=>a(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(Re,{size:18})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:s.jsx(He,{schema:I,data:M,onChange:O=>{const G={...T.data,...O};u(F,_,w,G)},keys:K})})]})})})()]})},_r=({draft:e,globalDraft:y,themeConfig:r,slug:m,selectedId:u,scrollToSectionId:i,onScrollRequested:o})=>{const n=X.useRef(null),l=X.useCallback(()=>{var h;(h=n.current)!=null&&h.contentWindow&&n.current.contentWindow.postMessage({type:ve.UPDATE_DRAFTS,draft:e,globalDraft:y,themeConfig:r},"*")},[e,y,r]);return X.useEffect(()=>{l()},[l]),X.useEffect(()=>{const h=p=>{p.data.type===ve.STAGE_READY&&l()};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[l]),X.useEffect(()=>{var h;(h=n.current)!=null&&h.contentWindow&&n.current.contentWindow.postMessage({type:ve.SYNC_SELECTION,selectedId:u},"*")},[u]),X.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 y=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])=>{y.style.setProperty(u,i)})}},zr=()=>{var c;const[e,y]=X.useState(null),[r,m]=X.useState(null),[u,i]=X.useState(null),[o,n]=X.useState(null),[l,h]=X.useState(!1);if(X.useEffect(()=>{const g=d=>{d.data.type===ve.UPDATE_DRAFTS&&(y(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 b=document.documentElement.outerHTML;window.parent.postMessage({type:ve.SEND_CLEAN_HTML,html:b},"*"),h(!1)},50))};return window.addEventListener("message",g),window.parent.postMessage({type:ve.STAGE_READY},"*"),()=>window.removeEventListener("message",g)},[]),X.useEffect(()=>{const g=d=>{var E,F,a,B,te,U,V,H;const b=d.target,f=d.clientX,k=d.clientY;let j=null,N=b;for(;N&&N!==document.body;){const Q=(E=N.getAttribute)==null?void 0:E.call(N,"data-section-id"),z=(F=N.getAttribute)==null?void 0:F.call(N,"data-section-type"),S=(a=N.getAttribute)==null?void 0:a.call(N,"data-section-scope");if(Q&&z&&S){j=N;break}N=N.parentElement}if(!j)return;d.preventDefault(),d.stopPropagation();const A=j.getAttribute("data-section-id"),R=j.getAttribute("data-section-type"),C=j.getAttribute("data-section-scope");if(!A||!R||!C)return;const D={id:A,type:R,scope:C};if(b===j){window.parent.postMessage({type:ve.SECTION_SELECT,section:D},"*");return}const L=document.elementFromPoint(f,k)??b;if(!L||!j.contains(L)){window.parent.postMessage({type:ve.SECTION_SELECT,section:D},"*");return}if(L===j){window.parent.postMessage({type:ve.SECTION_SELECT,section:D},"*");return}const Z=[];for(N=L;N&&N!==j;){const Q=(B=N.getAttribute)==null?void 0:B.call(N,"data-jp-item-id"),z=(te=N.getAttribute)==null?void 0:te.call(N,"data-jp-item-field");Q&&z&&Z.push({fieldKey:z||"items",itemId:Q}),N=N.parentElement}if(Z.reverse(),Z.length===0)for(N=L;N&&N!==j;){const Q=(U=N.getAttribute)==null?void 0:U.call(N,"data-jp-field");if(Q){Z.push({fieldKey:Q});break}N=N.parentElement}if(Z.length===0&&L){let Q=null;const z=S=>{var J,ee;const q=S.getBoundingClientRect();if(q.left<=f&&f<=q.right&&q.top<=k&&k<=q.bottom){for(let ue=0;ue<S.children.length;ue++)z(S.children[ue]);((J=S.getAttribute)!=null&&J.call(S,"data-jp-item-id")||(ee=S.getAttribute)!=null&&ee.call(S,"data-jp-field"))&&(Q=S)}};if(z(L),Q){const S=Q,q=(V=S.getAttribute)==null?void 0:V.call(S,"data-jp-item-id"),J=(H=S.getAttribute)==null?void 0:H.call(S,"data-jp-field");q&&J?Z.push({fieldKey:J||"items",itemId:q}):J&&Z.push({fieldKey:J})}}const Y={type:ve.SECTION_SELECT,section:D};if(Z.length>0){Y.itemPath=Z;const Q=Z[0];Q.itemId!=null?(Y.itemField=Q.fieldKey,Y.itemId=Q.itemId):Y.itemField=Q.fieldKey}window.parent.postMessage(Y,"*")};return document.addEventListener("click",g,!0),()=>document.removeEventListener("click",g,!0)},[]),X.useEffect(()=>{if(!o)return;const g=setTimeout(()=>n(null),600);return()=>clearTimeout(g)},[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 p=(c=r.header)==null?void 0:c.data,v={main:(p==null?void 0:p.links)??[]},x=g=>{window.parent.postMessage({type:ve.ACTIVE_SECTION_CHANGED,activeSectionId:g},"*")};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:v,selectedId:l?null:u,scrollToSectionId:o,onActiveSectionChange:x})})})};function ho(e){return e.split("-").map(y=>y.charAt(0).toUpperCase()+y.slice(1).toLowerCase()).join(" ")}const jr=({open:e,onClose:y,sectionTypes:r,sectionTypeLabels:m,onSelect:u})=>{if(X.useEffect(()=>{if(!e)return;const o=n=>{n.key==="Escape"&&y()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,y]),!e)return null;const i=o=>(m==null?void 0:m[o])??ho(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:y,"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:y,className:"p-1.5 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close",children:s.jsx(Re,{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),y()},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"})})]})]})},Er=()=>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"})]}),po='/*! 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\\/4{width:75%}.w-6{width:calc(var(--spacing)*6)}.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-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\\/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\\/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-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-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-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))}.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\\: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\\: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 fo extends X.Component{constructor(y){super(y),this.state={hasError:!1,error:null}}static getDerivedStateFromError(y){return{hasError:!0,error:y}}componentDidCatch(y,r){console.error("[JsonPages Engine]",y,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 mo({config:e}){var N,A;const{registry:y={},schemas:r={},pages:m={},siteConfig:u,themeConfig:i,menuConfig:o,themeCss:n,addSection:l,NotFoundComponent:h=Er}=e,p=(l==null?void 0:l.addableSectionTypes)??Object.keys(r).filter(R=>R!=="header"&&R!=="footer"),v={exportJSON:((N=e.persistence)==null?void 0:N.exportJSON)??Ct,exportHTML:((A=e.persistence)==null?void 0:A.exportHTML)??At},x=typeof(n==null?void 0:n.tenant)=="string"?n.tenant:"",c=typeof(n==null?void 0:n.admin)=="string"?n.admin:po,[g,d]=X.useState(!1);X.useEffect(()=>{try{i!=null&&i.tokens&&at.setTheme(i)}catch(R){console.warn("[JsonPages] setTheme failed",R)}d(!0)},[i]);const b=()=>{const{slug:R="home"}=Ne.useParams(),[C,D]=X.useState(null);X.useEffect(()=>{const E=document.getElementById("jp-baked-state");if(E!=null&&E.textContent)try{const F=JSON.parse(E.textContent);D(F),at.setTheme(F.theme)}catch(F){console.error("Failed to parse baked state",F)}},[]);const L=C?C.page:m[R],Z=C?C.site:u,Y=C?C.menu:o;return L?s.jsx(ot,{mode:"tenant",tenantCss:x,adminCss:c,children:s.jsx(tt,{mode:"visitor",children:s.jsx(vt,{pageConfig:L,siteConfig:Z,menuConfig:Y})})}):s.jsx(h,{})},f=e.tenantId??"default",k=()=>{const{slug:R="home"}=Ne.useParams(),[C,D]=X.useState(null),[L,Z]=X.useState(!1),[Y,E]=X.useState(()=>{var O;try{const G=JSON.parse(JSON.stringify(u??{}));G.identity||(G.identity={title:"Site"}),G.pages||(G.pages=[]);const W=(O=G.header)==null?void 0:O.data;return W&&(o!=null&&o.main)&&(W.links=JSON.parse(JSON.stringify(o.main))),G}catch{return{identity:{title:"Site"},pages:[]}}}),[F,a]=X.useState(null),[B,te]=X.useState(null),[U,V]=X.useState(null),[H,Q]=X.useState(null),[z,S]=X.useState(!1),[q,J]=X.useState(400),ee=360,ue=920,ie=X.useCallback(O=>{O.preventDefault();const G=O.currentTarget;G.setPointerCapture(O.pointerId);const W=O.clientX,re=q,de=ke=>{const je=W-ke.clientX,Ee=Math.min(ue,Math.max(ee,re+je));J(Ee)},le=()=>{G.releasePointerCapture(O.pointerId),G.removeEventListener("pointermove",de),G.removeEventListener("pointerup",le),G.removeEventListener("pointercancel",le),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",G.addEventListener("pointermove",de),G.addEventListener("pointerup",le),G.addEventListener("pointercancel",le)},[q]),ae=C?[...Y.header?[{id:Y.header.id,type:Y.header.type,scope:"global",title:"Header"}]:[],...C.sections.map(O=>{var G,W;return{id:O.id,type:O.type,scope:"local",title:((G=O.data)==null?void 0:G.title)??((W=O.data)==null?void 0:W.titleHighlight)}}),...Y.footer?[{id:Y.footer.id,type:Y.footer.type,scope:"global",title:"Footer"}]:[]]:[],se=`jsonpages-draft-${f}-${R}`;X.useEffect(()=>{const O=m[R];try{const G=typeof window<"u"?localStorage.getItem(se):null,W=G?JSON.parse(G):null;W!=null&&W.page&&(W!=null&&W.site)?(D(JSON.parse(JSON.stringify(W.page))),E(JSON.parse(JSON.stringify(W.site)))):O&&D(JSON.parse(JSON.stringify(O)))}catch{O&&D(JSON.parse(JSON.stringify(O)))}a(null),te(null),Z(!1)},[R,m,se]),X.useEffect(()=>{if(!C||typeof window>"u")return;const O=setTimeout(()=>{try{localStorage.setItem(se,JSON.stringify({page:C,site:Y}))}catch{}},500);return()=>clearTimeout(O)},[C,Y,se]);const ge=X.useCallback(()=>{const O=m[R];try{typeof window<"u"&&localStorage.removeItem(se)}catch{}O&&D(JSON.parse(JSON.stringify(O))),a(null),te(null),Z(!1)},[R,m,se]),pe=X.useCallback((O,G,W)=>{const re=[...W.sections],de=re.findIndex(je=>je.id===O);if(de===-1||G<0||G>=re.length)return;const[le]=re.splice(de,1),ke=G>de?G-1:G;re.splice(Math.min(ke,re.length),0,le),D({...W,sections:re}),Z(!0)},[]),xe=X.useCallback(O=>{var G;if(O.origin===window.location.origin){if(O.data.type===ve.SECTION_SELECT){a(O.data.section);const W=O.data.itemPath;if(Array.isArray(W)&&W.length>0)te(W.map(re=>({fieldKey:re.fieldKey,...re.itemId!=null?{itemId:String(re.itemId)}:{}})));else{const re=O.data.itemField,de=O.data.itemId;te(typeof re=="string"?[{fieldKey:re,...de!=null?{itemId:String(de)}:{}}]:null)}}if(O.data.type===ve.ACTIVE_SECTION_CHANGED&&V(O.data.activeSectionId??null),O.data.type==="jsonpages:section-reorder"&&C){const{sectionId:W,newIndex:re}=O.data;typeof W=="string"&&typeof re=="number"&&re>=0&&pe(W,re,C)}if(O.data.type===ve.SEND_CLEAN_HTML){if(!C)return;const W=(G=Y.header)==null?void 0:G.data,re={page:C,site:Y,menu:{main:(W==null?void 0:W.links)??[]},theme:i};v.exportHTML(re,R,O.data.html),Z(!1)}}},[C,Y,R,i,pe]);X.useEffect(()=>(window.addEventListener("message",xe),()=>window.removeEventListener("message",xe)),[xe]);const _e=X.useCallback(O=>{const G=ae.find(W=>W.id===O);G&&a({id:G.id,type:G.type,scope:G.scope}),te(null),Q(O)},[ae]),t=X.useCallback(()=>{Q(null)},[]),T=X.useCallback(O=>{D(G=>G&&{...G,sections:G.sections.filter(W=>W.id!==O)}),Z(!0),a(G=>(G==null?void 0:G.id)===O?null:G)},[]),P=O=>{if(!(!F||!C))if(Z(!0),F.scope==="global")F.type==="header"&&Y.header!=null?E({...Y,header:{...Y.header,data:O}}):F.type==="footer"&&Y.footer!=null&&E({...Y,footer:{...Y.footer,data:O}});else{const G=C.sections.map(W=>W.id===F.id?{...W,data:O}:W);D({...C,sections:G})}},_=X.useCallback((O,G,W,re)=>{var de,le;if(Z(!0),G==="global")((de=Y.header)==null?void 0:de.id)===O?E({...Y,header:{...Y.header,data:re}}):((le=Y.footer)==null?void 0:le.id)===O&&E({...Y,footer:{...Y.footer,data:re}});else if(C){const ke=C.sections.map(je=>je.id===O?{...je,data:re}:je);D({...C,sections:ke})}},[C,Y]),w=()=>{var G;const O=document.querySelector("iframe");(G=O==null?void 0:O.contentWindow)==null||G.postMessage({type:ve.REQUEST_CLEAN_HTML},"*")},I=()=>{var W;if(!C)return;const O=(W=Y.header)==null?void 0:W.data,G={page:C,site:Y,menu:{main:(O==null?void 0:O.links)??[]},theme:i};v.exportJSON(G,R),Z(!1)},$=O=>{var re;if(!C)return;const G=((re=l==null?void 0:l.getDefaultSectionData)==null?void 0:re.call(l,O))??{},W={id:crypto.randomUUID(),type:O,data:G,settings:void 0};D({...C,sections:[...C.sections,W]}),Z(!0),a({id:W.id,type:O,scope:"local"})};if(!C)return s.jsx("div",{children:"Loading Studio..."});const K=(F==null?void 0:F.scope)==="global"?{sections:[Y.header,Y.footer].filter(O=>O!=null)}:C,M=[...Y.header?[Y.header]:[],...C.sections,...Y.footer?[Y.footer]:[]];return s.jsx(ot,{mode:"admin",tenantCss:x,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(_r,{draft:C,globalDraft:Y,themeConfig:i,slug:R,selectedId:F==null?void 0:F.id,scrollToSectionId:H,onScrollRequested:t})}),s.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:q,minWidth:ee,maxWidth:ue},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:ie}),s.jsx(kr,{selectedSection:F,pageData:K,allSectionsData:M,onUpdate:P,onUpdateSection:_,onClose:()=>{a(null),te(null)},expandedItemPath:B,onReorderSection:C?(O,G)=>pe(O,G,C):void 0,allLayers:ae,activeSectionId:U,onRequestScrollToSection:_e,onDeleteSection:C?T:void 0,onAddSection:p.length>0?()=>S(!0):void 0,hasChanges:L,onExportHTML:w,onExportJSON:I,onResetToFile:ge})]})]}),s.jsx(jr,{open:z,onClose:()=>S(!1),sectionTypes:p,sectionTypeLabels:l==null?void 0:l.sectionTypeLabels,onSelect:$})]})})})},j=()=>s.jsx(ot,{mode:"tenant",tenantCss:x,adminCss:c,children:s.jsx(zr,{})});return g?s.jsx(fo,{children:s.jsx(Qt,{config:{registry:y,schemas:r,tenantId:e.tenantId??"default",assets:e.assets},children:s.jsx(Ne.BrowserRouter,{children:s.jsxs(Ne.Routes,{children:[s.jsx(Ne.Route,{path:"/",element:s.jsx(b,{})}),s.jsx(Ne.Route,{path:"/:slug",element:s.jsx(b,{})}),s.jsx(Ne.Route,{path:"/admin",element:s.jsx(k,{})}),s.jsx(Ne.Route,{path:"/admin/:slug",element:s.jsx(k,{})}),s.jsx(Ne.Route,{path:"/admin/preview/:slug",element:s.jsx(j,{})}),s.jsx(Ne.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 bo=({hasChanges:e,onExportJSON:y,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($n,{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:y,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(ir,{size:14}),s.jsx("span",{children:"Export JSON"})]})]})]});fe.AddSectionLibrary=jr,fe.AdminSidebar=kr,fe.ConfigProvider=Qt,fe.ControlBar=bo,fe.DefaultNotFound=Er,fe.FormFactory=He,fe.InputWidgets=Ge,fe.JsonPagesEngine=mo,fe.PageRenderer=vt,fe.PreviewEntry=zr,fe.STUDIO_EVENTS=ve,fe.SectionRenderer=Ze,fe.StudioProvider=tt,fe.StudioStage=_r,fe.ThemeLoader=ot,fe.cn=he,fe.exportBakedHTML=At,fe.exportProjectJSON=Ct,fe.resolveAssetUrl=xr,fe.themeManager=at,fe.useConfig=$e,fe.useStudio=tr,Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"})}));
198
+ */const Hn=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 Vn extends X.Component{constructor(k){super(k),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(k,r){console.error(`[JsonPages] Component Crash [${this.props.type}]:`,k,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 Kn=({type:e,scope:k,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:k})]})})},Ze=({section:e,menu:k,selectedId:r,reorderable:m,sectionIndex:u,totalSections:i,onReorder:o})=>{var f,y;const{mode:n}=tr(),{registry:l}=$e(),h=n==="studio",p=h&&r===e.id,v=l[e.type],x=e.type==="header"||e.type==="footer"?"global":"local",c=e.type==="header"&&((f=e.settings)==null?void 0:f.sticky);if(!v)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 g=j=>{var Y,E,F,a,B;if(!h)return;j.preventDefault(),j.stopPropagation();const N=j.currentTarget,A=j.clientX,R=j.clientY;if(j.target===N){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}},"*");return}const C=document.elementFromPoint(A,R)??j.target;if(!C||!N.contains(C)){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}},"*");return}if(C===N){window.parent.postMessage({type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}},"*");return}const D=[];let L=C;for(;L&&L!==N;){const te=(Y=L.getAttribute)==null?void 0:Y.call(L,"data-jp-item-id"),U=(E=L.getAttribute)==null?void 0:E.call(L,"data-jp-item-field");te&&U&&D.push({fieldKey:U||"items",itemId:te}),L=L.parentElement}if(D.reverse(),D.length===0)for(L=C;L&&L!==N;){const te=(F=L.getAttribute)==null?void 0:F.call(L,"data-jp-field");if(te){D.push({fieldKey:te});break}L=L.parentElement}if(D.length===0&&C){let te=null;const U=V=>{var Q,z;const H=V.getBoundingClientRect();if(H.left<=A&&A<=H.right&&H.top<=R&&R<=H.bottom){for(let S=0;S<V.children.length;S++)U(V.children[S]);((Q=V.getAttribute)!=null&&Q.call(V,"data-jp-item-id")||(z=V.getAttribute)!=null&&z.call(V,"data-jp-field"))&&(te=V)}};if(U(C),te){const V=te,H=(a=V.getAttribute)==null?void 0:a.call(V,"data-jp-item-id"),Q=(B=V.getAttribute)==null?void 0:B.call(V,"data-jp-field");H&&Q?D.push({fieldKey:Q||"items",itemId:H}):Q&&D.push({fieldKey:Q})}}const Z={type:ve.SECTION_SELECT,section:{id:e.id,type:e.type,scope:x}};if(D.length>0){Z.itemPath=D;const te=D[0];te.itemId!=null?(Z.itemField=te.fieldKey,Z.itemId=te.itemId):Z.itemField=te.fieldKey}window.parent.postMessage(Z,"*")},d=()=>{const j=v;return e.type==="header"&&k?s.jsx(j,{data:e.data,settings:e.settings,menu:k}):s.jsx(j,{data:e.data,settings:e.settings})},b=(y=e.data)==null?void 0:y.anchorId;return s.jsxs("div",{id:b||void 0,"data-section-id":h?e.id:void 0,"data-section-type":h?e.type:void 0,"data-section-scope":h?x:void 0,...h&&p?{"data-jp-selected":!0}:{},onClickCapture:h?g:void 0,className:he("relative w-full",h&&"group cursor-pointer",h&&c?"sticky top-0 z-[60]":"relative z-0",p&&"z-[70]"),children:[s.jsx("div",{className:"relative z-0",children:s.jsx(Vn,{type:e.type,children:d()})}),h&&s.jsx(Kn,{type:e.type,scope:x,isSelected:!!p,sectionId:m&&x==="local"?e.id:void 0,sectionIndex:m&&x==="local"?u:void 0,totalSections:m&&x==="local"?i:void 0,onReorder:m&&x==="local"?o:void 0})]})},Jn=e=>{X.useEffect(()=>{document.title=e.title;let k=document.querySelector('meta[name="description"]');k||(k=document.createElement("meta"),k.setAttribute("name","description"),document.head.appendChild(k)),k.setAttribute("content",e.description)},[e.title,e.description])},qn="application/json",vt=({pageConfig:e,siteConfig:k,menuConfig:r,selectedId:m,onReorder:u,scrollToSectionId:i,onActiveSectionChange:o})=>{var b,f;Jn(e.meta);const[n,l]=X.useState(null),h=X.useRef({}),p=X.useRef(o);p.current=o;const v=y=>{var j;(j=p.current)==null||j.call(p,y)};X.useEffect(()=>{if(!i)return;const y=h.current[i];y&&y.scrollIntoView({behavior:"smooth",block:"center"})},[i]),X.useEffect(()=>{if(!p.current)return;const j=[...k.header?[k.header.id]:[],...e.sections.map(C=>C.id),...k.footer?[k.footer.id]:[]],N=new IntersectionObserver(C=>{C.forEach(D=>{var L;if(D.isIntersecting&&D.intersectionRatio>.5){const Z=D.target.getAttribute("data-section-id");Z&&((L=p.current)==null||L.call(p,Z))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let A=!1;const R=requestAnimationFrame(()=>{A||j.forEach(C=>{const D=h.current[C];D&&N.observe(D)})});return()=>{A=!0,cancelAnimationFrame(R),N.disconnect()}},[e.sections,(b=k.header)==null?void 0:b.id,(f=k.footer)==null?void 0:f.id]);const x=(y,j)=>{y.preventDefault(),y.dataTransfer.dropEffect="move",l(j)},c=()=>{l(null)},g=(y,j)=>{if(y.preventDefault(),l(null),!!u)try{const N=y.dataTransfer.getData(qn),{sectionId:A}=JSON.parse(N);typeof A=="string"&&u(A,j)}catch{}},d=()=>{const y=typeof u=="function",j=e.sections.map((N,A)=>{const R=n===A;return y?s.jsxs("div",{ref:C=>{h.current[N.id]=C},"data-section-id":N.id,style:{position:"relative"},onMouseEnter:()=>v(N.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:R?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:R?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:C=>x(C,A),onDragLeave:c,onDrop:C=>g(C,A)}),s.jsx(Ze,{section:N,selectedId:m,reorderable:!0,sectionIndex:A,totalSections:e.sections.length,onReorder:u})]},N.id):s.jsx("div",{ref:C=>{h.current[N.id]=C},"data-section-id":N.id,onMouseEnter:()=>v(N.id),children:s.jsx(Ze,{section:N,selectedId:m})},N.id)});if(y&&j.length>0){const N=e.sections.length,A=n===N;j.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:A?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:A?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:R=>x(R,N),onDragLeave:c,onDrop:R=>g(R,N)},"jp-drop-after-last"))}return j};return s.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[k.header!=null&&s.jsx("div",{ref:y=>{h.current[k.header.id]=y},"data-section-id":k.header.id,onMouseEnter:()=>v(k.header.id),children:s.jsx(Ze,{section:k.header,menu:r.main,selectedId:m})}),s.jsx("main",{className:"flex-1",children:d()}),k.footer!=null&&s.jsx("div",{ref:y=>{h.current[k.footer.id]=y},"data-section-id":k.footer.id,onMouseEnter:()=>v(k.footer.id),children:s.jsx(Ze,{section:k.footer,selectedId:m})})]})},ot=({mode:e,tenantCss:k,adminCss:r,children:m})=>(X.useLayoutEffect(()=>{const u=`jp-theme-${e}`,i=e==="tenant"?k: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,k,r]),s.jsx(s.Fragment,{children:m}));function xt({className:e,type:k,...r}){return s.jsx("input",{type:k,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 Yn({className:e,...k}){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),...k})}function Xn({className:e,checked:k,onCheckedChange:r,...m}){return s.jsx("input",{type:"checkbox",checked:k,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,...k}){return s.jsx("label",{className:he("text-sm font-medium leading-none select-none",e),...k})}const dr=me.createContext(null);function Qn(){const e=me.useContext(dr);if(!e)throw new Error("Select components must be used within Select");return e}function eo({value:e,onValueChange:k,children:r}){const m=e??"",u=me.Children.toArray(r).find(v=>me.isValidElement(v)&&v.type===kt),i=me.Children.toArray(r).find(v=>me.isValidElement(v)&&v.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(v=>me.isValidElement(v)&&v.props.value!==void 0).map(v=>({value:v.props.value,label:v.props.children??v.props.value})),[u,o]),h=me.useMemo(()=>{if(!i||!me.isValidElement(i))return"";const v=me.Children.toArray(i.props.children).find(x=>me.isValidElement(x)&&x.type===yt);return v&&me.isValidElement(v)?v.props.placeholder??"":""},[i,n]),p=me.useMemo(()=>({value:m,onValueChange:v=>k==null?void 0:k(v),options:l,placeholder:h}),[m,k,l,h]);return s.jsx(dr.Provider,{value:p,children:i})}function wt({className:e,children:k,...r}){const{value:m,onValueChange:u,options:i,placeholder:o}=Qn();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))]}),k]})}function yt(e){return null}function kt({className:e,children:k}){return s.jsx("div",{className:he("hidden",e),"aria-hidden":!0,children:k})}function ur({className:e,value:k,children:r}){return s.jsx("div",{"data-value":k,className:e,"aria-hidden":!0,children:r})}wt.displayName="SelectTrigger",yt.displayName="SelectValue",kt.displayName="SelectContent",ur.displayName="SelectItem";const hr=me.createContext(null);function pr(){const e=me.useContext(hr);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function fr({open:e,onOpenChange:k,children:r}){const[m,u]=me.useState(!1),i=e!==void 0,o=i?e:m,n=me.useCallback(h=>{i||u(h),k==null||k(h)},[i,k]),l=me.useMemo(()=>({open:o,onOpenChange:n}),[o,n]);return s.jsx(hr.Provider,{value:l,children:r})}function to({asChild:e,children:k}){const{onOpenChange:r}=pr(),m=me.Children.only(k);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:k})}function mr({className:e,children:k,preventCloseOnBackdropClick:r,...m}){const{open:u,onOpenChange:i}=pr();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 Cr.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:k})]}),document.body)}function br({className:e,...k}){return s.jsx("div",{className:he("flex flex-col gap-1.5 pb-4",e),...k})}function ro({className:e,...k}){return s.jsx("div",{className:he("flex justify-end gap-2 pt-4",e),...k})}function gr({className:e,...k}){return s.jsx("h2",{className:he("text-sm font-semibold text-white",e),...k})}function vr({className:e,...k}){return s.jsx("p",{className:he("text-xs text-zinc-400",e),...k})}const De=me.forwardRef(({className:e,variant:k="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 p=u,v=he(n,l[k],h[r],p.props.className,e);return me.cloneElement(p,{className:v})}return s.jsx("button",{ref:o,type:"button",className:he(n,l[k],h[r],e),...i,children:u})});De.displayName="Button";const no=["library","upload","url"];function oo({library:e,selectedId:k,onSelect:r}){const[m,u]=X.useState(""),[i,o]=X.useState("all"),n=["all",...new Set(e.flatMap(h=>h.tags??[]))],l=e.filter(h=>{const p=i==="all"||(h.tags??[]).includes(i),v=!m||(h.alt??"").toLowerCase().includes(m.toLowerCase());return p&&v});return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Un,{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 p=k===h.id;return s.jsxs("button",{type:"button",onClick:()=>r(p?null:h.id),className:he("group relative aspect-[4/3] rounded-lg overflow-hidden","ring-1 transition-all duration-150",p?"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",p?"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",p&&"opacity-100"),children:s.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:h.alt})}),p&&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 io({preview:e,onPreviewChange:k,onAssetUpload:r}){const[m,u]=X.useState(!1),i=X.useRef(null),o=X.useCallback(async p=>{if(!p.type.startsWith("image/"))return;if(r){try{const x=await r(p);k({name:p.name,size:p.size,dataUrl:x})}catch{const x=new FileReader;x.onload=c=>{var g;k({name:p.name,size:p.size,dataUrl:(g=c.target)==null?void 0:g.result})},x.readAsDataURL(p)}return}const v=new FileReader;v.onload=x=>{var c;k({name:p.name,size:p.size,dataUrl:(c=x.target)==null?void 0:c.result})},v.readAsDataURL(p)},[k,r]),n=X.useCallback(p=>{var x,c;p.preventDefault(),p.stopPropagation(),u(!1);const v=(c=(x=p.dataTransfer)==null?void 0:x.files)==null?void 0:c[0];v&&o(v)},[o]),l=X.useCallback(p=>{p.preventDefault(),p.stopPropagation(),u(!0)},[]),h=X.useCallback(p=>{var x;const v=(x=p.target.files)==null?void 0:x[0];v&&o(v)},[o]);return s.jsxs("div",{onDragOver:l,onDragEnter:l,onDragLeave:p=>{p.preventDefault(),p.stopPropagation(),u(!1)},onDrop:n,onClick:()=>{var p;return!e&&((p=i.current)==null?void 0:p.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:p=>{p.stopPropagation(),k(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(cr,{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 ao({urlPreview:e,onUrlPreviewChange:k}){const[r,m]=X.useState(""),[u,i]=X.useState(!1),o=()=>{if(r.trim())try{new URL(r),k(r),i(!1)}catch{i(!0),k(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),k(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(ar,{size:32,className:"mb-3 opacity-40"}),s.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const so=({open:e,onOpenChange:k,onSelect:r})=>{const{assets:m}=$e(),u=(m==null?void 0:m.assetsManifest)??[],[i,o]=X.useState("library"),[n,l]=X.useState(null),[h,p]=X.useState(null),[v,x]=X.useState(null);X.useEffect(()=>{e&&(o("library"),l(null),p(null),x(null))},[e]),X.useEffect(()=>{if(!e||i!=="upload")return;const f=j=>{j.preventDefault()},y={capture:!0};return document.addEventListener("dragover",f,y),document.addEventListener("drop",f,y),window.addEventListener("dragover",f,y),window.addEventListener("drop",f,y),()=>{document.removeEventListener("dragover",f,y),document.removeEventListener("drop",f,y),window.removeEventListener("dragover",f,y),window.removeEventListener("drop",f,y)}},[e,i]);const c=i==="library"&&n!=null||i==="upload"&&h!=null||i==="url"&&v!=null,g=()=>{if(i==="library"&&n){const f=u.find(y=>y.id===n);f&&r({url:f.url,alt:f.alt})}else i==="upload"&&h?r({url:h.dataUrl,alt:h.name}):i==="url"&&v&&r({url:v,alt:""});setTimeout(()=>k(!1),0)},d=i==="library"&&n?"1 immagine selezionata":i==="upload"&&h?h.name:i==="url"&&v?"URL pronto":"Nessuna selezione",b=f=>{f.preventDefault(),f.stopPropagation()};return s.jsx(fr,{open:e,onOpenChange:k,children:s.jsxs(mr,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:b,onDrop:b,children:[s.jsxs(br,{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(gr,{children:"Image Picker"}),s.jsx(vr,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),s.jsx("button",{type:"button",onClick:()=>k(!1),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Chiudi",children:s.jsx(Re,{size:18})})]}),s.jsx("div",{className:"flex border-b border-zinc-800",children:no.map(f=>s.jsxs("button",{type:"button",onClick:()=>o(f),className:he("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===f?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[f==="library"&&s.jsx(rt,{size:14}),f==="upload"&&s.jsx(cr,{size:14}),f==="url"&&s.jsx(ar,{size:14}),f==="library"?"Libreria":f==="upload"?"Upload":"URL"]},f))}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&s.jsx(oo,{library:u,selectedId:n,onSelect:l}),i==="upload"&&s.jsx(io,{preview:h,onPreviewChange:p,onAssetUpload:m==null?void 0:m.onAssetUpload}),i==="url"&&s.jsx(ao,{urlPreview:v,onUrlPreviewChange:x})]}),s.jsxs(ro,{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:()=>k(!1),children:"Annulla"}),s.jsx(De,{type:"button",size:"sm",disabled:!c,onClick:g,className:he(!c&&"opacity-40"),children:"Inserisci immagine"})]})]})]})})},xr=(e,k="default")=>{if(e.startsWith("http")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/assets/"))return e;if(e.startsWith("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/${k}/${m}`},lo=({value:e,onChange:k,label:r="IMAGE",className:m})=>{const{tenantId:u="default"}=$e(),[i,o]=X.useState(!1),[n,l]=X.useState(!1),h=!!(e!=null&&e.url),p=e!=null&&e.url?xr(e.url,u):"",v=c=>{k(c),o(!1)},x=c=>{c.stopPropagation(),k({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:p,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:x,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(so,{open:i,onOpenChange:o,onSelect:v})]})},wr=[{name:"layers",Icon:gt},{name:"github",Icon:Rn},{name:"arrow-right",Icon:On},{name:"box",Icon:Ln},{name:"terminal",Icon:Zn},{name:"chevron-right",Icon:Pn},{name:"menu",Icon:Mn},{name:"x",Icon:Re},{name:"sparkles",Icon:Wn},{name:"zap",Icon:Hn}],Ge={"ui:text":({label:e,value:k,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:k||"",onChange:m=>r(m.target.value)})]}),"ui:textarea":({label:e,value:k,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(Yn,{className:"min-h-[80px] text-[11px] bg-zinc-900/50 border-zinc-800 focus-visible:ring-blue-600 resize-none",value:k||"",onChange:m=>r(m.target.value)})]}),"ui:select":({label:e,value:k,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(eo,{value:k||"",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(ur,{value:u,className:"text-[11px]",children:u},u))})]})]}),"ui:checkbox":({label:e,value:k,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(Xn,{id:e,checked:!!k,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:k,onChange:r})=>{const m=k!=null&&typeof k=="object"&&"url"in k?{url:String(k.url??""),alt:String(k.alt??"")}:{url:typeof k=="string"?k:"",alt:""},u=i=>{r(i)};return s.jsx("div",{className:"mb-4",children:s.jsx(lo,{label:e,value:m,onChange:u})})},"ui:icon-picker":({label:e,value:k,onChange:r})=>{const[m,u]=X.useState(!1),i=wr.find(o=>o.name===(k||""));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(fr,{open:m,onOpenChange:u,children:[s.jsx(to,{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(mr,{className:"sm:max-w-[280px] p-4",children:[s.jsxs(br,{children:[s.jsx(gr,{className:"text-sm",children:"Choose icon"}),s.jsx(vr,{className:"text-xs",children:"Click an icon to select it."})]}),s.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:wr.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",k===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 ze.z.ZodOptional||e instanceof ze.z.ZodDefault)return _t(e._def.innerType);if(e instanceof ze.z.ZodObject){const k={id:crypto.randomUUID()};for(const r in e.shape)r!=="id"&&(k[r]=_t(e.shape[r]));return k}return e instanceof ze.z.ZodArray?[]:e instanceof ze.z.ZodString?"":e instanceof ze.z.ZodNumber?0:e instanceof ze.z.ZodBoolean?!1:e instanceof ze.z.ZodEnum?e._def.values[0]:null},zt=e=>e instanceof ze.z.ZodOptional||e instanceof ze.z.ZodDefault?zt(e._def.innerType):e,it=(e,k)=>e&&!k?"opacity-10":"opacity-100",Me=(e,k)=>e!=null&&k.toLowerCase()===e.toLowerCase(),co=(e,k)=>{if(!e)return;const r=k.toLowerCase(),m=Object.entries(e).find(([u])=>u.toLowerCase()===r);return m==null?void 0:m[1]},He=({schema:e,data:k,onChange:r,keys:m,expandedItemPath:u,expandedItemIdByField:i,focusedFieldKey:o,onSidebarExpandedItemChange:n})=>{const l=e.shape,h=m!=null?Object.keys(l).filter(g=>m.includes(g)):Object.keys(l),p=u==null?void 0:u[0],v=(p==null?void 0:p.itemId)!=null?{[p.fieldKey]:p.itemId}:i,x=(p==null?void 0:p.fieldKey)??o??null,c=x!=null;return s.jsx("div",{className:"space-y-4",children:h.map(g=>{const d=l[g];if(!d)return null;const b=zt(d),f=d.description||"ui:text",y=k[g];if(f==="ui:image-picker"&&b instanceof ze.z.ZodObject){const R=Me(x,g),C=Ge["ui:image-picker"]||Ge["ui:text"];return s.jsx("div",{className:`transition-opacity duration-200 ${it(c,R)}`,...R?{"data-jp-focused-field":g}:{},children:s.jsx(C,{label:g,value:y,onChange:D=>r({...k,[g]:D})})},g)}if(b instanceof ze.z.ZodObject){const R=y||{},C=Me(x,g);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,C)}`,...C?{"data-jp-focused-field":g}:{},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:g})]}),s.jsx(He,{schema:b,data:R,onChange:D=>r({...k,[g]:D}),expandedItemPath:u&&Me(p==null?void 0:p.fieldKey,g)?u.slice(1):void 0,expandedItemIdByField:v,focusedFieldKey:x})]},g)}if(b instanceof ze.z.ZodArray){const R=Array.isArray(y)?y:[],C=zt(b.element),D=(E,F)=>{if(F<0||F>=R.length)return;const a=[...R],[B]=a.splice(E,1);a.splice(F,0,B),r({...k,[g]:a})},L=Me(x,g),Z=Me(p==null?void 0:p.fieldKey,g)?p==null?void 0:p.itemId:void 0,Y=co(v,g)??Z;return s.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${it(c,L)}`,...L?{"data-jp-focused-field":g}:{},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:[g," (",R.length,")"]}),s.jsxs("button",{type:"button",onClick:()=>{const E=_t(C);r({...k,[g]:[...R,E]})},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(sr,{size:12})," Add Item"]})]}),s.jsx("div",{className:"space-y-2",children:R.map((E,F)=>{const a=E,B=a.id||`legacy-${F}`,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)||`${g} #${F+1}`,U=Y,V=String(a.id??B),H=U!=null&&String(U)===V,Q=H&&u&&u.length>1?u.slice(1):void 0,z=c&&L&&U!=null&&!H;return s.jsx(uo,{itemId:V,openItemId:U!=null?String(U):void 0,isFaded:z,index:F,isFirst:F===0,isLast:F===R.length-1,label:te,onExpandedChange:n?S=>n(S?{fieldKey:g,itemId:V}:null):void 0,onRemove:()=>{const S=R.filter((q,J)=>J!==F);r({...k,[g]:S})},onMoveUp:()=>D(F,F-1),onMoveDown:()=>D(F,F+1),children:C instanceof ze.z.ZodObject?s.jsx(He,{schema:C,data:a||{},expandedItemPath:Q,onChange:S=>{const q=[...R];q[F]=S,r({...k,[g]:q})}}):s.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},B)})})]},g)}const j=Ge[f]||Ge["ui:text"],N=b instanceof ze.z.ZodEnum?b._def.values:void 0,A=Me(x,g);return s.jsx("div",{className:`transition-opacity duration-200 ${it(c,A)}`,...A?{"data-jp-focused-field":g}:{},children:s.jsx(j,{label:g,value:y,options:N,onChange:R=>r({...k,[g]:R})})},g)})})},uo=({itemId:e,openItemId:k,isFaded:r=!1,label:m,onExpandedChange:u,onRemove:i,onMoveUp:o,onMoveDown:n,isFirst:l,isLast:h,children:p})=>{const v=k!=null&&String(k)===String(e),[x,c]=X.useState(v);X.useEffect(()=>{v&&!x&&c(!0),!v&&x&&c(!1)},[v,x]);const g=()=>{const b=!x;c(b),u==null||u(b)},d=v&&x;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:g,className:"flex items-center gap-2 text-[10px] font-bold text-zinc-300 uppercase tracking-tight truncate",children:[x?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(Dn,{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(Tn,{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})})]})]}),x&&s.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:p})]})},yr=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),kr=({selectedSection:e,pageData:k,allSectionsData:r=[],onUpdate:m,onUpdateSection:u,onClose:i,expandedItemPath:o=null,onReorderSection:n,allLayers:l=[],activeSectionId:h,onRequestScrollToSection:p,onDeleteSection:v,onAddSection:x,hasChanges:c=!1,onExportHTML:g,onExportJSON:d,onResetToFile:b,showResetToFile:f=!1})=>{const{schemas:y}=$e(),[j,N]=X.useState(!0),[A,R]=X.useState(null),[C,D]=X.useState(null),[L,Z]=X.useState(null),[Y,E]=X.useState(null),[F,a]=X.useState(null),B=X.useRef(null),te=X.useRef(null),U=X.useDeferredValue(e),V=e!=null&&(U==null?void 0:U.id)!==e.id,H=o&&o.length>0?o:Y?[Y]:null,Q=H!=null&&H.length?{fieldKey:H[H.length-1].fieldKey,itemId:H[H.length-1].itemId}:null,z=X.useRef(o);X.useEffect(()=>{z.current!=null&&o==null&&E(null),z.current=o},[o]),X.useEffect(()=>{(e==null?void 0:e.id)!=null&&N(!1)},[e==null?void 0:e.id]);const S=()=>{const T=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const P=B.current;P&&P.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(T)},q=X.useRef(j);X.useEffect(()=>{if(j&&!q.current){const T=S();return q.current=j,T}q.current=j},[j]),X.useEffect(()=>{if(!Q)return;const T=B.current;if(!T)return;const P=requestAnimationFrame(()=>{const _=T.querySelector("[data-jp-expanded-item]")??T.querySelector("[data-jp-focused-field]");_&&_.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(P)},[Q]);const J=T=>{N(!1),p==null||p(T)},ee=()=>{N(T=>{const P=!T;return P&&S(),P})},ue=(T,P)=>{P.stopPropagation(),r.length>0&&u?a(T):(N(!1),p==null||p(T))};X.useEffect(()=>{if(F==null)return;const T=P=>{P.key==="Escape"&&a(null)};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[F]);const ie=T=>{A===T?(v==null||v(T),R(null)):(R(T),setTimeout(()=>R(null),3e3))},ae=(T,P)=>{D(P),T.dataTransfer.effectAllowed="move",T.dataTransfer.setData("application/json",JSON.stringify({sectionId:P}))},se=(T,P)=>{T.preventDefault(),C!==P&&Z(P)},ge=(T,P)=>{if(T.preventDefault(),D(null),Z(null),!C||C===P||!n)return;const _=l.filter($=>$.scope==="local"),w=_.findIndex($=>$.id===C),I=_.findIndex($=>$.id===P);w===-1||I===-1||n(C,I)},pe=e?k.sections.find(T=>T.id===e.id):void 0,xe=U?k.sections.find(T=>T.id===U.id):void 0,_e=U?y[U.type]:void 0,t=l.length>0&&(j||!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:[x!=null&&s.jsxs("button",{type:"button",onClick:x,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(sr,{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(Re,{size:16})})]})]}),l.length>0&&s.jsxs("div",{className:"bg-zinc-900/20 opacity-100",children:[s.jsxs("button",{type:"button",onClick:ee,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":t,"aria-label":t?"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:t?s.jsx(mt,{size:14}):s.jsx(ft,{size:14})})]}),!t&&e&&(()=>{const T=l.find(_=>_.id===e.id);if(!T)return null;const P=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:[T.type,P&&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:T.title??`${T.type} section`})]}),s.jsx("button",{type:"button",onClick:_=>ue(T.id,_),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${T.type}`,"aria-label":`Open settings for ${T.type} section`,children:s.jsx(lr,{size:12})})]})})()]})]}),s.jsxs("div",{ref:B,className:"flex-1 min-h-0 overflow-y-auto flex flex-col custom-scrollbar",children:[t&&s.jsxs("div",{className:"border-b border-zinc-800 bg-zinc-900/20 px-3 pb-3 pt-1",children:[l.map(T=>{const P=(e==null?void 0:e.id)===T.id,_=h===T.id,w=C===T.id,I=L===T.id,$=T.scope==="local"&&v,M=T.scope==="local"&&!!n;return s.jsxs("div",{draggable:M,onDragStart:O=>M&&ae(O,T.id),onDragOver:O=>M&&se(O,T.id),onDragLeave:()=>Z(null),onDrop:O=>M&&ge(O,T.id),onDragEnd:()=>{D(null),Z(null)},className:he("flex items-center gap-2 py-2.5 px-2 rounded-sm border-t transition-colors",I&&"border-t-2 border-dashed border-primary bg-primary/5",!I&&P&&"border-primary/30 bg-primary/10",!I&&!P&&"border-zinc-800/90 hover:bg-zinc-800/40",w&&"opacity-40",M?"cursor-grab active:cursor-grabbing":"cursor-default"),children:[s.jsx(bt,{size:12,className:`shrink-0 ${P?"text-primary":"text-zinc-500"}`}),s.jsxs("button",{type:"button",onClick:()=>J(T.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:[T.type,_&&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 ${P?"text-white font-medium":"text-zinc-500"}`,children:T.title??`${T.type} section`})]}),s.jsx("button",{type:"button",onClick:O=>ue(T.id,O),className:"p-1 rounded shrink-0 text-zinc-500 hover:text-primary transition-colors",title:`Open settings for ${T.type}`,"aria-label":`Open settings for ${T.type} section`,children:s.jsx(lr,{size:12})}),$&&s.jsx("button",{type:"button",onClick:O=>{O.stopPropagation(),ie(T.id)},className:`p-1 rounded shrink-0 ${A===T.id?"bg-red-500/20 text-red-400":"text-zinc-500 hover:text-red-400"}`,title:"Delete section",children:s.jsx(nt,{size:12})})]},T.id)}),A&&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(Fn,{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"})]})]}),Q&&pe&&(()=>{const T=pe.data||{};let P;if(H&&H.length>0){let _=T;for(const $ of H){const K=_==null?void 0:_[$.fieldKey];$.itemId!=null&&Array.isArray(K)?_=K.find(O=>String(O==null?void 0:O.id)===String($.itemId))??null:_=K}const w=_||{},I=Q.fieldKey;P=(typeof w.name=="string"?w.name:null)??(typeof w.title=="string"?w.title:null)??(typeof w.label=="string"?w.label:null)??I.charAt(0).toUpperCase()+I.slice(1).replace(/([A-Z])/g," $1").trim()}else{const _=Q.fieldKey;if(Q.itemId!=null){const $=(Array.isArray(T[_])?T[_]:[]).find(K=>String(K==null?void 0:K.id)===String(Q.itemId))||{};P=(typeof $.name=="string"?$.name:null)??(typeof $.title=="string"?$.title:null)??(typeof $.label=="string"?$.label:null)??_}else P=_.charAt(0).toUpperCase()+_.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:P})]})})(),s.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&N(!1),children:e?V?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"})]}):_e?(()=>{const P=Object.keys(_e.shape).filter(K=>!yr.has(K)),_=(xe==null?void 0:xe.data)||{};if(P.length===0)return s.jsx("p",{className:"text-xs text-zinc-500",children:"No content fields in schema."});const w=H==null?void 0:H[0],I=(w==null?void 0:w.itemId)!=null?{[w.fieldKey]:w.itemId}:(Q==null?void 0:Q.itemId)!=null?{[Q.fieldKey]:Q.itemId}:void 0,$=(w==null?void 0:w.fieldKey)??(Q==null?void 0:Q.fieldKey)??null;return s.jsx(He,{schema:_e,data:_,onChange:K=>m(K),keys:P,expandedItemPath:H,expandedItemIdByField:I,focusedFieldKey:$,onSidebarExpandedItemChange:E})})():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 ",(U==null?void 0:U.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:(g!=null||d!=null||b!=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",c?"text-amber-500":"text-zinc-500"),children:c?"Unsaved Changes":"All Changes Saved"}),g!=null&&s.jsxs("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-200 hover:bg-zinc-800 hover:border-zinc-600",children:[s.jsx(or,{size:12,className:"shrink-0"}),s.jsx("span",{children:"Bake HTML"})]}),d!=null&&s.jsxs("button",{type:"button",onClick: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"),children:[s.jsx(ir,{size:12,className:"shrink-0"}),s.jsx("span",{children:"Export JSON"})]}),b!=null&&f&&s.jsx("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-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"})})]})}),F!=null&&r.length>0&&u!=null&&(()=>{const T=r.find(O=>O.id===F),P=l.find(O=>O.id===F);if(!T)return null;const _=(P==null?void 0:P.scope)==="global"?"global":"local",w=T.type,I=y[w],K=(I?Object.keys(I.shape):[]).filter(O=>yr.has(O)),M=T.data??{};return K.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:()=>a(null),children:s.jsxs("div",{ref:te,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:O=>O.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 — ",w]}),s.jsx("button",{type:"button",onClick:()=>a(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(Re,{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:O=>O.target===O.currentTarget&&a(null),children:s.jsxs("div",{ref:te,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:O=>O.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 — ",w]}),s.jsx("button",{type:"button",onClick:()=>a(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(Re,{size:18})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:s.jsx(He,{schema:I,data:M,onChange:O=>{const G={...T.data,...O};u(F,_,w,G)},keys:K})})]})})})()]})},_r=({draft:e,globalDraft:k,themeConfig:r,slug:m,selectedId:u,scrollToSectionId:i,onScrollRequested:o})=>{const n=X.useRef(null),l=X.useCallback(()=>{var h;(h=n.current)!=null&&h.contentWindow&&n.current.contentWindow.postMessage({type:ve.UPDATE_DRAFTS,draft:e,globalDraft:k,themeConfig:r},"*")},[e,k,r]);return X.useEffect(()=>{l()},[l]),X.useEffect(()=>{const h=p=>{p.data.type===ve.STAGE_READY&&l()};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[l]),X.useEffect(()=>{var h;(h=n.current)!=null&&h.contentWindow&&n.current.contentWindow.postMessage({type:ve.SYNC_SELECTION,selectedId:u},"*")},[u]),X.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 k=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])=>{k.style.setProperty(u,i)})}},zr=()=>{var c;const[e,k]=X.useState(null),[r,m]=X.useState(null),[u,i]=X.useState(null),[o,n]=X.useState(null),[l,h]=X.useState(!1);if(X.useEffect(()=>{const g=d=>{d.data.type===ve.UPDATE_DRAFTS&&(k(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 b=document.documentElement.outerHTML;window.parent.postMessage({type:ve.SEND_CLEAN_HTML,html:b},"*"),h(!1)},50))};return window.addEventListener("message",g),window.parent.postMessage({type:ve.STAGE_READY},"*"),()=>window.removeEventListener("message",g)},[]),X.useEffect(()=>{const g=d=>{var E,F,a,B,te,U,V,H;const b=d.target,f=d.clientX,y=d.clientY;let j=null,N=b;for(;N&&N!==document.body;){const Q=(E=N.getAttribute)==null?void 0:E.call(N,"data-section-id"),z=(F=N.getAttribute)==null?void 0:F.call(N,"data-section-type"),S=(a=N.getAttribute)==null?void 0:a.call(N,"data-section-scope");if(Q&&z&&S){j=N;break}N=N.parentElement}if(!j)return;d.preventDefault(),d.stopPropagation();const A=j.getAttribute("data-section-id"),R=j.getAttribute("data-section-type"),C=j.getAttribute("data-section-scope");if(!A||!R||!C)return;const D={id:A,type:R,scope:C};if(b===j){window.parent.postMessage({type:ve.SECTION_SELECT,section:D},"*");return}const L=document.elementFromPoint(f,y)??b;if(!L||!j.contains(L)){window.parent.postMessage({type:ve.SECTION_SELECT,section:D},"*");return}if(L===j){window.parent.postMessage({type:ve.SECTION_SELECT,section:D},"*");return}const Z=[];for(N=L;N&&N!==j;){const Q=(B=N.getAttribute)==null?void 0:B.call(N,"data-jp-item-id"),z=(te=N.getAttribute)==null?void 0:te.call(N,"data-jp-item-field");Q&&z&&Z.push({fieldKey:z||"items",itemId:Q}),N=N.parentElement}if(Z.reverse(),Z.length===0)for(N=L;N&&N!==j;){const Q=(U=N.getAttribute)==null?void 0:U.call(N,"data-jp-field");if(Q){Z.push({fieldKey:Q});break}N=N.parentElement}if(Z.length===0&&L){let Q=null;const z=S=>{var J,ee;const q=S.getBoundingClientRect();if(q.left<=f&&f<=q.right&&q.top<=y&&y<=q.bottom){for(let ue=0;ue<S.children.length;ue++)z(S.children[ue]);((J=S.getAttribute)!=null&&J.call(S,"data-jp-item-id")||(ee=S.getAttribute)!=null&&ee.call(S,"data-jp-field"))&&(Q=S)}};if(z(L),Q){const S=Q,q=(V=S.getAttribute)==null?void 0:V.call(S,"data-jp-item-id"),J=(H=S.getAttribute)==null?void 0:H.call(S,"data-jp-field");q&&J?Z.push({fieldKey:J||"items",itemId:q}):J&&Z.push({fieldKey:J})}}const Y={type:ve.SECTION_SELECT,section:D};if(Z.length>0){Y.itemPath=Z;const Q=Z[0];Q.itemId!=null?(Y.itemField=Q.fieldKey,Y.itemId=Q.itemId):Y.itemField=Q.fieldKey}window.parent.postMessage(Y,"*")};return document.addEventListener("click",g,!0),()=>document.removeEventListener("click",g,!0)},[]),X.useEffect(()=>{if(!o)return;const g=setTimeout(()=>n(null),600);return()=>clearTimeout(g)},[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 p=(c=r.header)==null?void 0:c.data,v={main:(p==null?void 0:p.links)??[]},x=g=>{window.parent.postMessage({type:ve.ACTIVE_SECTION_CHANGED,activeSectionId:g},"*")};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:v,selectedId:l?null:u,scrollToSectionId:o,onActiveSectionChange:x})})})};function ho(e){return e.split("-").map(k=>k.charAt(0).toUpperCase()+k.slice(1).toLowerCase()).join(" ")}const jr=({open:e,onClose:k,sectionTypes:r,sectionTypeLabels:m,onSelect:u})=>{if(X.useEffect(()=>{if(!e)return;const o=n=>{n.key==="Escape"&&k()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[e,k]),!e)return null;const i=o=>(m==null?void 0:m[o])??ho(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:k,"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:k,className:"p-1.5 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close",children:s.jsx(Re,{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),k()},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"})})]})]})},Er=()=>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"})]}),po='/*! 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\\/4{width:75%}.w-6{width:calc(var(--spacing)*6)}.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-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\\/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\\/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-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-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-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))}.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\\: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\\: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 fo extends X.Component{constructor(k){super(k),this.state={hasError:!1,error:null}}static getDerivedStateFromError(k){return{hasError:!0,error:k}}componentDidCatch(k,r){console.error("[JsonPages Engine]",k,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 mo({config:e}){var N,A;const{registry:k={},schemas:r={},pages:m={},siteConfig:u,themeConfig:i,menuConfig:o,themeCss:n,addSection:l,NotFoundComponent:h=Er}=e,p=(l==null?void 0:l.addableSectionTypes)??Object.keys(r).filter(R=>R!=="header"&&R!=="footer"),v={exportJSON:((N=e.persistence)==null?void 0:N.exportJSON)??Ct,exportHTML:((A=e.persistence)==null?void 0:A.exportHTML)??At},x=typeof(n==null?void 0:n.tenant)=="string"?n.tenant:"",c=typeof(n==null?void 0:n.admin)=="string"?n.admin:po,[g,d]=X.useState(!1);X.useEffect(()=>{try{i!=null&&i.tokens&&at.setTheme(i)}catch(R){console.warn("[JsonPages] setTheme failed",R)}d(!0)},[i]);const b=()=>{const{slug:R="home"}=Ne.useParams(),[C,D]=X.useState(null);X.useEffect(()=>{const E=document.getElementById("jp-baked-state");if(E!=null&&E.textContent)try{const F=JSON.parse(E.textContent);D(F),at.setTheme(F.theme)}catch(F){console.error("Failed to parse baked state",F)}},[]);const L=C?C.page:m[R],Z=C?C.site:u,Y=C?C.menu:o;return L?s.jsx(ot,{mode:"tenant",tenantCss:x,adminCss:c,children:s.jsx(tt,{mode:"visitor",children:s.jsx(vt,{pageConfig:L,siteConfig:Z,menuConfig:Y})})}):s.jsx(h,{})},f=e.tenantId??"default",y=()=>{const{slug:R="home"}=Ne.useParams(),[C,D]=X.useState(null),[L,Z]=X.useState(!1),[Y,E]=X.useState(()=>{var O;try{const G=JSON.parse(JSON.stringify(u??{}));G.identity||(G.identity={title:"Site"}),G.pages||(G.pages=[]);const W=(O=G.header)==null?void 0:O.data;return W&&(o!=null&&o.main)&&(W.links=JSON.parse(JSON.stringify(o.main))),G}catch{return{identity:{title:"Site"},pages:[]}}}),[F,a]=X.useState(null),[B,te]=X.useState(null),[U,V]=X.useState(null),[H,Q]=X.useState(null),[z,S]=X.useState(!1),[q,J]=X.useState(400),ee=360,ue=920,ie=X.useCallback(O=>{O.preventDefault();const G=O.currentTarget;G.setPointerCapture(O.pointerId);const W=O.clientX,re=q,de=ke=>{const je=W-ke.clientX,Ee=Math.min(ue,Math.max(ee,re+je));J(Ee)},le=()=>{G.releasePointerCapture(O.pointerId),G.removeEventListener("pointermove",de),G.removeEventListener("pointerup",le),G.removeEventListener("pointercancel",le),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",G.addEventListener("pointermove",de),G.addEventListener("pointerup",le),G.addEventListener("pointercancel",le)},[q]),ae=C?[...Y.header?[{id:Y.header.id,type:Y.header.type,scope:"global",title:"Header"}]:[],...C.sections.map(O=>{var G,W;return{id:O.id,type:O.type,scope:"local",title:((G=O.data)==null?void 0:G.title)??((W=O.data)==null?void 0:W.titleHighlight)}}),...Y.footer?[{id:Y.footer.id,type:Y.footer.type,scope:"global",title:"Footer"}]:[]]:[],se=`jsonpages-draft-${f}-${R}`;X.useEffect(()=>{const O=m[R];try{const G=typeof window<"u"?localStorage.getItem(se):null,W=G?JSON.parse(G):null;W!=null&&W.page&&(W!=null&&W.site)?(D(JSON.parse(JSON.stringify(W.page))),E(JSON.parse(JSON.stringify(W.site)))):O&&D(JSON.parse(JSON.stringify(O)))}catch{O&&D(JSON.parse(JSON.stringify(O)))}a(null),te(null),Z(!1)},[R,m,se]),X.useEffect(()=>{if(!C||typeof window>"u")return;const O=setTimeout(()=>{try{localStorage.setItem(se,JSON.stringify({page:C,site:Y}))}catch{}},500);return()=>clearTimeout(O)},[C,Y,se]);const ge=X.useCallback(()=>{const O=m[R];try{typeof window<"u"&&localStorage.removeItem(se)}catch{}O&&D(JSON.parse(JSON.stringify(O))),a(null),te(null),Z(!1)},[R,m,se]),pe=X.useCallback((O,G,W)=>{const re=[...W.sections],de=re.findIndex(je=>je.id===O);if(de===-1||G<0||G>=re.length)return;const[le]=re.splice(de,1),ke=G>de?G-1:G;re.splice(Math.min(ke,re.length),0,le),D({...W,sections:re}),Z(!0)},[]),xe=X.useCallback(O=>{var G;if(O.origin===window.location.origin){if(O.data.type===ve.SECTION_SELECT){a(O.data.section);const W=O.data.itemPath;if(Array.isArray(W)&&W.length>0)te(W.map(re=>({fieldKey:re.fieldKey,...re.itemId!=null?{itemId:String(re.itemId)}:{}})));else{const re=O.data.itemField,de=O.data.itemId;te(typeof re=="string"?[{fieldKey:re,...de!=null?{itemId:String(de)}:{}}]:null)}}if(O.data.type===ve.ACTIVE_SECTION_CHANGED&&V(O.data.activeSectionId??null),O.data.type==="jsonpages:section-reorder"&&C){const{sectionId:W,newIndex:re}=O.data;typeof W=="string"&&typeof re=="number"&&re>=0&&pe(W,re,C)}if(O.data.type===ve.SEND_CLEAN_HTML){if(!C)return;const W=(G=Y.header)==null?void 0:G.data,re={page:C,site:Y,menu:{main:(W==null?void 0:W.links)??[]},theme:i};v.exportHTML(re,R,O.data.html),Z(!1)}}},[C,Y,R,i,pe]);X.useEffect(()=>(window.addEventListener("message",xe),()=>window.removeEventListener("message",xe)),[xe]);const _e=X.useCallback(O=>{const G=ae.find(W=>W.id===O);G&&a({id:G.id,type:G.type,scope:G.scope}),te(null),Q(O)},[ae]),t=X.useCallback(()=>{Q(null)},[]),T=X.useCallback(O=>{D(G=>G&&{...G,sections:G.sections.filter(W=>W.id!==O)}),Z(!0),a(G=>(G==null?void 0:G.id)===O?null:G)},[]),P=O=>{if(!(!F||!C))if(Z(!0),F.scope==="global")F.type==="header"&&Y.header!=null?E({...Y,header:{...Y.header,data:O}}):F.type==="footer"&&Y.footer!=null&&E({...Y,footer:{...Y.footer,data:O}});else{const G=C.sections.map(W=>W.id===F.id?{...W,data:O}:W);D({...C,sections:G})}},_=X.useCallback((O,G,W,re)=>{var de,le;if(Z(!0),G==="global")((de=Y.header)==null?void 0:de.id)===O?E({...Y,header:{...Y.header,data:re}}):((le=Y.footer)==null?void 0:le.id)===O&&E({...Y,footer:{...Y.footer,data:re}});else if(C){const ke=C.sections.map(je=>je.id===O?{...je,data:re}:je);D({...C,sections:ke})}},[C,Y]),w=()=>{var G;const O=document.querySelector("iframe");(G=O==null?void 0:O.contentWindow)==null||G.postMessage({type:ve.REQUEST_CLEAN_HTML},"*")},I=()=>{var W;if(!C)return;const O=(W=Y.header)==null?void 0:W.data,G={page:C,site:Y,menu:{main:(O==null?void 0:O.links)??[]},theme:i};v.exportJSON(G,R),Z(!1)},$=O=>{var re;if(!C)return;const G=((re=l==null?void 0:l.getDefaultSectionData)==null?void 0:re.call(l,O))??{},W={id:crypto.randomUUID(),type:O,data:G,settings:void 0};D({...C,sections:[...C.sections,W]}),Z(!0),a({id:W.id,type:O,scope:"local"})};if(!C)return s.jsx("div",{children:"Loading Studio..."});const K=(F==null?void 0:F.scope)==="global"?{sections:[Y.header,Y.footer].filter(O=>O!=null)}:C,M=[...Y.header?[Y.header]:[],...C.sections,...Y.footer?[Y.footer]:[]];return s.jsx(ot,{mode:"admin",tenantCss:x,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(_r,{draft:C,globalDraft:Y,themeConfig:i,slug:R,selectedId:F==null?void 0:F.id,scrollToSectionId:H,onScrollRequested:t})}),s.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:q,minWidth:ee,maxWidth:ue},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:ie}),s.jsx(kr,{selectedSection:F,pageData:K,allSectionsData:M,onUpdate:P,onUpdateSection:_,onClose:()=>{a(null),te(null)},expandedItemPath:B,onReorderSection:C?(O,G)=>pe(O,G,C):void 0,allLayers:ae,activeSectionId:U,onRequestScrollToSection:_e,onDeleteSection:C?T:void 0,onAddSection:p.length>0?()=>S(!0):void 0,hasChanges:L,onExportHTML:w,onExportJSON:I,onResetToFile:ge})]})]}),s.jsx(jr,{open:z,onClose:()=>S(!1),sectionTypes:p,sectionTypeLabels:l==null?void 0:l.sectionTypeLabels,onSelect:$})]})})})},j=()=>s.jsx(ot,{mode:"tenant",tenantCss:x,adminCss:c,children:s.jsx(zr,{})});return g?s.jsx(fo,{children:s.jsx(Qt,{config:{registry:k,schemas:r,tenantId:e.tenantId??"default",assets:e.assets},children:s.jsx(Ne.BrowserRouter,{children:s.jsxs(Ne.Routes,{children:[s.jsx(Ne.Route,{path:"/",element:s.jsx(b,{})}),s.jsx(Ne.Route,{path:"/:slug",element:s.jsx(b,{})}),s.jsx(Ne.Route,{path:"/admin",element:s.jsx(y,{})}),s.jsx(Ne.Route,{path:"/admin/:slug",element:s.jsx(y,{})}),s.jsx(Ne.Route,{path:"/admin/preview/:slug",element:s.jsx(j,{})}),s.jsx(Ne.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 bo=({hasChanges:e,onExportJSON:k,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($n,{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:k,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(ir,{size:14}),s.jsx("span",{children:"Export JSON"})]})]})]});fe.AddSectionLibrary=jr,fe.AdminSidebar=kr,fe.ConfigProvider=Qt,fe.ControlBar=bo,fe.DefaultNotFound=Er,fe.FormFactory=He,fe.InputWidgets=Ge,fe.JsonPagesEngine=mo,fe.PageRenderer=vt,fe.PreviewEntry=zr,fe.STUDIO_EVENTS=ve,fe.SectionRenderer=Ze,fe.StudioProvider=tt,fe.StudioStage=_r,fe.ThemeLoader=ot,fe.cn=he,fe.exportBakedHTML=At,fe.exportProjectJSON=Ct,fe.resolveAssetUrl=xr,fe.themeManager=at,fe.useConfig=$e,fe.useStudio=tr,Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"})}));