{"version":3,"file":"jquery.progressbar.min.js","sources":["scripts/progressbar/jquery.progressbar.min.js"],"sourcesContent":["/**************************************************************************\r\nName:         jquery.progressbar.js\r\nDescription:  Progress bar control.\r\nDate Created: 03/11/2014 by Kyle Brickman\r\nModified:\r\n**************************************************************************/\r\n\r\n( function( $ ){\r\n\t$.fn.progressbar = function( options )\r\n\t{\r\n\t\tvar settings = $.extend({\r\n\t\t\tcolor    : 'purple',\r\n\t\t\tcomplete : false,\r\n\t\t\tprogressType : 'default',\r\n\t\t\tresponsiveMinorBreakPoint: 752\r\n\t\t}, options );\r\n\r\n\t\treturn this.filter( 'ul' ).each( function( index ){\r\n\r\n\t\t\tvar calculateNavPercentage = function( pool, tackText )\r\n\t\t\t{\t\t\t\t\r\n\t\t\t\tvar tack;\r\n\t\t\t\tif (typeof(tackText) !== 'string' || tackText.length === 0) {\r\n\t\t\t\t\ttackText = '.done';\r\n\t\t\t\t}\r\n\t\t\t\ttack = pool.filter( tackText ).last( );\r\n\t\t\t\tif (tack.length === 0) {\r\n\t\t\t\t\ttack = pool.filter( '.done' ).last( );\r\n\t\t\t\t}\r\n\t\t\t\tvar childCount   = pool.length;\r\n\t\t\t\tvar fullWidth    = 100 / (childCount-1) - (1 / (childCount-1)); /* floor */\r\n\t\t\t\t//var halfWidth    = fullWidth / 2;\r\n\t\t\t\tvar siblingOrder = pool.index( tack );\r\n\r\n\t\t\t\t//return fullWidth * siblingOrder + halfWidth + '%';\r\n\t\t\t\treturn fullWidth * siblingOrder + '%';\r\n\t\t\t}\r\n\r\n\t\t\tvar adjustPositions = function(breakPoint, currentWidth, tack)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tvar positions = local.positions.children( ),\r\n\t\t\t\t\tmajorPositions = positions.filter(':not([data-minor])'),\r\n\t\t\t\t\tminorPositions = positions.filter('[data-minor]'),\r\n\t\t\t\t\ttracks = local.track.children( ),\r\n\t\t\t\t\tmajorTracks = tracks.filter(':not([data-minor])'),\r\n\t\t\t\t\tminorTracks = tracks.filter('[data-minor]');\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tif (currentWidth >= breakPoint) {\r\n\t\t\t\t\tminorTracks.css({ 'width': ( 100 / (tracks.length-1) - (1 / (tracks.length-1)) ) + '%', 'opacity': '1' }); /* floor */\r\n\t\t\t\t\tmajorTracks.css(  'width', ( 100 / (tracks.length-1) - (1 / (tracks.length-1)) ) + '%' ); /* floor */\r\n\r\n\t\t\t\t\tminorPositions.css({ 'width': ( 100 / (positions.length-1) - (1 / (tracks.length-1)) ) + '%', 'opacity': '1' });/* floor */\r\n\t\t\t\t\tmajorPositions.css(  'width', ( 100 / (positions.length-1) - (1 / (positions.length-1)) ) + '%' );/* floor */\r\n\t\t\t\t\t\r\n\t\t\t\t\tmajorTracks.last().css(  'width', '1%' );\r\n\t\t\t\t\tmajorPositions.last().css(  'width', '1%' );\r\n\t\t\t\t\t\r\n\t\t\t\t\tif( local.settings.complete ) {\r\n\t\t\t\t\t\tlocal.progress.css( 'width', '100%' );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlocal.progress.css( 'width', calculateNavPercentage( positions, tack ));\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tminorTracks.css({ 'width': '0', 'opacity': '0' });\r\n\t\t\t\t\tmajorTracks.css(  'width', ( 100 / (majorTracks.length-1) - (1 / (majorTracks.length-1)) ) + '%' );/* floor */\r\n\r\n\t\t\t\t\tminorPositions.css({ 'width': '0', 'opacity': '0' });\r\n\t\t\t\t\tmajorPositions.css(  'width', ( 100 / (majorPositions.length-1) - (1 / (majorPositions.length-1)) ) + '%' );/* floor */\r\n\t\t\t\t\t\r\n\t\t\t\t\tmajorTracks.last().css(  'width', '1%' );\r\n\t\t\t\t\tmajorPositions.last().css(  'width', '1%' );\r\n\t\t\t\t\t\r\n\t\t\t\t\tif( local.settings.complete ) {\r\n\t\t\t\t\t\tlocal.progress.css( 'width', '100%' );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlocal.progress.css( 'width', calculateNavPercentage( majorPositions, tack ));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t// Establish root container\r\n\t\t\tvar local = {};\r\n\t\t\tlocal.settings = $.extend({}, settings );\r\n\r\n\t\t\t// Retrieve and create DOM elements\r\n\t\t\tlocal.container   = $( this ).parent( );\r\n\t\t\tlocal.placeholder = $( '<div />' );\r\n\t\t\tlocal.positions   = $( this );\r\n\t\t\tlocal.wrapper     = $( '<div />' );\r\n\t\t\tlocal.track       = $( this ).clone( );\r\n\t\t\tlocal.progress    = $( '<div />' );\r\n\t\t\tlocal.spacer      = $( '<div />' );\r\n\t\t\t\t\t\t\r\n\t\t\t//Event bar\r\n\t\t\tlocal.left      = $( '<div />' );\r\n\r\n\t\t\tlocal.processingWidths = false;\r\n\r\n\t\t\t// Save element-specific settings\r\n\t\t\tif( undefined != local.positions.attr( 'data-complete' ) && (\r\n\t\t\t\t   'true' == local.positions.attr( 'data-complete' ).toLowerCase( ) ||\r\n\t\t\t\t  'false' == local.positions.attr( 'data-complete' ).toLowerCase( )))\r\n\t\t\t\tlocal.settings.complete = 'true' == local.positions.attr( 'data-complete' ).toLowerCase( );\r\n\r\n\t\t\tif( undefined != local.positions.attr( 'data-color' ))\r\n\t\t\t\tlocal.settings.color = local.positions.attr( 'data-color' ).toLowerCase( );\r\n\r\n\t\t\t// Add placeholder and detach from DOM\r\n\t\t\tlocal.placeholder.insertBefore( local.positions );\r\n\t\t\tlocal.positions.detach( );\r\n\r\n\t\t\t// Set attributes\r\n\t\t\tif( local.settings.complete )\r\n\t\t\t{\r\n\t\t\t\tlocal.positions.children( ).removeAttr( 'data-done data-current' ).addClass( 'done' );\r\n\t\t\t\tlocal.wrapper.addClass( 'complete' );\r\n\t\t\t}\r\n\r\n\t\t\tlocal.positions.removeAttr( 'id class data-complete data-color' );\r\n\t\t\tlocal.track.removeAttr(     'id class data-complete data-color' );\r\n\r\n\t\t\tlocal.track.children( ).removeAttr( 'data-done data-current' );\r\n\r\n\t\t\t// Set classes\r\n\t\t\tlocal.wrapper.addClass(               'progressbar' );\r\n\t\t\tlocal.wrapper.addClass(               local.settings.color    );\r\n\t\t\tlocal.positions.addClass(             'progressbar-positions' );\r\n\t\t\tlocal.positions.children( ).addClass( 'progressbar-position'  );\r\n\t\t\tlocal.track.addClass(                 'progressbar-track'     );\r\n\t\t\tlocal.progress.addClass(              'progressbar-progress'  );\r\n\t\t\tlocal.spacer.addClass(                'progressbar-spacer'    );\r\n\r\n\t\t\tlocal.positions.children( ).last( ).addClass( 'last'  );\r\n\t\t\tlocal.track.children( ).last( ).addClass( 'last'  );\r\n\r\n\t\t\t//Event bar\r\n\t\t\tif( local.settings.progressType == 'admin_stages' )\r\n\t\t\t{\r\n\t\t\t\tlocal.wrapper.addClass( 'adminStages' );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlocal.positions.children( '[data-done]' ).removeAttr( 'data-done' ).addClass( 'done' );\r\n\t\t\t\r\n\t\t\t/* floor */\r\n\t\t\tlocal.positions.children( ).css( 'width', ( 100 / (local.positions.children( ).length-1) - (1 / (local.positions.children( ).length-1)) ) + '%' );\r\n\t\t\t\r\n\t\t\t/* floor */\r\n\t\t\tlocal.track.children( ).css( 'width', ( 100 / (local.track.children( ).length-1) - (1 / (local.track.children( ).length-1)) ) + '%' );\r\n\t\t\tlocal.track.children( ).text( '' );\r\n\t\t\t\r\n\t\t\tlocal.positions.children( ).last().css(  'width', '1%' );\r\n\t\t\tlocal.track.children( ).last().css(  'width', '1%' );\r\n\t\t\t\r\n\t\t\tif( local.settings.complete )\r\n\t\t\t\tlocal.progress.css( 'width', '100%' );\r\n\t\t\telse\r\n\t\t\t\tlocal.progress.css( 'width', calculateNavPercentage( local.positions.children() ));\r\n\r\n\t\t\t//Event bar\r\n\t\t\tlocal.track.appendTo(     local.left );\r\n\t\t\tlocal.progress.appendTo(  local.left );\r\n\t\t\tlocal.positions.appendTo( local.left );\r\n\t\t\tlocal.left.appendTo( local.wrapper );\r\n\t\t\t\r\n\t\t\tlocal.wrapper.insertBefore( local.placeholder );\r\n\t\t\tlocal.spacer.insertBefore(  local.placeholder );\r\n\r\n\t\t\tlocal.placeholder.remove( );\r\n\t\t\t\r\n\t\t\tlocal.wrapper.css( 'display', 'block' );\r\n\r\n\t\t\tif( local.positions.children( '[data-current]' ).length )\r\n\t\t\t{\r\n\t\t\t\tsetTimeout( function( ){\r\n\t\t\t\t\tlocal.progress.css( 'width', calculateNavPercentage( local.positions.children(), '[data-current],.current' ));\r\n\t\t\t\t\tadjustPositions(local.settings.responsiveMinorBreakPoint, $( window ).width(),' [data-current],.current' );\r\n\r\n\t\t\t\t}, 500 );\r\n\t\t\t\tsetTimeout( function( ){\r\n\t\t\t\t\tlocal.progress.addClass( 'done' );\r\n\t\t\t\t\tlocal.positions.children( '[data-current]' ).addClass( 'done current' ).removeAttr( 'data-current' );\r\n\t\t\t\t}, 1500 );\r\n\t\t\t}\r\n\r\n\t\t\tif( local.settings.responsiveMinorBreakPoint > 0 && local.positions.children( '[data-minor]' ).length > 0 )\r\n\t\t\t{\r\n\t\t\t\t$(window).resize(function(event) {\r\n\t\t\t\t\t// Throttling setup\r\n\t\t\t\t\tif (!local.processingWidths) {\r\n\t\t\t\t\t\tlocal.processingWidths = true;\r\n\r\n\t\t\t\t\t\t// adjust positions\r\n\t\t\t\t\t\tadjustPositions(local.settings.responsiveMinorBreakPoint, $( window ).width());\r\n\r\n\t\t\t\t\t\tlocal.processingWidths = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}).trigger('resize');\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n})( jQuery );\r\n"],"names":["$","fn","progressbar","options","settings","extend","color","complete","progressType","responsiveMinorBreakPoint","this","filter","each","index","adjustPositions","breakPoint","currentWidth","tack","positions","local","children","majorPositions","minorPositions","tracks","track","majorTracks","minorTracks","css","width","length","opacity","last","progress","calculateNavPercentage","pool","tackText","childCount","container","parent","placeholder","wrapper","clone","spacer","left","processingWidths","undefined","attr","toLowerCase","insertBefore","detach","removeAttr","addClass","text","appendTo","remove","setTimeout","window","resize","event","trigger","jQuery"],"mappings":"AAOA,CAAA,SAAYA,GACXA,EAAEC,GAAGC,YAAc,SAAUC,GAE5B,IAAIC,EAAWJ,EAAEK,OAAO,CACvBC,MAAW,SACXC,SAAW,CAAA,EACXC,aAAe,UACfC,0BAA2B,GAC5B,EAAGN,CAAQ,EAEX,OAAOO,KAAKC,OAAQ,IAAK,EAAEC,KAAM,SAAUC,GAqBpB,SAAlBC,EAA2BC,EAAYC,EAAcC,GAGxD,IAAIC,EAAYC,EAAMD,UAAUE,SAAU,EACzCC,EAAiBH,EAAUP,OAAO,oBAAoB,EACtDW,EAAiBJ,EAAUP,OAAO,cAAc,EAChDY,EAASJ,EAAMK,MAAMJ,SAAU,EAC/BK,EAAcF,EAAOZ,OAAO,oBAAoB,EAChDe,EAAcH,EAAOZ,OAAO,cAAc,EAEvBI,GAAhBC,GACHU,EAAYC,IAAI,CAAEC,MAAW,KAAOL,EAAOM,OAAO,GAAM,GAAKN,EAAOM,OAAO,GAAQ,IAAKC,QAAW,GAAI,CAAC,EACxGL,EAAYE,IAAM,QAAW,KAAOJ,EAAOM,OAAO,GAAM,GAAKN,EAAOM,OAAO,GAAQ,GAAI,EAEvFP,EAAeK,IAAI,CAAEC,MAAW,KAAOV,EAAUW,OAAO,GAAM,GAAKN,EAAOM,OAAO,GAAQ,IAAKC,QAAW,GAAI,CAAC,EAC9GT,EAAeM,IAAM,QAAW,KAAOT,EAAUW,OAAO,GAAM,GAAKX,EAAUW,OAAO,GAAQ,GAAI,EAEhGJ,EAAYM,KAAK,EAAEJ,IAAM,QAAS,IAAK,EACvCN,EAAeU,KAAK,EAAEJ,IAAM,QAAS,IAAK,EAEtCR,EAAMf,SAASG,SAClBY,EAAMa,SAASL,IAAK,QAAS,MAAO,EAEpCR,EAAMa,SAASL,IAAK,Q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