!function(t){t.f[0]=function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),t.r(1);const i=t.r(2),o=t.r(8),r=t.r(3),s=t.r(4),a=t.r(5);function l(){const t=document.body;return o.bind(t)` ${s.Header()}
${a.TodoList()} ${r.AddTodo()}
${i.$store.leftTodo() `:null} `}i.$store.setRender(l),l()},t.f[2]=function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.$store=new class{constructor(){this.todos=[],this.id=0,this.colors=["#00b894","#00cec9","#0984e3","#6c5ce7","#b2bec3","#fdcb6e","#e17055","#d63031","#e84393","#2d3436"],this.getData()}reorder(t,e){const n=this.todos.findIndex(e=>e.id===t),i=this.todos.splice(n,1)[0];this.todos.splice(e,0,i),this.saveData()}leftTodo(){return this.todos.filter(t=>!t.done).length}randomColor(){const t=Math.floor(Math.random()*Math.floor(this.colors.length));return this.colors[t]}findIndex(t){return this.todos.findIndex(e=>e.id===t)}addTodo(t){const e={id:this.id,done:!1,edit:!1,title:t,createdAt:new Date,color:this.randomColor()};this.todos.push(e),this.incrementId(),this.saveData()}updateTodo(t,e){const n=this.findIndex(t);this.todos[n].title=e,this.todos[n].edit=!1,this.saveData()}removeTodo(t){this.todos=this.todos.filter(e=>e.id!==t),this.incrementId(),this.saveData()}incrementId(){this.id++}saveData(){window.localStorage.setItem("id",JSON.stringify(this.id)),window.localStorage.setItem("todos",JSON.stringify(this.todos)),this.render()}getData(){const t=window.localStorage.getItem("id"),e=window.localStorage.getItem("todos");this.id=Number.parseInt(JSON.parse(t),10)||0,this.todos=JSON.parse(e)||[]}clearAll(){this.todos=this.todos.filter(t=>!t.done),this.saveData()}setRender(t){this.render=t}toggleDone(t){const e=this.findIndex(t);this.todos[e].done=!this.todos[e].done,this.todos[e].edit=!1,this.saveData()}toggleEdit(t){const e=this.findIndex(t);this.todos[e].edit=!this.todos[e].edit,this.saveData()}cancelEdit(t){const e=this.findIndex(t);this.todos[e].edit=!1,this.saveData()}}},t.f[3]=function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const i=t.r(8),o=t.r(2);n.AddTodo=function(){return i.wire(o.$store,`:add-todo`)` {("Enter"===t||"NumpadEnter"===t)&&(o.$store.addTodo(e.value),e.value="")}} placeholder="Nouvel article [Entrer pour valider]" autocomplete="off" > `}},t.f[4]=function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const i=t.r(8),o=t.r(2);n.Header=function(){const t=o.$store.leftTodo()>0?i.wire(o.$store,`left`)` (${o.$store.leftTodo()} articles restants) `:null;return i.wire(o.$store,":header")`

${(new Date).toLocaleDateString()}

${o.$store.todos.length} articles ${t}

