PageSourceSearch

https://cdn-shared.altium.com/production/wds/dist/components/wds-steps-slider/wds-steps-slider.min.js

js altium.com collected 2026-10-02 02:24:22 UTC 10,128 bytes, 1 lines download raw bytes

1!function(t){var e={};function s(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,s),i.l=!0,i.exports}s.m=t,s.c=e,s.d=function(t,e,n){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)s.d(n,i,function(e){return t[e]}.bind(null,i));return n},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="",s(s.s=21)}({0:function(t,e,s){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var s=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=s){var n,i,r,o,a=[],l=!0,c=!1;try{if(r=(s=s.call(t)).next,0===e){if(Object(s)!==s)return;l=!1}else for(;!(l=(n=r.call(s)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=s.return&&(o=s.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);"Object"===s&&t.constructor&&(s=t.constructor.name);if("Map"===s||"Set"===s)return Array.from(t);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,n=new Array(e);s<e;s++)n[s]=t[s];return n}s.d(e,"b",(function(){return r})),s.d(e,"a",(function(){return o}));var r=function(t,e,s,n){var i=document.querySelectorAll(t);i&&Array.prototype.forEach.call(i,(function(i){i.classList.contains("".concat(e,"_processed"))||(i.classList.add("".concat(e,"_processed")),new s({elm:i,$elm:$(i),selector:t,name:e,options:n||{}}))}))};window.checkInit=r;window.checkInitClass=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.default.name,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e?function(t){return".".concat(t)}:t.default.selector(),n=arguments.length>3?arguments[3]:void 0;$(s).each((function(i,r){$(r).hasClass("".concat(e,"_processed"))||($(r).addClass("".concat(e,"_processed")),new t({elm:r,$elm:$(r),selector:s,name:e,options:n||{}}))}))};var o=function(t,e){for(var s=0,i=function(t){for(var e=[],s=Object.keys(t),n=0;n<s.length;n++)e.push([s[n],t[s[n]]]);return e}(t);s<i.length;s++){var r=n(i[s],2),o=r[0],a=r[1];0===o.indexOf("__")?t[o]=".".concat(e)+(a||o):0===o.indexOf("_")&&(t[o]=a||o),0===o.indexOf("$__")&&(t[o]=t.$elm.find(".".concat(e)+(a||o.slice(1))))}}},21:function(t,e,s){t.exports=s(22)},22:function(t,e,s){"use strict";s.r(e);var n=s(0);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function r(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,n)}return s}function o(t,e,s){return(e=l(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function a(t,e){for(var s=0;s<e.length;s++){var n=e[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function l(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var n=s.call(t,e||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}
1(t,"string");return"symbol"==i(e)?e:e+""}var c=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.conf=e,this.ops=function(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?r(Object(s),!0).forEach((function(e){o(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):r(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}({classNameActive:"_active",classNameDisabled:"_disabled",classNameCurrent:"_current",firstActiveStep:this.conf.$elm.data("step-first"),stepsLength:this.conf.$elm.data("step-length"),sessionName:"steps-history-slider",liveTime:864e5,onChange:function(){},onChanged:function(){},onLoad:function(){},sliderSettings:{items:1,autoHeight:!0,mouseDrag:!1,touchDrag:!1,nav:!1,dots:!1,smartSpeed:this.conf.$elm.data("step-speed")?parseInt(this.conf.$elm.data("step-speed")):300}},this.conf.options),this.stepsPath=[],this.currentStep=void 0,this.$steps=this.conf.$elm.find("[data-step-name]"),this.$navStepBullets=this.conf.$elm.find("[data-step-bullets]"),this.init()},(e=[{key:"init",value:function(){var t=this;this.createHTML(),this.createBullets(),this.$slider=this.$stepsWrap.owlCarousel(this.ops.sliderSettings),this.loadStepHistory(),this.conf.$elm.on("click",(function(e){var s=$(e.target).closest("[data-step-go-to]");if(s.length){var n=s.attr("data-step-go-to");if(n&&""!==n)switch(e.preventDefault(),e.stopPropagation(),n){case"prev":t.goToBackStep(t.stepsPath.length-2);break;case"first":t.goToBackStep(0);break;default:t.goToStep(n)}}})),this.ops.onLoad(this.$slider,this.conf.$elm)}},{key:"loadStepHistory",value:function(){var t=sessionStorage.getItem(this.ops.sessionName);if(t)if(t=JSON.parse(t),location.href===t.location&&(new Date).getTime()-t.liveTime<this.ops.liveTime)if(t.stepsPath.length>1){this.stepsPath=t.stepsPath;for(var e=0,s=this.stepsPath.length;e<s;e++)this.addStep(this.stepsPath[e]);this.firstLoad(t.currentStep)}else this.removeHistory(),this.firstLoad(this.ops.firstActiveStep);else this.removeHistory(),this.firstLoad(this.ops.firstActiveStep);else this.firstLoad(this.ops.firstActiveStep)}},{key:"firstLoad",value:function(t){this.goToStep(t,0),this.$slider.trigger("translated.owl.carousel")}},{key:"goToLogic",value:function(){this.updateBullets(),this.updateStepsNav(),this.updateHistory()}},{key:"updateHistory",value:function(){sessionStorage.setItem(this.ops.sessionName,JSON.stringify({currentStep:this.currentStep,stepsPath:this.stepsPath,location:location.href,liveTime:(new Date).getTime()}))}},{key:"removeHistory",value:function(){sessionStorage.removeItem(this.ops.sessionName)}},{key:"updateStepsNav",value:function(){this.conf.$elm.find("[data-step-amount]").text(this.ops.stepsLength),this.conf.$elm.find("[data-step-current-index]").text(this.stepsPath.indexOf(this.currentStep)+1),this.conf.$elm.attr("data-step-current",this.stepsPath.indexOf(this.currentStep)),1===this.stepsPath.length?(this.conf.$elm.find('[data-step-go-to="prev"]').addClass(this.ops.classNameDisabled),this.conf.$elm.find('[data-step-go-to="first"]').addClass(this.ops.classNameDisabled)):(this.conf.$elm.find('[data-step-go-to="prev"]').removeClass(this.ops.classNameDisabled),this.conf.$elm.find('[data-step-go-to="first"]').removeClass(this.ops.classNameDisabled))}},{key:"updateBullets",value:function(){var t=this;this.$navStepBullets.length&&this.$navStepBullets.each((function(e,s){var n=$(s).find("[data-step-bullet]");n.removeClass(t.ops.classNameActive),n.removeClass(t.ops.classNameCurrent),n.removeAttr("data-step-go-to");for(var i=0,r=t.stepsPath.length;i<r;i++)n.eq(i).addClass(t.ops.classNameActive),n.eq(i).attr("data-step-go-to",t.stepsPath[i]),i===r-1&&n.eq(i).addClass(t.ops.classNameCurrent)}))}},{key:"goToStep",value:function(t,e){~this.stepsPath.indexOf(t)?this.goToBackStep(this.stepsPath.indexOf(t),e):this.goToNextStep(t,e)}},{key:"goToBackStep",value:function(t,e){var s=this;this.isAnimating||this.stepsPath.length<=1||this.stepsPath[t]===this.currentStep||(this.ops.onChange(),this.isAnimating=!0,this.$slider.trigger("to.owl.carousel",[t,e]),this.onSlidingOff((function(){for(var e=s.stepsPath.length-1,n=t;e>n;e--)s.removeStep(e),s.stepsPath.splice(e,1);s.currentStep=s.stepsPath[t],s.goToLogic(),s.isAnimating=!1,s.ops.onChanged()})))}},{key:"goToNextStep",value:function(t,e){var s=this;this.isAnimating||t===this.currentStep||this.$steps.filter('[data-step-name="'.concat(t,'"]')).length&&(this.ops.onChange(),this.addStep(t),this.stepsPath.push(t),this.isAnimating=!0,this.$slider.trigger("next.owl.carousel",[e]),this.onSlidingOff((function(){s.currentStep=t,
1s.goToLogic(),s.isAnimating=!1,s.ops.onChanged()})))}},{key:"removeStep",value:function(t){this.$slider.trigger("remove.owl.carousel",t),this.$slider.trigger("refresh.owl.carousel")}},{key:"addStep",value:function(t){var e=this.$steps.filter('[data-step-name="'.concat(t,'"]'));this.$slider.trigger("add.owl.carousel",[e.clone()]),this.$slider.trigger("refresh.owl.carousel")}},{key:"createHTML",value:function(){this.conf.$elm.append('<div class="owl-carousel"></div>'),this.$stepsWrap=this.conf.$elm.find(".owl-carousel")}},{key:"createBullets",value:function(){if(this.$navStepBullets.length){for(var t="",e=0,s=this.ops.stepsLength;e<s;e++)t+="<span data-step-bullet>".concat(e+1,"</span>");this.$navStepBullets.html(t)}}},{key:"onSlidingOff",value:function(t){var e=this;this.$slider.on("translated.owl.carousel",(function(){e.$slider.off("translated.owl.carousel"),t()}))}}])&&a(t.prototype,e),s&&a(t,s),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,s}();window.WdsStepsSlider=c,e.default=c,document.addEventListener("DOMContentLoaded",(function(){Object(n.b)(".wds-steps-slider._auto-init","wds-steps-slider",c)}))}});

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.