1(self.webpackChunksketchfab=self.webpackChunksketchfab||[]).push([[2750],{GiO0:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o("/K0U"),s=o("eKF4"),i=o("jQKg"),p=o("08Aw"),r=o("MB/E");const l=n.Z.extend({mixins:[(0,p.Z)(((e,t)=>{if(!t.get("uid"))return{};const o=r.wl.entities.collection(t.get("uid"),e);return{subscriberCount:o?o.subscriberCount:t.get("subscriberCount")}}))],endpoint:function(){return"/collections"+(this.isNew()?"":`/${this.get("uid")}`)},sharing:function(){return i.Z.getCollectionSharing(this.get("uid")).then(function(e){return this.set("sharing",e),e}.bind(this))},updateModels:function(e,t){return e?i.Z.removeModelsFromCollection(this.get("uid"),t):i.Z.addModelsToCollection(this.get("uid"),t)},subscribe:function(){return i.Z.subscribeToCollection(this.get("uid")).then((()=>{this.set("subscriberCount",this.get("subscriberCount")+1)}))},unsubscribe:function(){return i.Z.unsubscribeFromCollection(this.get("uid")).then((()=>{this.set("subscriberCount",this.get("subscriberCount")-1)}))},setSubscription:function(e){return e?this.unsubscribe():this.subscribe()},toggleSubscription:function(){return s.Z.authenticate((e=>{const t=e.hasSubscribed(this.id);return this.setSubscription(t).then((()=>{e.updateSubscription(this.id,!t)}))})).catch((()=>{}))},getThumbnails:function(){return i.Z.getCollectionThumbnails(this.get("uid")).then((e=>(this.set("thumbnails",e),e)))}})},yTkX:(e,t,o)=>{"use strict";o.d(t,{IO:()=>h,L0:()=>r,PF:()=>i,QG:()=>d,UW:()=>p,eF:()=>a,wv:()=>l});var n=o("HPk7"),s=o("g/7r");function i(e){return e.preventDefault(),e}function p(e){return e.stopPropagation(),e}function r(e){return{eventName:e.split(" ")[0],selector:e.split(" ").slice(1).join(" ")}}function l(e){const t=e.originalEvent||e;return{x:t.type.match(/^touch/)?t.changedTouches[0]?t.changedTouches[0].pageX:0:t.clientX,y:t.type.match(/^touch/)?t.changedTouches[0]?t.changedTouches[0].pageY:0:t.clientY}}function a(e,t){return t.velocity=function(e,t){const o=l(t),n=e?l(e):o;return{x:o.x-n.x,y:o.y-n.y}}(e,t),t}const u=e=>{const{x:t,y:o}=l(e);return e.dragX=t,e.dragY=o,e},c=(e,t,o)=>function(i){let p=!1,r=!1;const l=(0,n.Z)((0,s.Rp)(a,void 0,(e=>{p=!0,r||o.onDrag(u(e))})),16),c=n=>{r=!0,p&&o.onDragEnd(u(n)),window.removeEventListener(e,l),window.removeEventListener(t,c)};window.addEventListener(e,l),window.addEventListener(t,c),o.onDragStart(u(i))},d=({onDrag:e,onDragStart:t=(e=>e),onDragEnd:o=(e=>e)}={})=>({onMouseDown:c("mousemove","mouseup",{onDrag:e,onDragStart:t,onDragEnd:o}),onTouchStart:c("touchmove","touchend",{onDrag:e,onDragStart:t,onDragEnd:o})}),h=e=>t=>{13===(e=>e.which||e.keyCode)(t)&&e(t)}},"7e5f":(e,t,o)=>{"use strict";o.d(t,{Z:()=>v});var n=o("Hjnd"),s=o.n(n),i=o("jQDz"),p=o("nv4P"),r=o("X40V"),l=o("RyS8"),a=o("yTkX"),u=o("R2Pi"),c=o("lotc"),d=o("XXsV"),h=o("lrhy"),f=o("kAIv"),m=o("Oyie");const y=[],v=p.Z.extend({parent:"body",el:'<article data-element="popup" />',optionTypes:{cleanOnClose:c.Z.bool,shouldExitOnClickOutside:c.Z.bool,shouldExitOnEscape:c.Z.bool,shouldRejectOnCancel:c.Z.bool},defaultOptions:{cleanOnClose:!0,shouldExitOnClickOutside:!0,shouldExitOnEscape:!0,shouldRejectOnCancel:!1},events:{'click [data-action="close"]':"cancel","click button:not([type])":a.PF,"mousedown .popup-container":"onMouseDown","mouseup .popup-container":"onMouseUp"},onMouseDown:function(e){this.lastMouseDownTarget=e.target},onMouseUp:function(e){this.options.shouldExitOnClickOutside&&e.currentTarget===this.lastMouseDownTarget&&(this.cancel(e),delete this.lastMouseDownTarget)},constructor:function(){this.onKeyDown=this.onKeyDown.bind(this),this.identifier=Symbol(Math.random()),this.resizeHandler=function(){s().each(y,(function(e,t){t.setHeightForMobileResolution()}))}.bind(this),p.Z.apply(this,arguments)},initialize:function(){p.Z.prototype.initialize.apply(this,arguments),this.renderLayout()},setElement:function(){return p.Z.prototype.setElement.apply(this,arguments),this.$container=this.$(".popup-container"),this},delegateEvents:function(){p.Z.prototype.delegateEvents.apply(this,arguments),s()(window).on("resize",this.resizeHandler),document.addEventListener("keydown",this.onKeyDown,!0)},undelegateEvents:function(){p.Z.prototype.undelegateEvents.apply(this,arguments),s()(window).off("resize",this.resizeHandler),document.removeEventListener("keydown",this.onKeyDown,!0)},getPromise:function(){return this._promise||(this._promise=(0,h.pJ)()),this._promise},open:function(){return-1!==y.indexOf(this)?(this.show(),this.setElement(this.$el),this.getPromise()):(this.render(),y.unshift(this),s()((0,i.Z)(this,"parent")).append(this.$el),this.setElement(this.$el),this.hide(),this.setHeightForMobileResolution(),window.requestAnimationFrame(function(){this.show()}.bind(this)),this.getPromise())},show:function(){this.$container.removeClass("hidden"),document.body.classList.add("--prevent-scroll"),d.K.add(this.identifier)},hide:function(){this.$container.addClass("hidden"),d.K.delete(this.identifier),d.K.isEmpty()&&document.body.classList.remove("--prevent-scroll")},setIsLoading:function(e){this.$container.toggleClass("popup-loading",e)},isHidden:function(){return this.$container.hasClass("hidden")}
1,onKeyDown:function(e){27===e.keyCode&&this.options.shouldExitOnEscape&&d.K.getTopPopup()===this.identifier&&(this.cancel(),e.stopPropagation())},cancel:function(e){return this._close(),this.options.shouldRejectOnCancel?this.getPromise().reject(new l.ud(e)):this.getPromise().resolve({manuallyClosed:Boolean(e&&e.target)})},continue:function(e){return this._close(),this.getPromise().resolve(e)},_close:function(e,t){return this.$container.closest(".inline-popup").length>0?this:this.options.cleanOnClose||t?(this.hide(),(0,h.Vs)(500,(0,f.Z)(this.$el)).catch((()=>{})).then(this.remove.bind(this))):(this.hide(),m.resolve())},close:function(e){return this._close(null,e)},replaceWith:function(e,t){return this.close(t),e.open()},setHeightForMobileResolution:function(){if(!u.default.any)return;const e=this.$(".js-popup");(0,r.Nc)({width:window.innerWidth,breakpoint:"breakpointXSmall"})&&e.css({height:window.innerHeight})},resize:function(e){var t=this.$(".js-popup");e.width&&t.width(e.width),e.height&&t.height(e.height)},autofocus:function(){var e=window.scrollX,t=window.scrollY;this.$(".form-input:visible").length>0?(this.$(".form-input").eq(0).focus(),window.scrollTo(e,t)):(this.$(".btn-primary, .submit").focus(),window.scrollTo(e,t))},_removeElement:function(){this.$el.remove()},remove:function(){return this.undelegateEvents(),p.Z.prototype.remove.apply(this,arguments)},renderLayout:function(){this.$el.html(this.template()),this.$container=this.$(".popup-container")},afterRender:function(){p.Z.prototype.afterRender.apply(this,arguments),this.renderChildren()}})},"OUQ+":(e,t,o)=>{"use strict";o.d(t,{Z:()=>c});var n=o("nv4P"),s=o("jQDz"),i=o("bvKJ"),p=o("Hjnd"),r=o.n(p),l=o("KDlt"),a=o("kAIv"),u=o("lotc");o("kNR+");const c=n.Z.extend({displayName:"Notification",optionTypes:{parent:u.Z.string,class:u.Z.string,content:u.Z.string,delay:u.Z.number},defaultOptions:{parent:".flashmessage-container"},events:{'click [data-action="close"]':"onClickClose"},template:function(){return l.Z.getFromMacro("front/macros/notification","flashmessage",[this.options.class,this.options.content,{safecontent:"True"}])},initialize:function(){n.Z.prototype.initialize.apply(this,arguments),this.render(),this.options.delay&&this.close(this.options.delay)},render:function(){this.$el.html((0,s.Z)(this,"template")),r()(this.options.parent).append(this.$el);const e=this.$el.find(".notification");e.addClass("hidden"),(0,i.Z)(e.removeClass.bind(e,"hidden"))},onClickClose:function(e){e&&e.preventDefault&&e.preventDefault(),this.close(0)},close:function(e){e=e||0;const t=this.$el.find(".notification");return setTimeout((()=>{t.addClass("hidden"),(0,a.Z)(t).then((()=>{this.$el.parent()[0].removeChild(this.el)}))}),e),this}})},nsHN:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>a});var n=o("GiO0"),s=o("KDlt"),i=o("iu9k"),p=o("7e5f"),r=o("OUQ+"),l=(o("1MYq"),o("Oyie"));const a=p.Z.extend({defaultOptions:{shouldRejectOnCancel:!0},events:{"reset form":"cancel","submit form":"create"},initialize:function(){p.Z.prototype.initialize.apply(this,arguments),requestAnimationFrame((()=>this.$("input.form-input").focus()))},create:function(e,t){return new l(((e,o)=>{t||(t=this.$(".form-input.name").val()),new n.Z({name:t,models:[this.model.get("uid")]}).save(null,{success:(o,n)=>{this.model.addCollection(n.uid,!0);const s=`This model has been added\n to your new collection <a href="${(0,i.HQ)("collections:collection_display",{username:n.user.username,collection_slug:n.name,collection_uid:n.uid})}">${t}</a>`;new r.Z({content:s,class:"info",delay:5e3}),e(this.continue(!0))},error:(e,t)=>{this.automagicErrors(t.responseJSON?t.responseJSON.detail:"Unexpected error while creating your new collection"),o()}})}))},template:function(){return s.Z.get("front/popups/create-collection",{})}})},nclc:()=>{(window.nunjucksPrecompiled=window.nunjucksPrecompiled||{})["front/layouts/popup.jinja"]={b_popup_header:function(e,t,o,n,s){var i="";try{o=o.push(!0),i+='\n <div class="',i+=n.suppressValue(n.contextOrFrameLookup(t,o,"popupTitleStyle"),e.opts.autoescape),i+='">\n ',i+=n.suppressValue(n.contextOrFrameLookup(t,o,"popupTitle"),e.opts.autoescape),s(null,i+="\n </div>\n ")}catch(e){s(n.handleError(e,null,null))}},b_popup_content:function(e,t,o,n,s){var i="";try{o=o.push(!0),s(null,i+="\n ")}catch(e){s(n.handleError(e,null,null))}}
1,b_popup_footer:function(e,t,o,n,s){var i="";try{o=o.push(!0),s(null,i+="\n ")}catch(e){s(n.handleError(e,null,null))}},root:function(e,t,o,n,s){var i="";try{var p,r,l,a,u,c,d,h,f,m,y,v,g,b;n.contextOrFrameLookup(t,o,"isWhiteBackground")?(i+="\n ",p="c-popup c-popup__container",o.set("popupStyle",p,!0),o.topLevel&&t.setVariable("popupStyle",p),o.topLevel&&t.addExport("popupStyle",p),i+="\n ",r="c-popup__header",o.set("popupHeaderStyle",r,!0),o.topLevel&&t.setVariable("popupHeaderStyle",r),o.topLevel&&t.addExport("popupHeaderStyle",r),i+="\n ",l="c-popup__title",o.set("popupTitleStyle",l,!0),o.topLevel&&t.setVariable("popupTitleStyle",l),o.topLevel&&t.addExport("popupTitleStyle",l),i+="\n ",a="c-popup__actions",o.set("popupActionsStyle",a,!0),o.topLevel&&t.setVariable("popupActionsStyle",a),o.topLevel&&t.addExport("popupActionsStyle",a),i+="\n ",u="c-popup__close",o.set("popupCloseStyle",u,!0),o.topLevel&&t.setVariable("popupCloseStyle",u),o.topLevel&&t.addExport("popupCloseStyle",u),i+="\n ",c="c-popup__content",o.set("popupContentStyle",c,!0),o.topLevel&&t.setVariable("popupContentStyle",c),o.topLevel&&t.addExport("popupContentStyle",c),i+="\n ",d="c-popup__footer",o.set("popupFooterStyle",d,!0),o.topLevel&&t.setVariable("popupFooterStyle",d),o.topLevel&&t.addExport("popupFooterStyle",d),i+="\n"):(i+="\n ",h="popup",o.set("popupStyle",h,!0),o.topLevel&&t.setVariable("popupStyle",h),o.topLevel&&t.addExport("popupStyle",h),i+="\n ",f="popup-header",o.set("popupHeaderStyle",f,!0),o.topLevel&&t.setVariable("popupHeaderStyle",f),o.topLevel&&t.addExport("popupHeaderStyle",f),i+="\n ",m="popup-title",o.set("popupTitleStyle",m,!0),o.topLevel&&t.setVariable("popupTitleStyle",m),o.topLevel&&t.addExport("popupTitleStyle",m),i+="\n ",y="popup-actions",o.set("popupActionsStyle",y,!0),o.topLevel&&t.setVariable("popupActionsStyle",y),o.topLevel&&t.addExport("popupActionsStyle",y),i+="\n ",v="popup-close",o.set("popupCloseStyle",v,!0),o.topLevel&&t.setVariable("popupCloseStyle",v),o.topLevel&&t.addExport("popupCloseStyle",v),i+="\n ",g="popup-content",o.set("popupContentStyle",g,!0),o.topLevel&&t.setVariable("popupContentStyle",g),o.topLevel&&t.addExport("popupContentStyle",g),i+="\n ",b="popup-footer",o.set("popupFooterStyle",b,!0),o.topLevel&&t.setVariable("popupFooterStyle",b),o.topLevel&&t.addExport("popupFooterStyle",b),i+="\n"),i+='\n\n<div class="popup-container',n.contextOrFrameLookup(t,o,"popupNeedsLoading")&&(i+=" popup-loading"),i+=" ",i+=n.suppressValue(n.contextOrFrameLookup(t,o,"popupClass"),e.opts.autoescape),i+='">\n <form class="',i+=n.suppressValue(n.contextOrFrameLookup(t,o,"popupStyle"),e.opts.autoescape),i+=' js-popup" method="post"',n.contextOrFrameLookup(t,o,"allowAutocomplete")||(i+=' autocomplete="off"'),i+=" ",n.contextOrFrameLookup(t,o,"popupAction")&&(i+='action="',i+=n.suppressValue(n.contextOrFrameLookup(t,o,"popupAction"),e.opts.autoescape),i+='"'),i+=">\n\n ",n.contextOrFrameLookup(t,o,"allowAutocomplete")||(i+="\n ",i+='\n <input type="text" style="display:none" />\n <input type="password" style="display:none" />\n '),i+='\n\n <header class="',i+=n.suppressValue(n.contextOrFrameLookup(t,o,"popupHeaderStyle"),e.opts.autoescape),i+='">\n\n ',t.getBlock("popup_header")(e,t,o,n,(function(p,r){p?s(p):(i+=r,i+='\n\n <div class="',i+=n.suppressValue(n.contextOrFrameLookup(t,o,"popupActionsStyle"),e.opts.autoescape),i+='">\n ',n.contextOrFrameLookup(t,o,"popupClosable")&&(i+='\n <a class="',i+=n.suppressValue(n.contextOrFrameLookup(t,o,"popupCloseStyle"),e.opts.autoescape),i+='" data-action="close" data-selenium="close-popup">\n <i class="fa-regular fa-times"></i>\n </a>\n '),i+='\n </div>\n\n </header>\n\n <div class="',i+=n.suppressValue(n.contextOrFrameLookup(t,o,"popupContentStyle"),e.opts.autoescape),i+=" ",i+=n.suppressValue(n.contextOrFrameLookup(t,o,"popupContentClass"),e.opts.autoescape),i+='">\n ',t.getBlock("popup_content")(e,t,o,n,(function(p,r){p?s(p):(i+=r,i+="\n </div>\n\n ",e.getFilter("default").call(t,n.contextOrFrameLookup(t,o,"withFooter"),!0)&&(i+='\n <footer class="',i+=n.suppressValue(n.contextOrFrameLookup(t,o,"popupFooterStyle"),e.opts.autoescape),i+='">\n ',t.getBlock("popup_footer")(e,t,o,n,(function(e,t){e?s(e):(i+=t,i+="\n </footer>\n ")}))),s(null,i+="\n\n </form>\n\n</div>\n"))})))}))}catch(e){s(n.handleError(e,null,null))}}}},"kNR+":()=>{(window.nunjucksPrecompiled=window.nunjucksPrecompiled||{})["front/macros/notification.jinja"]={root:function(e,t,o,n,s){var i="";try{i+="\n\n";var p=n.makeMacro(["type","content"],["options"],(function(s,i,p){var r=o;o=new n.Frame,(p=p||{}).hasOwnProperty("caller")&&o.set("caller",p.caller),o.set("type",s),o.set("content",i),o.set("options",p.hasOwnProperty("options")?p.options:{});var l,a="";return a+="\n\n ",l=e.getFilter("merge").call(t,{safecontent:!1},n.contextOrFrameLookup(t,o,"options")),o.set("options",l,!0),o.topLevel&&t.setVariable("options",l),o.topLevel&&t.addExport("options",l),a+='\n\n <div class="flashmessage notification ',a+=n.suppressValue(s,e.opts.autoescape),a+='">\n <div class="inner">\n <div class="message">
1\n ',n.memberLookup(n.contextOrFrameLookup(t,o,"options"),"safecontent")?(a+="\n ",a+=n.suppressValue(e.getFilter("safe").call(t,i),e.opts.autoescape),a+="\n "):(a+="\n ",a+=n.suppressValue(i,e.opts.autoescape),a+="\n "),a+='\n </div>\n <button class="flashmessage-close" data-action="close" title="Close"></button>\n </div>\n </div>\n\n',o=r,new n.SafeString(a)}));t.addExport("flashmessage"),t.setVariable("flashmessage",p),s(null,i+="\n")}catch(e){s(n.handleError(e,null,null))}}}},"1MYq":(e,t,o)=>{o("nclc"),(window.nunjucksPrecompiled=window.nunjucksPrecompiled||{})["front/popups/create-collection.jinja"]={b_popup_content:function(e,t,o,n,s){var i="";try{o=o.push(!0),i+='\n\n <div class="form">\n <div class="form-global-error',n.contextOrFrameLookup(t,o,"errors")||(i+=" cloaked"),i+='">\n <i class="icon fa-regular fa-warning"></i>\n <span class="message">',i+=n.suppressValue(e.getFilter("striptags").call(t,n.contextOrFrameLookup(t,o,"errors")),e.opts.autoescape),s(null,i+='</span>\n </div>\n\n <div class="form-field">\n <div class="form-error" data-error-for="name"></div>\n <input type="text" class="form-input name" required placeholder="Collection name" data-error-for="name"/>\n </div>\n </div>\n\n')}catch(e){s(n.handleError(e,null,null))}},b_popup_footer:function(e,t,o,n,s){var i="";try{o=o.push(!0),s(null,i+='\n\n <div class="actions">\n <button class="button btn-medium btn-tertiary cancel" type="reset">Cancel</button>\n <button class="button btn-medium btn-primary submit" type="submit">Create</button>\n </div>\n\n')}catch(e){s(n.handleError(e,null,null))}},root:function(e,t,o,n,s){var i="";try{var p=null;e.getTemplate("front/layouts/popup.jinja",!0,"front/popups/create-collection.jinja",!1,(function(r,l){if(r)s(r);else{for(var a in(p=l).blocks)t.addBlock(a,p.blocks[a]);var u,c,d,h;i+="\n\n",u="Create collection",o.set("popupTitle",u,!0),o.topLevel&&t.setVariable("popupTitle",u),o.topLevel&&t.addExport("popupTitle",u),i+="\n",c="popup-create-collection",o.set("popupClass",c,!0),o.topLevel&&t.setVariable("popupClass",c),o.topLevel&&t.addExport("popupClass",c),i+="\n",d=!1,o.set("popupClosable",d,!0),o.topLevel&&t.setVariable("popupClosable",d),o.topLevel&&t.addExport("popupClosable",d),i+="\n",h=!1,o.set("popupNeedsLoading",h,!0),o.topLevel&&t.setVariable("popupNeedsLoading",h),o.topLevel&&t.addExport("popupNeedsLoading",h),i+="\n\n",(p?function(e,t,o,n,s){s("")}:t.getBlock("popup_content"))(e,t,o,n,(function(r,l){r?s(r):(i+=l,i+="\n\n",(p?function(e,t,o,n,s){s("")}:t.getBlock("popup_footer"))(e,t,o,n,(function(r,l){r?s(r):(i+=l,i+="\n",p?p.rootRenderFunc(e,t,o,n,s):s(null,i))})))}))}}))}catch(e){s(n.handleError(e,null,null))}}}}}]); 2//# sourceMappingURL=aa57688b3a12db0d8e9aa0d756e60110-v2.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.