{"size": 16383, "ext": "js", "max_stars_repo_path": "example/website/air-asia/js/draggabilly.pkgd.min.js", "max_stars_repo_name": "yoroshiku111yh/portfolio", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "example/website/air-asia/js/draggabilly.pkgd.min.js", "max_issues_repo_name": "yoroshiku111yh/portfolio", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "example/website/air-asia/js/draggabilly.pkgd.min.js", "max_forks_repo_name": "yoroshiku111yh/portfolio", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 511.96875, "max_line_length": 5403, "alphanum_fraction": 0.7400964414}
/*!
 * Draggabilly PACKAGED v2.1.0
 * Make that shiz draggable
 * http://draggabilly.desandro.com
 * MIT license
 */
(function(b,a){if(typeof define=="function"&&define.amd){define("jquery-bridget/jquery-bridget",["jquery"],function(c){a(b,c)})}else{if(typeof module=="object"&&module.exports){module.exports=a(b,require("jquery"))}else{b.jQueryBridget=a(b,b.jQuery)}}}(window,function factory(c,f){var e=Array.prototype.slice;var a=c.console;var b=typeof a=="undefined"?function(){}:function(h){a.error(h)};function g(j,l,k){k=k||f||c.jQuery;if(!k){return}if(!l.prototype.option){l.prototype.option=function(m){if(!k.isPlainObject(m)){return}this.options=k.extend(true,this.options,m)}}k.fn[j]=function(n){if(typeof n=="string"){var m=e.call(arguments,1);return i(this,n,m)}h(this,n);return this};function i(q,m,n){var o;var p="$()."+j+'("'+m+'")';q.each(function(s,t){var r=k.data(t,j);if(!r){b(j+" not initialized. Cannot call methods, i.e. "+p);return}var v=r[m];if(!v||m.charAt(0)=="_"){b(p+" is not a valid method");return}var u=v.apply(r,n);o=o===undefined?u:o});return o!==undefined?o:q}function h(n,m){n.each(function(p,q){var o=k.data(q,j);if(o){o.option(m);o._init()}else{o=new l(q,m);k.data(q,j,o)}})}d(k)}function d(h){if(!h||(h&&h.bridget)){return}h.bridget=g}d(f||c.jQuery);return g}));
/*!
 * getSize v2.0.2
 * measure size of elements
 * MIT license
 */
