-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbundle.js
executable file
·2 lines (2 loc) · 42.5 KB
/
bundle.js
1
2
!function(t){function e(i){if(o[i])return o[i].exports;var n=o[i]={exports:{},id:i,loaded:!1};return t[i].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){"use strict";window.init=function(){console.log("ho");var t="https://the-tasty-samosa.appspot.com/_ah/api";gapi.client.load("samosa","v1",function(){console.log("Root");var t=o(1),e=o(2),i=o(12),n=o(16),a=o(20),s=o(21),r=o(17),p=o(18),c=o(14),l=o(13),h=o(22),d=(o(24),o(23)),u=o(25),g=t.createClass({displayName:"Router",getInitialState:function(){return{component:"<div />"}},componentDidMount:function(){var o=this;this.props.routes.forEach(function(i){var a=i[0],s=i[1];e(a,function(e){var i=new RegExp("/admin/dashboard","gi");a.match(i)?t.renderComponent(h(null),document.getElementById("left-side-bar")):t.renderComponent(n(null),document.getElementById("left-side-bar")),console.log("hi"),document.getElementById("left-side-bar").style.display="block",document.getElementById("wrapper").style.display="block",o.setState({component:s({params:e.params})})})}),e.start()},render:function(){return t.DOM.div(null," ",this.state.component," ")}}),f=[["",a],["/popular-now",a],["/most-recent",p],["/search/:queryText",s],["/login",r],["/play/:key",c],["/embed/:key",l],["/admin/dashboard",u],["/admin/dashboard/:view-approved",d]];t.renderComponent(i(null),document.getElementById("header")),t.renderComponent(g({routes:f}),document.getElementById("right-side-bar"))},t)}},function(t,e,o){t.exports=React},function(t,e,o){(function(e){"use strict";function i(t,e){if("function"==typeof t)return i("*",t);if("function"==typeof e)for(var o=new r(t),n=1;n<arguments.length;++n)i.callbacks.push(o.middleware(arguments[n]));else"string"==typeof t?i["string"==typeof e?"redirect":"show"](t,e):i.start(t)}function n(t){if(!t.handled){var e;e=x?y+f.hash.replace("#!",""):f.pathname+f.search,e!==t.canonicalPath&&(i.stop(),t.handled=!1,f.href=t.canonicalPath)}}function a(t){return"string"!=typeof t?t:v?decodeURIComponent(t.replace(/\+/g," ")):t}function s(t,e){"/"===t[0]&&0!==t.indexOf(y)&&(t=y+(x?"#!":"")+t);var o=t.indexOf("?");if(this.canonicalPath=t,this.path=t.replace(y,"")||"/",x&&(this.path=this.path.replace("#!","")||"/"),this.title=document.title,this.state=e||{},this.state.path=t,this.querystring=~o?a(t.slice(o+1)):"",this.pathname=a(~o?t.slice(0,o):t),this.params={},this.hash="",!x){if(!~this.path.indexOf("#"))return;var i=this.path.split("#");this.path=i[0],this.hash=a(i[1])||"",this.querystring=this.querystring.split("#")[0]}}function r(t,e){e=e||{},this.path="*"===t?"(.*)":t,this.method="GET",this.regexp=h(this.path,this.keys=[],e.sensitive,e.strict)}function p(t){if(1===c(t)&&!(t.metaKey||t.ctrlKey||t.shiftKey||t.defaultPrevented)){for(var o=t.target;o&&"A"!==o.nodeName;)o=o.parentNode;if(o&&"A"===o.nodeName&&!o.hasAttribute("download")&&"external"!==o.getAttribute("rel")){var n=o.getAttribute("href");if((x||o.pathname!==f.pathname||!o.hash&&"#"!==n)&&!(n&&n.indexOf("mailto:")>-1)&&!o.target&&l(o.href)){var a=o.pathname+o.search+(o.hash||"");"undefined"!=typeof e&&a.match(/^\/[a-zA-Z]:\//)&&(a=a.replace(/^\/[a-zA-Z]:\//,"/"));var s=a;0===a.indexOf(y)&&(a=a.substr(y.length)),x&&(a=a.replace("#!","")),y&&s===a||(t.preventDefault(),i.show(s))}}}}function c(t){return t=t||window.event,null===t.which?t.button:t.which}function l(t){var e=f.protocol+"//"+f.hostname;return f.port&&(e+=":"+f.port),t&&0===t.indexOf(e)}var h=o(26);t.exports=i;var d,u,g="undefined"!=typeof document&&document.ontouchstart?"touchstart":"click",f="undefined"!=typeof window&&(window.history.location||window.location),m=!0,v=!0,y="",x=!1;i.callbacks=[],i.exits=[],i.current="",i.len=0,i.base=function(t){return 0===arguments.length?y:void(y=t)},i.start=function(t){if(t=t||{},!d&&(d=!0,!1===t.dispatch&&(m=!1),!1===t.decodeURLComponents&&(v=!1),!1!==t.popstate&&window.addEventListener("popstate",b,!1),!1!==t.click&&document.addEventListener(g,p,!1),!0===t.hashbang&&(x=!0),m)){var e=x&&~f.hash.indexOf("#!")?f.hash.substr(2)+f.search:f.pathname+f.search+f.hash;i.replace(e,null,!0,m)}},i.stop=function(){d&&(i.current="",i.len=0,d=!1,document.removeEventListener(g,p,!1),window.removeEventListener("popstate",b,!1))},i.show=function(t,e,o,n){var a=new s(t,e);return i.current=a.path,!1!==o&&i.dispatch(a),!1!==a.handled&&!1!==n&&a.pushState(),a},i.back=function(t,e){i.len>0?(history.back(),i.len--):t?setTimeout(function(){i.show(t,e)}):setTimeout(function(){i.show(y,e)})},i.redirect=function(t,e){"string"==typeof t&&"string"==typeof e&&i(t,function(t){setTimeout(function(){i.replace(e)},0)}),"string"==typeof t&&"undefined"==typeof e&&setTimeout(function(){i.replace(t)},0)},i.replace=function(t,e,o,n){var a=new s(t,e);return i.current=a.path,a.init=o,a.save(),!1!==n&&i.dispatch(a),a},i.dispatch=function(t){function e(){var t=i.exits[r++];return t?void t(a,e):o()}function o(){var e=i.callbacks[s++];return t.path!==i.current?void(t.handled=!1):e?void e(t,o):n(t)}var a=u,s=0,r=0;u=t,a?e():o()},i.exit=function(t,e){if("function"==typeof t)return i.exit("*",t);for(var o=new r(t),n=1;n<arguments.length;++n)i.exits.push(o.middleware(arguments[n]))},i.Context=s,s.prototype.pushState=function(){i.len++,history.pushState(this.state,this.title,x&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},s.prototype.save=function(){history.replaceState(this.state,this.title,x&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},i.Route=r,r.prototype.middleware=function(t){var e=this;return function(o,i){return e.match(o.path,o.params)?t(o,i):void i()}},r.prototype.match=function(t,e){var o=this.keys,i=t.indexOf("?"),n=~i?t.slice(0,i):t,s=this.regexp.exec(decodeURIComponent(n));if(!s)return!1;for(var r=1,p=s.length;p>r;++r){var c=o[r-1],l=a(s[r]);void 0===l&&hasOwnProperty.call(e,c.name)||(e[c.name]=l)}return!0};var b=function(){var t=!1;if("undefined"!=typeof window)return"complete"===document.readyState?t=!0:window.addEventListener("load",function(){setTimeout(function(){t=!0},0)}),function(e){if(t)if(e.state){var o=e.state.path;i.replace(o,e.state)}else i.show(f.pathname+f.hash,void 0,void 0,!1)}}();i.sameOrigin=l}).call(e,o(28))},function(t,e,o){"use strict";var i=o(1);t.exports=i.createClass({displayName:"exports",getInitialState:function(){return{hover:!1}},hover:function(){this.setState({hover:!this.state.hover})},render:function(){var t={mozBoxShadow:"inset -4px -19px 0px -36px #e67a73",webkitBoxShadow:"inset -4px -19px 0px -36px #e67a73",boxShadow:"inset -4px -19px 0px -36px #e67a73",backgroundColor:"#BD081C",display:"inline-block",cursor:"pointer",color:"#ffffff",fontSize:"12px",padding:"4px",textDecoration:"none",border:"solid 1px #BD081C",width:"100%",height:"100%"};return this.state.hover&&(t.backgroundImage="-webkit-linear-gradient(#e3262e, #ab171e)",t.backgroundColor="#ab171e"),i.DOM.button({onMouseEnter:this.hover,onMouseLeave:this.hover,style:t}," ",this.props.text," ")}})},function(t,e,o){"use strict";var i=o(1),n=o(2),a=o(3),s=o(5),r=i.createClass({displayName:"Clip",getInitialState:function(){return{mouseEnter:!1}},MouseEvent:function(){this.setState({mouseEnter:!this.state.mouseEnter})},processText:function(t){return t.replace(/-/g," ")},handleCopyClick:function(t){window.prompt("Copy to clipboard: Ctrl+C, Enter","http://app.getsamosa.com/play/"+t)},navigate:function(t){n(t)},render:function(){var t=this.props.data.poster_url,e={height:"218px",boxShadow:"0 2px 1px rgba(0, 0, 0, 0.3)",position:"relative",minHeight:"1px",borderRadius:"2px",width:"150px","float":"left",margin:"8px",cursor:"pointer",background:"white"},o={position:"relative",overflow:"hidden",backgroundImage:"url("+t+")",backgroundRepeat:"no-repeat",backgroundSize:"150px 150px",height:"150px"},n={whiteSpace:"nowrap",overflow:"hidden",fontSize:"13px",marginTop:"9px",marginBottom:"7px",marginRight:"7px",marginLeft:"6px",textAlign:"center"},r={border:"1px solid #f5f5f1",margin:"0px"},p={width:"55px","float":"left",textAlign:"center",marginLeft:"10px"},c={width:"55px","float":"right",textAlign:"center"},l={background:"rgba(0, 0, 0, .2)",textAlign:"center",width:"100%",height:"100%",transition:"all 0.3s ease-in-out"},h={marginTop:"9px"},d={display:"none",height:"32px"},u={marginRight:"4px","float":"left",width:"12px"},g={lineHeight:"12px","float":"left",fontSize:"10px"};return this.state.mouseEnter?(l.opacity=1,d.display="block",h.display="none"):(l.opacity=0,d.display="none",h.display="block"),i.DOM.div({onMouseLeave:this.MouseEvent,onMouseEnter:this.MouseEvent,style:e},i.DOM.div(null,i.DOM.div(null,i.DOM.div({style:o},i.DOM.div({style:l},s({opusURL:this.props.data.opus_url,mp3URL:this.props.data.mp3_url,frameWidth:150,frameHeight:150,controlSize:10}))),i.DOM.div(null,i.DOM.p({onClick:this.navigate.bind(this,"/play/"+this.props.data.key),style:n}," ",this.processText(this.props.data.caption)," "),i.DOM.hr({style:r})),i.DOM.div({onClick:this.handleCopyClick.bind(this,this.props.data.key),style:d},a({text:"SHARE"})),i.DOM.div({style:h},i.DOM.div({style:p},i.DOM.img({style:u,src:"/static/images/heart.png"}),i.DOM.span({style:g}," ",this.props.data.hearts," ")),i.DOM.div({style:c},i.DOM.img({style:u,src:"https://d3pl14o4ufnhvd.cloudfront.net/v2/uploads/67b846c5-9b77-4a95-a2dd-d693142ec62c/248efd9e468170fdaec1a1025760c23f0fe3adaa_original.png"}),i.DOM.span({style:g}," ",this.props.data.shares," "))))))}});t.exports=i.createClass({displayName:"exports",render:function(){var t={overflow:"hidden"};if(this.props.clips)var e=this.props.clips.map(function(t,e){return r({data:t,key:e})});return i.DOM.div({style:t,id:"show-clips"},e)}})},function(t,e,o){var i=o(1);CircularProgressBarGraphic=i.createClass({displayName:"CircularProgressBarGraphic",componentDidMount:function(){var t=this.getDOMNode().getContext("2d");t.width=this.props.width,t.height=this.props.height,t.translate(t.width/2,t.height/2),t.rotate(-1*Math.PI/2),this.paint(t)},componentDidUpdate:function(){var t=this.getDOMNode(),e=t.getContext("2d");e.clearRect(0,0,t.width,t.height),this.paint(e)},paint:function(t){var e=(this.props.width-this.props.lineWidth)/2;t.beginPath(),t.arc(0,0,e,0,2*Math.PI*this.props.percent,!1),t.strokeStyle="#ff0000",t.lineCap="round",t.lineWidth=this.props.lineWidth,t.stroke()},render:function(){return i.DOM.canvas({width:this.props.width,height:this.props.height,style:this.props.style})}});var n=i.createClass({displayName:"CircularProgressBar",render:function(){return this.props.percent?CircularProgressBarGraphic({width:this.props.width,height:this.props.height,style:this.props.style,percent:this.props.percent,lineWidth:this.props.lineWidth}):i.DOM.div({style:this.props.style})}}),a={STOPPED:0,LOADING:1,PLAYING:2,PAUSED:3,ENDED:4},s="undefined"!=typeof Audio?new Audio:null,r=i.createClass({displayName:"AudioPlayer",getInitialState:function(){return{currentState:a.STOPPED,currentTime:0,duration:0}},onClick:function(){this.state.currentState==a.STOPPED||this.state.currentState==a.ENDED?(console.log("listen"),Parse.Analytics.track("Listens",{device:"Iframe"}),s.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,"")?s.src=this.props.opusURL:s.canPlayType("audio/mpeg;").replace(/^no$/,"")&&(s.src=this.props.mp3URL),s.play(),s.onended=this.onEnded,s.ontimeupdate=this.onTimeUpdate,this.setState({currentState:a.LOADING})):this.state.currentState==a.PLAYING?(s.pause(),this.setState({currentState:a.PAUSED})):this.state.currentState==a.PAUSED&&(s.play(),this.setState({currentState:a.PLAYING}))},onTimeUpdate:function(t){this.state.currentState!==a.PAUSED&&this.setState({duration:s.duration,currentState:a.PLAYING,currentTime:s.currentTime})},onEnded:function(){console.log("hi"),this.setState({currentState:a.ENDED,currentTime:0})},componentDidMount:function(){this.props.autoPlay&&this.onClick()},handleDownloadIconClick:function(t){console.log("hi"),Parse.Analytics.track("DownloadIconClick",{device:"Iframe",download_redirect:t})},render:function(){var t=i.DOM.img({width:"35",src:"/static/images/play.png"});this.state.currentState==a.LOADING?t=i.DOM.img({width:"35",src:"/static/images/spinner.gif"}):this.state.currentState==a.PLAYING&&(t=i.DOM.img({width:"35",src:"/static/images/pause.png"}));var e=10,o={position:"absolute",left:"43%",top:"40%",background:"rgba(0, 0, 0, 0.7)",borderRadius:"8px",padding:e,cursor:"pointer"},s={position:"absolute",top:e,left:e},r=(this.props.frameWidth/6,{display:"none",width:"100%",position:"absolute",background:"rgba(0, 0, 0, 0.7)",bottom:"0px",padding:"5px"}),p={width:"20%",marginLeft:"5%"};return this.state.currentState==a.ENDED&&(r.display="block"),i.DOM.div(null,i.DOM.div({style:o,onClick:this.onClick},t,n({style:s,width:36,height:36,lineWidth:4,percent:Math.min(Math.max(0,this.state.currentTime/this.state.duration||0),1)})),i.DOM.div({style:r},i.DOM.div({style:{color:"white",marginBottom:"12px",marginLeft:"10px",fontSize:"14px"}}," To share this clip on Whatsapp"),i.DOM.a({onClick:this.handleDownloadIconClick.bind(this,"android"),target:"_top",href:"https://play.google.com/store/apps/details?id=com.getsamosa"},i.DOM.img({style:p,src:"https://www.gstatic.com/android/market_images/web/play_logo_x2.png"})),i.DOM.a({onClick:this.handleDownloadIconClick.bind(this,"apple"),target:"_top",href:"https://itunes.apple.com/in/app/samosa-chat/id973054666?mt=8"},i.DOM.img({style:p,src:"http://www.yallatruck.com/wp-content/uploads/2014/08/apple-app-store-icon.jpg"})),i.DOM.a({onClick:this.handleDownloadIconClick.bind(this,"windows"),target:"_top",href:"https://www.microsoft.com/en-us/store/apps/samosa-chat/9nblggh0lcd0"},i.DOM.img({style:p,src:"https://i-msdn.sec.s-msft.com/dynimg/IC795460.png"})),i.DOM.a({onClick:this.handleDownloadIconClick.bind(this,"chrome-plugin"),target:"_top",href:"https://chrome.google.com/webstore/detail/samosa/acghjnlbnackkloofkiebcicedbfipbg?hl=en"},i.DOM.img({style:p,src:"https://www.mailvelope.com/img/ChromeWebStore_Badge_v2_340x96.png"}))))}});t.exports=r},function(t,e,o){"use strict";var i=o(1),n=o(7),a=o(8),s=o(10),r=o(3),p=i.createClass({displayName:"actionButton",handleOnClick:function(){this.props.action(this.props.tag_value)},render:function(){return i.DOM.div({onClick:this.handleOnClick},r({text:this.props.text}))}}),c=i.createClass({displayName:"tdItem",render:function(){var t={textAlign:"center",padding:"5px",borderBottom:"1px solid #cbcbcb"};if(this.props.data){var e=["png","jpg"],o=["opus","mp3"];if(-1!=e.indexOf(this.props.data.split(".").pop()))var n=a({width:"80",src:this.props.data});else if(-1!=o.indexOf(this.props.data.split(".").pop()))var n=s({src:this.props.data});else var n=this.props.data}if(this.props.action)var n=p({tag_value:this.props.tag_value,text:this.props.name,action:this.props.action});return i.DOM.td({style:t},n)}}),l=i.createClass({displayName:"trItem",searchResult:function(){if(this.props.tdData){for(var t in this.props.tdData)if(-1!=this.props.tags.indexOf(t)){var e=this.props.tdData[t],o=new RegExp(this.props.search_value,"gi");if(e&&e.match(o))return!0}return!1}},render:function(){var t=[];if(this.props.tdData&&(this.searchResult()||""==this.props.search_value)){for(var e in this.props.tags){var o=this.props.tags[e],n=null!=this.props.tdData[o]?this.props.tdData[o]:null;t.push(c({data:n}))}if(this.props.actions)for(var a in this.props.actions){var s=this.props.actions[a],e=s.tag;t.push(c({tag_value:this.props.tdData[e],name:s.name,action:s["function"]}))}}return i.DOM.tr(null,t)}});t.exports=i.createClass({displayName:"exports",getInitialState:function(){return{search_value:"",sort_tag:"",sort_ascending:"false"}},searchTags:function(t){this.setState({search_value:t})},thOnClick:function(t){this.setState({sort_tag:t,sort_ascending:!this.state.sort_ascending})},render:function(){var t={border:"1px solid #cbcbcb",fontSize:"15px",background:"white"},e={width:"400px"};if(this.props.buttons){var o=this.props.data;console.log(o)}if(this.props.data){var a=this;this.state.sort_tag&&this.props.data.sort(function(t,e){return a.state.sort_ascending?t[a.state.sort_tag]-e[a.state.sort_tag]:e[a.state.sort_tag]-t[a.state.sort_tag]});var s=this.props.data.map(function(t,e){return l({actions:a.props.actions,search_value:a.state.search_value,tdData:t,key:e,tags:a.props.tags})})}if(this.props.tags)var a=this,r={backgroundColor:"#e0e0e0",color:"#000",textAlign:"center",padding:"8px",cursor:"pointer"},p=this.props.tags.map(function(t,e){return i.DOM.th({onClick:a.thOnClick.bind(a,t),style:r},t)});return i.DOM.div(null,i.DOM.div({style:e},n({placeholder:"search for tags",keyup:this.searchTags})),i.DOM.table({className:"table",style:t},i.DOM.tr(null,p),s))}})},function(t,e,o){"use strict";var i=o(1);t.exports=i.createClass({displayName:"exports",getInitialState:function(){return{focus_flag:!1}},Focus:function(){this.setState({focus_flag:!this.state.focus_flag})},keyUp:function(t){this.props.keyup(t.target.value)},render:function(){var t={width:"100%",height:"100%",lineHeight:"38px",paddingLeft:"10px",color:"#999",border:"1px solid #dcdcdc",fontFamily:"Helvetica,Arial",fontSize:"12px",margin:"5px",boxShadow:"1px 1px 7px #dcdcdc"};return this.state.focus_flag&&(t.outline="none",t.border="1px solid #d43f3a"),i.DOM.input({onKeyUp:this.keyUp,onFocus:this.Focus,onBlur:this.Focus,name:this.props.name,ref:this.props.ref,placeholder:this.props.placeholder,style:t})}})},function(t,e,o){"use strict";var i=o(1);t.exports=i.createClass({displayName:"exports",render:function(){return i.DOM.a({href:""},i.DOM.img({width:this.props.width,height:this.props.height,src:this.props.src}))}})},function(t,e,o){"use strict";var i=o(1),n=o(2),a=i.createClass({displayName:"ListItem",getDefaultProps:function(){return{isSelected:!1}},getInitialState:function(){return{hover_flag:!1,isSelected:!1}},hoverEvent:function(){this.setState({hover_flag:!this.state.hover_flag})},render:function(){var t={width:"20px","float":"left",marginLeft:"11px",marginRight:"11px",marginTop:"9px",WebkitFilter:"grayscale(1)"},e={"float":"left"},o={width:"100%",background:"white",height:"34px",textAlign:"center",lineHeight:"34px",listStyleType:"none",color:"#7f919e",fontSize:"14px",marginBottom:"5px",cursor:"pointer",border:"1px solid #e0e3e9",borderRadius:"3px"};return(this.props.isSelected||this.state.hover_flag)&&(t.WebkitFilter="grayscale(0)",o.color="#cc181e",o.background="#f8fafd"),i.DOM.li({onClick:this.props.click,onMouseEnter:this.hoverEvent,onMouseLeave:this.hoverEvent,style:o,key:this.props.name},i.DOM.img({style:t,src:this.props.image}),i.DOM.span({style:e}," ",this.props.name," "))}});t.exports=i.createClass({displayName:"exports",getInitialState:function(){return{click_flag:null}},clickEvent:function(t,e){this.setState({click_flag:t}),n("/"+e)},render:function(){var t={padding:"0px",margin:"20px"},e=this,o=this.props.data.map(function(t,o){var i=e.state.click_flag===o;return a({image:t.image_url,click:e.clickEvent.bind(e,o,t.url),isSelected:i,name:t.name,key:o})});return i.DOM.ul({style:t},o)}})},function(t,e,o){"use strict";var i=o(1);t.exports=i.createClass({displayName:"exports",componentDidUpdate:function(t,e){this.refs.audio.getDOMNode().load()},render:function(){return i.DOM.audio({ref:"audio",className:"audio",controls:!0},i.DOM.source({src:this.props.src}),"Your browser does not support the audio element.")}})},function(t,e,o){"use strict";var i=o(1);t.exports=i.createClass({displayName:"exports",getInitialState:function(){return{hover:!1}},hover:function(){this.setState({hover:!this.state.hover})},render:function(){var t={color:this.props.color,cursor:"pointer"};return this.state.hover&&(t.color=this.props.hover_color),i.DOM.a({onMouseEnter:this.hover,onMouseLeave:this.hover,style:t}," ",this.props.text," ")}})},function(t,e,o){"use strict";var i=o(1),n=o(2),a=o(8),s=o(7),r=o(3),p=o(11),c=o(15);t.exports=i.createClass({displayName:"exports",getInitialState:function(){return{queryText:null,open_modal:null,login:!1}},componentDidMount:function(){this.checkLogin(),window.fbAsyncInit=function(){FB.init({appId:"580678502050494",cookie:!0,xfbml:!0,version:"v2.1"}),FB.getLoginStatus(function(t){this.statusChangeCallback(t)}.bind(this))}.bind(this),function(t,e,o){var i,n=t.getElementsByTagName(e)[0];t.getElementById(o)||(i=t.createElement(e),i.id=o,i.src="//connect.facebook.net/en_US/sdk.js",n.parentNode.insertBefore(i,n))}(document,"script","facebook-jssdk")},testAPI:function(t){if(!sessionStorage.getItem("samosa_key")){console.log("Welcome! Fetching your information.... ");var e=this,o=t.authResponse.accessToken;FB.api("/me",function(t){e.setCookie(o,t)})}},statusChangeCallback:function(t){"connected"===t.status?this.testAPI(t):"not_authorized"===t.status},checkLoginState:function(){FB.getLoginStatus(function(t){this.statusChangeCallback(t)}.bind(this))},setCookie:function(t,e){var o={facebook_id:e.id,email:e.email,full_name:e.name,gender:e.gender,facebook_token:t},i=this;gapi.client.samosa.api.auth.fb.login(o).execute(function(t){sessionStorage.setItem("samosa_key",t.auth_key),i.checkLogin()})},handleLoginClick:function(){FB.login(this.checkLoginState,{scope:"public_profile,email"})},handleLogoutClick:function(){FB.logout(),sessionStorage.setItem("samosa_key",""),this.setState({login:!1})},handleSubmimt:function(t){t.preventDefault();var e=this.refs.search.getDOMNode().value;n("/search/"+e)},openModal:function(){this.setState({open_modal:!0})},closeModal:function(){this.setState({open_modal:!1})},navigate:function(t){n(t)},checkLogin:function(){sessionStorage.getItem("samosa_key")&&this.setState({login:!0})},render:function(){var t={display:"block",width:"100%",backgroundColor:"#fff",height:"59px",position:"fixed",top:"0",left:"0",boxShadow:"0 0 5px rgba(0, 0, 0, .12)",zIndex:100},e={"float":"left",fontSize:"24px",marginTop:"9px",marginLeft:"5px",width:"134px",cursor:"pointer"},o={"float":"left",marginLeft:"20px",marginTop:"9px"},n={"float":"left",width:"43%",marginTop:"3px"},l={"float":"right",marginTop:"15px",width:"280px",height:"auto"},h={"float":"left",width:"100px",height:"30px",marginLeft:"38px",display:"block"},d={"float":"left",width:"100px",height:"30px",marginLeft:"38px",display:"block"},u={fontSize:"10px",width:"auto","float":"left",margin:"7px"},g={display:"none"};return this.state.open_modal&&(g.display="block"),this.state.login?h.display="none":d.display="none",i.DOM.div(null,i.DOM.div({style:t},i.DOM.div({onClick:this.navigate.bind(this,"/")},i.DOM.div({style:o}," ",a({src:"https://lh5.ggpht.com/oJpCSXfyxWeLDSM8GKN-SHyv8ZK29pF2NURecNkK1aQD_9mH0ZYscux07oNPgxog28RU=w300",width:"35",height:"35"})," "),i.DOM.div({style:e}," SAMOSA ")),i.DOM.div({id:"wrapper"},i.DOM.div({style:n},i.DOM.form({onSubmit:this.handleSubmimt},s({ref:"search",placeholder:"Search For Audio Clips"}))),i.DOM.div({style:l},i.DOM.div({onClick:this.openModal,style:u},p({text:"SELECT LANGUAGES",color:"black",hover_color:"#cc181e"})," "),i.DOM.div({onClick:this.handleLoginClick,style:h}," ",r({text:"LOGIN"})," "),i.DOM.div({onClick:this.handleLogoutClick,style:d}," ",r({text:"LOGOUT"})," ")))),i.DOM.div({style:g}," ",c({close_modal:this.closeModal})," "))}})},function(t,e,o){"use strict";var i=o(1),n=o(5),a=(i.createClass({displayName:"StoryImage",render:function(){return i.DOM.img({width:"100%",height:"100%",src:this.props.src})}}),i.createClass({displayName:"PoweredByMessage",handleLogoOnClick:function(){Parse.Analytics.track("LogoClick",{device:"Iframe"})},render:function(){var t={position:"fixed",top:"0px",left:"0px",background:"rgba(0, 0, 0, 0.4)",padding:"4px"};return i.DOM.div({style:t},i.DOM.a({onClick:this.handleLogoOnClick,href:"http://getsamosa.com",target:"_blank"},i.DOM.img({style:{"float":"left",marginRight:"4px"},width:"24px",height:"24px",src:"https://lh5.ggpht.com/oJpCSXfyxWeLDSM8GKN-SHyv8ZK29pF2NURecNkK1aQD_9mH0ZYscux07oNPgxog28RU=w300"}),i.DOM.div({style:{"float":"left",color:"white",marginTop:"4px",whiteSpace:"nowrap"}},"Powered by Samosa!")))}}));t.exports=i.createClass({displayName:"exports",getInitialState:function(){return Parse.Analytics.track("IframeEmbeds",{device:"Iframe"}),document.getElementById("left-side-bar").style.display="None",document.getElementById("header").style.display="None",{voice:[]}},componentDidMount:function(){this.search_by_key()},search_by_key:function(){var t=this;gapi.client.samosa.api.get_expression_by_key({id:this.props.params.key}).execute(function(e){t.setState({voice:e})})},render:function(){var t=this.state.voice.poster_url,e={position:"absolute",top:"0px",bottom:"0px",display:"block",width:"100%",backgroundImage:"url("+t+")",backgroundRepeat:"no-repeat",backgroundSize:"cover"},o=512,s=512;return"undefined"!=typeof window&&(o=window.innerWidth,s=window.innerHeight),console.log(s),console.log(o),i.DOM.div(null,i.DOM.div({style:e},n({frameWidth:o,frameHeight:s,controlSize:64,opusURL:this.state.voice.opus_url,mp3URL:this.state.voice.mp3URL}),a(null)))}})},function(t,e,o){"use strict";var i=o(1),n=o(5),a=o(4),s=(o(19),o(7)),r=i.createClass({displayName:"showClip",getInitialState:function(){return{related_voices:[],iframe_width:0,iframe_height:0,preview_url:!1}},componentDidMount:function(){var t=this;gapi.client.samosa.api.expressions.popular_by_rank().execute(function(e){t.setState({related_voices:e.voices})})},handleIframeSubmit:function(){var t=this.refs.iframe_height.getDOMNode().value,e=this.refs.iframe_width.getDOMNode().value;e||(e=0),t||(t=0),this.refs.preview_url.getDOMNode().value="<iframe src='https://dashboard-dev-dot-the-tasty-samosa.appspot.com/embed/"+this.props.voice.key+"' width='"+e+"' height='"+t+"' border='0' scrolling='no' frameBorder='0'></iframe>",this.setState({iframe_height:t,iframe_width:e,preview_url:!0})},render:function(){var t=this.props.voice.poster_url,e={position:"relative",backgroundImage:"url("+t+")",backgroundRepeat:"no-repeat",backgroundSize:"cover",height:"355px",overflow:"hidden"},o={marginTop:"9px",width:"370px",borderBottom:"1px solid #e8e8e8",height:"30px"},r={marginRight:"4px","float":"left",width:"15px"},p={lineHeight:"12px","float":"left",fontSize:"13px",marginTop:"2px"},c={"float":"left",textAlign:"center",margin:"5px"},l={"float":"left",textAlign:"center",margin:"5px"},h={"float":"left",background:"white",border:"1px solid #e8e8e8",padding:"5px"},d={paddingTop:"10px",paddingBottom:"10px",width:"370px",fontSize:"21px"},u={"float":"right",width:"500px",background:"white",height:"100%",border:"1px solid #e8e8e8",padding:"10px"},g={"float":"left"},f={"float":"left",margin:"12px",width:"300px"},m=this.props.voice.tags.reduce(function(t,e){return t+", "+e}),v={display:"none",width:"350px"};this.state.preview_url&&(v.display="block");var y="/embed/"+this.props.voice.key;return i.DOM.div(null,i.DOM.div({style:h},i.DOM.div({style:e},n({opusURL:this.props.voice.opus_url,mp3URL:this.props.voice.mp3_url,frameWidth:370,frameHeight:355,controlSize:10})),i.DOM.div({style:d},this.props.voice.transcript,i.DOM.div({style:o},i.DOM.div({style:c},i.DOM.img({style:r,src:"/static/images/heart.png"}),i.DOM.span({style:p}," ",this.props.voice.hearts," ")),i.DOM.div({style:l},i.DOM.img({style:r,src:"https://d3pl14o4ufnhvd.cloudfront.net/v2/uploads/67b846c5-9b77-4a95-a2dd-d693142ec62c/248efd9e468170fdaec1a1025760c23f0fe3adaa_original.png"}),i.DOM.span({style:p}," ",this.props.voice.shares," ")))),i.DOM.div({style:g},i.DOM.img({src:"http://iconizer.net/files/IconSweets_2/orig/tags.png"})),i.DOM.div({style:f}," ",m," "),"Embed Clip: ",i.DOM.hr(null),i.DOM.input({placeholder:"width",ref:"iframe_width"}),i.DOM.input({placeholder:"height",ref:"iframe_height"}),i.DOM.button({onClick:this.handleIframeSubmit},"Preview"),i.DOM.br(null),i.DOM.br(null),"Preview Url: ",i.DOM.hr(null),i.DOM.div({style:v},s({ref:"preview_url",placeholder:"preview url"})),i.DOM.br(null),i.DOM.iframe({src:y,width:this.state.iframe_width,height:this.state.iframe_height,border:"0",scrolling:"no",frameBorder:"0"})),i.DOM.div({style:u},"RELEATED VIDEOS ",i.DOM.hr(null),a({clips:this.state.related_voices})))}});t.exports=i.createClass({displayName:"exports",getInitialState:function(){return{voice:null,search_result:!0,related_voices:[]}},componentDidMount:function(){this.search_by_key()},componentDidUpdate:function(){},search_by_key:function(){var t=this;console.log(this.props.params.key),gapi.client.samosa.api.get_expression_by_key({id:this.props.params.key}).execute(function(e){console.log(e),t.setState({voice:e})})},render:function(){var t={position:"absolute",marginLeft:"20%",top:"60px",bottom:"0px",display:"block",padding:"9px",width:"78%"};if(this.state.voice)var e=r({voice:this.state.voice});return i.DOM.div(null,i.DOM.div({style:t},e))}})},function(t,e,o){"use strict";var i=o(1),n=o(3);t.exports=i.createClass({displayName:"exports",componentDidMount:function(){window.addEventListener("keyup",this.handleKeyUp)},changeLanguage:function(){for(var t=document.getElementsByClassName("checkbox"),e=[],o=0;o<t.length;o++)if(t[o].checked){var i=t[o].value;e.push(i)}gapi.client.samosa.api.modify_user_language_preference({auth_key:sessionStorage.getItem("samosa_key"),languages:e}).execute(function(t){t.value&&(window.location.href="/popular-now")})},blur:function(){this.props.close_modal()},handleKeyUp:function(t){27==t.keyCode&&this.props.close_modal()},render:function(){console.log(sessionStorage.getItem("samosa_key"));var t={visibility:"visible",position:"absolute",left:"0px",top:"0px",width:"100%",height:"100%",zIndex:"300",background:"rgba(0, 0, 0, 0.8)"},e={position:"absolute",width:"600px",height:"300px",left:"24%",top:"20%",backgroundColor:"#fff",border:"1px solid #000",padding:"15px",zIndex:"500"},o={display:"block",textAlign:"center"},a={display:"block"},s={width:"100px",height:"30px"};return sessionStorage.getItem("samosa_key")?o.display="none":a.display="none",i.DOM.div(null,i.DOM.div({onClick:this.blur,style:t}),i.DOM.div({style:e},i.DOM.div({style:o},"Please Login To Access This Feature"),i.DOM.div({style:a},"SELECT LANGUAGES ",i.DOM.hr(null),i.DOM.input({type:"checkbox",className:"checkbox",value:"hindi"}),"Hindi",i.DOM.br(null),i.DOM.input({type:"checkbox",className:"checkbox",value:"tamil"}),"Tamil",i.DOM.br(null),i.DOM.input({type:"checkbox",className:"checkbox",value:"telugu"}),"Telugu",i.DOM.br(null),i.DOM.input({type:"checkbox",className:"checkbox",value:"kannada"}),"Kannada",i.DOM.br(null),i.DOM.input({type:"checkbox",className:"checkbox",value:"malayalam"}),"Malayalam",i.DOM.br(null),i.DOM.br(null),i.DOM.div({style:s,onClick:this.changeLanguage},n({text:"SUBMIT"})))))}})},function(t,e,o){"use strict";var i=o(1),n=o(9);t.exports=i.createClass({displayName:"exports",render:function(){var t={position:"fixed",background:"white",height:"100%",left:"0",top:"60px",bottom:"0",display:"block",width:"200px",borderRight:"1px solid #e8e8e8"},e=[{name:"Trending Now",url:"popular-now",image_url:"https://www.kewlcircle.com/assets/images/trending.png"},{name:"Most Recent",url:"most-recent",image_url:"http://www.tablespoon.com/-/media/Images/Landing%20Page%20Icons/icon-recent.png"}],o={paddingTop:"10px",margin:"10px",border:"1px solid #e8e8e8",padding:"20px"};return i.DOM.div({style:t},n({data:e}),i.DOM.div({style:o},"Available In ",i.DOM.hr(null),i.DOM.br(null),i.DOM.a({href:"https://play.google.com/store/apps/details?id=com.getsamosa"},i.DOM.img({width:"100",src:"https://www.gstatic.com/android/market_images/web/play_logo_x2.png"})),i.DOM.br(null)," ",i.DOM.br(null),i.DOM.a({href:"https://itunes.apple.com/in/app/samosa-chat/id973054666?mt=8"},i.DOM.img({width:"100",src:"http://www.yallatruck.com/wp-content/uploads/2014/08/apple-app-store-icon.jpg"})),i.DOM.br(null),i.DOM.br(null),i.DOM.a({href:"https://www.microsoft.com/en-us/store/apps/samosa-chat/9nblggh0lcd0"},i.DOM.img({width:"100",src:"https://i-msdn.sec.s-msft.com/dynimg/IC795460.png"})),i.DOM.br(null),i.DOM.br(null),i.DOM.a({href:"https://chrome.google.com/webstore/detail/samosa/acghjnlbnackkloofkiebcicedbfipbg?hl=en"},i.DOM.img({width:"100",src:"https://www.mailvelope.com/img/ChromeWebStore_Badge_v2_340x96.png"
}))))}})},function(t,e,o){"use strict";var i=o(1);o(2);t.exports=i.createClass({displayName:"exports",getInitialState:function(){return{facebookIconHover:!1}},fbIconhover:function(){this.setState({facebookIconHover:!this.state.facebookIconHover})},render:function(){var t={position:"absolute",top:"60px",bottom:"0px",display:"block",width:"100%",backgroundImage:"url(/public/images/collage.jpg)",backgroundRepeat:"no-repeat",backgroundSize:"cover"},e={position:"fixed",top:"50%",left:"50%",width:"400px",height:"230px",marginTop:"-120px",marginLeft:"-230px",backgroundColor:"#fff",boxShadow:"0 0 5px rgba(0, 0, 0, .12)",padding:"15px",textAlign:"center"},o={},n={opacity:.8};return this.state.facebookIconHover&&(n.opacity=1),i.DOM.div({style:t},i.DOM.div({style:e},i.DOM.div({style:o},i.DOM.a({href:"#",onClick:this.handleClick},i.DOM.img({style:n,onMouseEnter:this.fbIconhover,onMouseLeave:this.fbIconhover,width:"200",src:"https://pgprep.com/assets/images/icons/login-fb.png"})))))}})},function(t,e,o){"use strict";var i=o(1),n=o(4);t.exports=i.createClass({displayName:"exports",getInitialState:function(){return{voices:[],cursor:""}},componentDidMount:function(){this.most_recent(),window.addEventListener("scroll",this.handleScroll)},componentDidUpdate:function(){var t=document.getElementById("show-clips").clientHeight,e=window.innerHeight;e>t&&(console.log("update"),this.most_recent())},most_recent:function(){var t=this;gapi.client.samosa.api.expressions.recent({cursor:this.state.cursor,auth_key:sessionStorage.getItem("samosa_key")}).execute(function(e){var o=t.state.voices.concat(e.voices);t.setState({voices:o,cursor:e.cursor})})},handleScroll:function(){window.innerHeight+window.scrollY+3>=document.body.scrollHeight&&this.most_recent()},render:function(){var t={position:"absolute",marginLeft:"200px",top:"60px",bottom:"0px",display:"block",padding:"9px",width:"auto"};return i.DOM.div({style:t},n({clips:this.state.voices})," ")}})},function(t,e,o){"use strict";var i=o(1),n=i.createClass({displayName:"OGMetaTags",render:function(){var t=this.props.URL.replace("/play/","/play/twitter/");t=t.replace("http://app.getsamosa.com","https://app.getsamosa.com");var e=this.props.imageURL.replace("http://","https://s3.amazonaws.com/"),o=null;return o&&(o=o.replace("http://","https://")),i.DOM.head({prefix:"og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# samosa_clip: http://ogp.me/ns/fb/samosa_clip#"},i.DOM.meta({property:"fb:app_id",content:"580678502050494"}),i.DOM.meta({property:"og:url",content:this.props.URL}),i.DOM.meta({property:"og:type",content:"video.other"}),i.DOM.meta({property:"og:video:height",content:"260"}),i.DOM.meta({property:"og:video:width",content:"420"}),i.DOM.meta({property:"og:video:type",content:"application/x-shockwave-flash"}),i.DOM.meta({property:"og:title",content:"music"}),i.DOM.meta({property:"og:description",content:this.props.tags.join(" ")}),i.DOM.meta({property:"og:image",content:this.props.imageURL}),i.DOM.meta({property:"og:video",content:"http://samosa.parseapp.com/Main.swf?audio_file="+this.props.mp3URL+"&image_file="+this.props.imageURL+"&share_link="+this.props.URL}),i.DOM.meta({property:"og:video:secure_url",content:"https://samosa.parseapp.com/Main.swf?audio_file="+this.props.mp3URL+"&image_file="+this.props.imageURL+"&share_link="+this.props.URL}),i.DOM.meta({property:"twitter:site",content:"@SamosaApp"}),i.DOM.meta({property:"twitter:image",content:e}),i.DOM.meta({property:"twitter:player",content:t}),i.DOM.meta({property:"twitter:player:width",content:"512"}),i.DOM.meta({property:"twitter:player:height",content:"512"}),i.DOM.meta({property:"twitter:card",content:"player"}),i.DOM.meta({property:"twitter:title",content:this.props.name}),i.DOM.meta({property:"twitter:description",content:this.props.tags.join(" ")}),i.DOM.meta({property:"twitter:app:name:googleplay",content:"Samosa"}),i.DOM.meta({property:"twitter:app:id:googleplay",content:"com.getsamosa"}))}});t.exports=n},function(t,e,o){"use strict";var i=o(1),n=o(4);t.exports=i.createClass({displayName:"exports",getInitialState:function(){return{voices:[],cursor:"",auth_key:""}},componentDidMount:function(){this.popular_now(),window.addEventListener("scroll",this.handleScroll)},componentDidUpdate:function(){var t=document.getElementById("show-clips").clientHeight,e=window.innerHeight;console.log(t),console.log(e),e>t&&(console.log("update"),this.popular_now())},popular_now:function(){var t=this;gapi.client.samosa.api.expressions.popular({cursor:this.state.cursor,auth_key:sessionStorage.getItem("samosa_key")}).execute(function(e){console.log(e.voices);var o=t.state.voices.concat(e.voices);t.setState({voices:o,cursor:e.cursor})})},handleScroll:function(){window.innerHeight+window.scrollY+3>=document.body.scrollHeight&&this.popular_now()},render:function(){var t={position:"absolute",marginLeft:"200px",top:"60px",bottom:"0px",display:"block",padding:"9px",width:"auto"};return i.DOM.div({style:t},n({clips:this.state.voices}))}})},function(t,e,o){"use strict";var i=o(1),n=o(4);t.exports=i.createClass({displayName:"exports",getInitialState:function(){return{voices:[],cursor:"",search_result:!1}},componentDidMount:function(){this.search_by_tags(),window.addEventListener("scroll",this.handleScroll)},componentDidUpdate:function(){var t=document.getElementById("show-clips").clientHeight,e=window.innerHeight;e>t&&(console.log("update"),this.search_by_tags())},componentWillReceiveProps:function(t,e){this.setState({voices:[],cursor:"",search_result:!0})},search_by_tags:function(t){var t=this.props.params.queryText;if(!t)return"No Videos Found with this tag :( !";var e=this;gapi.client.samosa.api.get_search_results({tags:t,cursor:this.state.cursor}).execute(function(t){console.log(t);var o=e.state.voices.concat(t.voices);e.setState({voices:o,cursor:t.cursor,search_result:!1})})},handleScroll:function(){window.innerHeight+window.scrollY+3>=document.body.scrollHeight&&this.search_by_tags()},render:function(){var t={position:"absolute",marginLeft:"200px",top:"60px",bottom:"0px",display:"block",padding:"9px",width:"auto"};return i.DOM.div({style:t},n({clips:this.state.voices}))}})},function(t,e,o){"use strict";var i=o(1),n=o(9);t.exports=i.createClass({displayName:"exports",render:function(){var t={position:"fixed",background:"white",height:"100%",left:"0",top:"60px",bottom:"0",display:"block",width:"200px",borderRight:"1px solid #e8e8e8"},e=[{name:"Unapproved",url:"admin/dashboard/",image_url:""},{name:"Approved",url:"admin/dashboard/view-approved",image_url:""}];return i.DOM.div({style:t},n({data:e}))}})},function(t,e,o){"use strict";var i=o(1),n=o(6);t.exports=i.createClass({displayName:"exports",getInitialState:function(){return{voices:null,popular_now:!0}},componentDidMount:function(){var t=this;$.get("/test.json",function(e){t.setState({voices:e.voices})})},approve:function(t){for(var e=this.state.voices,o=[],i=0;i<e.length;i++)e[i].key!=t&&o.push(e[i]);this.setState({voices:o})},reject:function(){},handleOnClick:function(){},render:function(){var t={position:"absolute",marginLeft:"200px",top:"60px",bottom:"0px",display:"block",padding:"9px",width:"auto"};return i.DOM.div({style:t},i.DOM.button({name:"next",onClick:this.handleOnClick}," Next "),i.DOM.br(null),n({tags:["transcript","hearts","duration","language","listens","shares","poster_url","mp3_url"],actions:[{name:"approve","function":this.approve,tag:"key"},{name:"Reject","function":this.reject,tag:"key"}],data:this.state.voices}))}})},function(t,e,o){"use strict";var i=o(1),n=o(6);t.exports=i.createClass({displayName:"exports",popular_now:function(){var t=this;gapi.client.samosa.api.expressions.popular().execute(function(e){console.log(e),t.setState({voices:e.voices,popular_now:!1})})},getInitialState:function(){return{voices:null,popular_now:!0}},action:function(){console.log("hie")},render:function(){this.state.popular_now&&this.popular_now();var t={position:"absolute",marginLeft:"200px",top:"60px",bottom:"0px",display:"block",padding:"9px",width:"auto"};return i.DOM.div({style:t},n({buttons:[{action:this.action}],tags:["caption","language","shares","thumbnail_url","opus_url"],data:this.state.voices}))}})},function(t,e,o){"use strict";var i=o(1),n=o(6);t.exports=i.createClass({displayName:"exports",getInitialState:function(){return{voices:null,cursor:null}},componentDidMount:function(){console.log("componentDidMount");var t=this;$.get("https://dashboard-dev-dot-the-tasty-samosa.appspot.com/dashboard_get_unapproved",function(e){console.log(e.voices),t.setState({voices:e.voices,cursor:e.cursor})})},approve:function(t){var e=this;$.ajax({type:"POST",url:"https://dashboard-dev-dot-the-tasty-samosa.appspot.com/dashboard_post_unapproved",data:{expression_key:t,approval_status:1},success:function(o){for(var i=e.state.voices,n=[],a=0;a<i.length;a++)i[a].key!=t&&n.push(i[a]);e.setState({voices:n})},error:function(t,e,o){alert(o)}})},reject:function(){},handleClickNext:function(){var t=this;$.get("https://dashboard-dev-dot-the-tasty-samosa.appspot.com/dashboard_get_unapproved",{cursor:this.state.cursor},function(e){var o=t.state.voices.concat(e.voices);t.setState({voices:o,cursor:e.cursor})})},render:function(){var t={position:"absolute",marginLeft:"200px",top:"60px",bottom:"0px",display:"block",padding:"9px",width:"auto"};return i.DOM.div({style:t},i.DOM.button({onClick:this.handleClickNext},"NEXT"),n({tags:["transcript","hearts","duration","language","listens","shares","poster_url","mp3_url"],actions:[{name:"approve","function":this.approve,tag:"key"},{name:"Reject","function":this.reject,tag:"key"}],data:this.state.voices}))}})},function(t,e,o){function i(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function n(t,e){return t.keys=e,t}function a(t){return t.sensitive?"":"i"}function s(t,e){var o=t.source.match(/\((?!\?)/g);if(o)for(var i=0;i<o.length;i++)e.push({name:i,delimiter:null,optional:!1,repeat:!1});return n(t,e)}function r(t,e,o){for(var i=[],s=0;s<t.length;s++)i.push(c(t[s],e,o).source);var r=new RegExp("(?:"+i.join("|")+")",a(o));return n(r,e)}function p(t,e){function o(t,o,a,s,r,p,c,l){if(o)return o;if(l)return"\\"+l;var h="+"===c||"*"===c,d="?"===c||"*"===c;return e.push({name:s||n++,delimiter:a||"/",optional:d,repeat:h}),a=a?"\\"+a:"",r=i(r||p||"[^"+(a||"\\/")+"]+?"),h&&(r=r+"(?:"+a+r+")*"),d?"(?:"+a+"("+r+"))?":a+"("+r+")"}var n=0;return t.replace(h,o)}function c(t,e,o){if(e=e||[],l(e)?o||(o={}):(o=e,e=[]),t instanceof RegExp)return s(t,e,o);if(l(t))return r(t,e,o);var i=o.strict,c=o.end!==!1,h=p(t,e),d="/"===t.charAt(t.length-1);return i||(h=(d?h.slice(0,-2):h)+"(?:\\/(?=$))?"),h+=c?"$":i&&d?"":"(?=\\/|$)",n(new RegExp("^"+h,a(o)),e)}var l=o(27);t.exports=c;var h=new RegExp(["(\\\\.)","([\\/.])?(?:\\:(\\w+)(?:\\(((?:\\\\.|[^)])*)\\))?|\\(((?:\\\\.|[^)])*)\\))([+*?])?","([.+*?=^!:${}()[\\]|\\/])"].join("|"),"g")},function(t,e,o){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,o){function i(){if(!r){r=!0;for(var t,e=s.length;e;){t=s,s=[];for(var o=-1;++o<e;)t[o]();e=s.length}r=!1}}function n(){}var a=t.exports={},s=[],r=!1;a.nextTick=function(t){s.push(t),r||setTimeout(i,0)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=n,a.addListener=n,a.once=n,a.off=n,a.removeListener=n,a.removeAllListeners=n,a.emit=n,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}}]);