commit d80122979545e731d2325e06fd18e40fd8af9828 Author: indigane Date: Fri May 13 11:52:13 2022 +0300 Initial commit diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..965406d --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. + +In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTBILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/README.md b/README.md new file mode 100644 index 0000000..9500bfd --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# Card Sort + +A tool for conducting a virtual card sorting. + +## Web + +https://indigane.github.io/cardsort/ + +## Read about card sorting + +https://en.wikipedia.org/wiki/Card_sorting diff --git a/card-sort.html b/card-sort.html new file mode 100644 index 0000000..be7193e --- /dev/null +++ b/card-sort.html @@ -0,0 +1,375 @@ + + + + + + Card Sort + + + +
+
+ + + +
+
+
+
+
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/common-scripts.js b/common-scripts.js new file mode 100644 index 0000000..8148523 --- /dev/null +++ b/common-scripts.js @@ -0,0 +1,78 @@ +/* Settings flags */ +const settingsFlagsKey = '?'; +const settingsFlagsEnum = { + allowCategoryEditing: 1, +}; + +function loadSettings(data) { + const settings = {}; + const flags = data[settingsFlagsKey]; + settings.allowCategoryEditing = Boolean(settingsFlagsEnum.allowCategoryEditing & flags); + return settings; +} +function saveSettings(settings) { + let flags = 0; + for (const [settingName, isEnabled] of Object.entries(settings)) { + if (isEnabled) { + flags |= settingsFlagsEnum[settingName]; + } + } + return flags; +} + +/* Saving and loading */ +const uncategorizedKey = '#'; +const reservedKeys = [ + settingsFlagsKey, + uncategorizedKey, +]; +const regexRemoveBasenameFromUrl = /\/[^\/]*?$/; + +async function uint8ArrayToBase64(data) { + const base64url = await new Promise((resolve) => { + const reader = new FileReader(); + reader.onload = () => resolve(reader.result); + reader.readAsDataURL(new Blob([data])); + }); + return base64url.split(',', 2)[1]; +} +async function base64ToUint8Array(base64string) { + const response = await fetch('data:;base64,' + base64string); + const blob = await response.blob(); + return new Uint8Array(await blob.arrayBuffer()); +} +async function saveToString(data) { + const jsonString = JSON.stringify(data); + const compressedData = pako.deflate(new TextEncoder().encode(jsonString)); + const base64String = await uint8ArrayToBase64(compressedData); + const webSafeBase64String = base64String.replaceAll('+', '-').replaceAll('/', '_'); + return webSafeBase64String; +} +async function loadFromString(webSafeBase64String) { + const base64String = webSafeBase64String.replaceAll('-', '+').replaceAll('_', '/'); + const compressedData = await base64ToUint8Array(base64String); + const jsonString = new TextDecoder('utf8').decode(pako.inflate(compressedData)); + const data = JSON.parse(jsonString); + return data; +} + +/* Utilities */ +function debounce(func, wait, immediate) { + let timeout; + return function debouncedFunc() { + const context = this; + const args = arguments; + const later = function () { + timeout = null; + if ( ! immediate) { + func.apply(context, args); + } + }; + const callNow = immediate && ! timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) { + func.apply(context, args); + } + }; +} \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..0fc500c --- /dev/null +++ b/index.html @@ -0,0 +1,79 @@ + + + + + + Card Sort + + + +
Enter card texts one per line or separated by commas
+
+ +
+
Enter category names one per line or separated by commas (optional)
+
+ +
+
+ +
+
+ +
+ + + + + + \ No newline at end of file diff --git a/muuri-0.9.5.min.js b/muuri-0.9.5.min.js new file mode 100644 index 0000000..d274b9e --- /dev/null +++ b/muuri-0.9.5.min.js @@ -0,0 +1,21 @@ +/** +* Muuri v0.9.5 +* https://muuri.dev/ +* Copyright (c) 2015-present, Haltu Oy +* Released under the MIT license +* https://github.com/haltu/muuri/blob/master/LICENSE.md +* @license MIT +* +* Muuri Packer +* Copyright (c) 2016-present, Niklas Rämö +* @license MIT +* +* Muuri Ticker / Muuri Emitter / Muuri Dragger +* Copyright (c) 2018-present, Niklas Rämö +* @license MIT +* +* Muuri AutoScroller +* Copyright (c) 2019-present, Niklas Rämö +* @license MIT +*/ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Muuri=e()}(this,(function(){"use strict";var t={},e="function"==typeof Map?new Map:null,i="swap",s="move",n="layoutStart",o="layoutEnd",r="layoutAbort",h="remove",a="hideStart",_="filter",l="sort",d="move",u="send",c="beforeSend",f="receive",p="beforeReceive",m="dragReleaseEnd",g="ontouchstart"in window,v=!!window.PointerEvent,y=!!window.navigator.msPointerEnabled;function S(){this._events={},this._queue=[],this._counter=0,this._clearOnEmit=!1}S.prototype.on=function(t,e){if(!this._events||!t||!e)return this;var i=this._events[t];return i||(i=this._events[t]=[]),i.push(e),this},S.prototype.off=function(t,e){if(!this._events||!t||!e)return this;var i,s=this._events[t];if(!s||!s.length)return this;for(;-1!==(i=s.indexOf(e));)s.splice(i,1);return this},S.prototype.clear=function(t){if(!this._events||!t)return this;var e=this._events[t];return e&&(e.length=0,delete this._events[t]),this},S.prototype.emit=function(t){if(!this._events||!t)return this._clearOnEmit=!1,this;var e=this._events[t];if(!e||!e.length)return this._clearOnEmit=!1,this;var i,s=this._queue,n=s.length,o=arguments.length-1;o>3&&((i=[]).push.apply(i,arguments),i.shift()),s.push.apply(s,e),this._clearOnEmit&&(e.length=0,this._clearOnEmit=!1),++this._counter;for(var r=n,h=s.length;r-1,L=x.indexOf("trident")>-1,R=x.indexOf("firefox")>-1,I=x.indexOf("android")>-1,C=!!T()&&{passive:!0},M="touchAction",P=E(document.documentElement.style,M);function X(t,e){this._element=t,this._emitter=new S,this._isDestroyed=!1,this._cssProps={},this._touchAction="",this._isActive=!1,this._pointerId=null,this._startTime=0,this._startX=0,this._startY=0,this._currentX=0,this._currentY=0,this._onStart=this._onStart.bind(this),this._onMove=this._onMove.bind(this),this._onCancel=this._onCancel.bind(this),this._onEnd=this._onEnd.bind(this),this._edgeHack=null,(k||L)&&(v||y)&&(this._edgeHack=new D(this)),this.setCssProps(e),this._touchAction||this.setTouchAction("auto"),t.addEventListener("dragstart",X._preventDefault,!1),t.addEventListener(X._inputEvents.start,this._onStart,C)}X._pointerEvents={start:"pointerdown",move:"pointermove",cancel:"pointercancel",end:"pointerup"},X._msPointerEvents={start:"MSPointerDown",move:"MSPointerMove",cancel:"MSPointerCancel",end:"MSPointerUp"},X._touchEvents={start:"touchstart",move:"touchmove",cancel:"touchcancel",end:"touchend"},X._mouseEvents={start:"mousedown",move:"mousemove",cancel:"",end:"mouseup"},X._inputEvents=g?X._touchEvents:v?X._pointerEvents:y?X._msPointerEvents:X._mouseEvents,X._emitter=new S,X._emitterEvents={start:"start",move:"move",end:"end",cancel:"cancel"},X._activeInstances=[],X._preventDefault=function(t){t.preventDefault&&!1!==t.cancelable&&t.preventDefault()},X._activateInstance=function(t){X._activeInstances.indexOf(t)>-1||(X._activeInstances.push(t),X._emitter.on(X._emitterEvents.move,t._onMove),X._emitter.on(X._emitterEvents.cancel,t._onCancel),X._emitter.on(X._emitterEvents.end,t._onEnd),1===X._activeInstances.length&&X._bindListeners())},X._deactivateInstance=function(t){var e=X._activeInstances.indexOf(t);-1!==e&&(X._activeInstances.splice(e,1),X._emitter.off(X._emitterEvents.move,t._onMove),X._emitter.off(X._emitterEvents.cancel,t._onCancel),X._emitter.off(X._emitterEvents.end,t._onEnd),X._activeInstances.length||X._unbindListeners())},X._bindListeners=function(){window.addEventListener(X._inputEvents.move,X._onMove,C),window.addEventListener(X._inputEvents.end,X._onEnd,C),X._inputEvents.cancel&&window.addEventListener(X._inputEvents.cancel,X._onCancel,C)},X._unbindListeners=function(){window.removeEventListener(X._inputEvents.move,X._onMove,C),window.removeEventListener(X._inputEvents.end,X._onEnd,C),X._inputEvents.cancel&&window.removeEventListener(X._inputEvents.cancel,X._onCancel,C)},X._getEventPointerId=function(t){return"number"==typeof t.pointerId?t.pointerId:t.changedTouches?t.changedTouches[0]?t.changedTouches[0].identifier:null:1},X._getTouchById=function(t,e){if("number"==typeof t.pointerId)return t.pointerId===e?t:null;if(t.changedTouches){for(var i=0;i=this.maxValue:this.value<=0},kt.prototype.computeCurrentScrollValue=function(){return null===this.value?1&this.direction?St(this.element):wt(this.element):Math.max(0,Math.min(this.value,this.maxValue))},kt.prototype.computeNextScrollValue=function(t){var e=this.speed*(t/1e3),i=4&this.direction?this.value+e:this.value-e;return Math.max(0,Math.min(i,this.maxValue))},kt.prototype.computeSpeed=(pt={direction:null,threshold:0,distance:0,value:0,maxValue:0,deltaTime:0,duration:0,isEnding:!1},function(t){var e=this.item,i=Et(e).speed;return dt(i)?(pt.direction=this.direction,pt.threshold=this.threshold,pt.distance=this.distance,pt.value=this.value,pt.maxValue=this.maxValue,pt.duration=this.duration,pt.speed=this.speed,pt.deltaTime=t,pt.isEnding=this.isEnding,i(e,this.element,pt)):i}),kt.prototype.tick=function(t){return this.isActive||(this.isActive=!0,this.onStart()),this.value=this.computeCurrentScrollValue(),this.speed=this.computeSpeed(t),this.value=this.computeNextScrollValue(t),this.duration+=t,this.value},kt.prototype.onStart=function(){var t=this.item,e=Et(t).onStart;dt(e)&&e(t,this.element,this.direction)},kt.prototype.onStop=function(){var t=this.item,e=Et(t).onStop;dt(e)&&e(t,this.element,this.direction),t._drag&&t._drag.sort()},Lt.prototype.reset=function(){this.requestX&&(this.requestX.action=null),this.requestY&&(this.requestY.action=null),this.element=null,this.requestX=null,this.requestY=null,this.scrollLeft=0,this.scrollTop=0},Lt.prototype.addRequest=function(t){1&t.direction?(this.removeRequest(this.requestX),this.requestX=t):(this.removeRequest(this.requestY),this.requestY=t),t.action=this},Lt.prototype.removeRequest=function(t){t&&(this.requestX===t?(this.requestX=null,t.action=null):this.requestY===t&&(this.requestY=null,t.action=null))},Lt.prototype.computeScrollValues=function(){this.scrollLeft=this.requestX?this.requestX.value:St(this.element),this.scrollTop=this.requestY?this.requestY.value:wt(this.element)},Lt.prototype.scroll=function(){var t=this.element;t&&(t.scrollTo?t.scrollTo(this.scrollLeft,this.scrollTop):(t.scrollLeft=this.scrollLeft,t.scrollTop=this.scrollTop))},Rt.prototype.pick=function(){return this.pool.pop()||this.createItem()},Rt.prototype.release=function(t){this.releaseItem(t),-1===this.pool.indexOf(t)&&this.pool.push(t)},Rt.prototype.reset=function(){this.pool.length=0};var Ct={width:0,height:0,left:0,right:0,top:0,bottom:0},Mt={width:0,height:0,left:0,right:0,top:0,bottom:0};function Pt(){this._isDestroyed=!1,this._isTicking=!1,this._tickTime=0,this._tickDeltaTime=0,this._items=[],this._actions=[],this._requests={},this._requests[1]={},this._requests[2]={},this._requestOverlapCheck={},this._dragPositions={},this._dragDirections={},this._overlapCheckInterval=150,this._requestPool=new Rt((function(){return new kt}),(function(t){t.reset()})),this._actionPool=new Rt((function(){return new Lt}),(function(t){t.reset()})),this._readTick=this._readTick.bind(this),this._writeTick=this._writeTick.bind(this)}Pt.AXIS_X=1,Pt.AXIS_Y=2,Pt.FORWARD=4,Pt.BACKWARD=8,Pt.LEFT=9,Pt.RIGHT=5,Pt.UP=10,Pt.DOWN=6,Pt.smoothSpeed=function(t,e,i){return function(s,n,o){var r=0;if(!o.isEnding)if(o.threshold>0){var h=o.threshold-Math.max(0,o.distance);r=t/o.threshold*h}else r=t;var a=o.speed,_=r;return a===r?_:a=A&&w>0&&(g>A||m>T)&&(y=null,v=xt("number"==typeof u.threshold?u.threshold:o,r,l.width,d.width),5===a?(S=d.right+v.offset-l.right)<=v.value&&St(c)0&&(y=9),null!==y&&(b=c,A=g,E=v.value,T=m,x=y,k=S,L=w)),p&&g>=I&&D>0&&(g>I||m>M)&&(y=null,v=xt("number"==typeof u.threshold?u.threshold:o,r,l.height,d.height),6===_?(S=d.bottom+v.offset-l.bottom)<=v.value&&wt(c)0&&(y=10),null!==y&&(R=c,I=g,C=v.value,M=m,P=y,X=S,Y=D)))));e&&(b?this._requestItemScroll(t,1,b,x,E,k,L):this._cancelItemScroll(t,1)),i&&(R?this._requestItemScroll(t,2,R,P,C,X,Y):this._cancelItemScroll(t,2))},Pt.prototype._updateScrollRequest=function(t){for(var e=t.item,i=Et(e),s=dt(i.targets)?i.targets(e):i.targets,n=s&&s.length||0,o=i.threshold,r=i.safeZone,h=this._getItemHandleRect(e,i.handle,Ct),a=Mt,_=null,l=null,d=!1,u=null,c=null,f=null,p=null,m=null,g=0;gu.value)break;if(f=d?St(l):wt(l),m=4&t.direction?f>=p:f<=0)break;return t.maxValue=p,t.threshold=u.value,t.distance=c,t.isEnding=!1,!0}return!0===i.smoothStop&&t.speed>0?(null===m&&(m=t.hasReachedEnd()),t.isEnding=!m):t.isEnding=!1,t.isEnding},Pt.prototype._updateRequests=function(){for(var t,e,i,s,n,o,r,h=this._items,a=this._requests[1],_=this._requests[2],l=0;l0&&this._tickTime-s>this._overlapCheckInterval,o=!0,(e=a[t._id])&&e.isActive&&(o=!this._updateScrollRequest(e))&&(n=!0,this._cancelItemScroll(t,1)),r=!0,(i=_[t._id])&&i.isActive&&(r=!this._updateScrollRequest(i))&&(n=!0,this._cancelItemScroll(t,2)),n&&(this._requestOverlapCheck[t._id]=0,this._checkItemOverlap(t,o,r))},Pt.prototype._requestAction=function(t,e){for(var i=this._actions,s=1===e,n=null,o=0;oo?5:sr?6:ns?s:e<0?Math.max(s+e+1,0):e}function Bt(t,e,i){if(!(t.length<2)){var s=Wt(t,e),n=Wt(t,i);s!==n&&t.splice(n,0,t.splice(s,1)[0])}}function Nt(t,e,i){if(!(t.length<2)){var s,n=Wt(t,e),o=Wt(t,i);n!==o&&(s=t[n],t[n]=t[o],t[o]=s)}}var Ft=E(document.documentElement.style,"transform")||"transform",zt=/([A-Z])/g,Vt=/^(webkit-|moz-|ms-|o-)/,jt=/^(-m-s-)/;function Qt(t){var e=t.replace(zt,"-$1").toLowerCase();return e=(e=e.replace(Vt,"-$1")).replace(jt,"-ms-")}var Ut=Qt(Ft);function Zt(t){var e=ct(t,Ut);if(!e||"none"===e)return!1;var i=ct(t,"display");return"inline"!==i&&"none"!==i}function Jt(t){for(var e=document,i=t||e;i&&i!==e&&"static"===ct(i,"position")&&!Zt(i);)i=i.parentElement||e;return i}var $t={},Kt={},te={};function ee(t,e){var i,s=e||{};return s.left=0,s.top=0,t===document?s:(s.left=window.pageXOffset||0,s.top=window.pageYOffset||0,t.self===window.self||(i=t.getBoundingClientRect(),s.left+=i.left,s.top+=i.top,s.left+=ft(t,"border-left-width"),s.top+=ft(t,"border-top-width")),s)}function ie(t,e,i){return te.left=0,te.top=0,t===e||i&&(t=Jt(t))===(e=Jt(e))||(ee(t,$t),ee(e,Kt),te.left=Kt.left-$t.left,te.top=Kt.top-$t.top),te}function se(t){return"auto"===t||"scroll"===t||"overlay"===t}function ne(t){return se(ct(t,"overflow"))||se(ct(t,"overflow-x"))||se(ct(t,"overflow-y"))}function oe(t,e){for(e=e||[];t&&t!==document;)t.getRootNode&&t instanceof DocumentFragment?t=t.getRootNode().host:(ne(t)&&e.push(t),t=t.parentNode);return e.push(window),e}var re={},he=/^matrix3d/,ae=/([^,]*,){4}/,_e=/([^,]*,){12}/,le=/[^,]*,/;function de(t){re.x=0,re.y=0;var e=ct(t,Ut);if(!e||"none"===e)return re;var i=he.test(e),s=e.replace(i?_e:ae,""),n=s.replace(le,"");return re.x=parseFloat(s)||0,re.y=parseFloat(n)||0,re}function ue(t,e){e&&(t.classList?t.classList.remove(e):qt(t,"."+e)&&(t.className=(" "+t.className+" ").replace(" "+e+" "," ").trim()))}var ce,fe,pe,me,ge=/^(iPad|iPhone|iPod)/.test(window.navigator.platform)||/^Mac/.test(window.navigator.platform)&&window.navigator.maxTouchPoints>1,ve=!!T()&&{passive:!0};function ye(t){var e=t._element,i=t.getGrid(),s=i._settings;this._item=t,this._gridId=i._id,this._isDestroyed=!1,this._isMigrating=!1,this._startPredicate=dt(s.dragStartPredicate)?s.dragStartPredicate:ye.defaultStartPredicate,this._startPredicateState=0,this._startPredicateResult=void 0,this._isSortNeeded=!1,this._sortTimer=void 0,this._blockedSortIndex=null,this._sortX1=0,this._sortX2=0,this._sortY1=0,this._sortY2=0,this._reset(),this._preStartCheck=this._preStartCheck.bind(this),this._preEndCheck=this._preEndCheck.bind(this),this._onScroll=this._onScroll.bind(this),this._prepareStart=this._prepareStart.bind(this),this._applyStart=this._applyStart.bind(this),this._prepareMove=this._prepareMove.bind(this),this._applyMove=this._applyMove.bind(this),this._prepareScroll=this._prepareScroll.bind(this),this._applyScroll=this._applyScroll.bind(this),this._handleSort=this._handleSort.bind(this),this._handleSortDelayed=this._handleSortDelayed.bind(this),this._handle=s.dragHandle&&e.querySelector(s.dragHandle)||e,this._dragger=new X(this._handle,s.dragCssProps),this._dragger.on("start",this._preStartCheck),this._dragger.on("move",this._preStartCheck),this._dragger.on("cancel",this._preEndCheck),this._dragger.on("end",this._preEndCheck)}function Se(t,e){var i,s,n={};if(Array.isArray(e))for(s=0;s=l||_>=d||(fe.left=a,fe.top=_,fe.width=l-a,fe.height=d-_,(s=It(ce,fe))>i&&s>p&&(p=s,c=o))}return me.length=0,c}(t,o,r);if(!_)return null;var l,d,u,c=t.getGrid()!==_,f=0,p=0,m=0,g=-1,v=!1;for(_===o?(ce.left=n._gridX+t._marginLeft,ce.top=n._gridY+t._marginTop):(_._updateBorders(1,0,1,0),f=_._left+_._borderLeft,p=_._top+_._borderTop),u=0;u<_._items.length;u++)(l=_._items[u])._isActive&&l!==t&&(v=!0,fe.width=l._width,fe.height=l._height,fe.left=l._left+l._marginLeft+f,fe.top=l._top+l._marginTop+p,(d=It(ce,fe))>m&&(g=u,m=d));return c&&m=r?(pe.grid=_,pe.index=g,pe.action=c?a:h,pe):null}),ye.prototype.stop=function(){if(this._isActive)if(this._isMigrating)this._finishMigration();else{var t=this._item,e=t._id;if(ye.autoScroller.removeItem(t),ot(e),rt(e),ht(e),this._cancelSort(),this._isStarted){this._unbindScrollListeners();var i=t._element,s=this._getGrid(),n=s._settings.itemDraggingClass;i.parentNode!==s._element&&(s._element.appendChild(i),t._setTranslate(this._gridX,this._gridY),n&&i.clientWidth),ue(i,n)}this._reset()}},ye.prototype.sort=function(t){var e=this._item;this._isActive&&e._isActive&&this._dragMoveEvent&&(!0===t?this._handleSort():at(e._id,this._handleSort))},ye.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._dragger.destroy(),ye.autoScroller.removeItem(this._item),this._isDestroyed=!0)},ye.prototype._getGrid=function(){return t[this._gridId]||null},ye.prototype._reset=function(){this._isActive=!1,this._isStarted=!1,this._container=null,this._containingBlock=null,this._dragStartEvent=null,this._dragMoveEvent=null,this._dragPrevMoveEvent=null,this._scrollEvent=null,this._scrollers=[],this._left=0,this._top=0,this._gridX=0,this._gridY=0,this._clientX=0,this._clientY=0,this._scrollDiffX=0,this._scrollDiffY=0,this._moveDiffX=0,this._moveDiffY=0,this._containerDiffX=0,this._containerDiffY=0},ye.prototype._bindScrollListeners=function(){var t,e,i=this._getGrid()._element,s=this._container,n=this._scrollers;if(n.length=0,oe(this._item._element.parentNode,n),s!==i)for(oe(i,t=[]),e=0;e3&&i.minBounceBackAngle>0;if(r||(this._blockedSortIndex=null),Math.abs(n)>s||Math.abs(o)>s){if(r){var h=Math.atan2(n,o),a=Math.atan2(this._sortX2-this._sortX1,this._sortY2-this._sortY1),_=Math.atan2(Math.sin(h-a),Math.cos(h-a));Math.abs(_)>i.minBounceBackAngle&&(this._blockedSortIndex=null)}return this._sortX1=this._sortX2,this._sortY1=this._sortY2,this._sortX2=t,this._sortY2=e,!0}return!1},ye.prototype._resetStartPredicate=function(){var t=this._startPredicateData;t&&(t.delayTimer&&(t.delayTimer=window.clearTimeout(t.delayTimer)),this._startPredicateData=null)},ye.prototype._handleSort=function(){if(this._isActive){var t=this._getGrid()._settings;if(!t.dragSort||!t.dragAutoScroll.sortDuringScroll&&ye.autoScroller.isItemScrolling(this._item))return this._sortX1=this._sortX2=this._gridX,this._sortY1=this._sortY2=this._gridY,this._isSortNeeded=!0,void(void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)));var e=this._checkHeuristics(this._gridX,this._gridY);if(this._isSortNeeded||e){var i=t.dragSortHeuristics.sortInterval;i<=0||this._isSortNeeded?(this._isSortNeeded=!1,void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)),this._checkOverlap()):void 0===this._sortTimer&&(this._sortTimer=window.setTimeout(this._handleSortDelayed,i))}}},ye.prototype._handleSortDelayed=function(){this._isSortNeeded=!0,this._sortTimer=void 0,at(this._item._id,this._handleSort)},ye.prototype._cancelSort=function(){var t;this._isSortNeeded=!1,void 0!==this._sortTimer&&(this._sortTimer=window.clearTimeout(this._sortTimer)),t=this._item._id,it.remove(1,U+t)},ye.prototype._finishSort=function(){var t=this._getGrid()._settings.dragSort&&(this._isSortNeeded||void 0!==this._sortTimer);this._cancelSort(),t&&this._checkOverlap()},ye.prototype._checkOverlap=function(){if(this._isActive){var t,e,n,o,r,h,a,_,l=this._item,m=this._getGrid()._settings;(t=dt(m.dragSortPredicate)?m.dragSortPredicate(l,this._dragMoveEvent):ye.defaultSortPredicate(l,m.dragSortPredicate))&&"number"==typeof t.index&&(a=t.action===i?i:s,_=(e=l.getGrid())!==(o=t.grid||e),n=e._items.indexOf(l),r=Wt(o._items,t.index,_&&a===s?1:0),(_||r!==this._blockedSortIndex)&&(_?(this._blockedSortIndex=null,h=o._items[r],e._hasListeners(c)&&e._emit(c,{item:l,fromGrid:e,fromIndex:n,toGrid:o,toIndex:r}),o._hasListeners(p)&&o._emit(p,{item:l,fromGrid:e,fromIndex:n,toGrid:o,toIndex:r}),l._gridId=o._id,this._isMigrating=l._gridId!==this._gridId,e._items.splice(n,1),Gt(o._items,l,r),l._sortData=null,e._hasListeners(u)&&e._emit(u,{item:l,fromGrid:e,fromIndex:n,toGrid:o,toIndex:r}),o._hasListeners(f)&&o._emit(f,{item:l,fromGrid:e,fromIndex:n,toGrid:o,toIndex:r}),a===i&&h&&h.isActive()&&o._items.indexOf(h)>-1&&o.send(h,e,n,{appendTo:this._container||document.body,layoutSender:!1,layoutReceiver:!1}),e.layout(),o.layout()):n!==r&&(this._blockedSortIndex=n,(a===i?Nt:Bt)(e._items,n,r),e._hasListeners(d)&&e._emit(d,{item:l,fromIndex:n,toIndex:r,action:a}),e.layout())))}},ye.prototype._finishMigration=function(){var t,e,i=this._item,s=i._dragRelease,n=i._element,o=i._isActive,r=i.getGrid(),h=r._element,a=r._settings,_=a.dragContainer||h,l=this._getGrid()._settings,d=n.parentNode,u=o?l.itemVisibleClass:l.itemHiddenClass,c=o?a.itemVisibleClass:a.itemHiddenClass;this._isMigrating=!1,this.destroy(),l.itemClass!==a.itemClass&&(ue(n,l.itemClass),Ot(n,a.itemClass)),u!==c&&(ue(n,u),Ot(n,c)),_!==d&&(_.appendChild(n),e=ie(d,_,!0),(t=de(n)).x-=e.left,t.y-=e.top),i._refreshDimensions(),e=ie(_,h,!0),s._containerDiffX=e.left,s._containerDiffY=e.top,i._drag=a.dragEnabled?new ye(i):null,_!==d&&i._setTranslate(t.x,t.y),i._visibility.setStyles(o?a.visibleStyles:a.hiddenStyles),s.start()},ye.prototype._preStartCheck=function(t){0===this._startPredicateState&&(this._startPredicateState=1),1===this._startPredicateState?(this._startPredicateResult=this._startPredicate(this._item,t),!0===this._startPredicateResult?(this._startPredicateState=2,this._onStart(t)):!1===this._startPredicateResult&&(this._resetStartPredicate(t),this._dragger._reset(),this._startPredicateState=0)):2===this._startPredicateState&&this._isActive&&this._onMove(t)},ye.prototype._preEndCheck=function(t){var e=2===this._startPredicateState;this._startPredicate(this._item,t),this._startPredicateState=0,e&&this._isActive&&(this._isStarted?this._onEnd(t):this.stop())},ye.prototype._onStart=function(t){var e,i,s,n=this._item;n._isActive&&(this._isActive=!0,this._dragStartEvent=t,ye.autoScroller.addItem(n),e=n._id,i=this._prepareStart,s=this._applyStart,it.add(0,N+e,i),it.add(2,F+e,s))},ye.prototype._prepareStart=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=t._element,i=this._getGrid(),s=i._settings,n=i._element,o=s.dragContainer||n,r=Jt(o),h=de(e),a=e.getBoundingClientRect(),_=o!==n;if(this._container=o,this._containingBlock=r,this._clientX=a.left,this._clientY=a.top,this._left=this._gridX=h.x,this._top=this._gridY=h.y,this._scrollDiffX=this._scrollDiffY=0,this._moveDiffX=this._moveDiffY=0,this._resetHeuristics(this._gridX,this._gridY),_){var l=ie(r,n);this._containerDiffX=l.left,this._containerDiffY=l.top}}}},ye.prototype._applyStart=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=this._getGrid(),i=t._element,s=t._dragRelease,n=t._migrate,o=this._container!==e._element;t.isPositioning()&&t._layout.stop(!0,this._left,this._top),n._isActive&&(this._left-=n._containerDiffX,this._top-=n._containerDiffY,this._gridX-=n._containerDiffX,this._gridY-=n._containerDiffY,n.stop(!0,this._left,this._top)),t.isReleasing()&&s._reset(),e._settings.dragPlaceholder.enabled&&t._dragPlaceholder.create(),this._isStarted=!0,e._emit("dragInit",t,this._dragStartEvent),o&&(i.parentNode===this._container?(this._gridX-=this._containerDiffX,this._gridY-=this._containerDiffY):(this._left+=this._containerDiffX,this._top+=this._containerDiffY,this._container.appendChild(i),t._setTranslate(this._left,this._top))),Ot(i,e._settings.itemDraggingClass),this._bindScrollListeners(),e._emit("dragStart",t,this._dragStartEvent)}}},ye.prototype._onMove=function(t){var e,i,s,n=this._item;n._isActive?(this._dragMoveEvent=t,e=n._id,i=this._prepareMove,s=this._applyMove,it.add(0,z+e,i),it.add(2,V+e,s),at(n._id,this._handleSort)):this.stop()},ye.prototype._prepareMove=function(){if(this._isActive&&this._item._isActive){var t=this._getGrid()._settings.dragAxis,e=this._dragMoveEvent,i=this._dragPrevMoveEvent||this._dragStartEvent||e;if("y"!==t){var s=e.clientX-i.clientX;this._left=this._left-this._moveDiffX+s,this._gridX=this._gridX-this._moveDiffX+s,this._clientX=this._clientX-this._moveDiffX+s,this._moveDiffX=s}if("x"!==t){var n=e.clientY-i.clientY;this._top=this._top-this._moveDiffY+n,this._gridY=this._gridY-this._moveDiffY+n,this._clientY=this._clientY-this._moveDiffY+n,this._moveDiffY=n}this._dragPrevMoveEvent=e}},ye.prototype._applyMove=function(){if(this._isActive){var t=this._item;t._isActive&&(this._moveDiffX=this._moveDiffY=0,t._setTranslate(this._left,this._top),this._getGrid()._emit("dragMove",t,this._dragMoveEvent),ye.autoScroller.updateItem(t))}},ye.prototype._onScroll=function(t){var e,i,s,n=this._item;n._isActive?(this._scrollEvent=t,e=n._id,i=this._prepareScroll,s=this._applyScroll,it.add(0,j+e,i),it.add(2,Q+e,s),at(n._id,this._handleSort)):this.stop()},ye.prototype._prepareScroll=function(){if(this._isActive){var t=this._item;if(t._isActive){var e=t._element,i=this._getGrid()._element,s=e.getBoundingClientRect();if(this._container!==i){var n=ie(this._containingBlock,i);this._containerDiffX=n.left,this._containerDiffY=n.top}var o=this._clientX-this._moveDiffX-s.left;this._left=this._left-this._scrollDiffX+o,this._scrollDiffX=o;var r=this._clientY-this._moveDiffY-s.top;this._top=this._top-this._scrollDiffY+r,this._scrollDiffY=r,this._gridX=this._left-this._containerDiffX,this._gridY=this._top-this._containerDiffY}}},ye.prototype._applyScroll=function(){if(this._isActive){var t=this._item;t._isActive&&(this._scrollDiffX=this._scrollDiffY=0,t._setTranslate(this._left,this._top),this._getGrid()._emit("dragScroll",t,this._scrollEvent))}},ye.prototype._onEnd=function(t){var e=this._item,i=e._element,s=this._getGrid(),n=s._settings,o=e._dragRelease;e._isActive?(ot(e._id),rt(e._id),ht(e._id),this._finishSort(),this._unbindScrollListeners(),o._containerDiffX=this._containerDiffX,o._containerDiffY=this._containerDiffY,this._reset(),ue(i,n.itemDraggingClass),ye.autoScroller.removeItem(e),s._emit("dragEnd",e,t),this._isMigrating?this._finishMigration():o.start()):this.stop()};var we=/^(webkit|moz|ms|o|Webkit|Moz|MS|O)(?=[A-Z])/,De={};function be(t){var e=De[t];return e||((e=t.replace(we,""))!==t&&(e=e[0].toLowerCase()+e.slice(1)),De[t]=e,e)}function Ae(t,e){for(var i in e)t.style[i]=e[i]}var Ee,Te,xe=!(!Element||!dt(Element.prototype.animate)),ke=!!(Element&&(Ee=Element.prototype.animate,Te=window.Symbol,Ee&&dt(Te)&&dt(Te.toString)&&Te(Ee).toString().indexOf("[native code]")>-1));function Le(t){this._element=t,this._animation=null,this._duration=0,this._easing="",this._callback=null,this._props=[],this._values=[],this._isDestroyed=!1,this._onFinish=this._onFinish.bind(this)}function Re(t,e){var i={};for(var s in t)i[e?s:be(s)]=t[s];return i}function Ie(t,e){return"translateX("+t+"px) translateY("+e+"px)"}function Ce(t){this._item=t,this._animation=new Le,this._element=null,this._className="",this._didMigrate=!1,this._resetAfterLayout=!1,this._left=0,this._top=0,this._transX=0,this._transY=0,this._nextTransX=0,this._nextTransY=0,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this),this._updateDimensions=this._updateDimensions.bind(this),this._onLayoutStart=this._onLayoutStart.bind(this),this._onLayoutEnd=this._onLayoutEnd.bind(this),this._onReleaseEnd=this._onReleaseEnd.bind(this),this._onMigrate=this._onMigrate.bind(this),this._onHide=this._onHide.bind(this)}function Me(t){this._item=t,this._isActive=!1,this._isDestroyed=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0}Le.prototype.start=function(t,e,i){if(!this._isDestroyed){var s=this._element,n=i||{};if(!xe)return Ae(s,e),this._callback=dt(n.onFinish)?n.onFinish:null,void this._onFinish();var o,r,h,a=this._animation,_=this._props,l=this._values,d=n.duration||300,u=n.easing||"ease",c=!1;if(a&&(r=0,d===this._duration&&u===this._easing||(c=!0),!c)){for(o in e)if(++r,-1===(h=_.indexOf(o))||e[o]!==l[h]){c=!0;break}r!==_.length&&(c=!0)}if(c&&a.cancel(),this._callback=dt(n.onFinish)?n.onFinish:null,!a||c){for(o in _.length=l.length=0,e)_.push(o),l.push(e[o]);this._duration=d,this._easing=u,this._animation=s.animate([Re(t,ke),Re(e,ke)],{duration:d,easing:u}),this._animation.onfinish=this._onFinish,Ae(s,e)}}},Le.prototype.stop=function(){!this._isDestroyed&&this._animation&&(this._animation.cancel(),this._animation=this._callback=null,this._props.length=this._values.length=0)},Le.prototype.getCurrentStyles=function(){return Se(element,currentProps)},Le.prototype.isAnimating=function(){return!!this._animation},Le.prototype.destroy=function(){this._isDestroyed||(this.stop(),this._element=null,this._isDestroyed=!0)},Le.prototype._onFinish=function(){var t=this._callback;this._animation=this._callback=null,this._props.length=this._values.length=0,t&&t()},Ce.prototype._updateDimensions=function(){this.isActive()&&Ae(this._element,{width:this._item._width+"px",height:this._item._height+"px"})},Ce.prototype._onLayoutStart=function(t,e){var i=this._item;if(-1!==t.indexOf(i)){var s=i._left,n=i._top,o=this._left,r=this._top;if(this._left=s,this._top=n,e||this._didMigrate||o!==s||r!==n){var h,a,_,l=s+i._marginLeft,d=n+i._marginTop,u=i.getGrid();if(!(!e&&u._settings.layoutDuration>0)||this._didMigrate)return _t(i._id),this._element.style[Ft]=Ie(l,d),this._animation.stop(),void(this._didMigrate&&(u.getElement().appendChild(this._element),this._didMigrate=!1));this._nextTransX=l,this._nextTransY=d,h=i._id,a=this._setupAnimation,_=this._startAnimation,it.add(0,Z+h,a),it.add(2,J+h,_)}}else this.reset()},Ce.prototype._setupAnimation=function(){if(this.isActive()){var t=de(this._element);this._transX=t.x,this._transY=t.y}},Ce.prototype._startAnimation=function(){if(this.isActive()){var t=this._animation,e=this._transX,i=this._transY,s=this._nextTransX,n=this._nextTransY;if(e!==s||i!==n){var o=this._item.getGrid()._settings,r={},h={};r[Ft]=Ie(e,i),h[Ft]=Ie(s,n),t.start(r,h,{duration:o.layoutDuration,easing:o.layoutEasing,onFinish:this._onLayoutEnd})}else t.isAnimating()&&(this._element.style[Ft]=Ie(s,n),t.stop())}},Ce.prototype._onLayoutEnd=function(){this._resetAfterLayout&&this.reset()},Ce.prototype._onReleaseEnd=function(t){if(t._id===this._item._id){if(!this._animation.isAnimating())return void this.reset();this._resetAfterLayout=!0}},Ce.prototype._onMigrate=function(t){if(t.item===this._item){var e=this._item.getGrid(),i=t.toGrid;e.off(m,this._onReleaseEnd),e.off(n,this._onLayoutStart),e.off(c,this._onMigrate),e.off(a,this._onHide),i.on(m,this._onReleaseEnd),i.on(n,this._onLayoutStart),i.on(c,this._onMigrate),i.on(a,this._onHide),this._didMigrate=!0}},Ce.prototype._onHide=function(t){t.indexOf(this._item)>-1&&this.reset()},Ce.prototype.create=function(){if(this.isActive())this._resetAfterLayout=!1;else{var t,e=this._item,i=e.getGrid(),s=i._settings,o=this._animation;this._left=e._left,this._top=e._top,t=dt(s.dragPlaceholder.createElement)?s.dragPlaceholder.createElement(e):document.createElement("div"),this._element=t,o._element=t,this._className=s.itemPlaceholderClass||"",this._className&&Ot(t,this._className),Ae(t,{position:"absolute",left:"0px",top:"0px",width:e._width+"px",height:e._height+"px"}),t.style[Ft]=Ie(e._left+e._marginLeft,e._top+e._marginTop),i.on(n,this._onLayoutStart),i.on(m,this._onReleaseEnd),i.on(c,this._onMigrate),i.on(a,this._onHide),dt(s.dragPlaceholder.onCreate)&&s.dragPlaceholder.onCreate(e,t),i.getElement().appendChild(t)}},Ce.prototype.reset=function(){if(this.isActive()){var t,e=this._element,i=this._item,s=i.getGrid(),o=s._settings,r=this._animation;this._resetAfterLayout=!1,_t(i._id),t=i._id,it.remove(2,$+t),r.stop(),r._element=null,s.off(m,this._onReleaseEnd),s.off(n,this._onLayoutStart),s.off(c,this._onMigrate),s.off(a,this._onHide),this._className&&(ue(e,this._className),this._className=""),e.parentNode.removeChild(e),this._element=null,dt(o.dragPlaceholder.onRemove)&&o.dragPlaceholder.onRemove(i,e)}},Ce.prototype.isActive=function(){return!!this._element},Ce.prototype.getElement=function(){return this._element},Ce.prototype.updateDimensions=function(){var t,e;this.isActive()&&(t=this._item._id,e=this._updateDimensions,it.add(2,$+t,e))},Ce.prototype.destroy=function(){this.reset(),this._animation.destroy(),this._item=this._animation=null},Me.prototype.start=function(){if(!this._isDestroyed&&!this._isActive){var t=this._item,e=t.getGrid(),i=e._settings;this._isActive=!0,Ot(t._element,i.itemReleasingClass),i.dragRelease.useDragContainer||this._placeToGrid(),e._emit("dragReleaseStart",t),e._nextLayoutData||t._layout.start(!1)}},Me.prototype.stop=function(t,e,i){if(!this._isDestroyed&&this._isActive){var s=this._item,n=s.getGrid();t||void 0!==e&&void 0!==i||(e=s._left,i=s._top);var o=this._placeToGrid(e,i);this._reset(o),t||n._emit(m,s)}},Me.prototype.isJustReleased=function(){return this._isActive&&!1===this._isPositioningStarted},Me.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},Me.prototype._placeToGrid=function(t,e){if(!this._isDestroyed){var i=this._item,s=i._element,n=i.getGrid()._element,o=!1;if(s.parentNode!==n){if(void 0===t||void 0===e){var r=de(s);t=r.x-this._containerDiffX,e=r.y-this._containerDiffY}n.appendChild(s),i._setTranslate(t,e),o=!0}return this._containerDiffX=0,this._containerDiffY=0,o}},Me.prototype._reset=function(t){if(!this._isDestroyed){var e=this._item,i=e.getGrid()._settings.itemReleasingClass;this._isActive=!1,this._isPositioningStarted=!1,this._containerDiffX=0,this._containerDiffY=0,i&&(t&&e._element.clientWidth,ue(e._element,i))}};function Pe(t){var e=t._element,i=e.style;this._item=t,this._isActive=!1,this._isDestroyed=!1,this._isInterrupted=!1,this._currentStyles={},this._targetStyles={},this._nextLeft=0,this._nextTop=0,this._offsetLeft=0,this._offsetTop=0,this._skipNextAnimation=!1,this._animOptions={onFinish:this._finish.bind(this),duration:0,easing:0},i.left="0px",i.top="0px",t._setTranslate(0,0),this._animation=new Le(e),this._queue="layout-"+t._id,this._setupAnimation=this._setupAnimation.bind(this),this._startAnimation=this._startAnimation.bind(this)}function Xe(t){this._item=t,this._isActive=!1,this._isDestroyed=!1,this._container=!1,this._containerDiffX=0,this._containerDiffY=0}function Ye(t){var e=t._isActive,i=t._element,s=i.children[0],n=t.getGrid()._settings;if(!s)throw new Error("No valid child element found within item element.");this._item=t,this._isDestroyed=!1,this._isHidden=!e,this._isHiding=!1,this._isShowing=!1,this._childElement=s,this._currentStyleProps=[],this._animation=new Le(s),this._queue="visibility-"+t._id,this._finishShow=this._finishShow.bind(this),this._finishHide=this._finishHide.bind(this),i.style.display=e?"":"none",Ot(i,e?n.itemVisibleClass:n.itemHiddenClass),this.setStyles(e?n.visibleStyles:n.hiddenStyles)}Pe.prototype.start=function(t,e){if(!this._isDestroyed){var i,s,n,o=this._item,r=o._dragRelease,h=o.getGrid()._settings,a=this._isActive,_=r.isJustReleased(),l=_?h.dragRelease.duration:h.layoutDuration,d=_?h.dragRelease.easing:h.layoutEasing,u=!t&&!this._skipNextAnimation&&l>0;if(a&&(st(o._id),o._emitter.burst(this._queue,!0,o)),_&&(r._isPositioningStarted=!0),dt(e)&&o._emitter.on(this._queue,e),this._skipNextAnimation=!1,!u)return this._updateOffsets(),o._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),void this._finish();this._animation.isAnimating()&&(this._animation._animation.onfinish=null),this._isActive=!0,this._animOptions.easing=d,this._animOptions.duration=l,this._isInterrupted=a,i=o._id,s=this._setupAnimation,n=this._startAnimation,it.add(0,H+i,s),it.add(2,G+i,n)}},Pe.prototype.stop=function(t,e,i){if(!this._isDestroyed&&this._isActive){var s=this._item;if(st(s._id),this._animation.isAnimating()){if(void 0===e||void 0===i){var n=de(s._element);e=n.x,i=n.y}s._setTranslate(e,i),this._animation.stop()}ue(s._element,s.getGrid()._settings.itemPositioningClass),this._isActive=!1,t&&s._emitter.burst(this._queue,!0,s)}},Pe.prototype.destroy=function(){if(!this._isDestroyed){var t=this._item._element.style;this.stop(!0,0,0),this._item._emitter.clear(this._queue),this._animation.destroy(),t[Ft]="",t.left="",t.top="",this._item=null,this._currentStyles=null,this._targetStyles=null,this._animOptions=null,this._isDestroyed=!0}},Pe.prototype._updateOffsets=function(){if(!this._isDestroyed){var t=this._item,e=t._migrate,i=t._dragRelease;this._offsetLeft=i._isActive?i._containerDiffX:e._isActive?e._containerDiffX:0,this._offsetTop=i._isActive?i._containerDiffY:e._isActive?e._containerDiffY:0,this._nextLeft=this._item._left+this._offsetLeft,this._nextTop=this._item._top+this._offsetTop}},Pe.prototype._finish=function(){if(!this._isDestroyed){var t=this._item,e=t._migrate,i=t._dragRelease;t._tX=this._nextLeft,t._tY=this._nextTop,this._isActive&&(this._isActive=!1,ue(t._element,t.getGrid()._settings.itemPositioningClass)),i._isActive&&i.stop(),e._isActive&&e.stop(),t._emitter.burst(this._queue,!1,t)}},Pe.prototype._setupAnimation=function(){var t=this._item;if(void 0===t._tX||void 0===t._tY){var e=de(t._element);t._tX=e.x,t._tY=e.y}},Pe.prototype._startAnimation=function(){var t=this._item,e=t.getGrid()._settings,i=this._animOptions.duration<=0;this._updateOffsets();var s=Math.abs(t._left-(t._tX-this._offsetLeft)),n=Math.abs(t._top-(t._tY-this._offsetTop));if(i||s<2&&n<2)return(s||n||this._isInterrupted)&&t._setTranslate(this._nextLeft,this._nextTop),this._animation.stop(),void this._finish();this._isInterrupted||Ot(t._element,e.itemPositioningClass),this._currentStyles[Ft]=Ie(t._tX,t._tY),this._targetStyles[Ft]=Ie(this._nextLeft,this._nextTop),t._tX=t._tY=void 0,this._animation.start(this._currentStyles,this._targetStyles,this._animOptions)},Xe.prototype.start=function(t,e,i){if(!this._isDestroyed){var s,n,o,r,h,a,_,l,d,m,g=this._item,v=g._element,y=g.isActive(),S=g.isVisible(),w=g.getGrid(),D=w._settings,b=t._settings,A=t._element,E=t._items,T=w._items.indexOf(g),x=i||document.body;if("number"==typeof e)s=Wt(E,e,1);else{if(!(n=t.getItem(e)))return;s=E.indexOf(n)}(g.isPositioning()||this._isActive||g.isReleasing())&&(_=(a=de(v)).x,l=a.y),g.isPositioning()&&g._layout.stop(!0,_,l),this._isActive&&(_-=this._containerDiffX,l-=this._containerDiffY,this.stop(!0,_,l)),g.isReleasing()&&(_-=g._dragRelease._containerDiffX,l-=g._dragRelease._containerDiffY,g._dragRelease.stop(!0,_,l)),g._visibility.stop(!0),g._drag&&g._drag.destroy(),w._hasListeners(c)&&w._emit(c,{item:g,fromGrid:w,fromIndex:T,toGrid:t,toIndex:s}),t._hasListeners(p)&&t._emit(p,{item:g,fromGrid:w,fromIndex:T,toGrid:t,toIndex:s}),D.itemClass!==b.itemClass&&(ue(v,D.itemClass),Ot(v,b.itemClass)),(d=S?D.itemVisibleClass:D.itemHiddenClass)!==(m=S?b.itemVisibleClass:b.itemHiddenClass)&&(ue(v,d),Ot(v,m)),w._items.splice(T,1),Gt(E,g,s),g._gridId=t._id,y?x!==(o=v.parentNode)&&(x.appendChild(v),r=ie(x,o,!0),a||(_=(a=de(v)).x,l=a.y),g._setTranslate(_+r.left,l+r.top)):A.appendChild(v),g._visibility.setStyles(S?b.visibleStyles:b.hiddenStyles),y&&(h=ie(x,A,!0)),g._refreshDimensions(),g._sortData=null,g._drag=b.dragEnabled?new ye(g):null,y?(this._isActive=!0,this._container=x,this._containerDiffX=h.left,this._containerDiffY=h.top):(this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0),w._hasListeners(u)&&w._emit(u,{item:g,fromGrid:w,fromIndex:T,toGrid:t,toIndex:s}),t._hasListeners(f)&&t._emit(f,{item:g,fromGrid:w,fromIndex:T,toGrid:t,toIndex:s})}},Xe.prototype.stop=function(t,e,i){if(!this._isDestroyed&&this._isActive){var s,n=this._item,o=n._element,r=n.getGrid()._element;this._container!==r&&(void 0!==e&&void 0!==i||(t?(e=(s=de(o)).x-this._containerDiffX,i=s.y-this._containerDiffY):(e=n._left,i=n._top)),r.appendChild(o),n._setTranslate(e,i)),this._isActive=!1,this._container=null,this._containerDiffX=0,this._containerDiffY=0}},Xe.prototype.destroy=function(){this._isDestroyed||(this.stop(!0),this._item=null,this._isDestroyed=!0)},Ye.prototype.show=function(t,e){if(!this._isDestroyed){var i=this._item,s=i._element,n=dt(e)?e:null,o=i.getGrid()._settings;this._isShowing||this._isHidden?!this._isShowing||t?(this._isShowing||(i._emitter.burst(this._queue,!0,i),ue(s,o.itemHiddenClass),Ot(s,o.itemVisibleClass),this._isHiding||(s.style.display="")),n&&i._emitter.on(this._queue,n),this._isShowing=!0,this._isHiding=this._isHidden=!1,this._startAnimation(!0,t,this._finishShow)):n&&i._emitter.on(this._queue,n):n&&n(!1,i)}},Ye.prototype.hide=function(t,e){if(!this._isDestroyed){var i=this._item,s=i._element,n=dt(e)?e:null,o=i.getGrid()._settings;this._isHiding||!this._isHidden?!this._isHiding||t?(this._isHiding||(i._emitter.burst(this._queue,!0,i),Ot(s,o.itemHiddenClass),ue(s,o.itemVisibleClass)),n&&i._emitter.on(this._queue,n),this._isHidden=this._isHiding=!0,this._isShowing=!1,this._startAnimation(!1,t,this._finishHide)):n&&i._emitter.on(this._queue,n):n&&n(!1,i)}},Ye.prototype.stop=function(t){if(!this._isDestroyed&&(this._isHiding||this._isShowing)){var e=this._item;nt(e._id),this._animation.stop(),t&&e._emitter.burst(this._queue,!0,e)}},Ye.prototype.setStyles=function(t){var e=this._childElement,i=this._currentStyleProps;for(var s in this._removeCurrentStyles(),t)i.push(s),e.style[s]=t[s]},Ye.prototype.destroy=function(){if(!this._isDestroyed){var t=this._item,e=t._element,i=t.getGrid()._settings;this.stop(!0),t._emitter.clear(this._queue),this._animation.destroy(),this._removeCurrentStyles(),ue(e,i.itemVisibleClass),ue(e,i.itemHiddenClass),e.style.display="",this._isHiding=this._isShowing=!1,this._isDestroyed=this._isHidden=!0}},Ye.prototype._startAnimation=function(t,e,i){if(!this._isDestroyed){var s,n=this._item,o=this._animation,r=this._childElement,h=n.getGrid()._settings,a=t?h.visibleStyles:h.hiddenStyles,_=t?h.showDuration:h.hideDuration,l=t?h.showEasing:h.hideEasing,d=e||_<=0;if(a){if(nt(n._id),d)return Ae(r,a),o.stop(),void(i&&i());var u,c,f;o.isAnimating()&&(o._animation.onfinish=null),u=n._id,c=function(){s=Se(r,a)},f=function(){o.start(s,a,{duration:_,easing:l,onFinish:i})},it.add(0,W+u,c),it.add(2,B+u,f)}else i&&i()}},Ye.prototype._finishShow=function(){this._isHidden||(this._isShowing=!1,this._item._emitter.burst(this._queue,!1,this._item))},Ye.prototype._finishHide=function(){if(this._isHidden){var t=this._item;this._isHiding=!1,t._layout.stop(!0,0,0),t._element.style.display="none",t._emitter.burst(this._queue,!1,t)}},Ye.prototype._removeCurrentStyles=function(){for(var t=this._childElement,e=this._currentStyleProps,i=0;it.width&&(t.width=h.left+h.width):h.top+h.height>t.height&&(t.height=h.top+h.height),l[++this.slotIndex]=h.left,l[++this.slotIndex]=h.top,(c||f)&&this.slotSizes.push(h.width,h.height);if(c)for(i=0;it.height+r&&(u.left>h&&f.push(this.addRect(0,t.height,u.left,1/0)),u.left+u.widtht.width+r&&(u.top>h&&f.push(this.addRect(t.width,0,1/0,u.top)),u.top+u.height1&&this.purgeRects(f).sort(n?this.sortRectsLeftTop:this.sortRectsTopLeft),this.currentRects=f,this.nextRects=c,u},_.prototype.addRect=function(t,e,i,s){var n=++this.rectId;return this.rectStore[n]=t||0,this.rectStore[++this.rectId]=e||0,this.rectStore[++this.rectId]=i||0,this.rectStore[++this.rectId]=s||0,n},_.prototype.getRect=function(t,e){return e||(e=this.rectTarget),e.left=this.rectStore[t]||0,e.top=this.rectStore[++t]||0,e.width=this.rectStore[++t]||0,e.height=this.rectStore[++t]||0,e},_.prototype.splitRect=(e=[],i=0,s=0,function(t,n){return e.length=0,t.left+t.width<=n.left+r||n.left+n.width<=t.left+r||t.top+t.height<=n.top+r||n.top+n.height<=t.top+r?(e.push(this.addRect(t.left,t.top,t.width,t.height)),e):((i=n.left-t.left)>=h&&e.push(this.addRect(t.left,t.top,i,t.height)),(i=t.left+t.width-(n.left+n.width))>=h&&e.push(this.addRect(n.left+n.width,t.top,i,t.height)),(s=n.top-t.top)>=h&&e.push(this.addRect(t.left,t.top,t.width,s)),(s=t.top+t.height-(n.top+n.height))>=h&&e.push(this.addRect(t.left,n.top+n.height,t.width,s)),e)}),_.prototype.isRectAWithinRectB=function(t,e){return t.left+r>=e.left&&t.top+r>=e.top&&t.left+t.width-r<=e.left+e.width&&t.top+t.height-r<=e.top+e.height},_.prototype.purgeRects=(n={},o={},function(t){for(var e,i=t.length;i--;)if(e=t.length,t[i])for(this.getRect(t[i],n);e--;)if(t[e]&&i!==e&&(this.getRect(t[e],o),this.isRectAWithinRectB(n,o))){t[i]=0;break}return t}),_.prototype.sortRectsTopLeft=function(){var t={},e={};return function(i,s){return this.getRect(i,t),this.getRect(s,e),t.tope.top&&t.top-r>e.top?1:t.lefte.left&&t.left-r>e.left?1:0}}(),_.prototype.sortRectsLeftTop=function(){var t={},e={};return function(i,s){return this.getRect(i,t),this.getRect(s,e),t.lefte.left&&t.left-re.top&&t.top-r>e.top?1:0}}(),t){var l=new _;self.onmessage=function(t){var e=new Float32Array(t.data),i=e.subarray(4,e.length),s=new Float32Array(i.length),n=e[3],o={items:i,slots:s,width:e[1],height:e[2]};l.computeLayout(o,n),e[1]=o.width,e[2]=o.height,e.set(o.slots,4),postMessage(e.buffer,[e.buffer])}}return _}He.prototype.getGrid=function(){return t[this._gridId]},He.prototype.getElement=function(){return this._element},He.prototype.getWidth=function(){return this._width},He.prototype.getHeight=function(){return this._height},He.prototype.getMargin=function(){return{left:this._marginLeft,right:this._marginRight,top:this._marginTop,bottom:this._marginBottom}},He.prototype.getPosition=function(){return{left:this._left,top:this._top}},He.prototype.isActive=function(){return this._isActive},He.prototype.isVisible=function(){return!!this._visibility&&!this._visibility._isHidden},He.prototype.isShowing=function(){return!(!this._visibility||!this._visibility._isShowing)},He.prototype.isHiding=function(){return!(!this._visibility||!this._visibility._isHiding)},He.prototype.isPositioning=function(){return!(!this._layout||!this._layout._isActive)},He.prototype.isDragging=function(){return!(!this._drag||!this._drag._isActive)},He.prototype.isReleasing=function(){return!(!this._dragRelease||!this._dragRelease._isActive)},He.prototype.isDestroyed=function(){return this._isDestroyed},He.prototype._refreshDimensions=function(t){if(!(this._isDestroyed||!0!==t&&this._visibility._isHidden)){var e=this._element,i=this._dragPlaceholder,s=e.getBoundingClientRect();this._width=s.width,this._height=s.height,this._marginLeft=Math.max(0,ft(e,"margin-left")),this._marginRight=Math.max(0,ft(e,"margin-right")),this._marginTop=Math.max(0,ft(e,"margin-top")),this._marginBottom=Math.max(0,ft(e,"margin-bottom")),i&&i.updateDimensions()}},He.prototype._refreshSortData=function(){if(!this._isDestroyed){var t,e=this._sortData={},i=this.getGrid()._settings.sortData;for(t in i)e[t]=i[t](this,this._element)}},He.prototype._addToLayout=function(t,e){!0!==this._isActive&&(this._isActive=!0,this._left=t||0,this._top=e||0)},He.prototype._removeFromLayout=function(){!1!==this._isActive&&(this._isActive=!1,this._left=0,this._top=0)},He.prototype._canSkipLayout=function(t,e){return this._left===t&&this._top===e&&!this._migrate._isActive&&!this._layout._skipNextAnimation&&!this._dragRelease.isJustReleased()},He.prototype._setTranslate=function(t,e){return(this._tX!==t||this._tY!==e)&&(this._tX=t,this._tY=e,this._element.style[Ft]=Ie(t,e),!0)},He.prototype._destroy=function(t){if(!this._isDestroyed){var i=this._element,s=this.getGrid()._settings;this._dragPlaceholder.destroy(),this._dragRelease.destroy(),this._migrate.destroy(),this._layout.destroy(),this._visibility.destroy(),this._drag&&this._drag.destroy(),this._emitter.destroy(),ue(i,s.itemClass),t&&i.parentNode.removeChild(i),e&&e.delete(i),this._isActive=!1,this._isDestroyed=!0}};var We=Ge(),Be=null,Ne=[];function Fe(t,e){if(this._options=0,this._processor=null,this._layoutQueue=[],this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={},this._workers=[],this._onWorkerMessage=this._onWorkerMessage.bind(this),this.setOptions(e),(t="number"==typeof t?Math.max(0,t):0)&&window.Worker&&window.URL&&window.Blob)try{this._workers=function(t,e){var i=[];if(t>0){Be||(Be=URL.createObjectURL(new Blob(["("+Ge.toString()+")(true)"],{type:"application/javascript"})));for(var s,n=0;n-1&&this._layoutQueue.splice(e,1)}},Fe.prototype.destroy=function(){for(var t in this._layoutWorkers)this._workers.push(this._layoutWorkers[t]);!function(t){for(var e,i,s=0;s-1&&Ne.splice(i,1);Be&&!Ne.length&&(URL.revokeObjectURL(Be),Be=null)}(this._workers),this._workers.length=0,this._layoutQueue.length=0,this._layouts={},this._layoutCallbacks={},this._layoutWorkers={},this._layoutWorkerData={}};var ze=0;function Ve(t,e){var i=++ze,s=0,n=0,o=!1,r=function(e){o||(n&&(s-=e-n),n=e,s>0?function(t,e){it.add(0,et+t,e)}(i,r):(s=n=0,t()))};return function(h){if(!o){if(!(e<=0))return!0===h?(o=!0,s=n=0,r=void 0,void function(t){it.remove(0,et+t)}(i)):void(s<=0?(s=e,r(0)):s=e);!0!==h&&t()}}}function je(t){var e=Object.prototype.toString.call(t);return"[object HTMLCollection]"===e||"[object NodeList]"===e}var Qe=Object.prototype.toString;function Ue(t){return"object"==typeof t&&"[object Object]"===Qe.call(t)}function Ze(){}var Je,$e="number",Ke="string",ti="instant",ei=0;function ii(e,i){if(typeof e===Ke&&(e=document.querySelector(e)),!(e.getRootNode?e.getRootNode({composed:!0})===document:document.body.contains(e))||e===document.documentElement)throw new Error("Container element must be an existing DOM element.");var s=function(t,e){var i=si({},t);e&&(i=si(i,e));e&&e.visibleStyles?i.visibleStyles=e.visibleStyles:t&&t.visibleStyles&&(i.visibleStyles=t.visibleStyles);e&&e.hiddenStyles?i.hiddenStyles=e.hiddenStyles:t&&t.hiddenStyles&&(i.hiddenStyles=t.hiddenStyles);return i}(ii.defaultOptions,i);s.visibleStyles=ni(s.visibleStyles),s.hiddenStyles=ni(s.hiddenStyles),dt(s.dragSort)||(s.dragSort=!!s.dragSort),this._id=Oe(),this._element=e,this._settings=s,this._isDestroyed=!1,this._items=[],this._layout={id:0,items:[],slots:[]},this._isLayoutFinished=!0,this._nextLayoutData=null,this._emitter=new S,this._onLayoutDataReceived=this._onLayoutDataReceived.bind(this),t[this._id]=this,Ot(e,s.containerClass),function(t,e){typeof e!==$e&&(e=!0===e?0:-1);e>=0&&(t._resizeHandler=Ve((function(){t.refreshItems().layout()}),e),window.addEventListener("resize",t._resizeHandler))}(this,s.layoutOnResize),this.add(function(t,e){if("*"===e)return t.children;if(typeof e===Ke){for(var i=[],s=t.children,n=0;n-1?t:this._items.length+t]||null;if(t instanceof He)return t._gridId===this._id?t:null;if(e){var i=e.get(t);return i&&i._gridId===this._id?i:null}for(var s=0;sa?1:0:a<_?-1:a>_?1:0)return l;return l||(s||(s=oi(i)),l=e?ri(s,o,n):ri(s,n,o)),l}function o(n,o){var r=e?-t(n,o):t(n,o);return r||(s||(s=oi(i)),r=e?ri(s,o,n):ri(s,n,o)),r}return function(r,h){if(this._isDestroyed||this._items.length<2)return this;var a=this._items,_=h||{},d=_.layout?_.layout:void 0===_.layout;if(e=!!_.descending,i=a.slice(0),s=null,dt(r))t=r,a.sort(o);else if(typeof r===Ke)t=r.trim().split(" ").filter((function(t){return t})).map((function(t){return t.split(":")})),a.sort(n);else{if(!Array.isArray(r))throw t=e=i=s=null,new Error("Invalid comparer argument provided.");a.length=0,a.push.apply(a,r)}return this._hasListeners(l)&&this._emit(l,a.slice(0),i),d&&this.layout(d===ti,dt(d)?d:void 0),t=e=i=s=null,this}}(),ii.prototype.move=function(t,e,n){if(this._isDestroyed||this._items.length<2)return this;var o,r,h=this._items,a=n||{},_=a.layout?a.layout:void 0===a.layout,l=a.action===i,u=l?i:s,c=this.getItem(t),f=this.getItem(e);return c&&f&&c!==f&&(o=h.indexOf(c),r=h.indexOf(f),l?Nt(h,o,r):Bt(h,o,r),this._hasListeners(d)&&this._emit(d,{item:c,fromIndex:o,toIndex:r,action:u}),_&&this.layout(_===ti,dt(_)?_:void 0)),this},ii.prototype.send=function(t,e,i,s){if(this._isDestroyed||e._isDestroyed||this===e)return this;if(!(t=this.getItem(t)))return this;var n=s||{},o=n.appendTo||document.body,r=n.layoutSender?n.layoutSender:void 0===n.layoutSender,h=n.layoutReceiver?n.layoutReceiver:void 0===n.layoutReceiver;return t._migrate.start(e,i,o),t._migrate._isActive&&t._isActive&&(r&&this.layout(r===ti,dt(r)?r:void 0),h&&e.layout(h===ti,dt(h)?h:void 0)),this},ii.prototype.destroy=function(e){if(this._isDestroyed)return this;var i,s,n,o=this._element,r=this._items.slice(0),h=this._layout&&this._layout.styles||{};for((n=this)._resizeHandler&&(n._resizeHandler(!0),window.removeEventListener("resize",n._resizeHandler),n._resizeHandler=null),i=0;i0},ii.prototype._updateBoundingRect=function(){var t=this._element.getBoundingClientRect();this._width=t.width,this._height=t.height,this._left=t.left,this._top=t.top,this._right=t.right,this._bottom=t.bottom},ii.prototype._updateBorders=function(t,e,i,s){var n=this._element;t&&(this._borderLeft=ft(n,"border-left-width")),e&&(this._borderRight=ft(n,"border-right-width")),i&&(this._borderTop=ft(n,"border-top-width")),s&&(this._borderBottom=ft(n,"border-bottom-width"))},ii.prototype._refreshDimensions=function(){this._updateBoundingRect(),this._updateBorders(1,1,1,1),this._boxSizing=ct(this._element,"box-sizing")},ii.prototype._onLayoutDataReceived=(Je=[],function(t){if(!this._isDestroyed&&this._nextLayoutData&&this._nextLayoutData.id===t.id){var e,i,s,h,a=this,_=this._nextLayoutData.instant,l=this._nextLayoutData.onFinish,d=t.items.length,u=d;for(this._nextLayoutData=null,!this._isLayoutFinished&&this._hasListeners(r)&&this._emit(r,this._layout.items.slice(0)),this._layout=t,Je.length=0,h=0;h0)){var e=a._layout.id!==t.id,i=dt(_)?_:l;e||(a._isLayoutFinished=!0),dt(i)&&i(t.items.slice(0),e),!e&&a._hasListeners(o)&&a._emit(o,t.items.slice(0))}};if(!Je.length)return c(),this;for(this._isLayoutFinished=!1,h=0;h=0;)t[e]=0}const a=256,i=286,n=30,s=15,r=new Uint8Array([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]),l=new Uint8Array([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]),o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Array(576);e(d);const _=new Array(60);e(_);const f=new Array(512);e(f);const c=new Array(256);e(c);const u=new Array(29);e(u);const w=new Array(n);function b(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let g,p,m;function k(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(w);const v=t=>t<256?f[t]:f[256+(t>>>7)],y=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},x=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<{x(t,a[2*e],a[2*e+1])},A=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=(t,e,a)=>{const i=new Array(16);let n,r,l=0;for(n=1;n<=s;n++)i[n]=l=l+a[n-1]<<1;for(r=0;r<=e;r++){let e=t[2*r+1];0!==e&&(t[2*r]=A(i[e]++,e))}},R=t=>{let e;for(e=0;e{t.bi_valid>8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},U=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n{let n,s,o,h,d=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===n?z(t,s,e):(o=c[s],z(t,o+a+1,e),h=r[o],0!==h&&(s-=u[o],x(t,s,h)),n--,o=v(n),z(t,o,i),h=l[o],0!==h&&(n-=w[o],x(t,n,h)))}while(d{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,r=e.stat_desc.elems;let l,o,h,d=-1;for(t.heap_len=0,t.heap_max=573,l=0;l>1;l>=1;l--)S(t,a,l);h=r;do{l=t.heap[1],t.heap[1]=t.heap[t.heap_len--],S(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=l,t.heap[--t.heap_max]=o,a[2*h]=a[2*l]+a[2*o],t.depth[h]=(t.depth[l]>=t.depth[o]?t.depth[l]:t.depth[o])+1,a[2*l+1]=a[2*o+1]=h,t.heap[1]=h++,S(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,r=e.stat_desc.has_stree,l=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,h=e.stat_desc.max_length;let d,_,f,c,u,w,b=0;for(c=0;c<=s;c++)t.bl_count[c]=0;for(a[2*t.heap[t.heap_max]+1]=0,d=t.heap_max+1;d<573;d++)_=t.heap[d],c=a[2*a[2*_+1]+1]+1,c>h&&(c=h,b++),a[2*_+1]=c,_>i||(t.bl_count[c]++,u=0,_>=o&&(u=l[_-o]),w=a[2*_],t.opt_len+=w*(c+u),r&&(t.static_len+=w*(n[2*_+1]+u)));if(0!==b){do{for(c=h-1;0===t.bl_count[c];)c--;t.bl_count[c]--,t.bl_count[c+1]+=2,t.bl_count[h]--,b-=2}while(b>0);for(c=h;0!==c;c--)for(_=t.bl_count[c];0!==_;)f=t.heap[--d],f>i||(a[2*f+1]!==c&&(t.opt_len+=(c-a[2*f+1])*a[2*f],a[2*f+1]=c),_--)}})(t,e),E(a,d,t.bl_count)},O=(t,e,a)=>{let i,n,s=-1,r=e[1],l=0,o=7,h=4;for(0===r&&(o=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++l{let i,n,s=-1,r=e[1],l=0,o=7,h=4;for(0===r&&(o=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++l{x(t,0+(i?1:0),3),((t,e,a,i)=>{Z(t),i&&(y(t,a),y(t,~a)),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a})(t,e,a,!0)};var N={_tr_init:t=>{F||((()=>{let t,e,a,h,k;const v=new Array(16);for(a=0,h=0;h<28;h++)for(u[h]=a,t=0;t<1<>=7;h{let s,r,l=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,i=4093624447;for(e=0;e<=31;e++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e{let e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),T(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),s=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=s&&(s=r)):s=r=i+5,i+4<=s&&-1!==e?L(t,e,i,n):4===t.strategy||r===s?(x(t,2+(n?1:0),3),D(t,d,_)):(x(t,4+(n?1:0),3),((t,e,a,i)=>{let n;for(x(t,e-257,5),x(t,a-1,5),x(t,i-4,4),n=0;n(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&i,t.last_lit++,0===e?t.dyn_ltree[2*i]++:(t.matches++,e--,t.dyn_ltree[2*(c[i]+a+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1),_tr_align:t=>{x(t,2,3),z(t,256,d),(t=>{16===t.bi_valid?(y(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var B=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const C=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var M=(t,e,a,i)=>{const n=C,s=i+a;t^=-1;for(let a=i;a>>8^n[255&(t^e[a])];return-1^t},H={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"},j={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_MEM_ERROR:-4,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};const{_tr_init:K,_tr_stored_block:P,_tr_flush_block:Y,_tr_tally:G,_tr_align:X}=N,{Z_NO_FLUSH:W,Z_PARTIAL_FLUSH:q,Z_FULL_FLUSH:J,Z_FINISH:Q,Z_BLOCK:V,Z_OK:$,Z_STREAM_END:tt,Z_STREAM_ERROR:et,Z_DATA_ERROR:at,Z_BUF_ERROR:it,Z_DEFAULT_COMPRESSION:nt,Z_FILTERED:st,Z_HUFFMAN_ONLY:rt,Z_RLE:lt,Z_FIXED:ot,Z_DEFAULT_STRATEGY:ht,Z_UNKNOWN:dt,Z_DEFLATED:_t}=j,ft=258,ct=262,ut=103,wt=113,bt=666,gt=(t,e)=>(t.msg=H[e],e),pt=t=>(t<<1)-(t>4?9:0),mt=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let kt=(t,e,a)=>(e<{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},yt=(t,e)=>{Y(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,vt(t.strm)},xt=(t,e)=>{t.pending_buf[t.pending++]=e},zt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},At=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=B(t.adler,e,n,a):2===t.state.wrap&&(t.adler=M(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},Et=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,l=t.nice_match;const o=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+ft;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),l>t.lookahead&&(l=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&sr){if(t.match_start=e,r=i,i>=l)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>o&&0!=--n);return r<=t.lookahead?r:t.lookahead},Rt=t=>{const e=t.w_size;let a,i,n,s,r;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-ct)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,i=t.hash_size,a=i;do{n=t.head[--a],t.head[a]=n>=e?n-e:0}while(--i);i=e,a=i;do{n=t.prev[--a],t.prev[a]=n>=e?n-e:0}while(--i);s+=e}if(0===t.strm.avail_in)break;if(i=At(t.strm,t.window,t.strstart+t.lookahead,s),t.lookahead+=i,t.lookahead+t.insert>=3)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=kt(t,t.ins_h,t.window[r+1]);t.insert&&(t.ins_h=kt(t,t.ins_h,t.window[r+3-1]),t.prev[r&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=r,r++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead{let a,i;for(;;){if(t.lookahead=3&&(t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a)),t.match_length>=3)if(i=G(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=kt(t,t.ins_h,t.window[t.strstart+1]);else i=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2},Ut=(t,e)=>{let a,i,n;for(;;){if(t.lookahead=3&&(t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=G(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(yt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=G(t,0,t.window[t.strstart-1]),i&&yt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=G(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2};function St(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const Dt=[new St(0,0,0,0,((t,e)=>{let a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Rt(t),0===t.lookahead&&e===W)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const i=t.block_start+a;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,yt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-ct&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(yt(t,!1),t.strm.avail_out),1)})),new St(4,4,8,4,Zt),new St(4,5,16,8,Zt),new St(4,6,32,32,Zt),new St(4,4,16,16,Ut),new St(8,16,32,32,Ut),new St(8,16,128,128,Ut),new St(8,32,128,256,Ut),new St(32,128,258,1024,Ut),new St(32,258,258,4096,Ut)];function Tt(){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=_t,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 Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),mt(this.dyn_ltree),mt(this.dyn_dtree),mt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),mt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),mt(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}const Ot=t=>{if(!t||!t.state)return gt(t,et);t.total_in=t.total_out=0,t.data_type=dt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:wt,t.adler=2===e.wrap?0:1,e.last_flush=W,K(e),$},It=t=>{const e=Ot(t);var a;return e===$&&((a=t.state).window_size=2*a.w_size,mt(a.head),a.max_lazy_match=Dt[a.level].max_lazy,a.good_match=Dt[a.level].good_length,a.nice_match=Dt[a.level].nice_length,a.max_chain_length=Dt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ft=(t,e,a,i,n,s)=>{if(!t)return et;let r=1;if(e===nt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==_t||i<8||i>15||e<0||e>9||s<0||s>ot)return gt(t,et);8===i&&(i=9);const l=new Tt;return t.state=l,l.strm=t,l.wrap=r,l.gzhead=null,l.w_bits=i,l.w_size=1<Ft(t,e,_t,15,8,ht),deflateInit2:Ft,deflateReset:It,deflateResetKeep:Ot,deflateSetHeader:(t,e)=>t&&t.state?2!==t.state.wrap?et:(t.state.gzhead=e,$):et,deflate:(t,e)=>{let a,i;if(!t||!t.state||e>V||e<0)return t?gt(t,et):et;const n=t.state;if(!t.output||!t.input&&0!==t.avail_in||n.status===bt&&e!==Q)return gt(t,0===t.avail_out?it:et);n.strm=t;const s=n.last_flush;if(n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,xt(n,31),xt(n,139),xt(n,8),n.gzhead?(xt(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),xt(n,255&n.gzhead.time),xt(n,n.gzhead.time>>8&255),xt(n,n.gzhead.time>>16&255),xt(n,n.gzhead.time>>24&255),xt(n,9===n.level?2:n.strategy>=rt||n.level<2?4:0),xt(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(xt(n,255&n.gzhead.extra.length),xt(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=M(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(xt(n,0),xt(n,0),xt(n,0),xt(n,0),xt(n,0),xt(n,9===n.level?2:n.strategy>=rt||n.level<2?4:0),xt(n,3),n.status=wt);else{let e=_t+(n.w_bits-8<<4)<<8,a=-1;a=n.strategy>=rt||n.level<2?0:n.level<6?1:6===n.level?2:3,e|=a<<6,0!==n.strstart&&(e|=32),e+=31-e%31,n.status=wt,zt(n,e),0!==n.strstart&&(zt(n,t.adler>>>16),zt(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(a=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),vt(t),a=n.pending,n.pending!==n.pending_buf_size));)xt(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){a=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),vt(t),a=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindexa&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){a=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),vt(t),a=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindexa&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),0===i&&(n.status=ut)}else n.status=ut;if(n.status===ut&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&vt(t),n.pending+2<=n.pending_buf_size&&(xt(n,255&t.adler),xt(n,t.adler>>8&255),t.adler=0,n.status=wt)):n.status=wt),0!==n.pending){if(vt(t),0===t.avail_out)return n.last_flush=-1,$}else if(0===t.avail_in&&pt(e)<=pt(s)&&e!==Q)return gt(t,it);if(n.status===bt&&0!==t.avail_in)return gt(t,it);if(0!==t.avail_in||0!==n.lookahead||e!==W&&n.status!==bt){let a=n.strategy===rt?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(Rt(t),0===t.lookahead)){if(e===W)return 1;break}if(t.match_length=0,a=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2})(n,e):n.strategy===lt?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=ft){if(Rt(t),t.lookahead<=ft&&e===W)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+ft;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=G(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2})(n,e):Dt[n.level].func(n,e);if(3!==a&&4!==a||(n.status=bt),1===a||3===a)return 0===t.avail_out&&(n.last_flush=-1),$;if(2===a&&(e===q?X(n):e!==V&&(P(n,0,0,!1),e===J&&(mt(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),vt(t),0===t.avail_out))return n.last_flush=-1,$}return e!==Q?$:n.wrap<=0?tt:(2===n.wrap?(xt(n,255&t.adler),xt(n,t.adler>>8&255),xt(n,t.adler>>16&255),xt(n,t.adler>>24&255),xt(n,255&t.total_in),xt(n,t.total_in>>8&255),xt(n,t.total_in>>16&255),xt(n,t.total_in>>24&255)):(zt(n,t.adler>>>16),zt(n,65535&t.adler)),vt(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?$:tt)},deflateEnd:t=>{if(!t||!t.state)return et;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==ut&&e!==wt&&e!==bt?gt(t,et):(t.state=null,e===wt?gt(t,at):$)},deflateSetDictionary:(t,e)=>{let a=e.length;if(!t||!t.state)return et;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return et;if(1===n&&(t.adler=B(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(mt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Rt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=kt(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,Rt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=l,t.avail_in=s,i.wrap=n,$},deflateInfo:"pako deflate (from Nodeca project)"};const Nt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Bt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Nt(a,e)&&(t[e]=a[e])}}return t},Ct=t=>{let e=0;for(let a=0,i=t.length;a=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Ht[254]=Ht[254]=1;var jt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,l=0;for(n=0;n>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},Kt=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Mt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Ht[t[a]]>e?a:e};var Yt=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};const Gt=Object.prototype.toString,{Z_NO_FLUSH:Xt,Z_SYNC_FLUSH:Wt,Z_FULL_FLUSH:qt,Z_FINISH:Jt,Z_OK:Qt,Z_STREAM_END:Vt,Z_DEFAULT_COMPRESSION:$t,Z_DEFAULT_STRATEGY:te,Z_DEFLATED:ee}=j;function ae(t){this.options=Bt({level:$t,method:ee,chunkSize:16384,windowBits:15,memLevel:8,strategy:te},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Yt,this.strm.avail_out=0;let a=Lt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Qt)throw new Error(H[a]);if(e.header&&Lt.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?jt(e.dictionary):"[object ArrayBuffer]"===Gt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=Lt.deflateSetDictionary(this.strm,t),a!==Qt)throw new Error(H[a]);this._dict_set=!0}}function ie(t,e){const a=new ae(e);if(a.push(t,!0),a.err)throw a.msg||H[a.err];return a.result}ae.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Jt:Xt,"string"==typeof t?a.input=jt(t):"[object ArrayBuffer]"===Gt.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===Wt||s===qt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=Lt.deflate(a,s),n===Vt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=Lt.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Qt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},ae.prototype.onData=function(t){this.chunks.push(t)},ae.prototype.onEnd=function(t){t===Qt&&(this.result=Ct(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var ne={Deflate:ae,deflate:ie,deflateRaw:function(t,e){return(e=e||{}).raw=!0,ie(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,ie(t,e)},constants:j};var se=function(t,e){let a,i,n,s,r,l,o,h,d,_,f,c,u,w,b,g,p,m,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),l=E.dmax,o=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,b=(1<>>24,f>>>=m,c-=m,m=p>>>16&255,0===m)A[n++]=65535&p;else{if(!(16&m)){if(0==(64&m)){p=u[(65535&p)+(f&(1<>>=m,c-=m),c<15&&(f+=z[a++]<>>24,f>>>=m,c-=m,m=p>>>16&255,!(16&m)){if(0==(64&m)){p=w[(65535&p)+(f&(1<l){t.msg="invalid distance too far back",E.mode=30;break t}if(f>>>=m,c-=m,m=n-s,v>m){if(m=v-m,m>h&&E.sane){t.msg="invalid distance too far back",E.mode=30;break t}if(y=0,x=_,0===d){if(y+=o-m,m2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a>3,a-=k,c-=k<<3,f&=(1<{const o=l.bits;let h,d,_,f,c,u,w=0,b=0,g=0,p=0,m=0,k=0,v=0,y=0,x=0,z=0,A=null,E=0;const R=new Uint16Array(16),Z=new Uint16Array(16);let U,S,D,T=null,O=0;for(w=0;w<=re;w++)R[w]=0;for(b=0;b=1&&0===R[p];p--);if(m>p&&(m=p),0===p)return n[s++]=20971520,n[s++]=20971520,l.bits=1,0;for(g=1;g0&&(0===t||1!==p))return-1;for(Z[1]=0,w=1;w852||2===t&&x>592)return 1;for(;;){U=w-v,r[b]u?(S=T[O+r[b]],D=A[E+r[b]]):(S=96,D=0),h=1<>v)+d]=U<<24|S<<16|D|0}while(0!==d);for(h=1<>=1;if(0!==h?(z&=h-1,z+=h):z=0,b++,0==--R[w]){if(w===p)break;w=e[a+r[b]]}if(w>m&&(z&f)!==_){for(0===v&&(v=m),c+=g,k=w-v,y=1<852||2===t&&x>592)return 1;_=z&f,n[_]=m<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),l.bits=m,0};const{Z_FINISH:fe,Z_BLOCK:ce,Z_TREES:ue,Z_OK:we,Z_STREAM_END:be,Z_NEED_DICT:ge,Z_STREAM_ERROR:pe,Z_DATA_ERROR:me,Z_MEM_ERROR:ke,Z_BUF_ERROR:ve,Z_DEFLATED:ye}=j,xe=12,ze=30,Ae=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function Ee(){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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Re=t=>{if(!t||!t.state)return pe;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,we},Ze=t=>{if(!t||!t.state)return pe;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Re(t)},Ue=(t,e)=>{let a;if(!t||!t.state)return pe;const i=t.state;return e<0?(a=0,e=-e):(a=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?pe:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,Ze(t))},Se=(t,e)=>{if(!t)return pe;const a=new Ee;t.state=a,a.window=null;const i=Ue(t,e);return i!==we&&(t.state=null),i};let De,Te,Oe=!0;const Ie=t=>{if(Oe){De=new Int32Array(512),Te=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(_e(1,t.lens,0,288,De,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;_e(2,t.lens,0,32,Te,0,t.work,{bits:5}),Oe=!1}t.lencode=De,t.lenbits=9,t.distcode=Te,t.distbits=5},Fe=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whaveSe(t,15),inflateInit2:Se,inflate:(t,e)=>{let a,i,n,s,r,l,o,h,d,_,f,c,u,w,b,g,p,m,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return pe;a=t.state,a.mode===xe&&(a.mode=13),r=t.next_out,n=t.output,o=t.avail_out,s=t.next_in,i=t.input,l=t.avail_in,h=a.hold,d=a.bits,_=l,f=o,x=we;t:for(;;)switch(a.mode){case 1:if(0===a.wrap){a.mode=13;break}for(;d<16;){if(0===l)break t;l--,h+=i[s++]<>>8&255,a.check=M(a.check,A,2,0),h=0,d=0,a.mode=2;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=ze;break}if((15&h)!==ye){t.msg="unknown compression method",a.mode=ze;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits)a.wbits=y;else if(y>a.wbits){t.msg="invalid window size",a.mode=ze;break}a.dmax=1<>8&1),512&a.flags&&(A[0]=255&h,A[1]=h>>>8&255,a.check=M(a.check,A,2,0)),h=0,d=0,a.mode=3;case 3:for(;d<32;){if(0===l)break t;l--,h+=i[s++]<>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=M(a.check,A,4,0)),h=0,d=0,a.mode=4;case 4:for(;d<16;){if(0===l)break t;l--,h+=i[s++]<>8),512&a.flags&&(A[0]=255&h,A[1]=h>>>8&255,a.check=M(a.check,A,2,0)),h=0,d=0,a.mode=5;case 5:if(1024&a.flags){for(;d<16;){if(0===l)break t;l--,h+=i[s++]<>>8&255,a.check=M(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(c=a.length,c>l&&(c=l),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&(a.check=M(a.check,i,c,s)),l-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(0===l)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=xe;break;case 10:for(;d<32;){if(0===l)break t;l--,h+=i[s++]<>>=7&d,d-=7&d,a.mode=27;break}for(;d<3;){if(0===l)break t;l--,h+=i[s++]<>>=1,d-=1,3&h){case 0:a.mode=14;break;case 1:if(Ie(a),a.mode=20,e===ue){h>>>=2,d-=2;break t}break;case 2:a.mode=17;break;case 3:t.msg="invalid block type",a.mode=ze}h>>>=2,d-=2;break;case 14:for(h>>>=7&d,d-=7&d;d<32;){if(0===l)break t;l--,h+=i[s++]<>>16^65535)){t.msg="invalid stored block lengths",a.mode=ze;break}if(a.length=65535&h,h=0,d=0,a.mode=15,e===ue)break t;case 15:a.mode=16;case 16:if(c=a.length,c){if(c>l&&(c=l),c>o&&(c=o),0===c)break t;n.set(i.subarray(s,s+c),r),l-=c,s+=c,o-=c,r+=c,a.length-=c;break}a.mode=xe;break;case 17:for(;d<14;){if(0===l)break t;l--,h+=i[s++]<>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=ze;break}a.have=0,a.mode=18;case 18:for(;a.have>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=_e(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=ze;break}a.have=0,a.mode=19;case 19:for(;a.have>>24,g=z>>>16&255,p=65535&z,!(b<=d);){if(0===l)break t;l--,h+=i[s++]<>>=b,d-=b,a.lens[a.have++]=p;else{if(16===p){for(R=b+2;d>>=b,d-=b,0===a.have){t.msg="invalid bit length repeat",a.mode=ze;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===p){for(R=b+3;d>>=b,d-=b,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=b+7;d>>=b,d-=b,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=ze;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===ze)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=ze;break}if(a.lenbits=9,E={bits:a.lenbits},x=_e(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=ze;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=_e(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=ze;break}if(a.mode=20,e===ue)break t;case 20:a.mode=21;case 21:if(l>=6&&o>=258){t.next_out=r,t.avail_out=o,t.next_in=s,t.avail_in=l,a.hold=h,a.bits=d,se(t,f),r=t.next_out,n=t.output,o=t.avail_out,s=t.next_in,i=t.input,l=t.avail_in,h=a.hold,d=a.bits,a.mode===xe&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<>>24,g=z>>>16&255,p=65535&z,!(b<=d);){if(0===l)break t;l--,h+=i[s++]<>m)],b=z>>>24,g=z>>>16&255,p=65535&z,!(m+b<=d);){if(0===l)break t;l--,h+=i[s++]<>>=m,d-=m,a.back+=m}if(h>>>=b,d-=b,a.back+=b,a.length=p,0===g){a.mode=26;break}if(32&g){a.back=-1,a.mode=xe;break}if(64&g){t.msg="invalid literal/length code",a.mode=ze;break}a.extra=15&g,a.mode=22;case 22:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;z=a.distcode[h&(1<>>24,g=z>>>16&255,p=65535&z,!(b<=d);){if(0===l)break t;l--,h+=i[s++]<>m)],b=z>>>24,g=z>>>16&255,p=65535&z,!(m+b<=d);){if(0===l)break t;l--,h+=i[s++]<>>=m,d-=m,a.back+=m}if(h>>>=b,d-=b,a.back+=b,64&g){t.msg="invalid distance code",a.mode=ze;break}a.offset=p,a.extra=15&g,a.mode=24;case 24:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=ze;break}a.mode=25;case 25:if(0===o)break t;if(c=f-o,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=ze;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>o&&(c=o),o-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=21);break;case 26:if(0===o)break t;n[r++]=a.length,o--,a.mode=21;break;case 27:if(a.wrap){for(;d<32;){if(0===l)break t;l--,h|=i[s++]<{if(!t||!t.state)return pe;let e=t.state;return e.window&&(e.window=null),t.state=null,we},inflateGetHeader:(t,e)=>{if(!t||!t.state)return pe;const a=t.state;return 0==(2&a.wrap)?pe:(a.head=e,e.done=!1,we)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return t&&t.state?(i=t.state,0!==i.wrap&&11!==i.mode?pe:11===i.mode&&(n=1,n=B(n,e,a,0),n!==i.check)?me:(s=Fe(t,e,a,a),s?(i.mode=31,ke):(i.havedict=1,we))):pe},inflateInfo:"pako inflate (from Nodeca project)"};var Ne=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};const Be=Object.prototype.toString,{Z_NO_FLUSH:Ce,Z_FINISH:Me,Z_OK:He,Z_STREAM_END:je,Z_NEED_DICT:Ke,Z_STREAM_ERROR:Pe,Z_DATA_ERROR:Ye,Z_MEM_ERROR:Ge}=j;function Xe(t){this.options=Bt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Yt,this.strm.avail_out=0;let a=Le.inflateInit2(this.strm,e.windowBits);if(a!==He)throw new Error(H[a]);if(this.header=new Ne,Le.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=jt(e.dictionary):"[object ArrayBuffer]"===Be.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Le.inflateSetDictionary(this.strm,e.dictionary),a!==He)))throw new Error(H[a])}function We(t,e){const a=new Xe(e);if(a.push(t),a.err)throw a.msg||H[a.err];return a.result}Xe.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,l;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Me:Ce,"[object ArrayBuffer]"===Be.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Le.inflate(a,r),s===Ke&&n&&(s=Le.inflateSetDictionary(a,n),s===He?s=Le.inflate(a,r):s===Ye&&(s=Ke));a.avail_in>0&&s===je&&a.state.wrap>0&&0!==t[a.next_in];)Le.inflateReset(a),s=Le.inflate(a,r);switch(s){case Pe:case Ye:case Ke:case Ge:return this.onEnd(s),this.ended=!0,!1}if(l=a.avail_out,a.next_out&&(0===a.avail_out||s===je))if("string"===this.options.to){let t=Pt(a.output,a.next_out),e=a.next_out-t,n=Kt(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==He||0!==l){if(s===je)return s=Le.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},Xe.prototype.onData=function(t){this.chunks.push(t)},Xe.prototype.onEnd=function(t){t===He&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ct(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var qe={Inflate:Xe,inflate:We,inflateRaw:function(t,e){return(e=e||{}).raw=!0,We(t,e)},ungzip:We,constants:j};const{Deflate:Je,deflate:Qe,deflateRaw:Ve,gzip:$e}=ne,{Inflate:ta,inflate:ea,inflateRaw:aa,ungzip:ia}=qe;var na=Je,sa=Qe,ra=Ve,la=$e,oa=ta,ha=ea,da=aa,_a=ia,fa=j,ca={Deflate:na,deflate:sa,deflateRaw:ra,gzip:la,Inflate:oa,inflate:ha,inflateRaw:da,ungzip:_a,constants:fa};t.Deflate=na,t.Inflate=oa,t.constants=fa,t.default=ca,t.deflate=sa,t.deflateRaw=ra,t.gzip=la,t.inflate=ha,t.inflateRaw=da,t.ungzip=_a,Object.defineProperty(t,"__esModule",{value:!0})}));