(function(b,a){if(typeof define=="function"&&define.amd){define("get-size/get-size",[],function(){return a()})}else{if(typeof module=="object"&&module.exports){module.exports=a()}else{b.getSize=a()}}})(window,function factory(){function h(m){var l=parseFloat(m);var n=m.indexOf("%")==-1&&!isNaN(l);return n&&l}function j(){}var i=typeof console=="undefined"?j:function(l){console.error(l)};var b=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];var d=b.length;function a(){var m={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};for(var l=0;l<d;l++){var n=b[l];m[n]=0}return m}function g(m){var l=getComputedStyle(m);if(!l){i("Style returned "+l+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1")}return l}var e=false;var c;function f(){if(e){return}e=true;var n=document.createElement("div");n.style.width="200px";n.style.padding="1px 2px 3px 4px";n.style.borderStyle="solid";n.style.borderWidth="1px 2px 3px 4px";n.style.boxSizing="border-box";var l=document.body||document.documentElement;l.appendChild(n);var m=g(n);k.isBoxSizeOuter=c=h(m.width)==200;l.removeChild(n)}function k(p){f();if(typeof p=="string"){p=document.querySelector(p)}if(!p||typeof p!="object"||!p.nodeType){return}var n=g(p);if(n.display=="none"){return a()}var B={};B.width=p.offsetWidth;B.height=p.offsetHeight;var A=B.isBorderBox=n.boxSizing=="border-box";for(var u=0;u<d;u++){var q=b[u];var z=n[q];var w=parseFloat(z);B[q]=!isNaN(w)?w:0}var v=B.paddingLeft+B.paddingRight;var m=B.paddingTop+B.paddingBottom;var y=B.marginLeft+B.marginRight;var o=B.marginTop+B.marginBottom;var l=B.borderLeftWidth+B.borderRightWidth;var x=B.borderTopWidth+B.borderBottomWidth;var t=A&&c;var s=h(n.width);if(s!==false){B.width=s+(t?0:v+l)}var r=h(n.height);if(r!==false){B.height=r+(t?0:m+x)}B.innerWidth=B.width-(v+l);B.innerHeight=B.height-(m+x);B.outerWidth=B.width+y;B.outerHeight=B.height+o;return B}return k});(function(b,a){if(typeof define=="function"&&define.amd){define("ev-emitter/ev-emitter",a)}else{if(typeof module=="object"&&module.exports){module.exports=a()}else{b.EvEmitter=a()}}}(this,function(){function a(){}var b=a.prototype;b.on=function(c,f){if(!c||!f){return}var d=this._events=this._events||{};var e=d[c]=d[c]||[];if(e.indexOf(f)==-1){e.push(f)}return this};b.once=function(d,e){if(!d||!e){return}this.on(d,e);var c=this._onceEvents=this._onceEvents||{};var f=c[d]=c[d]||[];f[e]=true;return this};b.off=function(c,f){var e=this._events&&this._events[c];if(!e||!e.length){return}var d=e.indexOf(f);if(d!=-1){e.splice(d,1)}return this};b.emitEvent=function(c,d){var f=this._events&&this._events[c];if(!f||!f.length){return}var e=0;var h=f[e];d=d||[];var j=this._onceEvents&&this._onceEvents[c];while(h){var g=j&&j[h];if(g){this.off(c,h);delete j[h]}h.apply(this,d);e+=g?0:1;h=f[e]}return this};return a}));
/*!
 * Unipointer v2.1.0
 * base class for doing one thing with pointer event
 * MIT license
 */
(function(b,a){if(typeof define=="function"&&define.amd){define("unipointer/unipointer",["ev-emitter/ev-emitter"],function(c){return a(b,c)})}else{if(typeof module=="object"&&module.exports){module.exports=a(b,require("ev-emitter"))}else{b.Unipointer=a(b,b.EvEmitter)}}}(window,function factory(e,a){function d(){}function f(){}var c=f.prototype=Object.create(a.prototype);c.bindStartEvent=function(g){this._bindStartEvent(g,true)};c.unbindStartEvent=function(g){this._bindStartEvent(g,false)};c._bindStartEvent=function(i,g){g=g===undefined?true:!!g;var h=g?"addEventListener":"removeEventListener";if(e.navigator.pointerEnabled){i[h]("pointerdown",this)}else{if(e.navigator.msPointerEnabled){i[h]("MSPointerDown",this)}else{i[h]("mousedown",this);i[h]("touchstart",this)}}};c.handleEvent=function(g){var h="on"+g.type;if(this[h]){this[h](g)}};c.getTouch=function(h){for(var g=0;g<h.length;g++){var j=h[g];if(j.identifier==this.pointerIdentifier){return j}}};c.onmousedown=function(h){var g=h.button;if(g&&(g!==0&&g!==1)){return}this._pointerDown(h,h)};c.ontouchstart=function(g){this._pointerDown(g,g.changedTouches[0])};c.onMSPointerDown=c.onpointerdown=function(g){this._pointerDown(g,g)};c._pointerDown=function(g,h){if(this.isPointerDown){return}this.isPointerDown=true;this.pointerIdentifier=h.pointerId!==undefined?h.pointerId:h.identifier;this.pointerDown(g,h)};c.pointerDown=function(g,h){this._bindPostStartEvents(g);this.emitEvent("pointerDown",[g,h])};var b={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"],MSPointerDown:["MSPointerMove","MSPointerUp","MSPointerCancel"]};c._bindPostStartEvents=function(h){if(!h){return}var g=b[h.type];g.forEach(function(i){e.addEventListener(i,this)},this);this._boundPointerEvents=g};c._unbindPostStartEvents=function(){if(!this._boundPointerEvents){return}this._boundPointerEvents.forEach(function(g){e.removeEventListener(g,this)},this);delete this._boundPointerEvents};c.onmousemove=function(g){this._pointerMove(g,g)};c.onMSPointerMove=c.onpointermove=function(g){if(g.pointerId==this.pointerIdentifier){this._pointerMove(g,g)}};c.ontouchmove=function(g){var h=this.getTouch(g.changedTouches);if(h){this._pointerMove(g,h)}};c._pointerMove=function(g,h){this.pointerMove(g,h)};c.pointerMove=function(g,h){this.emitEvent("pointerMove",[g,h])};c.onmouseup=function(g){this._pointerUp(g,g)};c.onMSPointerUp=c.onpointerup=function(g){if(g.pointerId==this.pointerIdentifier){this._pointerUp(g,g)}};c.ontouchend=function(g){var h=this.getTouch(g.changedTouches);if(h){this._pointerUp(g,h)}};c._pointerUp=function(g,h){this._pointerDone();this.pointerUp(g,h)};c.pointerUp=function(g,h){this.emitEvent("pointerUp",[g,h])};c._pointerDone=function(){this.isPointerDown=false;delete this.pointerIdentifier;this._unbindPostStartEvents();this.pointerDone()};c.pointerDone=d;c.onMSPointerCancel=c.onpointercancel=function(g){if(g.pointerId==this.pointerIdentifier){this._pointerCancel(g,g)}};c.ontouchcancel=function(g){var h=this.getTouch(g.changedTouches);if(h){this._pointerCancel(g,h)}};c._pointerCancel=function(g,h){this._pointerDone();this.pointerCancel(g,h)};c.pointerCancel=function(g,h){this.emitEvent("pointerCancel",[g,h])};f.getPointerPoint=function(g){return{x:g.pageX,y:g.pageY}};return f}));
/*!
 * Unidragger v2.1.0
 * Draggable base class
 * MIT license
 */
(function(b,a){if(typeof define=="function"&&define.amd){define("unidragger/unidragger",["unipointer/unipointer"],function(c){return a(b,c)})}else{if(typeof module=="object"&&module.exports){module.exports=a(b,require("unipointer"))}else{b.Unidragger=a(b,b.Unipointer)}}}(window,function factory(d,f){function c(){}function e(){}var b=e.prototype=Object.create(f.prototype);b.bindHandles=function(){this._bindHandles(true)};b.unbindHandles=function(){this._bindHandles(false)};var a=d.navigator;b._bindHandles=function(g){g=g===undefined?true:!!g;var k;if(a.pointerEnabled){k=function(i){i.style.touchAction=g?"none":""}}else{if(a.msPointerEnabled){k=function(i){i.style.msTouchAction=g?"none":""}}else{k=c}}var j=g?"addEventListener":"removeEventListener";for(var h=0;h<this.handles.length;h++){var l=this.handles[h];this._bindStartEvent(l,g);k(l);l[j]("click",this)}};b.pointerDown=function(g,i){if(g.target.nodeName=="INPUT"&&g.target.type=="range"){this.isPointerDown=false;delete this.pointerIdentifier;return}this._dragPointerDown(g,i);var h=document.activeElement;if(h&&h.blur){h.blur()}this._bindPostStartEvents(g);this.emitEvent("pointerDown",[g,i])};b._dragPointerDown=function(h,i){this.pointerDownPoint=f.getPointerPoint(i);var g=this.canPreventDefaultOnPointerDown(h,i);if(g){h.preventDefault()}};b.canPreventDefaultOnPointerDown=function(g){return g.target.nodeName!="SELECT"};b.pointerMove=function(h,i){var g=this._dragPointerMove(h,i);this.emitEvent("pointerMove",[h,i,g]);this._dragMove(h,i,g)};b._dragPointerMove=function(i,j){var h=f.getPointerPoint(j);var g={x:h.x-this.pointerDownPoint.x,y:h.y-this.pointerDownPoint.y};if(!this.isDragging&&this.hasDragStarted(g)){this._dragStart(i,j)}return g};b.hasDragStarted=function(g){return Math.abs(g.x)>3||Math.abs(g.y)>3};b.pointerUp=function(g,h){this.emitEvent("pointerUp",[g,h]);this._dragPointerUp(g,h)};b._dragPointerUp=function(g,h){if(this.isDragging){this._dragEnd(g,h)}else{this._staticClick(g,h)}};b._dragStart=function(g,h){this.isDragging=true;this.dragStartPoint=f.getPointerPoint(h);this.isPreventingClicks=true;this.dragStart(g,h)};b.dragStart=function(g,h){this.emitEvent("dragStart",[g,h])};b._dragMove=function(h,i,g){if(!this.isDragging){return}this.dragMove(h,i,g)};b.dragMove=function(h,i,g){h.preventDefault();this.emitEvent("dragMove",[h,i,g])};b._dragEnd=function(g,h){this.isDragging=false;setTimeout(function(){delete this.isPreventingClicks}.bind(this));this.dragEnd(g,h)};b.dragEnd=function(g,h){this.emitEvent("dragEnd",[g,h])};b.onclick=function(g){if(this.isPreventingClicks){g.preventDefault()}};b._staticClick=function(g,h){if(this.isIgnoringMouseUp&&g.type=="mouseup"){return}var i=g.target.nodeName;if(i=="INPUT"||i=="TEXTAREA"){g.target.focus()}this.staticClick(g,h);if(g.type!="mouseup"){this.isIgnoringMouseUp=true;setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)}};b.staticClick=function(g,h){this.emitEvent("staticClick",[g,h])};e.getPointerPoint=f.getPointerPoint;return e}));
/*!
 * Draggabilly v2.1.0
 * Make that shiz draggable
 * http://draggabilly.desandro.com
 * MIT license
 */
(function(b,a){if(typeof define=="function"&&define.amd){define(["get-size/get-size","unidragger/unidragger"],function(d,c){return a(b,d,c)})}else{if(typeof module=="object"&&module.exports){module.exports=a(b,require("get-size"),require("unidragger"))}else{b.Draggabilly=a(b,b.getSize,b.Unidragger)}}}(window,function factory(d,o,k){var i=d.document;function m(){}function f(q,p){for(var r in p){q[r]=p[r]}return q}function h(p){return p instanceof HTMLElement}var g=d.requestAnimationFrame||d.webkitRequestAnimationFrame||d.mozRequestAnimationFrame;var a=0;if(!g){g=function(s){var p=new Date().getTime();var q=Math.max(0,16-(p-a));var r=setTimeout(s,q);a=p+q;return r}}var b=i.documentElement;var e=typeof b.style.transform=="string"?"transform":"WebkitTransform";var n=d.jQuery;function l(q,p){this.element=typeof q=="string"?i.querySelector(q):q;if(n){this.$element=n(this.element)}this.options=f({},this.constructor.defaults);this.option(p);this._create()}var c=l.prototype=Object.create(k.prototype);l.defaults={};c.option=function(p){f(this.options,p)};c._create=function(){this.position={};this._getPosition();this.startPoint={x:0,y:0};this.dragPoint={x:0,y:0};this.startPosition=f({},this.position);var p=getComputedStyle(this.element);if(p.position!="relative"&&p.position!="absolute"){this.element.style.position="relative"}this.enable();this.setHandles()};c.setHandles=function(){this.handles=this.options.handle?this.element.querySelectorAll(this.options.handle):[this.element];this.bindHandles()};c.dispatchEvent=function(s,t,q){var r=[t].concat(q);this.emitEvent(s,r);var u=d.jQuery;if(u&&this.$element){if(t){var p=u.Event(t);p.type=s;this.$element.trigger(p,q)}else{this.$element.trigger(s,q)}}};l.prototype._getPosition=function(){var q=getComputedStyle(this.element);var p=this._getPositionCoord(q.left,"width");var r=this._getPositionCoord(q.top,"height");this.position.x=isNaN(p)?0:p;this.position.y=isNaN(r)?0:r;this._addTransformPosition(q)};l.prototype._getPositionCoord=function(q,p){if(q.indexOf("%")!=-1){var r=o(this.element.parentNode);return(parseFloat(q)/100)*r[p]}return parseInt(q,10)};c._addTransformPosition=function(r){var q=r[e];if(q.indexOf("matrix")!==0){return}var u=q.split(",");var p=q.indexOf("matrix3d")===0?12:4;var t=parseInt(u[p],10);var s=parseInt(u[p+1],10);this.position.x+=t;this.position.y+=s};c.pointerDown=function(p,r){this._dragPointerDown(p,r);var q=i.activeElement;if(q&&q.blur&&q!=i.body){q.blur()}this._bindPostStartEvents(p);this.element.classList.add("is-pointer-down");this.dispatchEvent("pointerDown",p,[r])};c.pointerMove=function(q,r){var p=this._dragPointerMove(q,r);this.dispatchEvent("pointerMove",q,[r,p]);this._dragMove(q,r,p)};c.dragStart=function(p,q){if(!this.isEnabled){return}this._getPosition();this.measureContainment();this.startPosition.x=this.position.x;this.startPosition.y=this.position.y;this.setLeftTop();this.dragPoint.x=0;this.dragPoint.y=0;this.element.classList.add("is-dragging");this.dispatchEvent("dragStart",p,[q]);this.animate()};c.measureContainment=function(){var p=this.options.containment;if(!p){return}var t=h(p)?p:typeof p=="string"?i.querySelector(p):this.element.parentNode;var u=o(this.element);var q=o(t);var x=this.element.getBoundingClientRect();var w=t.getBoundingClientRect();var s=q.borderLeftWidth+q.borderRightWidth;var r=q.borderTopWidth+q.borderBottomWidth;var v=this.relativeStartPosition={x:x.left-(w.left+q.borderLeftWidth),y:x.top-(w.top+q.borderTopWidth)};this.containSize={width:(q.width-s)-v.x-u.width,height:(q.height-r)-v.y-u.height}};c.dragMove=function(s,v,q){if(!this.isEnabled){return}var u=q.x;var t=q.y;var r=this.options.grid;var p=r&&r[0];var w=r&&r[1];u=j(u,p);t=j(t,w);u=this.containDrag("x",u,p);t=this.containDrag("y",t,w);u=this.options.axis=="y"?0:u;t=this.options.axis=="x"?0:t;this.position.x=this.startPosition.x+u;this.position.y=this.startPosition.y+t;this.dragPoint.x=u;this.dragPoint.y=t;this.dispatchEvent("dragMove",s,[v,q])};function j(q,p,r){r=r||"round";return p?Math[r](q/p)*p:q}c.containDrag=function(v,u,s){if(!this.options.containment){return u}var t=v=="x"?"width":"height";var q=this.relativeStartPosition[v];var r=j(-q,s,"ceil");var p=this.containSize[t];p=j(p,s,"floor");return Math.min(p,Math.max(r,u))};c.pointerUp=function(p,q){this.element.classList.remove("is-pointer-down");this.dispatchEvent("pointerUp",p,[q]);this._dragPointerUp(p,q)};c.dragEnd=function(p,q){if(!this.isEnabled){return}if(e){this.element.style[e]="";this.setLeftTop()}this.element.classList.remove("is-dragging");this.dispatchEvent("dragEnd",p,[q])};c.animate=function(){if(!this.isDragging){return}this.positionDrag();var q=this;g(function p(){q.animate()})};c.setLeftTop=function(){this.element.style.left=this.position.x+"px";this.element.style.top=this.position.y+"px"};c.positionDrag=function(){this.element.style[e]="translate3d( "+this.dragPoint.x+"px, "+this.dragPoint.y+"px, 0)"};c.staticClick=function(p,q){this.dispatchEvent("staticClick",p,[q])};c.enable=function(){this.isEnabled=true};c.disable=function(){this.isEnabled=false;if(this.isDragging){this.dragEnd()}};c.destroy=function(){this.disable();this.element.style[e]="";this.element.style.left="";this.element.style.top="";this.element.style.position="";this.unbindHandles();if(this.$element){this.$element.removeData("draggabilly")}};c._init=m;if(n&&n.bridget){n.bridget("draggabilly",l)}return l}));