From: Brian Flowers Date: Thu, 6 May 2021 01:52:50 +0000 (-0400) Subject: Added fan stand X-Git-Url: http://git.slightlycyberpunk.com%2C%20git.slightlycyberpunk.com/git/?a=commitdiff_plain;h=3ada4f659b0ab7286cf98f191c7a57985ae0ce96;p=OilDiffusers.git Added fan stand --- diff --git a/AutoMister/description b/AutoMister/description new file mode 100644 index 0000000..45d87cb --- /dev/null +++ b/AutoMister/description @@ -0,0 +1,2 @@ +An automated oil diffuser based on modified AirWick brand Essential Mist diffusers. Connects to my main security/automation network, +o it triggers based on timing and presence. diff --git a/FanStand/description b/FanStand/description new file mode 100644 index 0000000..993fdc4 --- /dev/null +++ b/FanStand/description @@ -0,0 +1 @@ +A very simple stand designed to hold a 40mm fan over a typical 10ml essential oil bottle. Works best if you add a small shroud of tape or paper around the top of the stand so all of the air is drawn up past the bottle. diff --git a/FanStand/fanStand.scad b/FanStand/fanStand.scad new file mode 100644 index 0000000..6ab7993 --- /dev/null +++ b/FanStand/fanStand.scad @@ -0,0 +1,76 @@ +/*## COPYRIGHT NOTICE +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# +# COPYRIGHT 2020 : Slightly Cyberpunk +# www.slightlycyberpunk.com +# +# + +### DESCRIPTION +# +# +# A small stand to suspend a 40mm fan above a 10ml bottle of essential oil +*/ + +// === Main model === +// Top +difference() { +translate([-1,0,65]) { + rotate([20,0,0]) { + fanSlot(); + } +} +fanStand(); +} + +// Base +fanStand(); + +// === MODULES === +module fanSlot() { + difference() { + translate([-4,-4,-5]) { + cube([50,50,10]); + } + cube([42,42,10]); + translate([4,4,-5]) { + cube([34,34,10]); + } + } +} + +module fanStand() { + difference() { + cube([40,40,15]); + translate([20,20,3]) { + cylinder(r=15,h=12); + } + } + + translate([0,0,0]) { + cube([5,5,65]); + } + translate([35,0,0]) { + cube([5,5,65]); + } + translate([0,35,0]) { + cube([5,5,75]); + } + translate([35,35,0]) { + cube([5,5,75]); + } +} + diff --git a/FanStand/preview.png b/FanStand/preview.png new file mode 100644 index 0000000..2de4db8 Binary files /dev/null and b/FanStand/preview.png differ diff --git a/test.html b/test.html new file mode 100644 index 0000000..641d497 --- /dev/null +++ b/test.html @@ -0,0 +1,87 @@ +!function(u){function e(e){for(var t,n,r=e[0],o=e[1],i=0,a=[];i<|]|"+t.src_ZPCc+"))("+a+")","i"),r.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),r.re.pretest=RegExp("("+r.re.schema_test.source+")|("+r.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(r)}function d(e,t){var n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function p(e,t){var n=new d(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function h(e,t){if(!(this instanceof h))return new h(e,t);t||!function(e){return Object.keys(e||{}).reduce(function(e,t){return e||r.hasOwnProperty(t)},!1)}(e)||(t=e,e={}),this.__opts__=n({},r,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},o,e),this.__compiled__={},this.__tlds__=i,this.__tlds_replaced__=!1,this.re={},a(this)}h.prototype.add=function(e,t){return this.__schemas__[e]=t,a(this),this},h.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},h.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,o,i,a,u,c;if(this.re.schema_test.test(e))for((u=this.re.schema_search).lastIndex=0;null!==(t=u.exec(e));)if(o=this.testSchemaAt(e,t[2],u.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&0<=(c=e.search(this.re.host_fuzzy_test))&&(this.__index__<0||cthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=a)),0<=this.__index__},h.prototype.pretest=function(e){return this.re.pretest.test(e)},h.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},h.prototype.match=function(e){var t=0,n=[];0<=this.__index__&&this.__text_cache__===e&&(n.push(p(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(p(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},h.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse():(this.__tlds__=e.slice(),this.__tlds_replaced__=!0),a(this),this},h.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},h.prototype.onCompile=function(){},e.exports=h},"+IKr":function(e,t,n){e.exports=n.p+"desktop-assets/browse.fcd082e3eb7f93767b2b9edb7b3f1c2a.svg"},"+K+b":function(e,t,n){var r=n("JHRd");e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},"+M1K":function(e,t,n){var r=n("ppGB");e.exports=function(e){var t=r(e);if(t<0)throw RangeError("The argument can't be less than 0");return t}},"+Qka":function(e,t,n){var s=n("fmRc"),l=n("t2Dn"),f=n("cq/+"),d=n("T1AV"),p=n("GoyQ"),h=n("mTTR"),m=n("itsj");e.exports=function r(o,i,a,u,c){o!==i&&f(i,function(e,t){if(c=c||new s,p(e))d(o,i,t,a,r,u,c);else{var n=u?u(m(o,t),e,t+"",o,i,c):void 0;void 0===n&&(n=e),l(o,t,n)}},h)}},"+VfX":function(e,t,n){"use strict";n.d(t,"s",function(){return o}),n.d(t,"r",function(){return i}),n.d(t,"m",function(){return u}),n.d(t,"f",function(){return c}),n.d(t,"g",function(){return s}),n.d(t,"h",function(){return l}),n.d(t,"d",function(){return f}),n.d(t,"c",function(){return p}),n.d(t,"b",function(){return h}),n.d(t,"l",function(){return m}),n.d(t,"e",function(){return g}),n.d(t,"n",function(){return v}),n.d(t,"t",function(){return y}),n.d(t,"q",function(){return b}),n.d(t,"v",function(){return O}),n.d(t,"u",function(){return w}),n.d(t,"o",function(){return E}),n.d(t,"a",function(){return _}),n.d(t,"i",function(){return S}),n.d(t,"j",function(){return C}),n.d(t,"k",function(){return A}),n.d(t,"p",function(){return I}),n.d(t,"w",function(){return T});var r=n("b5GN"),o=49,i=130,a=65,u=.4,c=65,s=10,l=40,f=29,d=(a-f)/2,p=2*f+l+(84-f-36)-d,h=Math.round(2*f+l-a+d)+11,m=c+46+216+84+l,g=c/(p-h),v="HOME_BACKGROUND",y="TAGS_BACKGROUND",b="PROFILE_BACKGROUND",O="UPLOAD_BACKGROUND",w="TRANSFORMATION_BACKGROUND",E="NONE_BACKGROUND",_=100,S="default",C="coverTools",A="hamburgerMenu",I=3;function T(e){if(e&&e.startsWith("/".concat(r.s,"/")))switch(e.split("/")[3]){case r.j:var t=e.split("/")[4],n=e.split("/")[7];if(t)if(t===r.k){if(n)return a}else if(!n)return a;return a+o+i;case r.d:case r.r:return a+o;case r.a:return a;default:return a+o}return a}},"+Wds":function(e,t,n){"use strict";var r=String.prototype.indexOf;e.exports=function(e){return-1":">",'"':""","'":"'"});e.exports=r},"/qmn":function(e,t,n){var r=n("2oRo");e.exports=r.Promise},"/y0k":function(e,t,n){"use strict";n.d(t,"f",function(){return o}),n.d(t,"u",function(){return i}),n.d(t,"j",function(){return a}),n.d(t,"d",function(){return u}),n.d(t,"c",function(){return c}),n.d(t,"r",function(){return s}),n.d(t,"l",function(){return l}),n.d(t,"m",function(){return f}),n.d(t,"y",function(){return d}),n.d(t,"B",function(){return p}),n.d(t,"q",function(){return h}),n.d(t,"i",function(){return m}),n.d(t,"n",function(){return g}),n.d(t,"x",function(){return v}),n.d(t,"g",function(){return y}),n.d(t,"s",function(){return b}),n.d(t,"k",function(){return O}),n.d(t,"w",function(){return w}),n.d(t,"a",function(){return E}),n.d(t,"h",function(){return _}),n.d(t,"F",function(){return S}),n.d(t,"b",function(){return C}),n.d(t,"C",function(){return A}),n.d(t,"p",function(){return I}),n.d(t,"o",function(){return T}),n.d(t,"t",function(){return k}),n.d(t,"e",function(){return j}),n.d(t,"z",function(){return x}),n.d(t,"v",function(){return P}),n.d(t,"E",function(){return D}),n.d(t,"D",function(){return R}),n.d(t,"A",function(){return M}),n.d(t,"G",function(){return L}),n.d(t,"H",function(){return N});var r=n("J/PD"),o=5242880,i="UPLOAD_HIDDEN_CONFIRM",a="UPLOAD_COMMUNITY_CONFIRM",u="upload-popup",c="upload-modal",s="UPLOAD_EMBED_DIALOG",l="UPLOAD_DELETE_ALBUM_DIALOG",f="UPLOAD_DELETE_IMAGE_DIALOG",d="UPLOAD_SHARE_OPTIONS_DIALOG",p="UPLOAD_TOS_CONFIRM_DIALOG",h="UPLOAD_DISABLE_AUDIO_DIALOG",m="UPLOAD_CAPTCHA_DIALOG",g="UPLOAD_DELETE_IMAGE_POST_DIALOG",v="UPLOAD_REWARD_VIDEO_DIALOG",y=60,b="upload_embed",O=40,w=140,E=".jpg,.jpeg,.png,.gif,.apng,.tiff,.tif,.bmp,.xcf,.webp,.mp4,.mov,.avi,.webm,.mpeg,.flv,.mkv,.mpv,.wmv",_=/\.(jpe?g|a?png|gif|tiff?|bmp|xcf|webp|mp4|mov|avi|webm|mpeg|flv|mkv|mpv|wmv)$/i,S=/\.(mov|mp4|avi|webm|mpeg|flv|mkv|mpv|wmv)$/i,C=/\.gifv?$/i,A=1e3,I=255,T=32767,k=15,j=1,x=2,P=20971520,D=209715200,R=60,M=5,L={jpeg:"image/jpeg",jpg:"image/jpg",gif:"image/gif",png:"image/png",apng:"image/apng",tiff:"image/tiff",tif:"image/tiff",bmp:"image/bmp",xcf:"image/xcf",webp:"image/webp",mp4:"video/mp4",mov:"video/quicktime",mpeg:"video/mpeg",webm:"video/webm",flv:"video/x-flv",mkv:"video/x-matroska",mpv:"video/x-matroska"},N=n.n(r)()(L)},0:function(e,t,n){n("LSZE"),n("ls82"),e.exports=n("13uX")},"03A+":function(e,t,n){var r=n("JTzB"),o=n("ExA7"),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!u.call(e,"callee")};e.exports=c},"07d7":function(e,t,n){var r=n("AO7/"),o=n("busE"),i=n("sEFX");r||o(Object.prototype,"toString",i,{unsafe:!0})},"0BK2":function(e,t){e.exports={}},"0Cz8":function(e,t,n){var o=n("Xi7e"),i=n("ebwN"),a=n("e4Nc");e.exports=function(e,t){var n=this.__data__;if(n instanceof o){var r=n.__data__;if(!i||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(r)}return n.set(e,t),this.size=n.size,this}},"0Dez":function(e,t,n){e.exports=n.p+"desktop-assets/icon-no-comments.34e3c82408b61a6eb237dd60d669579d.svg"},"0Dky":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"0GbY":function(e,t,n){function r(e){return"function"==typeof e?e:void 0}var o=n("Qo9l"),i=n("2oRo");e.exports=function(e,t){return arguments.length<2?r(o[e])||r(i[e]):o[e]&&o[e][t]||i[e]&&i[e][t]}},"0JQy":function(e,t){var n="\\ud800-\\udfff",r="["+n+"]",o="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",a="[^"+n+"]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+o+"|"+i+")"+"?",l="[\\ufe0e\\ufe0f]?",f=l+s+("(?:\\u200d(?:"+[a,u,c].join("|")+")"+l+s+")*"),d="(?:"+[a+o+"?",o,u,c,r].join("|")+")",p=RegExp(i+"(?="+i+")|"+d+f,"g");e.exports=function(e){return e.match(p)||[]}},"0TkE":function(e,t,n){"use strict";var r=n("67WC"),o=n("tycR").find,i=r.aTypedArray;(0,r.exportTypedArrayMethod)("find",function(e,t){return o(i(this),e,1Q?null:e:null}}(t):function(e){return e},ie)(oe())}function de(e){var t=oe(),n=Object.assign(t,{newPosts:e});return Object(g.Bb)(ee,JSON.stringify(n))}function pe(e,t,n){var r=n.streamParam,o=n.streamSection,i=oe(),a=Object.assign(i,{time:Object(g.x)(),posts:i.posts.concat(e),streamPage:t,streamParam:r,streamSection:o});return Object(g.Bb)(ee,JSON.stringify(a))}function he(t,e){var n=oe(),r=n.posts.find(function(e){return e.id===t});if(r)return r.vote=e,Object(g.Bb)(ee,JSON.stringify(n))}var me=function(d){return function(f){return function(e){switch(e.type){case K.a:return Object(m.a)("gallerypage",document.cookie)?"/"===e.payload.location.pathname&&d.dispatch(Object(_.L)()):ue(),f(e);case _.k+$.g:case _.k:if(e.error)return f(Object(_.J)(e.payload,e.meta));if(!re())return f(Object(_.K)(e.payload,e.meta));switch(e.payload.insertionModifier){case _.g:var t=fe(d,null,e.meta.versionAPI);if(Object(W.a)(t))return Object(g.ub)(ce,e.payload&&e.payload.posts,te(d.getState().gallery),e.payload,e.meta),f(Object(_.K)(e.payload,e.meta));var n=function(t){return function(e){return Object(W.a)(t)?[]:Object(W.a)(e)?t:ae(t,e)}}(e.payload&&e.payload.posts)(t);return Object(W.b)(n)?(Object(g.ub)(de,n),f(Object(_.H)({posts:n}))):f(Object(_.K)(Object.assign(e.payload,{insertionModifier:_.j}),e.meta));case _.a:if(Object(W.a)(e.payload&&e.payload.posts))return f(Object(_.J)(e.payload,e.meta));var r=fe(d,null,e.meta.versionAPI),o=function(t){return function(e){return Array.isArray(t)&&0t}).reduce(function(e,t){return e[t]=n[t],e},{})}(JSON.parse(Object(g.G)(e))||{},t)}function _e(e){var t=Ee(e);return Object(g.ub)(g.Ab,e,JSON.stringify(t)),t}var Se=function(){return function(t){return function(e){return function(e,t){switch(t.type){case ve.a:var n=t.payload,r=n.ctaName,o=n.endTime;return Object(g.ub)(we,Z.m,r,o),e(t);case ve.d:var i=t.payload,a=i.ctaName,u=i.endTime;return i.oncePerSession&&Object(g.ub)(we,Z.m,a,u),e(t);case ye.c:var c=t.payload.insertionId,s=Object(Oe.b)(7).getTime()/1e3;return Object(g.ub)(we,be.f,c,s),e(t);case ve.b:var l=Object.assign(t.payload,{ctasClosed:Object.keys(_e(Z.m))});return e(Object.assign(t,{payload:l}));case ye.e:var f=Object.assign(t.payload,{sctusClosed:Object.keys(_e(be.f))});return e(Object.assign(t,{payload:f}));default:return e(t)}}(t,e)}}},Ce=r("kCKb"),Ae=r("Gk2F"),Ie=r("RmMW"),Te=r("nfHy"),ke=r("b5GN"),je=!1;function xe(e,t){var n=e.ui.cover.get("height")-e.ui.cover.get("collapsed")-50;return Object(g.vb)(0,n),t(Object(Ce.e)(n))}function Pe(e){return Object(g.vb)(0,0),e(Object(Ce.d)())}function De(e){var t=Object(g.z)(e);t&&t.scrollIntoView({behavior:"smooth"})}function Re(e){var t=e.id,n=e.offset,r=Object(g.z)(t);if(r){var o=Object(g.r)().getBoundingClientRect().top,i=r.getBoundingClientRect().top,a=Math.abs(o-i)-n;if(Object(g.Fb)())return void window.scrollTo({top:a,behavior:"smooth"});window.scrollTo(0,a)}}var Me=function(r){return function(n){return function(e){switch(e.type){case K.a:return je=e.payload.location.pathname.startsWith("/".concat(ke.s,"/")),n(e);case Ce.a:if(je){var t=r.getState();t.ui.cover.get("fixed")?Object(g.ub)(xe,t,r.dispatch):Object(g.ub)(Pe,r.dispatch)}return n(e);case Ce.b:return Object(g.ub)(De,e.payload),n(e);case Ce.c:return Object(g.ub)(Re,e.payload),n(e);case Y.e:return je&&Object(g.ub)(Pe,r.dispatch),n(e);case Te.b:case Ie.a:case Ie.b:case Ie.c:case Ae.f:case Ae.g:return je&&Object(g.ub)(xe,r.getState(),r.dispatch),n(e);default:return n(e)}}}},Le=r("j5l6"),Ne=r("4TFA"),Fe=r("ooTa"),Ue=r("RJ0p"),Be=r("PmsC"),ze=r("26Ob"),Ge=r("lJMb");function Ve(e){var t=e.getState(),n=t.posts.get("postOrder"),r=t.postsData.get("currentPost"),o=t.postsData.get("currentPostIndex");r&&o<0&&0<=(o=n.findIndex(function(e){return e.get("postId")===r.get("id")}))&&e.dispatch(Object(E.Eb)(o));var i=0new Date(n.expires)?e.set("counter",dr.get("counter")):e.set("counter",n.counter)}),x()(sr,fr.e,function(e,t){var n=t.payload;return n.expires&&new Date>new Date(n.expires)?e.set("isShowed",dr.get("isShowed")):e.set("isShowed",n.isShowed)}),sr),dr),gr=r("lEsC"),vr=r("2c7z"),yr=r("yA1n"),br=Object(Ht.a)((pr={},x()(pr,vr.d,qt.a),x()(pr,vr.c,qt.a),x()(pr,vr.a,qt.a),pr),p.a.Map({autoPlayStrategy:yr.b,audioState:yr.c.AUDIO_STATE.PRESENT_MUTED,volume:yr.a,hashWithAudioOn:""})),Or=r("if3o");function wr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Er(t){for(var e=1;e=t||this.position+r+this.size>t)&&this.position+r<=t+e},setActiveInteraction:function(e){return this.isActiveInteraction=e,this},setDefault:function(e){return this.isDefaultSize=e,this},setPage:function(e,t){var n=ho(this.position,t);return e.length-1o&&(r[e]=n[e]),e}),e.set("reportedComments",r)}),x()(jo,Ro.a+$.g,function(e,t){return e.set("reportedComments",t.payload)}),x()(jo,Ro.c,function(e,t){var n=t.payload,r={},o=Math.floor(Date.now()/1e3);return Object.keys(n).map(function(e){return n[e]>o&&(r[e]=n[e]),e}),e.set("reportedPosts",r)}),x()(jo,Ro.c+$.g,function(e,t){return e.set("reportedPosts",t.payload)}),jo),p.a.Map({id:null,reportedComments:{},reportedPosts:{},isMature:!1,type:Ro.f})),Lo=r("DVdh");var No,Fo=Object(Ht.a)((xo={},x()(xo,Lt,function(e,t){var n=t.payload;return Object(f.Map)(Object(f.fromJS)(n))}),x()(xo,Nt,function(e,t){return t.payload.reduce(function(e,t){return e.set(t,Mt.i)},e)}),x()(xo,Ft,function(e,t){var n=t.payload;return e.merge(n)}),xo),Object(f.Map)({})),Uo=r("vq+c"),Bo=r("3pIn"),zo=r("njUm"),Go={topics:Object(f.List)([]),topicsSavingCount:0,topicsSavingErrorCount:0};function Vo(e,t,n){return e.set("topicsSavingCount",e.get("topicsSavingCount")+t).set("topicsSavingErrorCount",e.get("topicsSavingErrorCount")+n)}var Ho=Object(Ht.a)((No={},x()(No,zo.a+$.g,function(e,t){var n=t.payload;return e.set("topics",Object(f.fromJS)(n))}),x()(No,zo.b+$.f,function(e){return Vo(e,1,0)}),x()(No,zo.c+$.f,function(e){return Vo(e,1,0)}),x()(No,zo.b+$.g,function(e){return Vo(e,-1,0)}),x()(No,zo.c+$.g,function(e){return Vo(e,-1,0)}),x()(No,zo.b+$.d,function(e){return Vo(e,-1,1)}),x()(No,zo.c+$.d,function(e){return Vo(e,-1,1)}),x()(No,b.e,function(e){return e.set("topicsSavingErrorCount",0)}),No),Object(f.Map)(Go)),qo=r("tW7m");function Wo(){return{alerts:Vt.a,ad:qo.a,analyticsBuffer:Gt.a,posts:un,postsData:En,banner:Yt,comments:Nn,agent:Fn.a,navbar:Un.a,viewportData:zn,share:Gn,imageViewer:Vn,gallery:Xn,display:Qn.a,experiments:Object(er.a)(),user:tr.a,users:lr,survey:mr,notifications:gr.a,video:br,favorites:xr,profilePosts:Fr,selectables:Vr,drag:Yr,account:Kr.a,tags:$r.a,ui:Zr.a,search:Jr.d,messages:to,fastGrid:So,history:Co,introduction:Po,config:Do.a,report:Mo,secretSanta:Lo.a,modules:Fo,status:Uo.a,emerald:Bo.a,topics:Ho}}function Yo(){return Object(k.c)(Wo())}var Ko=r("66r6"),$o=r("/y0k"),Zo=r("BbOC"),Jo=r("flVz"),Xo=r("+uxB"),Qo=r("jVLO"),ei="DELETE_IMAGE_FROM_ACCOUNT",ti="DELETE_IMAGE_FROM_ALBUM",ni=Object(it.a)(ei,function(e){return{imageId:e}},function(e,t,n){return{callAPI:!0,versionAPI:Z.h,httpMethod:Qo.b,endpoint:"/media/v1/media/".concat(n?e:t),options:{includeCredentials:!0,contentType:Qo.a},imageId:e}}),ri=Object(it.a)(ti,function(e){return{imageId:e}},function(e,t,n,r){return{callAPI:!0,versionAPI:Z.h,httpMethod:Qo.b,endpoint:"/post/v1/albums/".concat(r?t:n,"/media"),options:{includeCredentials:!0,contentType:Qo.a,body:{ids:[e]}}}}),oi=r("bWDY"),ii=r("uGFe"),ai=r("22ME"),ui=!1;function ci(n,e){var r=n.getState().upload.get("disableAudio");e.map(function(e,t){return e.get("status")===ii.Z&&n.dispatch(Object(ii.Mb)(e.get("data"),e.get("type"),e.get("isVideo"),r,t)),null})}function si(e,t){var n=t.getState().upload,r=n.get("post"),o=0,i=0,a=0;n.get("queue").forEach(function(e){e.get("status")===ii.T&&(o++,e.get("isVideo")&&i++,e.get("isVideo")&&e.get("hasAudio")&&a++)});var u=n.getIn(["post","tags"]).size;t.dispatch(e(o,i,a,r.get("mature"),u,r.get("inGallery")))}function li(t,e){var n=e.payload,r=t.getState().upload,o=r.get("queue");if(n.isInvalidURL&&t.dispatch(Object(ii.eb)(Object(Cn.b)("uploadInvalidURL"))),n.isUnsupportedFileType){var i=Object(Cn.b)("uploadInvalidFileType");t.dispatch(Object(ii.eb)(i.text,Z.Q,i.textLink))}if(n.isFileSizeError){var a=Object(Cn.b)("uploadInvalidFileSize");t.dispatch(Object(ii.eb)(a.text,Z.Q,a.textLink))}if(o.size<1){var u=t.getState().ui;u&&u.dialog&&u.dialog.get("dialogName")===$o.c||t.dispatch(Object(b.y)())}else{if(!function(e){var t=e.getState(),n=t.user,r=t.history;return"/".concat(ke.v).startsWith(r.getIn(["location","pathname"]))?(Object(g.Bb)("guestUserTOS","true"),!0):!!n.get("isLoggedIn")||!!Object(g.P)("guestUserTOS")}(t))return t.dispatch(Object(b.y)()),t.dispatch(Object(ii.dc)());if(!t.getState().user.get("isLoggedIn")&&!t.getState().ad.get("hasSeenUploadRewardVideo")&&!be.F.includes(t.getState().agent.get("countryCode"))&&Object(oi.d)(t.getState().ad,t.getState().user))return t.dispatch(Object(b.y)()),t.dispatch(Object(ye.v)());o.forEach(function(e){e.get("type")===ii.bb&&e.get("status")===ii.Z&&t.dispatch(Object(ii.Sb)(e.get("data")))});var c=0,s=o.reduce(function(e,t){return-1===[ii.Z,ii.V].indexOf(t.get("status"))?e:(t.get("isVideo")&&c++,e+1)},0);t.dispatch(Object(ii.Tb)(s,c)),n.albumDeleteHash||r.getIn(["album","deleteHash"])?(t.dispatch(Object(ii.nb)(null,s)),t.dispatch(Object(b.y)())):t.dispatch(Object(ii.sb)())}}function fi(e){ui=!0;var t=e.getState().upload.get("queue").valueSeq().filter(function(e){return e.get("status")===ii.X}).map(function(e){return e.getIn(["mediaTicket","ticketId"])}).toArray();0=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function bi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=$o.A)return!1;r.has(e)||(r=r.set(e,Object(f.Map)({name:e,display_name:e,addFrom:ii.ab})))}),e.setIn(["post","tags"],r)}),x()(vi,ii.Q,function(e,t){return Ei(e,t.meta.id,function(e){return e.set("status",ii.Z)})}),x()(vi,ii.H,function(e,t){var n=t.meta.id;return e.set("queue",e.get("queue").delete(n))}),x()(vi,ii.e+$.g,function(e,t){var n=t.payload;return 1===parseInt(n.overLimits,10)?e:Si(e,ii.S,ii.Z)}),x()(vi,ii.e+$.d,function(e,t){return t.payload.statusCode===Zo.f?Si(e,ii.Z,ii.S):Si(e,ii.S,ii.U)}),vi),Oi),Di={state:Mt.h,controller:function(e,t){switch(t.type){case ii.y:return li(e,t);case ii.k:return function(r,e){var o=e.meta.id,i=Object(g.T)();i.upload.addEventListener("progress",function(e){if(e.lengthComputable){var t=Math.round(100*e.loaded/e.total);r.dispatch(Object(ii.Ib)(t,o))}}),i.onerror=function(){r.dispatch(Object(ii.Hb)("XHR request error",i.status,"",o))},i.onload=function(){if(i.readyState===i.DONE)if(200===i.status){var e=JSON.parse(i.response),t=e.hasOwnProperty("data")?e.data:e;t.ticket?(r.dispatch(Object(ii.gb)(t.ticket,o)),ui||fi(r)):r.dispatch(Object(ii.Kb)(t,o))}else{var n;try{n=JSON.parse(i.response).data.error,"object"===ro()(n)&&(n=n.message)}catch(e){n=i.status}r.dispatch(Object(ii.Hb)(n,i.status,JSON.parse(i.response),o))}},i.withCredentials=!0,i.open(Qo.e,"".concat(Z.g,"/image?client_id=").concat(Z.c)),i.send(e.payload),r.dispatch(Object(ii.Jb)(o))}(e,t);case ii.k+$.g:return function(e,t){var n=t.payload,r=t.meta.id,o=e.getState().upload,i=o.get("album"),a=o.getIn(["queue",r]);if(e.dispatch(Object(ii.fb)(i.get("deleteHash"),n.deletehash)),n.link){var u=Object(g.m)();u.onload=function(){return e.dispatch(Object(ii.yb)(r))},u.src=n.link}return a.get("description")&&e.dispatch(Object(ii.zc)(n.deletehash,a.get("description"),r)),pi(e)}(e,t);case ii.k+$.d:return function(e,t){var n=t.payload;return parseInt(((n.body.data||{}).error||{}).code||n.statusCode,10)===Zo.f?e.dispatch(Object(ii.Ub)()):pi(e)}(e,t);case ii.f+$.g:return function(e,t){var n=t.payload,r=e.getState(),o=r.upload,i=r.user,a=o.get("queue").reduce(function(e,t){return-1===[ii.Z,ii.V].indexOf(t.get("status"))?e:e+1},0);if(e.dispatch(Object(ii.nb)(null,a)),e.dispatch(Object(b.y)()),h.a.push("/".concat(ke.q,"/").concat(n.id)),e.dispatch(Object(E.Y)()),!i.get("isLoggedIn")){var u=[];try{var c=JSON.parse(Object(g.P)("guestUserAlbums"));Array.isArray(c)&&(u=c),u.length>=$o.t&&(u=u.filter(function(e){return"string"==typeof e}).slice(1,15))}catch(e){Object(g.nb)("guestUserAlbums")}u.push(o.getIn(["album","deleteHash"])),Object(g.Bb)("guestUserAlbums",JSON.stringify(u))}}(e,t);case E.G+$.g:return function(e,t){var n=t.payload,r=e.getState().upload,o=Z.s+r.getIn(["album","id"]);if(si(ii.ub,e),!1===n.is_pending)return Object(g.eb)(o);e.dispatch(Object(Xo.e)(o))}(e,t);case ii.G:return function(e){var t=e.getState().upload.getIn(["album","deleteHash"]);return e.dispatch(Object(E.W)(t))}(e);case E.c+$.g:case ii.i:return mi(e,{runNew:!1});case ii.r:return mi(e,{runNew:!0});case ii.x:return function(e){e.dispatch(Object(ii.ac)());var t=e.getState().upload,n=t.getIn(["album","id"]),r=t.getIn(["post","title"]);e.dispatch(Object(Jo.k)($o.s,!0)(n,r))}(e);case ii.d+$.g:return function(r,e){var o=e.payload,i=o.done,a=[],t=r.getState().upload;if(Object.keys(i).forEach(function(e){var t=i[e];if(!1!==t){var n=o.images[t];r.dispatch(Object(ii.vc)(t,n.deletehash,n.ext,e)),a.push(n.deletehash)}else r.dispatch(Object(ii.Gb)(void 0,e))}),0=$o.g&&r.dispatch(Object(ii.Gb)(void 0,e.getIn(["mediaTicket","ticketId"])))}),Object(g.Cb)(fi,1e3,r),pi(r)}(e,t);case ii.d+$.d:return function(t){return ui=!1,t.getState().upload.get("queue").forEach(function(e){e.get("status")===ii.X&&t.dispatch(Object(ii.Gb)(void 0,e.getIn(["mediaTicket","ticketId"])))}),pi(t)}(e);case ii.v:return function(e,t){var n=t.payload;e.dispatch(Object(ii.Xb)()),e.dispatch(Object(ii.oc)(n.imageId))}(e,t);case ii.I:return hi(e);case ii.J:return function(e){var t=e.getState(),n=t.user,r=t.upload,o=n.get("isLoggedIn");if(!o)return hi(e);var i=r.get("imageToDelete"),a=r.getIn(["album","id"]),u=r.getIn(["album","deleteHash"]);return e.dispatch(ri(i,a,u,o))}(e);case ii.K:return function(e){var t=e.getState().upload.getIn(["album","deleteHash"]);return e.dispatch(Object(E.X)(t))}(e);case ei+$.g:case ti+$.g:return e.dispatch(Object(b.y)());case ii.h:return di(e);case ii.c:return function(e){return e.dispatch(Object(b.y)()),e.dispatch(Object(ii.ic)())}(e);case w.a:return function(e){var t=e.getState(),n=t.user,r=t.upload;if(n.get("isLoggedIn")||Object(g.Bb)("guestUserTOS","true"),r.get("processingUpload"))return li(e,{payload:{}})}(e);case w.e+$.g:return function(e){var t=[];try{t=JSON.parse(Object(g.P)("guestUserAlbums"))}catch(e){}Array.isArray(t)&&0$o.D&&e.dispatch(Object(ii.Bc)(r));var o=e.getState().upload.get("queue"),i=!0,a=!1,u=!1;o.forEach(function(e){e.get("status")!==ii.V?e.get("status")===ii.W&&(u=u||e.get("hasAudio"),a=!0):i=!1}),i&&a?u?e.dispatch(Object(ii.Zb)()):e.dispatch(Object(ii.nc)()):pi(e)}(e,t);case ii.R:return ci(e,e.getState().upload.get("queue"));case ii.N:case ii.L:return e.dispatch(Object(ii.nc)()),e.dispatch(Object(b.y)());case ii.E:return e.dispatch(Object(ii.ib)(t.payload.name,ai.q)),gi(e);case ii.P:return gi(e);case ii.C+$.f:return function(n){function t(e){var t=e.text.split("#").pop();o=o.add(t),r.has(t)||n.dispatch(Object(ii.ib)(t,ai.p))}var e=n.getState().upload,r=e.getIn(["post","tags"]),o=new f.OrderedSet;e.get("queue").forEach(function(e){return Object(Ko.l)(e.get("description"),x()({},Ko.f,t))}),n.dispatch(Object(ii.jb)(o))}(e);case ii.Q:return ci(e,e.getState().upload.get("queue"));case ii.e+$.d:return function(e,t){var n=t.payload;return e.dispatch(Object(ii.ob)()),n.statusCode===Zo.f?e.dispatch(Object(ii.Ub)()):pi(e)}(e,t);case ii.e+$.g:return function(e,t){var n=t.payload;if(e.dispatch(Object(ii.ob)()),1===parseInt(n.overLimits,10))return e.dispatch(Object(ii.Ub)());var r=e.getState().upload.get("queue");return ci(e,r)}(e,t);case ye.g:return function(e){if(e.getState().upload.get("processingUpload"))return li(e,{payload:{}})}(e)}},reducer:Pi},Ri=(xi={},x()(xi,Mt.e,Mt.k),x()(xi,Mt.d,Di),xi),Mi=r("Te9D"),Li=r.n(Mi);var Ni=null;function Fi(e){var t=e.getState().embed.toJS(),n=t.isAlbum,r=t.postId,o=t.title,i=t.nodeId,a=t.hasTitle;if(i&&r){var u=function(e,t,n,r){var o=0').concat(Li()(i),'