Actions

MediaWiki

Foreground.js

From Permanent Future Lab

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/**
 * Before testing, put the wiki in debug mode:
 * => https://www.mediawiki.org/wiki/ResourceLoader/Features#Debug_mode
 */

// Add custom font: Grotesk
$('<link />', {
  'rel': 'stylesheet',
  'media': 'screen',
  'type': 'text/css',
  'href': 'https://fontlibrary.org/face/hk-grotesk'
}).appendTo('head');

//$(function(){

  //+ isLanding :: void -> bool
  var isLanding = function(){
    return document.location.pathname == '/wiki/Permanent_Future_Lab_Wiki' || document.location.hostname == 'localhost'
  }

  //+ createHeader :: void -> void
  var createHeader = function(url){
    var title = $('#firstHeading').text();
    var $header = $('<header />', {
      id: 'page-header',
      html: '<h1>'+title+'</h1>',
      style: 'background-image:url("'+url+'")'
    })
    $header.insertBefore('#page-content');

    // Create a title bar
    var $inner = $("<div />").addClass('title-bar-inner');
    var $titleBar = $("<div />").addClass('row').addClass('title-bar')
      .append($("<div />").addClass('large-12').addClass('columns')
      .append($inner.html($('#firstHeading').html())));

    var oldHeight = 0;
    setInterval(function() {
      var newHeight = $inner.height();
      if(oldHeight != newHeight) {
        $titleBarBG.height(newHeight);
        oldHeight = newHeight;
      }
    }, 100);

    var $titleBarBG = $("<div />").addClass('title-bar-bg');

    $header.append($titleBarBG);
    $header.append($titleBar);
  }

  //+ getPageHeader :: void -> String
  var getHeader = function(){

    // Get thumbnail URL.
    sideImg = $('#bodyContent .thumb.tright').eq(0).find('img').attr('src');

    if( !sideImg || isLanding() )
      return 'https://static.miraheze.org/permanentfuturelabwiki/e/e5/PFLab-MusCom-20150803.jpg';

    // Remove /thumb from URL.
    sideImg = sideImg.replace('/thumb', '').split('/');
    // Remove the last part of the URL as well - E.g.: `/300px-PFLab-MusCom-20150803.jpg`
    sideImg.pop();
    // Make the array a string again.
    sideImg = sideImg.join('/');

    return sideImg;

  }

  var hideFirstHeading = function(){
    $('#firstHeading, #tagline').hide();
  }

  //+ createContentBlock
  var createContentBlock = function(el){
    if( !el.prev().is('div') ){
      el.before('</div>');
    }
    el.before('<div class="block">');
  }

  //+ createContentBlocks
  var reLayoutLanding = function(){
    $('body').addClass('is-landing');
    $('#bodyContent h2').each(function(){
      var $set = $();
      $set.push(this);
      nxt = this.nextSibling;
      while(nxt) {
        if(!$(nxt).is('h2')) {
          $set.push(nxt);
            nxt = nxt.nextSibling;
        } else break;
      }
      $set.wrapAll('<div class="block" />');
    });
  }

  //+ getTwitterFeed :: ? -> JSON
  var getTwitterFeed = function(){
    $.getJSON('https://bartroorda.nl/pflabwiki/feed');
  }

  //+ create :: ? -> JSON
  var createTwitterFeed = function(){
    $.when(getTwitterFeed()).done(function(data){
      if(!data) return;
      $.each(data, function(i, tweet) {
        console.log(tweet, tweet.media.media_url_https);
        $('body').html(
          $('body').html().replace('[pflab-feed]', 'Hoi')
        );
      });
    });
  }

  //+ init :: void -> void
  var init = function(){
    hideFirstHeading();
    createHeader(getHeader());
    // R.compose(createHeader, getHeader);
    if( isLanding() ) reLayoutLanding();
    createTwitterFeed();
  }

  init();

//});

/**
 * Add Rambda, because functional programming is nice
 * => http://bartroorda.nl/blog/2016/01/24-functional-programming-introduction
 *
 * Added to this JS file to have less http requests
 */

//  Ramda v0.18.0
//  https://github.com/ramda/ramda
//  (c) 2013-2015 Scott Sauyet, Michael Hurley, and David Chambers
//  Ramda may be freely distributed under the MIT license.

