From 002eb44eee98dc838bc854b945ab0cbf4884dd57 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 14 Dec 2020 23:29:56 -0800 Subject: :star: --- semantic/dist/components/form.min.js | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 semantic/dist/components/form.min.js (limited to 'semantic/dist/components/form.min.js') diff --git a/semantic/dist/components/form.min.js b/semantic/dist/components/form.min.js deleted file mode 100644 index f6eb341..0000000 --- a/semantic/dist/components/form.min.js +++ /dev/null @@ -1,11 +0,0 @@ - /* - * # Fomantic UI - 2.8.7 - * https://github.com/fomantic/Fomantic-UI - * http://fomantic-ui.com/ - * - * Copyright 2014 Contributors - * Released under the MIT license - * http://opensource.org/licenses/MIT - * - */ -!function(I,$,O,L){"use strict";I.isFunction=I.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},$=void 0!==$&&$.Math==Math?$:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),I.fn.form=function(C){var w,A=I(this),D=A.selector||"",V=(new Date).getTime(),F=[],R=C,S=arguments[1],T="string"==typeof R,j=[].slice.call(arguments,1);return A.each(function(){var n,d,t,e,f,s,m,p,g,r,u,i,a,l,c,h=I(this),v=this,b=[],y=!1,o=!1,x=!1,k=["clean","clean"],E={initialize:function(){E.get.settings(),T?(c===L&&E.instantiate(),E.invoke(R)):(c!==L&&c.invoke("destroy"),E.verbose("Initializing form validation",h,f),E.bindEvents(),E.set.defaults(),f.autoCheckRequired&&E.set.autoCheck(),E.instantiate())},instantiate:function(){E.verbose("Storing instance of module",E),c=E,h.data(a,E)},destroy:function(){E.verbose("Destroying previous module",c),E.removeEvents(),h.removeData(a)},refresh:function(){E.verbose("Refreshing selector cache"),n=h.find(p.field),d=h.find(p.group),t=h.find(p.message),h.find(p.prompt),e=h.find(p.submit),h.find(p.clear),h.find(p.reset)},submit:function(){E.verbose("Submitting form",h),o=!0,h.submit()},attachEvents:function(e,t){t=t||"submit",I(e).on("click"+l,function(e){E[t](),e.preventDefault()})},bindEvents:function(){E.verbose("Attaching form events"),h.on("submit"+l,E.validate.form).on("blur"+l,p.field,E.event.field.blur).on("click"+l,p.submit,E.submit).on("click"+l,p.reset,E.reset).on("click"+l,p.clear,E.clear),f.keyboardShortcuts&&h.on("keydown"+l,p.field,E.event.field.keydown),n.each(function(e,t){var n=I(t),t=n.prop("type"),t=E.get.changeEvent(t,n);n.on(t+l,E.event.field.change)}),f.preventLeaving&&I($).on("beforeunload"+l,E.event.beforeUnload),n.on("change click keyup keydown blur",function(e){I(this).triggerHandler(e.type+".dirty")}),n.on("change.dirty click.dirty keyup.dirty keydown.dirty blur.dirty",E.determine.isDirty),h.on("dirty"+l,function(e){f.onDirty.call()}),h.on("clean"+l,function(e){f.onClean.call()})},clear:function(){n.each(function(e,t){var n=I(t),r=n.parent(),i=n.closest(d),a=i.find(p.prompt),o=n.closest(p.uiCalendar),l=n.data(m.defaultValue)||"",s=r.is(p.uiCheckbox),u=r.is(p.uiDropdown)&&E.can.useElement("dropdown"),t=0")},fields:function(e){var n=I();return I.each(e,function(e,t){n=n.add(E.get.field(t))}),n},validation:function(r){var i,a;return!!s&&(I.each(s,function(e,n){a=n.identifier||e,I.each(E.get.field(a),function(e,t){if(t==r[0])return n.identifier=a,i=n,!1})}),i||!1)},value:function(e){var t=[];return t.push(e),E.get.values.call(v,t)[e]},values:function(e){var e=Array.isArray(e)?E.get.fields(e):n,d={};return e.each(function(e,t){var n=I(t),r=n.closest(p.uiCalendar),i=n.prop("name"),a=n.val(),o=n.is(p.checkbox),l=n.is(p.radio),s=-1!==i.indexOf("[]"),t=0"}),I(n+="")},prompt:function(e,t){return I("
").addClass(t).html(e[0])}},formatter:{date:function(e){return Intl.DateTimeFormat("en-GB").format(e)},datetime:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},time:function(e){return Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},month:function(e){return Intl.DateTimeFormat("en-GB",{month:"2-digit",year:"numeric"}).format(e)},year:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric"}).format(e)}},rules:{empty:function(e){return!(e===L||""===e||Array.isArray(e)&&0===e.length)},checked:function(){return 0=t},length:function(e,t){return e!==L&&e.length>=t},exactLength:function(e,t){return e!==L&&e.length==t},maxLength:function(e,t){return e!==L&&e.length<=t},match:function(e,t,n){var r,i;return 0<(i=n.find('[data-validate="'+t+'"]')).length||0<(i=n.find("#"+t)).length||0<(i=n.find('[name="'+t+'"]')).length?r=i.val():0<(i=n.find('[name="'+t+'[]"]')).length&&(r=i),r!==L&&e.toString()==r.toString()},different:function(e,t,n){var r,i;return 0<(i=n.find('[data-validate="'+t+'"]')).length||0<(i=n.find("#"+t)).length||0<(i=n.find('[name="'+t+'"]')).length?r=i.val():0<(i=n.find('[name="'+t+'[]"]')).length&&(r=i),r!==L&&e.toString()!==r.toString()},creditCard:function(n,e){var r,i,a={visa:{pattern:/^4/,length:[16]},amex:{pattern:/^3[47]/,length:[15]},mastercard:{pattern:/^5[1-5]/,length:[16]},discover:{pattern:/^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,length:[16]},unionPay:{pattern:/^(62|88)/,length:[16,17,18,19]},jcb:{pattern:/^35(2[89]|[3-8][0-9])/,length:[16]},maestro:{pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,length:[12,13,14,15,16,17,18,19]},dinersClub:{pattern:/^(30[0-5]|^36)/,length:[14]},laser:{pattern:/^(6304|670[69]|6771)/,length:[16,17,18,19]},visaElectron:{pattern:/^(4026|417500|4508|4844|491(3|7))/,length:[16]}},o=!1,e="string"==typeof e&&e.split(",");if("string"==typeof n&&0!==n.length){if(n=n.replace(/[\-]/g,""),e&&(I.each(e,function(e,t){(i=a[t])&&(r={length:-1!==I.inArray(n.length,i.length),pattern:-1!==n.search(i.pattern)}).length&&r.pattern&&(o=!0)}),!o))return!1;if((e={number:-1!==I.inArray(n.length,a.unionPay.length),pattern:-1!==n.search(a.unionPay.pattern)}).number&&e.pattern)return!0;for(var t=n.length,l=0,s=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],u=0;t--;)u+=s[l][parseInt(n.charAt(t),10)],l^=1;return u%10==0&&0=t)},exactCount:function(e,t){return 0==t?""===e:1==t?""!==e&&-1===e.search(","):e.split(",").length==t},maxCount:function(e,t){return 0!=t&&(1==t?-1===e.search(","):e.split(",").length<=t)}}}}(jQuery,window,document); \ No newline at end of file -- cgit v1.2.3