pig-media-server 2001 → 100000

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4c467b3ab2c5feba65b25d38105927960a43c39
4
- data.tar.gz: da7c2c42a06fdb4c9aa02233fcb2902df5d8bc12
3
+ metadata.gz: 31b23c691ff8709fc9196e26ac2fc6515ba47f9f
4
+ data.tar.gz: 047065ed414fe4a50ab640c69251302c5ed923d4
5
5
  SHA512:
6
- metadata.gz: 43e6ba8c48a5ce9e66c761d4ae45a369c8688bc7b00391f989a2487aa02c46e346f13e2846e82a61a443ae019992d5883904fbb79fa574bc3d6ef8f4fe784b9b
7
- data.tar.gz: 9f6435a6e3b7bb8f28da741aa682e5a4e7879e2f9f5709a97e1262db85d6a2368021eb664126774c9d7e115cb4dea956128cbdce75075d26e26b853f1340a744
6
+ metadata.gz: 0f936dd73b41a759fae676089c863b8339aa5354bbca96eca0fbca787633a1e24bc8b7a86794ee722ea2891b498853bab30d5bb5a4ae5c7c1d4a5f9e2ecfc13b
7
+ data.tar.gz: bc6263cec89f0bee87fc858897518c6c7f79a8982d0a0515816a2493285bf571568a62765684faf6419a58564b9506f6d76e793cff2e81cd9e4d51a65ed2d0fc
@@ -47,7 +47,7 @@ export default class SearchBox extends React.Component {
47
47
  return <form onSubmit={(e)=> this.submit(e)}>
48
48
  <input ref='input' defaultValue={query} onChange={()=>{this.change()}}/><button>Search</button>
49
49
  <Link to='/latest'>Latest</Link>
50
- <Link to='/config'>Config</Link>
50
+ <a href='/config'>Config</a>
51
51
  <Recommend state={this.props.state} />
52
52
  <br />
53
53
  {c_list}
@@ -14,7 +14,7 @@ export default class CustomList extends Base {
14
14
  external_fetch(name){
15
15
  if(!!config.data.external_pigs){
16
16
  config.data.external_pigs.forEach((e,i)=>{
17
- if(e.method.indexOf('custom') > 0){
17
+ if(e.method.indexOf('custom') > -1){
18
18
  var query = {};
19
19
  query.i = i;
20
20
  query.method = 'custom';
@@ -1,3 +1,3 @@
1
1
  module PigMediaServer
2
- VERSION = "2001"
2
+ VERSION = "100000"
3
3
  end
@@ -44,5 +44,5 @@ xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:
44
44
  */
45
45
  function(e){function t(e,t,n,r){var o,i,a,u,s,l,p,f,h=t&&t.ownerDocument,v=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==v&&9!==v&&11!==v)return n;if(!r&&((t?t.ownerDocument||t:q)!==M&&R(t),t=t||M,I)){if(11!==v&&(l=ye.exec(e)))if(o=l[1]){if(9===v){if(!(a=t.getElementById(o)))return n;if(a.id===o)return n.push(a),n}else if(h&&(a=h.getElementById(o))&&L(t,a)&&a.id===o)return n.push(a),n}else{if(l[2])return J.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&_.getElementsByClassName&&t.getElementsByClassName)return J.apply(n,t.getElementsByClassName(o)),n}if(_.qsa&&!K[e+" "]&&(!A||!A.test(e))){if(1!==v)h=t,f=e;else if("object"!==t.nodeName.toLowerCase()){for((u=t.getAttribute("id"))?u=u.replace(be,"\\$&"):t.setAttribute("id",u=U),p=x(e),i=p.length,s=de.test(u)?"#"+u:"[id='"+u+"']";i--;)p[i]=s+" "+d(p[i]);f=p.join(","),h=ge.test(e)&&c(t.parentNode)||t}if(f)try{return J.apply(n,h.querySelectorAll(f)),n}catch(m){}finally{u===U&&t.removeAttribute("id")}}}return D(e.replace(ue,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>N.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[U]=!0,e}function o(e){var t=M.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function i(e,t){for(var n=e.split("|"),r=n.length;r--;)N.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Y)-(~e.sourceIndex||Y);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function u(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function s(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var o,i=e([],n.length,t),a=i.length;a--;)n[o=i[a]]&&(n[o]=!(r[o]=n[o]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function p(){}function d(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function f(e,t,n){var r=t.dir,o=n&&"parentNode"===r,i=H++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,a){var u,s,l,c=[F,i];if(a){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||o){if(l=t[U]||(t[U]={}),s=l[t.uniqueID]||(l[t.uniqueID]={}),(u=s[r])&&u[0]===F&&u[1]===i)return c[2]=u[2];if(s[r]=c,c[2]=e(t,n,a))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function v(e,n,r){for(var o=0,i=n.length;i>o;o++)t(e,n[o],r);return r}function m(e,t,n,r,o){for(var i,a=[],u=0,s=e.length,l=null!=t;s>u;u++)(i=e[u])&&(n&&!n(i,r,o)||(a.push(i),l&&t.push(u)));return a}function y(e,t,n,o,i,a){return o&&!o[U]&&(o=y(o)),i&&!i[U]&&(i=y(i,a)),r(function(r,a,u,s){var l,c,p,d=[],f=[],h=a.length,y=r||v(t||"*",u.nodeType?[u]:u,[]),g=!e||!r&&t?y:m(y,d,e,u,s),b=n?i||(r?e:h||o)?[]:a:g;if(n&&n(g,b,u,s),o)for(l=m(b,f),o(l,[],u,s),c=l.length;c--;)(p=l[c])&&(b[f[c]]=!(g[f[c]]=p));if(r){if(i||e){if(i){for(l=[],c=b.length;c--;)(p=b[c])&&l.push(g[c]=p);i(null,b=[],l,s)}for(c=b.length;c--;)(p=b[c])&&(l=i?ee(r,p):d[c])>-1&&(r[l]=!(a[l]=p))}}else b=m(b===a?b.splice(h,b.length):b),i?i(null,a,b,s):J.apply(a,b)})}function g(e){for(var t,n,r,o=e.length,i=N.relative[e[0].type],a=i||N.relative[" "],u=i?1:0,s=f(function(e){return e===t},a,!0),l=f(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var o=!i&&(r||n!==k)||((t=n).nodeType?s(e,n,r):l(e,n,r));return t=null,o}];o>u;u++)if(n=N.relative[e[u].type])c=[f(h(c),n)];else{if(n=N.filter[e[u].type].apply(null,e[u].matches),n[U]){for(r=++u;o>r&&!N.relative[e[r].type];r++);return y(u>1&&h(c),u>1&&d(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(ue,"$1"),n,r>u&&g(e.slice(u,r)),o>r&&g(e=e.slice(r)),o>r&&d(e))}c.push(n)}return h(c)}function b(e,n){var o=n.length>0,i=e.length>0,a=function(r,a,u,s,l){var c,p,d,f=0,h="0",v=r&&[],y=[],g=k,b=r||i&&N.find.TAG("*",l),E=F+=null==g?1:Math.random()||.1,_=b.length;for(l&&(k=a===M||a||l);h!==_&&null!=(c=b[h]);h++){if(i&&c){for(p=0,a||c.ownerDocument===M||(R(c),u=!I);d=e[p++];)if(d(c,a||M,u)){s.push(c);break}l&&(F=E)}o&&((c=!d&&c)&&f--,r&&v.push(c))}if(f+=h,o&&h!==f){for(p=0;d=n[p++];)d(v,y,a,u);if(r){if(f>0)for(;h--;)v[h]||y[h]||(y[h]=G.call(s));y=m(y)}J.apply(s,y),l&&!r&&y.length>0&&f+n.length>1&&t.uniqueSort(s)}return l&&(F=E,k=g),v};return o?r(a):a}var E,_,N,w,O,x,C,D,k,T,P,R,M,S,I,A,j,V,L,U="sizzle"+1*new Date,q=e.document,F=0,H=0,B=n(),W=n(),K=n(),$=function(e,t){return e===t&&(P=!0),0},Y=1<<31,z={}.hasOwnProperty,X=[],G=X.pop,Q=X.push,J=X.push,Z=X.slice,ee=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",ie=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",ae=new RegExp(ne+"+","g"),ue=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),se=new RegExp("^"+ne+"*,"+ne+"*"),le=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),pe=new RegExp(ie),de=new RegExp("^"+re+"$"),fe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ve=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ge=/[+~]/,be=/'|\\/g,Ee=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),_e=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Ne=function(){R()};try{J.apply(X=Z.call(q.childNodes),q.childNodes),X[q.childNodes.length].nodeType}catch(we){J={apply:X.length?function(e,t){Q.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}_=t.support={},O=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},R=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:q;return r!==M&&9===r.nodeType&&r.documentElement?(M=r,S=M.documentElement,I=!O(M),(n=M.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ne,!1):n.attachEvent&&n.attachEvent("onunload",Ne)),_.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),_.getElementsByTagName=o(function(e){return e.appendChild(M.createComment("")),!e.getElementsByTagName("*").length}),_.getElementsByClassName=me.test(M.getElementsByClassName),_.getById=o(function(e){return S.appendChild(e).id=U,!M.getElementsByName||!M.getElementsByName(U).length}),_.getById?(N.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&I){var n=t.getElementById(e);return n?[n]:[]}},N.filter.ID=function(e){var t=e.replace(Ee,_e);return function(e){return e.getAttribute("id")===t}}):(delete N.find.ID,N.filter.ID=function(e){var t=e.replace(Ee,_e);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),N.find.TAG=_.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):_.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},N.find.CLASS=_.getElementsByClassName&&function(e,t){return"undefined"!=typeof t.getElementsByClassName&&I?t.getElementsByClassName(e):void 0},j=[],A=[],(_.qsa=me.test(M.querySelectorAll))&&(o(function(e){S.appendChild(e).innerHTML="<a id='"+U+"'></a><select id='"+U+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&A.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||A.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+U+"-]").length||A.push("~="),e.querySelectorAll(":checked").length||A.push(":checked"),e.querySelectorAll("a#"+U+"+*").length||A.push(".#.+[+~]")}),o(function(e){var t=M.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&A.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||A.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),A.push(",.*:")})),(_.matchesSelector=me.test(V=S.matches||S.webkitMatchesSelector||S.mozMatchesSelector||S.oMatchesSelector||S.msMatchesSelector))&&o(function(e){_.disconnectedMatch=V.call(e,"div"),V.call(e,"[s!='']:x"),j.push("!=",ie)}),A=A.length&&new RegExp(A.join("|")),j=j.length&&new RegExp(j.join("|")),t=me.test(S.compareDocumentPosition),L=t||me.test(S.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},$=t?function(e,t){if(e===t)return P=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!_.sortDetached&&t.compareDocumentPosition(e)===n?e===M||e.ownerDocument===q&&L(q,e)?-1:t===M||t.ownerDocument===q&&L(q,t)?1:T?ee(T,e)-ee(T,t):0:4&n?-1:1)}:function(e,t){if(e===t)return P=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,u=[e],s=[t];if(!o||!i)return e===M?-1:t===M?1:o?-1:i?1:T?ee(T,e)-ee(T,t):0;if(o===i)return a(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;u[r]===s[r];)r++;return r?a(u[r],s[r]):u[r]===q?-1:s[r]===q?1:0},M):M},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==M&&R(e),n=n.replace(ce,"='$1']"),_.matchesSelector&&I&&!K[n+" "]&&(!j||!j.test(n))&&(!A||!A.test(n)))try{var r=V.call(e,n);if(r||_.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(o){}return t(n,M,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==M&&R(e),L(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==M&&R(e);var n=N.attrHandle[t.toLowerCase()],r=n&&z.call(N.attrHandle,t.toLowerCase())?n(e,t,!I):void 0;return void 0!==r?r:_.attributes||!I?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,o=0;if(P=!_.detectDuplicates,T=!_.sortStable&&e.slice(0),e.sort($),P){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return T=null,e},w=t.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=w(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=w(t);return n},N=t.selectors={cacheLength:50,createPseudo:r,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Ee,_e),e[3]=(e[3]||e[4]||e[5]||"").replace(Ee,_e),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return fe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&pe.test(n)&&(t=x(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Ee,_e).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=B[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&B(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(o){var i=t.attr(o,e);return null==i?"!="===n:n?(i+="","="===n?i===r:"!="===n?i!==r:"^="===n?r&&0===i.indexOf(r):"*="===n?r&&i.indexOf(r)>-1:"$="===n?r&&i.slice(-r.length)===r:"~="===n?(" "+i.replace(ae," ")+" ").indexOf(r)>-1:"|="===n?i===r||i.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),a="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,s){var l,c,p,d,f,h,v=i!==a?"nextSibling":"previousSibling",m=t.parentNode,y=u&&t.nodeName.toLowerCase(),g=!s&&!u,b=!1;if(m){if(i){for(;v;){for(d=t;d=d[v];)if(u?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=v="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&g){for(d=m,p=d[U]||(d[U]={}),c=p[d.uniqueID]||(p[d.uniqueID]={}),l=c[e]||[],f=l[0]===F&&l[1],b=f&&l[2],d=f&&m.childNodes[f];d=++f&&d&&d[v]||(b=f=0)||h.pop();)if(1===d.nodeType&&++b&&d===t){c[e]=[F,f,b];break}}else if(g&&(d=t,p=d[U]||(d[U]={}),c=p[d.uniqueID]||(p[d.uniqueID]={}),l=c[e]||[],f=l[0]===F&&l[1],b=f),b===!1)for(;(d=++f&&d&&d[v]||(b=f=0)||h.pop())&&((u?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++b||(g&&(p=d[U]||(d[U]={}),c=p[d.uniqueID]||(p[d.uniqueID]={}),c[e]=[F,b]),d!==t)););return b-=o,b===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,n){var o,i=N.pseudos[e]||N.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return i[U]?i(n):i.length>1?(o=[e,e,"",n],N.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,o=i(e,n),a=o.length;a--;)r=ee(e,o[a]),e[r]=!(t[r]=o[a])}):function(e){return i(e,0,o)}):i}},pseudos:{not:r(function(e){var t=[],n=[],o=C(e.replace(ue,"$1"));return o[U]?r(function(e,t,n,r){for(var i,a=o(e,null,r,[]),u=e.length;u--;)(i=a[u])&&(e[u]=!(t[u]=i))}):function(e,r,i){return t[0]=e,o(t,null,i,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(Ee,_e),function(t){return(t.textContent||t.innerText||w(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(Ee,_e).toLowerCase(),function(t){var n;do if(n=I?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===S},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!N.pseudos.empty(e)},header:function(e){return ve.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[0>n?n+t:n]}),even:l(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},N.pseudos.nth=N.pseudos.eq;for(E in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})N.pseudos[E]=u(E);for(E in{submit:!0,reset:!0})N.pseudos[E]=s(E);return p.prototype=N.filters=N.pseudos,N.setFilters=new p,x=t.tokenize=function(e,n){var r,o,i,a,u,s,l,c=W[e+" "];if(c)return n?0:c.slice(0);for(u=e,s=[],l=N.preFilter;u;){r&&!(o=se.exec(u))||(o&&(u=u.slice(o[0].length)||u),s.push(i=[])),r=!1,(o=le.exec(u))&&(r=o.shift(),i.push({value:r,type:o[0].replace(ue," ")}),u=u.slice(r.length));for(a in N.filter)!(o=fe[a].exec(u))||l[a]&&!(o=l[a](o))||(r=o.shift(),i.push({value:r,type:a,matches:o}),u=u.slice(r.length));if(!r)break}return n?u.length:u?t.error(e):W(e,s).slice(0)},C=t.compile=function(e,t){var n,r=[],o=[],i=K[e+" "];if(!i){for(t||(t=x(e)),n=t.length;n--;)i=g(t[n]),i[U]?r.push(i):o.push(i);i=K(e,b(o,r)),i.selector=e}return i},D=t.select=function(e,t,n,r){var o,i,a,u,s,l="function"==typeof e&&e,p=!r&&x(e=l.selector||e);if(n=n||[],1===p.length){if(i=p[0]=p[0].slice(0),i.length>2&&"ID"===(a=i[0]).type&&_.getById&&9===t.nodeType&&I&&N.relative[i[1].type]){if(t=(N.find.ID(a.matches[0].replace(Ee,_e),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=fe.needsContext.test(e)?0:i.length;o--&&(a=i[o],!N.relative[u=a.type]);)if((s=N.find[u])&&(r=s(a.matches[0].replace(Ee,_e),ge.test(i[0].type)&&c(t.parentNode)||t))){if(i.splice(o,1),e=r.length&&d(i),!e)return J.apply(n,r),n;break}}return(l||C(e,p))(r,t,!I,n,!t||ge.test(e)&&c(t.parentNode)||t),n},_.sortStable=U.split("").sort($).join("")===U,_.detectDuplicates=!!P,R(),_.sortDetached=o(function(e){return 1&e.compareDocumentPosition(M.createElement("div"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||i("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),_.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||i("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||i(te,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(n);le.find=he,le.expr=he.selectors,le.expr[":"]=le.expr.pseudos,le.uniqueSort=le.unique=he.uniqueSort,le.text=he.getText,le.isXMLDoc=he.isXML,le.contains=he.contains;var ve=function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&le(e).is(n))break;r.push(e)}return r},me=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},ye=le.expr.match.needsContext,ge=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,be=/^.[^:#\[\.,]*$/;le.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?le.find.matchesSelector(r,e)?[r]:[]:le.find.matches(e,le.grep(t,function(e){return 1===e.nodeType}))},le.fn.extend({find:function(e){var t,n=this.length,r=[],o=this;if("string"!=typeof e)return this.pushStack(le(e).filter(function(){for(t=0;n>t;t++)if(le.contains(o[t],this))return!0}));for(t=0;n>t;t++)le.find(e,o[t],r);return r=this.pushStack(n>1?le.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(u(this,e||[],!1))},not:function(e){return this.pushStack(u(this,e||[],!0))},is:function(e){return!!u(this,"string"==typeof e&&ye.test(e)?le(e):e||[],!1).length}});var Ee,_e=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,Ne=le.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:_e.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof le?t[0]:t,le.merge(this,le.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:Z,!0)),ge.test(r[1])&&le.isPlainObject(t))for(r in t)le.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return o=Z.getElementById(r[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=Z,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):le.isFunction(e)?void 0!==n.ready?n.ready(e):e(le):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),le.makeArray(e,this))};Ne.prototype=le.fn,Ee=le(Z);var we=/^(?:parents|prev(?:Until|All))/,Oe={children:!0,contents:!0,next:!0,prev:!0};le.fn.extend({has:function(e){var t=le(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(le.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,o=this.length,i=[],a=ye.test(e)||"string"!=typeof e?le(e,t||this.context):0;o>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&le.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?le.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?re.call(le(e),this[0]):re.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(le.uniqueSort(le.merge(this.get(),le(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),le.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ve(e,"parentNode")},parentsUntil:function(e,t,n){return ve(e,"parentNode",n)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},nextAll:function(e){return ve(e,"nextSibling")},prevAll:function(e){return ve(e,"previousSibling")},nextUntil:function(e,t,n){return ve(e,"nextSibling",n)},prevUntil:function(e,t,n){return ve(e,"previousSibling",n)},siblings:function(e){return me((e.parentNode||{}).firstChild,e)},children:function(e){return me(e.firstChild)},contents:function(e){return e.contentDocument||le.merge([],e.childNodes)}},function(e,t){le.fn[e]=function(n,r){var o=le.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=le.filter(r,o)),this.length>1&&(Oe[e]||le.uniqueSort(o),we.test(e)&&o.reverse()),this.pushStack(o)}});var xe=/\S+/g;le.Callbacks=function(e){e="string"==typeof e?l(e):le.extend({},e);var t,n,r,o,i=[],a=[],u=-1,s=function(){for(o=e.once,r=t=!0;a.length;u=-1)for(n=a.shift();++u<i.length;)i[u].apply(n[0],n[1])===!1&&e.stopOnFalse&&(u=i.length,n=!1);e.memory||(n=!1),t=!1,o&&(i=n?[]:"")},c={add:function(){return i&&(n&&!t&&(u=i.length-1,a.push(n)),function r(t){le.each(t,function(t,n){le.isFunction(n)?e.unique&&c.has(n)||i.push(n):n&&n.length&&"string"!==le.type(n)&&r(n)})}(arguments),n&&!t&&s()),this},remove:function(){return le.each(arguments,function(e,t){for(var n;(n=le.inArray(t,i,n))>-1;)i.splice(n,1),u>=n&&u--}),this},has:function(e){return e?le.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=a=[],n||(i=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||s()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},le.extend({Deferred:function(e){var t=[["resolve","done",le.Callbacks("once memory"),"resolved"],["reject","fail",le.Callbacks("once memory"),"rejected"],["notify","progress",le.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return le.Deferred(function(n){le.each(t,function(t,i){var a=le.isFunction(e[t])&&e[t];o[i[1]](function(){var e=a&&a.apply(this,arguments);e&&le.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?le.extend(e,r):r}},o={};return r.pipe=r.then,le.each(t,function(e,i){var a=i[2],u=i[3];r[i[1]]=a.add,u&&a.add(function(){n=u},t[1^e][2].disable,t[2][2].lock),o[i[0]]=function(){return o[i[0]+"With"](this===o?r:this,arguments),this},o[i[0]+"With"]=a.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(e){var t,n,r,o=0,i=ee.call(arguments),a=i.length,u=1!==a||e&&le.isFunction(e.promise)?a:0,s=1===u?e:le.Deferred(),l=function(e,n,r){return function(o){n[e]=this,r[e]=arguments.length>1?ee.call(arguments):o,r===t?s.notifyWith(n,r):--u||s.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);a>o;o++)i[o]&&le.isFunction(i[o].promise)?i[o].promise().progress(l(o,n,t)).done(l(o,r,i)).fail(s.reject):--u;return u||s.resolveWith(r,i),s.promise()}});var Ce;le.fn.ready=function(e){return le.ready.promise().done(e),this},le.extend({isReady:!1,readyWait:1,holdReady:function(e){e?le.readyWait++:le.ready(!0)},ready:function(e){(e===!0?--le.readyWait:le.isReady)||(le.isReady=!0,e!==!0&&--le.readyWait>0||(Ce.resolveWith(Z,[le]),le.fn.triggerHandler&&(le(Z).triggerHandler("ready"),le(Z).off("ready"))))}}),le.ready.promise=function(e){return Ce||(Ce=le.Deferred(),"complete"===Z.readyState||"loading"!==Z.readyState&&!Z.documentElement.doScroll?n.setTimeout(le.ready):(Z.addEventListener("DOMContentLoaded",c),n.addEventListener("load",c))),Ce.promise(e)},le.ready.promise();var De=function(e,t,n,r,o,i,a){var u=0,s=e.length,l=null==n;if("object"===le.type(n)){o=!0;for(u in n)De(e,t,u,n[u],!0,i,a)}else if(void 0!==r&&(o=!0,le.isFunction(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(le(e),n)})),t))for(;s>u;u++)t(e[u],n,a?r:r.call(e[u],u,t(e[u],n)));return o?e:l?t.call(e):s?t(e[0],n):i},ke=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};p.uid=1,p.prototype={register:function(e,t){var n=t||{};return e.nodeType?e[this.expando]=n:Object.defineProperty(e,this.expando,{value:n,writable:!0,configurable:!0}),e[this.expando]},cache:function(e){if(!ke(e))return{};var t=e[this.expando];return t||(t={},ke(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,o=this.cache(e);if("string"==typeof t)o[t]=n;else for(r in t)o[r]=t[r];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?(r=this.get(e,t),void 0!==r?r:this.get(e,le.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,o,i=e[this.expando];if(void 0!==i){if(void 0===t)this.register(e);else{le.isArray(t)?r=t.concat(t.map(le.camelCase)):(o=le.camelCase(t),t in i?r=[t,o]:(r=o,r=r in i?[r]:r.match(xe)||[])),n=r.length;for(;n--;)delete i[r[n]]}(void 0===t||le.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!le.isEmptyObject(t)}};var Te=new p,Pe=new p,Re=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Me=/[A-Z]/g;le.extend({hasData:function(e){return Pe.hasData(e)||Te.hasData(e)},data:function(e,t,n){return Pe.access(e,t,n)},removeData:function(e,t){Pe.remove(e,t)},_data:function(e,t,n){return Te.access(e,t,n)},_removeData:function(e,t){Te.remove(e,t)}}),le.fn.extend({data:function(e,t){var n,r,o,i=this[0],a=i&&i.attributes;if(void 0===e){if(this.length&&(o=Pe.get(i),1===i.nodeType&&!Te.get(i,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=le.camelCase(r.slice(5)),d(i,r,o[r])));Te.set(i,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){Pe.set(this,e)}):De(this,function(t){var n,r;if(i&&void 0===t){if(n=Pe.get(i,e)||Pe.get(i,e.replace(Me,"-$&").toLowerCase()),void 0!==n)return n;if(r=le.camelCase(e),n=Pe.get(i,r),void 0!==n)return n;if(n=d(i,r,void 0),void 0!==n)return n}else r=le.camelCase(e),this.each(function(){var n=Pe.get(this,r);Pe.set(this,r,t),e.indexOf("-")>-1&&void 0!==n&&Pe.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Pe.remove(this,e)})}}),le.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=Te.get(e,t),n&&(!r||le.isArray(n)?r=Te.access(e,t,le.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=le.queue(e,t),r=n.length,o=n.shift(),i=le._queueHooks(e,t),a=function(){le.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,a,i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Te.get(e,n)||Te.access(e,n,{empty:le.Callbacks("once memory").add(function(){Te.remove(e,[t+"queue",n])})})}}),le.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?le.queue(this[0],e):void 0===t?this:this.each(function(){var n=le.queue(this,e,t);le._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&le.dequeue(this,e)})},dequeue:function(e){return this.each(function(){le.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,o=le.Deferred(),i=this,a=this.length,u=function(){--r||o.resolveWith(i,[i])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)n=Te.get(i[a],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(u));return u(),o.promise(t)}});var Se=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ie=new RegExp("^(?:([+-])=|)("+Se+")([a-z%]*)$","i"),Ae=["Top","Right","Bottom","Left"],je=function(e,t){return e=t||e,"none"===le.css(e,"display")||!le.contains(e.ownerDocument,e)},Ve=/^(?:checkbox|radio)$/i,Le=/<([\w:-]+)/,Ue=/^$|\/(?:java|ecma)script/i,qe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};qe.optgroup=qe.option,qe.tbody=qe.tfoot=qe.colgroup=qe.caption=qe.thead,qe.th=qe.td;var Fe=/<|&#?\w+;/;!function(){var e=Z.createDocumentFragment(),t=e.appendChild(Z.createElement("div")),n=Z.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ue.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ue.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var He=/^key/,Be=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,We=/^([^.]*)(?:\.(.+)|)/;le.event={global:{},add:function(e,t,n,r,o){var i,a,u,s,l,c,p,d,f,h,v,m=Te.get(e);if(m)for(n.handler&&(i=n,n=i.handler,o=i.selector),n.guid||(n.guid=le.guid++),(s=m.events)||(s=m.events={}),(a=m.handle)||(a=m.handle=function(t){return"undefined"!=typeof le&&le.event.triggered!==t.type?le.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(xe)||[""],l=t.length;l--;)u=We.exec(t[l])||[],f=v=u[1],h=(u[2]||"").split(".").sort(),f&&(p=le.event.special[f]||{},f=(o?p.delegateType:p.bindType)||f,p=le.event.special[f]||{},c=le.extend({type:f,origType:v,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&le.expr.match.needsContext.test(o),namespace:h.join(".")},i),(d=s[f])||(d=s[f]=[],d.delegateCount=0,p.setup&&p.setup.call(e,r,h,a)!==!1||e.addEventListener&&e.addEventListener(f,a)),p.add&&(p.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,c):d.push(c),le.event.global[f]=!0)},remove:function(e,t,n,r,o){var i,a,u,s,l,c,p,d,f,h,v,m=Te.hasData(e)&&Te.get(e);if(m&&(s=m.events)){for(t=(t||"").match(xe)||[""],l=t.length;l--;)if(u=We.exec(t[l])||[],f=v=u[1],h=(u[2]||"").split(".").sort(),f){for(p=le.event.special[f]||{},f=(r?p.delegateType:p.bindType)||f,d=s[f]||[],u=u[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=i=d.length;i--;)c=d[i],!o&&v!==c.origType||n&&n.guid!==c.guid||u&&!u.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(i,1),
46
46
  c.selector&&d.delegateCount--,p.remove&&p.remove.call(e,c));a&&!d.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||le.removeEvent(e,f,m.handle),delete s[f])}else for(f in s)le.event.remove(e,f+t[l],n,r,!0);le.isEmptyObject(s)&&Te.remove(e,"handle events")}},dispatch:function(e){e=le.event.fix(e);var t,n,r,o,i,a=[],u=ee.call(arguments),s=(Te.get(this,"events")||{})[e.type]||[],l=le.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=le.event.handlers.call(this,e,s),t=0;(o=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(i.namespace)||(e.handleObj=i,e.data=i.data,r=((le.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,o,i,a=[],u=t.delegateCount,s=e.target;if(u&&s.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;s!==this;s=s.parentNode||this)if(1===s.nodeType&&(s.disabled!==!0||"click"!==e.type)){for(r=[],n=0;u>n;n++)i=t[n],o=i.selector+" ",void 0===r[o]&&(r[o]=i.needsContext?le(o,this).index(s)>-1:le.find(o,this,null,[s]).length),r[o]&&r.push(i);r.length&&a.push({elem:s,handlers:r})}return u<t.length&&a.push({elem:this,handlers:t.slice(u)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,o,i=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||Z,r=n.documentElement,o=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||o&&o.scrollLeft||0)-(r&&r.clientLeft||o&&o.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||o&&o.scrollTop||0)-(r&&r.clientTop||o&&o.clientTop||0)),e.which||void 0===i||(e.which=1&i?1:2&i?3:4&i?2:0),e}},fix:function(e){if(e[le.expando])return e;var t,n,r,o=e.type,i=e,a=this.fixHooks[o];for(a||(this.fixHooks[o]=a=Be.test(o)?this.mouseHooks:He.test(o)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new le.Event(i),t=r.length;t--;)n=r[t],e[n]=i[n];return e.target||(e.target=Z),3===e.target.nodeType&&(e.target=e.target.parentNode),a.filter?a.filter(e,i):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==b()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===b()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&le.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return le.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},le.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},le.Event=function(e,t){return this instanceof le.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?y:g):this.type=e,t&&le.extend(this,t),this.timeStamp=e&&e.timeStamp||le.now(),void(this[le.expando]=!0)):new le.Event(e,t)},le.Event.prototype={constructor:le.Event,isDefaultPrevented:g,isPropagationStopped:g,isImmediatePropagationStopped:g,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=y,e&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=y,e&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=y,e&&e.stopImmediatePropagation(),this.stopPropagation()}},le.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){le.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,o=e.relatedTarget,i=e.handleObj;return o&&(o===r||le.contains(r,o))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),le.fn.extend({on:function(e,t,n,r){return E(this,e,t,n,r)},one:function(e,t,n,r){return E(this,e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,le(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return t!==!1&&"function"!=typeof t||(n=t,t=void 0),n===!1&&(n=g),this.each(function(){le.event.remove(this,e,n,t)})}});var Ke=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,$e=/<script|<style|<link/i,Ye=/checked\s*(?:[^=]|=\s*.checked.)/i,ze=/^true\/(.*)/,Xe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;le.extend({htmlPrefilter:function(e){return e.replace(Ke,"<$1></$2>")},clone:function(e,t,n){var r,o,i,a,u=e.cloneNode(!0),s=le.contains(e.ownerDocument,e);if(!(ue.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||le.isXMLDoc(e)))for(a=h(u),i=h(e),r=0,o=i.length;o>r;r++)x(i[r],a[r]);if(t)if(n)for(i=i||h(e),a=a||h(u),r=0,o=i.length;o>r;r++)O(i[r],a[r]);else O(e,u);return a=h(u,"script"),a.length>0&&v(a,!s&&h(e,"script")),u},cleanData:function(e){for(var t,n,r,o=le.event.special,i=0;void 0!==(n=e[i]);i++)if(ke(n)){if(t=n[Te.expando]){if(t.events)for(r in t.events)o[r]?le.event.remove(n,r):le.removeEvent(n,r,t.handle);n[Te.expando]=void 0}n[Pe.expando]&&(n[Pe.expando]=void 0)}}}),le.fn.extend({domManip:C,detach:function(e){return D(this,e,!0)},remove:function(e){return D(this,e)},text:function(e){return De(this,function(e){return void 0===e?le.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return C(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=_(this,e);t.appendChild(e)}})},prepend:function(){return C(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=_(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return C(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return C(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(le.cleanData(h(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return le.clone(this,e,t)})},html:function(e){return De(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!$e.test(e)&&!qe[(Le.exec(e)||["",""])[1].toLowerCase()]){e=le.htmlPrefilter(e);try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(le.cleanData(h(t,!1)),t.innerHTML=e);t=0}catch(o){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return C(this,arguments,function(t){var n=this.parentNode;le.inArray(this,e)<0&&(le.cleanData(h(this)),n&&n.replaceChild(t,this))},e)}}),le.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){le.fn[e]=function(e){for(var n,r=[],o=le(e),i=o.length-1,a=0;i>=a;a++)n=a===i?this:this.clone(!0),le(o[a])[t](n),ne.apply(r,n.get());return this.pushStack(r)}});var Ge,Qe={HTML:"block",BODY:"block"},Je=/^margin/,Ze=new RegExp("^("+Se+")(?!px)[a-z%]+$","i"),et=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},tt=function(e,t,n,r){var o,i,a={};for(i in t)a[i]=e.style[i],e.style[i]=t[i];o=n.apply(e,r||[]);for(i in t)e.style[i]=a[i];return o},nt=Z.documentElement;!function(){function e(){u.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",u.innerHTML="",nt.appendChild(a);var e=n.getComputedStyle(u);t="1%"!==e.top,i="2px"===e.marginLeft,r="4px"===e.width,u.style.marginRight="50%",o="4px"===e.marginRight,nt.removeChild(a)}var t,r,o,i,a=Z.createElement("div"),u=Z.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",ue.clearCloneStyle="content-box"===u.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(u),le.extend(ue,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return null==r&&e(),r},pixelMarginRight:function(){return null==r&&e(),o},reliableMarginLeft:function(){return null==r&&e(),i},reliableMarginRight:function(){var e,t=u.appendChild(Z.createElement("div"));return t.style.cssText=u.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",u.style.width="1px",nt.appendChild(a),e=!parseFloat(n.getComputedStyle(t).marginRight),nt.removeChild(a),u.removeChild(t),e}}))}();var rt=/^(none|table(?!-c[ea]).+)/,ot={position:"absolute",visibility:"hidden",display:"block"},it={letterSpacing:"0",fontWeight:"400"},at=["Webkit","O","Moz","ms"],ut=Z.createElement("div").style;le.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=P(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,i,a,u=le.camelCase(t),s=e.style;return t=le.cssProps[u]||(le.cssProps[u]=M(u)||u),a=le.cssHooks[t]||le.cssHooks[u],void 0===n?a&&"get"in a&&void 0!==(o=a.get(e,!1,r))?o:s[t]:(i=typeof n,"string"===i&&(o=Ie.exec(n))&&o[1]&&(n=f(e,t,o),i="number"),null!=n&&n===n&&("number"===i&&(n+=o&&o[3]||(le.cssNumber[u]?"":"px")),ue.clearCloneStyle||""!==n||0!==t.indexOf("background")||(s[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(s[t]=n)),void 0)}},css:function(e,t,n,r){var o,i,a,u=le.camelCase(t);return t=le.cssProps[u]||(le.cssProps[u]=M(u)||u),a=le.cssHooks[t]||le.cssHooks[u],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=P(e,t,r)),"normal"===o&&t in it&&(o=it[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),le.each(["height","width"],function(e,t){le.cssHooks[t]={get:function(e,n,r){return n?rt.test(le.css(e,"display"))&&0===e.offsetWidth?tt(e,ot,function(){return A(e,t,r)}):A(e,t,r):void 0},set:function(e,n,r){var o,i=r&&et(e),a=r&&I(e,t,r,"border-box"===le.css(e,"boxSizing",!1,i),i);return a&&(o=Ie.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=le.css(e,t)),S(e,n,a)}}}),le.cssHooks.marginLeft=R(ue.reliableMarginLeft,function(e,t){return t?(parseFloat(P(e,"marginLeft"))||e.getBoundingClientRect().left-tt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px":void 0}),le.cssHooks.marginRight=R(ue.reliableMarginRight,function(e,t){return t?tt(e,{display:"inline-block"},P,[e,"marginRight"]):void 0}),le.each({margin:"",padding:"",border:"Width"},function(e,t){le.cssHooks[e+t]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];4>r;r++)o[e+Ae[r]+t]=i[r]||i[r-2]||i[0];return o}},Je.test(e)||(le.cssHooks[e+t].set=S)}),le.fn.extend({css:function(e,t){return De(this,function(e,t,n){var r,o,i={},a=0;if(le.isArray(t)){for(r=et(e),o=t.length;o>a;a++)i[t[a]]=le.css(e,t[a],!1,r);return i}return void 0!==n?le.style(e,t,n):le.css(e,t)},e,t,arguments.length>1)},show:function(){return j(this,!0)},hide:function(){return j(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){je(this)?le(this).show():le(this).hide()})}}),le.Tween=V,V.prototype={constructor:V,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||le.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(le.cssNumber[n]?"":"px")},cur:function(){var e=V.propHooks[this.prop];return e&&e.get?e.get(this):V.propHooks._default.get(this)},run:function(e){var t,n=V.propHooks[this.prop];return this.options.duration?this.pos=t=le.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):V.propHooks._default.set(this),this}},V.prototype.init.prototype=V.prototype,V.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=le.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){le.fx.step[e.prop]?le.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[le.cssProps[e.prop]]&&!le.cssHooks[e.prop]?e.elem[e.prop]=e.now:le.style(e.elem,e.prop,e.now+e.unit)}}},V.propHooks.scrollTop=V.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},le.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},le.fx=V.prototype.init,le.fx.step={};var st,lt,ct=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;le.Animation=le.extend(B,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return f(n.elem,e,Ie.exec(t),n),n}]},tweener:function(e,t){le.isFunction(e)?(t=e,e=["*"]):e=e.match(xe);for(var n,r=0,o=e.length;o>r;r++)n=e[r],B.tweeners[n]=B.tweeners[n]||[],B.tweeners[n].unshift(t)},prefilters:[F],prefilter:function(e,t){t?B.prefilters.unshift(e):B.prefilters.push(e)}}),le.speed=function(e,t,n){var r=e&&"object"==typeof e?le.extend({},e):{complete:n||!n&&t||le.isFunction(e)&&e,duration:e,easing:n&&t||t&&!le.isFunction(t)&&t};return r.duration=le.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in le.fx.speeds?le.fx.speeds[r.duration]:le.fx.speeds._default,null!=r.queue&&r.queue!==!0||(r.queue="fx"),r.old=r.complete,r.complete=function(){le.isFunction(r.old)&&r.old.call(this),r.queue&&le.dequeue(this,r.queue)},r},le.fn.extend({fadeTo:function(e,t,n,r){return this.filter(je).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var o=le.isEmptyObject(e),i=le.speed(t,n,r),a=function(){var t=B(this,le.extend({},e),i);(o||Te.get(this,"finish"))&&t.stop(!0)};return a.finish=a,o||i.queue===!1?this.each(a):this.queue(i.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",i=le.timers,a=Te.get(this);if(o)a[o]&&a[o].stop&&r(a[o]);else for(o in a)a[o]&&a[o].stop&&pt.test(o)&&r(a[o]);for(o=i.length;o--;)i[o].elem!==this||null!=e&&i[o].queue!==e||(i[o].anim.stop(n),t=!1,i.splice(o,1));!t&&n||le.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=Te.get(this),r=n[e+"queue"],o=n[e+"queueHooks"],i=le.timers,a=r?r.length:0;for(n.finish=!0,le.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===e&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),le.each(["toggle","show","hide"],function(e,t){var n=le.fn[t];le.fn[t]=function(e,r,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(U(t,!0),e,r,o)}}),le.each({slideDown:U("show"),slideUp:U("hide"),slideToggle:U("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){le.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),le.timers=[],le.fx.tick=function(){var e,t=0,n=le.timers;for(st=le.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||le.fx.stop(),st=void 0},le.fx.timer=function(e){le.timers.push(e),e()?le.fx.start():le.timers.pop()},le.fx.interval=13,le.fx.start=function(){lt||(lt=n.setInterval(le.fx.tick,le.fx.interval))},le.fx.stop=function(){n.clearInterval(lt),lt=null},le.fx.speeds={slow:600,fast:200,_default:400},le.fn.delay=function(e,t){return e=le.fx?le.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,r){var o=n.setTimeout(t,e);r.stop=function(){n.clearTimeout(o)}})},function(){var e=Z.createElement("input"),t=Z.createElement("select"),n=t.appendChild(Z.createElement("option"));e.type="checkbox",ue.checkOn=""!==e.value,ue.optSelected=n.selected,t.disabled=!0,ue.optDisabled=!n.disabled,e=Z.createElement("input"),e.value="t",e.type="radio",ue.radioValue="t"===e.value}();var dt,ft=le.expr.attrHandle;le.fn.extend({attr:function(e,t){return De(this,le.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){le.removeAttr(this,e)})}}),le.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return"undefined"==typeof e.getAttribute?le.prop(e,t,n):(1===i&&le.isXMLDoc(e)||(t=t.toLowerCase(),o=le.attrHooks[t]||(le.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void le.removeAttr(e,t):o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(r=o.get(e,t))?r:(r=le.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ue.radioValue&&"radio"===t&&le.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,o=0,i=t&&t.match(xe);if(i&&1===e.nodeType)for(;n=i[o++];)r=le.propFix[n]||n,le.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),dt={set:function(e,t,n){return t===!1?le.removeAttr(e,n):e.setAttribute(n,n),n}},le.each(le.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ft[t]||le.find.attr;ft[t]=function(e,t,r){var o,i;return r||(i=ft[t],ft[t]=o,o=null!=n(e,t,r)?t.toLowerCase():null,ft[t]=i),o}});var ht=/^(?:input|select|textarea|button)$/i,vt=/^(?:a|area)$/i;le.fn.extend({prop:function(e,t){return De(this,le.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[le.propFix[e]||e]})}}),le.extend({prop:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&le.isXMLDoc(e)||(t=le.propFix[t]||t,o=le.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=le.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||vt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),ue.optSelected||(le.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),le.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){le.propFix[this.toLowerCase()]=this});var mt=/[\t\r\n\f]/g;le.fn.extend({addClass:function(e){var t,n,r,o,i,a,u,s=0;if(le.isFunction(e))return this.each(function(t){le(this).addClass(e.call(this,t,W(this)))});if("string"==typeof e&&e)for(t=e.match(xe)||[];n=this[s++];)if(o=W(n),r=1===n.nodeType&&(" "+o+" ").replace(mt," ")){for(a=0;i=t[a++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");u=le.trim(r),o!==u&&n.setAttribute("class",u)}return this},removeClass:function(e){var t,n,r,o,i,a,u,s=0;if(le.isFunction(e))return this.each(function(t){le(this).removeClass(e.call(this,t,W(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(xe)||[];n=this[s++];)if(o=W(n),r=1===n.nodeType&&(" "+o+" ").replace(mt," ")){for(a=0;i=t[a++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");u=le.trim(r),o!==u&&n.setAttribute("class",u)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):le.isFunction(e)?this.each(function(n){le(this).toggleClass(e.call(this,n,W(this),t),t)}):this.each(function(){var t,r,o,i;if("string"===n)for(r=0,o=le(this),i=e.match(xe)||[];t=i[r++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||(t=W(this),t&&Te.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Te.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+W(n)+" ").replace(mt," ").indexOf(t)>-1)return!0;return!1}});var yt=/\r/g,gt=/[\x20\t\r\n\f]+/g;le.fn.extend({val:function(e){var t,n,r,o=this[0];{if(arguments.length)return r=le.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=r?e.call(this,n,le(this).val()):e,null==o?o="":"number"==typeof o?o+="":le.isArray(o)&&(o=le.map(o,function(e){return null==e?"":e+""})),t=le.valHooks[this.type]||le.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return t=le.valHooks[o.type]||le.valHooks[o.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(yt,""):null==n?"":n)}}}),le.extend({valHooks:{option:{get:function(e){var t=le.find.attr(e,"value");return null!=t?t:le.trim(le.text(e)).replace(gt," ")}},select:{get:function(e){for(var t,n,r=e.options,o=e.selectedIndex,i="select-one"===e.type||0>o,a=i?null:[],u=i?o+1:r.length,s=0>o?u:i?o:0;u>s;s++)if(n=r[s],(n.selected||s===o)&&(ue.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!le.nodeName(n.parentNode,"optgroup"))){if(t=le(n).val(),i)return t;a.push(t)}return a},set:function(e,t){for(var n,r,o=e.options,i=le.makeArray(t),a=o.length;a--;)r=o[a],(r.selected=le.inArray(le.valHooks.option.get(r),i)>-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),le.each(["radio","checkbox"],function(){le.valHooks[this]={set:function(e,t){return le.isArray(t)?e.checked=le.inArray(le(e).val(),t)>-1:void 0}},ue.checkOn||(le.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var bt=/^(?:focusinfocus|focusoutblur)$/;le.extend(le.event,{trigger:function(e,t,r,o){var i,a,u,s,l,c,p,d=[r||Z],f=ae.call(e,"type")?e.type:e,h=ae.call(e,"namespace")?e.namespace.split("."):[];if(a=u=r=r||Z,3!==r.nodeType&&8!==r.nodeType&&!bt.test(f+le.event.triggered)&&(f.indexOf(".")>-1&&(h=f.split("."),f=h.shift(),h.sort()),l=f.indexOf(":")<0&&"on"+f,e=e[le.expando]?e:new le.Event(f,"object"==typeof e&&e),e.isTrigger=o?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:le.makeArray(t,[e]),p=le.event.special[f]||{},o||!p.trigger||p.trigger.apply(r,t)!==!1)){if(!o&&!p.noBubble&&!le.isWindow(r)){for(s=p.delegateType||f,bt.test(s+f)||(a=a.parentNode);a;a=a.parentNode)d.push(a),u=a;u===(r.ownerDocument||Z)&&d.push(u.defaultView||u.parentWindow||n)}for(i=0;(a=d[i++])&&!e.isPropagationStopped();)e.type=i>1?s:p.bindType||f,c=(Te.get(a,"events")||{})[e.type]&&Te.get(a,"handle"),c&&c.apply(a,t),c=l&&a[l],c&&c.apply&&ke(a)&&(e.result=c.apply(a,t),e.result===!1&&e.preventDefault());return e.type=f,o||e.isDefaultPrevented()||p._default&&p._default.apply(d.pop(),t)!==!1||!ke(r)||l&&le.isFunction(r[f])&&!le.isWindow(r)&&(u=r[l],u&&(r[l]=null),le.event.triggered=f,r[f](),le.event.triggered=void 0,u&&(r[l]=u)),e.result}},simulate:function(e,t,n){var r=le.extend(new le.Event,n,{type:e,isSimulated:!0});le.event.trigger(r,null,t),r.isDefaultPrevented()&&n.preventDefault()}}),le.fn.extend({trigger:function(e,t){return this.each(function(){le.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?le.event.trigger(e,t,n,!0):void 0}}),le.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){le.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),le.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ue.focusin="onfocusin"in n,ue.focusin||le.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){le.event.simulate(t,e.target,le.event.fix(e))};le.event.special[t]={setup:function(){var r=this.ownerDocument||this,o=Te.access(r,t);o||r.addEventListener(e,n,!0),Te.access(r,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this,o=Te.access(r,t)-1;o?Te.access(r,t,o):(r.removeEventListener(e,n,!0),Te.remove(r,t))}}});var Et=n.location,_t=le.now(),Nt=/\?/;le.parseJSON=function(e){return JSON.parse(e+"")},le.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(r){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||le.error("Invalid XML: "+e),t};var wt=/#.*$/,Ot=/([?&])_=[^&]*/,xt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ct=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Dt=/^(?:GET|HEAD)$/,kt=/^\/\//,Tt={},Pt={},Rt="*/".concat("*"),Mt=Z.createElement("a");Mt.href=Et.href,le.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:Ct.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Rt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":le.parseJSON,"text xml":le.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Y(Y(e,le.ajaxSettings),t):Y(le.ajaxSettings,e)},ajaxPrefilter:K(Tt),ajaxTransport:K(Pt),ajax:function(e,t){function r(e,t,r,u){var l,p,g,b,_,w=t;2!==E&&(E=2,s&&n.clearTimeout(s),o=void 0,a=u||"",N.readyState=e>0?4:0,l=e>=200&&300>e||304===e,r&&(b=z(d,N,r)),b=X(d,b,N,l),l?(d.ifModified&&(_=N.getResponseHeader("Last-Modified"),_&&(le.lastModified[i]=_),_=N.getResponseHeader("etag"),_&&(le.etag[i]=_)),204===e||"HEAD"===d.type?w="nocontent":304===e?w="notmodified":(w=b.state,p=b.data,g=b.error,l=!g)):(g=w,!e&&w||(w="error",0>e&&(e=0))),N.status=e,N.statusText=(t||w)+"",l?v.resolveWith(f,[p,w,N]):v.rejectWith(f,[N,w,g]),N.statusCode(y),y=void 0,c&&h.trigger(l?"ajaxSuccess":"ajaxError",[N,d,l?p:g]),m.fireWith(f,[N,w]),c&&(h.trigger("ajaxComplete",[N,d]),--le.active||le.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var o,i,a,u,s,l,c,p,d=le.ajaxSetup({},t),f=d.context||d,h=d.context&&(f.nodeType||f.jquery)?le(f):le.event,v=le.Deferred(),m=le.Callbacks("once memory"),y=d.statusCode||{},g={},b={},E=0,_="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===E){if(!u)for(u={};t=xt.exec(a);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===E?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return E||(e=b[n]=b[n]||e,g[e]=t),this},overrideMimeType:function(e){return E||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>E)for(t in e)y[t]=[y[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||_;return o&&o.abort(t),r(0,t),this}};if(v.promise(N).complete=m.add,N.success=N.done,N.error=N.fail,d.url=((e||d.url||Et.href)+"").replace(wt,"").replace(kt,Et.protocol+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=le.trim(d.dataType||"*").toLowerCase().match(xe)||[""],null==d.crossDomain){l=Z.createElement("a");try{l.href=d.url,l.href=l.href,d.crossDomain=Mt.protocol+"//"+Mt.host!=l.protocol+"//"+l.host}catch(w){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=le.param(d.data,d.traditional)),$(Tt,d,t,N),2===E)return N;c=le.event&&d.global,c&&0===le.active++&&le.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Dt.test(d.type),i=d.url,d.hasContent||(d.data&&(i=d.url+=(Nt.test(i)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Ot.test(i)?i.replace(Ot,"$1_="+_t++):i+(Nt.test(i)?"&":"?")+"_="+_t++)),d.ifModified&&(le.lastModified[i]&&N.setRequestHeader("If-Modified-Since",le.lastModified[i]),le.etag[i]&&N.setRequestHeader("If-None-Match",le.etag[i])),(d.data&&d.hasContent&&d.contentType!==!1||t.contentType)&&N.setRequestHeader("Content-Type",d.contentType),N.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Rt+"; q=0.01":""):d.accepts["*"]);for(p in d.headers)N.setRequestHeader(p,d.headers[p]);if(d.beforeSend&&(d.beforeSend.call(f,N,d)===!1||2===E))return N.abort();_="abort";for(p in{success:1,error:1,complete:1})N[p](d[p]);if(o=$(Pt,d,t,N)){if(N.readyState=1,c&&h.trigger("ajaxSend",[N,d]),2===E)return N;d.async&&d.timeout>0&&(s=n.setTimeout(function(){N.abort("timeout")},d.timeout));try{E=1,o.send(g,r)}catch(w){if(!(2>E))throw w;r(-1,w)}}else r(-1,"No Transport");return N},getJSON:function(e,t,n){return le.get(e,t,n,"json")},getScript:function(e,t){return le.get(e,void 0,t,"script")}}),le.each(["get","post"],function(e,t){le[t]=function(e,n,r,o){return le.isFunction(n)&&(o=o||r,r=n,n=void 0),le.ajax(le.extend({url:e,type:t,dataType:o,data:n,success:r},le.isPlainObject(e)&&e))}}),le._evalUrl=function(e){return le.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},le.fn.extend({wrapAll:function(e){var t;return le.isFunction(e)?this.each(function(t){le(this).wrapAll(e.call(this,t))}):(this[0]&&(t=le(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return le.isFunction(e)?this.each(function(t){le(this).wrapInner(e.call(this,t))}):this.each(function(){var t=le(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=le.isFunction(e);return this.each(function(n){le(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){le.nodeName(this,"body")||le(this).replaceWith(this.childNodes)}).end()}}),le.expr.filters.hidden=function(e){return!le.expr.filters.visible(e)},le.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var St=/%20/g,It=/\[\]$/,At=/\r?\n/g,jt=/^(?:submit|button|image|reset|file)$/i,Vt=/^(?:input|select|textarea|keygen)/i;le.param=function(e,t){var n,r=[],o=function(e,t){t=le.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=le.ajaxSettings&&le.ajaxSettings.traditional),le.isArray(e)||e.jquery&&!le.isPlainObject(e))le.each(e,function(){o(this.name,this.value)});else for(n in e)G(n,e[n],t,o);return r.join("&").replace(St,"+")},le.fn.extend({serialize:function(){return le.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=le.prop(this,"elements");return e?le.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!le(this).is(":disabled")&&Vt.test(this.nodeName)&&!jt.test(e)&&(this.checked||!Ve.test(e))}).map(function(e,t){var n=le(this).val();return null==n?null:le.isArray(n)?le.map(n,function(e){return{name:t.name,value:e.replace(At,"\r\n")}}):{name:t.name,value:n.replace(At,"\r\n")}}).get()}}),le.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Lt={0:200,1223:204},Ut=le.ajaxSettings.xhr();ue.cors=!!Ut&&"withCredentials"in Ut,ue.ajax=Ut=!!Ut,le.ajaxTransport(function(e){var t,r;return ue.cors||Ut&&!e.crossDomain?{send:function(o,i){var a,u=e.xhr();if(u.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)u[a]=e.xhrFields[a];e.mimeType&&u.overrideMimeType&&u.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");
47
- for(a in o)u.setRequestHeader(a,o[a]);t=function(e){return function(){t&&(t=r=u.onload=u.onerror=u.onabort=u.onreadystatechange=null,"abort"===e?u.abort():"error"===e?"number"!=typeof u.status?i(0,"error"):i(u.status,u.statusText):i(Lt[u.status]||u.status,u.statusText,"text"!==(u.responseType||"text")||"string"!=typeof u.responseText?{binary:u.response}:{text:u.responseText},u.getAllResponseHeaders()))}},u.onload=t(),r=u.onerror=t("error"),void 0!==u.onabort?u.onabort=r:u.onreadystatechange=function(){4===u.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{u.send(e.hasContent&&e.data||null)}catch(s){if(t)throw s}},abort:function(){t&&t()}}:void 0}),le.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return le.globalEval(e),e}}}),le.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),le.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,o){t=le("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),Z.head.appendChild(t[0])},abort:function(){n&&n()}}}});var qt=[],Ft=/(=)\?(?=&|$)|\?\?/;le.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=qt.pop()||le.expando+"_"+_t++;return this[e]=!0,e}}),le.ajaxPrefilter("json jsonp",function(e,t,r){var o,i,a,u=e.jsonp!==!1&&(Ft.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ft.test(e.data)&&"data");return u||"jsonp"===e.dataTypes[0]?(o=e.jsonpCallback=le.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,u?e[u]=e[u].replace(Ft,"$1"+o):e.jsonp!==!1&&(e.url+=(Nt.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return a||le.error(o+" was not called"),a[0]},e.dataTypes[0]="json",i=n[o],n[o]=function(){a=arguments},r.always(function(){void 0===i?le(n).removeProp(o):n[o]=i,e[o]&&(e.jsonpCallback=t.jsonpCallback,qt.push(o)),a&&le.isFunction(i)&&i(a[0]),a=i=void 0}),"script"):void 0}),le.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||Z;var r=ge.exec(e),o=!n&&[];return r?[t.createElement(r[1])]:(r=m([e],t,o),o&&o.length&&le(o).remove(),le.merge([],r.childNodes))};var Ht=le.fn.load;le.fn.load=function(e,t,n){if("string"!=typeof e&&Ht)return Ht.apply(this,arguments);var r,o,i,a=this,u=e.indexOf(" ");return u>-1&&(r=le.trim(e.slice(u)),e=e.slice(0,u)),le.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),a.length>0&&le.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){i=arguments,a.html(r?le("<div>").append(le.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(a,i||[e.responseText,t,e])})}),this},le.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){le.fn[t]=function(e){return this.on(t,e)}}),le.expr.filters.animated=function(e){return le.grep(le.timers,function(t){return e===t.elem}).length},le.offset={setOffset:function(e,t,n){var r,o,i,a,u,s,l,c=le.css(e,"position"),p=le(e),d={};"static"===c&&(e.style.position="relative"),u=p.offset(),i=le.css(e,"top"),s=le.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(i+s).indexOf("auto")>-1,l?(r=p.position(),a=r.top,o=r.left):(a=parseFloat(i)||0,o=parseFloat(s)||0),le.isFunction(t)&&(t=t.call(e,n,le.extend({},u))),null!=t.top&&(d.top=t.top-u.top+a),null!=t.left&&(d.left=t.left-u.left+o),"using"in t?t.using.call(e,d):p.css(d)}},le.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){le.offset.setOffset(this,e,t)});var t,n,r=this[0],o={top:0,left:0},i=r&&r.ownerDocument;if(i)return t=i.documentElement,le.contains(t,r)?(o=r.getBoundingClientRect(),n=Q(i),{top:o.top+n.pageYOffset-t.clientTop,left:o.left+n.pageXOffset-t.clientLeft}):o},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===le.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),le.nodeName(e[0],"html")||(r=e.offset()),r.top+=le.css(e[0],"borderTopWidth",!0),r.left+=le.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-le.css(n,"marginTop",!0),left:t.left-r.left-le.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===le.css(e,"position");)e=e.offsetParent;return e||nt})}}),le.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;le.fn[e]=function(r){return De(this,function(e,r,o){var i=Q(e);return void 0===o?i?i[t]:e[r]:void(i?i.scrollTo(n?i.pageXOffset:o,n?o:i.pageYOffset):e[r]=o)},e,r,arguments.length)}}),le.each(["top","left"],function(e,t){le.cssHooks[t]=R(ue.pixelPosition,function(e,n){return n?(n=P(e,t),Ze.test(n)?le(e).position()[t]+"px":n):void 0})}),le.each({Height:"height",Width:"width"},function(e,t){le.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){le.fn[r]=function(r,o){var i=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||o===!0?"margin":"border");return De(this,function(t,n,r){var o;return le.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?le.css(t,n,a):le.style(t,n,r,a)},t,i?r:void 0,i,null)}})}),le.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},size:function(){return this.length}}),le.fn.andSelf=le.fn.addBack,r=[],o=function(){return le}.apply(t,r),!(void 0!==o&&(e.exports=o));var Bt=n.jQuery,Wt=n.$;return le.noConflict=function(e){return n.$===le&&(n.$=Wt),e&&n.jQuery===le&&(n.jQuery=Bt),le},i||(n.jQuery=n.$=le),le})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=n(222),p=r(c),d=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return e.list=[],e.controller=new p["default"],e}return a(t,e),u(t,[{key:"search",value:function(e){this.query=e,this.fetch()}},{key:"paginate",value:function(e){var t=this,n=this.query;n.page=e,jQuery.get("/api/r/search",this.query).done(function(e){t.list=t.list.concat(e),t.dispatchEvent({type:"loaded"}),t.external_fetch()})}},{key:"fetch",value:function(){var e=this;jQuery.get("/api/r/search",this.query).done(function(t){e.list=t,e.dispatchEvent({type:"loaded"}),e.external_fetch()})}},{key:"external_fetch",value:function(){var e=this;config.data.external_pigs&&config.data.external_pigs.forEach(function(t,n){var r=JSON.parse(JSON.stringify(e.query));r.i=n,r.method="search",jQuery.get("/api/r/external",r).done(function(t){e.list=e.list.concat(t),e.sort(),e.dispatchEvent({type:"loaded"})})})}},{key:"sort",value:function(){var e=this.controller.params();switch(e.sort){case"name":this.list=this.list.sort(function(e,t){return t.name>e.name?1:-1}),"ascending"==e.order&&(this.list=this.list.reverse());break;default:this.list=this.list.sort(function(e,t){return t.mtime_to_i-e.mtime_to_i}),"ascending"==e.order&&(this.list=this.list.reverse())}}},{key:"next",value:function(){for(var e=this.list.map(function(e,t){return e.key}).indexOf(playing.item.key),t=null;e>-1&&(e-=1,t=this.list[e],"video"!=t.type););t&&playing.set(t)}}]),t}(l["default"]);t["default"]=d},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){n(this,e),this.listeners={}}return r(e,[{key:"addEventListener",value:function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}},{key:"clearEventListener",value:function(){this.listeners={}}},{key:"dispatchEvent",value:function(e){if(this.listeners[e.type])for(var t in this.listeners[e.type])this.listeners[e.type][t].apply(this.listeners,arguments)}}]),e}();t["default"]=o},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){n(this,e)}return r(e,[{key:"params",value:function(){for(var e=new Object,t=location.search.substring(1).split("&"),n=0;t[n];n++){var r=t[n].split("=");e[r[0]]=r[1]}return e}},{key:"query",value:function(){return this.params().query}},{key:"can_sort_and_paging",value:function(){return"/"==location.pathname?!!this.query():!1}}]),e}();t["default"]=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(224),p=r(c),d=n(225),f=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){return l["default"].createElement("span",{dangerouslySetInnerHTML:{__html:this.props.item.custom_links}})}}]),t}(l["default"].Component),h=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"mtime",value:function(){return this.props.item.mtime}},{key:"size_pretty",value:function(e){var e=parseFloat(String(e)),t=e;return 1024>e?t=e+" Bytes":1048576>e?t=this.round(e/1024)+" KB":1073741824>e?t=this.round(e/1048576)+" MB":1099511627776>e&&(t=this.round(e/1073741824)+" GB"),t}},{key:"round",value:function(e){return e=10*e,Math.round(e)/10}},{key:"render",value:function(){var e=this.props.item,t="/meta/"+this.props.item.key,n="/sub/"+this.props.item.key;return l["default"].createElement("span",{className:"main_span"},l["default"].createElement(p["default"],{item:this.props.item}),l["default"].createElement("a",{href:e.url,className:"main_link"},e.name)," ",l["default"].createElement(d.Watch,{item:this.props.item}),l["default"].createElement(d.ChromeCast,{item:this.props.item}),l["default"].createElement("span",{className:"mtime"},this.mtime())," ",l["default"].createElement("span",{className:"size"},this.size_pretty(e.size))," ",l["default"].createElement("a",{className:"meta",href:t},"Meta"),l["default"].createElement("a",{className:"meta",href:n},"Sub"),l["default"].createElement(f,{item:this.props.item}))}}]),t}(l["default"].Component);t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,e));return recent.addEventListener("loaded",function(){n.reload()}),n}return a(t,e),u(t,[{key:"reload",value:function(){this.setState({})}},{key:"ext",value:function(e){return String(e).split(".").pop().toLowerCase()}},{key:"is_new",value:function(){var e=this,t=this.ext(this.props.item.name);if("mp4"==t||"flv"==t){var n=!0;return jQuery.each(recent.data,function(t,r){t=="movie/"+e.props.item.key&&(n=!1)}),n}return!1}},{key:"render",value:function(){var e=this.is_new();return l["default"].createElement("span",null,e?l["default"].createElement("span",{className:"new_flag",style:{color:"lime",fontWeight:"bold"}},"New"):null)}}]),t}(l["default"].Component);t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"ext",value:function(e){return String(e).split(".").pop().toLowerCase()}},{key:"is_video",value:function(){var e=this.ext(this.props.item.name);return"mp4"==e||"flv"==e}},{key:"click",value:function(){window.chrome_cast(this.props.item.url,this.props.item.key)}},{key:"render",value:function(){var e=this;return l["default"].createElement("span",null,this.is_video()?l["default"].createElement("span",null,l["default"].createElement("a",{className:"watch",href:"javascript:void(0)",title:this.props.item.name,onClick:function(){return e.click()}},"ChromeCast")," "):null)}}]),t}(l["default"].Component),p=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"ext",value:function(e){return String(e).split(".").pop().toLowerCase()}},{key:"is_video",value:function(){var e=this.ext(this.props.item.name);return"mp4"==e||"flv"==e}},{key:"set_video",value:function(){playing.set(this.props.item)}},{key:"render",value:function(){var e=this;return l["default"].createElement("span",null,this.is_video()?l["default"].createElement("span",null,l["default"].createElement("a",{className:"watch",href:"javascript:void(0)",title:this.props.item.name,onClick:function(){return e.set_video()}},"Watch")," "):null)}}]),t}(l["default"].Component);e.exports={Watch:p,ChromeCast:c}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(219),p=r(c),d=n(159),f=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,e));n.page=1;var r=n.props.location.query.page;return r&&(n.page=parseInt(r)),n.bind(),n}return a(t,e),u(t,[{key:"bind",value:function(){}},{key:"prev",value:function(){var e=this.props.location.query,t=this.props.location.query.page;t&&(this.page=parseInt(t)),t-=1,1>t&&(t=1),e.page=t,d.browserHistory.push("/?"+p["default"].param(e))}},{key:"click",value:function(){this.page++;var e=this.props.location.query;e.page=this.page,this.props.list.paginate(this.page),history.pushState("","","/?"+p["default"].param(e))}},{key:"render",value:function(){var e=this;return l["default"].createElement("span",null,this.page>1?l["default"].createElement("a",{href:"javascript:void(0)",onClick:function(){return e.prev()}},"Prev"):null," ",l["default"].createElement("a",{href:"javascript:void(0)",onClick:function(){return e.click()}},"Next"))}}]),t}(l["default"].Component);t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(159),p=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"url",value:function(){return"/?query="+encodeURIComponent(this.props.query)}},{key:"delete_query",value:function(){var e=this;confirm("Really?")&&$.post("/api/r/delete_query_list",{query:this.props.query}).done(function(t){e.props.update_list()})}},{key:"render",value:function(){var e=this;return l["default"].createElement("span",{className:"main_span"},l["default"].createElement(c.Link,{to:this.url()}," ",this.props.query," "),l["default"].createElement("a",{href:"javascript:void(0)",className:"delete",onClick:function(){return e.delete_query()}},"Delete"))}}]),t}(l["default"].Component),d=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,e));return n.state={},n.state.list=[],n}return a(t,e),u(t,[{key:"update_list",value:function(){var e=this;$.get("/api/r/query_list").done(function(t){e.state.list=t,e.setState(e.state)})}},{key:"componentDidMount",value:function(){this.update_list()}},{key:"render",value:function(){var e=this,t=$.map(this.state.list,function(t){return l["default"].createElement(p,{key:t,query:t,state:e.props.state,update_list:function(){return e.update_list()}})});return l["default"].createElement("div",null,t)}}]),t}(l["default"].Component);t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,e));return n.current_url="",n}return a(t,e),u(t,[{key:"close",value:function(){playing.set(null)}},{key:"dom",value:function(){return this.refs.video}},{key:"video",value:function(){return playing.item}},{key:"video_url",value:function(){var e=null;return this.video()&&(e=this.video().url),e}},{key:"to_play",value:function(e){return e&&e!=this.current_url?(this.current_url=e,!0):!1}},{key:"next",value:function(){list&&list.next()}},{key:"play",value:function(e){var t=this;if(this.to_play(this.video_url())){var n=this.dom();n.addEventListener("canplay",function(e){var n=e.target;n.play(),recent.use("movie/"+t.video().key)}),n.addEventListener("ended",function(e){t.next()}),n.load()}}},{key:"size_loop",value:function(){var e=this;if(this.video_url()){var t,n,r=this.dom().videoWidth,o=this.dom().videoHeight,i=$(window).width(),a=$(window).height();parseFloat(o)/parseFloat(r)<parseFloat(a)/parseFloat(i)?(t=i,n=parseInt(parseFloat(o)*(parseFloat(i)/parseFloat(r)))):(t=parseInt(parseFloat(r)*(parseFloat(a)/parseFloat(o))),n=a),t-=10,n-=10;var u=(a-n)/2;$(this.dom()).css({width:t,height:n}),$(this.refs.spacer).css({height:u})}setTimeout(function(){e.size_loop()},200)}},{key:"capture",value:function(){var e=this.refs.canvas,t=this.dom(),n=e.getContext("2d");return e.width=t.videoWidth,e.height=t.videoHeight,n.drawImage(t,0,0),e.toDataURL()}},{key:"seek",value:function(e){this.dom().currentTime+=e}},{key:"pause",value:function(){this.dom().paused?this.dom().play():this.dom().pause()}},{key:"gyazo",value:function(){var e=this.capture();$.post("/gyazo",{url:e,point:localStorage.gyazo}).done(function(e){window.open(e.url,"","width=500,height=400")})}},{key:"tweet",value:function(){$.post("/gyazo/tweet",{url:this.capture()}).success(function(e){return!0})}},{key:"comment_tweet",value:function(){var e=this.capture(),t=prompt("tweet");t&&$.post("/gyazo/tweet",{url:e,comment:t}).success(function(e){return!0})}},{key:"bind",value:function(){var e=this;$(window).keyup(function(t){if($(e.dom()).attr("src")&&"INPUT"!=document.activeElement.tagName)switch(t.keyCode){case 74:e.seek(14);break;case 75:e.seek(-15);break;case 80:e.pause();break;case 71:e.gyazo();break;case 78:e.next();break;case 67:e.comment_tweet();break;case 84:e.tweet()}})}},{key:"componentDidMount",value:function(){this.size_loop(),this.bind()}},{key:"componentDidUpdate",value:function(e,t){this.play(e)}},{key:"video_name",value:function(){return this.video_url()?this.video().name:null}},{key:"class_name",value:function(){return this.video_url()?"":"none"}},{key:"render",value:function(){var e=this;return l["default"].createElement("div",{className:this.class_name(),id:"area"},l["default"].createElement("div",{ref:"spacer"}),l["default"].createElement("video",{ref:"video",src:this.video_url(),controls:"controls",crossOrigin:"anonymous",onClick:function(){return e.pause()}}),l["default"].createElement("canvas",{className:"none",ref:"canvas"}),l["default"].createElement("div",{style:{height:"300px"}}),l["default"].createElement("a",{href:"javascript:void(0)",onClick:function(){return e.close()}},"Close Video"),l["default"].createElement("br",null),l["default"].createElement("span",null,this.video_name()))}}]),t}(l["default"].Component);t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(159),p=n(219),d=r(p),f=n(222),h=r(f),v=new h["default"],m=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"url",value:function(){return"/custom?name="+encodeURIComponent(this.props.name)}},{key:"render",value:function(){return l["default"].createElement(c.Link,{to:this.url()},this.props.name)}}]),t}(l["default"].Component),y=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){return l["default"].createElement("span",null,localStorage.user_id?l["default"].createElement(c.Link,{to:"/recommend?name="+localStorage.user_id},l["default"].createElement("b",null,"Recommend")):null)}}]),t}(l["default"].Component),g=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"submit",value:function(e){e.preventDefault();var t=this.refs.input.value,n="/?query="+encodeURIComponent(t);c.browserHistory.push(n)}},{key:"click",value:function(e){this.props.state.open(e.target.dataset.url)}},{key:"componentDidUpdate",value:function(){var e=this.query();"undefined"!=e&&"null"!=e&&e||(e=""),this.refs.input.value=e}},{key:"change",value:function(){}},{key:"query",value:function(){return decodeURIComponent(v.query())}},{key:"render",value:function(){var e=this,t=this.query();"undefined"!=t&&"null"!=t&&t||(t="");var n=d["default"].map(custom_list.data,function(t,n){return l["default"].createElement(m,{key:n,name:n,state:e.props.state})});return l["default"].createElement("form",{onSubmit:function(t){return e.submit(t)}},l["default"].createElement("input",{ref:"input",defaultValue:t,onChange:function(){e.change()}}),l["default"].createElement("button",null,"Search"),l["default"].createElement(c.Link,{to:"/latest"},"Latest"),l["default"].createElement(c.Link,{to:"/config"},"Config"),l["default"].createElement(y,{state:this.props.state}),l["default"].createElement("br",null),n)}}]),t}(l["default"].Component);t["default"]=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(159),p=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){return l["default"].createElement("span",null,"Login as ",this.props.user_id)}}]),t}(l["default"].Component),d=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){return l["default"].createElement("a",{href:"/sessions"},"Login")}}]),t}(l["default"].Component),f=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){return l["default"].createElement("div",null,session.data.user_id?l["default"].createElement(p,{user_id:session.data.user_id}):l["default"].createElement(d,null))}}]),t}(l["default"].Component),h=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){return l["default"].createElement("div",null,l["default"].createElement(f,null),l["default"].createElement("h2",null,l["default"].createElement(c.Link,{to:"/"},config.data.page_title)))}}]),t}(l["default"].Component);t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(232),p=r(c),d=n(223),f=r(d),h=n(226),v=r(h),m=new p["default"],y=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,e));return m.addEventListener("loaded",function(){n.reload()}),n.mounted=!0,n}return a(t,e),u(t,[{key:"reload",value:function(){this.mounted&&this.setState({})}},{key:"componentDidMount",value:function(){this.mounted=!0,$("title").text("Latest - Pig Media Server"),
48
- m.load(this.props.location.query.page),window.list=m}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){var e=m.list.map(function(e){return l["default"].createElement(f["default"],{key:e.key,item:e})});return l["default"].createElement("div",null,l["default"].createElement("p",null,e),l["default"].createElement(v["default"],{location:this.props.location,list:m}))}}]),t}(l["default"].Component);t["default"]=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=n(222),p=r(c),d=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return e.list=[],e.controller=new p["default"],e}return a(t,e),u(t,[{key:"load",value:function(e){var t=this;jQuery.get("/api/r/latest",{page:e}).done(function(n){t.list=n,t.dispatchEvent({type:"loaded"}),t.external_fetch(e)})}},{key:"paginate",value:function(e){var t=this;jQuery.get("/api/r/latest",{page:e}).done(function(n){t.list=t.list.concat(n),t.dispatchEvent({type:"loaded"}),t.external_fetch(e)})}},{key:"external_fetch",value:function(e){var t=this;config.data.external_pigs&&config.data.external_pigs.forEach(function(n,r){if(n.method.indexOf("latest")>0){var o={};o.i=r,o.method="latest",o.page=e,jQuery.get("/api/r/external",o).done(function(e){t.list=t.list.concat(e),t.sort(),t.dispatchEvent({type:"loaded"})})}})}},{key:"sort",value:function(){var e=this.controller.params();this.list=this.list.sort(function(e,t){return t.mtime_to_i-e.mtime_to_i}),"ascending"==e.order&&(this.list=this.list.reverse())}},{key:"next",value:function(){for(var e=this.list.map(function(e,t){return e.key}).indexOf(playing.item.key),t=null;e>-1&&(e-=1,t=this.list[e],"video"!=t.type););t&&playing.set(t)}}]),t}(l["default"]);t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(234),p=r(c),d=n(223),f=r(d),h=new p["default"],v=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,e));return h.addEventListener("loaded",function(){n.reload()}),n.mounted=!0,n}return a(t,e),u(t,[{key:"reload",value:function(){this.mounted&&this.setState({})}},{key:"componentDidMount",value:function(){this.mounted=!0,$("title").text("Recommned - Pig Media Server"),h.load(this.props.location.query.name),window.list=h}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){var e=h.list.map(function(e){return l["default"].createElement(f["default"],{key:e.key,item:e})});return l["default"].createElement("div",null,l["default"].createElement("p",null,e))}},{key:"next",value:function(){for(var e=this.list.map(function(e,t){return e.key}).indexOf(playing.item.key),t=null;e>-1&&(e-=1,t=this.list[e],"video"!=t.type););t&&playing.set(t)}}]),t}(l["default"].Component);t["default"]=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return e.list=[],e}return a(t,e),u(t,[{key:"load",value:function(e){var t=this;jQuery.get("/api/r/recommend",{name:e}).done(function(e){t.list=e,t.dispatchEvent({type:"loaded"})})}}]),t}(l["default"]);t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(236),p=r(c),d=n(223),f=r(d),h=new p["default"],v=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,e));return h.addEventListener("loaded",function(){n.reload()}),n.mounted=!0,n}return a(t,e),u(t,[{key:"reload",value:function(){this.mounted&&this.setState({})}},{key:"componentDidMount",value:function(){this.mounted=!0,$("title").text("Pig Media Server"),h.load(this.props.location.query.name),window.list=h}},{key:"componentDidUpdate",value:function(e){this.props.location.query!=e.location.query&&h.load(this.props.location.query.name)}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){var e=h.list.map(function(e){return l["default"].createElement(f["default"],{key:e.key,item:e})});return l["default"].createElement("div",null,l["default"].createElement("p",null,e))}}]),t}(l["default"].Component);t["default"]=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return e.list=[],e}return a(t,e),u(t,[{key:"load",value:function(e){var t=this;jQuery.get("/api/r/custom",{name:e}).done(function(n){t.list=n,t.dispatchEvent({type:"loaded"}),t.external_fetch(e)}).fail(function(){return t.external_fetch(e)})}},{key:"external_fetch",value:function(e){var t=this;config.data.external_pigs&&config.data.external_pigs.forEach(function(n,r){if(n.method.indexOf("custom")>0){var o={};o.i=r,o.method="custom",o.name=e,jQuery.get("/api/r/external",o).done(function(e){t.list=t.list.concat(e),t.dispatchEvent({type:"loaded"})})}})}},{key:"next",value:function(){for(var e=this.list.map(function(e,t){return e.key}).indexOf(playing.item.key),t=null;e>-1&&(e-=1,t=this.list[e],"video"!=t.type););t&&playing.set(t)}}]),t}(l["default"]);t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=n(219),p=r(c),d=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return e.data={},e}return a(t,e),u(t,[{key:"load",value:function(){var e=this;p["default"].get("/api/r/config").done(function(t){e.data=t,e.dispatchEvent({type:"loaded"})})}}]),t}(l["default"]);t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=n(219),p=r(c),d=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return e.data={},e}return a(t,e),u(t,[{key:"load",value:function(){var e=this;p["default"].get("/api/r/session").done(function(t){e.data=t,e.dispatchEvent({type:"loaded"})})}},{key:"login",value:function(){return!!this.data.user_id}}]),t}(l["default"]);t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=n(219),p=r(c),d=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return session.addEventListener("loaded",function(){e.load()}),e.data={},e}return a(t,e),u(t,[{key:"load",value:function(){var e=this;if(session.login()){var t=new Date;p["default"].get("/recents",{stamp:t.getTime()}).done(function(t){e.data=t,e.dispatchEvent({type:"loaded"})})}}},{key:"use",value:function(e){var t=this;if(session.login()){var n=new Date;p["default"].get("/recents",{stamp:n.getTime()}).done(function(n){n[e]={time:parseInt(new Date/1e3),type:"movie"},p["default"].post("/recents",{data:JSON.stringify(n)}),t.data=n,t.dispatchEvent({type:"loaded"})})}}}]),t}(l["default"]);t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=n(219),p=(r(c),function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"set",value:function(e){this.item=null,this.dispatchEvent({type:"updated"}),this.item=e,this.dispatchEvent({type:"updated"})}}]),t}(l["default"]));t["default"]=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=n(219),p=r(c),d=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return e.list=[],e}return a(t,e),u(t,[{key:"load",value:function(){var e=this;p["default"].get("/api/r/custom_list").done(function(t){e.data=t,e.dispatchEvent({type:"loaded"})})}}]),t}(l["default"]);t["default"]=d},function(e,t){"use strict";var n=null,r=0,o=null,i=function(e){},a=function(e){console.log("New session ID: "+e.sessionId),o=e},u=function(e){console.log("session success: "+e.sessionId),o=e,0!=o.media.length&&s("onRequestSession",o.media[0]),o.addMediaListener(s.bind(void 0,"addMediaListener"))},s=function(e,t){console.log("new media session ID:"+t.mediaSessionId),n=t,r=n.currentTime},l=function(){var e=new chrome.cast.SessionRequest(chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID),t=new chrome.cast.ApiConfig(e,a,i);chrome.cast.initialize(t,i,i),console.log("launching app..."),chrome.cast.requestSession(u,i),$("a.chromecast").show()};window.chrome_cast=function(e,t){e.match(/pig.ssig33.com/)&&(e=e.replace(/pig.ssig33.com\/volume/,"ashare.ssig33.com"),e=e.replace(/https/,"http"),e=e.replace(/^\/\//,"http://"),console.log(e));var n=new chrome.cast.media.MediaInfo(e);n.contentType="video/mp4";var r=new chrome.cast.media.LoadRequest(n);r.autoplay=!0,r.currentTime=0,o.loadMedia(r,s.bind(void 0,"loadMedia"),i)},window.__onGCastApiAvailable=function(e,t){e&&l()}}]);
47
+ for(a in o)u.setRequestHeader(a,o[a]);t=function(e){return function(){t&&(t=r=u.onload=u.onerror=u.onabort=u.onreadystatechange=null,"abort"===e?u.abort():"error"===e?"number"!=typeof u.status?i(0,"error"):i(u.status,u.statusText):i(Lt[u.status]||u.status,u.statusText,"text"!==(u.responseType||"text")||"string"!=typeof u.responseText?{binary:u.response}:{text:u.responseText},u.getAllResponseHeaders()))}},u.onload=t(),r=u.onerror=t("error"),void 0!==u.onabort?u.onabort=r:u.onreadystatechange=function(){4===u.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{u.send(e.hasContent&&e.data||null)}catch(s){if(t)throw s}},abort:function(){t&&t()}}:void 0}),le.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return le.globalEval(e),e}}}),le.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),le.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,o){t=le("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),Z.head.appendChild(t[0])},abort:function(){n&&n()}}}});var qt=[],Ft=/(=)\?(?=&|$)|\?\?/;le.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=qt.pop()||le.expando+"_"+_t++;return this[e]=!0,e}}),le.ajaxPrefilter("json jsonp",function(e,t,r){var o,i,a,u=e.jsonp!==!1&&(Ft.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ft.test(e.data)&&"data");return u||"jsonp"===e.dataTypes[0]?(o=e.jsonpCallback=le.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,u?e[u]=e[u].replace(Ft,"$1"+o):e.jsonp!==!1&&(e.url+=(Nt.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return a||le.error(o+" was not called"),a[0]},e.dataTypes[0]="json",i=n[o],n[o]=function(){a=arguments},r.always(function(){void 0===i?le(n).removeProp(o):n[o]=i,e[o]&&(e.jsonpCallback=t.jsonpCallback,qt.push(o)),a&&le.isFunction(i)&&i(a[0]),a=i=void 0}),"script"):void 0}),le.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||Z;var r=ge.exec(e),o=!n&&[];return r?[t.createElement(r[1])]:(r=m([e],t,o),o&&o.length&&le(o).remove(),le.merge([],r.childNodes))};var Ht=le.fn.load;le.fn.load=function(e,t,n){if("string"!=typeof e&&Ht)return Ht.apply(this,arguments);var r,o,i,a=this,u=e.indexOf(" ");return u>-1&&(r=le.trim(e.slice(u)),e=e.slice(0,u)),le.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),a.length>0&&le.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){i=arguments,a.html(r?le("<div>").append(le.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(a,i||[e.responseText,t,e])})}),this},le.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){le.fn[t]=function(e){return this.on(t,e)}}),le.expr.filters.animated=function(e){return le.grep(le.timers,function(t){return e===t.elem}).length},le.offset={setOffset:function(e,t,n){var r,o,i,a,u,s,l,c=le.css(e,"position"),p=le(e),d={};"static"===c&&(e.style.position="relative"),u=p.offset(),i=le.css(e,"top"),s=le.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(i+s).indexOf("auto")>-1,l?(r=p.position(),a=r.top,o=r.left):(a=parseFloat(i)||0,o=parseFloat(s)||0),le.isFunction(t)&&(t=t.call(e,n,le.extend({},u))),null!=t.top&&(d.top=t.top-u.top+a),null!=t.left&&(d.left=t.left-u.left+o),"using"in t?t.using.call(e,d):p.css(d)}},le.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){le.offset.setOffset(this,e,t)});var t,n,r=this[0],o={top:0,left:0},i=r&&r.ownerDocument;if(i)return t=i.documentElement,le.contains(t,r)?(o=r.getBoundingClientRect(),n=Q(i),{top:o.top+n.pageYOffset-t.clientTop,left:o.left+n.pageXOffset-t.clientLeft}):o},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===le.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),le.nodeName(e[0],"html")||(r=e.offset()),r.top+=le.css(e[0],"borderTopWidth",!0),r.left+=le.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-le.css(n,"marginTop",!0),left:t.left-r.left-le.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===le.css(e,"position");)e=e.offsetParent;return e||nt})}}),le.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;le.fn[e]=function(r){return De(this,function(e,r,o){var i=Q(e);return void 0===o?i?i[t]:e[r]:void(i?i.scrollTo(n?i.pageXOffset:o,n?o:i.pageYOffset):e[r]=o)},e,r,arguments.length)}}),le.each(["top","left"],function(e,t){le.cssHooks[t]=R(ue.pixelPosition,function(e,n){return n?(n=P(e,t),Ze.test(n)?le(e).position()[t]+"px":n):void 0})}),le.each({Height:"height",Width:"width"},function(e,t){le.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){le.fn[r]=function(r,o){var i=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||o===!0?"margin":"border");return De(this,function(t,n,r){var o;return le.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?le.css(t,n,a):le.style(t,n,r,a)},t,i?r:void 0,i,null)}})}),le.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},size:function(){return this.length}}),le.fn.andSelf=le.fn.addBack,r=[],o=function(){return le}.apply(t,r),!(void 0!==o&&(e.exports=o));var Bt=n.jQuery,Wt=n.$;return le.noConflict=function(e){return n.$===le&&(n.$=Wt),e&&n.jQuery===le&&(n.jQuery=Bt),le},i||(n.jQuery=n.$=le),le})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=n(222),p=r(c),d=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return e.list=[],e.controller=new p["default"],e}return a(t,e),u(t,[{key:"search",value:function(e){this.query=e,this.fetch()}},{key:"paginate",value:function(e){var t=this,n=this.query;n.page=e,jQuery.get("/api/r/search",this.query).done(function(e){t.list=t.list.concat(e),t.dispatchEvent({type:"loaded"}),t.external_fetch()})}},{key:"fetch",value:function(){var e=this;jQuery.get("/api/r/search",this.query).done(function(t){e.list=t,e.dispatchEvent({type:"loaded"}),e.external_fetch()})}},{key:"external_fetch",value:function(){var e=this;config.data.external_pigs&&config.data.external_pigs.forEach(function(t,n){var r=JSON.parse(JSON.stringify(e.query));r.i=n,r.method="search",jQuery.get("/api/r/external",r).done(function(t){e.list=e.list.concat(t),e.sort(),e.dispatchEvent({type:"loaded"})})})}},{key:"sort",value:function(){var e=this.controller.params();switch(e.sort){case"name":this.list=this.list.sort(function(e,t){return t.name>e.name?1:-1}),"ascending"==e.order&&(this.list=this.list.reverse());break;default:this.list=this.list.sort(function(e,t){return t.mtime_to_i-e.mtime_to_i}),"ascending"==e.order&&(this.list=this.list.reverse())}}},{key:"next",value:function(){for(var e=this.list.map(function(e,t){return e.key}).indexOf(playing.item.key),t=null;e>-1&&(e-=1,t=this.list[e],"video"!=t.type););t&&playing.set(t)}}]),t}(l["default"]);t["default"]=d},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){n(this,e),this.listeners={}}return r(e,[{key:"addEventListener",value:function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}},{key:"clearEventListener",value:function(){this.listeners={}}},{key:"dispatchEvent",value:function(e){if(this.listeners[e.type])for(var t in this.listeners[e.type])this.listeners[e.type][t].apply(this.listeners,arguments)}}]),e}();t["default"]=o},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){n(this,e)}return r(e,[{key:"params",value:function(){for(var e=new Object,t=location.search.substring(1).split("&"),n=0;t[n];n++){var r=t[n].split("=");e[r[0]]=r[1]}return e}},{key:"query",value:function(){return this.params().query}},{key:"can_sort_and_paging",value:function(){return"/"==location.pathname?!!this.query():!1}}]),e}();t["default"]=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(224),p=r(c),d=n(225),f=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){return l["default"].createElement("span",{dangerouslySetInnerHTML:{__html:this.props.item.custom_links}})}}]),t}(l["default"].Component),h=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"mtime",value:function(){return this.props.item.mtime}},{key:"size_pretty",value:function(e){var e=parseFloat(String(e)),t=e;return 1024>e?t=e+" Bytes":1048576>e?t=this.round(e/1024)+" KB":1073741824>e?t=this.round(e/1048576)+" MB":1099511627776>e&&(t=this.round(e/1073741824)+" GB"),t}},{key:"round",value:function(e){return e=10*e,Math.round(e)/10}},{key:"render",value:function(){var e=this.props.item,t="/meta/"+this.props.item.key,n="/sub/"+this.props.item.key;return l["default"].createElement("span",{className:"main_span"},l["default"].createElement(p["default"],{item:this.props.item}),l["default"].createElement("a",{href:e.url,className:"main_link"},e.name)," ",l["default"].createElement(d.Watch,{item:this.props.item}),l["default"].createElement(d.ChromeCast,{item:this.props.item}),l["default"].createElement("span",{className:"mtime"},this.mtime())," ",l["default"].createElement("span",{className:"size"},this.size_pretty(e.size))," ",l["default"].createElement("a",{className:"meta",href:t},"Meta"),l["default"].createElement("a",{className:"meta",href:n},"Sub"),l["default"].createElement(f,{item:this.props.item}))}}]),t}(l["default"].Component);t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,e));return recent.addEventListener("loaded",function(){n.reload()}),n}return a(t,e),u(t,[{key:"reload",value:function(){this.setState({})}},{key:"ext",value:function(e){return String(e).split(".").pop().toLowerCase()}},{key:"is_new",value:function(){var e=this,t=this.ext(this.props.item.name);if("mp4"==t||"flv"==t){var n=!0;return jQuery.each(recent.data,function(t,r){t=="movie/"+e.props.item.key&&(n=!1)}),n}return!1}},{key:"render",value:function(){var e=this.is_new();return l["default"].createElement("span",null,e?l["default"].createElement("span",{className:"new_flag",style:{color:"lime",fontWeight:"bold"}},"New"):null)}}]),t}(l["default"].Component);t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"ext",value:function(e){return String(e).split(".").pop().toLowerCase()}},{key:"is_video",value:function(){var e=this.ext(this.props.item.name);return"mp4"==e||"flv"==e}},{key:"click",value:function(){window.chrome_cast(this.props.item.url,this.props.item.key)}},{key:"render",value:function(){var e=this;return l["default"].createElement("span",null,this.is_video()?l["default"].createElement("span",null,l["default"].createElement("a",{className:"watch",href:"javascript:void(0)",title:this.props.item.name,onClick:function(){return e.click()}},"ChromeCast")," "):null)}}]),t}(l["default"].Component),p=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"ext",value:function(e){return String(e).split(".").pop().toLowerCase()}},{key:"is_video",value:function(){var e=this.ext(this.props.item.name);return"mp4"==e||"flv"==e}},{key:"set_video",value:function(){playing.set(this.props.item)}},{key:"render",value:function(){var e=this;return l["default"].createElement("span",null,this.is_video()?l["default"].createElement("span",null,l["default"].createElement("a",{className:"watch",href:"javascript:void(0)",title:this.props.item.name,onClick:function(){return e.set_video()}},"Watch")," "):null)}}]),t}(l["default"].Component);e.exports={Watch:p,ChromeCast:c}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(219),p=r(c),d=n(159),f=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,e));n.page=1;var r=n.props.location.query.page;return r&&(n.page=parseInt(r)),n.bind(),n}return a(t,e),u(t,[{key:"bind",value:function(){}},{key:"prev",value:function(){var e=this.props.location.query,t=this.props.location.query.page;t&&(this.page=parseInt(t)),t-=1,1>t&&(t=1),e.page=t,d.browserHistory.push("/?"+p["default"].param(e))}},{key:"click",value:function(){this.page++;var e=this.props.location.query;e.page=this.page,this.props.list.paginate(this.page),history.pushState("","","/?"+p["default"].param(e))}},{key:"render",value:function(){var e=this;return l["default"].createElement("span",null,this.page>1?l["default"].createElement("a",{href:"javascript:void(0)",onClick:function(){return e.prev()}},"Prev"):null," ",l["default"].createElement("a",{href:"javascript:void(0)",onClick:function(){return e.click()}},"Next"))}}]),t}(l["default"].Component);t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(159),p=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"url",value:function(){return"/?query="+encodeURIComponent(this.props.query)}},{key:"delete_query",value:function(){var e=this;confirm("Really?")&&$.post("/api/r/delete_query_list",{query:this.props.query}).done(function(t){e.props.update_list()})}},{key:"render",value:function(){var e=this;return l["default"].createElement("span",{className:"main_span"},l["default"].createElement(c.Link,{to:this.url()}," ",this.props.query," "),l["default"].createElement("a",{href:"javascript:void(0)",className:"delete",onClick:function(){return e.delete_query()}},"Delete"))}}]),t}(l["default"].Component),d=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,e));return n.state={},n.state.list=[],n}return a(t,e),u(t,[{key:"update_list",value:function(){var e=this;$.get("/api/r/query_list").done(function(t){e.state.list=t,e.setState(e.state)})}},{key:"componentDidMount",value:function(){this.update_list()}},{key:"render",value:function(){var e=this,t=$.map(this.state.list,function(t){return l["default"].createElement(p,{key:t,query:t,state:e.props.state,update_list:function(){return e.update_list()}})});return l["default"].createElement("div",null,t)}}]),t}(l["default"].Component);t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,e));return n.current_url="",n}return a(t,e),u(t,[{key:"close",value:function(){playing.set(null)}},{key:"dom",value:function(){return this.refs.video}},{key:"video",value:function(){return playing.item}},{key:"video_url",value:function(){var e=null;return this.video()&&(e=this.video().url),e}},{key:"to_play",value:function(e){return e&&e!=this.current_url?(this.current_url=e,!0):!1}},{key:"next",value:function(){list&&list.next()}},{key:"play",value:function(e){var t=this;if(this.to_play(this.video_url())){var n=this.dom();n.addEventListener("canplay",function(e){var n=e.target;n.play(),recent.use("movie/"+t.video().key)}),n.addEventListener("ended",function(e){t.next()}),n.load()}}},{key:"size_loop",value:function(){var e=this;if(this.video_url()){var t,n,r=this.dom().videoWidth,o=this.dom().videoHeight,i=$(window).width(),a=$(window).height();parseFloat(o)/parseFloat(r)<parseFloat(a)/parseFloat(i)?(t=i,n=parseInt(parseFloat(o)*(parseFloat(i)/parseFloat(r)))):(t=parseInt(parseFloat(r)*(parseFloat(a)/parseFloat(o))),n=a),t-=10,n-=10;var u=(a-n)/2;$(this.dom()).css({width:t,height:n}),$(this.refs.spacer).css({height:u})}setTimeout(function(){e.size_loop()},200)}},{key:"capture",value:function(){var e=this.refs.canvas,t=this.dom(),n=e.getContext("2d");return e.width=t.videoWidth,e.height=t.videoHeight,n.drawImage(t,0,0),e.toDataURL()}},{key:"seek",value:function(e){this.dom().currentTime+=e}},{key:"pause",value:function(){this.dom().paused?this.dom().play():this.dom().pause()}},{key:"gyazo",value:function(){var e=this.capture();$.post("/gyazo",{url:e,point:localStorage.gyazo}).done(function(e){window.open(e.url,"","width=500,height=400")})}},{key:"tweet",value:function(){$.post("/gyazo/tweet",{url:this.capture()}).success(function(e){return!0})}},{key:"comment_tweet",value:function(){var e=this.capture(),t=prompt("tweet");t&&$.post("/gyazo/tweet",{url:e,comment:t}).success(function(e){return!0})}},{key:"bind",value:function(){var e=this;$(window).keyup(function(t){if($(e.dom()).attr("src")&&"INPUT"!=document.activeElement.tagName)switch(t.keyCode){case 74:e.seek(14);break;case 75:e.seek(-15);break;case 80:e.pause();break;case 71:e.gyazo();break;case 78:e.next();break;case 67:e.comment_tweet();break;case 84:e.tweet()}})}},{key:"componentDidMount",value:function(){this.size_loop(),this.bind()}},{key:"componentDidUpdate",value:function(e,t){this.play(e)}},{key:"video_name",value:function(){return this.video_url()?this.video().name:null}},{key:"class_name",value:function(){return this.video_url()?"":"none"}},{key:"render",value:function(){var e=this;return l["default"].createElement("div",{className:this.class_name(),id:"area"},l["default"].createElement("div",{ref:"spacer"}),l["default"].createElement("video",{ref:"video",src:this.video_url(),controls:"controls",crossOrigin:"anonymous",onClick:function(){return e.pause()}}),l["default"].createElement("canvas",{className:"none",ref:"canvas"}),l["default"].createElement("div",{style:{height:"300px"}}),l["default"].createElement("a",{href:"javascript:void(0)",onClick:function(){return e.close()}},"Close Video"),l["default"].createElement("br",null),l["default"].createElement("span",null,this.video_name()))}}]),t}(l["default"].Component);t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(159),p=n(219),d=r(p),f=n(222),h=r(f),v=new h["default"],m=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"url",value:function(){return"/custom?name="+encodeURIComponent(this.props.name)}},{key:"render",value:function(){return l["default"].createElement(c.Link,{to:this.url()},this.props.name)}}]),t}(l["default"].Component),y=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){return l["default"].createElement("span",null,localStorage.user_id?l["default"].createElement(c.Link,{to:"/recommend?name="+localStorage.user_id},l["default"].createElement("b",null,"Recommend")):null)}}]),t}(l["default"].Component),g=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"submit",value:function(e){e.preventDefault();var t=this.refs.input.value,n="/?query="+encodeURIComponent(t);c.browserHistory.push(n)}},{key:"click",value:function(e){this.props.state.open(e.target.dataset.url)}},{key:"componentDidUpdate",value:function(){var e=this.query();"undefined"!=e&&"null"!=e&&e||(e=""),this.refs.input.value=e}},{key:"change",value:function(){}},{key:"query",value:function(){return decodeURIComponent(v.query())}},{key:"render",value:function(){var e=this,t=this.query();"undefined"!=t&&"null"!=t&&t||(t="");var n=d["default"].map(custom_list.data,function(t,n){return l["default"].createElement(m,{key:n,name:n,state:e.props.state})});return l["default"].createElement("form",{onSubmit:function(t){return e.submit(t)}},l["default"].createElement("input",{ref:"input",defaultValue:t,onChange:function(){e.change()}}),l["default"].createElement("button",null,"Search"),l["default"].createElement(c.Link,{to:"/latest"},"Latest"),l["default"].createElement("a",{href:"/config"},"Config"),l["default"].createElement(y,{state:this.props.state}),l["default"].createElement("br",null),n)}}]),t}(l["default"].Component);t["default"]=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(159),p=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){return l["default"].createElement("span",null,"Login as ",this.props.user_id)}}]),t}(l["default"].Component),d=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){return l["default"].createElement("a",{href:"/sessions"},"Login")}}]),t}(l["default"].Component),f=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){return l["default"].createElement("div",null,session.data.user_id?l["default"].createElement(p,{user_id:session.data.user_id}):l["default"].createElement(d,null))}}]),t}(l["default"].Component),h=function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"render",value:function(){return l["default"].createElement("div",null,l["default"].createElement(f,null),l["default"].createElement("h2",null,l["default"].createElement(c.Link,{to:"/"},config.data.page_title)))}}]),t}(l["default"].Component);t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(232),p=r(c),d=n(223),f=r(d),h=n(226),v=r(h),m=new p["default"],y=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,e));return m.addEventListener("loaded",function(){n.reload()}),n.mounted=!0,n}return a(t,e),u(t,[{key:"reload",value:function(){this.mounted&&this.setState({})}},{key:"componentDidMount",value:function(){this.mounted=!0,$("title").text("Latest - Pig Media Server"),
48
+ m.load(this.props.location.query.page),window.list=m}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){var e=m.list.map(function(e){return l["default"].createElement(f["default"],{key:e.key,item:e})});return l["default"].createElement("div",null,l["default"].createElement("p",null,e),l["default"].createElement(v["default"],{location:this.props.location,list:m}))}}]),t}(l["default"].Component);t["default"]=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=n(222),p=r(c),d=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return e.list=[],e.controller=new p["default"],e}return a(t,e),u(t,[{key:"load",value:function(e){var t=this;jQuery.get("/api/r/latest",{page:e}).done(function(n){t.list=n,t.dispatchEvent({type:"loaded"}),t.external_fetch(e)})}},{key:"paginate",value:function(e){var t=this;jQuery.get("/api/r/latest",{page:e}).done(function(n){t.list=t.list.concat(n),t.dispatchEvent({type:"loaded"}),t.external_fetch(e)})}},{key:"external_fetch",value:function(e){var t=this;config.data.external_pigs&&config.data.external_pigs.forEach(function(n,r){if(n.method.indexOf("latest")>0){var o={};o.i=r,o.method="latest",o.page=e,jQuery.get("/api/r/external",o).done(function(e){t.list=t.list.concat(e),t.sort(),t.dispatchEvent({type:"loaded"})})}})}},{key:"sort",value:function(){var e=this.controller.params();this.list=this.list.sort(function(e,t){return t.mtime_to_i-e.mtime_to_i}),"ascending"==e.order&&(this.list=this.list.reverse())}},{key:"next",value:function(){for(var e=this.list.map(function(e,t){return e.key}).indexOf(playing.item.key),t=null;e>-1&&(e-=1,t=this.list[e],"video"!=t.type););t&&playing.set(t)}}]),t}(l["default"]);t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(234),p=r(c),d=n(223),f=r(d),h=new p["default"],v=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,e));return h.addEventListener("loaded",function(){n.reload()}),n.mounted=!0,n}return a(t,e),u(t,[{key:"reload",value:function(){this.mounted&&this.setState({})}},{key:"componentDidMount",value:function(){this.mounted=!0,$("title").text("Recommned - Pig Media Server"),h.load(this.props.location.query.name),window.list=h}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){var e=h.list.map(function(e){return l["default"].createElement(f["default"],{key:e.key,item:e})});return l["default"].createElement("div",null,l["default"].createElement("p",null,e))}},{key:"next",value:function(){for(var e=this.list.map(function(e,t){return e.key}).indexOf(playing.item.key),t=null;e>-1&&(e-=1,t=this.list[e],"video"!=t.type););t&&playing.set(t)}}]),t}(l["default"].Component);t["default"]=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return e.list=[],e}return a(t,e),u(t,[{key:"load",value:function(e){var t=this;jQuery.get("/api/r/recommend",{name:e}).done(function(e){t.list=e,t.dispatchEvent({type:"loaded"})})}}]),t}(l["default"]);t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),l=r(s),c=n(236),p=r(c),d=n(223),f=r(d),h=new p["default"],v=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,e));return h.addEventListener("loaded",function(){n.reload()}),n.mounted=!0,n}return a(t,e),u(t,[{key:"reload",value:function(){this.mounted&&this.setState({})}},{key:"componentDidMount",value:function(){this.mounted=!0,$("title").text("Pig Media Server"),h.load(this.props.location.query.name),window.list=h}},{key:"componentDidUpdate",value:function(e){this.props.location.query!=e.location.query&&h.load(this.props.location.query.name)}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"render",value:function(){var e=h.list.map(function(e){return l["default"].createElement(f["default"],{key:e.key,item:e})});return l["default"].createElement("div",null,l["default"].createElement("p",null,e))}}]),t}(l["default"].Component);t["default"]=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return e.list=[],e}return a(t,e),u(t,[{key:"load",value:function(e){var t=this;jQuery.get("/api/r/custom",{name:e}).done(function(n){t.list=n,t.dispatchEvent({type:"loaded"}),t.external_fetch(e)}).fail(function(){return t.external_fetch(e)})}},{key:"external_fetch",value:function(e){var t=this;config.data.external_pigs&&config.data.external_pigs.forEach(function(n,r){if(n.method.indexOf("custom")>-1){var o={};o.i=r,o.method="custom",o.name=e,jQuery.get("/api/r/external",o).done(function(e){t.list=t.list.concat(e),t.dispatchEvent({type:"loaded"})})}})}},{key:"next",value:function(){for(var e=this.list.map(function(e,t){return e.key}).indexOf(playing.item.key),t=null;e>-1&&(e-=1,t=this.list[e],"video"!=t.type););t&&playing.set(t)}}]),t}(l["default"]);t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=n(219),p=r(c),d=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return e.data={},e}return a(t,e),u(t,[{key:"load",value:function(){var e=this;p["default"].get("/api/r/config").done(function(t){e.data=t,e.dispatchEvent({type:"loaded"})})}}]),t}(l["default"]);t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=n(219),p=r(c),d=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return e.data={},e}return a(t,e),u(t,[{key:"load",value:function(){var e=this;p["default"].get("/api/r/session").done(function(t){e.data=t,e.dispatchEvent({type:"loaded"})})}},{key:"login",value:function(){return!!this.data.user_id}}]),t}(l["default"]);t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=n(219),p=r(c),d=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return session.addEventListener("loaded",function(){e.load()}),e.data={},e}return a(t,e),u(t,[{key:"load",value:function(){var e=this;if(session.login()){var t=new Date;p["default"].get("/recents",{stamp:t.getTime()}).done(function(t){e.data=t,e.dispatchEvent({type:"loaded"})})}}},{key:"use",value:function(e){var t=this;if(session.login()){var n=new Date;p["default"].get("/recents",{stamp:n.getTime()}).done(function(n){n[e]={time:parseInt(new Date/1e3),type:"movie"},p["default"].post("/recents",{data:JSON.stringify(n)}),t.data=n,t.dispatchEvent({type:"loaded"})})}}}]),t}(l["default"]);t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=n(219),p=(r(c),function(e){function t(){return o(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),u(t,[{key:"set",value:function(e){this.item=null,this.dispatchEvent({type:"updated"}),this.item=e,this.dispatchEvent({type:"updated"})}}]),t}(l["default"]));t["default"]=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(221),l=r(s),c=n(219),p=r(c),d=function(e){function t(){o(this,t);var e=i(this,Object.getPrototypeOf(t).call(this));return e.list=[],e}return a(t,e),u(t,[{key:"load",value:function(){var e=this;p["default"].get("/api/r/custom_list").done(function(t){e.data=t,e.dispatchEvent({type:"loaded"})})}}]),t}(l["default"]);t["default"]=d},function(e,t){"use strict";var n=null,r=0,o=null,i=function(e){},a=function(e){console.log("New session ID: "+e.sessionId),o=e},u=function(e){console.log("session success: "+e.sessionId),o=e,0!=o.media.length&&s("onRequestSession",o.media[0]),o.addMediaListener(s.bind(void 0,"addMediaListener"))},s=function(e,t){console.log("new media session ID:"+t.mediaSessionId),n=t,r=n.currentTime},l=function(){var e=new chrome.cast.SessionRequest(chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID),t=new chrome.cast.ApiConfig(e,a,i);chrome.cast.initialize(t,i,i),console.log("launching app..."),chrome.cast.requestSession(u,i),$("a.chromecast").show()};window.chrome_cast=function(e,t){e.match(/pig.ssig33.com/)&&(e=e.replace(/pig.ssig33.com\/volume/,"ashare.ssig33.com"),e=e.replace(/https/,"http"),e=e.replace(/^\/\//,"http://"),console.log(e));var n=new chrome.cast.media.MediaInfo(e);n.contentType="video/mp4";var r=new chrome.cast.media.LoadRequest(n);r.autoplay=!0,r.currentTime=0,o.loadMedia(r,s.bind(void 0,"loadMedia"),i)},window.__onGCastApiAvailable=function(e,t){e&&l()}}]);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pig-media-server
3
3
  version: !ruby/object:Gem::Version
4
- version: '2001'
4
+ version: '100000'
5
5
  platform: ruby
6
6
  authors:
7
7
  - ssig33
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-27 00:00:00.000000000 Z
11
+ date: 2016-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rroonga