(function(){"use strict";var t={"@@functional/placeholder":!0},n=function(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,i){return n.apply(this,arguments)};case 6:return function(t,r,e,u,i,o){return n.apply(this,arguments)};case 7:return function(t,r,e,u,i,o,c){return n.apply(this,arguments)};case 8:return function(t,r,e,u,i,o,c,a){return n.apply(this,arguments)};case 9:return function(t,r,e,u,i,o,c,a,f){return n.apply(this,arguments)};case 10:return function(t,r,e,u,i,o,c,a,f,s){return n.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}},r=function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r},e=function(t){return new RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))},u=function(t){return function(){return!t.apply(this,arguments)}},i=function(t,n){t=t||[],n=n||[];var r,e=t.length,u=n.length,i=[];for(r=0;e>r;)i[i.length]=t[r],r+=1;for(r=0;u>r;)i[i.length]=n[r],r+=1;return i},o=function(t,n,r){for(var e=0,u=r.length;u>e;){if(t(n,r[e]))return!0;e+=1}return!1},c=function(t){return function n(r){return 0===arguments.length?n:null!=r&&r["@@functional/placeholder"]===!0?n:t.apply(this,arguments)}},a=function(t){return function n(r,e){var u=arguments.length;return 0===u?n:1===u&&null!=r&&r["@@functional/placeholder"]===!0?n:1===u?c(function(n){return t(r,n)}):2===u&&null!=r&&r["@@functional/placeholder"]===!0&&null!=e&&e["@@functional/placeholder"]===!0?n:2===u&&null!=r&&r["@@functional/placeholder"]===!0?c(function(n){return t(n,e)}):2===u&&null!=e&&e["@@functional/placeholder"]===!0?c(function(n){return t(r,n)}):t(r,e)}},f=function(t){return function n(r,e,u){var i=arguments.length;return 0===i?n:1===i&&null!=r&&r["@@functional/placeholder"]===!0?n:1===i?a(function(n,e){return t(r,n,e)}):2===i&&null!=r&&r["@@functional/placeholder"]===!0&&null!=e&&e["@@functional/placeholder"]===!0?n:2===i&&null!=r&&r["@@functional/placeholder"]===!0?a(function(n,r){return t(n,e,r)}):2===i&&null!=e&&e["@@functional/placeholder"]===!0?a(function(n,e){return t(r,n,e)}):2===i?c(function(n){return t(r,e,n)}):3===i&&null!=r&&r["@@functional/placeholder"]===!0&&null!=e&&e["@@functional/placeholder"]===!0&&null!=u&&u["@@functional/placeholder"]===!0?n:3===i&&null!=r&&r["@@functional/placeholder"]===!0&&null!=e&&e["@@functional/placeholder"]===!0?a(function(n,r){return t(n,r,u)}):3===i&&null!=r&&r["@@functional/placeholder"]===!0&&null!=u&&u["@@functional/placeholder"]===!0?a(function(n,r){return t(n,e,r)}):3===i&&null!=e&&e["@@functional/placeholder"]===!0&&null!=u&&u["@@functional/placeholder"]===!0?a(function(n,e){return t(r,n,e)}):3===i&&null!=r&&r["@@functional/placeholder"]===!0?c(function(n){return t(n,e,u)}):3===i&&null!=e&&e["@@functional/placeholder"]===!0?c(function(n){return t(r,n,u)}):3===i&&null!=u&&u["@@functional/placeholder"]===!0?c(function(n){return t(r,e,n)}):t(r,e,u)}},s=function mu(t,r,e){return function(){for(var u=[],i=0,o=t,c=0;c<r.length||i<arguments.length;){var a;c<r.length&&(null==r[c]||r[c]["@@functional/placeholder"]!==!0||i>=arguments.length)?a=r[c]:(a=arguments[i],i+=1),u[c]=a,(null==a||a["@@functional/placeholder"]!==!0)&&(o-=1),c+=1}return 0>=o?e.apply(this,u):n(o,mu(t,u,e))}},l=function(t,n){for(var r=0,e=n.length,u=[];e>r;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u},p=function(t){return{"@@transducer/value":t,"@@transducer/reduced":!0}},h=function(t){return function(n){return l(function(t){return"function"==typeof n[t]},t(n))}},g=function(t,n){return Object.prototype.hasOwnProperty.call(n,t)},d=function(t){return t},y=function(){var t=Object.prototype.toString;return"[object Arguments]"===t.call(arguments)?function(n){return"[object Arguments]"===t.call(n)}:function(t){return g("callee",t)}}(),m=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},v=Number.isInteger||function(t){return t<<0===t},x=function(t){return"[object Number]"===Object.prototype.toString.call(t)},b=function(t){return"[object Object]"===Object.prototype.toString.call(t)},w=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},j=function(t){return"[object String]"===Object.prototype.toString.call(t)},O=function(t){return"function"==typeof t["@@transducer/step"]},A=function(t,n){for(var r=0,e=n.length,u=Array(e);e>r;)u[r]=t(n[r]),r+=1;return u},S=function(t){return[t]},E=function(t,n){return function(){return n.call(this,t.apply(this,arguments))}},k=function(t,n){return function(){var r=this;return t.apply(r,arguments).then(function(t){return n.call(r,t)})}},I=function(t){var n=t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+n.replace(/"/g,'\\"')+'"'},N=function(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}},q=function vu(t,n,r){switch(arguments.length){case 1:return vu(t,0,t.length);case 2:return vu(t,n,t.length);default:for(var e=[],u=0,i=Math.max(0,Math.min(t.length,r)-n);i>u;)e[u]=t[n+u],u+=1;return e}},M=function(){var t=function(t){return(10>t?"0":"")+t};return"function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(n){return n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"."+(n.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}}(),C=function(){function t(t,n){this.xf=n,this.pred=t,this.lastValue=void 0,this.seenFirstValue=!1}return t.prototype["@@transducer/init"]=function(){return this.xf["@@transducer/init"]()},t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){var r=!1;return this.seenFirstValue?this.pred(this.lastValue,n)&&(r=!0):this.seenFirstValue=!0,this.lastValue=n,r?t:this.xf["@@transducer/step"](t,n)},a(function(n,r){return new t(n,r)})}(),P={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}},U=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=P.init,t.prototype["@@transducer/result"]=P.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},a(function(n,r){return new t(n,r)})}(),W=function(){function t(t,n){this.xf=n,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=P.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.found=!0,t=N(this.xf["@@transducer/step"](t,n))),t},a(function(n,r){return new t(n,r)})}(),R=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.found=!1}return t.prototype["@@transducer/init"]=P.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.found=!0,t=N(this.xf["@@transducer/step"](t,this.idx))),t},a(function(n,r){return new t(n,r)})}(),T=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=P.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.last=n),t},a(function(n,r){return new t(n,r)})}(),B=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.lastIdx=-1}return t.prototype["@@transducer/init"]=P.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.lastIdx=this.idx),t},a(function(n,r){return new t(n,r)})}(),F=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=P.init,t.prototype["@@transducer/result"]=P.result,t.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},a(function(n,r){return new t(n,r)})}(),L=function(){function t(t,n){this.xf=n,this.n=t}return t.prototype["@@transducer/init"]=P.init,t.prototype["@@transducer/result"]=P.result,t.prototype["@@transducer/step"]=function(t,n){return 0===this.n?N(t):(this.n-=1,this.xf["@@transducer/step"](t,n))},a(function(n,r){return new t(n,r)})}(),D=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=P.init,t.prototype["@@transducer/result"]=P.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):N(t)},a(function(n,r){return new t(n,r)})}(),V=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},function(n){return new t(n)}}(),z=a(function(t,n){return t+n}),_=f(function(t,n,r){if(n>=r.length||n<-r.length)return r;var e=0>n?r.length:0,u=e+n,o=i(r);return o[u]=t(r[u]),o}),K=c(function(t){return function(){return t}}),$=a(function(t,n){return t&&n}),H=a(function(t,n){return i(n,[t])}),X=a(function(t,n){return t.apply(this,n)}),Y=f(function(t,n,r){var e={};for(var u in r)e[u]=r[u];return e[t]=n,e}),Z=f(function xu(t,n,r){switch(t.length){case 0:return r;case 1:return Y(t[0],n,r);default:return Y(t[0],xu(q(t,1),n,Object(r[t[0]])),r)}}),G=a(function(t,r){return n(t.length,function(){return t.apply(r,arguments)})}),J=c(function(t){return function(n,r){return t(n,r)?-1:t(r,n)?1:0}}),Q=c(function(t){return function(){for(var n=0;n<t.length;){if(t[n][0].apply(this,arguments))return t[n][1].apply(this,arguments);n+=1}}}),tt=f(o),nt=a(function(t,n){for(var r={},e=n.length,u=0;e>u;){var i=t(n[u]);r[i]=(g(i,r)?r[i]:0)+1,u+=1}return r}),rt=a(function(t,r){return 1===t?c(r):n(t,s(t,[],r))}),et=z(-1),ut=a(function(t,n){return null==n||n!==n?t:n}),it=f(function(t,n,r){for(var e=[],u=0,i=n.length,o=tt(t);i>u;)o(n[u],r)||o(n[u],e)||(e[e.length]=n[u]),u+=1;return e}),ot=a(function(t,n){var r={};for(var e in n)e!==t&&(r[e]=n[e]);return r}),ct=a(function bu(t,n){switch(t.length){case 0:return n;case 1:return ot(t[0],n);default:var r=t[0],e=q(t,1);return null==n[r]?n:Y(r,bu(e,n[r]),n)}}),at=a(function(t,n){return t/n}),ft=a(function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return q(n,0,r+1)}),st=c(function(t){return null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():m(t)?[]:j(t)?"":b(t)?{}:y(t)?function(){return arguments}():void 0}),lt=a(function wu(t,n){var r,e,u,i={};for(e in n)r=t[e],u=typeof r,i[e]="function"===u?r(n[e]):"object"===u?wu(t[e],n[e]):n[e];return i}),pt=c(function(t){for(var n=0,r=t.length,e={};r>n;)m(t[n])&&t[n].length&&(e[t[n][0]]=t[n][1]),n+=1;return e}),ht=a(function(t,n){return t>n}),gt=a(function(t,n){return t>=n}),dt=a(g),yt=a(function(t,n){return t in n}),mt=a(function(t,n){return t===n?0!==t||1/t===1/n:t!==t&&n!==n}),vt=c(d),xt=f(function(t,n,r){return rt(Math.max(t.length,n.length,r.length),function(){return t.apply(this,arguments)?n.apply(this,arguments):r.apply(this,arguments)})}),bt=z(1),wt=f(function(t,n,r){t=t<r.length&&t>=0?t:r.length;var e=q(r);return e.splice(t,0,n),e}),jt=f(function(t,n,r){return t=t<r.length&&t>=0?t:r.length,i(i(q(r,0,t),n),q(r,t))}),Ot=a(function(t,n){return null!=n&&n.constructor===t||n instanceof t}),At=c(function(t){return m(t)?!0:t?"object"!=typeof t?!1:t instanceof String?!1:1===t.nodeType?!!t.length:0===t.length?!0:t.length>0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1:!1}),St=c(function(t){return null==t}),Et=function(){var t=!{toString:null}.propertyIsEnumerable("toString"),n=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],r=function(t,n){for(var r=0;r<t.length;){if(t[r]===n)return!0;r+=1}return!1};return c("function"==typeof Object.keys?function(t){return Object(t)!==t?[]:Object.keys(t)}:function(e){if(Object(e)!==e)return[];var u,i,o=[];for(u in e)g(u,e)&&(o[o.length]=u);if(t)for(i=n.length-1;i>=0;)u=n[i],g(u,e)&&!r(o,u)&&(o[o.length]=u),i-=1;return o})}(),kt=c(function(t){var n,r=[];for(n in t)r[r.length]=n;return r}),It=c(function(t){return null!=t&&Ot(Number,t.length)?t.length:NaN}),Nt=a(function(t,n){return n>t}),qt=a(function(t,n){return n>=t}),Mt=f(function(t,n,r){for(var e=0,u=r.length,i=[],o=[n];u>e;)o=t(o[0],r[e]),i[e]=o[1],e+=1;return[o[0],i]}),Ct=f(function(t,n,r){for(var e=r.length-1,u=[],i=[n];e>=0;)i=t(i[0],r[e]),u[e]=i[1],e-=1;return[i[0],u]}),Pt=a(function(t,n){return n.match(t)||[]}),Ut=a(function(t,n){return v(t)?!v(n)||1>n?NaN:(t%n+n)%n:NaN}),Wt=a(function(t,n){return n>t?n:t}),Rt=f(function(t,n,r){return t(r)>t(n)?r:n}),Tt=a(function(t,n){for(var r={},e=Et(t),u=0;u<e.length;)r[e[u]]=t[e[u]],u+=1;for(e=Et(n),u=0;u<e.length;)r[e[u]]=n[e[u]],u+=1;return r}),Bt=a(function(t,n){return t>n?n:t}),Ft=f(function(t,n,r){return t(r)<t(n)?r:n}),Lt=a(function(t,n){return t%n}),Dt=a(function(t,n){return t*n}),Vt=a(function(t,n){switch(t){case 0:return function(){return n.call(this)};case 1:return function(t){return n.call(this,t)};case 2:return function(t,r){return n.call(this,t,r)};case 3:return function(t,r,e){return n.call(this,t,r,e)};case 4:return function(t,r,e,u){return n.call(this,t,r,e,u)};case 5:return function(t,r,e,u,i){return n.call(this,t,r,e,u,i)};case 6:return function(t,r,e,u,i,o){return n.call(this,t,r,e,u,i,o)};case 7:return function(t,r,e,u,i,o,c){return n.call(this,t,r,e,u,i,o,c)};case 8:return function(t,r,e,u,i,o,c,a){return n.call(this,t,r,e,u,i,o,c,a)};case 9:return function(t,r,e,u,i,o,c,a,f){return n.call(this,t,r,e,u,i,o,c,a,f)};case 10:return function(t,r,e,u,i,o,c,a,f,s){return n.call(this,t,r,e,u,i,o,c,a,f,s)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}}),zt=c(function(t){return-t}),_t=c(function(t){return!t}),Kt=a(function(t,n){var r=0>t?n.length+t:t;return j(n)?n.charAt(r):n[r]}),$t=c(function(t){return function(){return Kt(t,arguments)}}),Ht=a(function(t,n){var r={};return r[t]=n,r}),Xt=c(S),Yt=c(function(t){var n,r=!1;return function(){return r?n:(r=!0,n=t.apply(this,arguments))}}),Zt=a(function(t,n){return t||n}),Gt=function(){var t=function(n){return{value:n,map:function(r){return t(r(n))}}};return f(function(n,r,e){return n(function(n){return t(r(n))})(e).value})}(),Jt=a(function(t,n){return[t,n]}),Qt=a(function(t,n){if(null!=n){for(var r=n,e=0;null!=r&&e<t.length;)r=r[t[e]],e+=1;return r}}),tn=f(function(t,n,r){return ut(t,Qt(n,r))}),nn=a(function(t,n){for(var r={},e=0;e<t.length;)t[e]in n&&(r[t[e]]=n[t[e]]),e+=1;return r}),rn=a(function(t,n){for(var r={},e=0,u=t.length;u>e;){var i=t[e];r[i]=n[i],e+=1}return r}),en=a(function(t,n){var r={};for(var e in n)t(n[e],e,n)&&(r[e]=n[e]);return r}),un=a(function(t,n){return i([t],n)}),on=a(function(t,n){return n[t]}),cn=f(function(t,n,r){return null!=r&&g(n,r)?r[n]:t}),an=f(function(t,n,r){return t(r[n])}),fn=a(function(t,n){for(var r=t.length,e=[],u=0;r>u;)e[u]=n[t[u]],u+=1;return e}),sn=a(function(t,n){if(!x(t)||!x(n))throw new TypeError("Both arguments to range must be numbers");for(var r=[],e=t;n>e;)r.push(e),e+=1;return r}),ln=f(function(t,n,r){for(var e=r.length-1;e>=0;)n=t(n,r[e]),e-=1;return n}),pn=c(N),hn=f(function(t,n,r){return i(q(r,0,Math.min(t,r.length)),q(r,Math.min(r.length,t+n)))}),gn=f(function(t,n,r){return r.replace(t,n)}),dn=c(function(t){return j(t)?t.split("").reverse().join(""):q(t).reverse()}),yn=f(function(t,n,r){for(var e=0,u=r.length,i=[n];u>e;)n=t(n,r[e]),i[e+1]=n,e+=1;return i}),mn=f(function(t,n,r){return Gt(t,K(n),r)}),vn=a(function(t,n){return q(n).sort(t)}),xn=a(function(t,n){return q(n).sort(function(n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0})}),bn=a(function(t,n){return t-n}),wn=a(function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return q(n,r+1,1/0)}),jn=a(function(t,n){return t(n),n}),On=a(function(t,n){for(var r=Number(n),e=new Array(r),u=0;r>u;)e[u]=t(u),u+=1;return e}),An=c(function(t){var n=[];for(var r in t)g(r,t)&&(n[n.length]=[r,t[r]]);return n}),Sn=c(function(t){var n=[];for(var r in t)n[n.length]=[r,t[r]];return n}),En=function(){var t=" \n�\f\r   ᠎              \u2028\u2029\ufeff",n="​",r="function"==typeof String.prototype.trim;return c(r&&!t.trim()&&n.trim()?function(t){return t.trim()}:function(n){var r=new RegExp("^["+t+"]["+t+"]*"),e=new RegExp("["+t+"]["+t+"]*$");return n.replace(r,"").replace(e,"")})}(),kn=c(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),In=c(function(t){return function(){return t(q(arguments))}}),Nn=c(function(t){return Vt(1,t)}),qn=a(function(t,n){return rt(t,function(){for(var r,e=1,u=n,i=0;t>=e&&"function"==typeof u;)r=e===t?arguments.length:i+u.length,u=u.apply(this,q(arguments,i,r)),e+=1,i=r;return u})}),Mn=a(function(t,n){for(var r=t(n),e=[];r&&r.length;)e[e.length]=r[0],r=t(r[1]);return e}),Cn=a(function(t,n){for(var r,e=0,u=n.length,i=[];u>e;)r=n[e],o(t,r,i)||(i[i.length]=r),e+=1;return i}),Pn=f(function(t,n,r){return t(r)?r:n(r)}),Un=f(function(t,n,r){return _(K(n),t,r)}),Wn=c(function(t){for(var n=Et(t),r=n.length,e=[],u=0;r>u;)e[u]=t[n[u]],u+=1;return e}),Rn=c(function(t){var n,r=[];for(n in t)r[r.length]=t[n];return r}),Tn=function(){var t=function(t){return{value:t,map:function(){return this}}};return a(function(n,r){return n(t)(r).value})}(),Bn=f(function(t,n,r){return t(r)?n(r):r}),Fn=a(function(t,n){for(var r in t)if(g(r,t)&&!t[r](n[r]))return!1;return!0}),Ln=a(function(t,n){return rt(t.length,function(){return n.apply(this,i([t],arguments))})}),Dn=a(function(t,n){for(var r,e=0,u=t.length,i=n.length,o=[];u>e;){for(r=0;i>r;)o[o.length]=[t[e],n[r]],r+=1;e+=1}return o}),Vn=a(function(t,n){for(var r=[],e=0,u=Math.min(t.length,n.length);u>e;)r[e]=[t[e],n[e]],e+=1;return r}),zn=a(function(t,n){for(var r=0,e=t.length,u={};e>r;)u[t[r]]=n[r],r+=1;return u}),_n=f(function(t,n,r){for(var e=[],u=0,i=Math.min(n.length,r.length);i>u;)e[u]=t(n[u],r[u]),u+=1;return e}),Kn=K(!1),$n=K(!0),Hn=function(t,n){for(var r=0,e=n.length-(t-1),u=new Array(e>=0?e:0);e>r;)u[r]=q(n,r,r+t),r+=1;return u},Xn=function(t,n){return function(){var r=arguments.length;if(0===r)return n();var e=arguments[r-1];return m(e)||"function"!=typeof e[t]?n.apply(this,arguments):e[t].apply(e,q(arguments,0,r-1))}},Yn=function ju(t,n,r){var u=function(e){for(var u=n.length,i=0;u>i;){if(t===n[i])return r[i];i+=1}n[i+1]=t,r[i+1]=e;for(var o in t)e[o]=ju(t[o],n,r);return e};switch(kn(t)){case"Object":return u({});case"Array":return u([]);case"Date":return new Date(t);case"RegExp":return e(t);default:return t}},Zn=function(t){return a(function(r,e){return n(Math.max(0,r.length-e.length),function(){return r.apply(this,t(e,arguments))})})},Gn=function(t,n,r){return function(){var e=arguments.length;if(0===e)return r();var u=arguments[e-1];if(!m(u)){var i=q(arguments,0,e-1);if("function"==typeof u[t])return u[t].apply(u,i);if(O(u)){var o=n.apply(null,i);return o(u)}}return r.apply(this,arguments)}},Jn=function Ou(t,n,e,u){if(mt(t,n))return!0;if(kn(t)!==kn(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(kn(t)){case"Arguments":case"Array":case"Object":break;case"Boolean":case"Number":case"String":if(typeof t!=typeof n||!mt(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!mt(t.valueOf(),n.valueOf()))return!1;break;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1;break;case"Map":case"Set":if(!Ou(r(t.entries()),r(n.entries()),e,u))return!1;break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":break;case"ArrayBuffer":break;default:return!1}var i=Et(t);if(i.length!==Et(n).length)return!1;for(var o=e.length-1;o>=0;){if(e[o]===t)return u[o]===n;o-=1}for(e.push(t),u.push(n),o=i.length-1;o>=0;){var c=i[o];if(!g(c,n)||!Ou(n[c],t[c],e,u))return!1;o-=1}return e.pop(),u.pop(),!0},Qn=function(t){return function n(r){for(var e,u,i,o=[],c=0,a=r.length;a>c;){if(At(r[c]))for(e=t?n(r[c]):r[c],u=0,i=e.length;i>u;)o[o.length]=e[u],u+=1;else o[o.length]=r[c];c+=1}return o}},tr=function(){function t(t,n,r){for(var e=0,u=r.length;u>e;){if(n=t["@@transducer/step"](n,r[e]),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}function n(t,n,r){for(var e=r.next();!e.done;){if(n=t["@@transducer/step"](n,e.value),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function r(t,n,r){return t["@@transducer/result"](r.reduce(G(t["@@transducer/step"],t),n))}var e="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";return function(u,i,o){if("function"==typeof u&&(u=V(u)),At(o))return t(u,i,o);if("function"==typeof o.reduce)return r(u,i,o);if(null!=o[e])return n(u,i,o[e]());if("function"==typeof o.next)return n(u,i,o);throw new TypeError("reduce: list must be array or iterable")}}(),nr=function(){function t(t,n){this.xf=n,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=P.init,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)||(this.all=!1,t=N(this.xf["@@transducer/step"](t,!1))),t},a(function(n,r){return new t(n,r)})}(),rr=function(){function t(t,n){this.xf=n,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=P.init,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.any=!0,t=N(this.xf["@@transducer/step"](t,!0))),t},a(function(n,r){return new t(n,r)})}(),er=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=P.init,t.prototype["@@transducer/result"]=P.result,t.prototype["@@transducer/step"]=function(t,n){return this.store(n),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t.prototype.getCopy=function(){return i(q(this.acc,this.pos),q(this.acc,0,this.pos))},a(function(n,r){return new t(n,r)})}(),ur=function(){function t(t,n){this.xf=n,this.n=t}return t.prototype["@@transducer/init"]=P.init,t.prototype["@@transducer/result"]=P.result,t.prototype["@@transducer/step"]=function(t,n){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,n)},a(function(n,r){return new t(n,r)})}(),ir=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=P.init,t.prototype["@@transducer/result"]=P.result,t.prototype["@@transducer/step"]=function(t,n){if(this.f){if(this.f(n))return t;this.f=null}return this.xf["@@transducer/step"](t,n)},a(function(n,r){return new t(n,r)})}(),or=function(){function t(t,n){this.xf=n,this.f=t,this.inputs={}}return t.prototype["@@transducer/init"]=P.init,t.prototype["@@transducer/result"]=function(t){var n;for(n in this.inputs)if(g(n,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[n]),t["@@transducer/reduced"])){t=t["@@transducer/value"];break}return this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){var r=this.f(n);return this.inputs[r]=this.inputs[r]||[r,[]],this.inputs[r][1]=H(n,this.inputs[r][1]),t},a(function(n,r){return new t(n,r)})}(),cr=c(function(t){return rt(t.length,function(){var n=0,r=arguments[0],e=arguments[arguments.length-1],u=q(arguments);return u[0]=function(){var t=r.apply(this,i(arguments,[n,e]));return n+=1,t},t.apply(this,u)})}),ar=a(Gn("all",nr,function(t,n){for(var r=0;r<n.length;){if(!t(n[r]))return!1;r+=1}return!0})),fr=a(Gn("any",rr,function(t,n){for(var r=0;r<n.length;){if(t(n[r]))return!0;r+=1}return!1})),sr=a(Gn("aperture",er,Hn)),lr=c(function(t){return Vt(2,t)}),pr=c(function(t){return null!=t&&"function"==typeof t.clone?t.clone():Yn(t,[],[])}),hr=Ht,gr=c(function(t){return rt(t.length,t)}),dr=a(Gn("dropWhile",ir,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return q(n,r)})),yr=a(function(t,n){return Jn(t,n,[],[])}),mr=a(Gn("filter",U,l)),vr=a(Gn("find",W,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return n[r];r+=1}})),xr=a(Gn("findIndex",R,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return r;r+=1}return-1})),br=a(Gn("findLast",T,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return n[r];r-=1}})),wr=a(Gn("findLastIndex",B,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return r;r-=1}return-1})),jr=c(Qn(!0)),Or=c(function(t){return gr(function(n,r){var e=q(arguments);return e[0]=r,e[1]=n,t.apply(this,e)})}),Ar=a(Xn("forEach",function(t,n){for(var r=n.length,e=0;r>e;)t(n[e]),e+=1;return n})),Sr=c(h(Et)),Er=c(h(kt)),kr=a(Gn("groupBy",or,function(t,n){return tr(function(n,r){var e=t(r);return n[e]=H(r,n[e]||(n[e]=[])),n},{},n)})),Ir=Kt(0),Nr=f(function(t,n,r){for(var e=[],u=0;u<n.length;)o(t,n[u],r)&&(e[e.length]=n[u]),u+=1;return Cn(t,e)}),qr=a(Xn("intersperse",function(t,n){for(var r=[],e=0,u=n.length;u>e;)e===u-1?r.push(n[e]):r.push(n[e],t),e+=1;return r})),Mr=c(function(t){for(var n=Et(t),r=n.length,e=0,u={};r>e;){var i=n[e],o=t[i],c=g(o,u)?u[o]:u[o]=[];c[c.length]=i,e+=1}return u}),Cr=c(function(t){for(var n=Et(t),r=n.length,e=0,u={};r>e;){var i=n[e];u[t[i]]=i,e+=1}return u}),Pr=c(function(t){return null!=t&&yr(t,st(t))}),Ur=Kt(-1),Wr=a(function(t,n){if("function"!=typeof n.lastIndexOf||m(n)){for(var r=n.length-1;r>=0;){if(yr(n[r],t))return r;r-=1}return-1}return n.lastIndexOf(t)}),Rr=a(Gn("map",F,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return rt(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return tr(function(r,e){return r[e]=t(n[e]),r},{},Et(n));default:return A(t,n)}})),Tr=a(function(t,n){return tr(function(r,e){return r[e]=t(n[e]),r},{},Et(n))}),Br=a(function(t,n){return tr(function(r,e){return r[e]=t(n[e],e,n),r},{},Et(n))}),Fr=a(u(Gn("any",rr,fr))),Lr=Zn(i),Dr=Zn(Or(i)),Vr=a(function(t,n){return tr(function(n,r){var e=n[t(r)?0:1];return e[e.length]=r,n},[[],[]],n)}),zr=f(function(t,n,r){return yr(Qt(t,r),n)}),_r=a(function(t,n){return Rr(on(t),n)}),Kr=f(function(t,n,r){return an(yr(n),t,r)}),$r=f(function(t,n,r){return an(Ot(t),n,r)}),Hr=f(tr),Xr=a(function(t,n){return mr(u(t),n)}),Yr=a(function(t,n){return On(K(t),n)}),Zr=f(Xn("slice",function(t,n,r){return Array.prototype.slice.call(r,t,n)})),Gr=a(function(t,n){if(0>=t)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],e=0;e<n.length;)r.push(Zr(e,e+=t,n));return r}),Jr=Hr(z,0),Qr=Xn("tail",Zr(1,1/0)),te=a(Gn("take",L,function(t,n){return Zr(0,0>t?1/0:t,n)})),ne=a(Gn("takeWhile",D,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return q(n,0,r)})),re=rt(4,function(t,n,r,e){return tr(t("function"==typeof n?V(n):n),r,e)}),ee=f(function(t,n,r){return Cn(t,i(n,r))}),ue=Cn(yr),ie=a(function(t,r){return gr(n(r.length,function(){for(var n=[],e=0;e<r.length;)n.push(r[e].call(this,arguments[e])),e+=1;return t.apply(this,n.concat(q(arguments,r.length)))}))}),oe=a(function(t,n){return Fn(Tr(yr,t),n)}),ce=function(){var t=function(t){return{"@@transducer/init":P.init,"@@transducer/result":function(n){return t["@@transducer/result"](n)},"@@transducer/step":function(n,r){var e=t["@@transducer/step"](n,r);return e["@@transducer/reduced"]?p(e):e}}};return function(n){var r=t(n);return{"@@transducer/init":P.init,"@@transducer/result":function(t){return r["@@transducer/result"](t)},"@@transducer/step":function(t,n){return At(n)?tr(r,t,n):tr(r,t,[n])}}}}(),ae=function(t,n,r){for(var e=r;e<t.length;){if(yr(t[e],n))return e;e+=1}return-1},fe=function(){var t={"@@transducer/init":Array,"@@transducer/step":function(t,n){return i(t,[n])},"@@transducer/result":d},n={"@@transducer/init":String,"@@transducer/step":function(t,n){return t+n},"@@transducer/result":d},r={"@@transducer/init":Object,"@@transducer/step":function(t,n){return Tt(t,At(n)?hr(n[0],n[1]):n)},"@@transducer/result":d};return function(e){if(O(e))return e;if(At(e))return t;if("string"==typeof e)return n;if("object"==typeof e)return r;throw new Error("Cannot create transformer for "+e)}}(),se=a(function(t,n){return Rr(t,ce(n))}),le=c(function(t){return rt(Hr(Wt,0,_r("length",t)),function(){for(var n=0,r=t.length;r>n;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0})}),pe=c(function(t){for(var n=t.length,r=0;n>r;){if(ae(t,t[r],r+1)>=0)return!1;r+=1}return!0}),he=c(function(t){return rt(Hr(Wt,0,_r("length",t)),function(){for(var n=0,r=t.length;r>n;){if(t[n].apply(this,arguments))return!0;n+=1}return!1})}),ge=a(function(t,n){return"function"==typeof t.ap?t.ap(n):"function"==typeof t?rt(Math.max(t.length,n.length),function(){return t.apply(this,arguments)(n.apply(this,arguments))}):tr(function(t,r){return i(t,Rr(r,n))},[],t)}),de=gr(function(t){return t.apply(this,q(arguments,1))}),ye=a(Gn("chain",se,function(t,n){return"function"==typeof n?function(){return n.call(this,t.apply(this,arguments)).apply(this,arguments)}:Qn(!1)(Rr(t,n))})),me=f(function(t,n,r){function e(n,r){return ge(Rr(un,t(r)),n)}return ln(e,n([]),r)}),ve=a(function(t,n){if(t>10)throw new Error("Constructor with greater than ten arguments");return 0===t?function(){return new n}:gr(Vt(t,function(t,r,e,u,i,o,c,a,f,s){switch(arguments.length){case 1:return new n(t);case 2:return new n(t,r);case 3:return new n(t,r,e);case 4:return new n(t,r,e,u);case 5:return new n(t,r,e,u,i);case 6:return new n(t,r,e,u,i,o);case 7:return new n(t,r,e,u,i,o,c);case 8:return new n(t,r,e,u,i,o,c,a);case 9:return new n(t,r,e,u,i,o,c,a,f);case 10:return new n(t,r,e,u,i,o,c,a,f,s)}}))}),xe=a(function(t,n){return rt(Math.max.apply(Math,_r("length",n)),function(){var r=arguments,e=this;return t.apply(e,A(function(t){return t.apply(e,r)},n))})}),be=a(Gn("drop",ur,function(t,n){return Zr(Math.max(0,t),1/0,n)})),we=a(function(t,n){return te(t<n.length?n.length-t:0,n)}),je=a(Gn("dropRepeatsWith",C,function(t,n){var r=[],e=1,u=n.length;if(0!==u)for(r[0]=n[0];u>e;)t(Ur(r),n[e])||(r[r.length]=n[e]),e+=1;return r})),Oe=f(function(t,n,r){return yr(t(n),t(r))}),Ae=f(function(t,n,r){return yr(n[t],r[t])}),Se=a(function(t,n){return"function"!=typeof n.indexOf||m(n)?ae(n,t,0):n.indexOf(t)}),Ee=Zr(0,-1),ke=f(function(t,n,r){return O(t)?tr(n(t),t["@@transducer/init"](),r):tr(n(fe(t)),t,r)}),Ie=pe,Ne=a(function(t,n){return function(r){return function(e){return Rr(function(t){return n(t,e)},r(t(e)))}}}),qe=c(function(t){return Ne(Kt(t),Un(t))}),Me=c(function(t){return Ne(on(t),Y(t))}),Ce=a(function(t,n){var r=rt(t,n);return rt(t,function(){return tr(ge,Rr(r,arguments[0]),q(arguments,1))})}),Pe=c(function(t){return Jr(t)/t.length}),Ue=c(function(t){var n=t.length;if(0===n)return NaN;var r=2-n%2,e=(n-r)/2;return Pe(q(t).sort(function(t,n){return n>t?-1:t>n?1:0}).slice(e,e+r))}),We=c(function(t){return Hr(Tt,{},t)}),Re=function(){if(0===arguments.length)throw new Error("pipe requires at least one argument");
return n(arguments[0].length,Hr(E,arguments[0],Qr(arguments)))},Te=function(){if(0===arguments.length)throw new Error("pipeP requires at least one argument");return n(arguments[0].length,Hr(k,arguments[0],Qr(arguments)))},Be=Hr(Dt,1),Fe=ie(A,[rn,vt]),Le=a(function(t,n){return be(t>=0?n.length-t:0,n)}),De=ye(d),Ve=function(t,n){return ae(n,t,0)>=0},ze=function Au(t,n){var r=function(r){var e=n.concat([t]);return Ve(r,e)?"<Circular>":Au(r,e)},e=function(t,n){return A(function(n){return I(n)+": "+r(t[n])},n.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+A(r,t).join(", ")+"))";case"[object Array]":return"["+A(r,t).concat(e(t,Xr(function(t){return/^\d+$/.test(t)},Et(t)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof t?"new Boolean("+r(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+I(M(t))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof t?"new Number("+r(t.valueOf())+")":1/t===-(1/0)?"-0":t.toString(10);case"[object String]":return"object"==typeof t?"new String("+r(t.valueOf())+")":I(t);case"[object Undefined]":return"undefined";default:return"function"==typeof t.constructor&&"Object"!==t.constructor.name&&"function"==typeof t.toString&&"[object Object]"!==t.toString()?t.toString():"{"+e(t,Et(t)).join(", ")+"}"}},_e=me(vt),Ke=function(){if(0===arguments.length)throw new Error("compose requires at least one argument");return Re.apply(this,dn(arguments))},$e=function(){return Ke.apply(this,un(vt,Rr(ye,arguments)))},He=function(){if(0===arguments.length)throw new Error("composeP requires at least one argument");return Te.apply(this,dn(arguments))},Xe=c(function(t){return ve(t.length,t)}),Ye=a(Ve),Ze=a(function(t,n){for(var r=[],e=0,u=t.length;u>e;)Ve(t[e],n)||Ve(t[e],r)||(r[r.length]=t[e]),e+=1;return r}),Ge=c(Gn("dropRepeats",C(yr),je(yr))),Je=a(function(t,n){return ue(l(Or(Ve)(t),n))}),Qe=c(function(t){return Ce(t.length,t)}),tu=a(function(t,n){var r={};for(var e in n)Ve(e,t)||(r[e]=n[e]);return r}),nu=function(){return $e.apply(this,dn(arguments))},ru=c(function(t){return ze(t,[])}),eu=a(Ke(ue,i)),uu=a(function(t,n){for(var r,e,u=0,i=[],o=[];u<n.length;)e=n[u],r=t(e),Ve(r,i)||(o.push(e),i.push(r)),u+=1;return o}),iu=Qe($),ou=Qe(_t),cu=Qe(Zt),au=a(function(t,n){return rt(t+1,function(){var r=arguments[t];if(null!=r&&Ot(Function,r[n]))return r[n].apply(r,q(arguments,0,t));throw new TypeError(ru(r)+' does not have a method named "'+n+'"')})}),fu=au(1,"join"),su=c(function(t){var n={};return function(){var r=ru(arguments);return g(r,n)||(n[r]=t.apply(this,arguments)),n[r]}}),lu=au(1,"split"),pu=a(function(t,n){if(!w(t))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+ru(t));return e(t).test(n)}),hu=au(0,"toLowerCase"),gu=au(0,"toUpperCase"),du=Or(au(1,"concat")),yu={F:Kn,T:$n,__:t,add:z,addIndex:cr,adjust:_,all:ar,allPass:le,allUniq:pe,always:K,and:$,any:fr,anyPass:he,ap:ge,aperture:sr,append:H,apply:X,assoc:Y,assocPath:Z,binary:lr,bind:G,both:iu,call:de,chain:ye,clone:pr,commute:_e,commuteMap:me,comparator:J,complement:ou,compose:Ke,composeK:$e,composeP:He,concat:du,cond:Q,construct:Xe,constructN:ve,contains:Ye,containsWith:tt,converge:xe,countBy:nt,createMapEntry:hr,curry:gr,curryN:rt,dec:et,defaultTo:ut,difference:Ze,differenceWith:it,dissoc:ot,dissocPath:ct,divide:at,drop:be,dropLast:we,dropLastWhile:ft,dropRepeats:Ge,dropRepeatsWith:je,dropWhile:dr,either:cu,empty:st,eqBy:Oe,eqProps:Ae,equals:yr,evolve:lt,filter:mr,find:vr,findIndex:xr,findLast:br,findLastIndex:wr,flatten:jr,flip:Or,forEach:Ar,fromPairs:pt,functions:Sr,functionsIn:Er,groupBy:kr,gt:ht,gte:gt,has:dt,hasIn:yt,head:Ir,identical:mt,identity:vt,ifElse:xt,inc:bt,indexOf:Se,init:Ee,insert:wt,insertAll:jt,intersection:Je,intersectionWith:Nr,intersperse:qr,into:ke,invert:Mr,invertObj:Cr,invoker:au,is:Ot,isArrayLike:At,isEmpty:Pr,isNil:St,isSet:Ie,join:fu,keys:Et,keysIn:kt,last:Ur,lastIndexOf:Wr,length:It,lens:Ne,lensIndex:qe,lensProp:Me,lift:Qe,liftN:Ce,lt:Nt,lte:qt,map:Rr,mapAccum:Mt,mapAccumRight:Ct,mapObj:Tr,mapObjIndexed:Br,match:Pt,mathMod:Ut,max:Wt,maxBy:Rt,mean:Pe,median:Ue,memoize:su,merge:Tt,mergeAll:We,min:Bt,minBy:Ft,modulo:Lt,multiply:Dt,nAry:Vt,negate:zt,none:Fr,not:_t,nth:Kt,nthArg:$t,objOf:Ht,of:Xt,omit:tu,once:Yt,or:Zt,over:Gt,pair:Jt,partial:Lr,partialRight:Dr,partition:Vr,path:Qt,pathEq:zr,pathOr:tn,pick:nn,pickAll:rn,pickBy:en,pipe:Re,pipeK:nu,pipeP:Te,pluck:_r,prepend:un,product:Be,project:Fe,prop:on,propEq:Kr,propIs:$r,propOr:cn,propSatisfies:an,props:fn,range:sn,reduce:Hr,reduceRight:ln,reduced:pn,reject:Xr,remove:hn,repeat:Yr,replace:gn,reverse:dn,scan:yn,set:mn,slice:Zr,sort:vn,sortBy:xn,split:lu,splitEvery:Gr,subtract:bn,sum:Jr,tail:Qr,take:te,takeLast:Le,takeLastWhile:wn,takeWhile:ne,tap:jn,test:pu,times:On,toLower:hu,toPairs:An,toPairsIn:Sn,toString:ru,toUpper:gu,transduce:re,trim:En,type:kn,unapply:In,unary:Nn,uncurryN:qn,unfold:Mn,union:eu,unionWith:ee,uniq:ue,uniqBy:uu,uniqWith:Cn,unless:Pn,unnest:De,update:Un,useWith:ie,values:Wn,valuesIn:Rn,view:Tn,when:Bn,where:Fn,whereEq:oe,wrap:Ln,xprod:Dn,zip:Vn,zipObj:zn,zipWith:_n};"object"==typeof exports?module.exports=yu:"function"==typeof define&&define.amd?define(function(){return yu}):this.R=yu}).call(this);