text: /**
    * di-vue-mask v1.1.0
    * (c) 2017 Sergio Rodrigues
    * @license MIT
    */
   !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.VueMask=t()}(this,function(){"use strict";function e(e){var t=e.clean,n=e.format,r=e.formatter;return function(e){var a=e.target,i=e.type,u=e.isTrusted;"paste"===i&&(a.value="");var o=t(a.value);a.value=n({value:o,formatter:r}),a.dataset.value=a.value,("mask"===i||u)&&a.dispatchEvent(new Event("input"))}}function t(e){var t=e.value;return t=e.formatter.apply(t),t.trim().replace(/[^0-9]$/,"")}function n(n){return{bind:function(r,a,o){var s=n(r,a,o),c=f(s.clearValue),l=s.format||t,p=s.pattern?new i(s.pattern,s.options||{}):null,v=e({clean:c,format:l,formatter:p});r=u(r,o),r.addEventListener("input",v,!1),r.addEventListener("paste",v,!1),r.addEventListener("blur",v,!1),r.addEventListener("mask",v,!1),v({target:r,type:"mask"})},update:function(e,t,n){e=u(e,n),a.nextTick(function(){(e.dataset.value||"")!==e.value&&e.dispatchEvent(new Event("mask"))})}}}function r(e){r.installed||(a=e,e.directive("mask",l),e.directive("maskDate",v),e.directive("maskPhone",m),e.directive("maskDecimal",g),e.directive("maskNumber",y),e.directive("maskCpf",b),e.directive("maskCnpj",w),e.directive("maskCep",k),e.directive("maskCc",A),e.directive("maskModel",V),r.installed=!0)}var a,i=("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,function(e,t){return t={exports:{}},e(t,t.exports),t.exports}(function(e,t){!function(t,n){e.exports=n()}(0,function(){function e(e,t){for(var n=0,r=t-1,a={escape:!0};r>=0&&a&&a.escape;)a=o[e.charAt(r)],n+=a&&a.escape?1:0,r--;return n>0&&n%2==1}function t(e,t){var n=e.replace(/[^0]/g,"").length;return t.replace(/[^\d]/g,"").length-n}function n(e,t,n,r){return r&&"function"==typeof r.transform&&(t=r.transform(t)),n.reverse?t+e:e+t}function r(e,t,n){var a=e.charAt(t),i=o[a];return""!==a&&(!(!i||i.escape)||r(e,t+n,n))}function a(e,t,n){var r=e.charAt(t),i=o[r];return""!==r&&(!(!i||!i.recursive)||a(e,t+n,n))}function i(e,t,n){var r=e.split("");return r.splice(n,0,t),r.join("")}function u(e,t){this.options=t||{},this.options={reverse:this.options.reverse||!1,usedefaults:this.options.usedefaults||this.options.reverse},this.pattern=e}var o={0:{pattern:/\d/,_default:"0"},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,optional:!0,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/},U:{pattern:/[a-zA-Z]/,transform:function(e){return e.toLocaleUpperCase()}},L:{pattern:/[a-zA-Z]/,transform:function(e){return e.toLocaleLowerCase()}},$:{escape:!0}};return u.prototype.process=function(u){var s=this;if(!u)return{result:"",valid:!1};u+="";var c=this.pattern,f=!0,l="",p=this.options.reverse?u.length-1:0,v=0,d=t(c,u),m=!1,h=[],g=!1,y={start:this.options.reverse?c.length-1:0,end:this.options.reverse?-1:c.length,inc:this.options.reverse?-1:1};for(v=y.start;function(e){if(!g&&!h.length&&r(c,v,y.inc))return!0;if(!g&&h.length&&a(c,v,y.inc))return!0;if(g||(g=h.length>0),g){var t=h.shift();if(h.push(t),e.reverse&&p>=0)return v++,c=i(c,t,v),!0;if(!e.reverse&&p<u.length)return c=i(c,t,v),!0}return v<c.length&&v>=0}(this.options);v+=y.inc){var b=u.charAt(p),w=c.charAt(v),k=o[w];if(h.length&&k&&!k.recursive&&(k=null),!g||b){if(s.options.reverse&&e(c,v)){l=n(l,w,s.options,k),v+=y.inc;continue}if(!s.options.reverse&&m){l=n(l,w,s.options,k),m=!1;continue}if(!s.options.reverse&&k&&k.escape){m=!0;continue}}if(!g&&k&&k.recursive)h.push(w);else{if(g&&!b){l=n(l,w,s.options,k);continue}if(!g&&h.length>0&&!b)continue}if(k)if(k.optional){if(k.pattern.test(b)&&d)l=n(l,b,s.options,k),p+=y.inc,d--;else if(h.length>0&&b){f=!1;break}}else if(k.pattern.test(b))l=n(l,b,s.options,k),p+=y.inc;else{if(b||!k._default||!s.options.usedefaults){f=!1;break}l=n(l,k._default,s.options,k)}else l=n(l,w,s.options,k),!g&&h.length&&h.push(w)}return{result:l,valid:f}},u.prototype.apply=function(e){return this.process(e).result},u.prototype.validate=function(e){return this.process(e).valid},u.process=function(e,t,n){return new u(t,n).process(e)},u.apply=function(e,t,n){return new u(t,n).apply(e)},u.validate=function(e,t,n){return new u(t,n).validate(e)},u})})),u=function(e,t){return"input"===t.tag?e:e.querySelector("input:not([readonly])")},o=function(e){return e.replace(/\D/g,"")},s=function(e){return e.replace(/[^a-zA-Z]/g,"")},c=function(e){return e.replace(/[^a-zA-Z0-9]/g,"")},f=function(e){if("function"==typeof e)return e;switch(e){case"number":return o;case"letter":return s;default:return c}},l=n(function(e,t){return{pattern:t.value,format:function(e){var t=e.value;return t=e.formatter.apply(t),t.trim().replace(/[^a-zA-Z0-9]$/,"")}}}),p={us:"0000-00-00",br:"00/00/0000"},v=n(function(e,t){var n=t.arg,r=t.modifiers,a=n||Object.keys(r)[0]||"us";return{pattern:p[a],clearValue:"number"}}),d={get us(){var e=new i("(000) 000-0000");return{format:function(t){return e.apply(t)}}},get br(){var e=new i("(00) 0000-0000"),t=new i("(00) 9 0000-0000"),n=new i("0000-000-0000");return{format:function(r){return r=0===r.indexOf("0800")?n.apply(r):r.length<=10?e.apply(r):t.apply(r)}}}},m=n(function(e,t){var n=t.arg,r=t.modifiers,a=n||Object.keys(r)[0]||"us",i=d[a];return{clearValue:"number",format:function(e){var t=e.value;return t=i.format(t),t.trim().replace(/[^0-9]$/,"")}}}),h={us:{thousand:",",decimal:"."},br:{thousand:".",decimal:","}},g=n(function(e,t){var n=t.value,r=t.arg,a=t.modifiers,i=r||Object.keys(a)[0]||"us",u=h[i],o="#"+u.thousand+"##0";if(n&&n>0)for(o+=u.decimal;n>0;)o+="0",n--;return{pattern:o,options:{reverse:!0},clearValue:"number",format:function(e){var t=e.value;return e.formatter.apply(Number(t))}}}),y=n(function(){return{pattern:"#0",options:{reverse:!0},clearValue:"number"}}),b=n(function(){return{pattern:"000.000.000-00",clearValue:"number"}}),w=n(function(){return{pattern:"00.000.000/0000-00",clearValue:"number"}}),k=n(function(){return{pattern:"00.000-000",clearValue:"number"}}),A=n(function(){return{pattern:"0000 0000 0000 0000",clearValue:"number"}}),V={bind:function(e,t,n){var r=t.value,a=t.expression;e=u(e,n);var i=a.replace(/\[(\d+)]/,".$1").split("."),o=function(e){for(var t=n.context,r=i.slice(0);r.length>1;)t=t[r.shift()];return t[r.shift()]=e};e.addEventListener("input",function(e){var t=e.target;return o(t.value)},!1),e.value=r},update:function(e,t,n){var r=t.value;r!==t.oldValue&&(e=u(e,n),e.value=r)}},j={install:r};return"undefined"!=typeof window&&window.Vue&&window.Vue.use({install:r}),j});