`}},t.f[5]=function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const i=t.r(24),o=t.r(8),r=t.r(2),s=t.r(6);n.TodoList=function(){const t=o.wire(r.$store,":todo-list")` `;return i.create(t,{sort:!0,animation:150,dataIdAttr:"data-id",handle:".todo__accent",onSort(t){const e=parseInt(t.item.dataset.id,10),n=t.newIndex;r.$store.reorder(e,n)}}),t}},t.f[6]=function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const i=t.r(8),o=t.r(25),r=t.r(2);n.Todo=function({id:t,title:e,done:n,createdAt:s,color:a,edit:l}){const c=l&&!n?i.wire(r.$store,`:todo-edit-${t}`)` {("Enter"===e||"NumpadEnter"===e)&&r.$store.updateTodo(t,n)}} value=${e} onconnected=${t=>t.target.focus()} > `:i.wire(r.$store,`:todo-edit-${t}`)` r.$store.toggleEdit(t)} > ${e} `;if(!l&&!n){const e=new o.Manager(c);e.add(new o.Tap({event:"dbltap",taps:2})),e.on("dbltap",()=>r.$store.toggleEdit(t))}return i.wire(r.$store,`:todo-${t}`)`
  • ${c}
  • `}},t.f[8]=function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const i=t.r(9),o=t.r(12),r=t.r(13);n.wire=r.default;const s=t.r(19),a=t.r(23),l=t=>s.default.bind(t);n.bind=l;const c=o.default.define;function u(t){return arguments.length<2?null==t?r.content("html"):"string"==typeof t?u.wire(null,t):"raw"in t?r.content("html")(t):"nodeType"in t?u.bind(t):r.weakly(t,"html"):("raw"in t?r.content("html"):u.wire).apply(null,arguments)}u.Component=i.default,u.bind=l,u.define=c,u.diff=a.default,u.hyper=u,u.wire=r.default,i.setup(r.content),n.default=u},t.f[9]=function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const i=t.r(11);function o(){}n.default=o,n.setup=function(t){const e=new i.WeakMap,n=Object.create;Object.defineProperties(o,{for:{configurable:!0,value(t,o){return((t,e,o)=>{switch(typeof o){case"object":case"function":const r=e.w||(e.w=new i.WeakMap);return r.get(o)||((t,e,n)=>(t.set(e,n),n))(r,o,new t);default:const s=e.p||(e.p=n(null));return s[o]||(s[o]=new t)}})(this,e.get(t)||(t=>{const n={w:null,p:null};return e.set(t,n),n})(t),null==o?"default":o)}}}),Object.defineProperties(o.prototype,{handleEvent:{value(t){const e=t.currentTarget;this["getAttribute"in e&&e.getAttribute("data-call")||"on"+t.type](t)}},html:r("html",t),svg:r("svg",t),state:r("state",function(){return this.defaultState}),defaultState:{get:()=>({})},setState:{value(t,e){const n=this.state,i="function"==typeof t?t.call(this,n):t;for(const t in i)n[t]=i[t];return!1!==e&&this.render(),this}}})};const r=(t,e)=>{const n="_"+t+"$";return{get(){return this[n]||(this[t]=e.call(this,t))},set(t){Object.defineProperty(this,n,{configurable:!0,value:t})}}}},t.f[10]=function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.G=document.defaultView,e.ELEMENT_NODE=1,e.TEXT_NODE=3,e.COMMENT_NODE=8,e.DOCUMENT_FRAGMENT_NODE=11,e.VOID_ELEMENTS=/^area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr$/i,e.OWNER_SVG_ELEMENT="ownerSVGElement",e.SVG_NAMESPACE="http://www.w3.org/2000/svg",e.CONNECTED="connected",e.DISCONNECTED="dis"+e.CONNECTED,e.EXPANDO="_hyper: ",e.SHOULD_USE_TEXT_CONTENT=/^style|textarea$/i,e.UID=e.EXPANDO+(Math.random()*new Date|0)+";",e.UIDC="\x3c!--"+e.UID+"--\x3e"},t.f[11]=function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const i=t.r(10);let o=i.G.Event;n.Event=o;try{new o("Event")}catch(t){n.Event=o=function(t){const e=document.createEvent("Event");return e.initEvent(t,!1,!1),e}}n.Map=i.G.Map||function(){const t=[],e=[];return{get:n=>e[t.indexOf(n)],set(n,i){e[t.push(n)-1]=i}}},n.WeakMap=i.G.WeakMap||function(){return{get:t=>t[i.UID],set(t,e){Object.defineProperty(t,i.UID,{configurable:!0,value:e})}}},n.WeakSet=i.G.WeakSet||function(){const t=new n.WeakMap;return{add(e){t.set(e,!0)},has:e=>!0===t.get(e)}},n.isArray=Array.isArray||(t=>e=>"[object Array]"===t.call(e))({}.toString),n.trim=i.UID.trim||function(){return this.replace(/^\s+|\s+$/g,"")}},t.f[12]=function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const n={},i=[],o=n.hasOwnProperty;let r=0;e.default={define:(t,e)=>{t in n||(r=i.push(t)),n[t]=e},invoke:(t,e)=>{for(let s=0;s{let e,n,o,a,c;return function(u){u=s.unique(u);let h=a!==u;return h&&(a=u,o=r.fragment(document),n="svg"===t?document.createElementNS(i.SVG_NAMESPACE,"svg"):o,c=l.default.bind(n)),c.apply(null,arguments),h&&("svg"===t&&s.append(o,s.slice.call(n.childNodes)),e=d(o)),e}};n.content=u;const h=(t,e)=>{const n=e.indexOf(":");let i=c.get(t),o=e;return-1{const e=t.childNodes,n=e.length,r=[];for(let t=0;tnull==t?u(e||"html"):h(t,e||"html"))},t.f[14]=function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.create=((t,n)=>e.doc(t).createElement(n)),e.doc=(t=>t.ownerDocument||t),e.fragment=(t=>e.doc(t).createDocumentFragment()),e.text=((t,n)=>e.doc(t).createTextNode(n))},t.f[15]=function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const i=t.r(16),o=t.r(10),r=t.r(17),s=t.r(14);n.append=r.hasAppend?(t,e)=>{t.append.apply(t,e)}:(t,e)=>{const n=e.length;for(let i=0;i"<"+e+n.replace(a,c)+i,c=(t,e,n)=>e+(n||'"')+o.UID+(n||'"');n.createFragment=((t,e)=>(o.OWNER_SVG_ELEMENT in t?p:d)(t,e.replace(i.attrSeeker,l)));const u=r.hasDoomedCloneNode?t=>{const e=t.cloneNode(),n=t.childNodes||[],i=n.length;for(let t=0;tt.cloneNode(!0);n.importNode=r.hasImportNode?(t,e)=>t.importNode(e,!0):(t,e)=>u(e),n.slice=[].slice,n.unique=(t=>h(t));let h=t=>{if(t.propertyIsEnumerable("raw")||/Firefox\/(\d+)/.test((o.G.navigator||{}).userAgent)&&parseFloat(RegExp.$1)<55){const t={};h=(e=>{const n="_"+e.join(o.UID);return t[n]||(t[n]=e)})}else h=(t=>t);return h(t)};const d=r.hasContent?(t,e)=>{const n=s.create(t,"template");return n.innerHTML=e,n.content}:(t,e)=>{const i=s.create(t,"template"),o=s.fragment(t);if(/^[^\S]*?<(col(?:group)?|t(?:head|body|foot|r|d|h))/i.test(e)){const t=RegExp.$1;i.innerHTML=""+e+"
    ",n.append(o,n.slice.call(i.querySelectorAll(t)))}else i.innerHTML=e,n.append(o,n.slice.call(i.childNodes));return o},p=r.hasContent?(t,e)=>{const i=s.fragment(t),r=s.doc(t).createElementNS(o.SVG_NAMESPACE,"svg");return r.innerHTML=e,n.append(i,n.slice.call(r.childNodes)),i}:(t,e)=>{const i=s.fragment(t),r=s.create(t,"div");return r.innerHTML=''+e+"",n.append(i,n.slice.call(r.firstChild.childNodes)),i}},t.f[16]=function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const n=" \\f\\n\\r\\t",i="[ "+n+"]+[^ \\f\\n\\r\\t\\/>\"'=]+";e.attrName=i;const o="<([A-Za-z]+[A-Za-z0-9:_-]*)((?:",r="(?:=(?:'[^']*?'|\"[^\"]*?\"|<[^>]*?>|[^ \\f\\n\\r\\t\\/>\"'=]+))?)",s=new RegExp(o+i+r+"+)([ "+n+"]*/?>)","g");e.attrSeeker=s;const a=new RegExp(o+i+r+"*)([ "+n+"]*/>)","g");e.selfClosing=a},t.f[17]=function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const i=t.r(14),o=i.fragment(document);n.hasAppend="append"in o,n.hasContent="content"in i.create(document,"template"),o.appendChild(i.text(o,"g")),o.appendChild(i.text(o,"")),n.hasDoomedCloneNode=1===o.cloneNode(!0).childNodes.length,n.hasImportNode="importNode"in document},t.f[18]=function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const i=t.r(15),o=t.r(14);function r(t){this.childNodes=t,this.length=t.length,this.first=t[0],this.last=t[this.length-1]}n.default=r,r.prototype.insert=function(){const t=o.fragment(this.first);return i.append(t,this.childNodes),t},r.prototype.remove=function(){const t=this.first,e=this.last;if(2===this.length)e.parentNode.removeChild(e);else{const n=o.doc(t).createRange();n.setStartBefore(this.childNodes[1]),n.setEndAfter(e),n.deleteContents()}return t}},t.f[19]=function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const i=t.r(11),o=t.r(10),r=t.r(20),s=t.r(15),a=t.r(16),l=new i.WeakMap,c=new i.Map;function u(){const t=arguments.length;for(let e=1;eo.VOID_ELEMENTS.test(e)?t:"<"+e+n+">";n.default=function(t){const e=l.get(this);return e&&e.template===s.unique(t)?u.apply(e.updates,arguments):function(t){t=s.unique(t);const e=c.get(t)||function(t){const e=[],n=t.join(o.UIDC).replace(h,d),i=s.createFragment(this,n);r.default.find(i,e,t.slice());const a={fragment:i,paths:e};return c.set(t,a),a}.call(this,t),n=s.importNode(this.ownerDocument,e.fragment),i=r.default.create(n,e.paths);l.set(this,{template:t,updates:i}),u.apply(i,arguments),this.textContent="",this.appendChild(n)}.apply(this,arguments),this}},t.f[20]=function(e,n){Object.defineProperty(n,"__esModule",{value:!0});const i=t.r(10),o=t.r(9),r=t.r(18),s=t.r(21),a=t.r(22),l=t.r(12),c=t.r(23),u=t.r(14),h=t.r(11),d=t.r(15),p=new h.WeakSet;function f(){}f.prototype=Object.create(null);const g=t=>({html:t}),v=(t,e)=>"ELEMENT_NODE"in t?t:t.constructor===r.default?1/e<0?e?t.remove():t.last:e?t.insert():t.first:v(t.render(),e),m=(t,e,n)=>{const o=t.childNodes,r=o.length;for(let a=0;a{const o=new f,r=t.attributes,a=d.slice.call(r),l=[],c=a.length;for(let t=0;t{e(t.placeholder),"text"in t?Promise.resolve(t.text).then(String).then(e):"any"in t?Promise.resolve(t.any).then(e):"html"in t?Promise.resolve(t.html).then(g).then(e):Promise.resolve(l.default.invoke(t,e)).then(e)},T=t=>null!=t&&"then"in t,_=(t,e)=>{let n,s=!1;const a=p=>{switch(typeof p){case"string":case"number":case"boolean":s?n!==p&&(n=p,e[0].textContent=p):(s=!0,n=p,e=c.default(t.parentNode,e,[u.text(t,p)],v,t));break;case"object":case"undefined":if(null==p){s=!1,e=c.default(t.parentNode,e,[],v,t);break}default:if(s=!1,n=p,h.isArray(p))if(0===p.length)e.length&&(e=c.default(t.parentNode,e,[],v,t));else switch(typeof p[0]){case"string":case"number":case"boolean":a({html:p});break;case"object":if(h.isArray(p[0])&&(p=p.concat.apply([],p)),T(p[0])){Promise.all(p).then(a);break}default:e=c.default(t.parentNode,e,p,v,t)}else(t=>"ELEMENT_NODE"in t||t instanceof r.default||t instanceof o.default)(p)?e=c.default(t.parentNode,e,p.nodeType===i.DOCUMENT_FRAGMENT_NODE?d.slice.call(p.childNodes):[p],v,t):T(p)?p.then(a):"placeholder"in p?E(p,a):"text"in p?a(String(p.text)):"any"in p?a(p.any):"html"in p?e=c.default(t.parentNode,e,d.slice.call(d.createFragment(t,[].concat(p.html).join("")).childNodes),v,t):a("length"in p?d.slice.call(p):l.default.invoke(p,a))}};return a},b=(t,e,n)=>{const o=i.OWNER_SVG_ELEMENT in t;let r;if("style"===e)return a.default(t,n,o);if(/^on/.test(e)){let n=e.slice(2);return n===i.CONNECTED||n===i.DISCONNECTED?(N&&(N=!1,function(){const t=(t,n)=>{const o=new h.Event(n),r=t.length;for(let n=0;n{p.has(t)&&t.dispatchEvent(n);const i=t.children,o=i.length;for(let t=0;t{const n=e.length;for(let o=0;o{t([e.target],i.DISCONNECTED)},!1),document.addEventListener("DOMNodeInserted",e=>{t([e.target],i.CONNECTED)},!1)}}()),p.add(t)):e.toLowerCase()in t&&(n=n.toLowerCase()),e=>{r!==e&&(r&&t.removeEventListener(n,r,!1),r=e,e&&t.addEventListener(n,e,!1))}}if("data"===e||!o&&e in t)return n=>{r!==n&&(r=n,t[e]!==n&&(t[e]=n,null==n&&t.removeAttribute(e)))};{let e=!1;const i=n.cloneNode(!0);return n=>{r!==n&&(r=n,i.value!==n&&(null==n?(e&&(e=!1,t.removeAttributeNode(i)),i.value=n):(i.value=n,e||(e=!0,t.setAttributeNode(i)))))}}},D=t=>{let e="";const n=i=>{e!==i&&(e=i,"object"==typeof i&&i?T(i)?i.then(n):"placeholder"in i?E(i,n):n("text"in i?String(i.text):"any"in i?i.any:"html"in i?[].concat(i.html).join(""):"length"in i?d.slice.call(i).join(""):l.default.invoke(i,n)):t.textContent=null==i?"":i)};return n};n.default={create:(t,e)=>{const n=[],i=e.length;for(let o=0;o{t.unshift(t.indexOf.call(e.childNodes,n))};n.default={create:(t,e,n)=>({type:t,name:n,node:e,path:(t=>{const e=[];let n;switch(t.nodeType){case i.ELEMENT_NODE:case i.DOCUMENT_FRAGMENT_NODE:n=t;break;case i.COMMENT_NODE:n=t.parentNode,o(e,n,t);break;default:n=t.ownerElement}for(t=n;n=n.parentNode;t=n)o(e,n,t);return e})(e)}),find:(t,e)=>{const n=e.length;for(let i=0;i{if(n){const o=e.cloneNode(!0);return o.value="",t.setAttributeNode(o),i(o,n)}return i(t.style,n)});const i=(t,e)=>{let i,o;return r=>{switch(typeof r){case"object":if(r){if("object"===i){if(!e&&o!==r)for(const e in o)e in r||(t[e]="")}else e?t.value="":t.cssText="";const a=e?{}:t;for(const t in r){const e=r[t];a[t]="number"!=typeof e||n.test(t)?e:e+"px"}i="object",e?t.value=s(o=a):o=r;break}default:o!=r&&(i="string",o=r,e?t.value=r||"":t.cssText=r||"")}}},o=/([^A-Z])([A-Z]+)/g,r=(t,e,n)=>e+"-"+n.toLowerCase(),s=t=>{const e=[];for(const n in t)e.push(n.replace(o,r),":",t[n],";");return e.join("")}},t.f[23]=function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const n=t=>t;e.default=((t,e,i,o,r)=>{const s=o||n,a=null==r?null:s(r,0);let l=0,c=0,u=e.length-1,h=e[0],d=e[u],p=i.length-1,f=i[0],g=i[p];for(;l<=u&&c<=p;)if(null==h)h=e[++l];else if(null==d)d=e[--u];else if(null==f)f=i[++c];else if(null==g)g=i[--p];else if(h==f)h=e[++l],f=i[++c];else if(d==g)d=e[--u],g=i[--p];else if(h==g)t.insertBefore(s(h,1),s(d,-0).nextSibling),h=e[++l],g=i[--p];else if(d==f)t.insertBefore(s(d,1),s(h,0)),d=e[--u],f=i[++c];else{let n=e.indexOf(f);if(n<0)t.insertBefore(s(f,1),s(h,0)),f=i[++c];else{let o=e[n];e[n]=null,t.insertBefore(s(o,1),s(h,0)),f=i[++c]}}if(l<=u||c<=p)if(l>u){const e=i[p+1],n=null==e?a:s(e,0);if(c===p)t.insertBefore(s(i[c],1),n);else{const e=t.ownerDocument.createDocumentFragment();for(;c<=p;)e.appendChild(s(i[c++],1));t.insertBefore(e,n)}}else if(null==e[l]&&l++,l===u)t.removeChild(s(e[l],-1));else{const n=t.ownerDocument.createRange();n.setStartBefore(s(e[l],-1)),n.setEndAfter(s(e[u],-1)),n.deleteContents()}return i})},t.f[24]=function(t,e){var n;n=function(){if(!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var t,e,n,i,o,r,s,a,l,c,u,h,d,p,f,g,v,m,y,E,T,_={},b=/\s+/g,D=/left|right|inline/,N="Sortable"+(new Date).getTime(),w=window,C=w.document,S=w.parseInt,O=w.setTimeout,x=w.jQuery||w.Zepto,M=w.Polymer,I=!1,A="draggable"in C.createElement("div"),P=!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie)/i)&&((T=C.createElement("x")).style.cssText="pointer-events:auto","auto"===T.style.pointerEvents),k=!1,R=Math.abs,$=Math.min,L=[],j=[],X=it(function(t,e,n){if(n&&e.scroll){var i,o,r,s,u,h,d=n[N],p=e.scrollSensitivity,f=e.scrollSpeed,g=t.clientX,v=t.clientY,m=window.innerWidth,y=window.innerHeight;if(l!==n&&(a=e.scroll,l=n,c=e.scrollFn,!0===a)){a=n;do{if(a.offsetWidth-1:o==t)}}var n={},i=t.group;i&&"object"==typeof i||(i={name:i}),n.name=i.name,n.checkPull=e(i.pull,!0),n.checkPut=e(i.put),n.revertClone=i.revertClone,t.group=n};try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){I={capture:!1,passive:!1}}}))}catch(t){}function U(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(t);this.el=t,this.options=e=ot({},e),t[N]=this;var n={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(t.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==U.supportPointer};for(var i in n)!(i in e)&&(e[i]=n[i]);for(var o in Y(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&A,z(t,"mousedown",this._onTapStart),z(t,"touchstart",this._onTapStart),e.supportPointer&&z(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(z(t,"dragover",this),z(t,"dragenter",this)),j.push(this._onDragOver),e.store&&this.sort(e.store.get(this))}function F(e,n){"clone"!==e.lastPullMode&&(n=!0),i&&i.state!==n&&(q(i,"display",n?"none":""),n||i.state&&(e.options.group.revertClone?(o.insertBefore(i,r),e._animate(t,i)):o.insertBefore(i,t)),i.state=n)}function W(t,e,n){if(t){n=n||C;do{if(">*"===e&&t.parentNode===n||nt(t,e))return t}while(t=B(t))}return null}function B(t){var e=t.host;return e&&e.nodeType?e:t.parentNode}function z(t,e,n){t.addEventListener(e,n,I)}function H(t,e,n){t.removeEventListener(e,n,I)}function V(t,e,n){if(t)if(t.classList)t.classList[n?"add":"remove"](e);else{var i=(" "+t.className+" ").replace(b," ").replace(" "+e+" "," ");t.className=(i+(n?" "+e:"")).replace(b," ")}}function q(t,e,n){var i=t&&t.style;if(i){if(void 0===n)return C.defaultView&&C.defaultView.getComputedStyle?n=C.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in i||(e="-webkit-"+e),i[e]=n+("string"==typeof n?"":"px")}}function G(t,e,n){if(t){var i=t.getElementsByTagName(e),o=0,r=i.length;if(n)for(;o*"!==e&&!nt(t,e)||n++;return n}function nt(t,e){if(t){var n=(e=e.split(".")).shift().toUpperCase(),i=new RegExp("\\s("+e.join("|")+")(?=\\s)","g");return!(""!==n&&t.nodeName.toUpperCase()!=n||e.length&&((" "+t.className+" ").match(i)||[]).length!=e.length)}return!1}function it(t,e){var n,i;return function(){void 0===n&&(n=arguments,i=this,O(function(){1===n.length?t.call(i,n[0]):t.apply(i,n),n=void 0},e))}}function ot(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function rt(t){return M&&M.dom?M.dom(t).cloneNode(!0):x?x(t).clone(!0)[0]:t.cloneNode(!0)}function st(t){return O(t,0)}function at(t){return clearTimeout(t)}return U.prototype={constructor:U,_onTapStart:function(e){var n,i=this,o=this.el,r=this.options,a=r.preventOnFilter,l=e.type,c=e.touches&&e.touches[0],u=(c||e).target,h=e.target.shadowRoot&&e.path&&e.path[0]||u,d=r.filter;if(function(t){var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var i=e[n];i.checked&&L.push(i)}}(o),!t&&!(/mousedown|pointerdown/.test(l)&&0!==e.button||r.disabled)&&!h.isContentEditable&&(u=W(u,r.draggable,o))&&s!==u){if(n=et(u,r.draggable),"function"==typeof d){if(d.call(this,e,u,this))return Z(i,h,"filter",u,o,o,n),void(a&&e.preventDefault())}else if(d&&(d=d.split(",").some(function(t){if(t=W(h,t.trim(),o))return Z(i,t,"filter",u,o,o,n),!0})))return void(a&&e.preventDefault());r.handle&&!W(h,r.handle,o)||this._prepareDragStart(e,c,u,n)}},_prepareDragStart:function(n,i,a,l){var c,u=this,h=u.el,d=u.options,f=h.ownerDocument;a&&!t&&a.parentNode===h&&(m=n,o=h,e=(t=a).parentNode,r=t.nextSibling,s=a,g=d.group,p=l,this._lastX=(i||n).clientX,this._lastY=(i||n).clientY,t.style["will-change"]="all",c=function(){u._disableDelayedDrag(),t.draggable=u.nativeDraggable,V(t,d.chosenClass,!0),u._triggerDragStart(n,i),Z(u,o,"choose",t,o,o,p)},d.ignore.split(",").forEach(function(e){G(t,e.trim(),Q)}),z(f,"mouseup",u._onDrop),z(f,"touchend",u._onDrop),z(f,"touchcancel",u._onDrop),z(f,"selectstart",u),d.supportPointer&&z(f,"pointercancel",u._onDrop),d.delay?(z(f,"mouseup",u._disableDelayedDrag),z(f,"touchend",u._disableDelayedDrag),z(f,"touchcancel",u._disableDelayedDrag),z(f,"mousemove",u._disableDelayedDrag),z(f,"touchmove",u._disableDelayedDrag),d.supportPointer&&z(f,"pointermove",u._disableDelayedDrag),u._dragStartTimer=O(c,d.delay)):c())},_disableDelayedDrag:function(){var t=this.el.ownerDocument;clearTimeout(this._dragStartTimer),H(t,"mouseup",this._disableDelayedDrag),H(t,"touchend",this._disableDelayedDrag),H(t,"touchcancel",this._disableDelayedDrag),H(t,"mousemove",this._disableDelayedDrag),H(t,"touchmove",this._disableDelayedDrag),H(t,"pointermove",this._disableDelayedDrag)},_triggerDragStart:function(e,n){(n=n||("touch"==e.pointerType?e:null))?(m={target:t,clientX:n.clientX,clientY:n.clientY},this._onDragStart(m,"touch")):this.nativeDraggable?(z(t,"dragend",this),z(o,"dragstart",this._onDragStart)):this._onDragStart(m,!0);try{C.selection?st(function(){C.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(){if(o&&t){var e=this.options;V(t,e.ghostClass,!0),V(t,e.dragClass,!1),U.active=this,Z(this,o,"start",t,o,o,p)}else this._nulling()},_emulateDragOver:function(){if(y){if(this._lastX===y.clientX&&this._lastY===y.clientY)return;this._lastX=y.clientX,this._lastY=y.clientY,P||q(n,"display","none");var t=C.elementFromPoint(y.clientX,y.clientY),e=t,i=j.length;if(t&&t.shadowRoot&&(e=t=t.shadowRoot.elementFromPoint(y.clientX,y.clientY)),e)do{if(e[N]){for(;i--;)j[i]({clientX:y.clientX,clientY:y.clientY,target:t,rootEl:e});break}t=e}while(e=e.parentNode);P||q(n,"display","")}},_onTouchMove:function(t){if(m){var e=this.options,i=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,s=r.clientX-m.clientX+o.x,a=r.clientY-m.clientY+o.y,l=t.touches?"translate3d("+s+"px,"+a+"px,0)":"translate("+s+"px,"+a+"px)";if(!U.active){if(i&&$(R(r.clientX-this._lastX),R(r.clientY-this._lastY))5||e.clientX-(n.left+n.width)>5}(f,s)){if(0!==f.children.length&&f.children[0]!==n&&f===s.target&&(a=f.lastElementChild),a){if(a.animated)return;c=a.getBoundingClientRect()}F(T,_),!1!==J(o,f,t,l,a,c,s)&&(t.contains(f)||(f.appendChild(t),e=f),this._animate(l,t),a&&this._animate(c,a))}else if(a&&!a.animated&&a!==t&&void 0!==a.parentNode[N]){u!==a&&(u=a,h=q(a),d=q(a.parentNode));var C=(c=a.getBoundingClientRect()).right-c.left,S=c.bottom-c.top,x=D.test(h.cssFloat+h.display)||"flex"==d.display&&0===d["flex-direction"].indexOf("row"),M=a.offsetWidth>t.offsetWidth,I=a.offsetHeight>t.offsetHeight,A=(x?(s.clientX-c.left)/C:(s.clientY-c.top)/S)>.5,P=a.nextElementSibling,R=!1;if(x){var $=t.offsetTop,L=a.offsetTop;R=$===L?a.previousElementSibling===t&&!M||A&&M:a.previousElementSibling===t||t.previousElementSibling===a?(s.clientY-c.top)/S>.5:L>$}else b||(R=P!==t&&!I||A&&I);var j=J(o,f,t,l,a,c,s,R);!1!==j&&(1!==j&&-1!==j||(R=1===j),k=!0,O(K,30),F(T,_),t.contains(f)||(R&&!P?f.appendChild(t):a.parentNode.insertBefore(t,R?P:a)),e=t.parentNode,this._animate(l,t),this._animate(c,a))}}},_animate:function(t,e){var n=this.options.animation;if(n){var i=e.getBoundingClientRect();1===t.nodeType&&(t=t.getBoundingClientRect()),q(e,"transition","none"),q(e,"transform","translate3d("+(t.left-i.left)+"px,"+(t.top-i.top)+"px,0)"),e.offsetWidth,q(e,"transition","all "+n+"ms"),q(e,"transform","translate3d(0,0,0)"),clearTimeout(e.animated),e.animated=O(function(){q(e,"transition",""),q(e,"transform",""),e.animated=!1},n)}},_offUpEvents:function(){var t=this.el.ownerDocument;H(C,"touchmove",this._onTouchMove),H(C,"pointermove",this._onTouchMove),H(t,"mouseup",this._onDrop),H(t,"touchend",this._onDrop),H(t,"pointerup",this._onDrop),H(t,"touchcancel",this._onDrop),H(t,"pointercancel",this._onDrop),H(t,"selectstart",this)},_onDrop:function(s){var a=this.el,l=this.options;clearInterval(this._loopId),clearInterval(_.pid),clearTimeout(this._dragStartTimer),at(this._cloneId),at(this._dragStartId),H(C,"mouseover",this),H(C,"mousemove",this._onTouchMove),this.nativeDraggable&&(H(C,"drop",this),H(a,"dragstart",this._onDragStart)),this._offUpEvents(),s&&(E&&(s.preventDefault(),!l.dropBubble&&s.stopPropagation()),n&&n.parentNode&&n.parentNode.removeChild(n),o!==e&&"clone"===U.active.lastPullMode||i&&i.parentNode&&i.parentNode.removeChild(i),t&&(this.nativeDraggable&&H(t,"dragend",this),Q(t),t.style["will-change"]="",V(t,this.options.ghostClass,!1),V(t,this.options.chosenClass,!1),Z(this,o,"unchoose",t,e,o,p),o!==e?(f=et(t,l.draggable))>=0&&(Z(null,e,"add",t,e,o,p,f),Z(this,o,"remove",t,e,o,p,f),Z(null,e,"sort",t,e,o,p,f),Z(this,o,"sort",t,e,o,p,f)):t.nextSibling!==r&&(f=et(t,l.draggable))>=0&&(Z(this,o,"update",t,e,o,p,f),Z(this,o,"sort",t,e,o,p,f)),U.active&&(null!=f&&-1!==f||(f=p),Z(this,o,"end",t,e,o,p,f),this.save()))),this._nulling()},_nulling:function(){o=t=e=n=r=i=s=a=l=m=y=E=f=u=h=v=g=U.active=null,L.forEach(function(t){t.checked=!0}),L.length=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragover":case"dragenter":t&&(this._onDragOver(e),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.preventDefault()}(e));break;case"mouseover":this._onDrop(e);break;case"selectstart":e.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,i=0,o=n.length,r=this.options;i\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=e.console&&(e.console.warn||e.console.log);return r&&r.call(e.console,o,i),t.apply(this,arguments)}}r="function"!=typeof Object.assign?function(t){if(t===o||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n-1}function C(t){return t.trim().split(/\s+/g)}function S(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;in[e]}):i.sort()),i}function M(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),a=0;a1&&!n.firstMultiple?n.firstMultiple=K(e):1===r&&(n.firstMultiple=!1);var s=n.firstInput,a=n.firstMultiple,l=a?a.center:s.center,c=e.center=tt(i);e.timeStamp=h(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=ot(l,c),e.distance=it(l,c),function(t,e){var n=e.center,i=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};e.eventType!==L&&r.eventType!==X||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y});e.deltaX=o.x+(n.x-i.x),e.deltaY=o.y+(n.y-i.y)}(n,e),e.offsetDirection=nt(e.deltaX,e.deltaY);var d=et(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=u(d.x)>u(d.y)?d.x:d.y,e.scale=a?(p=a.pointers,f=i,it(f[0],f[1],Z)/it(p[0],p[1],Z)):1,e.rotation=a?function(t,e){return ot(e[1],e[0],Z)+ot(t[1],t[0],Z)}(a.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,s,a=t.lastInterval||e,l=e.timeStamp-a.timeStamp;if(e.eventType!=Y&&(l>$||a.velocity===o)){var c=e.deltaX-a.deltaX,h=e.deltaY-a.deltaY,d=et(l,c,h);i=d.x,r=d.y,n=u(d.x)>u(d.y)?d.x:d.y,s=nt(c,h),t.lastInterval=e}else n=a.velocity,i=a.velocityX,r=a.velocityY,s=a.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=s}(n,e);var p,f;var g=t.element;N(e.srcEvent.target,g)&&(g=e.srcEvent.target);e.target=g}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function K(t){for(var e=[],n=0;n=u(e)?t<0?F:W:e<0?B:z}function it(t,e,n){n||(n=G);var i=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return Math.sqrt(i*i+o*o)}function ot(t,e,n){n||(n=G);var i=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return 180*Math.atan2(o,i)/Math.PI}J.prototype={handler:function(){},init:function(){this.evEl&&b(this.element,this.evEl,this.domHandler),this.evTarget&&b(this.target,this.evTarget,this.domHandler),this.evWin&&b(A(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&D(this.element,this.evEl,this.domHandler),this.evTarget&&D(this.target,this.evTarget,this.domHandler),this.evWin&&D(A(this.element),this.evWin,this.domHandler)}};var rt={mousedown:L,mousemove:j,mouseup:X},st="mousedown",at="mousemove mouseup";function lt(){this.evEl=st,this.evWin=at,this.pressed=!1,J.apply(this,arguments)}y(lt,J,{handler:function(t){var e=rt[t.type];e&L&&0===t.button&&(this.pressed=!0),e&j&&1!==t.which&&(e=X),this.pressed&&(e&X&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var ct={pointerdown:L,pointermove:j,pointerup:X,pointercancel:Y,pointerout:Y},ut={2:"touch",3:"pen",4:"mouse",5:"kinect"},ht="pointerdown",dt="pointermove pointerup pointercancel";function pt(){this.evEl=ht,this.evWin=dt,J.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}e.MSPointerEvent&&!e.PointerEvent&&(ht="MSPointerDown",dt="MSPointerMove MSPointerUp MSPointerCancel"),y(pt,J,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),o=ct[i],r=ut[t.pointerType]||t.pointerType,s="touch"==r,a=S(e,t.pointerId,"pointerId");o&L&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):o&(X|Y)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),n&&e.splice(a,1))}});var ft={touchstart:L,touchmove:j,touchend:X,touchcancel:Y},gt="touchstart",vt="touchstart touchmove touchend touchcancel";function mt(){this.evTarget=gt,this.evWin=vt,this.started=!1,J.apply(this,arguments)}y(mt,J,{handler:function(t){var e=ft[t.type];if(e===L&&(this.started=!0),this.started){var n=function(t,e){var n=O(t.touches),i=O(t.changedTouches);e&(X|Y)&&(n=x(n.concat(i),"identifier",!0));return[n,i]}.call(this,t,e);e&(X|Y)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var yt={touchstart:L,touchmove:j,touchend:X,touchcancel:Y},Et="touchstart touchmove touchend touchcancel";function Tt(){this.evTarget=Et,this.targetIds={},J.apply(this,arguments)}y(Tt,J,{handler:function(t){var e=yt[t.type],n=function(t,e){var n=O(t.touches),i=this.targetIds;if(e&(L|j)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var o,r,s=O(t.changedTouches),a=[],l=this.target;if(r=n.filter(function(t){return N(t.target,l)}),e===L)for(o=0;o-1&&i.splice(t,1)},_t)}}y(Dt,J,{handler:function(t,e,n){var i="touch"==n.pointerType,o="mouse"==n.pointerType;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)(function(t,e){t&L?(this.primaryTouch=e.changedPointers[0].identifier,Nt.call(this,e)):t&(X|Y)&&Nt.call(this,e)}).call(this,e,n);else if(o&&function(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function i(n){e.manager.emit(n,t)}n=Lt&&i(e.options.event+Ut(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;te.threshold&&o&e.direction},attrTest:function(t){return Bt.prototype.attrTest.call(this,t)&&(this.state&Rt||!(this.state&Rt)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Ft(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),y(Ht,Bt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[xt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&Rt)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),y(Vt,Yt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[St]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distancee.time;if(this._input=t,!i||!n||t.eventType&(X|Y)&&!o)this.reset();else if(t.eventType&L)this.reset(),this._timer=d(function(){this.state=jt,this.tryEmit()},e.time,this);else if(t.eventType&X)return jt;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===jt&&(t&&t.eventType&X?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=h(),this.manager.emit(this.options.event,this._input)))}}),y(qt,Bt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[xt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&Rt)}}),y(Gt,Bt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:H|V,pointers:1},getTouchAction:function(){return zt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(H|V)?e=t.overallVelocity:n&H?e=t.overallVelocityX:n&V&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&u(e)>this.options.velocity&&t.eventType&X},emit:function(t){var e=Ft(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),y(Zt,Yt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ot]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance