This file is indexed.

/usr/share/javascript/smart-table/smart-table.min.js is in libjs-angularjs-smart-table 1.4.13-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

1
(function(b,c){b.module("smart-table",[]).run(["$templateCache",function(d){d.put("template/smart-table/pagination.html",'<nav ng-if="pages.length >= 2"><ul class="pagination"><li ng-repeat="page in pages" ng-class="{active: page==currentPage}"><a ng-click="selectPage(page)">{{page}}</a></li></ul></nav>')}]);b.module("smart-table").constant("stConfig",{pagination:{template:"template/smart-table/pagination.html",itemsByPage:10,displayedPages:5},search:{delay:400},select:{mode:"single",selectedClass:"st-selected"},sort:{ascentClass:"st-sort-ascent",descentClass:"st-sort-descent"}});b.module("smart-table").controller("stTableController",["$scope","$parse","$filter","$attrs",function a(z,e,v,f){var r=f.stTable;var p=e(r);var n=p.assign;var C;var q=v("orderBy");var o=v("filter");var D=s(p(z));var j={sort:{},search:{},pagination:{start:0}};var h;var B=true;var k=this;var g;function s(F){return F?[].concat(F):[]}function m(){D=s(C(z));if(B===true){k.pipe()}}if(f.stSafeSrc){C=e(f.stSafeSrc);z.$watch(function(){var F=C(z);return F?F.length:0},function(G,F){if(G!==D.length){m()}});z.$watch(function(){return C(z)},function(G,F){if(G!==F){m()}})}this.sortBy=function y(F,G){j.sort.predicate=F;j.sort.reverse=G===true;if(b.isFunction(F)){j.sort.functionName=F.name}else{delete j.sort.functionName}j.pagination.start=0;return this.pipe()};this.search=function l(G,F){var I=j.search.predicateObject||{};var H=F?F:"$";G=b.isString(G)?G.trim():G;I[H]=G;if(!G){delete I[H]}j.search.predicateObject=I;j.pagination.start=0;return this.pipe()};this.pipe=function A(){var F=j.pagination;var G;h=j.search.predicateObject?o(D,j.search.predicateObject):D;if(j.sort.predicate){h=q(h,j.sort.predicate,j.sort.reverse)}if(F.number!==c){F.numberOfPages=h.length>0?Math.ceil(h.length/F.number):1;F.start=F.start>=h.length?(F.numberOfPages-1)*F.number:F.start;G=h.slice(F.start,F.start+parseInt(F.number))}n(z,G||h)};this.select=function u(I,H){var G=D;var F=G.indexOf(I);if(F!==-1){if(H==="single"){I.isSelected=I.isSelected!==true;if(g){g.isSelected=false}g=I.isSelected===true?I:c}else{G[F].isSelected=!G[F].isSelected}}};this.slice=function E(G,F){j.pagination.start=G;j.pagination.number=F;return this.pipe()};this.tableState=function x(){return j};this.getFilteredCollection=function t(){return h||D};this.setFilterFunction=function d(F){o=v(F)};this.setSortFunction=function i(F){q=v(F)};this.preventPipeOnWatch=function w(){B=false}}]).directive("stTable",function(){return{restrict:"A",controller:"stTableController",link:function(f,e,d,g){if(d.stSetFilter){g.setFilterFunction(d.stSetFilter)}if(d.stSetSort){g.setSortFunction(d.stSetSort)}}}});b.module("smart-table").directive("stSearch",["stConfig","$timeout",function(d,e){return{require:"^stTable",scope:{predicate:"=?stSearch"},link:function(h,g,f,k){var i=k;var l=null;var j=f.stDelay||d.search.delay;h.$watch("predicate",function(n,m){if(n!==m){k.tableState().search={};i.search(g[0].value||"",n)}});h.$watch(function(){return k.tableState().search},function(o,n){var m=h.predicate||"$";if(o.predicateObject&&o.predicateObject[m]!==g[0].value){g[0].value=o.predicateObject[m]||""}},true);g.bind("input",function(m){m=m.originalEvent||m;if(l!==null){e.cancel(l)}l=e(function(){i.search(m.target.value,h.predicate||"");l=null},j)})}}}]);b.module("smart-table").directive("stSelectRow",["stConfig",function(d){return{restrict:"A",require:"^stTable",scope:{row:"=stSelectRow"},link:function(g,f,e,h){var i=e.stSelectMode||d.select.mode;f.bind("click",function(){g.$apply(function(){h.select(g.row,i)})});g.$watch("row.isSelected",function(j){if(j===true){f.addClass(d.select.selectedClass)}else{f.removeClass(d.select.selectedClass)}})}}}]);b.module("smart-table").directive("stSort",["stConfig","$parse",function(d,e){return{restrict:"A",require:"^stTable",link:function(r,i,l,f){var o=l.stSort;var m=e(o);var k=0;var p=l.stClassAscent||d.sort.ascentClass;var q=l.stClassDescent||d.sort.descentClass;var g=[p,q];var j;if(l.stSortDefault){j=r.$eval(l.stSortDefault)!==c?r.$eval(l.stSortDefault):l.stSortDefault}function h(){k++;o=b.isFunction(m(r))?m(r):l.stSort;if(k%3===0&&l.stSkipNatural===c){k=0;f.tableState().sort={};f.tableState().pagination.start=0;f.pipe()}else{f.sortBy(o,k%2===0)}}i.bind("click",function n(){if(o){r.$apply(h)}});if(j){k=j==="reverse"?1:0;h()}r.$watch(function(){return f.tableState().sort},function(s){if(s.predicate!==o){k=0;i.removeClass(p).removeClass(q)}else{k=s.reverse===true?2:1;i.removeClass(g[k%2]).addClass(g[k-1])}},true)}}}]);b.module("smart-table").directive("stPagination",["stConfig",function(d){return{restrict:"EA",require:"^stTable",scope:{stItemsByPage:"=?",stDisplayedPages:"=?",stPageChange:"&"},templateUrl:function(f,e){if(e.stTemplate){return e.stTemplate}return d.pagination.template},link:function(g,f,e,h){g.stItemsByPage=g.stItemsByPage?+(g.stItemsByPage):d.pagination.itemsByPage;g.stDisplayedPages=g.stDisplayedPages?+(g.stDisplayedPages):d.pagination.displayedPages;g.currentPage=1;g.pages=[];function i(){var l=h.tableState().pagination;var n=1;var j;var m;var k=g.currentPage;g.currentPage=Math.floor(l.start/l.number)+1;n=Math.max(n,g.currentPage-Math.abs(Math.floor(g.stDisplayedPages/2)));j=n+g.stDisplayedPages;if(j>l.numberOfPages){j=l.numberOfPages+1;n=Math.max(1,j-g.stDisplayedPages)}g.pages=[];g.numPages=l.numberOfPages;for(m=n;m<j;m++){g.pages.push(m)}if(k!==g.currentPage){g.stPageChange({newPage:g.currentPage})}}g.$watch(function(){return h.tableState().pagination},i,true);g.$watch("stItemsByPage",function(k,j){if(k!==j){g.selectPage(1)}});g.$watch("stDisplayedPages",i);g.selectPage=function(j){if(j>0&&j<=g.numPages){h.slice((j-1)*g.stItemsByPage,g.stItemsByPage)}};if(!h.tableState().pagination.number){h.slice(0,g.stItemsByPage)}}}}]);b.module("smart-table").directive("stPipe",function(){return{require:"stTable",scope:{stPipe:"="},link:{pre:function(f,e,d,g){if(b.isFunction(f.stPipe)){g.preventPipeOnWatch();g.pipe=function(){return f.stPipe(g.tableState(),g)}}},post:function(f,e,d,g){g.pipe()}}}})})(angular);